douxiaoyun.js/profiles/douyin-profile/Default/Cache/Cache_Data/f_00038e
2026-07-17 22:23:39 +08:00

2 lines
224 KiB
Plaintext

/*! For license information please see 74650.366f5cfc.js.LICENSE.txt */
!function(e,t){"object"==typeof module&&"object"==typeof module.exports?t():"function"==typeof define&&define.amd?define([],t):(e="undefined"!=typeof globalThis?globalThis:e||self)&&t()}(this,function(){"use strict";"object"==typeof window&&(window.openRedirect={version:"1.2.20",webpackPluginVersion:"3.4.22",reportOnly:!1})}),!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).xss={})}(this,function(e){"use strict";var t=function(){return(t=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function r(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}var n=/[^a-zA-Z0-9\\_:.-]/gim,i=/</g,o=/>/g,s=/&#([a-zA-Z0-9]*);?/gim,a=/&quot;/g,c=/&colon;?/gim,u=/&newline;?/gim,l=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,f=/u\s*r\s*l\s*\(.*/gi,h=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,p=/"/g,d=function(e){return e.replace(i,"&lt;").replace(o,"&gt;")},g={indexOf:function(e,t){var r,n;for(r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return -1},forEach:function(e,t,r){var n,i;for(n=0,i=e.length;n<i;n++)t.call(r,e[n],n,e)},some:function(e,t,r){var n,i;for(n=0,i=e.length;n<i;n++)if(t.call(r,e[n],n,e))return!0;return!1},trim:function(e){return e.replace(/(^\s*)|(\s*$)/g,"")},includes:function(e,t){if("string"==typeof e)return -1!==e.indexOf(t);for(var r=0;r<e.length;r++)if(e[r]===t)return!0;return!1},spaceIndex:function(e){var t=/\s|\n|\t/.exec(e);return t?t.index:-1},uniq:function(e){for(var t={},r=[],n=0;n<e.length;n++)t[e[n]]||(r.push(e[n]),t[e[n]]=!0);return r},from:function(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r]);return t},keys:function(e){var t=[];for(var r in e)t.push(r);return t}};function y(e){return null==e}function m(e){var t;return'"'===(t=e)[0]&&'"'===t[t.length-1]||"'"===t[0]&&"'"===t[t.length-1]?e.substr(1,e.length-2):e}function v(e){var t,r,n,i,o,s,a,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u="",l=0;for(e=function(e){e=e.replace(/rn/g,"n");for(var t="",r=0;r<e.length;r++){var n=e.charCodeAt(r);n<128?t+=String.fromCharCode(n):n>127&&n<2048?t+=String.fromCharCode(n>>6|192)+String.fromCharCode(63&n|128):t+=String.fromCharCode(n>>12|224)+String.fromCharCode(n>>6&63|128)+String.fromCharCode(63&n|128)}return t}(e);l<e.length;)i=(t=e.charCodeAt(l++))>>2,o=(3&t)<<4|(r=e.charCodeAt(l++))>>4,s=(15&r)<<2|(n=e.charCodeAt(l++))>>6,a=63&n,isNaN(r)?s=a=64:isNaN(n)&&(a=64),u=u+c.charAt(i)+c.charAt(o)+c.charAt(s)+c.charAt(a);return u}function b(e){var t,r,n,i,o,s,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c="",u=0;for(e=e.replace(/[^A-Za-z0-9+/=]/g,"");u<e.length;)t=a.indexOf(e.charAt(u++))<<2|(i=a.indexOf(e.charAt(u++)))>>4,r=(15&i)<<4|(o=a.indexOf(e.charAt(u++)))>>2,n=(3&o)<<6|(s=a.indexOf(e.charAt(u++))),c+=String.fromCharCode(t),64!==o&&(c+=String.fromCharCode(r)),64!==s&&(c+=String.fromCharCode(n));return function(e){for(var t="",r=0,n=0,i=0,o=0;r<e.length;)(n=e.charCodeAt(r))<128?(t+=String.fromCharCode(n),r++):n>191&&n<224?(t+=String.fromCharCode((31&n)<<6|63&(o=e.charCodeAt(r+1))),r+=2):(o=e.charCodeAt(r+1),t+=String.fromCharCode((15&n)<<12|(63&o)<<6|63&(i=e.charCodeAt(r+2))),r+=3);return t}(c)}function _(e,t,r){var n="",i=0,o=!1,s=!1,a=0,c=e.length,u="",l="";e:for(a=0;a<c;a++){var f=e.charAt(a);if(!1===o){if("<"===f){o=a;continue}}else if(!1===s){if("<"===f){n+=r(e.slice(i,a)),o=a,i=a;continue}if(">"===f||a===c-1){n+=r(e.slice(i,o)),u=function(e){var t,r=g.spaceIndex(e);return t=-1===r?e.slice(1,-1):e.slice(1,r+1),"/"===(t=g.trim(t).toLowerCase()).slice(0,1)&&(t=t.slice(1)),"/"===t.slice(-1)&&(t=t.slice(0,-1)),t}(l=e.slice(o,a+1)),n+=t(o,n.length,u,l,"</"===l.slice(0,2)),i=a+1,o=!1;continue}if('"'===f||"'"===f)for(var h=1,p=e.charAt(a-h);""===p.trim()||"="===p;){if("="===p){s=f;continue e}p=e.charAt(a-++h)}}else if(f===s){s=!1;continue}}return i<c&&(n+=r(e.substr(i))),n}function w(e,t){var r=0,i=0,o=[],s=!1,a=e.length;function c(e,r){if(!((e=(e=g.trim(e)).replace(n,"").toLowerCase()).length<1)){var i=t(e,r||"");i&&o.push(i)}}for(var u=0;u<a;u++){var l=e.charAt(u),f=void 0;if(!1!==s||"="!==l){if(!1===s||u!==i){if(/\s|\n|\t/.test(l)){if(e=e.replace(/\s|\n|\t/g," "),!1===s){if(-1===(f=function(e,t){for(;t<e.length;t++){var r=e[t];if(" "!==r)return"="===r?t:-1}return -1}(e,u))){c(g.trim(e.slice(r,u))),s=!1,r=u+1;continue}u=f-1;continue}if(-1===(f=function(e,t){for(;t>0;t--){var r=e[t];if(" "!==r)return"="===r?t:-1}return -1}(e,u-1))){c(s,m(g.trim(e.slice(r,u)))),s=!1,r=u+1;continue}}}else{if(-1===(f=e.indexOf(l,u+1)))break;c(s,g.trim(e.slice(i+1,f))),s=!1,r=(u=f)+1}}else s=e.slice(r,u),r=u+1,i='"'===e.charAt(r)||"'"===e.charAt(r)?r:function(e,t){for(;t<e.length;t++){var r=e[t];if(" "!==r)return"'"===r||'"'===r?t:-1}return -1}(e,u+1)}return r<e.length&&(!1===s?c(e.slice(r)):c(s,m(g.trim(e.slice(r))))),g.trim(o.join(" "))}function k(e,t,r){if(r=function(e){return e=function(e){for(var t="",r=0,n=e.length;r<n;r++)t+=32>e.charCodeAt(r)?" ":e.charAt(r);return g.trim(t)}(e=(e=(e=e.replace(a,'"')).replace(s,function(e,t){return"x"===t[0]||"X"===t[0]?String.fromCharCode(parseInt(t.substr(1),16)):String.fromCharCode(parseInt(t,10))})).replace(c,":").replace(u," "))}(r),"href"===t||"src"===t){if("#"===(r=g.trim(r)))return"#";if("http://"!==r.substr(0,7)&&"https://"!==r.substr(0,8)&&"mailto:"!==r.substr(0,7)&&"tel:"!==r.substr(0,4)&&"data:image/"!==r.substr(0,11)&&"ftp://"!==r.substr(0,6)&&"./"!==r.substr(0,2)&&"../"!==r.substr(0,3)&&"#"!==r[0]&&"/"!==r[0])return""}else if("background"===t){if(l.lastIndex=0,l.test(r))return""}else if("style"===t&&(h.lastIndex=0,h.test(r)||(f.lastIndex=0,f.test(r)&&(l.lastIndex=0,l.test(r)))))return"";return r=function(e){return e=d(e=e.replace(p,"&quot;"))}(r)}var S=function(e){return"string"==typeof e?e.replace(/'/g,'"').replace('=""',"").replace(/\s+/g,"").toLowerCase():""},x=function(){function e(e){var t=function(e){var t={};for(var r in e)t[r]=e[r];return t}(e||{});t.stripIgnoreTag&&(t.onIgnoreTag,t.onIgnoreTag=function(){return""}),t.whiteList={},t.onTag=function(){},t.onTagAttr=function(){},t.onIgnoreTag=function(){},t.onIgnoreTagAttr=function(){},t.safeAttrValue=k,t.escapeHtml=d,this.options=Object.assign(t,e)}return e.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t,r,n,i,o,s,a=this.options,c=a.whiteList,u=a.onTag,l=a.onIgnoreTag,f=a.onTagAttr,h=a.onIgnoreTagAttr,p=a.safeAttrValue,d=a.escapeHtml;a.stripBlankChar&&(e=(t=(t=e.split("")).filter(function(e){var t=e.charCodeAt(0);return!(127===t||t<=31&&10!==t&&13!==t)})).join("")),a.allowCommentTag||(e=function(e){for(var t="",r=0;r<e.length;){var n=e.indexOf("\x3c!--",r);if(-1===n){t+=e.slice(r);break}t+=e.slice(r,n);var i=e.indexOf("--\x3e",n);if(-1===i)break;r=i+3}return t}(e));var y=!1;a.stripIgnoreTagBody&&(r=a.stripIgnoreTagBody,"function"!=typeof(n=l)&&(n=function(){}),i=!Array.isArray(r),o=[],s=!1,l=(y={onIgnoreTag:function(e,t,a){var c;if(c=e,i||-1!==g.indexOf(r,c)){if(a.isClosing){var u="[/removed]",l=a.position+u.length;return o.push([!1!==s?s:a.position,l]),s=!1,u}return s||(s=a.position),"[removed]"}return n(e,t,a)},remove:function(e){var t="",r=0;return g.forEach(o,function(n){t+=e.slice(r,n[0]),r=n[1]}),t+=e.slice(r)}}).onIgnoreTag);var m=_(e,function(e,t,r,n,i){var o={sourcePosition:e,position:t,isClosing:i,isWhite:Object.prototype.hasOwnProperty.call(c,r)},s=u(r,n,o);if(null!=s)return s;if(o.isWhite){if(o.isClosing)return"</".concat(r,">");var a=function(e){var t=g.spaceIndex(e);if(-1===t)return{html:"",closing:"/"===e[e.length-2]};var r="/"===(e=g.trim(e.slice(t+1,-1)))[e.length-1];return r&&(e=g.trim(e.slice(0,-1))),{html:e,closing:r}}(n),y=c[r],m=w(a.html,function(e,t){var n=-1!==g.indexOf(y,e),i=f(r,e,t,n);return null==i?n?(t=p(r,e,t,null))?"".concat(e,'="').concat(t,'"'):e:null==(i=h(r,e,t,n))?void 0:i:i});return n="<".concat(r),m&&(n+=" ".concat(m)),a.closing&&(n+=" /"),n+=">"}return null==(s=l(r,n,o))?d(n):s},d);return y&&(m=y.remove(m)),m},e}(),O=Function("\nvar _checkXSS = function (it) {\n return it && it.Math == Math && it;\n};\nreturn _checkXSS(typeof globalThis === 'object' && globalThis) ||\n_checkXSS(typeof window === 'object' && window) ||\n_checkXSS(typeof self === 'object' && self) ||\n_checkXSS(typeof global === 'object' && global) ||\nFunction('return this')();\n")(),C=new(function(){function e(){var e=this;this.batchData=[],this.uniqKeys=new Set,this.timeout=2e3,this.lock=!1,this.getSlardarBid=function(){var t,r,n="douyin_web";if(!g.includes(n,"bid"))return n;if(e.config&&e.config.bid)return e.config.bid;if(O&&O._xssBid)return O._xssBid;if(O&&O.slardar&&"function"==typeof O.slardar.config){var i=(O.slardar.config()||{}).bid;if(i)return i}if(O&&O.Slardar&&"function"==typeof O.Slardar.config){var o=(O.Slardar.config()||{}).bid;if(o)return o}return(null===(r=null===(t=null==O?void 0:O.Slardar)||void 0===t?void 0:t._baseParams)||void 0===r?void 0:r.bid)||"argus"},this.getConfigRegion=function(){var t;return g.includes("cn","region")?e.config&&e.config.region?e.config.region:((null===(t=null==O?void 0:O.gfdatav1)||void 0===t?void 0:t.region)||"cn").toLowerCase():"cn"},this.gerReportUrl=function(){var t={cn:b("aHR0cHM6Ly9tb24uemlqaWVhcGkuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),boe:b("aHR0cHM6Ly9tb24uemlqaWVhcGkuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),ttp:b("aHR0cHM6Ly9tb24udXMudGlrdG9rdi5jb20vbW9uaXRvcl9icm93c2VyL2NvbGxlY3QvYmF0Y2gvc2VjdXJpdHkvP2JpZD0="),va:b("aHR0cHM6Ly9tb24tdmEuYnl0ZW92ZXJzZWEuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),maliva:b("aHR0cHM6Ly9tb24tdmEuYnl0ZW92ZXJzZWEuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),sg:b("aHR0cHM6Ly9tb24tdmEuYnl0ZW92ZXJzZWEuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),boei18n:b("aHR0cHM6Ly9tb24tdmEuYnl0ZW92ZXJzZWEuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9")}[e.getConfigRegion()];if(t)return t+e.getSlardarBid()}}return e.prototype.setConfig=function(e){this.config=e},e.prototype.upload=function(){var e=this,t=this.gerReportUrl();!this.lock&&t&&0!==this.batchData.length&&(this.lock=!0,setTimeout(function(){var r=e.batchData.slice(0,100);e.batchData=e.batchData.slice(100),O.fetch(t,{method:"post",body:JSON.stringify(r),headers:{"Content-Type":"application/json"}}).catch(function(e){}),e.lock=!1,e.upload()},this.timeout))},e.prototype.generateKey=function(e){return e.collectKey?[e.collectMode,e.collectKey].join("___"):""},e.prototype.push=function(e){this.batchData.push(e),this.upload()},e.prototype.report=function(e){var t=this.generateKey(e);if(O.fetch&&e.collectKey){var r="object"==typeof window?window.location.href:"SSR";e.documentUrl=r;var n={age:Math.floor(Date.now()),type:"xss",url:r,body:e,"user-agent":""};"enforce"===e.disposition&&"SSR"!==r||(n.url=t),"SSR"===r&&(n.url="SSR___".concat(n.url),n.body.ssr=!0),this.push(n)}},e}()),T=function(e){for(var t=0,r=function(r){Array.isArray(e[r])?0===e[r].length?delete e[r]:(e[r]=g.from(g.uniq(e[r])),t+=e[r].length):0===g.keys(e[r]).length?delete e[r]:g.keys(e[r]).forEach(function(n){e[r][n]=g.from(g.uniq(e[r][n])),t+=e[r][n].length})},n=0,i=g.keys(e);n<i.length;n++)r(i[n]);return{count:t,ret:e}};function j(e,t){return C.setConfig(t),new x(t).process(e)}function P(e){var t,r=(t=/\s|\n|\t/.exec(e))?t.index:-1;if(-1===r)return{html:"",closing:"/"===e[e.length-2]};var n="/"===(e=e.slice(r+1,-1).trim())[e.length-1];return n&&(e=e.slice(0,-1).trim()),{html:e,closing:n}}var I=function(e){return -1===(e=(e=(e=(e=e.replace(/&colon;/gi,":")).replace(/&tab;/gi,"")).replace(/&newline;/gi,"")).replace(/(\t|\n|\r)/g,"")).indexOf("&#")?e.trim().toLowerCase():e.trim().replace(/&#(?:(x)([0-9a-f]+)|([0-9]+));?/gi,function(e,t,r,n){return String.fromCharCode(t?parseInt(r,16):parseInt(n))}).replace(/(\t|\n|\r)/g,"").toLowerCase()};function A(e,t){if(void 0===e&&(e=""),"string"!=typeof e)return!0;if(e=I(e),g.includes(e,"base64")&&!function(e){if(""===e||""===e.trim())return!0;try{return!g.includes(e,"data:text/html;base64")}catch(e){return!0}}(e))return t&&t("data:text/html;base64"),!1;var r=["expression(","behavior:","view-source:"];if(g.some(r,function(t){return -1!==e.indexOf(t)}))return g.forEach(r,function(r){-1!==e.indexOf(r)&&t&&t(r)}),!1;var n=["data:application","data:javascript","data:text/html","data:texthtml"];if(g.some(n,function(t){return -1!==e.indexOf(t)}))return g.forEach(n,function(r){-1!==e.indexOf(r)&&t&&t(r)}),!1;if(e.indexOf("javascript:")>0)return t&&t("javascript:"),!1;if(/^javascript:/i.test(e)){var i=e.slice(11).replace(/\s/g,"").trim();return!!g.some(["void","void(0)","void0","false","undefined",";"],function(e){return e===i})||(t&&t("javascript:"),!1)}return!0}var D=function(e,t){var r,n,i="<%= isSaveValidUrl =>";if("string"!=typeof e||(n=Number("<%= urlLimit =>"),void 0!==r&&(n=r),"NaN"!==e.toString()&&-1!==n&&e.length>=n)||A(e,t))return e;try{if(!0===(i=JSON.parse(i))||"true"===i){var o=new URL(e);return o.origin+o.pathname}}catch(e){}return"#"};function E(e,t,n){if(void 0===e&&(e=""),void 0===t&&(t=[]),"string"!=typeof e)return!0;if(!A(e=I(e)))return!1;var i,o={url:(i=e.match(/^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/)||[])[0],scheme:i[1],slash:i[2],host:i[3],port:i[4],path:i[5],query:i[6],hash:i[7]},s=o.scheme,a=o.host;return n?!!n(e):!(!s||!a)&&(!g.includes(["http","https","file"],s)||("object"==typeof window&&window&&(t=r(r([],t,!0),[location.host],!1)),g.some(t,function(e){return!!(e instanceof RegExp&&e.test(a))||e===a})))}var z={a:["target","title","spellcheck","rel"],canvas:[],abbr:["title"],address:[],area:["shape","coords","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:["dir"],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["alt","title","width","height","decoding"],ins:["datetime"],li:[],mark:[],nav:[],ol:["start"],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],delete:[],form:[],strong:[],mask:["maskunits","x","y","width","height","fill"],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],wbr:[],video:["autoplay","controls","loop","preload","height","width"],svg:["viewBox","version","xmlns","fill","width","height","stroke","stroke-width","style"],path:["d","fill","opacity","stroke","p-id","fill-rule","clip-rule","stroke-width","stroke-linecap","stroke-linejoin","fill-opacity","mask"],rect:["x","y","width","height","fill","stroke","rx"],g:[]},R={collect:null,initCollect:function(){this.collect={whiteList:{},filterProtocol:[]}},removeCollect:function(){var e=T(this.collect),t=e.count,r=e.ret;return this.collect=null,{collectKey:0===t?null:JSON.stringify(r),collectMode:"white"}},onIgnoreTagAttr:function(e,t,n){return e&&g.indexOf(["href","src"],t)>-1?R.domainWhiteList&&Array.isArray(R.domainWhiteList)&&R.domainWhiteList.length>0&&!E(n,r([],R.domainWhiteList,!0))?"":"".concat(t,'="').concat(D(n,function(e){var t;null===(t=R.collect)||void 0===t||t.filterProtocol.push(e)}),'"'):e&&(g.indexOf(["style","class","id"],t)>-1||t.indexOf("data-")>-1)?"".concat(t,'="').concat(n,'"'):(R.collect.whiteList[e]=R.collect.whiteList[e]||[],void R.collect.whiteList[e].push(t))},onIgnoreTag:function(e,t){if("style"===e)return t;_(t,function(e,t,r,n){w(P(n).html.replace("/",""),function(e){R.collect.whiteList[r]=R.collect.whiteList[r]||[],R.collect.whiteList[r].push(e)})},d)},whiteList:z,mergeWhiteList:function(e){for(var t,r={},n=0,i=g.keys(z);n<i.length;n++)r[t=i[n]]=g.from(z[t]);for(var o=0,s=g.keys(e);o<s.length;o++)r[t=s[o]]=t in z?z[t].concat(e[t]):g.from(e[t]);return r},setWhiteList:function(e){for(var t=0,r=g.keys(e);t<r.length;t++){var n=r[t];this.whiteList[n]=n in z?z[n].concat(e[n]):g.from(e[n])}}};try{var B={},M="merge";g.includes(M,"override")&&(R.whiteList=B.whiteList),g.includes(M,"merge")&&R.setWhiteList(B.whiteList)}catch(e){}var U=function(e,t){for(var r={},n=0,i=g.keys(e);n<i.length;n++){var o=i[n];Array.isArray(e[o])?r[o]=g.from(e[o]):r[o]=U({},e[o])}for(var s=0,a=g.keys(t);s<a.length;s++)(o=a[s])in e?Array.isArray(e[o])?r[o]=e[o].concat(t[o]):r[o]=U(e[o],t[o]):Array.isArray(t[o])?r[o]=g.from(t[o]):r[o]=U({},t[o]);return r},F={blackList:{a:["folder"],meta:["content"],iframe:["srcdoc"],input:["pattern"],vmlframe:["xmlns"]},blackTags:["script","xml","embed","isindex","object","base","set","handler","animate","payload","import"],blackAttrs:["charset","ns","namespace","formaction","xlink:href","xmlns:xlink","handler","repeat","repeat-start","repeat-end"],blackAttrRegExps:[/^on/],filterList:{param:["value"],video:["poster"],form:["action"]},filterAttrs:["href","src","background","style","dynsrc","lowsrc","content"]};try{var L={};L.blackAttrRegExps&&(L.blackAttrRegExps=L.blackAttrRegExps.map(function(e){return new RegExp(e.toString().slice(1,e.toString().length-1))}));var N="merge";g.includes(N,"override")&&(F=L),g.includes(N,"merge")&&(F=U(F,L))}catch(e){}var H={mode:"black",whiteList:{},blackConfig:F,collect:null,initCollect:function(){H.collect={blackList:{},blackTags:[],blackAttrs:[],blackAttrRegExps:[],filterAttrs:[],filterList:{},filterProtocol:[]}},removeCollect:function(){var e=T(H.collect),t=e.count,r=e.ret;return H.collect=null,{collectKey:0===t?null:JSON.stringify(r),collectMode:"black"}},onIgnoreTag:function(e,t){var r;if(!g.includes(F.blackTags,e))return _(t,function(e,t,r,n,i){if(-1!==r.indexOf("/"))return d(n);if(i)return"</".concat(r,">");var o=P(n),s=w(o.html,function(e,t){var n,i=0;if(F.blackList[r]&&g.includes(F.blackList[r],e)&&(H.collect.blackList[r]=H.collect.blackList[r]||[],H.collect.blackList[r].push(e),i++),F.blackAttrRegExps.length&&F.blackAttrRegExps.some(function(t){return t.test(e)})&&g.forEach(F.blackAttrRegExps,function(t){t.test(e)&&(H.collect.blackAttrRegExps.push("".concat(t.toString(),"->").concat(e)),i++)}),F.blackAttrs.length&&g.includes(F.blackAttrs,e)&&(F.blackAttrs.push(e),i++),!i){if(F.filterList&&F.filterList[r]&&g.includes(F.filterList[r],e)){var o=D(t,function(e){var t;null===(t=H.collect)||void 0===t||t.filterProtocol.push(e)});return o!==t&&(H.collect.filterList[r]=H.collect.filterList[r]||[],H.collect.filterList[r].push(e)),t?"".concat(e,"='").concat(o,"'"):e}return F.filterAttrs&&g.includes(F.filterAttrs,e)?((o=D(t,function(e){var t;null===(t=H.collect)||void 0===t||t.filterProtocol.push(e)}))!==t&&(null===(n=H.collect)||void 0===n||n.filterAttrs.push(e)),t?"".concat(e,"='").concat(o,"'"):e):t?"".concat(e,"='").concat(t,"'"):e}});return n="<".concat(r),s&&(n+=" ".concat(s)),o.closing&&(n+=" /"),n+=">"},d);null===(r=H.collect)||void 0===r||r.blackTags.push(e)}},q=function(e){var t=e.reportOnly,r=void 0===t||t,n=e.block;return r&&"all"===r?"report":("string"==typeof r&&("true"===r&&(r=!0),"false"===r&&(r=!1)),n?"enforce":r?"report":"enforce")},K=function(e){return function(r,n,i){if(!r||"string"!=typeof r)return r;var o=n;e===j&&(o=R).initCollect();var s=e(r,o);if(S(s)===S(r))return r;if(!i)return s;var a=i.logType,c=q(i),u=o.removeCollect();return C.report(t(t({type:a,disposition:c},u),{sourceText:v(r),filterText:v(s)})),"enforce"===c?s:r}},W=K(function(e,t){return void 0===t&&(t={}),t&&t.whiteList||(t.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}),new x(t).process(e)}),V=K(j),J=function(e,t,r){var n=[],i=D(e,function(e){n.push(e)});if(i===e)return e;n=g.from(g.uniq(n));var o=t||r||{};if(!o)return i;var s=o.logType,a=q(r);return C.report({type:s,disposition:a,collectKey:n.join("___"),collectData:JSON.stringify(n),collectMode:"black",sourceText:v(e),filterText:v(i)}),"enforce"===a?i:e},X=O._xssProject||{},G=O.xssNamespace||{},Q="3.0.26",Z={FilterXSS:x,version:Q,webpackPluginVersion:"<%= webpackPluginVersion =>",reportOnly:"<%= reportOnly =>",filterXSS:W,_filterXSS:V,filterUrl:J,Config:R,BlackConfig:H,project:X,setProjectName:function(e){X[e]=this,O._xssProjectName=e}};G.douyin_web=Z,O.xssNamespace=G,O.Math&&!O.Math.xssNamespace&&(O.Math.xssNamespace=G),X[Q]=Z,O.globalThis=O,O.getFilterXss=function(){return void 0!==this._xssProjectName?this._xssProject[this._xssProjectName]:Z},O.xss=Z,O.isSafeUrl=E,O.isSafeDomain=E,O.isSafeProtocol=A,O._xssProject=X,O._xssProjectName&&(X[O._xssProjectName]=Z);var Y=Z.setProjectName.bind(Z);e.BlackConfig=H,e.Config=R,e.FilterXSS=x,e._filterXSS=V,e.filterUrl=J,e.filterXSS=W,e.isSafeDomain=E,e.isSafeProtocol=A,e.isSafeUrl=E,e.project=X,e.setProjectName=Y,e.setXssNamespace=function(e){var t=e.appId,r=e.bid,n=e.region;G[t]=Z;R.bid=r,R.region=n,R.enabled=!0},e.xssNamespace=G,Object.defineProperty(e,"__esModule",{value:!0})}),(self.webpackChunkdouyin_web=self.webpackChunkdouyin_web||[]).push([["74650"],{491437:function(e,t,r){"use strict";var n=r(101199),i=r(994298);let o=(0,i.A)(function(e){return n.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},e),n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 20V8h16v12H4ZM2 4c0-1.1.9-2 2-2h16a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4Zm4 6.5c0-.28.22-.5.5-.5h2c.28 0 .5.22.5.5v2a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1-.5-.5v-2Zm.5 4.5a.5.5 0 0 0-.5.5v2c0 .28.22.5.5.5h2a.5.5 0 0 0 .5-.5v-2a.5.5 0 0 0-.5-.5h-2Zm4-4.5c0-.28.22-.5.5-.5h2c.28 0 .5.22.5.5v2a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1-.5-.5v-2ZM11 15a.5.5 0 0 0-.5.5v2c0 .28.22.5.5.5h2a.5.5 0 0 0 .5-.5v-2a.5.5 0 0 0-.5-.5h-2Zm4-4.5c0-.28.22-.5.5-.5h2c.28 0 .5.22.5.5v2a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1-.5-.5v-2Zm.5 4.5a.5.5 0 0 0-.5.5v2c0 .28.22.5.5.5h2a.5.5 0 0 0 .5-.5v-2a.5.5 0 0 0-.5-.5h-2Z",fill:"currentColor"}))},"calendar");t.Z=o},330620:function(e){var t,r;t="undefined"!=typeof self&&self,r=function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,(function(t){return e[t]}).bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=9)}([function(e,t,r){"use strict";var n="object"==typeof Reflect?Reflect:null,i=n&&"function"==typeof n.apply?n.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)},o=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)},s=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise(function(r,n){var i,o,s;function a(r){e.removeListener(t,c),n(r)}function c(){"function"==typeof e.removeListener&&e.removeListener("error",a),r([].slice.call(arguments))}y(e,t,c,{once:!0}),"error"!==t&&(i=e,o=a,s={once:!0},"function"==typeof i.on&&y(i,"error",o,s))})},(a.EventEmitter=a).prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var c=10;function u(e){if("function"!=typeof e)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function f(e,t,r,n){var i,o,s;return u(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener||r),i=e._events),o=i[t]),void 0===o?(o=i[t]=r,++e._eventsCount):("function"==typeof o?o=i[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),0<(i=l(e))&&o.length>i&&!o.warned&&(o.warned=!0,(n=Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit")).name="MaxListenersExceededWarning",n.emitter=e,n.type=t,n.count=o.length,s=0,console)),e}function h(e,t,r){return(t=(function(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0==arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}).bind(e={fired:!1,wrapFn:void 0,target:e,type:t,listener:r})).listener=r,e.wrapFn=t}function p(e,t,r){return void 0===(e=e._events)?[]:void 0===(e=e[t])?[]:"function"==typeof e?r?[e.listener||e]:[e]:r?function(e){for(var t=Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(e):g(e,e.length)}function d(e){var t=this._events;if(void 0!==t){if("function"==typeof(t=t[e]))return 1;if(void 0!==t)return t.length}return 0}function g(e,t){for(var r=Array(t),n=0;n<t;++n)r[n]=e[n];return r}function y(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function i(o){n.once&&e.removeEventListener(t,i),r(o)})}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if("number"!=typeof e||e<0||s(e))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");c=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(e))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return l(this)},a.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,o=this._events;if(void 0!==o)n=n&&void 0===o.error;else if(!n)return!1;if(n){if((s=0<t.length?t[0]:s)instanceof Error)throw s;throw(n=Error("Unhandled error."+(s?" ("+s.message+")":""))).context=s,n}var s=o[e];if(void 0===s)return!1;if("function"==typeof s)i(s,this,t);else for(var a=s.length,c=g(s,a),r=0;r<a;++r)i(c[r],this,t);return!0},a.prototype.on=a.prototype.addListener=function(e,t){return f(this,e,t,!1)},a.prototype.prependListener=function(e,t){return f(this,e,t,!0)},a.prototype.once=function(e,t){return u(t),this.on(e,h(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,h(this,e,t)),this},a.prototype.off=a.prototype.removeListener=function(e,t){var r,n,i,o,s;if(u(t),void 0===(n=this._events)||void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;0<=o;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},a.prototype.removeAllListeners=function(e){var t,r=this._events;if(void 0===r)return this;if(void 0===r.removeListener)return 0==arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0==arguments.length){for(var n,i=Object.keys(r),o=0;o<i.length;++o)"removeListener"!==(n=i[o])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(o=t.length-1;0<=o;o--)this.removeListener(e,t[o]);return this},a.prototype.listeners=function(e){return p(this,e,!0)},a.prototype.rawListeners=function(e){return p(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},a.prototype.listenerCount=d,a.prototype.eventNames=function(){return 0<this._eventsCount?o(this._events):[]}},function(e,t,r){(function(t){e.exports=function(){"use strict";function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function r(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t||"undefined"!=typeof self&&self;var n=r(function(e,t){var r,n,i,o,s,a,c,u,l,f,h,p,d,g;e.exports=r||(n=Math,o=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),c=(a=(s={}).lib={}).Base={extend:function(e){var t=o(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},u=a.WordArray=c.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||f).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var o=0;o<i;o++){var s=r[o>>>2]>>>24-o%4*8&255;t[n+o>>>2]|=s<<24-(n+o)%4*8}else for(o=0;o<i;o+=4)t[n+o>>>2]=r[o>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,t=this.sigBytes;e[t>>>2]&=4294967295<<32-t%4*8,e.length=n.ceil(t/4)},clone:function(){var e=c.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t,r=[],i=function(e){var t=987654321;return function(){var r=((t=36969*(65535&t)+(t>>16)&4294967295)<<16)+(e=18e3*(65535&e)+(e>>16)&4294967295)&4294967295;return r/=4294967296,(r+=.5)*(n.random()>.5?1:-1)}},o=0;o<e;o+=4){var s=i(4294967296*(t||n.random()));t=987654071*s(),r.push(4294967296*s()|0)}return new u.init(r,e)}}),f=(l=s.enc={}).Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new u.init(r,t/2)}},h=l.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new u.init(r,t)}},p=l.Utf8={stringify:function(e){try{return decodeURIComponent(escape(h.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return h.parse(unescape(encodeURIComponent(e)))}},d=a.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(e){var t=this._data,r=t.words,i=t.sigBytes,o=this.blockSize,s=i/(4*o),a=(s=e?n.ceil(s):n.max((0|s)-this._minBufferSize,0))*o,c=n.min(4*a,i);if(a){for(var l=0;l<a;l+=o)this._doProcessBlock(r,l);var f=r.splice(0,a);t.sigBytes-=c}return new u.init(f,c)},clone:function(){var e=c.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),g=(a.Hasher=d.extend({cfg:c.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new g.HMAC.init(e,r).finalize(t)}}}),s.algo={}),s)}),i=r(function(e,t){var r,i,o,s,a,c,u,l,f;e.exports=(r=Math,o=(i=n.lib).WordArray,s=i.Hasher,a=n.algo,c=[],u=[],function(){function e(e){return 4294967296*(e-(0|e))|0}for(var t=2,n=0;n<64;)(function(e){for(var t=r.sqrt(e),n=2;n<=t;n++)if(!(e%n))return!1;return!0})(t)&&(n<8&&(c[n]=e(r.pow(t,.5))),u[n]=e(r.pow(t,1/3)),n++),t++}(),l=[],f=a.SHA256=s.extend({_doReset:function(){this._hash=new o.init(c.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],s=r[3],a=r[4],c=r[5],f=r[6],h=r[7],p=0;p<64;p++){if(p<16)l[p]=0|e[t+p];else{var d=l[p-15],g=(d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,y=l[p-2],m=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;l[p]=g+l[p-7]+m+l[p-16]}var v=n&i^n&o^i&o,b=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),_=h+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&c^~a&f)+u[p]+l[p];h=f,f=c,c=a,a=s+_|0,s=o,o=i,i=n,n=_+(b+v)|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+a|0,r[5]=r[5]+c|0,r[6]=r[6]+f|0,r[7]=r[7]+h|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;return t[i>>>5]|=128<<24-i%32,t[14+(i+64>>>9<<4)]=r.floor(n/4294967296),t[15+(i+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}}),n.SHA256=s._createHelper(f),n.HmacSHA256=s._createHmacHelper(f),n.SHA256)}),o=(r(function(e,t){var r,i;e.exports=(r=n.lib.Base,i=n.enc.Utf8,void(n.algo.HMAC=r.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=i.parse(t));var r=e.blockSize,n=4*r;t.sigBytes>n&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),s=this._iKey=t.clone(),a=o.words,c=s.words,u=0;u<r;u++)a[u]^=1549556828,c[u]^=909522486;o.sigBytes=s.sigBytes=n,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,r=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(r))}})))}),r(function(e,t){e.exports=n.HmacSHA256})),s={hmac:function(e,t){return o(t,e)},sha256:function(e){return i(e)}},a=["authorization","content-type","content-length","user-agent","presigned-expires","expect","x-amzn-trace-id"],c="aws4_request",u=function(e){try{return encodeURIComponent(e).replace(/[^A-Za-z0-9_.~\-%]+/g,escape).replace(/[*]/g,function(e){return"%".concat(e.charCodeAt(0).toString(16).toUpperCase())})}catch(e){return""}},l=function(e){return Object.keys(e).sort().map(function(t){var r=e[t];if(null!=r){var n=u(t);if(n)return Array.isArray(r)?"".concat(n,"=").concat(r.map(u).sort().join("&".concat(n,"="))):"".concat(n,"=").concat(u(r))}}).filter(function(e){return e}).join("&")};return function(){var t,r;function n(e,t,r){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),this.request=e,this.request.headers=e.headers||{},this.serviceName=t,r=r||{},this.signatureCache="boolean"!=typeof r.signatureCache||r.signatureCache,this.operation=r.operation,this.signatureVersion=r.signatureVersion}return t=[{key:"addAuthorization",value:function(e,t){var r=this.iso8601(t).replace(/[:\-]|\.\d{3}/g,"");this.addHeaders(e,r),this.request.headers.Authorization=this.authorization(e,r)}},{key:"addHeaders",value:function(e,t){this.request.headers["X-Amz-Date"]=t,e.sessionToken&&(this.request.headers["x-amz-security-token"]=e.sessionToken),this.request.body&&(this.request.headers["X-Amz-Content-Sha256"]=s.sha256(JSON.stringify(this.request.body)).toString())}},{key:"authorization",value:function(e,t){var r=[],n=this.credentialString(t);return r.push("".concat("AWS4-HMAC-SHA256"," Credential=").concat(e.accessKeyId,"/").concat(n)),r.push("SignedHeaders=".concat(this.signedHeaders())),r.push("Signature=".concat(this.signature(e,t))),r.join(", ")}},{key:"signature",value:function(e,t){var r=this.getSigningKey(e,t.substr(0,8),this.request.region,this.serviceName,this.signatureCache);return s.hmac(r,this.stringToSign(t),"hex")}},{key:"stringToSign",value:function(e){var t=[];return t.push("AWS4-HMAC-SHA256"),t.push(e),t.push(this.credentialString(e)),t.push(this.hexEncodedHash(this.canonicalString())),t.join("\n")}},{key:"canonicalString",value:function(){var e=[],t=this.request.pathname||"/";return e.push(this.request.method.toUpperCase()),e.push(t),e.push(l(this.request.params)||""),e.push("".concat(this.canonicalHeaders(),"\n")),e.push(this.signedHeaders()),e.push(this.hexEncodedBodyHash()),e.join("\n")}},{key:"canonicalHeaders",value:function(){var e=this,t=[];Object.keys(this.request.headers).forEach(function(r){t.push([r,e.request.headers[r]])}),t.sort(function(e,t){return e[0].toLowerCase()<t[0].toLowerCase()?-1:1});var r=[];return t.forEach(function(t){var n=t[0].toLowerCase();if(e.isSignableHeader(n)){var i=t[1];if(null==i||"function"!=typeof i.toString)throw Error("Header ".concat(n," contains invalid value"));r.push("".concat(n,":").concat(e.canonicalHeaderValues(i.toString())))}}),r.join("\n")}},{key:"canonicalHeaderValues",value:function(e){return e.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")}},{key:"signedHeaders",value:function(){var e=this,t=[];return Object.keys(this.request.headers).forEach(function(r){r=r.toLowerCase(),e.isSignableHeader(r)&&t.push(r)}),t.sort().join(";")}},{key:"credentialString",value:function(e){return this.createScope(e.substr(0,8),this.request.region,this.serviceName)}},{key:"hexEncodedHash",value:function(e){return s.sha256(e)}},{key:"hexEncodedBodyHash",value:function(){return this.request.headers["X-Amz-Content-Sha256"]?this.request.headers["X-Amz-Content-Sha256"]:this.request.body?this.hexEncodedHash(l(this.request.body)):this.hexEncodedHash("")}},{key:"isSignableHeader",value:function(e){return 0===e.toLowerCase().indexOf("x-amz-")||0>a.indexOf(e)}},{key:"iso8601",value:function(e){return void 0===e&&(e=new Date),e.toISOString().replace(/\.\d{3}Z$/,"Z")}},{key:"getSigningKey",value:function(e,t,r,n){var i=s.hmac("AWS4".concat(e.secretAccessKey),t),o=s.hmac(i,r),a=s.hmac(o,n);return s.hmac(a,c)}},{key:"createScope",value:function(e,t,r){return[e.substr(0,8),t,r,c].join("/")}}],e(n.prototype,t),r&&e(n,r),n}()}()}).call(this,r(7))},function(e,t,r){e.exports=function(){return r(8)('!function(t){var n={};function __webpack_require__(r){if(n[r])return n[r].exports;var e=n[r]={i:r,l:!1,exports:{}};return t[r].call(e.exports,e,e.exports,__webpack_require__),e.l=!0,e.exports}__webpack_require__.m=t,__webpack_require__.c=n,__webpack_require__.d=function(r,e,t){__webpack_require__.o(r,e)||Object.defineProperty(r,e,{enumerable:!0,get:t})},__webpack_require__.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},__webpack_require__.t=function(e,r){if(1&r&&(e=__webpack_require__(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(__webpack_require__.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)__webpack_require__.d(t,n,function(r){return e[r]}.bind(null,n));return t},__webpack_require__.n=function(r){var e=r&&r.__esModule?function getDefault(){return r.default}:function getModuleExports(){return r};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=9)}([function(r,e,t){r.exports=function(){var r=r||function(u,t){var n=Object.create||function(){function F(){}return function(r){var e;F.prototype=r;e=new F;F.prototype=null;return e}}();var r={};var e=r.lib={};var i=e.Base=function(){return{extend:function(r){var e=n(this);if(r)e.mixIn(r);if(!e.hasOwnProperty("init")||this.init===e.init)e.init=function(){e.$super.init.apply(this,arguments)};e.init.prototype=e;e.$super=this;return e},create:function(){var r=this.extend();r.init.apply(r,arguments);return r},init:function(){},mixIn:function(r){for(var e in r)if(r.hasOwnProperty(e))this[e]=r[e];if(r.hasOwnProperty("toString"))this.toString=r.toString},clone:function(){return this.init.prototype.extend(this)}}}();var h=e.WordArray=i.extend({init:function(r,e){r=this.words=r||[];if(e!=t)this.sigBytes=e;else this.sigBytes=r.length*4},toString:function(r){return(r||o).stringify(this)},concat:function(r){var e=this.words;var t=r.words;var n=this.sigBytes;var i=r.sigBytes;this.clamp();if(n%4)for(var a=0;a<i;a++){var o=t[a>>>2]>>>24-a%4*8&255;e[n+a>>>2]|=o<<24-(n+a)%4*8}else for(var a=0;a<i;a+=4)e[n+a>>>2]=t[a>>>2];this.sigBytes+=i;return this},clamp:function(){var r=this.words;var e=this.sigBytes;r[e>>>2]&=4294967295<<32-e%4*8;r.length=u.ceil(e/4)},clone:function(){var r=i.clone.call(this);r.words=this.words.slice(0);return r},random:function(r){var e=[];var t=function(e){var e=e;var t=987654321;var n=4294967295;return function(){t=36969*(t&65535)+(t>>16)&n;e=18e3*(e&65535)+(e>>16)&n;var r=(t<<16)+e&n;r/=4294967296;r+=.5;return r*(u.random()>.5?1:-1)}};for(var n=0,i;n<r;n+=4){var a=t((i||u.random())*4294967296);i=a()*987654071;e.push(a()*4294967296|0)}return new h.init(e,r)}});var a=r.enc={};var o=a.Hex={stringify:function(r){var e=r.words;var t=r.sigBytes;var n=[];for(var i=0;i<t;i++){var a=e[i>>>2]>>>24-i%4*8&255;n.push((a>>>4).toString(16));n.push((a&15).toString(16))}return n.join("")},parse:function(r){var e=r.length;var t=[];for(var n=0;n<e;n+=2)t[n>>>3]|=parseInt(r.substr(n,2),16)<<24-n%8*4;return new h.init(t,e/2)}};var s=a.Latin1={stringify:function(r){var e=r.words;var t=r.sigBytes;var n=[];for(var i=0;i<t;i++){var a=e[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(a))}return n.join("")},parse:function(r){var e=r.length;var t=[];for(var n=0;n<e;n++)t[n>>>2]|=(r.charCodeAt(n)&255)<<24-n%4*8;return new h.init(t,e)}};var c=a.Utf8={stringify:function(r){try{return decodeURIComponent(escape(s.stringify(r)))}catch(r){throw new Error("Malformed UTF-8 data")}},parse:function(r){return s.parse(unescape(encodeURIComponent(r)))}};var v=e.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new h.init;this._nDataBytes=0},_append:function(r){if(typeof r=="string")r=c.parse(r);this._data.concat(r);this._nDataBytes+=r.sigBytes},_process:function(r){var e=this._data;var t=e.words;var n=e.sigBytes;var i=this.blockSize;var a=i*4;var o=n/a;if(r)o=u.ceil(o);else o=u.max((o|0)-this._minBufferSize,0);var s=o*i;var c=u.min(s*4,n);if(s){for(var v=0;v<s;v+=i)this._doProcessBlock(t,v);var f=t.splice(0,s);e.sigBytes-=c}return new h.init(f,c)},clone:function(){var r=i.clone.call(this);r._data=this._data.clone();return r},_minBufferSize:0});var f=e.Hasher=v.extend({cfg:i.extend(),init:function(r){this.cfg=this.cfg.extend(r);this.reset()},reset:function(){v.reset.call(this);this._doReset()},update:function(r){this._append(r);this._process();return this},finalize:function(r){if(r)this._append(r);var e=this._doFinalize();return e},blockSize:512/32,_createHelper:function(t){return function(r,e){return new t.init(e).finalize(r)}},_createHmacHelper:function(t){return function(r,e){return new p.HMAC.init(t,e).finalize(r)}}});var p=r.algo={};return r}(Math);return r}()},function(r,e,t){r.exports=function(F){F.lib.Cipher||function(o){var r=F;var e=r.lib;var t=e.Base;var c=e.WordArray;var n=e.BufferedBlockAlgorithm;var i=r.enc;var a=i.Utf8;var s=i.Base64;var v=r.algo;var f=v.EvpKDF;var u=e.Cipher=n.extend({cfg:t.extend(),createEncryptor:function(r,e){return this.create(this._ENC_XFORM_MODE,r,e)},createDecryptor:function(r,e){return this.create(this._DEC_XFORM_MODE,r,e)},init:function(r,e,t){this.cfg=this.cfg.extend(t);this._xformMode=r;this._key=e;this.reset()},reset:function(){n.reset.call(this);this._doReset()},process:function(r){this._append(r);return this._process()},finalize:function(r){if(r)this._append(r);var e=this._doFinalize();return e},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function selectCipherStrategy(r){if(typeof r=="string")return S;else return m}return function(n){return{encrypt:function(r,e,t){return selectCipherStrategy(e).encrypt(n,r,e,t)},decrypt:function(r,e,t){return selectCipherStrategy(e).decrypt(n,r,e,t)}}}}()});var h=e.StreamCipher=u.extend({_doFinalize:function(){var r=this._process(!!"flush");return r},blockSize:1});var p=r.mode={};var l=e.BlockCipherMode=t.extend({createEncryptor:function(r,e){return this.Encryptor.create(r,e)},createDecryptor:function(r,e){return this.Decryptor.create(r,e)},init:function(r,e){this._cipher=r;this._iv=e}});var _=p.CBC=function(){var r=l.extend();r.Encryptor=r.extend({processBlock:function(r,e){var t=this._cipher;var n=t.blockSize;xorBlock.call(this,r,e,n);t.encryptBlock(r,e);this._prevBlock=r.slice(e,e+n)}});r.Decryptor=r.extend({processBlock:function(r,e){var t=this._cipher;var n=t.blockSize;var i=r.slice(e,e+n);t.decryptBlock(r,e);xorBlock.call(this,r,e,n);this._prevBlock=i}});function xorBlock(r,e,t){var n=this._iv;if(n){var i=n;this._iv=o}else var i=this._prevBlock;for(var a=0;a<t;a++)r[e+a]^=i[a]}return r}();var d=r.pad={};var y=d.Pkcs7={pad:function(r,e){var t=e*4;var n=t-r.sigBytes%t;var i=n<<24|n<<16|n<<8|n;var a=[];for(var o=0;o<n;o+=4)a.push(i);var s=c.create(a,n);r.concat(s)},unpad:function(r){var e=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=e}};var g=e.BlockCipher=u.extend({cfg:u.cfg.extend({mode:_,padding:y}),reset:function(){u.reset.call(this);var r=this.cfg;var e=r.iv;var t=r.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=t.createEncryptor;else{var n=t.createDecryptor;this._minBufferSize=1}if(this._mode&&this._mode.__creator==n)this._mode.init(this,e&&e.words);else{this._mode=n.call(t,this,e&&e.words);this._mode.__creator=n}},_doProcessBlock:function(r,e){this._mode.processBlock(r,e)},_doFinalize:function(){var r=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){r.pad(this._data,this.blockSize);var e=this._process(!!"flush")}else{var e=this._process(!!"flush");r.unpad(e)}return e},blockSize:128/32});var k=e.CipherParams=t.extend({init:function(r){this.mixIn(r)},toString:function(r){return(r||this.formatter).stringify(this)}});var x=r.format={};var B=x.OpenSSL={stringify:function(r){var e=r.ciphertext;var t=r.salt;if(t)var n=c.create([1398893684,1701076831]).concat(t).concat(e);else var n=e;return n.toString(s)},parse:function(r){var e=s.parse(r);var t=e.words;if(t[0]==1398893684&&t[1]==1701076831){var n=c.create(t.slice(2,4));t.splice(0,4);e.sigBytes-=16}return k.create({ciphertext:e,salt:n})}};var m=e.SerializableCipher=t.extend({cfg:t.extend({format:B}),encrypt:function(r,e,t,n){n=this.cfg.extend(n);var i=r.createEncryptor(t,n);var a=i.finalize(e);var o=i.cfg;return k.create({ciphertext:a,key:t,iv:o.iv,algorithm:r,mode:o.mode,padding:o.padding,blockSize:r.blockSize,formatter:n.format})},decrypt:function(r,e,t,n){n=this.cfg.extend(n);e=this._parse(e,n.format);var i=r.createDecryptor(t,n).finalize(e.ciphertext);return i},_parse:function(r,e){if(typeof r=="string")return e.parse(r,this);else return r}});var w=r.kdf={};var b=w.OpenSSL={execute:function(r,e,t,n){if(!n)n=c.random(64/8);var i=f.create({keySize:e+t}).compute(r,n);var a=c.create(i.words.slice(e),t*4);i.sigBytes=e*4;return k.create({key:i,iv:a,salt:n})}};var S=e.PasswordBasedCipher=m.extend({cfg:m.cfg.extend({kdf:b}),encrypt:function(r,e,t,n){n=this.cfg.extend(n);var i=n.kdf.execute(t,r.keySize,r.ivSize);n.iv=i.iv;var a=m.encrypt.call(this,r,e,i.key,n);a.mixIn(i);return a},decrypt:function(r,e,t,n){n=this.cfg.extend(n);e=this._parse(e,n.format);var i=n.kdf.execute(t,r.keySize,r.ivSize,e.salt);n.iv=i.iv;var a=m.decrypt.call(this,r,e,i.key,n);return a}})}()}(t(0),t(5))},function(r,e,t){r.exports=function(a){return function(){var r=a;var e=r.lib;var t=e.BlockCipher;var n=r.algo;var f=[];var v=[];var u=[];var h=[];var p=[];var l=[];var _=[];var d=[];var y=[];var g=[];(function(){var r=[];for(var e=0;e<256;e++)if(e<128)r[e]=e<<1;else r[e]=e<<1^283;var t=0;var n=0;for(var e=0;e<256;e++){var i=n^n<<1^n<<2^n<<3^n<<4;i=i>>>8^i&255^99;f[t]=i;v[i]=t;var a=r[t];var o=r[a];var s=r[o];var c=r[i]*257^i*16843008;u[t]=c<<24|c>>>8;h[t]=c<<16|c>>>16;p[t]=c<<8|c>>>24;l[t]=c;var c=s*16843009^o*65537^a*257^t*16843008;_[i]=c<<24|c>>>8;d[i]=c<<16|c>>>16;y[i]=c<<8|c>>>24;g[i]=c;if(!t)t=n=1;else{t=a^r[r[r[s^a]]];n^=r[r[n]]}}})();var k=[0,1,2,4,8,16,32,64,128,27,54];var i=n.AES=t.extend({_doReset:function(){if(this._nRounds&&this._keyPriorReset===this._key)return;var r=this._keyPriorReset=this._key;var e=r.words;var t=r.sigBytes/4;var n=this._nRounds=t+6;var i=(n+1)*4;var a=this._keySchedule=[];for(var o=0;o<i;o++)if(o<t)a[o]=e[o];else{var s=a[o-1];if(!(o%t)){s=s<<8|s>>>24;s=f[s>>>24]<<24|f[s>>>16&255]<<16|f[s>>>8&255]<<8|f[s&255];s^=k[o/t|0]<<24}else if(t>6&&o%t==4)s=f[s>>>24]<<24|f[s>>>16&255]<<16|f[s>>>8&255]<<8|f[s&255];a[o]=a[o-t]^s}var c=this._invKeySchedule=[];for(var v=0;v<i;v++){var o=i-v;if(v%4)var s=a[o];else var s=a[o-4];if(v<4||o<=4)c[v]=s;else c[v]=_[f[s>>>24]]^d[f[s>>>16&255]]^y[f[s>>>8&255]]^g[f[s&255]]}},encryptBlock:function(r,e){this._doCryptBlock(r,e,this._keySchedule,u,h,p,l,f)},decryptBlock:function(r,e){var t=r[e+1];r[e+1]=r[e+3];r[e+3]=t;this._doCryptBlock(r,e,this._invKeySchedule,_,d,y,g,v);var t=r[e+1];r[e+1]=r[e+3];r[e+3]=t},_doCryptBlock:function(r,e,t,n,i,a,o,s){var c=this._nRounds;var v=r[e]^t[0];var f=r[e+1]^t[1];var u=r[e+2]^t[2];var h=r[e+3]^t[3];var p=4;for(var l=1;l<c;l++){var _=n[v>>>24]^i[f>>>16&255]^a[u>>>8&255]^o[h&255]^t[p++];var d=n[f>>>24]^i[u>>>16&255]^a[h>>>8&255]^o[v&255]^t[p++];var y=n[u>>>24]^i[h>>>16&255]^a[v>>>8&255]^o[f&255]^t[p++];var g=n[h>>>24]^i[v>>>16&255]^a[f>>>8&255]^o[u&255]^t[p++];v=_;f=d;u=y;h=g}var _=(s[v>>>24]<<24|s[f>>>16&255]<<16|s[u>>>8&255]<<8|s[h&255])^t[p++];var d=(s[f>>>24]<<24|s[u>>>16&255]<<16|s[h>>>8&255]<<8|s[v&255])^t[p++];var y=(s[u>>>24]<<24|s[h>>>16&255]<<16|s[v>>>8&255]<<8|s[f&255])^t[p++];var g=(s[h>>>24]<<24|s[v>>>16&255]<<16|s[f>>>8&255]<<8|s[u&255])^t[p++];r[e]=_;r[e+1]=d;r[e+2]=y;r[e+3]=g},keySize:256/32});r.AES=t._createHelper(i)}(),a.AES}(t(0),(t(10),t(11),t(5),t(1)))},function(r,e,t){r.exports=function(e){return e.mode.ECB=function(){var r=e.lib.BlockCipherMode.extend();r.Encryptor=r.extend({processBlock:function(r,e){this._cipher.encryptBlock(r,e)}});r.Decryptor=r.extend({processBlock:function(r,e){this._cipher.decryptBlock(r,e)}});return r}(),e.mode.ECB}(t(0),t(1))},function(r,e,t){r.exports=function(r){return r.enc.Utf8}(t(0))},function(r,e,t){r.exports=function(o){return function(){var r=o;var e=r.lib;var t=e.Base;var f=e.WordArray;var n=r.algo;var i=n.MD5;var a=n.EvpKDF=t.extend({cfg:t.extend({keySize:128/32,hasher:i,iterations:1}),init:function(r){this.cfg=this.cfg.extend(r)},compute:function(r,e){var t=this.cfg;var n=t.hasher.create();var i=f.create();var a=i.words;var o=t.keySize;var s=t.iterations;while(a.length<o){if(c)n.update(c);var c=n.update(r).finalize(e);n.reset();for(var v=1;v<s;v++){c=n.finalize(c);n.reset()}i.concat(c)}i.sigBytes=o*4;return i}});r.EvpKDF=function(r,e,t){return a.create(t).compute(r,e)}}(),o.EvpKDF}(t(0),(t(12),t(13)))},function(r,e,t){r.exports=function(r){return r.pad.Pkcs7}(t(0),t(1))},function(r,e,t){r.exports=function(r){return r.pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding}(t(0),t(1))},function(r,e,t){r.exports=function(a){return function(){if(typeof ArrayBuffer!="function")return;var r=a;var e=r.lib;var t=e.WordArray;var i=t.init;var n=t.init=function(r){if(r instanceof ArrayBuffer)r=new Uint8Array(r);if(r instanceof Int8Array||typeof Uint8ClampedArray!=="undefined"&&r instanceof Uint8ClampedArray||r instanceof Int16Array||r instanceof Uint16Array||r instanceof Int32Array||r instanceof Uint32Array||r instanceof Float32Array||r instanceof Float64Array)r=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);if(r instanceof Uint8Array){var e=r.byteLength;var t=[];for(var n=0;n<e;n++)t[n>>>2]|=r[n]<<24-n%4*8;i.call(this,t,e)}else i.apply(this,arguments)};n.prototype=t}(),a.lib.WordArray}(t(0))},function(r,e,t){"use strict";t.r(e);var e=t(2),o=t.n(e),e=t(3),s=t.n(e),e=t(6),c=t.n(e),e=t(7),v=t.n(e),e=t(8),f=t.n(e),e=t(4),u=t.n(e);function crc32(r,e){for(var t=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],n=("undefined"!=typeof Int32Array&&(t=new Int32Array(t)),-1^~~e),i=(r=new Uint8Array(r)).length,a=0;a<i;a++)n=t[255&(n^r[a])]^n>>>8;return(-1^n)>>>0}function dec2hex(r){if(void 0!==r)return function toEight(r){return r.length<8?toEight(r="0".concat(r)):r}(Number(r).toString(16))}self.onmessage=function(r){var r=r.data,e=r[0],t=r[1],n=r[2],i=r[3],a=r[4],r=r[5];i?(i=f.a.create(e),i=crc32(r=function wordArrayToUint8Array(r){for(var e=r.sigBytes,t=r.words,n=new Uint8Array(e),i=0,a=0;i!==e;){var o=t[a++];if(n[i++]=(4278190080&o)>>>24,i===e)break;if(n[i++]=(16711680&o)>>>16,i===e)break;if(n[i++]=(65280&o)>>>8,i===e)break;n[i++]=255&o}return n}((r&&e.byteLength%16!=0?o.a.encrypt(i,u.a.parse(a),{mode:s.a,padding:c.a}):o.a.encrypt(i,u.a.parse(a),{mode:s.a,padding:v.a})).ciphertext),0),postMessage([r.buffer,dec2hex(i),t,n],[r.buffer])):(a=crc32(e,0),postMessage([e,dec2hex(a),t,n],[e]))}},function(r,e,t){r.exports=function(i){return function(){var r=i;var e=r.lib;var c=e.WordArray;var t=r.enc;var n=t.Base64={stringify:function(r){var e=r.words;var t=r.sigBytes;var n=this._map;r.clamp();var i=[];for(var a=0;a<t;a+=3){var o=e[a>>>2]>>>24-a%4*8&255;var s=e[a+1>>>2]>>>24-(a+1)%4*8&255;var c=e[a+2>>>2]>>>24-(a+2)%4*8&255;var v=o<<16|s<<8|c;for(var f=0;f<4&&a+f*.75<t;f++)i.push(n.charAt(v>>>6*(3-f)&63))}var u=n.charAt(64);if(u)while(i.length%4)i.push(u);return i.join("")},parse:function(r){var e=r.length;var t=this._map;var n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var i=0;i<t.length;i++)n[t.charCodeAt(i)]=i}var a=t.charAt(64);if(a){var o=r.indexOf(a);if(o!==-1)e=o}return parseLoop(r,e,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function parseLoop(r,e,t){var n=[];var i=0;for(var a=0;a<e;a++)if(a%4){var o=t[r.charCodeAt(a-1)]<<a%4*2;var s=t[r.charCodeAt(a)]>>>6-a%4*2;n[i>>>2]|=(o|s)<<24-i%4*8;i++}return c.create(n,i)}}(),i.enc.Base64}(t(0))},function(r,e,t){r.exports=function(o){return function(f){var r=o;var e=r.lib;var t=e.WordArray;var n=e.Hasher;var i=r.algo;var F=[];(function(){for(var r=0;r<64;r++)F[r]=f.abs(f.sin(r+1))*4294967296|0})();var a=i.MD5=n.extend({_doReset:function(){this._hash=new t.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(r,e){for(var t=0;t<16;t++){var n=e+t;var i=r[n];r[n]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360}var a=this._hash.words;var o=r[e+0];var s=r[e+1];var c=r[e+2];var v=r[e+3];var f=r[e+4];var u=r[e+5];var h=r[e+6];var p=r[e+7];var l=r[e+8];var _=r[e+9];var d=r[e+10];var y=r[e+11];var g=r[e+12];var k=r[e+13];var x=r[e+14];var B=r[e+15];var m=a[0];var w=a[1];var b=a[2];var S=a[3];m=FF(m,w,b,S,o,7,F[0]);S=FF(S,m,w,b,s,12,F[1]);b=FF(b,S,m,w,c,17,F[2]);w=FF(w,b,S,m,v,22,F[3]);m=FF(m,w,b,S,f,7,F[4]);S=FF(S,m,w,b,u,12,F[5]);b=FF(b,S,m,w,h,17,F[6]);w=FF(w,b,S,m,p,22,F[7]);m=FF(m,w,b,S,l,7,F[8]);S=FF(S,m,w,b,_,12,F[9]);b=FF(b,S,m,w,d,17,F[10]);w=FF(w,b,S,m,y,22,F[11]);m=FF(m,w,b,S,g,7,F[12]);S=FF(S,m,w,b,k,12,F[13]);b=FF(b,S,m,w,x,17,F[14]);w=FF(w,b,S,m,B,22,F[15]);m=GG(m,w,b,S,s,5,F[16]);S=GG(S,m,w,b,h,9,F[17]);b=GG(b,S,m,w,y,14,F[18]);w=GG(w,b,S,m,o,20,F[19]);m=GG(m,w,b,S,u,5,F[20]);S=GG(S,m,w,b,d,9,F[21]);b=GG(b,S,m,w,B,14,F[22]);w=GG(w,b,S,m,f,20,F[23]);m=GG(m,w,b,S,_,5,F[24]);S=GG(S,m,w,b,x,9,F[25]);b=GG(b,S,m,w,v,14,F[26]);w=GG(w,b,S,m,l,20,F[27]);m=GG(m,w,b,S,k,5,F[28]);S=GG(S,m,w,b,c,9,F[29]);b=GG(b,S,m,w,p,14,F[30]);w=GG(w,b,S,m,g,20,F[31]);m=HH(m,w,b,S,u,4,F[32]);S=HH(S,m,w,b,l,11,F[33]);b=HH(b,S,m,w,y,16,F[34]);w=HH(w,b,S,m,x,23,F[35]);m=HH(m,w,b,S,s,4,F[36]);S=HH(S,m,w,b,f,11,F[37]);b=HH(b,S,m,w,p,16,F[38]);w=HH(w,b,S,m,d,23,F[39]);m=HH(m,w,b,S,k,4,F[40]);S=HH(S,m,w,b,o,11,F[41]);b=HH(b,S,m,w,v,16,F[42]);w=HH(w,b,S,m,h,23,F[43]);m=HH(m,w,b,S,_,4,F[44]);S=HH(S,m,w,b,g,11,F[45]);b=HH(b,S,m,w,B,16,F[46]);w=HH(w,b,S,m,c,23,F[47]);m=II(m,w,b,S,o,6,F[48]);S=II(S,m,w,b,p,10,F[49]);b=II(b,S,m,w,x,15,F[50]);w=II(w,b,S,m,u,21,F[51]);m=II(m,w,b,S,g,6,F[52]);S=II(S,m,w,b,v,10,F[53]);b=II(b,S,m,w,d,15,F[54]);w=II(w,b,S,m,s,21,F[55]);m=II(m,w,b,S,l,6,F[56]);S=II(S,m,w,b,B,10,F[57]);b=II(b,S,m,w,h,15,F[58]);w=II(w,b,S,m,k,21,F[59]);m=II(m,w,b,S,f,6,F[60]);S=II(S,m,w,b,y,10,F[61]);b=II(b,S,m,w,c,15,F[62]);w=II(w,b,S,m,_,21,F[63]);a[0]=a[0]+m|0;a[1]=a[1]+w|0;a[2]=a[2]+b|0;a[3]=a[3]+S|0},_doFinalize:function(){var r=this._data;var e=r.words;var t=this._nDataBytes*8;var n=r.sigBytes*8;e[n>>>5]|=128<<24-n%32;var i=f.floor(t/4294967296);var a=t;e[(n+64>>>9<<4)+15]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360;e[(n+64>>>9<<4)+14]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360;r.sigBytes=(e.length+1)*4;this._process();var o=this._hash;var s=o.words;for(var c=0;c<4;c++){var v=s[c];s[c]=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360}return o},clone:function(){var r=n.clone.call(this);r._hash=this._hash.clone();return r}});function FF(r,e,t,n,i,a,o){var s=r+(e&t|~e&n)+i+o;return(s<<a|s>>>32-a)+e}function GG(r,e,t,n,i,a,o){var s=r+(e&n|t&~n)+i+o;return(s<<a|s>>>32-a)+e}function HH(r,e,t,n,i,a,o){var s=r+(e^t^n)+i+o;return(s<<a|s>>>32-a)+e}function II(r,e,t,n,i,a,o){var s=r+(t^(e|~n))+i+o;return(s<<a|s>>>32-a)+e}r.MD5=n._createHelper(a);r.HmacMD5=n._createHmacHelper(a)}(Math),o.MD5}(t(0))},function(r,e,t){r.exports=function(o){return function(){var r=o;var e=r.lib;var t=e.WordArray;var n=e.Hasher;var i=r.algo;var u=[];var a=i.SHA1=n.extend({_doReset:function(){this._hash=new t.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(r,e){var t=this._hash.words;var n=t[0];var i=t[1];var a=t[2];var o=t[3];var s=t[4];for(var c=0;c<80;c++){if(c<16)u[c]=r[e+c]|0;else{var v=u[c-3]^u[c-8]^u[c-14]^u[c-16];u[c]=v<<1|v>>>31}var f=(n<<5|n>>>27)+s+u[c];if(c<20)f+=(i&a|~i&o)+1518500249;else if(c<40)f+=(i^a^o)+1859775393;else if(c<60)f+=(i&a|i&o|a&o)-1894007588;else f+=(i^a^o)-899497514;s=o;o=a;a=i<<30|i>>>2;i=n;n=f}t[0]=t[0]+n|0;t[1]=t[1]+i|0;t[2]=t[2]+a|0;t[3]=t[3]+o|0;t[4]=t[4]+s|0},_doFinalize:function(){var r=this._data;var e=r.words;var t=this._nDataBytes*8;var n=r.sigBytes*8;e[n>>>5]|=128<<24-n%32;e[(n+64>>>9<<4)+14]=Math.floor(t/4294967296);e[(n+64>>>9<<4)+15]=t;r.sigBytes=e.length*4;this._process();return this._hash},clone:function(){var r=n.clone.call(this);r._hash=this._hash.clone();return r}});r.SHA1=n._createHelper(a);r.HmacSHA1=n._createHmacHelper(a)}(),o.SHA1}(t(0))},function(r,e,t){r.exports=function(o){(function(){var r=o;var e=r.lib;var t=e.Base;var n=r.enc;var v=n.Utf8;var i=r.algo;var a=i.HMAC=t.extend({init:function(r,e){r=this._hasher=new r.init;if(typeof e=="string")e=v.parse(e);var t=r.blockSize;var n=t*4;if(e.sigBytes>n)e=r.finalize(e);e.clamp();var i=this._oKey=e.clone();var a=this._iKey=e.clone();var o=i.words;var s=a.words;for(var c=0;c<t;c++){o[c]^=1549556828;s[c]^=909522486}i.sigBytes=a.sigBytes=n;this.reset()},reset:function(){var r=this._hasher;r.reset();r.update(this._iKey)},update:function(r){this._hasher.update(r);return this},finalize:function(r){var e=this._hasher;var t=e.finalize(r);e.reset();var n=e.finalize(this._oKey.clone().concat(t));return n}})})()}(t(0))}]);',null)}},function(e,t,r){var n,i,o,s,a,c,u,l,f,h,p,d,g,y;e.exports=y||(n=Math,o=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),c=(a=(s={}).lib={}).Base={extend:function(e){var t=o(this);return e&&t.mixIn(e),(!t.hasOwnProperty("init")||this.init===t.init)&&(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},u=a.WordArray=c.extend({init:function(e,t){e=this.words=e||[],t!=i?this.sigBytes=t:this.sigBytes=4*e.length},toString:function(e){return(e||f).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var o=0;o<i;o++){var s=r[o>>>2]>>>24-o%4*8&255;t[n+o>>>2]|=s<<24-(n+o)%4*8}else for(var o=0;o<i;o+=4)t[n+o>>>2]=r[o>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,t=this.sigBytes;e[t>>>2]&=4294967295<<32-t%4*8,e.length=n.ceil(t/4)},clone:function(){var e=c.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=function(e){var e=e,t=987654321;return function(){var r=((t=36969*(65535&t)+(t>>16)&4294967295)<<16)+(e=18e3*(65535&e)+(e>>16)&4294967295)&4294967295;return r/=4294967296,(r+=.5)*(n.random()>.5?1:-1)}},i,o=0;o<e;o+=4){var s=r(4294967296*(i||n.random()));i=987654071*s(),t.push(4294967296*s()|0)}return new u.init(t,e)}}),f=(l=s.enc={}).Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new u.init(r,t/2)}},h=l.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new u.init(r,t)}},p=l.Utf8={stringify:function(e){try{return decodeURIComponent(escape(h.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return h.parse(unescape(encodeURIComponent(e)))}},d=a.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(e){var t=this._data,r=t.words,i=t.sigBytes,o=this.blockSize,s=i/(4*o),a=(s=e?n.ceil(s):n.max((0|s)-this._minBufferSize,0))*o,c=n.min(4*a,i);if(a){for(var l=0;l<a;l+=o)this._doProcessBlock(r,l);var f=r.splice(0,a);t.sigBytes-=c}return new u.init(f,c)},clone:function(){var e=c.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),a.Hasher=d.extend({cfg:c.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new g.HMAC.init(e,r).finalize(t)}}}),g=s.algo={},s)},function(e,t,r){var n;e.exports=(n=r(3),function(e){var t=n.lib,r=t.WordArray,i=t.Hasher,o=n.algo,s=[],a=[];(function(){function t(e){return(e-(0|e))*4294967296|0}for(var r=2,n=0;n<64;)(function(t){for(var r=e.sqrt(t),n=2;n<=r;n++)if(!(t%n))return!1;return!0})(r)&&(n<8&&(s[n]=t(e.pow(r,.5))),a[n]=t(e.pow(r,1/3)),n++),r++})();var c=[],u=o.SHA256=i.extend({_doReset:function(){this._hash=new r.init(s.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],s=r[3],u=r[4],l=r[5],f=r[6],h=r[7],p=0;p<64;p++){if(p<16)c[p]=0|e[t+p];else{var d=c[p-15],g=(d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,y=c[p-2],m=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;c[p]=g+c[p-7]+m+c[p-16]}var v=u&l^~u&f,b=n&i^n&o^i&o,_=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),w=h+((u<<26|u>>>6)^(u<<21|u>>>11)^(u<<7|u>>>25))+v+a[p]+c[p],k=_+b;h=f,f=l,l=u,u=s+w|0,s=o,o=i,i=n,n=w+k|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+u|0,r[5]=r[5]+l|0,r[6]=r[6]+f|0,r[7]=r[7]+h|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[(i+64>>>9<<4)+14]=e.floor(n/4294967296),r[(i+64>>>9<<4)+15]=n,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});n.SHA256=i._createHelper(u),n.HmacSHA256=i._createHmacHelper(u)}(Math),n.SHA256)},function(e,t,r){var n;e.exports=(n=r(3),r(4),r(6),n.HmacSHA256)},function(e,t,r){var n,i,o;e.exports=void(i=(n=r(3)).lib.Base,o=n.enc.Utf8,n.algo.HMAC=i.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=o.parse(t));var r=e.blockSize,n=4*r;t.sigBytes>n&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),s=this._iKey=t.clone(),a=i.words,c=s.words,u=0;u<r;u++)a[u]^=1549556828,c[u]^=909522486;i.sigBytes=s.sigBytes=n,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,r=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(r))}}))},function(e,t){var r=function(){return this}();try{r=r||Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";var n=window.URL||window.webkitURL;e.exports=function(e,t){try{try{var r;try{(r=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder)).append(e),r=r.getBlob()}catch(t){r=new Blob([e])}return new Worker(n.createObjectURL(r))}catch(t){return new Worker("data:application/javascript,"+encodeURIComponent(e))}}catch(e){if(t)return new Worker(t);throw Error("Inline worker is not supported")}}},function(e,t,r){"use strict";r.r(t),r.d(t,"default",function(){return tM});var t=r(0),n=r.n(t),i={debug:!1,region:"cn",initUploadFileUrl:"{tosDomain}/{oid}?uploads",uploadChunkedUrl:"{tosDomain}/{oid}?partNumber={number}&uploadID={uploadId}",uploadMergeUrl:"{tosDomain}/{oid}?uploadID={uploadId}",getUploadListUrl:"{tosDomain}/{oid}?uploadID={uploadId}",directUploadFileUrl:"{tosDomain}/{oid}",external:{},getSliceFunc:null,uploadSliceCount:3,retryUploadTime:2,retryProcess:!0,retryProcessTime:3,retryTaskTime:2,progressMonitorTime:10,progressMonitorSpeed:50,schema:"https",replace:{}},o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function s(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||0<t--)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}(arguments[t]));return e}function a(e){return null!=e&&"[object Object]"==Object.prototype.toString.call(e)}function c(e){var t=document.createElement("a");return t.href=e,t}function u(e){var t={};try{c(e).search.slice(1).split("&").forEach(function(e){var r,n,i=e.split("=");i.length&&(r=i[0],n=i[1]);try{t[r]=decodeURIComponent(void 0===n?"":n)}catch(e){t[r]=n}})}catch(e){}return t}function l(e){for(var t=0,r=0,n=(e+="").length,i=0;i<n;i++)(0x7fffffffffff<(t=31*t+e.charCodeAt(r++))||t<-140737488355328)&&(t&=0xffffffffffff);return t<0&&(t+=0x7ffffffffffff),t}var f,h,p=function(){function e(){this._hooks={},this._cache=[],this._hooksCache={}}return e.prototype.on=function(e,t){e&&t&&"function"==typeof t&&(this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(t))},e.prototype.once=function(e,t){var r=this;e&&t&&"function"==typeof t&&this.on(e,function n(i){t(i),r.off(e,n)})},e.prototype.off=function(e,t){e&&this._hooks[e]&&this._hooks[e].length&&(t?-1!==(t=this._hooks[e].indexOf(t))&&this._hooks[e].splice(t,1):this._hooks[e]=[])},e.prototype.emit=function(e,t,r){r?e&&(-1!==this._cache.indexOf(r)?this._emit(e,t):(this._hooksCache.hasOwnProperty(r)||(this._hooksCache[r]={}),this._hooksCache[r].hasOwnProperty(e)||(this._hooksCache[r][e]=[]),this._hooksCache[r][e].push(t))):this._emit(e,t)},e.prototype._emit=function(e,t){e&&this._hooks[e]&&this._hooks[e].length&&s(this._hooks[e]).forEach(function(e){try{e(t)}catch(e){}})},e.prototype.set=function(e){e&&-1===this._cache.indexOf(e)&&this._cache.push(e)},e}(),d=(h=+Date.now()+Number((""+Math.random()).slice(2,8)),(t={exports:{}}).exports=function(){function e(){for(var e=0,t={};e<arguments.length;e++){var r,n=arguments[e];for(r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function r(n){function i(){}function o(t,r,o){if("undefined"!=typeof document){"number"==typeof(o=e({path:"/"},i.defaults,o)).expires&&(o.expires=new Date(+new Date+864e5*o.expires)),o.expires=o.expires?o.expires.toUTCString():"";try{var s=JSON.stringify(r);/^[\{\[]/.test(s)&&(r=s)}catch(e){}r=n.write?n.write(r,t):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var a,c="";for(a in o)o[a]&&(c+="; "+a,!0!==o[a]&&(c+="="+o[a].split(";")[0]));return document.cookie=t+"="+r+c}}function s(e,r){if("undefined"!=typeof document){for(var i={},o=document.cookie?document.cookie.split("; "):[],s=0;s<o.length;s++){var a=o[s].split("="),c=a.slice(1).join("=");r||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var u=t(a[0]),c=(n.read||n)(c,u)||t(c);if(r)try{c=JSON.parse(c)}catch(e){}if(i[u]=c,e===u)break}catch(e){}}return e?i[e]:i}}return i.set=o,i.get=function(e){return s(e,!1)},i.getJSON=function(e){return s(e,!0)},i.remove=function(t,r){o(t,"",e(r,{expires:-1}))},i.defaults={},i.withConverter=r,i}(function(){})}(),t.exports),g=function(){function e(){this.cache={}}return e.prototype.setItem=function(e,t){this.cache[e]=t},e.prototype.getItem=function(e){return this.cache[e]},e.prototype.removeItem=function(e){this.cache[e]=void 0},e.prototype.getCookie=function(e){this.getItem(e)},e.prototype.setCookie=function(e,t){this.setItem(e,t)},e}(),y={getItem:function(e){try{var t=localStorage.getItem(e),r=t;try{t&&"string"==typeof t&&(r=JSON.parse(t))}catch(e){}return r||{}}catch(e){}return{}},setItem:function(e,t){try{var r="string"==typeof t?t:JSON.stringify(t);localStorage.setItem(e,r)}catch(e){}},removeItem:function(e){try{localStorage.removeItem(e)}catch(e){}},getCookie:function(e,t){try{return d.get(e,{domain:t||document.domain})}catch(e){return""}},setCookie:function(e,t,r,n){try{var i=n||document.domain,o=+new Date+r;d.set(e,t,{expires:new Date(o),path:"/",domain:i})}catch(e){}},isSupportLS:function(){try{return localStorage.setItem("_ranger-test-key","hi"),localStorage.getItem("_ranger-test-key"),localStorage.removeItem("_ranger-test-key"),!0}catch(e){return!1}}()},m={getItem:function(e){try{var t=sessionStorage.getItem(e),r=t;try{t&&"string"==typeof t&&(r=JSON.parse(t))}catch(e){}return r||{}}catch(e){}return{}},setItem:function(e,t){try{var r="string"==typeof t?t:JSON.stringify(t);sessionStorage.setItem(e,r)}catch(e){}},removeItem:function(e){try{sessionStorage.removeItem(e)}catch(e){}},getCookie:function(e){this.getItem(e)},setCookie:function(e,t){this.setItem(e,t)},isSupportSession:function(){try{return sessionStorage.setItem("_ranger-test-key","hi"),sessionStorage.getItem("_ranger-test-key"),sessionStorage.removeItem("_ranger-test-key"),!0}catch(e){return!1}}()},v=function(){function e(e,t){this._storage=t&&"session"===t?m:!e&&y.isSupportLS?y:new g}return e.prototype.getItem=function(e){return this._storage.getItem(e)},e.prototype.setItem=function(e,t){this._storage.setItem(e,t)},e.prototype.getCookie=function(e,t){return this._storage.getCookie(e,t)},e.prototype.setCookie=function(e,t,r,n){this._storage.setCookie(e,t,r,n)},e.prototype.removeItem=function(e){this._storage.removeItem(e)},e}(),b=function(){function e(e,t,r){this.appid=e,this.domain=t,this.userAgent=window.navigator.userAgent,this.appVersion=window.navigator.appVersion,this.cookie_expire=r}return e.prototype.init=function(){var e=window.navigator.userAgent,t=window.navigator.language,r=document.referrer,n=r?c(r).hostname:"",i=u(window.location.href),o=/Mobile|htc|mini|Android|iP(ad|od|hone)/.test(this.appVersion)?"wap":"web",i=(this.utm=function(e,t,r,n){var i=new v(!1),o=new v(!1,"session"),s=e?"_tea_utm_cache_"+e:"_tea_utm_cache",a=e?"_$utm_from_url_"+e:"_$utm_from_url",c={},u=["tr_shareuser","tr_admaster","tr_param1","tr_param2","tr_param3","tr_param4","$utm_from_url"],l={ad_id:Number(t.ad_id)||void 0,campaign_id:Number(t.campaign_id)||void 0,creative_id:Number(t.creative_id)||void 0,utm_source:t.utm_source,utm_medium:t.utm_medium,utm_campaign:t.utm_campaign,utm_term:t.utm_term,utm_content:t.utm_content,tr_shareuser:t.tr_shareuser,tr_admaster:t.tr_admaster,tr_param1:t.tr_param1,tr_param2:t.tr_param2,tr_param3:t.tr_param3,tr_param4:t.tr_param4};try{var f,h,p=!1;for(f in l)l[f]&&(-1!==u.indexOf(f)?(c.hasOwnProperty("tracer_data")||(c.tracer_data={}),c.tracer_data[f]=l[f]):c[f]=l[f],p=!0);p?(o.setItem(a,"1"),i.setCookie(s,JSON.stringify(c),n,r)):(h=i.getCookie(s,r))&&(c=JSON.parse(h)),o.getItem(a)&&(c.hasOwnProperty("tracer_data")||(c.tracer_data={}),c.tracer_data.$utm_from_url=1)}catch(e){return l}return c}(this.appid,i,this.domain,this.cookie_expire),this.browser()),s=this.os();return{browser:i.browser,browser_version:i.browser_version,platform:o,os_name:s.os_name,os_version:s.os_version,userAgent:e,screen_width:window.screen&&window.screen.width,screen_height:window.screen&&window.screen.height,device_model:this.getDeviceModel(s.os_name),language:t,referrer:r,referrer_host:n,utm:this.utm,latest_data:this.last(r,n)}},e.prototype.last=function(e,t){var r="",n="",i="",o=location.hostname,s=!1;return e&&t&&o!==t&&(n=t,s=!0,(o=u(r=e)).keyword&&(i=o.keyword)),{$latest_referrer:r,$latest_referrer_host:n,$latest_search_keyword:i,isLast:s}},e.prototype.browser=function(){var e,t="",r=""+parseFloat(this.appVersion),n=this.userAgent;return -1!==n.indexOf("Edge")||-1!==n.indexOf("Edg")?(t="Microsoft Edge",r=-1!==n.indexOf("Edge")?(e=n.indexOf("Edge"),n.substring(e+5)):(e=n.indexOf("Edg"),n.substring(e+4))):-1!==(e=n.indexOf("MSIE"))?(t="Microsoft Internet Explorer",r=n.substring(e+5)):-1!==(e=n.indexOf("Lark"))?(t="Lark",r=n.substring(e+5,e+11)):-1!==(e=n.indexOf("MetaSr"))?(t="sougoubrowser",r=n.substring(e+7,e+10)):-1!==n.indexOf("MQQBrowser")||-1!==n.indexOf("QQBrowser")?(t="qqbrowser",-1!==n.indexOf("MQQBrowser")?(e=n.indexOf("MQQBrowser"),r=n.substring(e+11,e+15)):-1!==n.indexOf("QQBrowser")&&(e=n.indexOf("QQBrowser"),r=n.substring(e+10,e+17))):-1!==n.indexOf("Chrome")?-1!==(e=n.indexOf("MicroMessenger"))?(t="weixin",r=n.substring(e+15,e+20)):-1!==(e=n.indexOf("360"))?(t="360browser",r=n.substring(n.indexOf("Chrome")+7)):-1!==n.indexOf("baidubrowser")||-1!==n.indexOf("BIDUBrowser")?(-1!==n.indexOf("baidubrowser")?(e=n.indexOf("baidubrowser"),r=n.substring(e+13,e+16)):-1!==n.indexOf("BIDUBrowser")&&(e=n.indexOf("BIDUBrowser"),r=n.substring(e+12,e+15)),t="baidubrowser"):-1!==(e=n.indexOf("xiaomi"))?r=-1!==n.indexOf("openlanguagexiaomi")?(t="openlanguage xiaomi",n.substring(e+7,e+13)):(t="xiaomi",n.substring(e-7,e-1)):-1!==(e=n.indexOf("TTWebView"))?(t="TTWebView",r=n.substring(e+10,e+23)):-1===(e=n.indexOf("Chrome"))&&-1===(e=n.indexOf("Chrome"))||(t="Chrome",r=n.substring(e+7)):-1!==n.indexOf("Safari")?-1!==(e=n.indexOf("QQ"))?(t="qqbrowser",r=n.substring(e+10,e+16)):-1!==(e=n.indexOf("Safari"))&&(t="Safari",r=n.substring(e+7),-1!==(e=n.indexOf("Version"))&&(r=n.substring(e+8))):-1!==(e=n.indexOf("Firefox"))?(t="Firefox",r=n.substring(e+8)):-1!==(e=n.indexOf("MicroMessenger"))?(t="weixin",r=n.substring(e+15,e+20)):-1!==(e=n.indexOf("QQ"))&&(t="qqbrowser",r=n.substring(e+3,e+8)),{browser:t,browser_version:r=-1!==(n=(r=-1!==(n=(r=-1!==(n=r.indexOf(";"))?r.substring(0,n):r).indexOf(" "))?r.substring(0,n):r).indexOf(")"))?r.substring(0,n):r}},e.prototype.os=function(){for(var e,t,r="",n="",i=[{s:"Windows 10",r:/(Windows 10.0|Windows NT 10.0|Windows NT 10.1)/},{s:"Windows 8.1",r:/(Windows 8.1|Windows NT 6.3)/},{s:"Windows 8",r:/(Windows 8|Windows NT 6.2)/},{s:"Windows 7",r:/(Windows 7|Windows NT 6.1)/},{s:"Android",r:/Android/},{s:"Sun OS",r:/SunOS/},{s:"Linux",r:/(Linux|X11)/},{s:"iOS",r:/(iPhone|iPad|iPod)/},{s:"Mac OS X",r:/Mac OS X/},{s:"Mac OS",r:/(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/}],o=0;o<i.length;o++){var s=i[o];if(s.r.test(this.userAgent)){"Mac OS X"===(r=s.s)&&this.isNewIpad()&&(r="iOS");break}}function a(e,t){return(e=e.exec(t))&&e[1]?e[1]:""}function c(e,t){return(e=RegExp("(?:^|[^A-Z0-9-_]|[^A-Z0-9-]_|sprd-)(?:"+e+")","i").exec(t))?e.slice(1)[0]:""}switch(/Windows/.test(r)&&(n=a(/Windows (.*)/,r),r="windows"),r){case"Mac OS X":n=c("Mac[ +]OS[ +]X(?:[ /](?:Version )?(\\d+(?:[_\\.]\\d+)+))?",this.userAgent),r="mac";break;case"Android":n=t=(t=a(/Android ([\.\_\d]+)/,e=this.userAgent))?t:a(/Android\/([\.\_\d]+)/,e),r="android";break;case"iOS":n=this.isNewIpad()?c("Mac[ +]OS[ +]X(?:[ /](?:Version )?(\\d+(?:[_\\.]\\d+)+))?",this.userAgent):(n=/OS (\d+)_(\d+)_?(\d+)?/.exec(this.appVersion))?n[1]+"."+n[2]+"."+(0|n[3]):"",r="ios"}return{os_name:r,os_version:n}},e.prototype.getDeviceModel=function(e){var t,r,n="";try{"android"===e?navigator.userAgent.split(";").forEach(function(e){-1<e.indexOf("Build/")&&(n=e.slice(0,e.indexOf("Build/")))}):"ios"!==e&&"mac"!==e&&"windows"!==e||(n=this.isNewIpad()?"iPad":(r=(t=navigator.userAgent.replace("Mozilla/5.0 (","")).indexOf(";"),t.slice(0,r)))}catch(e){}return n.trim()},e.prototype.isNewIpad=function(){return void 0!==this.userAgent&&"MacIntel"===navigator.platform&&"number"==typeof navigator.maxTouchPoints&&1<navigator.maxTouchPoints},e}(),_={cn:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az28z1gz1hz1gz1cz18z1nz1gz4az1az1mz1k",sg:"1fz22z22z1nz21z4mz4bz4bz21z1ez18z1jz1gz49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k",va:"1fz22z22z1nz21z4mz4bz4bz1kz18z1jz1gz24z18z49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k"},w="5.0.23_3",k=void 0,t=(new Date).getTimezoneOffset(),S=parseInt(""+-t/60,10),x=60*t,O=function(){function e(e){this.is_first_time=!0,this.configPersist=!1,this.initConfig=e;var t=new b(e.app_id,e.cookie_domain||"",e.cookie_expire||6048e5).init(),r="__tea_cache_first_"+e.app_id;this.configKey="__tea_cache_config_"+e.app_id,this.sessionStorage=new v(!1,"session"),this.localStorage=new v(!1,"local"),e.configPersist&&(this.configPersist=!0,this.storage=1===e.configPersist?this.sessionStorage:this.localStorage),this.localStorage.getItem(r)?this.is_first_time=!1:(this.is_first_time=!0,this.localStorage.setItem(r,"1")),this.envInfo={user:{user_unique_id:k,user_type:k,user_id:k,user_is_auth:k,user_is_login:k,device_id:k,web_id:k,ip_addr_id:k},header:{app_id:k,app_name:k,app_install_id:k,install_id:k,app_package:k,app_channel:k,app_version:k,os_name:t.os_name,os_version:t.os_version,device_model:t.device_model,ab_client:k,traffic_type:k,client_ip:k,device_brand:k,os_api:k,access:k,language:t.language,region:k,app_language:k,app_region:k,ab_version:k,creative_id:t.utm.creative_id,ad_id:t.utm.ad_id,campaign_id:t.utm.campaign_id,log_type:k,rnd:k,platform:t.platform,sdk_version:w,sdk_lib:"js",province:k,city:k,timezone:S,tz_offset:x,tz_name:k,sim_region:k,carrier:k,resolution:t.screen_width+"x"+t.screen_height,browser:t.browser,browser_version:t.browser_version,referrer:t.referrer,referrer_host:t.referrer_host,width:t.screen_width,height:t.screen_height,screen_width:t.screen_width,screen_height:t.screen_height,utm_term:t.utm.utm_term,utm_content:t.utm.utm_content,utm_source:t.utm.utm_source,utm_medium:t.utm.utm_medium,utm_campaign:t.utm.utm_campaign,tracer_data:JSON.stringify(t.utm.tracer_data),custom:{},wechat_unionid:k,wechat_openid:k}},this.ab_version="",this.evtParams={},this.reportErrorCallback=function(){},this.initDomain()}return e.prototype.initDomain=function(){var e=this.initConfig.channel_domain;e?this.domain=e:(e=this.initConfig.channel,this.domain=function(e,t){if("string"==typeof e&&"number"==typeof t){for(var r=[],n=String.fromCharCode((t=t<=25?t:t%25)+97),i=e.split(n),o=0;o<i.length;o++){var s=64^+parseInt(i[o],t),s=String.fromCharCode(s);r.push(s)}return r.join("")}}(_[e],25))},e.prototype.setDomain=function(e){this.domain=e},e.prototype.getDomain=function(){return this.domain},e.prototype.setAbVersion=function(e){this.ab_version=e},e.prototype.getAbVersion=function(){return this.ab_version},e.prototype.getUrl=function(e){var t="";switch(e){case"event":t=this.initConfig.report_url||"/list";break;case"webid":t="/webid";break;case"tobid":t="/tobid"}return e="",this.initConfig.caller&&(e="?sdk_version="+w+"&sdk_name=web&app_id="+this.initConfig.app_id+"&caller="+this.initConfig.caller),""+this.getDomain()+t+e},e.prototype.set=function(e){var t=this;Object.keys(e).forEach(function(r){var n,i,s;void 0!==e[r]&&null!==e[r]||t.delete(r),"evtParams"===r?t.evtParams=o({},t.evtParams||{},e.evtParams||{}):"_staging_flag"===r?t.evtParams=o({},t.evtParams||{},{_staging_flag:e._staging_flag}):"reportErrorCallback"===r&&"function"==typeof e[r]?t.reportErrorCallback=e[r]:(s=i="",-1<r.indexOf(".")&&(i=(n=r.split("."))[0],s=n[1]),i?"user"===i||"header"===i?t.envInfo[i][s]=e[r]:t.envInfo.header.custom[s]=e[r]:t.envInfo.user.hasOwnProperty(r)?-1<["user_type","ip_addr_id"].indexOf(r)?t.envInfo.user[r]=e[r]&&Number(e[r]):-1<["user_id","web_id","user_unique_id"].indexOf(r)?t.envInfo.user[r]=e[r]&&String(e[r]):-1<["user_is_auth","user_is_login"].indexOf(r)?t.envInfo.user[r]=!!e[r]:"device_id"===r&&(t.envInfo.user[r]=e[r]):t.envInfo.header.hasOwnProperty(r)?t.envInfo.header[r]=e[r]:t.envInfo.header.custom[r]=e[r])})},e.prototype.get=function(e){try{return e?"evtParams"===e?this.evtParams:"reportErrorCallback"===e?this[e]:this.envInfo.user.hasOwnProperty(e)?this.envInfo.user[e]:this.envInfo.header.hasOwnProperty(e)?this.envInfo.header[e]:JSON.parse(JSON.stringify(this.envInfo[e])):JSON.parse(JSON.stringify(this.envInfo))}catch(e){}},e.prototype.setStore=function(e){try{if(!this.configPersist)return;var t,r=this.storage.getItem(this.configKey)||{};r&&Object.keys(e).length&&(t=Object.assign(e,r),this.storage.setItem(this.configKey,t))}catch(e){}},e.prototype.getStore=function(){try{if(!this.configPersist)return null;var e=this.storage.getItem(this.configKey);return e&&Object.keys(e).length?e:null}catch(e){return null}},e.prototype.delete=function(e){try{if(!this.configPersist)return;var t=this.storage.getItem(this.configKey);t&&t.hasOwnProperty(e)&&(delete t[e],this.storage.setItem(this.configKey,t))}catch(e){}},e}(),C=function(){function e(e,t){this.isLog=t||!1,this.name=e||""}return e.prototype.info=function(e){this.isLog},e.prototype.warn=function(e){this.isLog},e.prototype.error=function(e){this.isLog},e.prototype.throw=function(e){throw this.error(this.name),Error(e)},e}(),T=((f=H=H||{}).Init="init",f.Config="config",f.Start="start",f.Ready="ready",f.TokenComplete="token-complete",f.TokenStorage="token-storage",f.TokenFetch="token-fetch",f.TokenError="token-error",f.ConfigUuid="config-uuid",f.ConfigWebId="config-webid",f.ConfigDomain="config-domain",f.CustomWebId="custom-webid",f.TokenChange="token-change",f.TokenReset="token-reset",f.ConfigTransform="config-transform",f.EnvTransform="env-transform",f.SessionReset="session-reset",f.SessionResetTime="session-reset-time",f.Event="event",f.Events="events",f.EventNow="event-now",f.CleanEvents="clean-events",f.BeconEvent="becon-event",f.SubmitBefore="submit-before",f.SubmitScuess="submit-scuess",f.SubmitAfter="submit-after",f.SubmitError="submit-error",f.SubmitVerify="submit-verify",f.Stay="stay",f.ResetStay="reset-stay",f.StayReady="stay-ready",f.SetStay="set-stay",f.RouteChange="route-change",f.RouteReady="route-ready",f.Ab="ab",f.AbVar="ab-var",f.AbAllVars="ab-all-vars",f.AbConfig="ab-config",f.AbExternalVersion="ab-external-version",f.AbVersionChangeOn="ab-version-change-on",f.AbVersionChangeOff="ab-version-change-off",f.AbOpenLayer="ab-open-layer",f.AbCloseLayer="ab-close-layer",f.AbReady="ab-ready",f.AbComplete="ab-complete",f.Profile="profile",f.ProfileSet="profile-set",f.ProfileSetOnce="profile-set-once",f.ProfileUnset="profile-unset",f.ProfileIncrement="profile-increment",f.ProfileAppend="profile-append",f.ProfileClear="profile-clear",f.Autotrack="autotrack",f.AutotrackReady="autotrack-ready",f.CepReady="cep-ready",f.TracerReady="tracer-ready",H),j=function(){function e(e){this.native=e}var t=e.prototype;return t.bridgeInject=function(){try{return!!this.native&&!!AppLogBridge}catch(e){return!1}},t.bridgeReady=function(){var e=this;return new Promise(function(t,r){try{e.bridgeInject()?AppLogBridge.hasStarted(function(e){e?t(!0):r(!1)}):r(!1)}catch(e){r(!1)}})},t.setConfig=function(e){var t=this;try{Object.keys(e).forEach(function(r){"user_unique_id"===r?t.setUserUniqueId(e[r]):config[r]?t.addHeaderInfo(r,e[r]):t.removeHeaderInfo(r)})}catch(e){}},t.setUserUniqueId=function(e){try{AppLogBridge.setUserUniqueId(e)}catch(e){}},t.addHeaderInfo=function(e,t){try{AppLogBridge.addHeaderInfo(e,t)}catch(e){}},t.setHeaderInfo=function(e){try{AppLogBridge.setHeaderInfo(JSON.stringify(e))}catch(e){}},t.removeHeaderInfo=function(e){try{AppLogBridge.removeHeaderInfo(e)}catch(e){}},t.reportPv=function(e){this.onEventV3("predefine_pageview",e)},t.onEventV3=function(e,t){try{AppLogBridge.onEventV3(e,t)}catch(e){}},t.profileSet=function(e){try{AppLogBridge.profileSet(e)}catch(e){}},t.profileSetOnce=function(e){try{AppLogBridge.profileSetOnce(e)}catch(e){}},t.profileIncrement=function(e){try{AppLogBridge.profileIncrement(e)}catch(e){}},t.profileUnset=function(e){try{AppLogBridge.profileUnset(e)}catch(e){}},t.profileAppend=function(e){try{AppLogBridge.profileAppend(e)}catch(e){}},e}(),P={XHR_ON:500,TIMEOUT:5005};function I(e,t,r,n,i,o,s,a){try{var c=new XMLHttpRequest;c.open(a||"POST",""+e,!0),c.setRequestHeader("Content-Type","application/json; charset=utf-8"),s&&c.setRequestHeader("X-MCS-AppKey",""+s),n&&(c.withCredentials=!0),c.onload=function(){if(i){var e=null;if(c.responseText){try{e=JSON.parse(c.responseText)}catch(t){e={}}i(e,t)}}},r&&(c.timeout=r,c.ontimeout=function(){o&&o(t,P.TIMEOUT)}),c.onerror=function(){c.abort(),o&&o(t,P.XHR_ON)},c.send(JSON.stringify(t))}catch(e){}}function A(e,t,r,n){try{var i=e.match(/\/v\d\//),o=i?i[0]:-1!==e.indexOf("/v1/")?"/v1/":"/v2/",s=e.split(o)[0];if(!s)return void n(e,t,R);t.forEach(function(i){var i=function(e){var t,r="";for(t in e)e.hasOwnProperty(t)&&void 0!==e[t]&&(r+="&"+t+"="+encodeURIComponent(JSON.stringify(e[t])));return"&"===r[0]?r.slice(1):r}(i),o=new Image(1,1);o.onload=function(){o=null,r&&r()},o.onerror=function(){o=null,n&&n(e,t,B)},o.src=s+"/gif?"+i})}catch(r){n&&n(e,t,M,r.message)}}function D(e,t,r,n,i,o,s){var a=window.navigator.userAgent;if(-1===window.navigator.appName.indexOf("Microsoft Internet Explorer")||-1===a.indexOf("MSIE 8.0")&&-1===a.indexOf("MSIE 9.0")){if(s)return window.navigator&&window.navigator.sendBeacon?window.navigator.sendBeacon(e,JSON.stringify(t))?i():o(e,t,4003):A(e,t,i,o)}else A(e,t,i,o);I(e,t,r,n,i,o)}function E(){return(function e(t){return t?(t^16*Math.random()>>t/4).toString(10):"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e)})().replace(/-/g,"").slice(0,19)}function z(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}var R=4001,B=4e3,M=4002,U=function(){function e(){this.eventLimit=50,this.enable_ttwebid=!1,this.eventCache=[],this.beconEventCache=[]}return e.prototype.apply=function(e,t){var r=this;this.collect=e,this.config=t,this.configManager=e.configManager,this.cacheStorgae=new v(!0),this.localStorage=new v(!1),this.maxReport=t.max_report||10,this.reportTime=t.reportTime||30,this.timeout=t.timeout||1e5,this.enable_ttwebid=t.enable_ttwebid,this.reportUrl=this.configManager.getUrl("event"),this.eventKey="__tea_cache_events_"+this.configManager.get("app_id"),this.beconKey="__tea_cache_events_becon_"+this.configManager.get("app_id"),this.abKey="__tea_sdk_ab_version_"+this.configManager.get("app_id"),this.collect.on(T.Ready,function(){r.reportAll(!1)}),this.collect.on(T.ConfigDomain,function(){r.reportUrl=r.configManager.getUrl("event")}),this.collect.on(T.Event,function(e){r.event(e)}),this.collect.on(T.BeconEvent,function(e){r.beconEvent(e)}),this.collect.on(T.CleanEvents,function(){r.reportAll(!1)}),this.linster()},e.prototype.linster=function(){var e,t=this;window.addEventListener("unload",function(){t.reportAll(!0)},!1),e=function(){t.reportAll(!0)},navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)?window.addEventListener("pagehide",e,!1):window.addEventListener("beforeunload",e,!1),document.addEventListener("visibilitychange",function(){"hidden"===document.visibilityState&&t.reportAll(!0)},!1)},e.prototype.reportAll=function(e){this.report(e),this.reportBecon()},e.prototype.event=function(e){var t=this;try{var r,n=s(e,this.cacheStorgae.getItem(this.eventKey)||[]);this.cacheStorgae.setItem(this.eventKey,n),this.reportTimeout&&clearTimeout(this.reportTimeout),n.length>=this.maxReport?this.report(!1):(r=this.reportTime,this.reportTimeout=setTimeout(function(){t.report(!1),t.reportTimeout=null},r))}catch(e){}},e.prototype.beconEvent=function(e){e=s(e,this.cacheStorgae.getItem(this.beconKey)||[]),this.cacheStorgae.setItem(this.beconKey,e),this.collect.destroyInstance||this.collect.tokenManager.getReady()&&this.collect.sdkReady&&(this.cacheStorgae.removeItem(this.beconKey),this.send(this.split(this.merge(e)),!0))},e.prototype.reportBecon=function(){var e=this.cacheStorgae.getItem(this.beconKey)||[];e&&e.length&&(this.cacheStorgae.removeItem(this.beconKey),this.send(this.split(this.merge(e)),!0))},e.prototype.report=function(e){var t;!this.collect.destroyInstance&&this.collect.tokenManager.getReady()&&this.collect.sdkReady&&(t=this.cacheStorgae.getItem(this.eventKey)||[]).length&&(this.cacheStorgae.removeItem(this.eventKey),this.sliceEvent(t,e))},e.prototype.sliceEvent=function(e,t){if(e.length>this.eventLimit)for(var r=0;r<e.length;r+=this.eventLimit){var n=e.slice(r,r+this.eventLimit),i=this.split(this.merge(n));this.send(i,t)}else i=this.split(this.merge(e)),this.send(i,t)},e.prototype.merge=function(e){var t=this,r=this.configManager.get(),n=r.header,i=r.user,s=(n.custom=JSON.stringify(n.custom),this.configManager.get("evtParams")),r=e.map(function(e){Object.keys(s).length&&(e.params=o({},s,e.params));var r=t.localStorage.getItem(t.abKey);return r&&r.uuid&&r.uuid===i.user_unique_id&&t.configManager.getAbVersion()&&(e.ab_sdk_version=t.configManager.getAbVersion()),e.session_id=t.collect.sessionManager.getSessionId(),e.params=JSON.stringify(e.params),e}),e=JSON.parse(JSON.stringify({events:r,user:i,header:n})),r=(e.local_time=Math.floor(Date.now()/1e3),e.user_unique_type=this.config.enable_ttwebid?this.config.user_unique_type:void 0,[]);return r.push(e),r},e.prototype.split=function(e){return e.map(function(e){var t=[];return t.push(e),t})},e.prototype.send=function(e,t){var r=this;e.length&&e.forEach(function(e){try{var n=JSON.parse(JSON.stringify(e)),i=(r.config.filter&&(n=r.config.filter(n)),r.collect.eventFilter&&n&&(n=r.collect.eventFilter(n)),n||e);r.collect.emit(T.SubmitBefore,i),r.collect.emit(T.SubmitVerify,i),D(r.reportUrl,i,r.timeout,r.enable_ttwebid,function(e,t){e&&0!==e.e?r.collect.emit(T.SubmitError,{type:"f_data",eventData:t,errorCode:e.e,response:e}):r.collect.emit(T.SubmitScuess,{eventData:t,res:e})},function(e,t){r.configManager.get("reportErrorCallback")(e,t),r.collect.emit(T.SubmitError,{type:"f_net",eventData:e,errorCode:t})},t),r.collect.emit(T.SubmitAfter,i)}catch(e){}})},e}(),F=function(){function e(){this.cacheToken={},this.enableCookie=!1,this.enable_ttwebid=!1,this.enableCustomWebid=!1}return e.prototype.apply=function(e,t){var r=this;this.collect=e,this.config=t,this.configManager=this.collect.configManager,this.storage=new v(!1),this.tokenKey="__tea_cache_tokens_"+t.app_id,this.enable_ttwebid=t.enable_ttwebid,this.enableCustomWebid=t.enable_custom_webid,this.collect.on(T.ConfigUuid,function(e){r.setUuid(e)}),this.collect.on(T.ConfigWebId,function(e){r.setWebId(e)}),this.enableCookie=t.cross_subdomain,this.expiresTime=t.cookie_expire||6048e5,this.cookieDomain=t.cookie_domain||"",this.checkStorage()},e.prototype.checkStorage=function(){var e,t=this;this.enableCookie?(e=this.storage.getCookie(this.tokenKey,this.cookieDomain),this.cacheToken=e&&"string"==typeof e?JSON.parse(e):{}):this.cacheToken=this.storage.getItem(this.tokenKey)||{},this.tokenType=this.cacheToken&&this.cacheToken._type_?this.cacheToken._type_:"default","custom"!==this.tokenType||this.enableCustomWebid?this.enableCustomWebid?this.collect.on(T.CustomWebId,function(){t.tokenReady=!0,t.collect.emit(T.TokenComplete)}):this.checkEnv()||(this.enable_ttwebid?this.completeTtWid(this.cacheToken):this.check()):this.remoteWebid()},e.prototype.check=function(){this.cacheToken&&this.cacheToken.web_id?this.complete(this.cacheToken):this.config.disable_webid?this.complete({web_id:E(),user_unique_id:this.configManager.get("user_unique_id")||E()}):this.remoteWebid()},e.prototype.checkEnv=function(){var e,t;return -1!==window.navigator.userAgent.indexOf("miniProgram")&&!(!(e=u(window.location.href))||!e.Web_ID)&&(t=this.configManager.get("user_unique_id"),this.complete({web_id:""+e.Web_ID,env_uuid:t}),!0)},e.prototype.remoteWebid=function(){var e=this;I(this.configManager.getUrl("webid"),{app_key:this.config.app_key,app_id:this.config.app_id,url:location.href,user_agent:window.navigator.userAgent,referer:document.referrer,user_unique_id:""},3e3,!1,function(t){t&&0===t.e?e.complete({web_id:e.configManager.get("web_id")||t.web_id,user_unique_id:e.configManager.get("user_unique_id")||t.web_id}):e.collect.emit(T.TokenError)},function(){e.collect.emit(T.TokenError)})},e.prototype.complete=function(e){var t=e.web_id,r=e.user_unique_id;e.timestamp=Date.now(),this.collect.configManager.set({web_id:t,user_unique_id:r}),this.setStorage(e),this.tokenReady=!0,this.collect.emit(T.TokenComplete)},e.prototype.completeTtWid=function(e){var t=e.user_unique_id||"",r=this.configManager.get("user_unique_id");(r||t)&&this.configManager.set({user_unique_id:r||t}),this.setStorage(e),this.tokenReady=!0,this.collect.emit(T.TokenComplete)},e.prototype.setUuid=function(e){var t,r;e?(e=String(e),t=this.configManager.get("user_unique_id"),r=this.cacheToken&&this.cacheToken.user_unique_id,e===t&&e===r||(this.configManager.set({user_unique_id:e}),this.cacheToken||(this.cacheToken={}),this.cacheToken.user_unique_id=e,this.cacheToken.timestamp=Date.now(),this.setStorage(this.cacheToken),this.collect.emit(T.TokenChange,"uuid"),this.collect.emit(T.SessionReset))):this.clearUuid()},e.prototype.clearUuid=function(){this.config.enable_ttwebid||this.configManager.get("web_id")&&(this.configManager.set({user_unique_id:this.configManager.get("web_id")}),this.cacheToken&&this.cacheToken.web_id&&(this.cacheToken.user_unique_id=this.cacheToken.web_id,this.cacheToken.timestamp=Date.now(),this.setStorage(this.cacheToken)),this.collect.emit(T.TokenReset))},e.prototype.setWebId=function(e){var t,r;e&&!this.config.enable_ttwebid&&(this.cacheToken&&this.cacheToken.web_id?this.cacheToken.web_id!==e&&(this.cacheToken.user_unique_id=this.cacheToken.web_id===this.cacheToken.user_unique_id?e:this.cacheToken.user_unique_id,this.cacheToken.web_id=e):(this.cacheToken={},this.cacheToken.web_id=e,this.cacheToken.user_unique_id=e),this.cacheToken.timestamp=Date.now(),t=this.configManager.get("web_id"),(r=this.configManager.get("user_unique_id"))&&r!==t||(this.configManager.set({user_unique_id:e}),this.collect.emit(T.TokenChange,"uuid")),t!==e&&(this.configManager.set({web_id:e}),this.collect.emit(T.TokenChange,"webid")),this.setStorage(this.cacheToken))},e.prototype.setStorage=function(e){e._type_=this.enableCustomWebid?"custom":"default",delete e["diss".split("").reverse().join("")],this.enableCookie||this.enable_ttwebid?this.storage.setCookie(this.tokenKey,e,this.expiresTime,this.cookieDomain):this.storage.setItem(this.tokenKey,e),this.cacheToken=e},e.prototype.getReady=function(){return this.tokenReady},e.prototype.getTobId=function(){var e=this,t=this.configManager.getUrl("tobid");return new Promise(function(r){I(t,{app_id:e.config.app_id,user_unique_id:e.configManager.get("user_unique_id"),web_id:e.configManager.get("web_id")},3e4,e.enable_ttwebid,function(e){e&&0===e.e?r(e.tobid):r("")},function(){r("")})})},e}(),L=function(){function e(){}return e.prototype.apply=function(e,t){var r=this;this.collect=e,this.storage=new v(!1,"session"),this.sessionKey="__tea_session_id_"+t.app_id,this.expireTime=t.expireTime||18e5,this.disableSession=t.disable_session,this.disableSession||(this.setSessionId(),this.collect.on(T.SessionReset,function(){r.resetSessionId()}),this.collect.on(T.SessionResetTime,function(){r.updateSessionIdTime()}))},e.prototype.updateSessionIdTime=function(){var e,t=this.storage.getItem(this.sessionKey);t&&t.sessionId&&(e=t.timestamp,Date.now()-e>this.expireTime?t={sessionId:z(),timestamp:Date.now()}:t.timestamp=Date.now(),this.storage.setItem(this.sessionKey,t),this.resetExpTime())},e.prototype.setSessionId=function(){var e=this,t=this.storage.getItem(this.sessionKey);t&&t.sessionId?t.timestamp=Date.now():t={sessionId:z(),timestamp:Date.now()},this.storage.setItem(this.sessionKey,t),this.sessionExp=setInterval(function(){e.checkEXp()},this.expireTime)},e.prototype.getSessionId=function(){var e=this.storage.getItem(this.sessionKey);return!this.disableSession&&e&&e.sessionId?e.sessionId:""},e.prototype.resetExpTime=function(){var e=this;this.sessionExp&&(clearInterval(this.sessionExp),this.sessionExp=setInterval(function(){e.checkEXp()},this.expireTime))},e.prototype.resetSessionId=function(){var e={sessionId:z(),timestamp:Date.now()};this.storage.setItem(this.sessionKey,e)},e.prototype.checkEXp=function(){var e=this.storage.getItem(this.sessionKey);e&&e.sessionId&&Date.now()-e.timestamp+30>=this.expireTime&&(e={sessionId:z(),timestamp:Date.now()},this.storage.setItem(this.sessionKey,e))},e}(),N={autotrack:{src:{cn:"https://lf3-cdn-tos.bytescm.com/obj/static/log-sdk/collect/5.0/plugin/autotrack.js",sg:"https://sf16-scmcdn-sg.ibytedtos.com/obj/static-sg/log-sdk/collect/5.0/plugin/autotrack.js",va:"https://sf16-scmcdn-va.ibytedtos.com/obj/static-us/log-sdk/collect/5.0/plugin/autotrack.js"},object:"LogAutoTrack"},ab:{src:{cn:"https://lf3-cdn-tos.bytescm.com/obj/static/log-sdk/collect/5.0/plugin/ab.js",sg:"https://sf16-scmcdn-sg.ibytedtos.com/obj/static-sg/log-sdk/collect/5.0/plugin/ab.js",va:"https://sf16-scmcdn-va.ibytedtos.com/obj/static-us/log-sdk/collect/5.0/plugin/ab.js"},object:"LogAb"},stay:{src:{cn:"https://lf3-cdn-tos.bytescm.com/obj/static/log-sdk/collect/5.0/plugin/stay.js",sg:"https://sf16-scmcdn-sg.ibytedtos.com/obj/static-sg/log-sdk/collect/5.0/plugin/stay.js",va:"https://sf16-scmcdn-va.ibytedtos.com/obj/static-us/log-sdk/collect/5.0/plugin/stay.js"},object:"LogStay"},route:{src:{cn:"https://lf3-cdn-tos.bytescm.com/obj/static/log-sdk/collect/5.0/plugin/route.js",sg:"https://sf16-scmcdn-sg.ibytedtos.com/obj/static-sg/log-sdk/collect/5.0/plugin/route.js",va:"https://sf16-scmcdn-va.ibytedtos.com/obj/static-us/log-sdk/collect/5.0/plugin/route.js"},object:"LogRoute"},cep:{src:{cn:"https://lf3-cdn-tos.bytescm.com/obj/static/log-sdk/collect/5.0/plugin/cep.js",sg:"https://sf16-scmcdn-sg.ibytedtos.com/obj/static-sg/log-sdk/collect/5.0/plugin/cep.js",va:"https://sf16-scmcdn-va.ibytedtos.com/obj/static-us/log-sdk/collect/5.0/plugin/cep.js"},object:"LogCep"},tracer:{src:{cn:"https://lf3-cdn-tos.bytescm.com/obj/static/log-sdk/collect/5.0/plugin/tracer.js",sg:"https://sf16-scmcdn-sg.ibytedtos.com/obj/static-sg/log-sdk/collect/5.0/plugin/tracer.js",va:"https://sf16-scmcdn-va.ibytedtos.com/obj/static-us/log-sdk/collect/5.0/plugin/tracer.js"},object:"LogTracer"}},t=function(){function e(e){this.disableAutoPageView=!1,this.bridgeReport=!1,this.staging=!1,this.pluginInstances=[],this.sended=!1,this.started=!1,this.destroyInstance=!1,this.sdkReady=!1,this.adapters={},this.name=e,this.hook=new p,this.logger=new C(e),this.remotePlugin=new Map,this.Types=T,this.adapters.fetch=I,this.adapters.storage=v}return e.usePlugin=function(t,r,n){if(r){for(var i=!1,o=0,s=e.plugins.length;o<s;o++)if(e.plugins[o].name===r){e.plugins[o].plugin=t,e.plugins[o].options=n||{},i=!0;break}i||e.plugins.push({name:r,plugin:t,options:n})}else e.plugins.push({plugin:t})},e.prototype.usePlugin=function(e,t,r){e&&(t?"string"==typeof t?this.remotePlugin.get(e)||this.remotePlugin.set(e,{src:t,call:r}):this.remotePlugin.get(e)||this.remotePlugin.set(e,{instance:t}):this.remotePlugin.get(e)||this.remotePlugin.set(e,"sdk"))},e.prototype.init=function(t){var r,n=this;this.inited||t&&a(t)&&t.app_id&&"number"==typeof(r=t.app_id)&&!isNaN(r)&&(t.app_key&&"string"!=typeof t.app_key||(t.channel_domain||-1!==["cn","sg","va"].indexOf(t.channel)||(t.channel="cn"),this.appBridge=new j(t.Native),this.bridgeReport=this.appBridge.bridgeInject(),this.configManager=new O(t),this.initConfig=t,this.bridgeReport||(this.configManager.set({app_id:t.app_id}),this.eventManager=new U,this.tokenManager=new F,this.sessionManager=new L,Promise.all([new Promise(function(e){n.once(T.TokenComplete,function(){e(!0)})}),new Promise(function(e){n.once(T.Start,function(){e(!0)})})]).then(function(){try{e.plugins.reduce(function(e,t){var r=t.plugin,t=t.options,t=Object.assign(n.initConfig,t),r=new r;return r.apply(n,t),e.push(r),e},n.pluginInstances)}catch(e){}n.sdkReady=!0,n.emit(T.Ready);try{(window.opener||window.parent).postMessage("[tea-sdk]ready","*")}catch(e){}t.disable_auto_pv||n.pageView(),n.on(T.TokenChange,function(e){"webid"===e&&n.pageView()}),n.on(T.TokenReset,function(){}),n.on(T.RouteChange,function(e){e.init||t.disable_route_report||n.pageView()})}),this.tokenManager.apply(this,t),this.eventManager.apply(this,t),this.sessionManager.apply(this,t),this.emit(T.Init)),this.inited=!0))},e.prototype.config=function(e){var t,r;this.inited?e&&a(e)?this.bridgeReport?this.appBridge.setConfig(e):(e._staging_flag&&1===e._staging_flag&&(this.staging=!0),e.disable_auto_pv&&(this.disableAutoPageView=!0,delete e.disable_auto_pv),t=o({},e),this.initConfig&&this.initConfig.configPersist&&((r=this.configManager.getStore())&&(t=Object.assign(r,e)),this.configManager.setStore(e)),t.web_id,t.user_unique_id,r=function(e,t){var r={};for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,i=Object.getOwnPropertySymbols(e);n<i.length;n++)0>t.indexOf(i[n])&&(r[i[n]]=e[i[n]]);return r}(t,["web_id","user_unique_id"]),t.hasOwnProperty("web_id")&&this.emit(T.ConfigWebId,t.web_id),t.hasOwnProperty("user_unique_id")&&this.emit(T.ConfigUuid,t.user_unique_id),this.configManager.set(r)):this.logger.warn("config params is error, please check"):this.logger.warn("config must be use after function init")},e.prototype.setDomain=function(e){this.configManager&&this.configManager.setDomain(e),this.emit(T.ConfigDomain)},e.prototype.getConfig=function(e){return this.configManager.get(e)},e.prototype.send=function(){this.start()},e.prototype.start=function(){this.inited&&!this.sended&&(this.sended=!0,this.emit(T.Start))},e.prototype.event=function(e,t){var r=this;try{if(this.initConfig&&this.initConfig.disable_track_event)return;var n=[];Array.isArray(e)?e.forEach(function(e){n.push(r.processEvent(e[0],e[1]||{}))}):n.push(this.processEvent(e,t)),this.bridgeReport?n.forEach(function(e){var t=e.event,e=e.params;r.appBridge.onEventV3(t,JSON.stringify(e))}):n.length&&(this.emit(T.Event,n),this.emit(T.SessionResetTime))}catch(e){}},e.prototype.beconEvent=function(e,t){var r;this.initConfig&&this.initConfig.disable_track_event||Array.isArray(e)||((r=[]).push(this.processEvent(e,t||{})),r.length&&(this.emit(T.BeconEvent,r),this.emit(T.SessionResetTime)))},e.prototype.processEvent=function(e,t){void 0===t&&(t={});try{var r=e,n=(/^event\./.test(e)&&(r=e.slice(6)),t),i=void((n="object"!=typeof n?{}:n).profile?delete n.profile:n.event_index=h+=1);return n.local_ms?(i=n.local_ms,delete n.local_ms):i=+new Date,{event:r,params:n,local_time_ms:i,is_bav:this.initConfig&&this.initConfig.autotrack?1:0}}catch(r){return{event:e,params:t}}},e.prototype.filterEvent=function(e){this.eventFilter=e},e.prototype.on=function(e,t){this.hook.on(e,t)},e.prototype.once=function(e,t){this.hook.once(e,t)},e.prototype.off=function(e,t){this.hook.off(e,t)},e.prototype.emit=function(e,t,r){this.hook.emit(e,t,r)},e.prototype.set=function(e){this.hook.set(e)},e.prototype.pageView=function(){this.disableAutoPageView||this.predefinePageView()},e.prototype.predefinePageView=function(e){void 0===e&&(e={});var t={title:document.title||location.pathname,url:location.href,url_path:location.pathname,time:Date.now(),referrer:window.document.referrer,$is_first_time:""+this.configManager.is_first_time},t=o({},t,e);this.event("predefine_pageview",t)},e.prototype.clearEventCache=function(){this.emit(T.CleanEvents)},e.prototype.setWebIDviaUnionID=function(e){var t;e&&(t=l(e),this.config({web_id:""+t,wechat_unionid:e}),this.emit(T.CustomWebId))},e.prototype.setWebIDviaOpenID=function(e){var t;e&&(t=l(e),this.config({web_id:""+t,wechat_openid:e}),this.emit(T.CustomWebId))},e.prototype.resetStayDuration=function(e,t,r){this.emit(T.ResetStay,{url_path:e=void 0===e?"":e,title:t=void 0===t?"":t,url:r=void 0===r?"":r},T.Stay)},e.prototype.resetStayParams=function(e,t,r){this.emit(T.SetStay,{url_path:e=void 0===e?"":e,title:t=void 0===t?"":t,url:r=void 0===r?"":r},T.Stay)},e.prototype.getToken=function(e,t){function r(t){var r;!s&&(s=!0,r=i.configManager.get().user,t&&(r.tobid=t,r["diss".split("").reverse().join("")]=t),e(o({},r)))}function n(){i.tokenManager.getTobId().then(function(e){r(e)})}var i=this,s=!1;this.sdkReady?n():(t&&setTimeout(function(){r()},t),this.on(T.Ready,function(){n()}))},e.prototype.profileSet=function(e){this.bridgeReport?this.appBridge.profileSet(JSON.stringify(e)):this.emit(T.ProfileSet,e,T.Profile)},e.prototype.profileSetOnce=function(e){this.bridgeReport?this.appBridge.profileSetOnce(JSON.stringify(e)):this.emit(T.ProfileSetOnce,e,T.Profile)},e.prototype.profileIncrement=function(e){this.bridgeReport?this.appBridge.profileIncrement(JSON.stringify(e)):this.emit(T.ProfileIncrement,e,T.Profile)},e.prototype.profileUnset=function(e){this.bridgeReport?this.appBridge.profileUnset(e):this.emit(T.ProfileUnset,e,T.Profile)},e.prototype.profileAppend=function(e){this.bridgeReport?this.appBridge.profileAppend(JSON.stringify(e)):this.emit(T.ProfileAppend,e,T.Profile)},e.prototype.setExternalAbVersion=function(e){this.emit(T.AbExternalVersion,"string"==typeof e&&e?(""+e).trim():null,T.Ab)},e.prototype.getVar=function(e,t,r){this.emit(T.AbVar,{name:e,defaultValue:t,callback:r},T.Ab)},e.prototype.getABconfig=function(e,t){this.emit(T.AbConfig,{param:e,callback:t},T.Ab)},e.prototype.getAbSdkVersion=function(){return this.configManager.getAbVersion()},e.prototype.onAbSdkVersionChange=function(e){var t=this;return this.emit(T.AbVersionChangeOn,e,T.Ab),function(){t.emit(T.AbVersionChangeOff,e,T.Ab)}},e.prototype.offAbSdkVersionChange=function(e){this.emit(T.AbVersionChangeOff,e,T.Ab)},e.prototype.openOverlayer=function(){this.emit(T.AbOpenLayer,"",T.Ab)},e.prototype.closeOverlayer=function(){this.emit(T.AbCloseLayer,"",T.Ab)},e.prototype.getAllVars=function(e){this.emit(T.AbAllVars,e,T.Ab)},e.prototype.autoInitializationRangers=function(e){var t=e.app_id,r=e.channel,n=e.onTokenReady,e=_[r]+"/webid",i=new v(!1),o="__tea_cache_tokens_"+t;(r=i.getItem(o))&&r.web_id?n(r.web_id):D(e,{app_key:"",app_id:t,url:location.href,user_agent:window.navigator.userAgent,referer:document.referrer},3e3,!1,function(e){e&&0===e.e?(n(e.web_id),e={web_id:e.web_id,user_unique_id:e.web_id,timestamp:Date.now()},i.setItem(o,e)):n("")},function(){n("")},!0)},e.prototype.destoryInstace=function(){this.destroyInstance||(this.destroyInstance=!0,this.off(T.TokenComplete))},e.plugins=[],e}(),H=function(){function e(){}return e.prototype.apply=function(e,t){var r=this,n=e.adapters.fetch;t.event_verify_url&&"string"==typeof t.event_verify_url&&(this.url=t.event_verify_url+"/v1/list_test",this.url&&(t=e.Types,e.on(t.SubmitBefore,function(e){n(r.url,e,3e4)})))},e}(),q=function(){function e(){}return e.prototype.apply=function(e,t){var r=this,t=(this.collect=e,this.config=t,this.duration=6e4,this.reportUrl=e.configManager.getDomain()+"/profile/list",e.Types),e=e.adapters.fetch;this.fetch=e,this.cache={},this.collect.on(t.ProfileSet,function(e){r.setProfile(e)}),this.collect.on(t.ProfileSetOnce,function(e){r.setOnceProfile(e)}),this.collect.on(t.ProfileUnset,function(e){r.unsetProfile(e)}),this.collect.on(t.ProfileIncrement,function(e){r.incrementProfile(e)}),this.collect.on(t.ProfileAppend,function(e){r.appendProfile(e)}),this.collect.on(t.ProfileClear,function(){r.cache={}}),this.ready(t.Profile)},e.prototype.ready=function(e){var t=this;if(this.collect.set(e),this.collect.hook._hooksCache.hasOwnProperty(e)){var r=this.collect.hook._hooksCache[e];if(Object.keys(r).length)for(var n in r)!function(e){r[e].length&&r[e].forEach(function(r){t.collect.hook.emit(e,r)})}(n)}},e.prototype.report=function(e,t){void 0===t&&(t={});try{if(this.config.disable_track_event)return;var r=[],n=(r.push(this.collect.processEvent(e,t)),this.collect.eventManager.merge(r));this.fetch(this.reportUrl,n)}catch(e){}},e.prototype.setProfile=function(e){(e=this.formatParams(e))&&Object.keys(e).length&&(this.pushCache(e),this.report("__profile_set",o({},e,{profile:!0})))},e.prototype.setOnceProfile=function(e){(e=this.formatParams(e,!0))&&Object.keys(e).length&&(this.pushCache(e),this.report("__profile_set_once",o({},e,{profile:!0})))},e.prototype.incrementProfile=function(e){e&&this.report("__profile_increment",o({},e,{profile:!0}))},e.prototype.unsetProfile=function(e){var t;e&&((t={})[e]="1",this.report("__profile_unset",o({},t,{profile:!0})))},e.prototype.appendProfile=function(e){if(e){var t,r={};for(t in e)("string"==typeof e[t]||"Array"===Object.prototype.toString.call(e[t]).slice(8,-1))&&(r[t]=e[t]);Object.keys(r).length&&this.report("__profile_append",o({},r,{profile:!0}))}},e.prototype.pushCache=function(e){var t=this;Object.keys(e).forEach(function(r){t.cache[r]={val:t.clone(e[r]),timestamp:Date.now()}})},e.prototype.formatParams=function(e,t){var r=this;void 0===t&&(t=!1);try{if(!e||"[object Object]"!==Object.prototype.toString.call(e))return;var n,i={};for(n in e)("string"==typeof e[n]||"number"==typeof e[n]||"Array"===Object.prototype.toString.call(e[n]).slice(8,-1))&&(i[n]=e[n]);var o=Object.keys(i);if(!o.length)return;var s=Date.now();return o.filter(function(n){var i=r.cache[n];return t?!i:!(i&&r.compare(i.val,e[n])&&s-i.timestamp<r.duration)}).reduce(function(e,t){return e[t]=i[t],e},{})}catch(e){}},e.prototype.compare=function(e,t){try{return JSON.stringify(e)===JSON.stringify(t)}catch(e){return!1}},e.prototype.clone=function(e){try{return JSON.parse(JSON.stringify(e))}catch(t){return e}},e.prototype.unReady=function(){},e}(),K=function(){function e(){var e=this;this.setInterval=function(){var t,r,n,i;e.clearIntervalFunc=(t=function(){e.isSessionhasEvent&&e.endCurrentSession()},r=e.sessionInterval,void 0===t&&(t=function(){}),void 0===r&&(r=1e3),n=Date.now()+r,i=window.setTimeout(function e(){var o=Date.now()-n;t(),n+=r,i=window.setTimeout(e,Math.max(0,r-o))},r),function(){window.clearTimeout(i)})},this.clearInterval=function(){e.clearIntervalFunc&&e.clearIntervalFunc()}}return e.prototype.apply=function(e,t){var r=this;this.collect=e,t.disable_heartbeat||(this.sessionInterval=6e4,this.startTime=0,this.lastTime=0,this.setInterval(),e=this.collect.Types,this.collect.on(e.SessionReset,function(){r.process()}))},e.prototype.endCurrentSession=function(){this.collect.event("_be_active",{start_time:this.startTime,end_time:this.lastTime,url:window.location.href,referrer:window.document.referrer,title:document.title||location.pathname}),this.isSessionhasEvent=!1,this.startTime=0},e.prototype.process=function(){this.isSessionhasEvent||(this.isSessionhasEvent=!0,this.startTime=+new Date);var e=this.lastTime||+new Date;this.lastTime=+new Date,this.lastTime-e>this.sessionInterval&&(this.clearInterval(),this.endCurrentSession(),this.setInterval())},e}(),W=function(){function e(){}return e.prototype.apply=function(e,t){var r,n=this;this.collect=e,this.config=t,this.config.channel_domain||(r=e.adapters.fetch,this.fetch=r,t.disable_track_event||t.disable_sdk_monitor||(this.url=e.configManager.getUrl("event"),r=this.collect.Types,this.collect.on(r.Ready,function(){n.sdkOnload()}),this.collect.on(r.SubmitError,function(e){var t=e.eventData,e=e.errorCode;n.sdkError(t,e)})))},e.prototype.sdkOnload=function(){var e=this;try{var t=this.collect.configManager.get(),r=t.header,n=t.user,i=r.app_id,o=r.app_name,s=r.sdk_version,a=n.web_id,c={events:[{event:"onload",params:JSON.stringify({app_id:i,app_name:o||"",sdk_version:s,sdk_type:"npm",sdk_config:this.config,sdk_desc:"TOC"}),local_time_ms:Date.now()}],user:{user_unique_id:a},header:{}};setTimeout(function(){e.fetch(e.url,[c],3e4,!1,function(){},function(){},"566f58151b0ed37e")},16)}catch(e){}},e.prototype.sdkError=function(e,t){var r=this;try{var n=e[0],i=n.user,o=n.header,s=[],a=(e.forEach(function(e){e.events.forEach(function(e){s.push(e)})}),{events:s.map(function(e){return{event:"on_error",params:JSON.stringify({error_code:t,app_id:o.app_id,app_name:o.app_name||"",error_event:e.event,sdk_version:o.sdk_version,local_time_ms:e.local_time_ms,tea_event_index:Date.now(),params:e.params,header:JSON.stringify(o),user:JSON.stringify(i)}),local_time_ms:Date.now()}}),user:{user_unique_id:i.user_unique_id},header:{}});setTimeout(function(){r.fetch(r.url,[a],3e4,!1,function(){},function(){},"566f58151b0ed37e")},16)}catch(e){}},e}(),V=function(){function e(){this.verifyReady=!1,this.waitTime=5e3,this.cleanStatus=!1}return e.prototype.apply=function(e,t){var r=this,t=(this.collector=e,this.config=t,e.adapters.storage);this.cacheStorgae=new t(!1,"session"),this.eventStorage=[],this.collector.on("submit-verify",function(e){e&&e.length&&r.eventStore(e[0])}),this.checkCache()},e.prototype.checkCache=function(){var e=this,t=(this.verifyCookieKey="__applog_verify_set_"+this.config.app_id,this.cacheStorgae.getCookie(this.verifyCookieKey),this.cacheStorgae.getItem(this.verifyCookieKey)),r=(this.sign=t&&t.sign||"",this.origin=t&&t.origin||"*",setTimeout(function(){e.cleanVerify(),clearTimeout(r),e.collector.off("submit-verify")},this.waitTime));window.addEventListener("message",function(t){t&&t.data&&"simulator:verify"===t.data.type&&(clearTimeout(r),e.receMessage(t))},!0)},e.prototype.receMessage=function(e){var t;this.cleanStatus||(t=e.data,this.verifyReady=!0,this.sign=t.sign,this.origin=e.origin,this.cacheStorgae.setItem(this.verifyCookieKey,JSON.stringify({sign:t.sign,origin:e.origin})),this.eventStorage.length&&this.postVerify(this.eventStorage,t.sign,e.origin))},e.prototype.eventStore=function(e){this.cleanStatus||(this.verifyReady?this.postVerify(e,this.sign,this.origin):this.eventStorage.push(e))},e.prototype.cleanVerify=function(){this.cleanStatus=!0,this.eventStorage=[]},e.prototype.postVerify=function(e,t,r){try{var n=[],i=(Array.isArray(e)?e.forEach(function(e){n.push(e)}):n.push(e),{type:"simulator:verify:event",sign:t,pageUrl:window.location.href,events:n});(window.opener||window.parent).postMessage(i,r)}catch(e){}},e}(),J="undefined"!=typeof window?(window.LogPluginObject||(window.LogPluginObject={}),window.LogPluginObject):null,X=function(){function e(){}return e.prototype.apply=function(e,t){this._plugin={},this.config=t,this.collect=e,this.channel=t.channel||"cn",this.loadExtend()},e.prototype.loadExtend=function(){var e=this;try{this.collect.remotePlugin.forEach(function(t,r){var n,i;"sdk"===t?N.hasOwnProperty(r)&&(n=N[r].object,i=N[r].src[e.channel]+"?query="+Date.now(),e.exist(r,n,i)):"object"==typeof t&&(t.src?e.exist(r,t.call,t.src):e.process(r,t.instance,"INSTANCE"))})}catch(e){}},e.prototype.exist=function(e,t,r){var n=this;J[t]?this.process(e,J[t]):this.loadPlugin(e,r,function(){n.process(e,J[t])},function(){})},e.prototype.process=function(e,t,r){try{var n;r?(n=new t).apply&&n.apply(this.collect,this.config):t&&t(this.collect,this.config)}catch(e){}},e.prototype.loadPlugin=function(e,t,r,n){var i=this;try{var o=document.createElement("script");o.src=t,this._plugin[e]||(this._plugin[e]=[]),this._plugin[e].push(r),o.onerror=function(){n(t)},o.onload=function(){i._plugin[e].forEach(function(e){e()})},document.getElementsByTagName("head")[0].appendChild(o)}catch(e){}},e}(),X=(t.usePlugin(X,"extend"),t.usePlugin(V,"verify"),t.usePlugin(H,"et"),t.usePlugin(q,"profile"),t.usePlugin(K,"heartbeat"),t.usePlugin(W,"monitor"),new t("default")),G=X,Q={browserError:1e3,crc32:1e3,preUpload:1001,initUploadID:1002,process:1003,fileMerge:1004,complete:1005},Z="video",Y="image",$="object",ee={video:"video_upload",image:"image_upload",object:"object_upload"},et="imagex",er={cn:"cn-north-1",us:"us-east-1",sg:"ap-singapore-1","cn-north-1":"cn-north-1","us-east-1":"us-east-1","ap-singapore-1":"ap-singapore-1",boe:"boe",boei18n:"boei18n","US-TTP":"US-TTP"},en={"cn-north-1":"https://vod.bytedanceapi.com","us-east-1":"https://vod.us-east-1.bytedanceapi.com","ap-singapore-1":"https://vod.ap-singapore-1.bytedanceapi.com"},ei={"cn-north-1":"https://open.bytedanceapi.com","us-east-1":"https://open.us-east-1.bytedanceapi.com","ap-singapore-1":"https://open.ap-singapore-1.bytedanceapi.com"},eo={"cn-north-1":"https://imagex.bytedanceapi.com","us-east-1":"https://imagex.us-east-1.bytedanceapi.com","ap-singapore-1":"https://imagex.ap-singapore-1.bytedanceapi.com"},es={"cn-north-1":"https://open.bytedanceapi.com","us-east-1":"https://imagex-us-east-1.bytevcloudapi.com","ap-singapore-1":"https://imagex-ap-singapore-1.bytevcloudapi.com"};function ea(){return(ea=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r,n=arguments[t];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ec(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var eu=function(){var e,t,r;function n(e,t){switch(!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),this.options=e,this.context=t,this.teaLog=G,this.tea_app_id=2562,this.tea_channel="cn",this.options.region){case"us":case"us-east-1":case"gcp":case"US-TTP":this.tea_app_id=2643,this.tea_channel="va";break;case"sg":case"ap-singapore-1":this.tea_app_id=2643,this.tea_channel="sg";break;default:this.tea_app_id=2562,this.tea_channel="cn"}this.teaLog.init({app_id:this.tea_app_id,channel:this.tea_channel,log:!1,disable_sdk_monitor:!0,disable_auto_pv:!0}),this.teaLog.config({evtParams:{sdk_version:"1.1.10",line_app_id:this.options.appId},user_unique_id:this.options.userId}),this.teaLog.start()}return e=n,t=[{key:"send",value:function(e){var t=this.context,r=e.key,t=t.tasks[r],n=Q[e.stage]||999,t=e.fileType||t.fileType,i=e.fileSize||0,o={log_type:ee[t],stage:n,fk:r,fs:i,req:e.req,res:e.res,ts:Math.round(Date.now()/1e3),sst:e.stageStartTime,set:e.stageEndTime,dur:e.duration,tdur:e.totalDuration,durs:e.duration/1e3,tdurs:e.totalDuration/1e3},r=e.type,r="error"===r||"retry"===r?r:n,s="".concat("image"===t?"image":"video","_")+r;switch(n){case 1e3:this.teaLog.event(s,ea({},o,{type:e.type,errc:e.extra&&e.extra.errorCode,ex:JSON.stringify({errc:e.extra&&e.extra.errorCode,msg:e.extra&&e.extra.message,crc32Array:e.crc32Array,isDirect:e.isDirect})}));break;case 1001:this.teaLog.event(s,ea({},o,{type:e.type,oid:e.oid,upload_host:e.tosDomain,errc:e.extra&&e.extra.errorCode,ex:JSON.stringify({errc:e.extra&&e.extra.errorCode,err:e.extra&&e.extra.error,msg:e.extra&&e.extra.message,sig:e.signature,stk:e.proxyStsToken})}));break;case 1002:this.teaLog.event(s,ea({},o,{type:e.type,oid:e.oid,upload_host:e.tosDomain,errc:e.extra&&e.extra.errorCode,ex:JSON.stringify({errc:e.extra&&e.extra.errorCode,msg:e.extra&&e.extra.message,upid:e.uploadID})}));break;case 1003:e.isAllFinish||e.isDirect||(delete o.sst,delete o.set,delete o.dur),this.teaLog.event(s,ea({},o,{type:e.type,oid:e.oid,errc:e.extra&&e.extra.errorCode,upload_host:e.tosDomain,af:e.isAllFinish,cst:e.crc32StartTime,cet:e.crc32EndTime,cdur:e.crc32Duration,slst:e.sliceStartTime,slet:e.sliceEndTime,sldurs:e.sliceDuration&&e.sliceDuration/1e3,ex:JSON.stringify({errc:e.extra&&e.extra.errorCode,msg:e.extra&&e.extra.message,si:e.sliceIndex,af:e.isAllFinish})}));break;case 1004:default:this.teaLog.event(s,ea({},o,{type:e.type,oid:e.oid,upload_host:e.tosDomain,errc:e.extra&&e.extra.errorCode,ex:JSON.stringify({errc:e.extra&&e.extra.errorCode,msg:e.extra&&e.extra.message})}));break;case 1005:this.teaLog.event(s,ea({},o,{type:e.type,oid:e.oid,upload_host:e.tosDomain,errc:e.extra&&e.extra.errorCode,speed:Math.round(i/(e.totalDuration/1e3)/1024),ex:JSON.stringify({errc:e.extra&&e.extra.errorCode,err:e.extra&&e.extra.error,msg:e.extra&&e.extra.message,vid:e.uploadResult&&e.uploadResult.Vid})}))}}},{key:"console",value:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e){this.options.debug})}],ec(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),n}(),V=r(5),el=r.n(V),H=r(4),ef=r.n(H),eh={urlTemplate:function(e,t){var r;return Object.keys(t=t||{}).forEach(function(n){r=RegExp("{".concat(n,"}"),"g"),e=e.replace(r,t[n])}),e},toQueryString:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).map(function(t){return"".concat(t,"=").concat(encodeURIComponent(e[t]))}).join("&")},supportChunked:function(){var e=window.Blob||window.WebKitBlob;try{var t=e.prototype;return!(!FormData||!(t.slice||t.webkitSlice||t.mozSlice))}catch(e){return!1}},supportXhr:function(){return!!window.FormData||window.ProgressEvent&&window.FileReader},supportCrc32:function(){var e=window.FileReader&&window.FileReader.prototype.readAsBinaryString;return"undefined"!=typeof Int32Array&&e&&(blob.slice||blob.webkitSlice||blob.mozSlice)},storage:function(e){var t=e,e={removeItem:function(e){delete t.cache[e]},setItem:function(e,r){t.cache[e]=r},getItem:function(e){return t.cache[e]},clear:function(){delete t.cache,t.cache={}}};try{if(window.localStorage)return window.localStorage.setItem("",""),window.localStorage}catch(e){}return e},noop:function(){},getUnique:function(e){return"".concat(e,"_").concat((new Date).getTime(),"_").concat(parseInt(1e6*Math.random()))},getFileSliceLength:function(e,t){var r=e.size;return t&&"function"==typeof t?2097152>t(r)?2097152:t(r)||r:209715200<r?10485760:r<=209715200&&2097152<=r?5242880:e.size},getFileSuffix:function(e){if(e&&"[object String]"===Object.prototype.toString.call(e)){var t=e.lastIndexOf(".");if(0<t&&(e="."+e.substring(t+1)).length<=8)return e}},fileSlice:function(e,t,r){return(e.slice||e.webkitSlice||e.mozSlice).call(e,t,r)},getPathByURL:function(e){return/^(?:(https?\:)\/\/)?(([^:\/?#]*)(?:\:([0-9]+))?)([\/]{0,1}[^?#]*)(\?[^#]*|)(#.*|)$/.exec(e)[5]||"/"},crypto:{hmac:function(e,t){return el()(t,e)},sha256:function(e){return ef()(e)}},date:{iso8601:function(e){return(e=void 0===e?eh.date.getDate():e).toISOString().replace(/\.\d{3}Z$/,"Z")}},Buffer:Uint8Array,generateKey:function(e){for(var t="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=r.length,i=0;i<e;i++)t+=r.charAt(Math.floor(Math.random()*n));return t}},ep={crc32:function(e,t){for(var r=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],n=("undefined"!=typeof Int32Array&&(r=new Int32Array(r)),-1^~~t),i=(e=new Uint8Array(e)).length,o=0;o<i;o++)n=r[255&(n^e[o])]^n>>>8;return(-1^n)>>>0},dec2hex:function(e){if(void 0!==e)return function e(t){return t.length<8?e(t="0".concat(t)):t}(Number(e).toString(16))}};function ed(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var eg=function(){var e,t,r;function n(e,t,r,i){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),this.file=e,this.successProcess=r,this.failProcess=i,this.sliceLength=t,this.retryTime=0,this.fileSize=e.size,this.crc32Array=[]}return e=n,t=[{key:"start",value:function(){this.readFileCrc32(this.file)}},{key:"readFileCrc32",value:function(e){var t=this,r=this.sliceLength,n=e.slice||e.webkitSlice||e.mozSlice,i=new FileReader,o=0,s=0,a=0;(function c(){s<e.size&&(s=Math.min(o+r,e.size),104857600<e.size&&e.size-s<=5242880&&(s=e.size)),i.readAsArrayBuffer(n.call(e,o,s)),i.onload=function(r){r=r.target.result,a=ep.crc32(r,0),t.crc32Array.push({start:o,end:s,crc32:ep.dec2hex(a),buffer:r}),(o=s)<e.size?c():t.success(t.crc32Array)}})()}},{key:"success",value:function(e){this.successProcess(e)}},{key:"fail",value:function(e,t,r,n){3<=this.retryTime?this.failProcess():(this.readFileCrc32(e,t,r,n),this.retryTime++)}}],ed(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),n}(),ey="The format of stsToken is incorrect.";function em(){return(em=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r,n=arguments[t];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ev(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function eb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var e_=function(){var e,t,r;function n(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),this.context=e.context,this.key=e.key,this.isDirect=e.isDirect,this.isImageBatchUpload=e.isImageBatchUpload,this.file=e.file,this.type=(this.isImageBatchUpload?this.file[0]:this.file).type||"",this.sliceLength=eh.getFileSliceLength(this.file,t.getSliceFunc),this.config=t}return e=n,t=[{key:"start",value:function(e,t,r){this.successProcess=t,this.failProcess=r,this._st=Date.now(),this.crc32(this.file,this.sliceLength)}},{key:"crc32",value:function(e,t){var r=this;this.isImageBatchUpload?function(){for(var t=e.length,n=[],i=0;i<t;i++)new eg(e[i],e[i].size,function(e){n.push(e[0]),n.length===t&&r.success(n)},function(e){r.fail(e)}).start()}():e&&e.size&&!(e.size<=0)?this.isDirect?new eg(e,e.size,function(e){r.success(e)},function(e){r.fail({errorCode:1000003,message:"get crc32 error: ".concat(e&&e.message)})}).start():this.sliceFile(e,t,function(e){r.success(e)},function(e){r.fail(e)}):this.fail({errorCode:1000003,message:"There is a problem with the input file or fileSize."})}},{key:"sliceFile",value:function(e,t,r,n){for(var i=[],o=e.size,s=e.slice||e.webkitSlice||e.mozSlice,a=0,c=0,u=0;c<o;)c=Math.min(a+t,o),i.push({start:a,end:c=104857600<o&&o-c<=5242880?o:c,crc32:0}),a=c;try{!function t(a){var c=new FileReader,l=i[a].start,f=i[a].end;c.readAsArrayBuffer(s.call(e,l,f)),c.onload=function(e){e=e.target.result,u=ep.dec2hex(ep.crc32(e,0)),i[a].crc32=u,f===o?r(i):t(i.length-1)},c.onerror=function(e){var t=e.target.error.name,e=e.target.error.message;n({crc32Array:i,errorCode:1000003,message:t+": "+e})}}(0)}catch(e){n({message:e&&e.toString()})}}},{key:"getCrc32Key",value:function(e,t){var r;return(t="[object Array]"===Object.prototype.toString.call(t)?function(e){if(Array.isArray(e))return ev(e)}(r=t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return ev(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(r="Object"===r&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ev(e,t):void 0}}(r)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}():[t]).push(e[0].crc32,e[e.length-1].crc32),t.join("_")}},{key:"success",value:function(e){var t=this.context,r=this.key,n=[],i=[];if(this.isImageBatchUpload)for(var o=0;o<this.file.length;o++)n.push(this.file[o].size),i.push(this.file[o].name);else n=this.file.size,i=this.file.name;var s=this.getCrc32Key(e,n),t=t.tasks[r];t&&this.successProcess(em(t,{key:r,crc32Array:e,crc32Key:s,sdkVersion:"1.1.10",sliceLength:this.sliceLength,extra:{message:"get crc32 success"},stage:"crc32",type:"success",fileSize:n,fileName:i,stageStartTime:this._st,stageEndTime:Date.now(),duration:Date.now()-this._st,totalDuration:Date.now()-this._st,isDirect:this.isDirect,isImageBatchUpload:this.isImageBatchUpload}))}},{key:"fail",value:function(e){var t=this.context,r=this.key,n=e&&e.message?e.message:"get crc32 error",i=e&&e.errorCode,e=e&&e.crc32Array,t=em(t.tasks[r],{crc32Array:e,extra:{message:n,errorCode:i},type:"error",stage:"crc32",stageStartTime:this._st,stageEndTime:Date.now(),duration:Date.now()-this._st,totalDuration:Date.now()-this._st});this.failProcess(t)}}],eb(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),n}();function ew(e){return(ew="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ek(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function eS(e,t){return(eS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ex(e){return(ex=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var eO=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&eS(e,t)}(a,n.a);var e,t,r,i,o,s=(e=a,t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var r=ex(e);return function(e,t){if(t&&("object"===ew(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,t?Reflect.construct(r,arguments,ex(this).constructor):r.apply(this,arguments))});function a(){var e;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,a),(e=s.call(this)).xhr=new XMLHttpRequest,e._data=null,e}return r=a,i=[{key:"_ajax",value:function(e){var t=this,r=this.xhr;r.upload.onprogress=function(e){t.emit("progress",e)},r.onreadystatechange=function(n){4===r.readyState&&(r.upload.onprogress=eh.noop,r.onreadystatechange=eh.noop,r.params=e,t._data&&t._data.url&&(r.currentUrl=t._data.url),200<=r.status&&r.status<300?t.emit("complete",r):400<=r.status&&t.emit("error",r))},r.onerror=function(){r.errText="unknow net error",t.emit("error",r)},r.ontimeout=function(){r.errText="timeout",t.emit("error",r)},r.onabort=function(){r.errText="abort",t.emit("error",r)},r.send(e)}},{key:"send",value:function(e){var t=this;return this._data=e,this.xhr.open(e.method||"POST",e.url||"",!0),e.headers&&Object.keys(e.headers).forEach(function(r){t.xhr.setRequestHeader(r,e.headers[r])}),this.xhr.timeout=e.timeout||0,e.ontimeout&&(this.xhr.ontimeout=e.ontimeout),e.binary?this.sendAsBinary(e):e.custom?"object"===ew(e.custom)?this.sendAsCustom(JSON.stringify(e.custom)):"none"===e.custom?(delete e.custom,this.sendAsCustom()):this.sendAsCustom(e.custom):this.sendAsFormData(e)}},{key:"sendAsBinary",value:function(e){return this.xhr.setRequestHeader("Content-Type","application/octet-stream"),this.xhr.setRequestHeader("Content-Disposition",'attachment; filename="'.concat(encodeURI(e.filename),'"')),this._ajax(e.file)}},{key:"sendAsFormData",value:function(e){t=(t=e.formData?"function"==typeof e.formData?e.formData():e.formData:t)||[];for(var t,r=new FormData,n=0,i=t.length;n<i;n++){var o=r[n];r.append(o.name,o.value)}return e.file&&r.append(e.field,e.file,e.name),this._ajax(r)}},{key:"sendAsCustom",value:function(e){return this._ajax(e)}},{key:"abort",value:function(){this.xhr.onreadystatechange=eh.noop,this.xhr.abort()}},{key:"getResponse",value:function(){return this.xhr.response}},{key:"getText",value:function(){return this.xhr.responseText}},{key:"getJson",value:function(){return JSON.parse(this.xhr.responseText)}}],ek(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),a}(),q=r(1),eC=r.n(q),eT={checkStsToken:function(e){return!e||e.SessionToken&&e.SecretAccessKey&&(e.AccessKeyId||e.AccessKeyID)},checkServiceName:function(e,t){if(e===Z)return"vod";if(e===Y)return et;if(e===$){if(t.objectConfig&&t.objectConfig.spaceName)return"vod";if(t.objectConfig&&t.objectConfig.serviceId)return et;if(t.videoConfig&&t.videoConfig.spaceName)return"vod";if(t.imageConfig&&t.imageConfig.serviceId)return et}return"vod"}};function ej(e){return(ej="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eP(e,t){var r,n=Object.keys(e);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(e),t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)),n}function eI(){return(eI=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r,n=arguments[t];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function eA(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function eD(e,t){return(eD=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function eE(e){return(eE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ez=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&eD(e,t)}(a,n.a);var e,t,r,i,o,s=(e=a,t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var r=eE(e);return function(e,t){if(t&&("object"===ej(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,t?Reflect.construct(r,arguments,eE(this).constructor):r.apply(this,arguments))});function a(e,t){var r;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,a),(r=s.call(this)).options=e,r.config=t,r.uploaderCtx=e.context,r.currFileCtx=e.context.tasks[e.key],r.systemTimeGap=0,r.retryTime=t.retryTaskTime||2,r.hasRetryTime=0,r.isImageBatchUpload=!!r.options.isImageBatchUpload,r.isDirect=r.options.isDirect,r}return r=a,i=[{key:"start",value:function(e,t,r){this.failProcess=r,this.successProcess=t,this._st=Date.now(),t=(r=this.uploaderCtx._getCache(this.currFileCtx.crc32Key))?JSON.parse(r):{},!this.isDirect&&t.oid&&(t.uploadID||t.UploadID)?this.resumeFromCache(t):this.startPreUpload()}},{key:"startPreUpload",value:function(){var e=this,t=er[this.config.region],r=new eO,n=(r.on("complete",function(t){if(t.response)try{var r,n,i,o,s,a,c,u,l,f,h,p,d=JSON.parse(t.response);d.ResponseMetadata.Error?e.fail({xhr:t,errorCode:d.ResponseMetadata.Error.CodeN,error:d.ResponseMetadata.Error.Code,message:d.ResponseMetadata.Error.Message}):(r=eT.checkServiceName(e.options.type,e.config),n=d.Result,o=(i=r===et?n.UploadAddress:n.InnerUploadAddress.UploadNodes[0]).StoreInfos,s=i.UploadHosts,a=i.SessionKey,u=void 0===(c=i.UploadHeader)?{}:c,l=r===et?s[0]:i.UploadHost,f=[],h=[],e.isImageBatchUpload&&1<o.length?o.forEach(function(e){f.push(e.Auth),h.push(e.StoreUri)}):(f=o[0].Auth,h=o[0].StoreUri),p=eI(e.currFileCtx,{key:e.options.key,useBackupDomain:e.uploaderCtx.useBackupDomain,signature:f,type:"success",extra:{message:"prepare upload success"},stage:"preUpload",oid:h,systemTimeGap:e.systemTimeGap,tosDomain:"".concat(e.config.schema,"://").concat(l),xhr:t,UploadHeader:u,SessionKey:a,UploadID:o[0].UploadID,stageStartTime:e._st,stageEndTime:Date.now(),duration:Date.now()-e._st,totalDuration:Date.now()-e._st+e.currFileCtx.totalDuration}),e.successProcess&&e.successProcess(p))}catch(r){e.fail({error:"catch error: ".concat(r.toString()),xhr:t})}else e.fail({error:"request fail: ".concat(t.statusText||t.errText||"UNKNOWN"),xhr:t})}),r.on("error",function(t){var r;e.uploaderCtx.useBackupDomain?(r={error:"request fail: ".concat(t.statusText||t.errText||"UNKNOWN"),xhr:t},t.response&&(t=JSON.parse(t.response)).ResponseMetadata&&t.ResponseMetadata.Error&&(r.errorCode=t.ResponseMetadata.Error.CodeN,r.error=t.ResponseMetadata.Error.Code,r.message=t.ResponseMetadata.Error.Message),e.fail(r)):(e.hasRetryTime<e.retryTime-1?e.hasRetryTime++:e.uploaderCtx.useBackupDomain=!0,e.startPreUpload())}),""),i={},o=this.uploaderCtx.useBackupDomain,s=eT.checkServiceName(this.options.type,this.config),o=(s===et&&(n=this.config.imageHost||(o?es:eo)[t],i={Action:"ApplyImageUpload",Version:"2018-08-01"},this.options.type===Y&&(this.config.imageConfig&&this.config.imageConfig.serviceId?i.ServiceId=this.config.imageConfig.serviceId:i.SpaceName=this.config.videoConfig&&this.config.videoConfig.spaceName),this.options.type===$&&(i.ServiceId=this.config.objectConfig&&this.config.objectConfig.serviceId||this.config.imageConfig&&this.config.imageConfig.serviceId),this.currFileCtx.fileSize&&1<this.currFileCtx.fileSize.length&&(i.UploadNum=this.currFileCtx.fileSize.length),this.options.storeKey&&(a=this.options.storeKey,"[object Array]"===Object.prototype.toString.call(a)?i.StoreKeys=a:"[object String]"===Object.prototype.toString.call(a)&&(i.StoreKeys=[a]))),"vod"===s&&(a=this.config.videoConfig&&this.config.videoConfig.spaceName,this.options.type===$&&this.config.objectConfig&&this.config.objectConfig.spaceName&&(a=this.config.objectConfig.spaceName),n=this.config.videoHost||(o?ei:en)[t],i={Action:"ApplyUploadInner",Version:"2020-11-19",SpaceName:a,FileType:this.options.type,IsInner:1},this.currFileCtx.fileSize&&(i.FileSize=this.currFileCtx.fileSize),this.config.enOID&&(i.EnOID=1),this.config.testHost&&(i.TestHost=this.config.testHost)),this.config.useFileExtension&&this.currFileCtx.fileName&&(this.options.type===$||this.options.type===Y)&&(o=this.currFileCtx.fileName,(a=eh.getFileSuffix(o))&&(i.FileExtension=a)),this.config.accountId&&(i["X-Account-Id"]=this.config.accountId),(this.options.type===Y||this.options.type===$)&&this.config.bizType&&(i.BizType=this.config.bizType,i.AppID=this.config.appId,i.UserID=this.config.userId),this.config.openExperiment&&(i.app_id=this.config.appId,i.user_id=this.config.userId),i.s=Math.random().toString(36).substr(2),this.options.fileSize&&(i.fileSize=this.options.fileSize),this.currFileCtx.proxyStsToken||this.config.stsToken),a=eh.toQueryString(i),c=o.AccessKeyID,u=o.AccessKeyId,l=o.SecretAccessKey,f=o.SessionToken,o=o.CurrentTime,a={method:"GET",url:"".concat(n,"?").concat(a),timeout:this.config.gatewayTimeout||3e4,region:t,params:i,pathname:eh.getPathByURL(n)},t=new eC.a(a,s),i=(this.config.useServerCurrentTime&&6e4<Math.abs(new Date(o)-new Date)&&(this.systemTimeGap=new Date(o)-new Date),this.systemTimeGap?new Date((new Date).getTime()+this.systemTimeGap):new Date);t.addAuthorization({accessKeyId:u||c,secretAccessKey:l,sessionToken:f},i),r.send(a)}},{key:"resumeFromCache",value:function(e){var t=this,r=this.options.key,n=new eO,i=(n.on("complete",function(n){try{var i,o,s,a=JSON.parse(n.response);0===a.success&&0<a.payload.partList.length?(i=t.confirmCache(a.payload.partList),o=e.hasMerge?5:i.isAllFinished?4:3,s=eI(t.currFileCtx,e,{key:r,xhr:n,extra:{message:"prepare upload from cache success"},stage:"preUpload",type:"success",percent:0,cacheTask:o,proxyStsToken:t.options.stsToken,currentTask:1,status:1,isBreak:1,crc32Array:i.crc32Array,stageStartTime:t._st,stageEndTime:Date.now(),duration:Date.now()-t._st,totalDuration:Date.now()-t._st+t.currFileCtx.totalDuration}),t.successProcess&&t.successProcess(s)):t.startPreUpload()}catch(e){t.startPreUpload()}}),n.on("error",function(e){400<=e.status?t.startPreUpload():t.fail({error:"request error",xhr:e})}),this.config.userId);n.send({method:"get",url:eh.urlTemplate(this.config.getUploadListUrl,{tosDomain:e.tosDomain,oid:e.oid,uploadId:e.uploadID||e.UploadID}),headers:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?eP(Object(r),!0).forEach(function(t){var n,i,o;n=e,i=t,o=r[t],i in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eP(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({Authorization:e.signature,"X-Storage-U":encodeURIComponent(i)},e.UploadHeader),timeout:3e4})}},{key:"confirmCache",value:function(e){var t=this.currFileCtx.crc32Array,r={},n=(e.forEach(function(e){void 0===r[e.partNumber-1]&&(r[e.partNumber-1]={tag:!0,crc32:e.crc32})}),!0),e=t.map(function(e,t){return r[t]&&r[t].tag&&r[t].crc32?(e.crc32=r[t].crc32,e.finished=!0,e.loaded=e.end-e.start):n=!1,e});return{isAllFinished:n,crc32Array:e}}},{key:"fail",value:function(e){var t=e.xhr,r=e.errorCode||1001e3,n="prepare upload error: UNKNOWN",n=(t&&(n=0===t.status?"prepare upload error: NETERROR":e.message||"prepare upload error: ".concat(t.status)),eI(this.currFileCtx,{extra:{message:n,error:e.error,errorCode:r},type:"error",stage:"preUpload",xhr:t,stageStartTime:this._st,stageEndTime:Date.now(),duration:Date.now()-this._st,totalDuration:Date.now()-this._st+this.currFileCtx.totalDuration}));this.uploaderCtx._removeTaskCache(this.options.key),this.failProcess(n)}}],eA(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),a}();function eR(e){return(eR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eB(){return(eB=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r,n=arguments[t];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function eM(e,t){var r,n=Object.keys(e);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(e),t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)),n}function eU(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function eF(e,t){return(eF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function eL(e){return(eL=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var eN=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&eF(e,t)}(a,n.a);var e,t,r,i,o,s=(e=a,t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var r=eL(e);return function(e,t){if(t&&("object"===eR(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,t?Reflect.construct(r,arguments,eL(this).constructor):r.apply(this,arguments))});function a(e,t){var r;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,a),(r=s.call(this)).options=e,r.config=t,r.transport=new eO,r.uploaderCtx=e.context,r.currFileCtx=e.context.tasks[e.key],r.eventInit(),r}return r=a,i=[{key:"initUpload",value:function(){var e=this.options.context,t=this.options.key,r={oid:e.tasks[t].oid,tosDomain:e.tasks[t].tosDomain},r=eh.urlTemplate(this.config.initUploadFileUrl,r),n=this.config.userId;this.transport.send({method:"post",url:r,headers:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?eM(Object(r),!0).forEach(function(t){var n,i,o;n=e,i=t,o=r[t],i in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eM(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({Authorization:e.tasks[t].signature,"X-Storage-U":encodeURIComponent(n)},this.currFileCtx.UploadHeader),timeout:3e4})}},{key:"start",value:function(e,t,r){this.successProcess=t,this.failProcess=r,this._st=Date.now(),this.initUpload()}},{key:"eventInit",value:function(){var e=this;this.transport.on("complete",function(t){try{var r,n=JSON.parse(t.response),i=n.payload.uploadID;0===n.success&&i?(r=eB(e.currFileCtx,{UploadID:i,percent:0,type:"success",extra:{message:"init upload id success"},stage:"initUploadID",xhr:t,stageStartTime:e._st,stageEndTime:Date.now(),duration:Date.now()-e._st,totalDuration:Date.now()-e._st+e.currFileCtx.totalDuration}),e.successProcess(r)):e.fail({error:"fail! res.success: ".concat(n.success,", uploadId:").concat(i),xhr:t})}catch(r){e.fail({error:"catch error: ".concat(JSON.stringify(r)),xhr:t})}}),this.transport.on("error",function(t){e.fail({error:"request fail: ".concat(t.statusText||t.errText||"UNKNOWN"),xhr:t})})}},{key:"fail",value:function(e){var t=this.options.context,r=this.options.key,t=eB(t.tasks[r],{extra:{message:"init upload id error, ".concat(e.error),errorCode:1002e3},type:"error",stage:"initUploadID",xhr:e.xhr,stageStartTime:this._st,stageEndTime:Date.now(),duration:Date.now()-this._st,totalDuration:Date.now()-this._st+this.currFileCtx.totalDuration});this.uploaderCtx._removeTaskCache(this.options.key),this.failProcess(t)}}],eU(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),a}();function eH(e){return(eH="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eq(e,t){var r,n=Object.keys(e);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(e),t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)),n}function eK(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?eq(Object(r),!0).forEach(function(t){var n,i,o;n=e,i=t,o=r[t],i in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eq(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function eW(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function eV(e,t){return(eV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function eJ(e){return(eJ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var eX=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&eV(e,t)}(a,n.a);var e,t,r,i,o,s=(e=a,t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var r=eJ(e);return function(e,t){if(t&&("object"===eH(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,t?Reflect.construct(r,arguments,eJ(this).constructor):r.apply(this,arguments))});function a(e){var t,r=e.sliceItem,n=e.crc32,i=e.url,o=e.signature,c=e.uploadHeader,u=e.userId,l=e.retryTime,f=e.timeout,e=e.method,e=void 0===e?"put":e;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,a),(t=s.call(this)).fileSlice=r,t.crc32=n,t.uploadUrl=i,t.uploadHeader=c,t.signature=o,t.userId=u,t.retryTime=l||0,t.method=e,t.retryCount=0,t.timeout=f||18e5,t.ready=!1,t.cancel=!1,t.transport=new eO,t.eventInit(),t}return r=a,i=[{key:"upload",value:function(e,t){this.isParamsValid()&&(this._st=Date.now(),this.transport&&this.transport.send({method:this.method,url:this.uploadUrl,headers:eK({Authorization:this.signature,"Content-CRC32":this.crc32,"X-Storage-U":encodeURIComponent(this.userId)},this.uploadHeader),file:this.fileSlice,binary:1,timeout:this.timeout}),e&&this.emit("retry",t))}},{key:"isParamsValid",value:function(){return this.fileSlice&&(this.fileSlice.size||this.fileSlice.byteLength)?this.crc32?!!this.uploadUrl||(this.emit("error",{message:"slice upload failed: NOURL",crc32:this.crc32,size:this.fileSlice.size||this.fileSlice.byteLength}),!1):(this.emit("error",{message:"slice upload failed: NOCRC32",crc32:this.crc32,size:this.fileSlice.size||this.fileSlice.byteLength}),!1):(this.emit("error",{message:"slice upload failed: NOCONTENT",crc32:this.crc32}),!1)}},{key:"eventInit",value:function(){var e=this;this.transport.on("complete",function(t){e.success(t)}),this.transport.on("error",function(t){e.fail(t)}),this.transport.on("progress",function(t){e.process(t)})}},{key:"success",value:function(e){this.ready=!0;var t=Date.now()-this._st,r=this.fileSlice.size||this.fileSlice.byteLength;this.emit("complete",{crc32:this.crc32,size:r,speed:r/t,xhr:e,sliceStartTime:this._st,sliceEndTime:Date.now(),sliceDuration:Date.now()-this._st})}},{key:"fail",value:function(e){var t=this;if(!this.cancel){var r={crc32:this.crc32,size:this.fileSlice.size||this.fileSlice.byteLength,xhr:e,sliceStartTime:this._st,sliceEndTime:Date.now(),sliceDuration:Date.now()-this._st};if(e&&401===e.status)this.emit("error",eK({message:"slice upload failed: UNAUTHORIZED"},r));else{var n="slice upload failed: UNKNOWN";if(e&&(n=e.status?"slice upload failed: ".concat(e.status):"slice upload failed: NETERROR"),this.retryCount<this.retryTime)return setTimeout(function(){t.upload(!0,eK({message:n},r))},1e3),void this.retryCount++;this.emit("error",eK({message:n},r))}}}},{key:"process",value:function(e){this.cancel||this.emit("progress",{crc32:this.crc32,loaded:e.loaded||0,total:e.total||0})}},{key:"abort",value:function(){this.transport&&(this.cancel=!0,this.transport.abort())}},{key:"destroy",value:function(){this.transport=null}}],eW(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),a}(),K=r(2),eG=r.n(K);function eQ(e){return(eQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eZ(){return(eZ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r,n=arguments[t];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function eY(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function e$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function e1(e,t){return(e1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function e0(e){return(e0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var e2=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&e1(e,t)}(a,n.a);var e,t,r,i,o,s=(e=a,t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var r=e0(e);return function(e,t){if(t&&("object"===eQ(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,t?Reflect.construct(r,arguments,e0(this).constructor):r.apply(this,arguments))});function a(e){var t,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,a),(t=s.call(this)).file=e.file,t.context=e.context,t.key=e.key,t.config=r,t.finishArr=[],t.errorLength=0,t.finishSize=0,t.retryUploadTime=Number(r.retryUploadTime)||2,t.progressMonitorTime=Number(r.progressMonitorTime)||10,t.progressMonitorSpeed=Number(r.progressMonitorSpeed)||50,t.uploadSliceCount=Number(r.uploadSliceCount)||3,t.realtimeSpeedInterval=Number(r.realtimeSpeedInterval)||5,t.processRetry=0,t.lastFinishSize=-1,t.lastProcessPercent=-1,t.lastIntervalSize=-1,t.lastCalculateSpeedTime=-1,t.lastCalculateSpeedSize=0,t.uploadHandlers={},t}return r=a,i=[{key:"start",value:function(e,t,r){this.failProcess=r,this.successProcess=t,this.errorLength=0,this.currentCtx=this.context.tasks[this.key],this.crc32Array=this.context.tasks[this.key].crc32Array,this.uploadSliceCount=this.uploadSliceCount>this.crc32Array.length?this.crc32Array.length:this.uploadSliceCount,this.lastIndex=0,this.uploading=[],this._uploadSize=this.crc32Array.reduce(function(e,t){return e+(t.finished?0:t.end-t.start)},0),this._st=Date.now(),this._lastSaveTime=Date.now(),this.lastCalculateSpeedTime=this._st,this.initWorker(),this.setProgressMonitor(),this.threadUpload()}},{key:"initWorker",value:function(){var e,t=this;this.worker||(e=this.crc32Array,this.worker=new eG.a,this.worker.onmessage=function(r){var n,i,r=(n=r.data,i=4,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o=[],s=!0,a=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==r.return||r.return()}finally{if(a)throw i}}return o}}(n,4)||function(e,t){if(e){if("string"==typeof e)return eY(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(r="Object"===r&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?eY(e,t):void 0}}(n,i)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=r[0],s=r[1],a=r[2],r=r[3],c=(new Date).getTime(),u=e[a];u.crc32=s,u.crc32StartTime=r,u.crc32EndTime=c,u.crc32Duration=c-r,t.upload(u,o,a)})}},{key:"read",value:function(e,t){var r=this,n=this.file,i=n.slice||n.webkitSlice||n.mozSlice,o=new FileReader;o.onload=function(e){var n=(new Date).getTime();r.worker.postMessage([e.target.result,t,n,!!r.config.clientEncrypt,r.currentCtx.clientEncryptKey,r.crc32Array.length-1===t],[e.target.result])},o.onerror=function(){r.stop(),r.fail({extra:{message:"An error occurred reading the file",errorCode:1003003}})},o.readAsArrayBuffer(i.call(n,e.start,e.end))}},{key:"threadUpload",value:function(){if(this.uploading.length<this.uploadSliceCount){var e=this.lastIndex,t=this.crc32Array[e];if(t){if(t.finished){if(-1===this.finishArr.indexOf(t.start)&&(this.finishArr.push(t.start),this.finishArr.length>=this.crc32Array.length))return this.stop(),void this.success()}else t.loaded=0,this.uploading.push(e),this.read(t,e);this.lastIndex++,this.threadUpload()}}}},{key:"stop",value:function(){var e=this;Object.keys(this.uploadHandlers).forEach(function(t){e.uploadHandlers[t].abort(),e.uploadHandlers[t].destroy()}),this.uploadHandlers={},this.worker&&this.worker.terminate(),this.worker=null,this.clearMonitor()}},{key:"setProgressMonitor",value:function(){var e=this;this.progressMonitorInterval=setInterval(function(){var t,r=e.finishSize;r-e.lastIntervalSize<e.progressMonitorTime*e.progressMonitorSpeed*1024?(t=eZ(e.currentCtx,{stage:"process",type:"warn",extra:{message:"percent are not updated in ".concat(e.progressMonitorTime," seconds")}}),e.context.logger.send(t),e.context._broadcast("slowProgress",t),e.clearMonitor()):e.lastIntervalSize=r},1e3*this.progressMonitorTime)}},{key:"clearMonitor",value:function(){this.progressMonitorInterval&&clearInterval(this.progressMonitorInterval)}},{key:"upload",value:function(e,t,r){var n=this,i=e.crc32,o=(this.context._saveTask(this.key,{crc32Array:this.crc32Array}),{number:r+1,uploadId:this.currentCtx.UploadID||this.currentCtx.uploadID,oid:this.currentCtx.oid,tosDomain:this.currentCtx.tosDomain}),o=eh.urlTemplate(this.config.uploadChunkedUrl,o),s=this.config.userId,a=this.config.uploadHttpMethod||"put",c=this.config.uploadTimeout,t=(this.config.clientEncrypt||(t=eh.fileSlice(this.file,e.start,e.end)),new eX({sliceItem:t,crc32:i,url:o,signature:this.currentCtx.signature,uploadHeader:this.currentCtx.UploadHeader,userId:s,method:a,retryTime:this.retryUploadTime,timeout:c}));t.on("complete",function(t){1===n.currentCtx.status&&(t.start=e.start,t.crc32StartTime=e.crc32StartTime,t.crc32EndTime=e.crc32EndTime,t.crc32Duration=e.crc32Duration,t.index=r,n.fileSliceSuccess(t))}),t.on("error",function(t){1===n.currentCtx.status&&(t.start=e.start,t.crc32StartTime=e.crc32StartTime,t.crc32EndTime=e.crc32EndTime,t.crc32Duration=e.crc32Duration,t.index=r,n.fail(t))}),t.on("progress",function(t){1===n.currentCtx.status&&(t.start=e.start,t.index=r,n.process(t))}),t.on("retry",function(t){1===n.currentCtx.status&&(t.start=e.start,t.index=r,n.retry(t))}),t.upload(),this.uploadHandlers[r]=t}},{key:"success",value:function(e){this.finishArr=[];var t=Date.now()-this._st,t=this._uploadSize/t,t=eZ(this.currentCtx,{type:"success",stage:"process",percent:100,extra:{message:"upload all success"},speed:t,xhr:e,stageStartTime:this._st,stageEndTime:Date.now(),duration:Date.now()-this._st,totalDuration:Date.now()-this._lastSaveTime+this.currentCtx.totalDuration,isAllFinish:!0});this.worker&&this.worker.terminate(),this.successProcess(t)}},{key:"fail",value:function(e){var t=this.errorFormat(e);t.type="error",void 0!==e.statusCode&&eZ(this.currentCtx,{statusCode:e.statusCode}),this.errorLength||(this.context.logger.send(eZ({},t)),this.stop(),this.context._broadcast("error",t),this.currentCtx.isBreak?this.context._cancel(this.key):this.context._pause(this.key),this.errorLength++)}},{key:"retry",value:function(e){e=this.errorFormat(e),this.context.logger.send(eZ({},e,{type:"retry"}))}},{key:"fileSliceSuccess",value:function(e){var t,r=e.index,n=Date.now(),i=(-1===this.finishArr.indexOf(e.start)&&this.finishArr.push(e.start),this.crc32Array[r].finished=!0,this.crc32Array[r].speed=e.speed,{message:"slice upload success"});if(e.xhr&&(t=e.xhr,i.currentUrl=t.currentUrl||"",eZ(this.currentCtx,{req:{url:t.currentUrl,param:t.params},res:{status:t.status,body:t.responseText,header:t.getAllResponseHeaders()}}),delete e.xhr),this.context.logger.send(eZ(this.currentCtx,{stage:"process",type:"success",sliceIndex:r,extra:i,totalDuration:n-this._lastSaveTime+this.currentCtx.totalDuration,sliceStartTime:e.sliceStartTime,sliceEndTime:e.sliceEndTime,sliceDuration:e.sliceDuration,crc32StartTime:e.crc32StartTime,crc32EndTime:e.crc32EndTime,crc32Duration:e.crc32Duration})),this._lastSaveTime=n,this.context._saveTask(this.key),this.uploading.splice(this.uploading.indexOf(r),1),this.uploadHandlers[r]&&delete this.uploadHandlers[r],this.finishArr.length>=this.crc32Array.length)return this.stop(),void this.success(e.xhr);this.threadUpload()}},{key:"getFinishSize",value:function(e,t){var r=t.crc32,n=0;return e.forEach(function(e){e.crc32===r?(e.loaded=t.loaded,n+=t.loaded):(e.loaded||(e.loaded=0),n+=e.loaded)}),n}},{key:"process",value:function(e){var t=this.currentCtx.realtimeSpeed||0,r=this.currentCtx.fileSize,n=(this.finishSize=this.getFinishSize(this.crc32Array,e),this.finishSize>this.lastFinishSize&&((e=new Date).getTime()-this.lastCalculateSpeedTime>1e3*this.realtimeSpeedInterval&&(i=e.getTime()-this.lastCalculateSpeedTime,t=Math.floor((n=this.finishSize-this.lastCalculateSpeedSize)/i),this.lastCalculateSpeedTime=e.getTime(),this.lastCalculateSpeedSize=this.finishSize),this.lastFinishSize=this.finishSize),Math.floor(this.finishSize/r*1e4)/100||0),i=eZ(this.currentCtx,{stage:"process",percent:n,realtimeSpeed:t});n>this.lastProcessPercent&&100!==n&&(this.lastProcessPercent=n,this.context._broadcast("progress",i))}},{key:"errorFormat",value:function(e){var t=this.currentCtx.totalDuration,r=Date.now()-this._st,n=e.index,i=e.crc32?{message:e.message,data:e.crc32,size:e.size}:e.extra,i=(i.errorCode=i.errorCode||1003e3,eZ(this.currentCtx,{extra:i,sliceIndex:n,stage:"process",req:{},res:{},totalDuration:r+t,sliceStartTime:e.sliceStartTime,sliceEndTime:e.sliceEndTime,sliceDuration:e.sliceDuration,crc32StartTime:e.crc32StartTime,crc32EndTime:e.crc32EndTime,crc32Duration:e.crc32Duration}));return e.xhr&&(n=e.xhr,i.req={url:e.xhr.currentUrl},i.res={status:n.status,body:n.responseText,header:n.getAllResponseHeaders()},delete e.xhr),i}}],e$(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),a}();function e3(e){return(e3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function e5(){return(e5=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r,n=arguments[t];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function e4(e,t){var r,n=Object.keys(e);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(e),t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)),n}function e6(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function e8(e,t){return(e8=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function e9(e){return(e9=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var e7=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&e8(e,t)}(a,n.a);var e,t,r,i,o,s=(e=a,t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var r=e9(e);return function(e,t){if(t&&("object"===e3(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,t?Reflect.construct(r,arguments,e9(this).constructor):r.apply(this,arguments))});function a(e,t){var r;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,a),(r=s.call(this)).options=e,r.config=t,r.transport=new eO,r.eventInit(),r.errorCount=0,r.uploaderCtx=e.context,r.currFileCtx=e.context.tasks[e.key],r}return r=a,i=[{key:"mergeFile",value:function(){for(var e={oid:this.currFileCtx.oid,uploadId:this.currFileCtx.UploadID||this.currFileCtx.uploadID,tosDomain:this.currFileCtx.tosDomain},t=this.currFileCtx.crc32Array,r="",n=0;n<t.length;n++)r=(r?"".concat(r,","):"").concat(n+1,":").concat(t[n].crc32);var e=eh.urlTemplate(this.config.uploadMergeUrl,e),i=this.config.userId,i=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?e4(Object(r),!0).forEach(function(t){var n,i,o;n=e,i=t,o=r[t],i in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):e4(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({Authorization:this.currFileCtx.signature,"X-Storage-U":encodeURIComponent(i)},this.currFileCtx.UploadHeader);this.config.clientEncrypt&&(i["x-upload-encryption-mode"]=2,i["x-upload-encryption-key"]=btoa(this.currFileCtx.clientEncryptKey)),this.transport.send({method:"post",url:e,headers:i,custom:r})}},{key:"start",value:function(e,t,r){this.successProcess=t,this.failProcess=r,this._st=Date.now(),this.mergeFile()}},{key:"eventInit",value:function(){var e=this,t=this.options.stage;this.transport.on("complete",function(r){try{var n=JSON.parse(r.response);0===n.success&&n.payload.key?(e5(e.currFileCtx,{stage:t,type:"success",hasMerge:!0,extra:{message:"merge file success"},xhr:r,stageStartTime:e._st,stageEndTime:Date.now(),duration:Date.now()-e._st,totalDuration:Date.now()-e._st+e.currFileCtx.totalDuration}),e.successProcess(e.currFileCtx)):e.fail({error:"fail! result.success:".concat(n.success),xhr:r})}catch(t){e.fail({error:"response parse error: ".concat(JSON.stringify(t)),xhr:r})}}),this.transport.on("error",function(t){e.fail({error:"request fail: ".concat(t.statusText||t.errText),xhr:t})})}},{key:"getProcessIndex",value:function(e){var t=0;return e.forEach(function(e,r){"process"===e.stage&&(t=r)}),t}},{key:"fail",value:function(e){e=e5(this.currFileCtx,{extra:{message:"merge file error, ".concat(e.error),errorCode:1004e3},type:"error",stage:this.options.stage,xhr:e.xhr,stageStartTime:this._st,stageEndTime:Date.now(),duration:Date.now()-this._st,totalDuration:Date.now()-this._st+this.currFileCtx.totalDuration}),this.failProcess(e)}}],e6(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),a}();function te(e){return(te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tt(){return(tt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r,n=arguments[t];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function tr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function tn(e,t){return(tn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ti(e){return(ti=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var to=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tn(e,t)}(a,n.a);var e,t,r,i,o,s=(e=a,t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var r=ti(e);return function(e,t){if(t&&("object"===te(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,t?Reflect.construct(r,arguments,ti(this).constructor):r.apply(this,arguments))});function a(e){var t,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,a),(t=s.call(this)).options=e,t.file=e.file,t.context=e.context,t.key=e.key,t.config=r,t.finishArr=[],t.errorLength=0,t.finishSize=0,t.retryUploadTime=0,t.processRetry=0,t.lastFinishSize=-1,t.lastProcessPercent=-1,t.lastIntervalSize=-1,t}return r=a,i=[{key:"start",value:function(e,t,r){this.failProcess=r,this.successProcess=t,this.currentCtx=this.context.tasks[this.key],this.crc32Array=this.context.tasks[this.key].crc32Array,this._uploadSize=this.file.size,this._st=Date.now(),this.upload()}},{key:"stop",value:function(){this.uploader&&(this.uploader.abort(),this.uploader.destroy())}},{key:"upload",value:function(){for(var e=this,t=this.crc32Array.length,r=0,n=0,i=0;i<t;i++){var o=this.crc32Array[i],s=o.buffer,o=o.crc32,a=this.currentCtx.oid,c=this.currentCtx.signature,a={oid:"[object Array]"===Object.prototype.toString.call(a)?a[i]:a,tosDomain:this.currentCtx.tosDomain},a=eh.urlTemplate(this.config.directUploadFileUrl,a),u=this.config.userId,l=this.config.uploadHttpMethod||"put",f=this.config.uploadTimeout,s=new eX({sliceItem:s,crc32:o,url:a,signature:"[object Array]"===Object.prototype.toString.call(c)?c[i]:c,uploadHeader:this.currentCtx.UploadHeader,userId:u,retryTime:this.retryUploadTime,method:l,timeout:f});s.on("complete",function(i){n+ ++r===t&&e.success(i.xhr)}),s.on("error",function(r){++n===t&&e.fail(r.xhr)}),s.on("progress",function(t){e.process(t)}),s.upload(),this.uploader=s}}},{key:"success",value:function(e){this.finishArr=[];var t=Date.now()-this._st,t=this._uploadSize/t,t=tt(this.currentCtx,{type:"success",stage:"process",percent:100,extra:{message:"direct upload success"},speed:t,xhr:e,stageStartTime:this._st,stageEndTime:Date.now(),duration:Date.now()-this._st,totalDuration:Date.now()-this._st+this.currentCtx.totalDuration});this.successProcess(t)}},{key:"fail",value:function(e){e=tt(this.currentCtx,{extra:{message:"direct upload error: ".concat(e.errText),errorCode:1003e3},type:"error",stage:"process",xhr:e,stageStartTime:this._st,stageEndTime:Date.now(),duration:Date.now()-this._st,totalDuration:Date.now()-this._st+this.currentCtx.totalDuration}),this.failProcess(e)}},{key:"process",value:function(e){var t=this.currentCtx.fileSize,e=(this.finishSize=e.loaded,this.finishSize>this.lastFinishSize&&(this.lastFinishSize=this.finishSize),Math.floor(this.finishSize/t*1e4)/100||0),t=tt(this.currentCtx,{stage:"process",percent:e});e>this.lastProcessPercent&&100!==e&&(this.lastProcessPercent=e,this.context._broadcast("progress",t))}}],tr(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),a}();function ts(e){return(ts="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ta(){return(ta=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r,n=arguments[t];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function tc(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function tu(e,t){return(tu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function tl(e){return(tl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var tf=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tu(e,t)}(a,n.a);var e,t,r,i,o,s=(e=a,t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var r=tl(e);return function(e,t){if(t&&("object"===ts(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,t?Reflect.construct(r,arguments,tl(this).constructor):r.apply(this,arguments))});function a(e){var t,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,a),(t=s.call(this)).options=e,t.file=e.file,t.context=e.context,t.key=e.key,t.config=r,t.errorLength=0,t.retryUploadTime=Number(r.retryUploadTime)||2,t.maxUploadSliceCount=Number(r.uploadSliceCount)||5,t.uploadQueue=[],t.crc32Array=[],t.uploadSliceCount=0,t.isCalcCrc32=!1,t.isFileReading=!1,t.hasStarted=!1,t.hasCompleteUpload=!1,t}return r=a,i=[{key:"start",value:function(e,t,r){this.failProcess=r,this.successProcess=t,this.currentCtx=this.context.tasks[this.key],this.hasStarted=!0,this._st=Date.now(),this.initWorker()}},{key:"initWorker",value:function(){var e=this;this.worker||(this.worker=new eG.a,this.worker.onmessage=function(t){e.isCalcCrc32=!1;var r=t.data[0],n=t.data[2],i=t.data[1];e.uploadQueue.forEach(function(t,o){t.index===n&&(e.uploadQueue[o].crc32=i,e.uploadQueue[o].fileSliceBuffer=r,e.crc32Array[n]={crc32:i})}),e.startUploadQueue()},this.startUploadQueue())}},{key:"addStreamSlice",value:function(e){var t=this,r=e.fileSlice,n=e.index,e=(this.isFileReading=!0,new FileReader);e.readAsArrayBuffer(r),e.onload=function(e){t.isFileReading=!1,e=e.target.result,t.uploadQueue.push({fileSliceBuffer:e,index:n}),t.hasStarted&&t.startUploadQueue()}}},{key:"completeStreamUpload",value:function(){this.hasCompleteUpload=!0,0!==this.uploadQueue.length||this.isFileReading||this.success()}},{key:"startUploadQueue",value:function(){var e;this.uploadSliceCount<=this.maxUploadSliceCount&&0<this.uploadQueue.length&&this.uploadQueue[0].crc32?(e=this.uploadQueue.shift(),this.uploadSliceCount++,this.upload({sliceItem:e.fileSliceBuffer,index:e.index,crc32:e.crc32})):0<this.uploadQueue.length&&!this.uploadQueue[0].crc32&&this.startCrc32Queue()}},{key:"startCrc32Queue",value:function(){if(!this.isCalcCrc32)for(var e=0;e<this.uploadQueue.length;e++){var t=this.uploadQueue[e];if(!t.crc32){this.isCalcCrc32=!0,this.worker.postMessage([t.fileSliceBuffer,t.index],[t.fileSliceBuffer]);break}}}},{key:"upload",value:function(e){var t=this,r=e.sliceItem,n=e.index,e=e.crc32,i=this.currentCtx.signature,o={number:n+1,uploadId:this.currentCtx.UploadID||this.currentCtx.uploadID,oid:this.currentCtx.oid,tosDomain:this.currentCtx.tosDomain},o=eh.urlTemplate(this.config.uploadChunkedUrl,o),s=this.config.userId,r=new eX({sliceItem:r,crc32:e,url:o,signature:i,uploadHeader:this.currentCtx.UploadHeader,userId:s,retryTime:this.retryUploadTime,method:"put",timeout:this.config.uploadTimeout});r.on("complete",function(e){1===t.currentCtx.status&&(e.index=n,t.fileSliceSuccess(e))}),r.on("error",function(e){1===t.currentCtx.status&&(e.index=n,t.fail(e))}),r.upload()}},{key:"fileSliceSuccess",value:function(e){var t=e.index,r=Date.now(),n={message:"stream slice upload success"},i=(e.xhr&&(i=e.xhr,n.currentUrl=i.currentUrl||"",ta(this.currentCtx,{req:{url:i.currentUrl,param:i.params},res:{status:i.status,body:i.responseText,header:i.getAllResponseHeaders()}}),delete e.xhr),this.context.logger.send(ta(this.currentCtx,{stage:"process",type:"success",sliceIndex:t,extra:n,totalDuration:r-this._lastSaveTime+this.currentCtx.totalDuration})),ta(this.currentCtx,{uploadQueueLength:this.uploadQueue.length,sliceIndex:t}));this.context._broadcast("stream-progress",i),this.uploadSliceCount--,this.hasCompleteUpload&&0===this.uploadQueue.length?this.success(e.xhr):this.startUploadQueue()}},{key:"success",value:function(e){this.isAllSuccess||(e=ta(this.currentCtx,{type:"success",stage:"process",percent:100,extra:{message:"all slice upload success"},crc32Array:this.crc32Array,xhr:e,stageStartTime:this._st,stageEndTime:Date.now(),duration:Date.now()-this._st,totalDuration:Date.now()-this._st+this.currentCtx.totalDuration}),this.successProcess(e))}},{key:"fail",value:function(e){var t=e.index,e=ta(this.currentCtx,{extra:{message:"stream slice upload error"},type:"error",stage:"process",xhr:e.xhr,stageStartTime:this._st,stageEndTime:Date.now(),duration:Date.now()-this._st,totalDuration:Date.now()-this._st+this.currentCtx.totalDuration,sliceIndex:t});this.context.logger.send(ta({},e)),this.context._broadcast("error",e)}}],tc(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),a}();function th(e){return(th="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tp(){return(tp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r,n=arguments[t];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function td(e,t){var r,n=Object.keys(e);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(e),t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)),n}function tg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?td(Object(r),!0).forEach(function(t){var n,i,o;n=e,i=t,o=r[t],i in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):td(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ty(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function tm(e,t){return(tm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function tv(e){return(tv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var tb=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tm(e,t)}(a,n.a);var e,t,r,i,o,s=(e=a,t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var r=tv(e);return function(e,t){if(t&&("object"===th(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,t?Reflect.construct(r,arguments,tv(this).constructor):r.apply(this,arguments))});function a(e,t){var r;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,a),(r=s.call(this)).options=e,r.config=t,r.uploaderCtx=e.context,r.currFileCtx=e.context.tasks[e.key],r.isImageBatchUpload=!!r.options.isImageBatchUpload,r.transport=new eO,r.eventInit(),r}return r=a,i=[{key:"commitUpload",value:function(){var e,t,r=this.options.key,r=this.options.context.tasks[r],n=er[this.config.region],i="",o={},s=this.uploaderCtx.useBackupDomain,a=eT.checkServiceName(this.options.type,this.config),c=(a===et&&(i=this.config.imageHost||(s?es:eo)[n],o={Action:"CommitImageUpload",Version:"2018-08-01",SessionKey:r.SessionKey},this.options.type===Y&&(this.config.imageConfig&&this.config.imageConfig.serviceId?o.ServiceId=this.config.imageConfig.serviceId:o.SpaceName=this.config.videoConfig&&this.config.videoConfig.spaceName,Array.isArray(c=this.config.imageConfig&&this.config.imageConfig.processAction)&&0<c.length&&((e={SessionKey:r.SessionKey,Functions:[]}).Functions=c,t=JSON.stringify(e)),this.config.skipMeta&&(o.SkipMeta=!0)),this.options.type===$&&(o.ServiceId=this.config.objectConfig&&this.config.objectConfig.serviceId||this.config.imageConfig&&this.config.imageConfig.serviceId)),"vod"===a&&(c=this.config.videoConfig&&this.config.videoConfig.spaceName,this.options.type===$&&this.config.objectConfig&&this.config.objectConfig.spaceName&&(c=this.config.objectConfig.spaceName),i=this.config.videoHost||(s?ei:en)[n],o={Action:"CommitUploadInner",Version:"2020-11-19",SpaceName:c},e={SessionKey:r.SessionKey,Functions:[]},s=this.config.videoConfig&&this.config.videoConfig.processAction,this.options.type===$&&this.config.objectConfig&&this.config.objectConfig.processAction&&(s=this.config.objectConfig.processAction),Array.isArray(s)&&0<s.length&&(e.Functions=s),(this.config.videoConfig&&this.config.videoConfig.callbackArgs||this.options.callbackArgs)&&(e.CallbackArgs=this.options.callbackArgs||this.config.videoConfig.callbackArgs),this.options.type===Z&&this.config.skipDownload&&(o.SkipDownload=!0),t=JSON.stringify(e)),this.config.accountId&&(o["X-Account-Id"]=this.config.accountId),eh.toQueryString(o)),s=this.currFileCtx.proxyStsToken||this.config.stsToken,u=s.AccessKeyID,l=s.AccessKeyId,f=s.SecretAccessKey,s=s.SessionToken,c={method:"POST",url:"".concat(i,"?").concat(c),timeout:this.config.gatewayTimeout||3e4,region:n,params:o,headers:{},pathname:eh.getPathByURL(i)},n=(e?(c.custom=t,c.body=e):(c.custom="none",c.headers["Content-Type"]="application/json"),new eC.a(c,a)),o=r.systemTimeGap,i=o?new Date((new Date).getTime()+o):new Date;n.addAuthorization({accessKeyId:l||u,secretAccessKey:f,sessionToken:s},i),this.transport.send(c)}},{key:"start",value:function(e,t,r){this.successProcess=t,this.failProcess=r,this._st=Date.now();try{this.commitUpload()}catch(e){this.fail({error:"catch error: ".concat(e.toString())})}}},{key:"eventInit",value:function(){var e=this;this.transport.on("complete",function(t){try{var r,n,i,o,s,a,c=JSON.parse(t.response);c.ResponseMetadata.Error?e.fail({xhr:t,errorCode:c.ResponseMetadata.Error.CodeN,error:c.ResponseMetadata.Error.Code,message:c.ResponseMetadata.Error.Message}):(r=eT.checkServiceName(e.options.type,e.config),n=c.Result,i={},r===et?e.isImageBatchUpload?(o=n.Results,s=n.PluginResult||[],o.forEach(function(e,t){o[t]=tg(tg({},o[t]),s[t])}),i=o):tp(i=n.Results[0],n.PluginResult&&n.PluginResult[0]):i=n.Results[0],a=tp(e.currFileCtx,{stage:"complete",type:"success",percent:100,extra:{message:"upload successful"},uploadResult:i,xhr:t,stageStartTime:e._st,stageEndTime:Date.now(),duration:Date.now()-e._st,totalDuration:Date.now()-e._st+e.currFileCtx.totalDuration}),e.successProcess&&e.successProcess(a))}catch(r){e.fail({error:"catch error: ".concat(r.toString()),xhr:t})}}),this.transport.on("error",function(t){var r={error:"request fail: ".concat(t.statusText||t.errText||"UNKNOWN"),xhr:t};t.response&&(t=JSON.parse(t.response)).ResponseMetadata&&t.ResponseMetadata.Error&&(r.errorCode=t.ResponseMetadata.Error.CodeN,r.error=t.ResponseMetadata.Error.Code,r.message=t.ResponseMetadata.Error.Message),e.fail(r)})}},{key:"fail",value:function(e){var t=this.options.context,r=this.options.key,n=e.xhr,i=e.errorCode||1005e3,o="prepare upload error: UNKNOWN",t=(n&&(o=0===n.status?"prepare upload error: NETERROR":e.message||"prepare upload error: ".concat(n.status)),tp(t.tasks[r],{extra:{message:o,error:e.error,errorCode:i},type:"error",stage:"complete",xhr:n,stageStartTime:this._st,stageEndTime:Date.now(),duration:Date.now()-this._st,totalDuration:Date.now()-this._st+this.currFileCtx.totalDuration}));this.failProcess(t)}}],ty(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),a}();function t_(e){return(t_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tw(){return(tw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r,n=arguments[t];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function tk(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function tS(e,t){return(tS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function tx(e){return(tx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var tO=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tS(e,t)}(a,n.a);var e,t,r,i,o,s=(e=a,t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var r=tx(e);return function(e,t){if(t&&("object"===t_(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,t?Reflect.construct(r,arguments,tx(this).constructor):r.apply(this,arguments))});function a(e){var t,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length?arguments[2]:void 0,i=3<arguments.length?arguments[3]:void 0;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,a),(t=s.call(this,e)).tasks=e,t.config=r,t.key=i,t.uploaderCtx=n,t.current=0,t.length=t.tasks.length,t.taskError={},t.uploadList=[],t.retryTaskTime=r.retryTaskTime||2,t}return r=a,i=[{key:"start",value:function(){var e=this.tasks.shift();e&&(this.current=e.index,this.execTask(e))}},{key:"execTask",value:function(e){var t,r,n=this,i=e.key,o=this.uploaderCtx,s=o.tasks[i];s&&(t=s.cacheTask,r=o.taskList[i].length,t&&0<e.index&&e.index<t?this.start():(s.currentTask=e.index,1===s.status&&e&&e.func.call(e.context,e.arg,function(t){var s;o.taskList[i]&&((s=o.taskList[i][e.index+1])&&0!==e.index?o._saveTask(i,{currentTask:s.index,stage:s.stage}):e.index===r-1&&o._removeTaskCache(i),0<n.tasks.length?n.start():o._queueSuccess(i),n.success(t))},function(t){var r;t.xhr&&400<=t.xhr.status?n.fail(t):!n.taskError[i]||n.taskError[i]<n.retryTaskTime?(n.taskError[i]?n.taskError[i]++:n.taskError[i]=1,r=n.errorFormat(t,!0),n.uploaderCtx.logger.send(r),n.execTask(e)):(t.key=i,n.fail(t))})))}},{key:"addTask",value:function(e){this.tasks.push(e)}},{key:"success",value:function(e){var t;e.xhr&&(t=e.xhr,e.req={url:t.currentUrl,param:t.params},e.res={status:t.status,header:t.getAllResponseHeaders(),body:t.responseText},delete e.xhr),tw(e,{type:"success"});try{this.uploaderCtx._broadcast(e.stage,e)}catch(e){}this.uploaderCtx.logger.send(e)}},{key:"fail",value:function(e){var t=this.uploaderCtx,r=e.key,e=this.errorFormat(e);try{t._broadcast("error",e)}catch(e){}t.tasks[r].isBreak?t._cancel(r):t._pause(r),t.logger.send(e)}},{key:"cancel",value:function(e){var t,r;e||(e=this.key,t=this.uploaderCtx.tasks[e].currentTask,this.uploaderCtx.taskList[e].forEach(function(e){t===e.index&&(r=e)}),this.tasks=[],r&&3===r.index&&r.context.stop(),this.uploaderCtx._removeTaskCache(e))}},{key:"restart",value:function(){this.uploadList.forEach(function(e){e.cancel=!1}),this.start()}},{key:"errorFormat",value:function(e,t){var r,t={type:t?"retry":"error"};return e.xhr&&(r=e.xhr,e.req={url:r.currentUrl,param:r.params},e.res={status:r.status,header:r.getAllResponseHeaders(),body:r.responseText},e.extra&&(e.extra.req=e.req,e.extra.res=e.res),delete e.xhr),tw(e,t)}}],tk(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),a}();function tC(e){return(tC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tT(){return(tT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r,n=arguments[t];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function tj(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function tP(e,t){return(tP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function tI(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tA(e){return(tA=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var tD=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tP(e,t)}(c,n.a);var e,t,r,o,s,a=(e=c,t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var r=tA(e);return function(e,t){if(t&&("object"===tC(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return tI(e)}(this,t?Reflect.construct(r,arguments,tA(this).constructor):r.apply(this,arguments))});function c(e){var t;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,c),(t=a.call(this,e)).config=tT({},i),t._mergeOptions(t.config,e),t.tasks={},t.taskList={},t.cache={},t.storage=eh.storage(tI(t)),t.logger=t.config.noLog?{send:function(){}}:new eu(t.config,tI(t)),t}return r=c,o=[{key:"_mergeOptions",value:function(e,t){t&&"object"===tC(t)&&(tT(e,t),Object.keys(t).forEach(function(r){"vodDomain"===r&&(e.replace[r]=t[r])}))}},{key:"_setCache",value:function(e,t){this.storage.setItem(e,t)}},{key:"_getCache",value:function(e){return this.storage.getItem(e)}},{key:"_removeCache",value:function(e){e?this.storage.removeItem(e):this.storage.clear()}},{key:"_addTask",value:function(e,t){var r=this.tasks,n=this.taskList;r[e]&&r[e].task?n[e].push(t):(n[e]=[],n[e].push(t),r[e]=r[e]||{},r[e].task=new tO([],this.config,this,e)),r[e].task.addTask(t)}},{key:"_broadcast",value:function(e,t){var r=this.tasks[t.key].status;if(1===r||0===r)try{this.emit(e,t)}catch(e){if(!(r=!("[object Error]"!==Object.prototype.toString.call(e)))||"Error"===e.name)throw e}}},{key:"_addCrc32ProcessTask",value:function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},n=r.isDirect,r=r.isImageBatchUpload,e=new e_({file:e.file,context:this,key:t,isDirect:n,isImageBatchUpload:void 0!==r&&r},this.config),n={context:e,func:e.start,arg:{},key:t,index:0,stage:"crc32"};this._addTask(t,n)}},{key:"_addPreUploadTask",value:function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},n=r.isDirect,r=r.isImageBatchUpload,n={file:e.file,stsToken:e.stsToken,context:this,type:e.type||Z,preUploadUriParams:e.preUploadUriParams||{},storeKey:e.storeKey,key:t,isDirect:n,isImageBatchUpload:void 0!==r&&r,fileSize:e.fileSize||null},r=new ez(n,this.config),e={context:r,func:r.start,arg:{},key:t,index:1,stage:"preUpload"};this._addTask(t,e)}},{key:"_addDirectUploadTask",value:function(e,t){var r=(2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}).isImageBatchUpload,e=new to({file:e.file,context:this,key:t,isImageBatchUpload:void 0!==r&&r},this.config),r={context:e,func:e.start,arg:{},key:t,index:3,stage:"process"};this._addTask(t,r)}},{key:"_addInitUploadIDTask",value:function(e,t){e={context:e=new eN({file:e.file,context:this,key:t},this.config),func:e.start,arg:{},key:t,index:2,stage:"initUploadID"},this._addTask(t,e)}},{key:"_addUploadProcessTask",value:function(e,t){e={context:e=new e2({file:e.file,context:this,key:t},this.config),func:e.start,arg:{},key:t,index:3,stage:"process"},this._addTask(t,e)}},{key:"_addStreamUploadTask",value:function(e,t){this.streamUploadTask=new tf({context:this,key:t},this.config);var r={context:this.streamUploadTask,func:this.streamUploadTask.start,arg:{},key:t,index:3,stage:"process"};this._addTask(t,r)}},{key:"_mergeFileTask",value:function(e,t){e={context:e=new e7({file:e.file,context:this,stage:"fileMerge",key:t},this.config),func:e.start,arg:{},key:t,index:4,stage:"fileMerge"},this._addTask(t,e)}},{key:"_getMetaInfoTask",value:function(e,t){var r=(2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}).isImageBatchUpload,e={file:e.file,context:this,data:e.data,type:e.type||Z,callbackArgs:e.callbackArgs,key:t,isImageBatchUpload:void 0!==r&&r},r=new tb(e,this.config),e={context:r,func:r.start,arg:{},key:t,index:5,stage:"complete"};this._addTask(t,e)}},{key:"_addAllUploadProcess",value:function(e,t){var r=e.type===Y&&"[object Array]"===Object.prototype.toString.call(e.file),n=(this.tasks[t]=this.tasks[t]||{},this.tasks[t].fileType=e.type||Z,this.tasks[t].fileSize=e.file&&e.file.size,this.tasks[t].proxyStsToken=e.stsToken,e.file.size<=eh.getFileSliceLength(e.file)||r);this._addCrc32ProcessTask(e,t,{isDirect:n,isImageBatchUpload:r}),this._addPreUploadTask(e,t,{isDirect:n,isImageBatchUpload:r}),n?this._addDirectUploadTask(e,t,{isImageBatchUpload:r}):(this._addInitUploadIDTask(e,t),this._addUploadProcessTask(e,t),this._mergeFileTask(e,t)),this._getMetaInfoTask(e,t,{isImageBatchUpload:r})}},{key:"_addAllUploadProcessClientEncrypt",value:function(e){var t,r=this;return e.type===Y&&Array.isArray(e.file)?(t=[],e.file.forEach(function(n){t.push(r._createClientEncryptTask({stsToken:e.stsToken,type:e.type,file:n}))}),t):this._createClientEncryptTask(e)}},{key:"_createClientEncryptTask",value:function(e){var t=eh.getUnique("file");return this.tasks[t]=this.tasks[t]||{},this.tasks[t].fileType=e.type||Z,this.tasks[t].fileSize=e.file&&e.file.size,this.tasks[t].proxyStsToken=e.stsToken,this.tasks[t].clientEncryptKey=eh.generateKey(16),this._addCrc32ProcessTask(e,t,{isDirect:!1,isImageBatchUpload:!1}),this._addPreUploadTask(e,t,{isDirect:!1,isImageBatchUpload:!1}),this._addInitUploadIDTask(e,t),this._addUploadProcessTask(e,t),this._mergeFileTask(e,t),this._getMetaInfoTask(e,t,{isImageBatchUpload:!1}),t}},{key:"_addAllStreamUploadProcess",value:function(e,t){this.tasks[t]=this.tasks[t]||{},this.tasks[t].fileType=e.type||Z,this.tasks[t].proxyStsToken=e.stsToken,this._addPreUploadTask(e,t),this._addStreamUploadTask(e,t),this._mergeFileTask(e,t),this._getMetaInfoTask(e,t)}},{key:"_addStreamSlice",value:function(e){var t=e.fileSlice,e=e.index;this.streamUploadTask.addStreamSlice({fileSlice:t,index:e})}},{key:"_completeStreamUpload",value:function(){this.streamUploadTask.completeStreamUpload()}},{key:"_run",value:function(e){var t=this.tasks,r=navigator.userAgent.toLowerCase().match(/msie ([\d.]+)/);if(r&&r[1]&&9>=Number(r[1]))return this._broadcast("error",tT(t[e],{key:e,status:0,stage:"browserError",extra:{message:"cannot support the browser below ie10"},type:"error"})),this.logger.send(t[e]),void this._cancel(e);t[e]&&(3===t[e].status?this._restart(e):(r=new Date,t[e].startTime=r.getTime(),t[e].task&&1!==t[e].status&&t[e].task.tasks.length&&(t[e].status=1,this.logger.send(tT({},t[e],{extra:{message:"start upload"},type:"start",key:e})),t[e].task.start())))}},{key:"_restart",value:function(e){var t,r,n=this,i=this.tasks;i[e]&&(t=i[e].task,r=i[e].currentTask||0,this.taskList[e].forEach(function(i,o){i.index===r&&(t.tasks=n.taskList[e].slice(o))}),t&&1!==i[e].status&&t.tasks.length&&(i[e].status=1,t.restart()))}},{key:"_cancel",value:function(e){var t=this.tasks;t[e]&&(t[e].status=2,t[e].task.cancel(),delete this.taskList[e])}},{key:"_pause",value:function(e){var t=this.tasks;t[e]&&(t[e].status=3,t[e].task.cancel(!0),this._saveTask(e))}},{key:"_removeTaskCache",value:function(e){var t=this.tasks;t[e]&&(t=t[e].crc32Key)&&this._removeCache(t)}},{key:"_saveTask",value:function(e,t){(t=(e=tT({},this.tasks[e],t||{})).crc32Key)&&(delete e.task,delete e.xhr,delete e.crc32Array,this._setCache(t,JSON.stringify(e)))}},{key:"_queueSuccess",value:function(e){var t,r=this.tasks;r[e]&&(t=new Date,r[e].endTime=t.getTime(),r[e].time=r[e].endTime-r[e].startTime,r[e].status=0,this.taskList[e]=[])}},{key:"_removeFile",value:function(e){delete this.tasks[e]}},{key:"_batchAction",value:function(e){Object.keys(this.tasks).forEach(function(t){e&&e(t)})}},{key:"_refreshSTSToken",value:function(e){var t=this,r=this.tasks;Object.keys(r).forEach(function(n){var n=r[n],i=tT({},n,{proxyStsToken:e}),o=(n.proxyStsToken=e,i.crc32Key);o&&(delete i.task,delete i.xhr,delete i.crc32Array,n.proxyStsToken=e,t._setCache(o,JSON.stringify(i)))})}},{key:"_setOption",value:function(e){this._mergeOptions(this.config,e)}},{key:"_getOption",value:function(e){var t=tT({},this.config);return Object.keys(t).forEach(function(e){(-1<e.indexOf("Url")||"replace"===e||"log"===e)&&delete t[e]}),e?t[e]:t}},{key:"_userCancel",value:function(e){var t=this,r=this.tasks;e?(this._cancel(e),this.logger.send(tT({},r[e],{type:"cancel"})),delete this.tasks[e]):Object.keys(r).forEach(function(e){t._cancel(e),t.logger.send(tT({},r[e],{type:"cancel"})),delete t.tasks[e]})}},{key:"_userPause",value:function(e){var t=this,r=this.tasks;e?(this._pause(e),this.logger.send(tT({},r[e],{type:"pause"}))):Object.keys(r).forEach(function(e){t._pause(e),t.logger.send(tT({},r[e],{type:"pause"}))})}}],tj(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),c}();function tE(e){return(tE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tz(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function tR(e,t){return(tR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function tB(e){return(tB=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var tM=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tR(e,t)}(s,tD);var e,t,r,n,i,o=(e=s,t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var r=tB(e);return function(e,t){if(t&&("object"===tE(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,t?Reflect.construct(r,arguments,tB(this).constructor):r.apply(this,arguments))});function s(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,s),o.apply(this,arguments)}return r=s,n=[{key:"start",value:function(e){this.abort=!1,e?this._run(e):this._batchAction(this._run.bind(this))}},{key:"addFile",value:function(e){var t;return e&&eT.checkStsToken(e.stsToken)?e.file&&this.config.clientEncrypt?this._addAllUploadProcessClientEncrypt(e):e.file?(t=eh.getUnique("file"),this._addAllUploadProcess(e,t),t):null:(this.emit("error",{extra:{message:ey,errorCode:1000002}}),null)}},{key:"addImageFile",value:function(e){var t;return e&&eT.checkStsToken(e.stsToken)?e.file?(e.type=e.type||Y,t=eh.getUnique("file"),this._addAllUploadProcess(e,t),t):null:(this.emit("error",{extra:{message:ey,errorCode:1000002}}),null)}},{key:"addStreamUploadTask",value:function(e){if(!e||!eT.checkStsToken(e.stsToken))return this.emit("error",{extra:{message:ey,errorCode:1000002}}),null;var t=eh.getUnique("file");return this._addAllStreamUploadProcess(e,t),t}},{key:"addStreamSlice",value:function(e){var t=e.fileSlice,e=e.index;this._addStreamSlice({fileSlice:t,index:e})}},{key:"completeStreamUpload",value:function(){this._completeStreamUpload()}},{key:"removeFile",value:function(e){e&&this._removeFile(e)}},{key:"cancel",value:function(e){e?this._userCancel(e):this._batchAction(this._userCancel.bind(this))}},{key:"pause",value:function(e){this._userPause(e)}},{key:"restart",value:function(e){e?this._restart(e):this._batchAction(this._restart.bind(this))}},{key:"refreshSTSToken",value:function(e){this._refreshSTSToken(e)}},{key:"setOption",value:function(e){this._setOption(e)}},{key:"getOption",value:function(e){return this._getOption(e)}}],tz(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),s}()}]).default},e.exports=r()},825143:function(e,t,r){"use strict";r.d(t,{C:function(){return u},i:function(){return c}});var n=Object.defineProperty,i=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,a=(e,t,r)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,c=(e,t)=>{for(var r in t||(t={}))o.call(t,r)&&a(e,r,t[r]);if(i)for(var r of i(t))s.call(t,r)&&a(e,r,t[r]);return e},u=(e,t,r)=>new Promise((n,i)=>{var o=e=>{try{a(r.next(e))}catch(e){i(e)}},s=e=>{try{a(r.throw(e))}catch(e){i(e)}},a=e=>e.done?n(e.value):Promise.resolve(e.value).then(o,s);a((r=r.apply(e,t)).next())})},714145:function(e,t,r){"use strict";var n=r(722873),i={date:(0,n.Z)({formats:{full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},defaultWidth:"full"}),time:(0,n.Z)({formats:{full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},defaultWidth:"full"}),dateTime:(0,n.Z)({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})};t.Z=i},820438:function(e,t,r){"use strict";e.exports=r(290822)()?Object.keys:r(152796)},927602:function(e){e.exports=function(e){return e.split("")}},562641:function(e){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},701891:function(e,t,r){var n=r(887316);e.exports=function(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}},987132:function(e){e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},700953:function(e,t,r){var n=r(857513),i=r(749148),o=r(431356),s=n?n.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(s&&e&&e[s])}},931178:function(e){e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},593693:function(e,t,r){var n=r(971057),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,s=n(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,function(e,r,n,i){t.push(n?i.replace(o,"$1"):r||e)}),t});e.exports=s},547816:function(e,t,r){"use strict";r.r(t)},725497:function(e,t,r){"use strict";r(932651);var n=r(101199),i=r(469935),o=r.n(i),s=r(949696);r(558310);var a=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};let c=s.U.PREFIX;t.Z=e=>{let{layout:t="horizontal",dashed:r,align:i="center",className:s,margin:u,style:l,children:f}=e,h=a(e,["layout","dashed","align","className","margin","style","children"]),p=o()(`${c}-divider`,s,{[`${c}-divider-horizontal`]:"horizontal"===t,[`${c}-divider-vertical`]:"vertical"===t,[`${c}-divider-dashed`]:!!r,[`${c}-divider-with-text`]:f&&"horizontal"===t,[`${c}-divider-with-text-${i}`]:f&&"horizontal"===t}),d={};return void 0!==u&&("vertical"===t?d={marginLeft:u,marginRight:u}:"horizontal"===t&&(d={marginTop:u,marginBottom:u})),n.createElement("div",Object.assign({},h,{className:p,style:Object.assign(Object.assign({},d),l)}),f&&"horizontal"===t?"string"==typeof f?n.createElement("span",{className:`${c}-divider_inner-text`,"x-semi-prop":"children"},f):f:null)}},818502:function(e,t,r){"use strict";function n(){let e,t;let r=new Promise((r,n)=>{e=r,t=n});return r.used=!1,r.resolve=function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];return r.used=!0,e(...n)},r.reject=function(){for(var e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];return r.used=!0,t(...n)},r}r.d(t,{Qo:function(){return n}}),r(679308),r(490629),r(362051)},967105:function(e,t,r){"use strict";r.d(t,{W:function(){return o}});var n=r(480333),i=r(553119);class o{reset(){this.sequenceNumber=0,this.timescale=0,this.sampleDuration=0,this.sampleRate=0,this.channelCount=0,this.baseMediaDecodeTime=0,this.present=!1,this.pid=-1,this.codec="",this.samples=[],this.config=[],this.warnings=[]}exist(){return!!(this.sampleRate&&this.channelCount&&this.codec&&this.codecType===i.yQ.AAC)}hasSample(){return!!this.samples.length}get isEncryption(){return this.isAudioEncryption}get firstDts(){return this.samples.length?this.samples[0].dts:null}get firstPts(){return this.samples.length?this.samples[0].pts:null}get samplesDuration(){if(this.samples.length>0){let e=this.samples[0],t=this.samples[this.samples.length-1];return t.dts-e.dts+t.duration}return 0}constructor(){(0,n._)(this,"id",2),(0,n._)(this,"type",i.Vc.AUDIO),(0,n._)(this,"codecType",i.yQ.AAC),(0,n._)(this,"pid",-1),(0,n._)(this,"codec",""),(0,n._)(this,"sequenceNumber",0),(0,n._)(this,"sampleDuration",0),(0,n._)(this,"timescale",0),(0,n._)(this,"formatTimescale",0),(0,n._)(this,"baseMediaDecodeTime",0),(0,n._)(this,"duration",0),(0,n._)(this,"warnings",[]),(0,n._)(this,"samples",[]),(0,n._)(this,"baseDts",0),(0,n._)(this,"sampleSize",16),(0,n._)(this,"sampleRate",0),(0,n._)(this,"channelCount",0),(0,n._)(this,"objectType",0),(0,n._)(this,"sampleRateIndex",0),(0,n._)(this,"config",[]),(0,n._)(this,"present",!1),(0,n._)(this,"isVideoEncryption",!1),(0,n._)(this,"isAudioEncryption",!1),(0,n._)(this,"kid",null),(0,n._)(this,"ext",void 0)}}},276826:function(e,t,r){"use strict";r.d(t,{FW:function(){return o}}),r(932651);var n=r(559865),i=r(783696);function o(e){let t=Object.assign({},function(){return{videoDecodePreference:"hardware",audioTargetDecodeEnd:6e5,videoTargetDecodeEnd:6e5,minSamplesForPlayback:10,emitWaitingDelayAfterStall:50,cacheDuration:6e4,firstFrameResetCheck:!1,flvStallOptConfig:{minTimeForPlayback:{enable:!1,minTimeMs:800},stallHysteresis:{enable:!1,resumeMs:1e3},audioStallDebounce:{enable:!1,debounceMs:80},liveStartLatency:{enable:!1,targetLatencyMs:2e3,minAvailableMs:1500},stallSelfHeal:{enable:!1,windowMs:1e4,maxStalls:5,safePadMs:1500,cooldownMs:3e4}}}}(),null==e?void 0:e.veConfig);return(0,n.R)({loaderConfig:{retryConfig:{retryCount:2,retryDelay:1e3,noRetryList:(null==e?void 0:e.protocol)===i.b.MP4?["Failed to fetch",/^(4\d{2}|5\d{2})$/gi,"timeout"]:void 0},timeout:3e3},veConfig:t,mediaInfo:{audioSampleRate:0,audioChannelCnt:0},preloadTime:5,startTime:0,seiOnDemand:!0,seamlesslyReload:!0,chaseFrameStart:0,analyzeDuration:2e3,disconnectTime:0,onlyVideo:!1,isVod:!1,protocol:i.b.FLV,removeBufferLen:60,removeBufferAtSeek:!1,resumePlayWaterLevel:2,waitJampBufferMaxCnt:1,waitingInBufferTimeOut:3e3,waitingTimeOut:5e3,closeDowngrade:!1,notDegradeErrorList:[404,403,"timeout"],h265Degrade:!1,forceVideoPlay:!1,rangeMaxDuration:15,defaultMetaSize:819200,maxBufferLength:15,tickInSeconds:.2,internalRetryCnt:1,retryCount:3,retryDelay:1e3,loadTimeout:1e4,maxReaderInterval:5e3,checkStuckTimeStepSec:1,videoDecodeTimeout:1e3,muteRecoverFix:!1,mediaClockModeStrategy:"legacy",audioCtxCoord:!1,audioOutputMode:"mediaStream",adaptive:{hurryEndMs:1800,hurryStartMs:2500}},e)}},779778:function(e,t,r){"use strict";var n=r(198412),i=r.n(n),o=r(108220);t.Z=function(e){return i()(e,"key")===o.q7}},625813:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(265260);function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,n.Z)(e,t)}},921898:function(e,t,r){"use strict";function n(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}r.d(t,{Z:function(){return n}})},525293:function(e,t,r){"use strict";r.d(t,{v:function(){return s}});var n=r(252819),i=r(419416),o=r(278825);let s={name:"attention",resolveAll:function(e,t){let r,i,s,c,u,l,f,h,p=-1;for(;++p<e.length;)if("enter"===e[p][0]&&"attentionSequence"===e[p][1].type&&e[p][1]._close){for(r=p;r--;)if("exit"===e[r][0]&&"attentionSequence"===e[r][1].type&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[p][1]).charCodeAt(0)){if((e[r][1]._close||e[p][1]._open)&&(e[p][1].end.offset-e[p][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[p][1].end.offset-e[p][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[p][1].end.offset-e[p][1].start.offset>1?2:1;let d={...e[r][1].end},g={...e[p][1].start};a(d,-l),a(g,l),c={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},u={type:l>1?"strongSequence":"emphasisSequence",start:{...e[p][1].start},end:g},s={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[p][1].start}},i={type:l>1?"strong":"emphasis",start:{...c.start},end:{...u.end}},e[r][1].end={...c.start},e[p][1].start={...u.end},f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=(0,n.V)(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=(0,n.V)(f,[["enter",i,t],["enter",c,t],["exit",c,t],["enter",s,t]]),f=(0,n.V)(f,(0,o.C)(t.parser.constructs.insideSpan.null,e.slice(r+1,p),t)),f=(0,n.V)(f,[["exit",s,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[p][1].end.offset-e[p][1].start.offset?(h=2,f=(0,n.V)(f,[["enter",e[p][1],t],["exit",e[p][1],t]])):h=0,(0,n.d)(e,r-1,p-r+3,f),p=r+f.length-h-2;break}}for(p=-1;++p<e.length;)"attentionSequence"===e[p][1].type&&(e[p][1].type="data");return e},tokenize:function(e,t){let r;let n=this.parser.constructs.attentionMarkers.null,o=this.previous,s=(0,i.r)(o);return function(a){return r=a,e.enter("attentionSequence"),function a(c){if(c===r)return e.consume(c),a;let u=e.exit("attentionSequence"),l=(0,i.r)(c),f=!l||2===l&&s||n.includes(c),h=!s||2===s&&l||n.includes(o);return u._open=!!(42===r?f:f&&(s||!h)),u._close=!!(42===r?h:h&&(l||!f)),t(c)}(a)}}};function a(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}},386292:function(e,t,r){"use strict";r.d(t,{k:function(){return s}});var n=r(890131),i=r(368183),o=r(614867);let s={resolve:function(e){return(0,o._)(e),e},tokenize:function(e,t){let r;return function(t){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),n(t)};function n(t){return null===t?o(t):(0,i.Ch)(t)?e.check(a,s,o)(t):(e.consume(t),n)}function o(r){return e.exit("chunkContent"),e.exit("content"),t(r)}function s(t){return e.consume(t),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,n}}},a={partial:!0,tokenize:function(e,t,r){let o=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),(0,n.f)(e,s,"linePrefix")};function s(n){if(null===n||(0,i.Ch)(n))return r(n);let s=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&s&&"linePrefix"===s[1].type&&s[2].sliceSerialize(s[1],!0).length>=4?t(n):e.interrupt(o.parser.constructs.flow,r,t)(n)}}}},166950:function(e,t,r){"use strict";r.d(t,{I:function(){return s}});var n=r(766418),i=r(339342);let o=Object.keys(i);class s extends n.k{constructor(e,t,r,n){let s=-1;if(super(e,t),function(e,t,r){r&&(e[t]=r)}(this,"space",n),"number"==typeof r)for(;++s<o.length;){let e=o[s];(function(e,t,r){r&&(e[t]=r)})(this,o[s],(r&i[e])===i[e])}}}function a(e,t,r){r&&(e[t]=r)}s.prototype.defined=!0},158489:function(e,t,r){"use strict";r.d(t,{V:function(){return n}});class n{constructor(e,t,r){this.normal=t,this.property=e,r&&(this.space=r)}}n.prototype.normal={},n.prototype.property={},n.prototype.space=void 0},559519:function(e,t,r){"use strict";r.d(t,{Sz:function(){return f},kr:function(){return l}});var n=r(101199),i=r(410490);r(777296);let o=Symbol(),s=Symbol(),a="undefined"==typeof window||/ServerSideRendering/.test(window.navigator&&window.navigator.userAgent)?n.useEffect:n.useLayoutEffect,c=i.unstable_runWithPriority?e=>{try{(0,i.unstable_runWithPriority)(i.unstable_NormalPriority,e)}catch(t){if("Not implemented."===t.message)e();else throw t}}:e=>e(),u=e=>({value:t,children:r})=>{let i=(0,n.useRef)(t),s=(0,n.useRef)(0),[u,l]=(0,n.useState)(null);u&&(u(t),l(null));let f=(0,n.useRef)();if(!f.current){let e=new Set;f.current={[o]:{v:i,n:s,l:e,u:(t,r)=>{s.current+=1;let n={n:s.current};(null==r?void 0:r.suspense)&&(n.n*=-1,n.p=new Promise(e=>{l(()=>t=>{n.v=t,delete n.p,e(t)})})),e.forEach(e=>e(n)),t()}}}}return a(()=>{i.current=t,s.current+=1,c(()=>{f.current[o].l.forEach(e=>{e({n:s.current,v:t})})})},[t]),(0,n.createElement)(e,{value:f.current},r)};function l(e){let t=(0,n.createContext)({[o]:{v:{current:e},n:{current:-1},l:new Set,u:e=>e()}});return t[s]=t.Provider,t.Provider=u(t.Provider),delete t.Consumer,t}function f(e,t){let r=(0,n.useContext)(e)[o],{v:{current:i},n:{current:s},l:c}=r,u=t(i),[l,f]=(0,n.useReducer)((e,r)=>{if(!r)return[i,u];if("p"in r)throw r.p;if(r.n===s)return Object.is(e[1],u)?e:[i,u];try{if("v"in r){if(Object.is(e[0],r.v))return e;let n=t(r.v);if(Object.is(e[1],n))return e;return[r.v,n]}}catch(e){}return[...e]},[i,u]);return!Object.is(l[1],u)&&f(),a(()=>(c.add(f),()=>{c.delete(f)}),[c]),l[1]}},291804:function(e,t,r){"use strict";r.d(t,{Gn:function(){return f},Qt:function(){return h},T8:function(){return a}}),r(932651),r(490629),r(374954),r(414931);var n=r(324219),i=r(760100),o=r(32879);class s extends n.Cy{static createEncryptor(e,t){return this.create(this._ENC_XFORM_MODE,e,t)}static createDecryptor(e,t){return this.create(this._DEC_XFORM_MODE,e,t)}static _createHelper(e){let t=e=>"string"==typeof e?d:p;return{encrypt:(r,n,i)=>t(n).encrypt(e,r,n,i),decrypt:(r,n,i)=>t(n).decrypt(e,r,n,i)}}reset(){super.reset.call(this),this._doReset()}process(e){return this._append(e),this._process()}finalize(e){return e&&this._append(e),this._doFinalize()}constructor(e,t,r){super(),this.cfg=Object.assign(new n.XY,r),this._xformMode=e,this._key=t,this.reset()}}s._ENC_XFORM_MODE=1,s._DEC_XFORM_MODE=2,s.keySize=4,s.ivSize=4;class a extends n.XY{static createEncryptor(e,t){return this.Encryptor.create(e,t)}static createDecryptor(e,t){return this.Decryptor.create(e,t)}constructor(e,t){super(),this._cipher=e,this._iv=t}}function c(e,t,r){let n;let i=this._iv;i?(n=i,this._iv=void 0):n=this._prevBlock;for(let i=0;i<r;i+=1)e[t+i]^=n[i]}class u extends a{}u.Encryptor=class extends u{processBlock(e,t){let r=this._cipher,{blockSize:n}=r;c.call(this,e,t,n),r.encryptBlock(e,t),this._prevBlock=e.slice(t,t+n)}},u.Decryptor=class extends u{processBlock(e,t){let r=this._cipher,{blockSize:n}=r,i=e.slice(t,t+n);r.decryptBlock(e,t),c.call(this,e,t,n),this._prevBlock=i}};let l={pad(e,t){let r=4*t,i=r-e.sigBytes%r,o=i<<24|i<<16|i<<8|i,s=[];for(let e=0;e<i;e+=4)s.push(o);let a=n.Ic.create(s,i);e.concat(a)},unpad(e){let t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};class f extends s{reset(){let e;super.reset.call(this);let{cfg:t}=this,{iv:r,mode:n}=t;this._xformMode===this.constructor._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode=e.call(n,this,r&&r.words),this._mode.__creator=e}_doProcessBlock(e,t){this._mode.processBlock(e,t)}_doFinalize(){let e;let{padding:t}=this.cfg;return this._xformMode===this.constructor._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e}constructor(e,t,r){super(e,t,Object.assign({mode:u,padding:l},r)),this.blockSize=4}}class h extends n.XY{toString(e){return(e||this.formatter).stringify(this)}constructor(e){super(),this.mixIn(e)}}class p extends n.XY{static encrypt(e,t,r,i){let o=Object.assign(new n.XY,this.cfg,i),s=e.createEncryptor(r,o),a=s.finalize(t),c=s.cfg;return h.create({ciphertext:a,key:r,iv:c.iv,algorithm:e,mode:c.mode,padding:c.padding,blockSize:s.blockSize,formatter:o.format})}static decrypt(e,t,r,i){let o=t,s=Object.assign(new n.XY,this.cfg,i);return o=this._parse(o,s.format),e.createDecryptor(r,s).finalize(o.ciphertext)}static _parse(e,t){return"string"==typeof e?t.parse(e,this):e}}p.cfg=Object.assign(new n.XY,{format:{stringify(e){let t;let{ciphertext:r,salt:o}=e;return(t=o?n.Ic.create([1398893684,1701076831]).concat(o).concat(r):r).toString(i.D)},parse(e){let t;let r=i.D.parse(e),o=r.words;return 1398893684===o[0]&&1701076831===o[1]&&(t=n.Ic.create(o.slice(2,4)),o.splice(0,4),r.sigBytes-=16),h.create({ciphertext:r,salt:t})}}});class d extends p{static encrypt(e,t,r,i){let o=Object.assign(new n.XY,this.cfg,i),s=o.kdf.execute(r,e.keySize,e.ivSize,o.salt,o.hasher);o.iv=s.iv;let a=p.encrypt.call(this,e,t,s.key,o);return a.mixIn(s),a}static decrypt(e,t,r,i){let o=t,s=Object.assign(new n.XY,this.cfg,i);o=this._parse(o,s.format);let a=s.kdf.execute(r,e.keySize,e.ivSize,o.salt,s.hasher);return s.iv=a.iv,p.decrypt.call(this,e,o,a.key,s)}}d.cfg=Object.assign(p.cfg,{kdf:{execute(e,t,r,i,s){let a,c=i;!c&&(c=n.Ic.random(8)),a=s?o.E.create({keySize:t+r,hasher:s}).compute(e,c):o.E.create({keySize:t+r}).compute(e,c);let u=n.Ic.create(a.words.slice(t),4*r);return a.sigBytes=4*t,h.create({key:a,iv:u,salt:c})}}})}}]);