Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

14 řádky
201 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[5754],{65754:function(module){(function(S,s){module.exports=s()})(window,function(){return function(p){var S={};function s(v){if(S[v])return S[v].exports;var n=S[v]={i:v,l:!1,exports:{}};return p[v].call(n.exports,n,n.exports,s),n.l=!0,n.exports}return s.m=p,s.c=S,s.d=function(v,n,ee){s.o(v,n)||Object.defineProperty(v,n,{enumerable:!0,get:ee})},s.r=function(v){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(v,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(v,"__esModule",{value:!0})},s.t=function(v,n){if(n&1&&(v=s(v)),n&8||n&4&&typeof v=="object"&&v&&v.__esModule)return v;var ee=Object.create(null);if(s.r(ee),Object.defineProperty(ee,"default",{enumerable:!0,value:v}),n&2&&typeof v!="string")for(var E in v)s.d(ee,E,function(L){return v[L]}.bind(null,E));return ee},s.n=function(v){var n=v&&v.__esModule?function(){return v.default}:function(){return v};return s.d(n,"a",n),n},s.o=function(v,n){return Object.prototype.hasOwnProperty.call(v,n)},s.p="/dist/",s(s.s="./index.js")}({"./index.js":function(p,S,s){var v=s("./src/cos.js");p.exports=v},"./lib/beacon.min.js":function(p,S,s){(function(v){var n,ee,E=s("./node_modules/@babel/runtime/helpers/typeof.js");(function(L,fe){E(S)=="object"&&typeof p!="undefined"?p.exports=fe():(n=fe,ee=typeof n=="function"?n.call(S,s,S,p):n,ee!==void 0&&(p.exports=ee))})(this,function(){"use strict";var L=function(u,f){return(L=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,g){a.__proto__=g}||function(a,g){for(var A in g)Object.prototype.hasOwnProperty.call(g,A)&&(a[A]=g[A])})(u,f)},fe=function(){return(fe=Object.assign||function(u){for(var f,a=1,g=arguments.length;a<g;a++)for(var A in f=arguments[a])Object.prototype.hasOwnProperty.call(f,A)&&(u[A]=f[A]);return u}).apply(this,arguments)};function N(x,u,f,a){return new(f||(f=Promise))(function(g,A){function _(Ce){try{te(a.next(Ce))}catch(X){A(X)}}function Z(Ce){try{te(a.throw(Ce))}catch(X){A(X)}}function te(Ce){var X;Ce.done?g(Ce.value):(X=Ce.value,X instanceof f?X:new f(function(Pe){Pe(X)})).then(_,Z)}te((a=a.apply(x,u||[])).next())})}function w(x,u){var f,a,g,A,_={label:0,sent:function(){if(1&g[0])throw g[1];return g[1]},trys:[],ops:[]};return A={next:Z(0),throw:Z(1),return:Z(2)},typeof Symbol=="function"&&(A[Symbol.iterator]=function(){return this}),A;function Z(te){return function(Ce){return function(X){if(f)throw new TypeError("Generator is already executing.");for(;_;)try{if(f=1,a&&(g=2&X[0]?a.return:X[0]?a.throw||((g=a.return)&&g.call(a),0):a.next)&&!(g=g.call(a,X[1])).done)return g;switch(a=0,g&&(X=[2&X[0],g.value]),X[0]){case 0:case 1:g=X;break;case 4:return _.label++,{value:X[1],done:!1};case 5:_.label++,a=X[1],X=[0];continue;case 7:X=_.ops.pop(),_.trys.pop();continue;default:if(g=_.trys,!((g=g.length>0&&g[g.length-1])||X[0]!==6&&X[0]!==2)){_=0;continue}if(X[0]===3&&(!g||X[1]>g[0]&&X[1]<g[3])){_.label=X[1];break}if(X[0]===6&&_.label<g[1]){_.label=g[1],g=X;break}if(g&&_.label<g[2]){_.label=g[2],_.ops.push(X);break}g[2]&&_.ops.pop(),_.trys.pop();continue}X=u.call(x,_)}catch(Pe){X=[6,Pe],a=0}finally{f=g=0}if(5&X[0])throw X[1];return{value:X[0]?X[1]:void 0,done:!0}}([te,Ce])}}}var V="__BEACON_",G="__BEACON_deviceId",Q="last_report_time",M="sending_event_ids",q="beacon_config",re="beacon_config_request_time",K=function(){function x(){var u=this;this.emit=function(f,a){if(u){var g,A=u.__EventsList[f];if(A==null?void 0:A.length){A=A.slice();for(var _=0;_<A.length;_++){g=A[_];try{var Z=g.callback.apply(u,[a]);if(g.type===1&&u.remove(f,g.callback),Z===!1)break}catch(te){throw te}}}return u}},this.__EventsList={}}return x.prototype.indexOf=function(u,f){for(var a=0;a<u.length;a++)if(u[a].callback===f)return a;return-1},x.prototype.on=function(u,f,a){if(a===void 0&&(a=0),this){var g=this.__EventsList[u];if(g||(g=this.__EventsList[u]=[]),this.indexOf(g,f)===-1){var A={name:u,type:a||0,callback:f};return g.push(A),this}return this}},x.prototype.one=function(u,f){this.on(u,f,1)},x.prototype.remove=function(u,f){if(this){var a=this.__EventsList[u];if(!a)return null;if(!f){try{delete this.__EventsList[u]}catch(A){}return null}if(a.length){var g=this.indexOf(a,f);a.splice(g,1)}return this}},x}();function Ae(x,u){for(var f={},a=0,g=Object.keys(x);a<g.length;a++){var A=g[a],_=x[A];if(typeof _=="string")f[D(A)]=D(_);else{if(u)throw new Error("value mast be string !!!!");f[D(String(A))]=D(String(_))}}return f}function D(x){if(typeof x!="string")return x;try{return x.replace(new RegExp("\\|","g"),"%7C").replace(new RegExp("\\&","g"),"%26").replace(new RegExp("\\=","g"),"%3D").replace(new RegExp("\\+","g"),"%2B")}catch(u){return""}}function R(x){return String(x.A99)+String(x.A100)}var m=function(){},B=function(){function x(u){var f=this;this.lifeCycle=new K,this.uploadJobQueue=[],this.additionalParams={},this.delayTime=0,this._normalLogPipeline=function(a){if(!a||!a.reduce||!a.length)throw new TypeError("createPipeline \u65B9\u6CD5\u9700\u8981\u4F20\u5165\u81F3\u5C11\u6709\u4E00\u4E2A pipe \u7684\u6570\u7EC4");return a.length===1?function(g,A){a[0](g,A||m)}:a.reduce(function(g,A){return function(_,Z){return Z===void 0&&(Z=m),g(_,function(te){return A==null?void 0:A(te,Z)})}})}([function(a){f.send({url:f.strategy.getUploadUrl(),data:a,method:"post",contentType:"application/json;charset=UTF-8"},function(){var g=f.config.onReportSuccess;typeof g=="function"&&g(JSON.stringify(a.events))},function(){var g=f.config.onReportFail;typeof g=="function"&&g(JSON.stringify(a.events))})}]),function(a,g){if(!a)throw g instanceof Error?g:new Error(g)}(Boolean(u.appkey),"appkey must be initial"),this.config=fe({},u)}return x.prototype.onUserAction=function(u,f){this.preReport(u,f,!1)},x.prototype.onDirectUserAction=function(u,f){this.preReport(u,f,!0)},x.prototype.preReport=function(u,f,a){u?this.strategy.isEventUpOnOff()&&(this.strategy.isBlackEvent(u)||this.strategy.isSampleEvent(u)||this.onReport(u,f,a)):this.errorReport.reportError("602"," no eventCode")},x.prototype.addAdditionalParams=function(u){for(var f=0,a=Object.keys(u);f<a.length;f++){var g=a[f];this.additionalParams[g]=u[g]}},x.prototype.setChannelId=function(u){this.commonInfo.channelID=String(u)},x.prototype.setOpenId=function(u){this.commonInfo.openid=String(u)},x.prototype.setUnionid=function(u){this.commonInfo.unid=String(u)},x.prototype.getDeviceId=function(){return this.commonInfo.deviceId},x.prototype.getCommonInfo=function(){return this.commonInfo},x.prototype.removeSendingId=function(u){try{var f=JSON.parse(this.storage.getItem(M)),a=f.indexOf(u);a!=-1&&(f.splice(a,1),this.storage.setItem(M,JSON.stringify(f)))}catch(g){}},x}(),d=function(){function x(u,f,a,g){this.requestParams={},this.network=g,this.requestParams.attaid="00400014144",this.requestParams.token="6478159937",this.requestParams.product_id=u.appkey,this.requestParams.platform=a,this.requestParams.uin=f.deviceId,this.requestParams.model="",this.requestParams.os=a,this.requestParams.app_version=u.appVersion,this.requestParams.sdk_version=f.sdkVersion,this.requestParams.error_stack="",this.uploadUrl=u.isOversea?"https://htrace.wetvinfo.com/kv":"https://h.trace.qq.com/kv"}return x.prototype.reportError=function(u,f){this.requestParams._dc=Math.random(),this.requestParams.error_msg=f,this.requestParams.error_code=u,this.network.get(this.uploadUrl,{params:this.requestParams}).catch(function(a){})},x}(),H=function(){function x(u,f,a,g){this.strategy={isEventUpOnOff:!0,httpsUploadUrl:"https://otheve.beacon.qq.com/analytics/v2_upload",requestInterval:30,blacklist:[],samplelist:[]},this.realSample={},this.appkey="",this.appkey=u.appkey,this.storage=a;try{var A=JSON.parse(this.storage.getItem(q));A&&this.processData(A)}catch(_){}u.isOversea&&(this.strategy.httpsUploadUrl="https://svibeacon.onezapp.com/analytics/v2_upload"),!u.isOversea&&this.needRequestConfig()&&this.requestConfig(u.appVersion,f,g)}return x.prototype.requestConfig=function(u,f,a){var g=this;this.storage.setItem(re,Date.now().toString()),a.post("https://oth.str.beacon.qq.com/trpc.beacon.configserver.BeaconConfigService/QueryConfig",{platformId:typeof wx=="undefined"?"3":"4",mainAppKey:this.appkey,appVersion:u,sdkVersion:f.sdkVersion,osVersion:f.userAgent,model:"",packageName:"",params:{A3:f.deviceId}}).then(function(A){if(A.data.ret==0)try{var _=JSON.parse(A.data.beaconConfig);_&&(g.processData(_),g.storage.setItem(q,A.data.beaconConfig))}catch(Z){}else g.processData(null),g.storage.setItem(q,"")}).catch(function(A){})},x.prototype.processData=function(u){var f,a,g,A,_;this.strategy.isEventUpOnOff=(f=u==null?void 0:u.isEventUpOnOff)!==null&&f!==void 0?f:this.strategy.isEventUpOnOff,this.strategy.httpsUploadUrl=(a=u==null?void 0:u.httpsUploadUrl)!==null&&a!==void 0?a:this.strategy.httpsUploadUrl,this.strategy.requestInterval=(g=u==null?void 0:u.requestInterval)!==null&&g!==void 0?g:this.strategy.requestInterval,this.strategy.blacklist=(A=u==null?void 0:u.blacklist)!==null&&A!==void 0?A:this.strategy.blacklist,this.strategy.samplelist=(_=u==null?void 0:u.samplelist)!==null&&_!==void 0?_:this.strategy.samplelist;for(var Z=0,te=this.strategy.samplelist;Z<te.length;Z++){var Ce=te[Z].split(",");Ce.length==2&&(this.realSample[Ce[0]]=Ce[1])}},x.prototype.needRequestConfig=function(){var u=Number(this.storage.getItem(re));return Date.now()-u>60*this.strategy.requestInterval*1e3},x.prototype.getUploadUrl=function(){return this.strategy.httpsUploadUrl+"?appkey="+this.appkey},x.prototype.isBlackEvent=function(u){return this.strategy.blacklist.indexOf(u)!=-1},x.prototype.isEventUpOnOff=function(){return this.strategy.isEventUpOnOff},x.prototype.isSampleEvent=function(u){return!!Object.prototype.hasOwnProperty.call(this.realSample,u)&&this.realSample[u]<Math.floor(Math.random()*Math.floor(1e4))},x}(),P="session_storage_key",F=function(){function x(u,f,a){this.beacon=a,this.storage=u,this.duration=f,this.appkey=a.config.appkey}return x.prototype.getSession=function(){var u=this.storage.getItem(P);if(!u)return this.createSession();var f="",a=0;try{var g=JSON.parse(u)||{sessionId:void 0,sessionStart:void 0};if(!g.sessionId||!g.sessionStart)return this.createSession();var A=Number(this.storage.getItem(Q));if(Date.now()-A>this.duration)return this.createSession();f=g.sessionId,a=g.sessionStart}catch(_){}return{sessionId:f,sessionStart:a}},x.prototype.createSession=function(){var u=Date.now(),f={sessionId:this.appkey+"_"+u.toString(),sessionStart:u};this.storage.setItem(P,JSON.stringify(f)),this.storage.setItem(Q,u.toString());var a="is_new_user",g=this.storage.getItem(a);return this.beacon.onDirectUserAction("rqd_applaunched",{A21:g?"N":"Y"}),this.storage.setItem(a,JSON.stringify(!1)),f},x}();function Re(){var x=navigator.userAgent,u=x.indexOf("compatible")>-1&&x.indexOf("MSIE")>-1,f=x.indexOf("Edge")>-1&&!u,a=x.indexOf("Trident")>-1&&x.indexOf("rv:11.0")>-1;if(u){new RegExp("MSIE (\\d+\\.\\d+);").test(x);var g=parseFloat(RegExp.$1);return g==7?7:g==8?8:g==9?9:g==10?10:6}return f?-2:a?11:-1}var b=function(){return(b=Object.assign||function(u){for(var f,a=1,g=arguments.length;a<g;a++)for(var A in f=arguments[a])Object.prototype.hasOwnProperty.call(f,A)&&(u[A]=f[A]);return u}).apply(this,arguments)},z,W=function(){function x(u,f){f===void 0&&(f={}),this.reportOptions={},this.config=u,this.reportOptions=f}return x.canUseDB=function(){return!!(window==null?void 0:window.indexedDB)},x.prototype.openDB=function(){var u=this;return new Promise(function(f,a){if(!x.canUseDB())return a({message:"\u5F53\u524D\u4E0D\u652F\u6301 indexeddb"});var g=u.config,A=g.name,_=g.version,Z=g.stores,te=indexedDB.open(A,_);te.onsuccess=function(){u.db=te.result,f(),b({result:1,func:"open",params:JSON.stringify(u.config)},u.reportOptions)},te.onerror=function(Ce){var X,Pe;a(Ce),b({result:0,func:"open",params:JSON.stringify(u.config),error_msg:(Pe=(X=Ce.target)===null||X===void 0?void 0:X.error)===null||Pe===void 0?void 0:Pe.message},u.reportOptions)},te.onupgradeneeded=function(){u.db=te.result;try{Z==null||Z.forEach(function(Ce){u.createStore(Ce)})}catch(Ce){b({result:0,func:"open",params:JSON.stringify(u.config),error_msg:Ce.message},u.reportOptions),a(Ce)}}})},x.prototype.useStore=function(u){return this.storeName=u,this},x.prototype.deleteDB=function(){var u=this;return this.closeDB(),new Promise(function(f,a){var g=indexedDB.deleteDatabase(u.config.name);g.onsuccess=function(){return f()},g.onerror=a})},x.prototype.closeDB=function(){var u;(u=this.db)===null||u===void 0||u.close(),this.db=null},x.prototype.getStoreCount=function(){var u=this;return new Promise(function(f,a){var g=u.getStore("readonly").count();g.onsuccess=function(){return f(g.result)},g.onerror=a})},x.prototype.clearStore=function(){var u=this;return new Promise(function(f,a){var g=u.getStore("readwrite").clear();g.onsuccess=function(){return f()},g.onerror=a})},x.prototype.add=function(u,f){var a=this;return new Promise(function(g,A){var _=a.getStore("readwrite").add(u,f);_.onsuccess=function(){g(_.result)},_.onerror=A})},x.prototype.put=function(u,f){var a=this;return new Promise(function(g,A){var _=a.getStore("readwrite").put(u,f);_.onsuccess=function(){g(_.result)},_.onerror=A})},x.prototype.getStoreAllData=function(){var u=this;return new Promise(function(f,a){var g=u.getStore("readonly").openCursor(),A=[];g.onsuccess=function(){var _;if((_=g.result)===null||_===void 0?void 0:_.value){var Z=g.result.value;A.push(Z),g.result.continue()}else f(A)},g.onerror=a})},x.prototype.getDataRangeByIndex=function(u,f,a,g,A){var _=this;return new Promise(function(Z,te){var Ce=_.getStore().index(u),X=IDBKeyRange.bound(f,a,g,A),Pe=[],Y=Ce.openCursor(X);Y.onsuccess=function(){var Me;((Me=Y==null?void 0:Y.result)===null||Me===void 0?void 0:Me.value)?(Pe.push(Y==null?void 0:Y.result.value),Y==null||Y.result.continue()):Z(Pe)},Y.onerror=te})},x.prototype.removeDataByIndex=function(u,f,a,g,A){var _=this;return new Promise(function(Z,te){var Ce=_.getStore("readwrite").index(u),X=IDBKeyRange.bound(f,a,g,A),Pe=Ce.openCursor(X),Y=0;Pe.onsuccess=function(Me){var xe=Me.target.result;xe?(Y+=1,xe.delete(),xe.continue()):Z(Y)},Pe.onerror=te})},x.prototype.createStore=function(u){var f=u.name,a=u.indexes,g=a===void 0?[]:a,A=u.options;if(this.db){this.db.objectStoreNames.contains(f)&&this.db.deleteObjectStore(f);var _=this.db.createObjectStore(f,A);g.forEach(function(Z){_.createIndex(Z.indexName,Z.keyPath,Z.options)})}},x.prototype.getStore=function(u){var f;return u===void 0&&(u="readonly"),(f=this.db)===null||f===void 0?void 0:f.transaction(this.storeName,u).objectStore(this.storeName)},x}(),ne="event_table_v3",oe="eventId",pe=function(){function x(u){this.isReady=!1,this.taskQueue=Promise.resolve(),this.db=new W({name:"Beacon_"+u+"_V3",version:1,stores:[{name:ne,options:{keyPath:oe},indexes:[{indexName:oe,keyPath:oe,options:{unique:!0}}]}]}),this.open()}return x.prototype.getCount=function(){var u=this;return this.readyExec(function(){return u.db.getStoreCount()})},x.prototype.setItem=function(u,f){var a=this;return this.readyExec(function(){return a.db.add({eventId:u,value:f})})},x.prototype.getItem=function(u){return N(this,void 0,void 0,function(){var f=this;return w(this,function(a){return[2,this.readyExec(function(){return f.db.getDataRangeByIndex(oe,u,u)})]})})},x.prototype.removeItem=function(u){var f=this;return this.readyExec(function(){return f.db.removeDataByIndex(oe,u,u)})},x.prototype.updateItem=function(u,f){var a=this;return this.readyExec(function(){return a.db.put({eventId:u,value:f})})},x.prototype.iterate=function(u){var f=this;return this.readyExec(function(){return f.db.getStoreAllData().then(function(a){a.forEach(function(g){u(g.value)})})})},x.prototype.open=function(){return N(this,void 0,void 0,function(){var u=this;return w(this,function(f){switch(f.label){case 0:return this.taskQueue=this.taskQueue.then(function(){return u.db.openDB()}),[4,this.taskQueue];case 1:return f.sent(),this.isReady=!0,this.db.useStore(ne),[2]}})})},x.prototype.readyExec=function(u){return this.isReady?u():(this.taskQueue=this.taskQueue.then(function(){return u()}),this.taskQueue)},x}(),he=function(){function x(u){this.keyObject={},this.storage=u}return x.prototype.getCount=function(){return this.storage.getStoreCount()},x.prototype.removeItem=function(u){this.storage.removeItem(u),delete this.keyObject[u]},x.prototype.setItem=function(u,f){var a=JSON.stringify(f);this.storage.setItem(u,a),this.keyObject[u]=f},x.prototype.iterate=function(u){for(var f=Object.keys(this.keyObject),a=0;a<f.length;a++){var g=this.storage.getItem(f[a]);u(JSON.parse(g))}},x}(),ye=function(){function x(u,f){var a=this;this.dbEventCount=0,Re()>0||!window.indexedDB||/X5Lite/.test(navigator.userAgent)?(this.store=new he(f),this.dbEventCount=this.store.getCount()):(this.store=new pe(u),this.getCount().then(function(g){a.dbEventCount=g}))}return x.prototype.getCount=function(){return N(this,void 0,void 0,function(){return w(this,function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),[4,this.store.getCount()];case 1:return[2,u.sent()];case 2:return u.sent(),[2,Promise.reject()];case 3:return[2]}})})},x.prototype.insertEvent=function(u,f){return N(this,void 0,void 0,function(){var a,g;return w(this,function(A){switch(A.label){case 0:if(this.dbEventCount>=1e4)return[2,Promise.reject()];a=R(u.mapValue),A.label=1;case 1:return A.trys.push([1,3,,4]),this.dbEventCount++,[4,this.store.setItem(a,u)];case 2:return[2,A.sent()];case 3:return g=A.sent(),f&&f(g,u),this.dbEventCount--,[2,Promise.reject()];case 4:return[2]}})})},x.prototype.getEvents=function(){return N(this,void 0,void 0,function(){var u;return w(this,function(f){switch(f.label){case 0:u=[],f.label=1;case 1:return f.trys.push([1,3,,4]),[4,this.store.iterate(function(a){u.push(a)})];case 2:return f.sent(),[2,Promise.all(u)];case 3:return f.sent(),[2,Promise.all(u)];case 4:return[2]}})})},x.prototype.removeEvent=function(u){return N(this,void 0,void 0,function(){var f;return w(this,function(a){switch(a.label){case 0:f=R(u.mapValue),a.label=1;case 1:return a.trys.push([1,3,,4]),this.dbEventCount--,[4,this.store.removeItem(f)];case 2:return[2,a.sent()];case 3:return a.sent(),this.dbEventCount++,[2,Promise.reject()];case 4:return[2]}})})},x}(),ie=function(){return(ie=Object.assign||function(u){for(var f,a=1,g=arguments.length;a<g;a++)for(var A in f=arguments[a])Object.prototype.hasOwnProperty.call(f,A)&&(u[A]=f[A]);return u}).apply(this,arguments)};function le(x){try{return decodeURIComponent(x.replace(/\+/g," "))}catch(u){return null}}function ve(x,u){var f=[null,void 0,"",NaN].includes(x);if(u.isSkipEmpty&&f)return null;var a=!u.isSkipEmpty&&f?"":x;try{return u.encode?encodeURIComponent(a):a}catch(g){return null}}function Le(x){var u=x.split("#"),f=u[0],a=u[1],g=a===void 0?"":a,A=f.split("?"),_=A[0],Z=A[1],te=Z===void 0?"":Z,Ce=le(g),X=Object.create(null);return te.split("&").forEach(function(Pe){var Y=Pe.split("="),Me=Y[0],xe=Y[1],Oe=xe===void 0?"":xe,je=le(Me),Ue=le(Oe);je===null||Ue===null||je===""&&Ue===""||X[je]||(X[je]=Ue)}),{url:_,query:X,hash:Ce}}function Se(x,u){u===void 0&&(u={encode:!0,isSkipEmpty:!1});var f=x.url,a=x.query,g=a===void 0?{}:a,A=x.hash,_=f.split("#"),Z=_[0],te=_[1],Ce=te===void 0?"":te,X=Z.split("?")[0],Pe=[],Y=ve(A||Ce,u),Me=ie(ie({},Le(f).query),g);return Object.keys(Me).forEach(function(xe){var Oe=ve(xe,u),je=ve(Me[xe],u);Oe!==null&&je!==null&&Pe.push(Oe+"="+je)}),X+(Pe.length?"?"+Pe.join("&"):"")+(Y?"#"+Y:"")}function ce(x,u){return new Promise(function(f,a){if(u&&document.querySelectorAll("script[data-tag="+u+"]").length)return f();var g=document.createElement("script"),A=ie({type:"text/javascript",charset:"utf-8"},x);Object.keys(A).forEach(function(_){return function(Z,te,Ce){if(Z)return Ce===void 0?Z.getAttribute(te):Z.setAttribute(te,Ce)}(g,_,A[_])}),u&&(g.dataset.tag=u),g.onload=function(){return f()},g.onreadystatechange=function(){var _=g.readyState;["complete","loaded"].includes(_)&&(g.onreadystatechange=null,f())},g.onerror=a,document.body.appendChild(g)})}(function(x){x[x.equal=0]="equal",x[x.low=-1]="low",x[x.high=1]="high"})(z||(z={}));var me=function(){return(me=Object.assign||function(u){for(var f,a=1,g=arguments.length;a<g;a++)for(var A in f=arguments[a])Object.prototype.hasOwnProperty.call(f,A)&&(u[A]=f[A]);return u}).apply(this,arguments)};function be(x,u,f,a){return new(f||(f=Promise))(function(g,A){function _(Ce){try{te(a.next(Ce))}catch(X){A(X)}}function Z(Ce){try{te(a.throw(Ce))}catch(X){A(X)}}function te(Ce){var X;Ce.done?g(Ce.value):(X=Ce.value,X instanceof f?X:new f(function(Pe){Pe(X)})).then(_,Z)}te((a=a.apply(x,u||[])).next())})}function Ee(x,u){var f,a,g,A,_={label:0,sent:function(){if(1&g[0])throw g[1];return g[1]},trys:[],ops:[]};return A={next:Z(0),throw:Z(1),return:Z(2)},typeof Symbol=="function"&&(A[Symbol.iterator]=function(){return this}),A;function Z(te){return function(Ce){return function(X){if(f)throw new TypeError("Generator is already executing.");for(;_;)try{if(f=1,a&&(g=2&X[0]?a.return:X[0]?a.throw||((g=a.return)&&g.call(a),0):a.next)&&!(g=g.call(a,X[1])).done)return g;switch(a=0,g&&(X=[2&X[0],g.value]),X[0]){case 0:case 1:g=X;break;case 4:return _.label++,{value:X[1],done:!1};case 5:_.label++,a=X[1],X=[0];continue;case 7:X=_.ops.pop(),_.trys.pop();continue;default:if(!((g=(g=_.trys).length>0&&g[g.length-1])||X[0]!==6&&X[0]!==2)){_=0;continue}if(X[0]===3&&(!g||X[1]>g[0]&&X[1]<g[3])){_.label=X[1];break}if(X[0]===6&&_.label<g[1]){_.label=g[1],g=X;break}if(g&&_.label<g[2]){_.label=g[2],_.ops.push(X);break}g[2]&&_.ops.pop(),_.trys.pop();continue}X=u.call(x,_)}catch(Pe){X=[6,Pe],a=0}finally{f=g=0}if(5&X[0])throw X[1];return{value:X[0]?X[1]:void 0,done:!0}}([te,Ce])}}}var De=function(){function x(){this.interceptors=[]}return x.prototype.use=function(u,f){return this.interceptors.push({resolved:u,rejected:f}),this.interceptors.length-1},x.prototype.traverse=function(u,f){f===void 0&&(f=!1);var a=Promise.resolve(u);return(f?Array.prototype.reduceRight:Array.prototype.reduce).call(this.interceptors,function(g,A){if(A){var _=A.resolved,Z=A.rejected;a=a.then(_,Z)}return g},""),a},x.prototype.eject=function(u){this.interceptors[u]&&(this.interceptors[u]=null)},x}(),ke={defaults:{timeout:0,method:"GET",mode:"cors",redirect:"follow",credentials:"same-origin"},headers:{common:{Accept:"application/json, text/plain, */*"},POST:{"Content-Type":"application/x-www-form-urlencoded"},PUT:{"Content-Type":"application/x-www-form-urlencoded"},PATCH:{"Content-Type":"application/x-www-form-urlencoded"}},baseURL:"",polyfillUrl:"https://vm.gtimg.cn/comps/script/fetch.min.js",interceptors:{request:new De,response:new De}},Be=/^([a-z][a-z\d+\-.]*:)?\/\//i,Ne=Object.prototype.toString;function we(x){return be(this,void 0,void 0,function(){var u;return Ee(this,function(f){switch(f.label){case 0:if(window.fetch)return[2];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,ce({src:x})];case 2:return f.sent(),[3,4];case 3:throw u=f.sent(),function(a){if(typeof Image!="undefined"){var g=new Image(1,1),A=me({attaid:"0f400053130",token:"6552374442",comps:"@tencent/ovb-request",version:"1.1.18",ua:navigator.userAgent,url:location.href,_dc:Math.random()},a),_=Object.keys(A).map(function(Z){return Z+"="+encodeURIComponent(A[Z])}).join("&");g.src="https://h.trace.qq.com/kv?"+_}}({func:"loadPolyfill",result:0,params:x,error_msg:u.message}),new Error("\u52A0\u8F7D polyfill "+x+" \u5931\u8D25: "+u.message);case 4:return[2]}})})}function J(x){return["Accept","Content-Type"].forEach(function(u){return f=u,void((a=x.headers)&&Object.keys(a).forEach(function(g){g!==f&&g.toUpperCase()===f.toUpperCase()&&(a[f]=a[g],delete a[g])}));var f,a}),function(u){if(Ne.call(u)!=="[object Object]")return!1;var f=Object.getPrototypeOf(u);return f===null||f===Object.prototype}(x.body)&&(x.body=JSON.stringify(x.body),x.headers&&(x.headers["Content-Type"]="application/json;charset=utf-8")),x}function T(x){return be(this,void 0,void 0,function(){var u,f,a,g,A,_,Z,te,Ce,X,Pe,Y,Me,xe,Oe,je,Ue;return Ee(this,function(Fe){switch(Fe.label){case 0:return u=ke.baseURL,f=ke.defaults,a=ke.interceptors,[4,we(ke.polyfillUrl)];case 1:return Fe.sent(),(g=me(me({},f),x)).headers||(g.headers=function(ze){ze===void 0&&(ze="GET");var Je=ke.headers[ze]||{};return me(me({},ke.headers.common),Je)}(g.method)),J(g),[4,a.request.traverse(g,!0)];case 2:if((A=Fe.sent())instanceof Error)throw A;return A.url=function(ze,Je){return!ze||Be.test(Je)?Je:ze.replace(/\/+$/,"")+"/"+Je.replace(/^\/+/,"")}(u,A.url),_=A.url,Z=A.timeout,te=A.params,Ce=A.method,X=["GET","DELETE","OPTIONS","HEAD"].includes(Ce===void 0?"GET":Ce)&&!!te,Pe=X?Se({url:_,query:te}):_,Y=[],Z&&!A.signal&&(Oe=new Promise(function(ze){Me=setTimeout(function(){ze(new Error("timeout"))},Z)}),Y.push(Oe),xe=new AbortController,A.signal=xe.signal),Y.push(fetch(Pe,A).catch(function(ze){return ze})),[4,Promise.race(Y)];case 3:return je=Fe.sent(),Me&&clearTimeout(Me),[4,a.response.traverse(je)];case 4:if((Ue=Fe.sent())instanceof Error)throw xe==null||xe.abort(),Ue;return[2,Ue]}})})}var U=function(){function x(u){ke.interceptors.request.use(function(f){var a=f.url,g=f.method,A=f.body,_=A;if(u.onReportBeforeSend){var Z=u.onReportBeforeSend({url:a,method:g,data:A?JSON.parse(A):null});_=(Z==null?void 0:Z.data)?JSON.stringify(Z.data):null}if(g!=="GET"&&!_)throw new Error("No data for sdk, cancel.");return fe(fe({},f),{body:_})})}return x.prototype.get=function(u,f){return N(this,void 0,void 0,function(){var a,g;return w(this,function(A){switch(A.label){case 0:return[4,T(fe({url:u},f))];case 1:return[4,(a=A.sent()).json()];case 2:return g=A.sent(),[2,Promise.resolve({data:g,status:a.status,statusText:a.statusText,headers:a.headers})]}})})},x.prototype.post=function(u,f,a){return N(this,void 0,void 0,function(){var g,A;return w(this,function(_){switch(_.label){case 0:return[4,T(fe({url:u,body:f,method:"POST"},a))];case 1:return[4,(g=_.sent()).json()];case 2:return A=_.sent(),[2,Promise.resolve({data:A,status:g.status,statusText:g.statusText,headers:g.headers})]}})})},x}(),I=function(){function x(u){this.appkey=u}return x.prototype.getItem=function(u){try{return window.localStorage.getItem(this.getStoreKey(u))}catch(f){return""}},x.prototype.removeItem=function(u){try{window.localStorage.removeItem(this.getStoreKey(u))}catch(f){}},x.prototype.setItem=function(u,f){try{window.localStorage.setItem(this.getStoreKey(u),f)}catch(a){}},x.prototype.setSessionItem=function(u,f){try{window.sessionStorage.setItem(this.getStoreKey(u),f)}catch(a){}},x.prototype.getSessionItem=function(u){try{return window.sessionStorage.getItem(this.getStoreKey(u))}catch(f){return""}},x.prototype.getStoreKey=function(u){return V+this.appkey+"_"+u},x.prototype.createDeviceId=function(){try{var u=window.localStorage.getItem(G);return u||(u=function(f){for(var a="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz0123456789",g="",A=0;A<f;A++)g+=a.charAt(Math.floor(Math.random()*a.length));return g}(32),window.localStorage.setItem(G,u)),u}catch(f){return""}},x.prototype.clear=function(){try{for(var u=window.localStorage.length,f=0;f<u;f++){var a=window.localStorage.key(f);(a==null?void 0:a.substr(0,9))==V&&window.localStorage.removeItem(a)}}catch(g){}},x.prototype.getStoreCount=function(){var u=0;try{u=window.localStorage.length}catch(f){}return u},x}(),$=function(x){var u={exports:{}};return x(u,u.exports),u.exports}(function(x,u){x.exports=function(){function f(_,Z,te,Ce,X,Pe,Y){try{var Me=_[Pe](Y),xe=Me.value}catch(Oe){return void te(Oe)}Me.done?Z(xe):Promise.resolve(xe).then(Ce,X)}function a(_,Z){for(var te=0;te<Z.length;te++){var Ce=Z[te];Ce.enumerable=Ce.enumerable||!1,Ce.configurable=!0,"value"in Ce&&(Ce.writable=!0),Object.defineProperty(_,Ce.key,Ce)}}var g,A=(function(_){_=function(Z){var te,Ce=Object.prototype,X=Ce.hasOwnProperty,Pe=typeof Symbol=="function"?Symbol:{},Y=Pe.iterator||"@@iterator",Me=Pe.asyncIterator||"@@asyncIterator",xe=Pe.toStringTag||"@@toStringTag";function Oe(l,c,y){return Object.defineProperty(l,c,{value:y,enumerable:!0,configurable:!0,writable:!0}),l[c]}try{Oe({},"")}catch(l){Oe=function(y,k,j){return y[k]=j}}function je(l,c,y,k){var j,de,se,Te;return c=c&&c.prototype instanceof Xe?c:Xe,c=Object.create(c.prototype),k=new r(k||[]),c._invoke=(j=l,de=y,se=k,Te=Fe,function(Ie,Ge){if(Te===Je)throw new Error("Generator is already running");if(Te===tt){if(Ie==="throw")throw Ge;return i()}for(se.method=Ie,se.arg=Ge;;){var $e=se.delegate;if($e){var Ye=function nt(Ze,We){var He;if((He=Ze.iterator[We.method])===te){if(We.delegate=null,We.method==="throw"){if(Ze.iterator.return&&(We.method="return",We.arg=te,nt(Ze,We),We.method==="throw"))return qe;We.method="throw",We.arg=new TypeError("The iterator does not provide a 'throw' method")}return qe}return(He=Ue(He,Ze.iterator,We.arg)).type==="throw"?(We.method="throw",We.arg=He.arg,We.delegate=null,qe):(He=He.arg)?He.done?(We[Ze.resultName]=He.value,We.next=Ze.nextLoc,We.method!=="return"&&(We.method="next",We.arg=te),We.delegate=null,qe):He:(We.method="throw",We.arg=new TypeError("iterator result is not an object"),We.delegate=null,qe)}($e,se);if(Ye){if(Ye===qe)continue;return Ye}}if(se.method==="next")se.sent=se._sent=se.arg;else if(se.method==="throw"){if(Te===Fe)throw Te=tt,se.arg;se.dispatchException(se.arg)}else se.method==="return"&&se.abrupt("return",se.arg);if(Te=Je,(Ye=Ue(j,de,se)).type==="normal"){if(Te=se.done?tt:ze,Ye.arg!==qe)return{value:Ye.arg,done:se.done}}else Ye.type==="throw"&&(Te=tt,se.method="throw",se.arg=Ye.arg)}}),c}function Ue(l,c,y){try{return{type:"normal",arg:l.call(c,y)}}catch(k){return{type:"throw",arg:k}}}Z.wrap=je;var Fe="suspendedStart",ze="suspendedYield",Je="executing",tt="completed",qe={};function Xe(){}function Ve(){}function o(){}var h={};h[Y]=function(){return this},(Pe=(Pe=Object.getPrototypeOf)&&Pe(Pe(t([]))))&&Pe!==Ce&&X.call(Pe,Y)&&(h=Pe);var C=o.prototype=Xe.prototype=Object.create(h);function O(l){["next","throw","return"].forEach(function(c){Oe(l,c,function(y){return this._invoke(c,y)})})}function ae(l,c){var y;this._invoke=function(k,j){function de(){return new c(function(se,Te){(function Ie(Ge,$e,Ye,nt){if((Ge=Ue(l[Ge],l,$e)).type!=="throw"){var Ze=Ge.arg;return($e=Ze.value)&&E($e)=="object"&&X.call($e,"__await")?c.resolve($e.__await).then(function(We){Ie("next",We,Ye,nt)},function(We){Ie("throw",We,Ye,nt)}):c.resolve($e).then(function(We){Ze.value=We,Ye(Ze)},function(We){return Ie("throw",We,Ye,nt)})}nt(Ge.arg)})(k,j,se,Te)})}return y=y?y.then(de,de):de()}}function ue(l){var c={tryLoc:l[0]};1 in l&&(c.catchLoc=l[1]),2 in l&&(c.finallyLoc=l[2],c.afterLoc=l[3]),this.tryEntries.push(c)}function e(l){var c=l.completion||{};c.type="normal",delete c.arg,l.completion=c}function r(l){this.tryEntries=[{tryLoc:"root"}],l.forEach(ue,this),this.reset(!0)}function t(l){if(l){if(c=l[Y])return c.call(l);if(typeof l.next=="function")return l;if(!isNaN(l.length)){var c,y=-1;return(c=function k(){for(;++y<l.length;)if(X.call(l,y))return k.value=l[y],k.done=!1,k;return k.value=te,k.done=!0,k}).next=c}}return{next:i}}function i(){return{value:te,done:!0}}return((Ve.prototype=C.constructor=o).constructor=Ve).displayName=Oe(o,xe,"GeneratorFunction"),Z.isGeneratorFunction=function(l){return!!(l=typeof l=="function"&&l.constructor)&&(l===Ve||(l.displayName||l.name)==="GeneratorFunction")},Z.mark=function(l){return Object.setPrototypeOf?Object.setPrototypeOf(l,o):(l.__proto__=o,Oe(l,xe,"GeneratorFunction")),l.prototype=Object.create(C),l},Z.awrap=function(l){return{__await:l}},O(ae.prototype),ae.prototype[Me]=function(){return this},Z.AsyncIterator=ae,Z.async=function(l,c,y,k,j){j===void 0&&(j=Promise);var de=new ae(je(l,c,y,k),j);return Z.isGeneratorFunction(c)?de:de.next().then(function(se){return se.done?se.value:de.next()})},O(C),Oe(C,xe,"Generator"),C[Y]=function(){return this},C.toString=function(){return"[object Generator]"},Z.keys=function(l){var c,y=[];for(c in l)y.push(c);return y.reverse(),function k(){for(;y.length;){var j=y.pop();if(j in l)return k.value=j,k.done=!1,k}return k.done=!0,k}},Z.values=t,r.prototype={constructor:r,reset:function(c){if(this.prev=0,this.next=0,this.sent=this._sent=te,this.done=!1,this.delegate=null,this.method="next",this.arg=te,this.tryEntries.forEach(e),!c)for(var y in this)y.charAt(0)==="t"&&X.call(this,y)&&!isNaN(+y.slice(1))&&(this[y]=te)},stop:function(){this.done=!0;var c=this.tryEntries[0].completion;if(c.type==="throw")throw c.arg;return this.rval},dispatchException:function(c){if(this.done)throw c;var y=this;function k(Ge,$e){return se.type="throw",se.arg=c,y.next=Ge,$e&&(y.method="next",y.arg=te),!!$e}for(var j=this.tryEntries.length-1;0<=j;--j){var de=this.tryEntries[j],se=de.completion;if(de.tryLoc==="root")return k("end");if(de.tryLoc<=this.prev){var Te=X.call(de,"catchLoc"),Ie=X.call(de,"finallyLoc");if(Te&&Ie){if(this.prev<de.catchLoc)return k(de.catchLoc,!0);if(this.prev<de.finallyLoc)return k(de.finallyLoc)}else if(Te){if(this.prev<de.catchLoc)return k(de.catchLoc,!0)}else{if(!Ie)throw new Error("try statement without catch or finally");if(this.prev<de.finallyLoc)return k(de.finallyLoc)}}}},abrupt:function(c,y){for(var k=this.tryEntries.length-1;0<=k;--k){var j=this.tryEntries[k];if(j.tryLoc<=this.prev&&X.call(j,"finallyLoc")&&this.prev<j.finallyLoc){var de=j;break}}var se=(de=de&&(c==="break"||c==="continue")&&de.tryLoc<=y&&y<=de.finallyLoc?null:de)?de.completion:{};return se.type=c,se.arg=y,de?(this.method="next",this.next=de.finallyLoc,qe):this.complete(se)},complete:function(c,y){if(c.type==="throw")throw c.arg;return c.type==="break"||c.type==="continue"?this.next=c.arg:c.type==="return"?(this.rval=this.arg=c.arg,this.method="return",this.next="end"):c.type==="normal"&&y&&(this.next=y),qe},finish:function(c){for(var y=this.tryEntries.length-1;0<=y;--y){var k=this.tryEntries[y];if(k.finallyLoc===c)return this.complete(k.completion,k.afterLoc),e(k),qe}},catch:function(c){for(var y=this.tryEntries.length-1;0<=y;--y){var k=this.tryEntries[y];if(k.tryLoc===c){var j,de=k.completion;return de.type==="throw"&&(j=de.arg,e(k)),j}}throw new Error("illegal catch attempt")},delegateYield:function(c,y,k){return this.delegate={iterator:t(c),resultName:y,nextLoc:k},this.method==="next"&&(this.arg=te),qe}},Z}(_.exports);try{regeneratorRuntime=_}catch(Z){Function("r","regeneratorRuntime = r")(_)}}(g={exports:{}}),g.exports);return function(){function _(Pe){(function(xe,Oe){if(!(xe instanceof Oe))throw new TypeError("Cannot call a class as a function")})(this,_),this.version="1.0.0";var Y=Array.prototype.map,Me=Array.prototype.forEach;Pe&&(this.hasher=Pe),this.each=function(xe,Oe,je){if(xe!=null){if(Me&&xe.forEach===Me)xe.forEach(Oe,je);else if(xe.length===+xe.length){for(var Ue=0,Fe=xe.length;Ue<Fe;Ue++)if(Oe.call(je,xe[Ue],Ue,xe)==={})return}else for(var ze in xe)if(xe.hasOwnProperty(ze)&&Oe.call(je,xe[ze],ze,xe)==={})return}},this.map=function(xe,Oe,je){var Ue=[];return xe==null?Ue:Y&&xe.map===Y?xe.map(Oe,je):(this.each(xe,function(Fe,ze,Je){Ue[Ue.length]=Oe.call(je,Fe,ze,Je)}),Ue)}}var Z,te,Ce,X;return Z=_,(te=[{key:"getQimei36",value:function(Y,Me){var xe=this;this.getHid().then(function(Oe){var je="3BJr"+Y.substring(0,2)+(Oe&&Oe.substring(3,7)),Ue=new XMLHttpRequest;Ue.open("POST","https://snowflake.qq.com/ola/h5",!0),Ue.setRequestHeader("Content-Type","application/json"),Ue.onreadystatechange=function(){if(Ue.readyState==XMLHttpRequest.DONE&&Ue.status==200)try{Me&&Me(JSON.parse(Ue.responseText))}catch(Fe){Me(null)}},Ue.send(JSON.stringify({appKey:Y,hid:Oe,sign:je,version:xe.version}))})}},{key:"getHid",value:(Ce=A.mark(function Pe(){var Y,Me;return A.wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:return(Y=[]).push((Oe=void 0,(Oe=[Math.floor(window.screen.width*window.devicePixelRatio),Math.floor(window.screen.height*window.devicePixelRatio)]).sort().reverse(),Oe.join("x"))),Y.push((Oe=void 0,(Oe=[Math.floor(window.screen.availWidth*window.devicePixelRatio),Math.floor(window.screen.availHeight*window.devicePixelRatio)]).sort().reverse(),Oe.join("x"))),Y.push(navigator.deviceMemory),Y.push(!!window.sessionStorage),Y.push(!!window.indexedDB),Y.push(navigator.productSub),Y.push(navigator.hardwareConcurrency),Y.push(this.getWebglVendorAndRenderer()),Y.push(new Date().getTimezoneOffset()),xe.next=12,this.getFactor();case 12:if(Me=xe.sent,Y.push(Me),this.hasher)return xe.abrupt("return",this.hasher(Y.join("###"),31));xe.next=18;break;case 18:return xe.abrupt("return",this.x64hash128(Y.join("###"),31));case 19:case"end":return xe.stop()}var Oe},Pe,this)}),X=function(){var Y=this,Me=arguments;return new Promise(function(xe,Oe){var je=Ce.apply(Y,Me);function Ue(ze){f(je,xe,Oe,Ue,Fe,"next",ze)}function Fe(ze){f(je,xe,Oe,Ue,Fe,"throw",ze)}Ue(void 0)})},function(){return X.apply(this,arguments)})},{key:"getUserAgent",value:function(){return navigator.userAgent}},{key:"getNative",value:function(){var Y=this;this.getHid().then(function(Me){JSInterface.callback(Y.version,Me,Y.getUserAgent())})}},{key:"getWebglVendorAndRenderer",value:function(){try{var Y=function(){var je=document.createElement("canvas"),Ue=null;try{Ue=je.getContext("webgl")||je.getContext("experimental-webgl")}catch(Fe){}return Ue||null}(),Me=Y.getExtension("WEBGL_debug_renderer_info"),xe=[Y.getParameter(Me.UNMASKED_VENDOR_WEBGL),Y.getParameter(Me.UNMASKED_RENDERER_WEBGL)].join("~"),Oe=Y.getExtension("WEBGL_lose_context");return Oe!=null&&Oe.loseContext(),xe}catch(je){return null}}},{key:"getFactor",value:function(){return new Promise(function(Y,Me){var xe=window.RTCPeerConnection||window.webkitRTCPeerConnection||window.mozRTCPeerConnection;xe?function(){var Oe=new xe({iceServers:[]});Oe.createDataChannel("",{reliable:!1}),Oe.onicecandidate=function(ze){ze.candidate&&Fe("a=".concat(ze.candidate.candidate))},Oe.createOffer(function(ze){Fe(ze.sdp),Oe.setLocalDescription(ze)},function(ze){});var je=Object.create(null);function Ue(ze){if(!(ze in je)){je[ze]=!0;for(var Je=Object.keys(je).filter(function(qe){return je[qe]}),tt=0;tt<Je.length;tt++)16<Je[tt].length&&(Je.splice(tt,1),tt--);Y(Je[0])}}function Fe(ze){(0<arguments.length&&ze!==void 0?ze:"").split(`\r
  2. `).forEach(function(Je,tt,qe){var Xe,Ve;~Je.indexOf("a=candidate")?(Ve=(Xe=Je.split(" "))[4],Xe[7]==="host"&&Ue(Ve)):~Je.indexOf("c=")&&Ue(Je.split(" ")[2])})}je["0.0.0.0"]=!1}():Y(null)})}},{key:"x64hash128",value:function(Y,Me){for(var xe=function(ue,e){ue=[ue[0]>>>16,65535&ue[0],ue[1]>>>16,65535&ue[1]],e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]];var r=[0,0,0,0];return r[3]+=ue[3]+e[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=ue[2]+e[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=ue[1]+e[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=ue[0]+e[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]},Oe=function(ue,e){ue=[ue[0]>>>16,65535&ue[0],ue[1]>>>16,65535&ue[1]],e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]];var r=[0,0,0,0];return r[3]+=ue[3]*e[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=ue[2]*e[3],r[1]+=r[2]>>>16,r[2]&=65535,r[2]+=ue[3]*e[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=ue[1]*e[3],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=ue[2]*e[2],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=ue[3]*e[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=ue[0]*e[3]+ue[1]*e[2]+ue[2]*e[1]+ue[3]*e[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]},je=function(ue,e){return(e%=64)==32?[ue[1],ue[0]]:e<32?[ue[0]<<e|ue[1]>>>32-e,ue[1]<<e|ue[0]>>>32-e]:[ue[1]<<(e-=32)|ue[0]>>>32-e,ue[0]<<e|ue[1]>>>32-e]},Ue=function(ue,e){return(e%=64)==0?ue:e<32?[ue[0]<<e|ue[1]>>>32-e,ue[1]<<e]:[ue[1]<<e-32,0]},Fe=function(ue,e){return[ue[0]^e[0],ue[1]^e[1]]},ze=function(ue){return ue=Fe(ue,[0,ue[0]>>>1]),ue=Oe(ue,[4283543511,3981806797]),ue=Fe(ue,[0,ue[0]>>>1]),ue=Oe(ue,[3301882366,444984403]),Fe(ue,[0,ue[0]>>>1])},Je=(Y=Y||"").length%16,tt=Y.length-Je,qe=[0,Me=Me||0],Xe=[0,Me],Ve=[0,0],o=[0,0],h=[2277735313,289559509],C=[1291169091,658871167],O=0;O<tt;O+=16)Ve=[255&Y.charCodeAt(O+4)|(255&Y.charCodeAt(O+5))<<8|(255&Y.charCodeAt(O+6))<<16|(255&Y.charCodeAt(O+7))<<24,255&Y.charCodeAt(O)|(255&Y.charCodeAt(O+1))<<8|(255&Y.charCodeAt(O+2))<<16|(255&Y.charCodeAt(O+3))<<24],o=[255&Y.charCodeAt(O+12)|(255&Y.charCodeAt(O+13))<<8|(255&Y.charCodeAt(O+14))<<16|(255&Y.charCodeAt(O+15))<<24,255&Y.charCodeAt(O+8)|(255&Y.charCodeAt(O+9))<<8|(255&Y.charCodeAt(O+10))<<16|(255&Y.charCodeAt(O+11))<<24],Ve=je(Ve=Oe(Ve,h),31),Ve=Oe(Ve,C),qe=xe(qe=je(qe=Fe(qe,Ve),27),Xe),qe=xe(Oe(qe,[0,5]),[0,1390208809]),o=je(o=Oe(o,C),33),o=Oe(o,h),Xe=xe(Xe=je(Xe=Fe(Xe,o),31),qe),Xe=xe(Oe(Xe,[0,5]),[0,944331445]);switch(Ve=[0,0],o=[0,0],Je){case 15:o=Fe(o,Ue([0,Y.charCodeAt(O+14)],48));case 14:o=Fe(o,Ue([0,Y.charCodeAt(O+13)],40));case 13:o=Fe(o,Ue([0,Y.charCodeAt(O+12)],32));case 12:o=Fe(o,Ue([0,Y.charCodeAt(O+11)],24));case 11:o=Fe(o,Ue([0,Y.charCodeAt(O+10)],16));case 10:o=Fe(o,Ue([0,Y.charCodeAt(O+9)],8));case 9:o=Fe(o,[0,Y.charCodeAt(O+8)]),o=je(o=Oe(o,C),33),o=Oe(o,h),Xe=Fe(Xe,o);case 8:Ve=Fe(Ve,Ue([0,Y.charCodeAt(O+7)],56));case 7:Ve=Fe(Ve,Ue([0,Y.charCodeAt(O+6)],48));case 6:Ve=Fe(Ve,Ue([0,Y.charCodeAt(O+5)],40));case 5:Ve=Fe(Ve,Ue([0,Y.charCodeAt(O+4)],32));case 4:Ve=Fe(Ve,Ue([0,Y.charCodeAt(O+3)],24));case 3:Ve=Fe(Ve,Ue([0,Y.charCodeAt(O+2)],16));case 2:Ve=Fe(Ve,Ue([0,Y.charCodeAt(O+1)],8));case 1:Ve=Fe(Ve,[Y.charCodeAt(O)]),Ve=je(Ve=Oe(Ve,h),31),Ve=Oe(Ve,C),qe=Fe(qe,Ve)}return qe=Fe(qe,[0,Y.length]),Xe=xe(Xe=Fe(Xe,[0,Y.length]),qe=xe(qe,Xe)),qe=ze(qe),Xe=xe(Xe=ze(Xe),qe=xe(qe,Xe)),("00000000"+(qe[0]>>>0).toString(16)).slice(-8)+("00000000"+(qe[1]>>>0).toString(16)).slice(-8)+("00000000"+(Xe[0]>>>0).toString(16)).slice(-8)+("00000000"+(Xe[1]>>>0).toString(16)).slice(-8)}}])&&a(Z.prototype,te),_}()}()}),ge="logid_start",_e="4.5.6-web";return function(x){function u(f){var a=x.call(this,f)||this;a.qimei36="",a.uselessCycleTaskNum=0,a.underWeakNet=!1,a.send=function(Z,te,Ce){a.storage.setItem(Q,Date.now().toString()),a.network.post(a.uploadUrl||a.strategy.getUploadUrl(),Z.data).then(function(X){var Pe;((Pe=X==null?void 0:X.data)===null||Pe===void 0?void 0:Pe.result)==100?a.delayTime=1e3*X.data.delayTime:a.delayTime=0,te&&te(Z.data),Z.data.events.forEach(function(Y){a.store.removeEvent(Y).then(function(){a.removeSendingId(R(Y.mapValue))})}),a.doCustomCycleTask()}).catch(function(X){var Pe=Z.data.events;a.errorReport.reportError(X.code?X.code.toString():"600",X.message),Ce&&Ce(Z.data);var Y=JSON.parse(a.storage.getItem(M));Pe.forEach(function(Me){Y&&Y.indexOf(R(Me))!=-1&&a.store.insertEvent(Me,function(xe,Oe){xe&&a.errorReport.reportError("604","insertEvent fail!")}),a.removeSendingId(R(Me))}),a.monitorUploadFailed()})};var g,A,_=Re();return a.isUnderIE8=_>0&&_<8,a.isUnderIE8||(a.isUnderIE=_>0,f.needInitQimei&&a.initQimei(f.appkey),a.network=new U(f),a.storage=new I(f.appkey),a.initCommonInfo(f),a.store=new ye(f.appkey,a.storage),a.errorReport=new d(a.config,a.commonInfo,"web",a.network),a.strategy=new H(a.config,a.commonInfo,a.storage,a.network),a.logidStartTime=a.storage.getItem(ge),a.logidStartTime||(a.logidStartTime=Date.now().toString(),a.storage.setItem(ge,a.logidStartTime)),g=a.logidStartTime,A=Date.now()-Number.parseFloat(g),Math.floor(A/864e5)>=365&&a.storage.clear(),a.initSession(f),a.onDirectUserAction("rqd_js_init",{}),setTimeout(function(){return a.lifeCycle.emit("init")},0),a.initDelayTime=f.delay?f.delay:1e3,a.cycleTask(a.initDelayTime)),a}return function(f,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");function g(){this.constructor=f}L(f,a),f.prototype=a===null?Object.create(a):(g.prototype=a.prototype,new g)}(u,x),u.prototype.initQimei=function(f){var a=this;new $().getQimei36(f,function(g){a.qimei36=g.q36})},u.prototype.initSession=function(f){var a=18e5;f.sessionDuration&&f.sessionDuration>3e4&&(a=f.sessionDuration),this.beaconSession=new F(this.storage,a,this)},u.prototype.initCommonInfo=function(f){var a=Number(this.storage.getItem(Q));try{var g=JSON.parse(this.storage.getItem(M));(Date.now()-a>3e4||!g)&&this.storage.setItem(M,JSON.stringify([]))}catch(_){}f.uploadUrl&&(this.uploadUrl=f.uploadUrl+"?appkey="+f.appkey);var A=[window.screen.width,window.screen.height];window.devicePixelRatio&&A.push(window.devicePixelRatio),this.commonInfo={deviceId:this.storage.createDeviceId(),language:navigator&&navigator.language||"zh_CN",query:window.location.search,userAgent:navigator.userAgent,pixel:A.join("*"),channelID:f.channelID?String(f.channelID):"",openid:f.openid?String(f.openid):"",unid:f.unionid?String(f.unionid):"",sdkVersion:_e},this.config.appVersion=f.versionCode?String(f.versionCode):"",this.config.strictMode=f.strictMode},u.prototype.cycleTask=function(f){var a=this;this.intervalID=window.setInterval(function(){a.store.getEvents().then(function(g){var A=[],_=JSON.parse(a.storage.getItem(M));_||(_=[]),g&&g.forEach(function(Z){var te=R(Z.mapValue);_.indexOf(te)==-1&&(A.push(Z),_.push(te))}),A.length!=0&&(a.storage.setItem(M,JSON.stringify(_)),a._normalLogPipeline(a.assembleData(A)))}).catch(function(g){})},f)},u.prototype.onReport=function(f,a,g){var A=this;if(this.isUnderIE8)this.errorReport.reportError("601","UnderIE8");else{var _=this.generateData(f,a,g);if(g&&this.delayTime==0&&!this.underWeakNet)this._normalLogPipeline(this.assembleData(_));else{var Z=_.shift();Z&&this.store.insertEvent(Z,function(te){te&&A.errorReport.reportError("604","insertEvent fail!")}).catch(function(te){A._normalLogPipeline(A.assembleData(_))})}}},u.prototype.onSendBeacon=function(f,a){if(this.isUnderIE)this.errorReport.reportError("605","UnderIE");else{var g=this.assembleData(this.generateData(f,a,!0));typeof navigator.sendBeacon=="function"&&navigator.sendBeacon(this.uploadUrl||this.strategy.getUploadUrl(),JSON.stringify(g))}},u.prototype.generateData=function(f,a,g){var A=[],_="4.5.6-web_"+(g?"direct_log_id":"normal_log_id"),Z=Number(this.storage.getItem(_));return Z=Z||1,a=fe(fe({},a),{A99:g?"Y":"N",A100:Z.toString(),A72:_e,A88:this.logidStartTime}),Z++,this.storage.setItem(_,Z.toString()),A.push({eventCode:f,eventTime:Date.now().toString(),mapValue:Ae(a,this.config.strictMode)}),A},u.prototype.assembleData=function(f){var a=this.beaconSession.getSession();return{appVersion:this.config.appVersion?D(this.config.appVersion):"",sdkId:"js",sdkVersion:_e,mainAppKey:this.config.appkey,platformId:3,common:Ae(fe(fe({},this.additionalParams),{A2:this.commonInfo.deviceId,A8:this.commonInfo.openid,A12:this.commonInfo.language,A17:this.commonInfo.pixel,A23:this.commonInfo.channelID,A50:this.commonInfo.unid,A76:a.sessionId,A101:this.commonInfo.userAgent,A102:window.location.href,A104:document.referrer,A119:this.commonInfo.query,A153:this.qimei36}),!1),events:f}},u.prototype.monitorUploadFailed=function(){this.uselessCycleTaskNum++,this.uselessCycleTaskNum>=5&&(window.clearInterval(this.intervalID),this.cycleTask(6e4),this.underWeakNet=!0)},u.prototype.doCustomCycleTask=function(){this.uselessCycleTaskNum>=5&&(window.clearInterval(this.intervalID),this.cycleTask(this.initDelayTime)),this.uselessCycleTaskNum=0,this.underWeakNet=!1},u}(B)})}).call(this,s("./node_modules/webpack/buildin/global.js"))},"./lib/crypto.js":function(p,S,s){(function(v){var n=s("./node_modules/@babel/runtime/helpers/typeof.js"),ee=ee||function(E,L){var fe={},N=fe.lib={},w=function(){},V=N.Base={extend:function(R){w.prototype=this;var m=new w;return R&&m.mixIn(R),m.hasOwnProperty("init")||(m.init=function(){m.$super.init.apply(this,arguments)}),m.init.prototype=m,m.$super=this,m},create:function(){var R=this.extend();return R.init.apply(R,arguments),R},init:function(){},mixIn:function(R){for(var m in R)R.hasOwnProperty(m)&&(this[m]=R[m]);R.hasOwnProperty("toString")&&(this.toString=R.toString)},clone:function(){return this.init.prototype.extend(this)}},G=N.WordArray=V.extend({init:function(R,m){R=this.words=R||[],this.sigBytes=m!=L?m:4*R.length},toString:function(R){return(R||M).stringify(this)},concat:function(R){var m=this.words,B=R.words,d=this.sigBytes;if(R=R.sigBytes,this.clamp(),d%4)for(var H=0;H<R;H++)m[d+H>>>2]|=(B[H>>>2]>>>24-8*(H%4)&255)<<24-8*((d+H)%4);else if(65535<B.length)for(H=0;H<R;H+=4)m[d+H>>>2]=B[H>>>2];else m.push.apply(m,B);return this.sigBytes+=R,this},clamp:function(){var R=this.words,m=this.sigBytes;R[m>>>2]&=4294967295<<32-8*(m%4),R.length=E.ceil(m/4)},clone:function(){var R=V.clone.call(this);return R.words=this.words.slice(0),R},random:function(R){for(var m=[],B=0;B<R;B+=4)m.push(4294967296*E.random()|0);return new G.init(m,R)}}),Q=fe.enc={},M=Q.Hex={stringify:function(R){var m=R.words;R=R.sigBytes;for(var B=[],d=0;d<R;d++){var H=m[d>>>2]>>>24-8*(d%4)&255;B.push((H>>>4).toString(16)),B.push((H&15).toString(16))}return B.join("")},parse:function(R){for(var m=R.length,B=[],d=0;d<m;d+=2)B[d>>>3]|=parseInt(R.substr(d,2),16)<<24-4*(d%8);return new G.init(B,m/2)}},q=Q.Latin1={stringify:function(R){var m=R.words;R=R.sigBytes;for(var B=[],d=0;d<R;d++)B.push(String.fromCharCode(m[d>>>2]>>>24-8*(d%4)&255));return B.join("")},parse:function(R){for(var m=R.length,B=[],d=0;d<m;d++)B[d>>>2]|=(R.charCodeAt(d)&255)<<24-8*(d%4);return new G.init(B,m)}},re=Q.Utf8={stringify:function(R){try{return decodeURIComponent(escape(q.stringify(R)))}catch(m){throw Error("Malformed UTF-8 data")}},parse:function(R){return q.parse(unescape(encodeURIComponent(R)))}},K=N.BufferedBlockAlgorithm=V.extend({reset:function(){this._data=new G.init,this._nDataBytes=0},_append:function(R){typeof R=="string"&&(R=re.parse(R)),this._data.concat(R),this._nDataBytes+=R.sigBytes},_process:function(R){var m=this._data,B=m.words,d=m.sigBytes,H=this.blockSize,P=d/(4*H),P=R?E.ceil(P):E.max((P|0)-this._minBufferSize,0);if(R=P*H,d=E.min(4*R,d),R){for(var F=0;F<R;F+=H)this._doProcessBlock(B,F);F=B.splice(0,R),m.sigBytes-=d}return new G.init(F,d)},clone:function(){var R=V.clone.call(this);return R._data=this._data.clone(),R},_minBufferSize:0});N.Hasher=K.extend({cfg:V.extend(),init:function(R){this.cfg=this.cfg.extend(R),this.reset()},reset:function(){K.reset.call(this),this._doReset()},update:function(R){return this._append(R),this._process(),this},finalize:function(R){return R&&this._append(R),this._doFinalize()},blockSize:16,_createHelper:function(R){return function(m,B){return new R.init(B).finalize(m)}},_createHmacHelper:function(R){return function(m,B){return new Ae.HMAC.init(R,B).finalize(m)}}});var Ae=fe.algo={};return fe}(Math);(function(){var E=ee,L=E.lib,fe=L.WordArray,N=L.Hasher,w=[],L=E.algo.SHA1=N.extend({_doReset:function(){this._hash=new fe.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(G,Q){for(var M=this._hash.words,q=M[0],re=M[1],K=M[2],Ae=M[3],D=M[4],R=0;80>R;R++){if(16>R)w[R]=G[Q+R]|0;else{var m=w[R-3]^w[R-8]^w[R-14]^w[R-16];w[R]=m<<1|m>>>31}m=(q<<5|q>>>27)+D+w[R],m=20>R?m+((re&K|~re&Ae)+1518500249):40>R?m+((re^K^Ae)+1859775393):60>R?m+((re&K|re&Ae|K&Ae)-1894007588):m+((re^K^Ae)-899497514),D=Ae,Ae=K,K=re<<30|re>>>2,re=q,q=m}M[0]=M[0]+q|0,M[1]=M[1]+re|0,M[2]=M[2]+K|0,M[3]=M[3]+Ae|0,M[4]=M[4]+D|0},_doFinalize:function(){var G=this._data,Q=G.words,M=8*this._nDataBytes,q=8*G.sigBytes;return Q[q>>>5]|=128<<24-q%32,Q[(q+64>>>9<<4)+14]=Math.floor(M/4294967296),Q[(q+64>>>9<<4)+15]=M,G.sigBytes=4*Q.length,this._process(),this._hash},clone:function(){var G=N.clone.call(this);return G._hash=this._hash.clone(),G}});E.SHA1=N._createHelper(L),E.HmacSHA1=N._createHmacHelper(L)})(),function(){var E=ee,L=E.enc.Utf8;E.algo.HMAC=E.lib.Base.extend({init:function(N,w){N=this._hasher=new N.init,typeof w=="string"&&(w=L.parse(w));var V=N.blockSize,G=4*V;w.sigBytes>G&&(w=N.finalize(w)),w.clamp();for(var Q=this._oKey=w.clone(),M=this._iKey=w.clone(),q=Q.words,re=M.words,K=0;K<V;K++)q[K]^=1549556828,re[K]^=909522486;Q.sigBytes=M.sigBytes=G,this.reset()},reset:function(){var N=this._hasher;N.reset(),N.update(this._iKey)},update:function(N){return this._hasher.update(N),this},finalize:function(N){var w=this._hasher;return N=w.finalize(N),w.reset(),w.finalize(this._oKey.clone().concat(N))}})}(),function(){var E=ee,L=E.lib,fe=L.WordArray,N=E.enc,w=N.Base64={stringify:function(G){var Q=G.words,M=G.sigBytes,q=this._map;G.clamp();for(var re=[],K=0;K<M;K+=3)for(var Ae=Q[K>>>2]>>>24-K%4*8&255,D=Q[K+1>>>2]>>>24-(K+1)%4*8&255,R=Q[K+2>>>2]>>>24-(K+2)%4*8&255,m=Ae<<16|D<<8|R,B=0;B<4&&K+B*.75<M;B++)re.push(q.charAt(m>>>6*(3-B)&63));var d=q.charAt(64);if(d)for(;re.length%4;)re.push(d);return re.join("")},parse:function(G){var Q=G.length,M=this._map,q=M.charAt(64);if(q){var re=G.indexOf(q);re!=-1&&(Q=re)}for(var K=[],Ae=0,D=0;D<Q;D++)if(D%4){var R=M.indexOf(G.charAt(D-1))<<D%4*2,m=M.indexOf(G.charAt(D))>>>6-D%4*2;K[Ae>>>2]|=(R|m)<<24-Ae%4*8,Ae++}return fe.create(K,Ae)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),n(v)==="object"?v.exports=ee:window.CryptoJS=ee}).call(this,s("./node_modules/webpack/buildin/module.js")(p))},"./lib/json2xml.js":function(p,S,s){var v=s("./node_modules/@babel/runtime/helpers/typeof.js"),n="a-zA-Z_\xC0-\xD6\xD8-\xF6\xF8-\xFF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FFF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD",ee="-.0-9\xB7\u0300-\u036F\u203F\u2040",E=new RegExp("^([^"+n+"])|^((x|X)(m|M)(l|L))|([^"+n+ee+"])","g"),L=/[^\x09\x0A\x0D\x20-\xFF\x85\xA0-\uD7FF\uE000-\uFDCF\uFDE0-\uFFFD]/gm,fe=function(Q){var M=[];if(Q instanceof Object)for(var q in Q)Q.hasOwnProperty(q)&&M.push(q);return M},N=function(Q,M){var q=function(K,Ae,D,R,m){var B=M.indent!==void 0?M.indent:" ",d=M.prettyPrint?`
  3. `+new Array(R).join(B):"";M.removeIllegalNameCharacters&&(K=K.replace(E,"_"));var H=[d,"<",K,D||""];return Ae&&Ae.length>0?(H.push(">"),H.push(Ae),m&&H.push(d),H.push("</"),H.push(K),H.push(">")):H.push("/>"),H.join("")};return function re(K,Ae,D){var R=v(K);switch((Array.isArray?Array.isArray(K):K instanceof Array)?R="array":K instanceof Date&&(R="date"),R){case"array":var m=[];return K.map(function(P){m.push(re(P,1,D+1))}),M.prettyPrint&&m.push(`
  4. `),m.join("");break;case"date":return K.toJSON?K.toJSON():K+"";case"object":var B=[];for(var d in K)if(K.hasOwnProperty(d))if(K[d]instanceof Array)for(var H=0;H<K[d].length;H++)K[d].hasOwnProperty(H)&&B.push(q(d,re(K[d][H],0,D+1),null,D+1,fe(K[d][H]).length));else B.push(q(d,re(K[d],0,D+1),null,D+1));return M.prettyPrint&&B.length>0&&B.push(`
  5. `),B.join("");break;case"function":return K();default:return M.escape?V(K):""+K}}(Q,0,0)},w=function(Q){var M=['<?xml version="1.0" encoding="UTF-8"'];return Q&&M.push(' standalone="yes"'),M.push("?>"),M.join("")};function V(G){return(""+G).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&apos;").replace(/"/g,"&quot;").replace(L,"")}p.exports=function(G,Q){if(Q||(Q={xmlHeader:{standalone:!0},prettyPrint:!0,indent:" ",escape:!0}),typeof G=="string")try{G=JSON.parse(G.toString())}catch(K){return!1}var M="",q="";Q&&(v(Q)=="object"?(Q.xmlHeader&&(M=w(!!Q.xmlHeader.standalone)),typeof Q.docType!="undefined"&&(q="<!DOCTYPE "+Q.docType+">")):M=w()),Q=Q||{};var re=[M,Q.prettyPrint&&q?`
  6. `:"",q,N(G,Q)];return re.join("").replace(/\n{2,}/g,`
  7. `).replace(/\s+$/g,"")}},"./lib/md5.js":function(module,exports,__nested_webpack_require_93647__){(function(process,global,module){var __WEBPACK_AMD_DEFINE_RESULT__,_typeof=__nested_webpack_require_93647__("./node_modules/@babel/runtime/helpers/typeof.js");(function(){"use strict";var ERROR="input is invalid type",WINDOW=(typeof window=="undefined"?"undefined":_typeof(window))==="object",root=WINDOW?window:{};root.JS_MD5_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&(typeof self=="undefined"?"undefined":_typeof(self))==="object",NODE_JS=!root.JS_MD5_NO_NODE_JS&&(typeof process=="undefined"?"undefined":_typeof(process))==="object"&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_MD5_NO_COMMON_JS&&_typeof(module)==="object"&&module.exports,AMD=__nested_webpack_require_93647__("./node_modules/webpack/buildin/amd-options.js"),ARRAY_BUFFER=!root.JS_MD5_NO_ARRAY_BUFFER&&typeof ArrayBuffer!="undefined",HEX_CHARS="0123456789abcdef".split(""),EXTRA=[128,32768,8388608,-2147483648],SHIFT=[0,8,16,24],OUTPUT_TYPES=["hex","array","digest","buffer","arrayBuffer","base64"],BASE64_ENCODE_CHAR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),blocks=[],buffer8;if(ARRAY_BUFFER){var buffer=new ArrayBuffer(68);buffer8=new Uint8Array(buffer),blocks=new Uint32Array(buffer)}(root.JS_MD5_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(p){return Object.prototype.toString.call(p)==="[object Array]"}),ARRAY_BUFFER&&(root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(p){return _typeof(p)==="object"&&p.buffer&&p.buffer.constructor===ArrayBuffer});var createOutputMethod=function(S){return function(s,v){return new Md5(!0).update(s,v)[S]()}},createMethod=function(){var S=createOutputMethod("hex");NODE_JS&&(S=nodeWrap(S)),S.getCtx=S.create=function(){return new Md5},S.update=function(n){return S.create().update(n)};for(var s=0;s<OUTPUT_TYPES.length;++s){var v=OUTPUT_TYPES[s];S[v]=createOutputMethod(v)}return S},nodeWrap=function(method){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),nodeMethod=function(S){if(typeof S=="string")return crypto.createHash("md5").update(S,"utf8").digest("hex");if(S==null)throw ERROR;return S.constructor===ArrayBuffer&&(S=new Uint8Array(S)),Array.isArray(S)||ArrayBuffer.isView(S)||S.constructor===Buffer?crypto.createHash("md5").update(new Buffer(S)).digest("hex"):method(S)};return nodeMethod};function Md5(p){if(p)blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks,this.buffer8=buffer8;else if(ARRAY_BUFFER){var S=new ArrayBuffer(68);this.buffer8=new Uint8Array(S),this.blocks=new Uint32Array(S)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}Md5.prototype.update=function(p,S){if(!this.finalized){for(var s,v=0,n,ee=p.length,E=this.blocks,L=this.buffer8;v<ee;){if(this.hashed&&(this.hashed=!1,E[0]=E[16],E[16]=E[1]=E[2]=E[3]=E[4]=E[5]=E[6]=E[7]=E[8]=E[9]=E[10]=E[11]=E[12]=E[13]=E[14]=E[15]=0),ARRAY_BUFFER)for(n=this.start;v<ee&&n<64;++v)s=p.charCodeAt(v),S||s<128?L[n++]=s:s<2048?(L[n++]=192|s>>6,L[n++]=128|s&63):s<55296||s>=57344?(L[n++]=224|s>>12,L[n++]=128|s>>6&63,L[n++]=128|s&63):(s=65536+((s&1023)<<10|p.charCodeAt(++v)&1023),L[n++]=240|s>>18,L[n++]=128|s>>12&63,L[n++]=128|s>>6&63,L[n++]=128|s&63);else for(n=this.start;v<ee&&n<64;++v)s=p.charCodeAt(v),S||s<128?E[n>>2]|=s<<SHIFT[n++&3]:s<2048?(E[n>>2]|=(192|s>>6)<<SHIFT[n++&3],E[n>>2]|=(128|s&63)<<SHIFT[n++&3]):s<55296||s>=57344?(E[n>>2]|=(224|s>>12)<<SHIFT[n++&3],E[n>>2]|=(128|s>>6&63)<<SHIFT[n++&3],E[n>>2]|=(128|s&63)<<SHIFT[n++&3]):(s=65536+((s&1023)<<10|p.charCodeAt(++v)&1023),E[n>>2]|=(240|s>>18)<<SHIFT[n++&3],E[n>>2]|=(128|s>>12&63)<<SHIFT[n++&3],E[n>>2]|=(128|s>>6&63)<<SHIFT[n++&3],E[n>>2]|=(128|s&63)<<SHIFT[n++&3]);this.lastByteIndex=n,this.bytes+=n-this.start,n>=64?(this.start=n-64,this.hash(),this.hashed=!0):this.start=n}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Md5.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var p=this.blocks,S=this.lastByteIndex;p[S>>2]|=EXTRA[S&3],S>=56&&(this.hashed||this.hash(),p[0]=p[16],p[16]=p[1]=p[2]=p[3]=p[4]=p[5]=p[6]=p[7]=p[8]=p[9]=p[10]=p[11]=p[12]=p[13]=p[14]=p[15]=0),p[14]=this.bytes<<3,p[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},Md5.prototype.hash=function(){var p,S,s,v,n,ee,E=this.blocks;this.first?(p=E[0]-680876937,p=(p<<7|p>>>25)-271733879<<0,v=(-1732584194^p&2004318071)+E[1]-117830708,v=(v<<12|v>>>20)+p<<0,s=(-271733879^v&(p^-271733879))+E[2]-1126478375,s=(s<<17|s>>>15)+v<<0,S=(p^s&(v^p))+E[3]-1316259209,S=(S<<22|S>>>10)+s<<0):(p=this.h0,S=this.h1,s=this.h2,v=this.h3,p+=(v^S&(s^v))+E[0]-680876936,p=(p<<7|p>>>25)+S<<0,v+=(s^p&(S^s))+E[1]-389564586,v=(v<<12|v>>>20)+p<<0,s+=(S^v&(p^S))+E[2]+606105819,s=(s<<17|s>>>15)+v<<0,S+=(p^s&(v^p))+E[3]-1044525330,S=(S<<22|S>>>10)+s<<0),p+=(v^S&(s^v))+E[4]-176418897,p=(p<<7|p>>>25)+S<<0,v+=(s^p&(S^s))+E[5]+1200080426,v=(v<<12|v>>>20)+p<<0,s+=(S^v&(p^S))+E[6]-1473231341,s=(s<<17|s>>>15)+v<<0,S+=(p^s&(v^p))+E[7]-45705983,S=(S<<22|S>>>10)+s<<0,p+=(v^S&(s^v))+E[8]+1770035416,p=(p<<7|p>>>25)+S<<0,v+=(s^p&(S^s))+E[9]-1958414417,v=(v<<12|v>>>20)+p<<0,s+=(S^v&(p^S))+E[10]-42063,s=(s<<17|s>>>15)+v<<0,S+=(p^s&(v^p))+E[11]-1990404162,S=(S<<22|S>>>10)+s<<0,p+=(v^S&(s^v))+E[12]+1804603682,p=(p<<7|p>>>25)+S<<0,v+=(s^p&(S^s))+E[13]-40341101,v=(v<<12|v>>>20)+p<<0,s+=(S^v&(p^S))+E[14]-1502002290,s=(s<<17|s>>>15)+v<<0,S+=(p^s&(v^p))+E[15]+1236535329,S=(S<<22|S>>>10)+s<<0,p+=(s^v&(S^s))+E[1]-165796510,p=(p<<5|p>>>27)+S<<0,v+=(S^s&(p^S))+E[6]-1069501632,v=(v<<9|v>>>23)+p<<0,s+=(p^S&(v^p))+E[11]+643717713,s=(s<<14|s>>>18)+v<<0,S+=(v^p&(s^v))+E[0]-373897302,S=(S<<20|S>>>12)+s<<0,p+=(s^v&(S^s))+E[5]-701558691,p=(p<<5|p>>>27)+S<<0,v+=(S^s&(p^S))+E[10]+38016083,v=(v<<9|v>>>23)+p<<0,s+=(p^S&(v^p))+E[15]-660478335,s=(s<<14|s>>>18)+v<<0,S+=(v^p&(s^v))+E[4]-405537848,S=(S<<20|S>>>12)+s<<0,p+=(s^v&(S^s))+E[9]+568446438,p=(p<<5|p>>>27)+S<<0,v+=(S^s&(p^S))+E[14]-1019803690,v=(v<<9|v>>>23)+p<<0,s+=(p^S&(v^p))+E[3]-187363961,s=(s<<14|s>>>18)+v<<0,S+=(v^p&(s^v))+E[8]+1163531501,S=(S<<20|S>>>12)+s<<0,p+=(s^v&(S^s))+E[13]-1444681467,p=(p<<5|p>>>27)+S<<0,v+=(S^s&(p^S))+E[2]-51403784,v=(v<<9|v>>>23)+p<<0,s+=(p^S&(v^p))+E[7]+1735328473,s=(s<<14|s>>>18)+v<<0,S+=(v^p&(s^v))+E[12]-1926607734,S=(S<<20|S>>>12)+s<<0,n=S^s,p+=(n^v)+E[5]-378558,p=(p<<4|p>>>28)+S<<0,v+=(n^p)+E[8]-2022574463,v=(v<<11|v>>>21)+p<<0,ee=v^p,s+=(ee^S)+E[11]+1839030562,s=(s<<16|s>>>16)+v<<0,S+=(ee^s)+E[14]-35309556,S=(S<<23|S>>>9)+s<<0,n=S^s,p+=(n^v)+E[1]-1530992060,p=(p<<4|p>>>28)+S<<0,v+=(n^p)+E[4]+1272893353,v=(v<<11|v>>>21)+p<<0,ee=v^p,s+=(ee^S)+E[7]-155497632,s=(s<<16|s>>>16)+v<<0,S+=(ee^s)+E[10]-1094730640,S=(S<<23|S>>>9)+s<<0,n=S^s,p+=(n^v)+E[13]+681279174,p=(p<<4|p>>>28)+S<<0,v+=(n^p)+E[0]-358537222,v=(v<<11|v>>>21)+p<<0,ee=v^p,s+=(ee^S)+E[3]-722521979,s=(s<<16|s>>>16)+v<<0,S+=(ee^s)+E[6]+76029189,S=(S<<23|S>>>9)+s<<0,n=S^s,p+=(n^v)+E[9]-640364487,p=(p<<4|p>>>28)+S<<0,v+=(n^p)+E[12]-421815835,v=(v<<11|v>>>21)+p<<0,ee=v^p,s+=(ee^S)+E[15]+530742520,s=(s<<16|s>>>16)+v<<0,S+=(ee^s)+E[2]-995338651,S=(S<<23|S>>>9)+s<<0,p+=(s^(S|~v))+E[0]-198630844,p=(p<<6|p>>>26)+S<<0,v+=(S^(p|~s))+E[7]+1126891415,v=(v<<10|v>>>22)+p<<0,s+=(p^(v|~S))+E[14]-1416354905,s=(s<<15|s>>>17)+v<<0,S+=(v^(s|~p))+E[5]-57434055,S=(S<<21|S>>>11)+s<<0,p+=(s^(S|~v))+E[12]+1700485571,p=(p<<6|p>>>26)+S<<0,v+=(S^(p|~s))+E[3]-1894986606,v=(v<<10|v>>>22)+p<<0,s+=(p^(v|~S))+E[10]-1051523,s=(s<<15|s>>>17)+v<<0,S+=(v^(s|~p))+E[1]-2054922799,S=(S<<21|S>>>11)+s<<0,p+=(s^(S|~v))+E[8]+1873313359,p=(p<<6|p>>>26)+S<<0,v+=(S^(p|~s))+E[15]-30611744,v=(v<<10|v>>>22)+p<<0,s+=(p^(v|~S))+E[6]-1560198380,s=(s<<15|s>>>17)+v<<0,S+=(v^(s|~p))+E[13]+1309151649,S=(S<<21|S>>>11)+s<<0,p+=(s^(S|~v))+E[4]-145523070,p=(p<<6|p>>>26)+S<<0,v+=(S^(p|~s))+E[11]-1120210379,v=(v<<10|v>>>22)+p<<0,s+=(p^(v|~S))+E[2]+718787259,s=(s<<15|s>>>17)+v<<0,S+=(v^(s|~p))+E[9]-343485551,S=(S<<21|S>>>11)+s<<0,this.first?(this.h0=p+1732584193<<0,this.h1=S-271733879<<0,this.h2=s-1732584194<<0,this.h3=v+271733878<<0,this.first=!1):(this.h0=this.h0+p<<0,this.h1=this.h1+S<<0,this.h2=this.h2+s<<0,this.h3=this.h3+v<<0)},Md5.prototype.hex=function(){this.finalize();var p=this.h0,S=this.h1,s=this.h2,v=this.h3;return HEX_CHARS[p>>4&15]+HEX_CHARS[p&15]+HEX_CHARS[p>>12&15]+HEX_CHARS[p>>8&15]+HEX_CHARS[p>>20&15]+HEX_CHARS[p>>16&15]+HEX_CHARS[p>>28&15]+HEX_CHARS[p>>24&15]+HEX_CHARS[S>>4&15]+HEX_CHARS[S&15]+HEX_CHARS[S>>12&15]+HEX_CHARS[S>>8&15]+HEX_CHARS[S>>20&15]+HEX_CHARS[S>>16&15]+HEX_CHARS[S>>28&15]+HEX_CHARS[S>>24&15]+HEX_CHARS[s>>4&15]+HEX_CHARS[s&15]+HEX_CHARS[s>>12&15]+HEX_CHARS[s>>8&15]+HEX_CHARS[s>>20&15]+HEX_CHARS[s>>16&15]+HEX_CHARS[s>>28&15]+HEX_CHARS[s>>24&15]+HEX_CHARS[v>>4&15]+HEX_CHARS[v&15]+HEX_CHARS[v>>12&15]+HEX_CHARS[v>>8&15]+HEX_CHARS[v>>20&15]+HEX_CHARS[v>>16&15]+HEX_CHARS[v>>28&15]+HEX_CHARS[v>>24&15]},Md5.prototype.toString=Md5.prototype.hex,Md5.prototype.digest=function(p){if(p==="hex")return this.hex();this.finalize();var S=this.h0,s=this.h1,v=this.h2,n=this.h3,ee=[S&255,S>>8&255,S>>16&255,S>>24&255,s&255,s>>8&255,s>>16&255,s>>24&255,v&255,v>>8&255,v>>16&255,v>>24&255,n&255,n>>8&255,n>>16&255,n>>24&255];return ee},Md5.prototype.array=Md5.prototype.digest,Md5.prototype.arrayBuffer=function(){this.finalize();var p=new ArrayBuffer(16),S=new Uint32Array(p);return S[0]=this.h0,S[1]=this.h1,S[2]=this.h2,S[3]=this.h3,p},Md5.prototype.buffer=Md5.prototype.arrayBuffer,Md5.prototype.base64=function(){for(var p,S,s,v="",n=this.array(),ee=0;ee<15;)p=n[ee++],S=n[ee++],s=n[ee++],v+=BASE64_ENCODE_CHAR[p>>>2]+BASE64_ENCODE_CHAR[(p<<4|S>>>4)&63]+BASE64_ENCODE_CHAR[(S<<2|s>>>6)&63]+BASE64_ENCODE_CHAR[s&63];return p=n[ee],v+=BASE64_ENCODE_CHAR[p>>>2]+BASE64_ENCODE_CHAR[p<<4&63]+"==",v};var exports=createMethod();COMMON_JS?module.exports=exports:(root.md5=exports,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__nested_webpack_require_93647__,exports,module),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()}).call(this,__nested_webpack_require_93647__("./node_modules/process/browser.js"),__nested_webpack_require_93647__("./node_modules/webpack/buildin/global.js"),__nested_webpack_require_93647__("./node_modules/webpack/buildin/module.js")(module))},"./lib/request.js":function(p,S,s){var v=s("./node_modules/@babel/runtime/helpers/typeof.js"),n=function(w){switch(v(w)){case"string":return w;case"boolean":return w?"true":"false";case"number":return isFinite(w)?w:"";default:return""}},ee=function(w,V,G,Q){return V=V||"&",G=G||"=",w===null&&(w=void 0),v(w)==="object"?Object.keys(w).map(function(M){var q=encodeURIComponent(n(M))+G;return Array.isArray(w[M])?w[M].map(function(re){return q+encodeURIComponent(n(re))}).join(V):q+encodeURIComponent(n(w[M]))}).filter(Boolean).join(V):Q?encodeURIComponent(n(Q))+G+encodeURIComponent(n(w)):""},E=function(w,V,G){var Q={};return V.getAllResponseHeaders().trim().split(`
  8. `).forEach(function(M){if(M){var q=M.indexOf(":"),re=M.substr(0,q).trim().toLowerCase(),K=M.substr(q+1).trim();Q[re]=K}}),{error:w,statusCode:V.status,statusMessage:V.statusText,headers:Q,body:G}},L=function(w,V){return!V&&V==="text"?w.responseText:w.response},fe=function(w,V){var G=(w.method||"GET").toUpperCase(),Q=w.url;if(w.qs){var M=ee(w.qs);M&&(Q+=(Q.indexOf("?")===-1?"?":"&")+M)}var q=new XMLHttpRequest;if(q.open(G,Q,!0),q.responseType=w.dataType||"text",w.xhrFields)for(var re in w.xhrFields)q[re]=w.xhrFields[re];var K=w.headers;if(K)for(var Ae in K)K.hasOwnProperty(Ae)&&Ae.toLowerCase()!=="content-length"&&Ae.toLowerCase()!=="user-agent"&&Ae.toLowerCase()!=="origin"&&Ae.toLowerCase()!=="host"&&q.setRequestHeader(Ae,K[Ae]);return w.onProgress&&q.upload&&(q.upload.onprogress=w.onProgress),w.onDownloadProgress&&(q.onprogress=w.onDownloadProgress),w.timeout&&(q.timeout=w.timeout),q.ontimeout=function(D){var R=new Error("timeout");V(E(R,q))},q.onload=function(){V(E(null,q,L(q,w.dataType)))},q.onerror=function(D){var R=L(q,w.dataType);if(R)V(E(null,q,R));else{var m=q.statusText;!m&&q.status===0&&(m=new Error("CORS blocked or network error")),V(E(m,q,R))}},q.send(w.body||""),q};p.exports=fe},"./lib/xml2json.js":function(p,S,s){var v=s("./node_modules/@xmldom/xmldom/lib/index.js").DOMParser,n=function(){this.version="1.3.5";var E={mergeCDATA:!0,normalize:!0,stripElemPrefix:!0},L=new RegExp(/(?!xmlns)^.*:/),fe=new RegExp(/^\s+|\s+$/g);return this.grokType=function(N){return/^\s*$/.test(N)?null:/^(?:true|false)$/i.test(N)?N.toLowerCase()==="true":isFinite(N)?parseFloat(N):N},this.parseString=function(N,w){if(N){var V=this.stringToXML(N);return V.getElementsByTagName("parsererror").length?null:this.parseXML(V,w)}else return null},this.parseXML=function(N,w){for(var V in w)E[V]=w[V];var G={},Q=0,M="",q=N.childNodes.length;if(q)for(var re,K,Ae,D=0;D<N.childNodes.length;D++)re=N.childNodes.item(D),re.nodeType===4?E.mergeCDATA&&(M+=re.nodeValue):re.nodeType===3?M+=re.nodeValue:re.nodeType===1&&(Q===0&&(G={}),E.stripElemPrefix?K=re.nodeName.replace(L,""):K=re.nodeName,Ae=n.parseXML(re),G.hasOwnProperty(K)?(G[K].constructor!==Array&&(G[K]=[G[K]]),G[K].push(Ae)):(G[K]=Ae,Q++));return Object.keys(G).length||(G=M||""),G},this.xmlToString=function(N){try{var w=N.xml?N.xml:new XMLSerializer().serializeToString(N);return w}catch(V){return null}},this.stringToXML=function(N){try{var w=null;if(window.DOMParser){var V=new v;return w=V.parseFromString(N,"text/xml"),w}else return w=new ActiveXObject("Microsoft.XMLDOM"),w.async=!1,w.loadXML(N),w}catch(G){return null}},this}.call({}),ee=function(L){return n.parseString(L)};p.exports=ee},"./node_modules/@babel/runtime/helpers/classCallCheck.js":function(p,S){function s(v,n){if(!(v instanceof n))throw new TypeError("Cannot call a class as a function")}p.exports=s,p.exports.__esModule=!0,p.exports.default=p.exports},"./node_modules/@babel/runtime/helpers/createClass.js":function(p,S){function s(n,ee){for(var E=0;E<ee.length;E++){var L=ee[E];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(n,L.key,L)}}function v(n,ee,E){return ee&&s(n.prototype,ee),E&&s(n,E),Object.defineProperty(n,"prototype",{writable:!1}),n}p.exports=v,p.exports.__esModule=!0,p.exports.default=p.exports},"./node_modules/@babel/runtime/helpers/typeof.js":function(p,S){function s(v){return p.exports=s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},p.exports.__esModule=!0,p.exports.default=p.exports,s(v)}p.exports=s,p.exports.__esModule=!0,p.exports.default=p.exports},"./node_modules/@xmldom/xmldom/lib/conventions.js":function(p,S,s){"use strict";function v(L,fe){return fe===void 0&&(fe=Object),fe&&typeof fe.freeze=="function"?fe.freeze(L):L}function n(L,fe){if(L===null||typeof L!="object")throw new TypeError("target is not an object");for(var N in fe)Object.prototype.hasOwnProperty.call(fe,N)&&(L[N]=fe[N]);return L}var ee=v({HTML:"text/html",isHTML:function(L){return L===ee.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),E=v({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(L){return L===E.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});S.assign=n,S.freeze=v,S.MIME_TYPE=ee,S.NAMESPACE=E},"./node_modules/@xmldom/xmldom/lib/dom-parser.js":function(p,S,s){var v=s("./node_modules/@xmldom/xmldom/lib/conventions.js"),n=s("./node_modules/@xmldom/xmldom/lib/dom.js"),ee=s("./node_modules/@xmldom/xmldom/lib/entities.js"),E=s("./node_modules/@xmldom/xmldom/lib/sax.js"),L=n.DOMImplementation,fe=v.NAMESPACE,N=E.ParseError,w=E.XMLReader;function V(D){return D.replace(/\r[\n\u0085]/g,`
  9. `).replace(/[\r\u0085\u2028]/g,`
  10. `)}function G(D){this.options=D||{locator:{}}}G.prototype.parseFromString=function(D,R){var m=this.options,B=new w,d=m.domBuilder||new M,H=m.errorHandler,P=m.locator,F=m.xmlns||{},Re=/\/x?html?$/.test(R),b=Re?ee.HTML_ENTITIES:ee.XML_ENTITIES;P&&d.setDocumentLocator(P),B.errorHandler=Q(H,d,P),B.domBuilder=m.domBuilder||d,Re&&(F[""]=fe.HTML),F.xml=F.xml||fe.XML;var z=m.normalizeLineEndings||V;return D&&typeof D=="string"?B.parse(z(D),F,b):B.errorHandler.error("invalid doc source"),d.doc};function Q(D,R,m){if(!D){if(R instanceof M)return R;D=R}var B={},d=D instanceof Function;m=m||{};function H(P){var F=D[P];!F&&d&&(F=D.length==2?function(Re){D(P,Re)}:D),B[P]=F&&function(Re){F("[xmldom "+P+"] "+Re+re(m))}||function(){}}return H("warning"),H("error"),H("fatalError"),B}function M(){this.cdata=!1}function q(D,R){R.lineNumber=D.lineNumber,R.columnNumber=D.columnNumber}M.prototype={startDocument:function(){this.doc=new L().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(D,R,m,B){var d=this.doc,H=d.createElementNS(D,m||R),P=B.length;Ae(this,H),this.currentElement=H,this.locator&&q(this.locator,H);for(var F=0;F<P;F++){var D=B.getURI(F),Re=B.getValue(F),m=B.getQName(F),b=d.createAttributeNS(D,m);this.locator&&q(B.getLocator(F),b),b.value=b.nodeValue=Re,H.setAttributeNode(b)}},endElement:function(D,R,m){var B=this.currentElement,d=B.tagName;this.currentElement=B.parentNode},startPrefixMapping:function(D,R){},endPrefixMapping:function(D){},processingInstruction:function(D,R){var m=this.doc.createProcessingInstruction(D,R);this.locator&&q(this.locator,m),Ae(this,m)},ignorableWhitespace:function(D,R,m){},characters:function(D,R,m){if(D=K.apply(this,arguments),D){if(this.cdata)var B=this.doc.createCDATASection(D);else var B=this.doc.createTextNode(D);this.currentElement?this.currentElement.appendChild(B):/^\s*$/.test(D)&&this.doc.appendChild(B),this.locator&&q(this.locator,B)}},skippedEntity:function(D){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(D){(this.locator=D)&&(D.lineNumber=0)},comment:function(D,R,m){D=K.apply(this,arguments);var B=this.doc.createComment(D);this.locator&&q(this.locator,B),Ae(this,B)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(D,R,m){var B=this.doc.implementation;if(B&&B.createDocumentType){var d=B.createDocumentType(D,R,m);this.locator&&q(this.locator,d),Ae(this,d),this.doc.doctype=d}},warning:function(D){console.warn("[xmldom warning] "+D,re(this.locator))},error:function(D){console.error("[xmldom error] "+D,re(this.locator))},fatalError:function(D){throw new N(D,this.locator)}};function re(D){if(D)return`
  11. @`+(D.systemId||"")+"#[line:"+D.lineNumber+",col:"+D.columnNumber+"]"}function K(D,R,m){return typeof D=="string"?D.substr(R,m):D.length>=R+m||R?new java.lang.String(D,R,m)+"":D}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(D){M.prototype[D]=function(){return null}});function Ae(D,R){D.currentElement?D.currentElement.appendChild(R):D.doc.appendChild(R)}S.__DOMHandler=M,S.normalizeLineEndings=V,S.DOMParser=G},"./node_modules/@xmldom/xmldom/lib/dom.js":function(p,S,s){var v=s("./node_modules/@xmldom/xmldom/lib/conventions.js"),n=v.NAMESPACE;function ee(o){return o!==""}function E(o){return o?o.split(/[\t\n\f\r ]+/).filter(ee):[]}function L(o,h){return o.hasOwnProperty(h)||(o[h]=!0),o}function fe(o){if(!o)return[];var h=E(o);return Object.keys(h.reduce(L,{}))}function N(o){return function(h){return o&&o.indexOf(h)!==-1}}function w(o,h){for(var C in o)h[C]=o[C]}function V(o,h){var C=o.prototype;if(!(C instanceof h)){let ae=function(){};var O=ae;ae.prototype=h.prototype,ae=new ae,w(C,ae),o.prototype=C=ae}C.constructor!=o&&(typeof o!="function"&&console.error("unknown Class:"+o),C.constructor=o)}var G={},Q=G.ELEMENT_NODE=1,M=G.ATTRIBUTE_NODE=2,q=G.TEXT_NODE=3,re=G.CDATA_SECTION_NODE=4,K=G.ENTITY_REFERENCE_NODE=5,Ae=G.ENTITY_NODE=6,D=G.PROCESSING_INSTRUCTION_NODE=7,R=G.COMMENT_NODE=8,m=G.DOCUMENT_NODE=9,B=G.DOCUMENT_TYPE_NODE=10,d=G.DOCUMENT_FRAGMENT_NODE=11,H=G.NOTATION_NODE=12,P={},F={},Re=P.INDEX_SIZE_ERR=(F[1]="Index size error",1),b=P.DOMSTRING_SIZE_ERR=(F[2]="DOMString size error",2),z=P.HIERARCHY_REQUEST_ERR=(F[3]="Hierarchy request error",3),W=P.WRONG_DOCUMENT_ERR=(F[4]="Wrong document",4),ne=P.INVALID_CHARACTER_ERR=(F[5]="Invalid character",5),oe=P.NO_DATA_ALLOWED_ERR=(F[6]="No data allowed",6),pe=P.NO_MODIFICATION_ALLOWED_ERR=(F[7]="No modification allowed",7),he=P.NOT_FOUND_ERR=(F[8]="Not found",8),ye=P.NOT_SUPPORTED_ERR=(F[9]="Not supported",9),ie=P.INUSE_ATTRIBUTE_ERR=(F[10]="Attribute in use",10),le=P.INVALID_STATE_ERR=(F[11]="Invalid state",11),ve=P.SYNTAX_ERR=(F[12]="Syntax error",12),Le=P.INVALID_MODIFICATION_ERR=(F[13]="Invalid modification",13),Se=P.NAMESPACE_ERR=(F[14]="Invalid namespace",14),ce=P.INVALID_ACCESS_ERR=(F[15]="Invalid access",15);function me(o,h){if(h instanceof Error)var C=h;else C=this,Error.call(this,F[o]),this.message=F[o],Error.captureStackTrace&&Error.captureStackTrace(this,me);return C.code=o,h&&(this.message=this.message+": "+h),C}me.prototype=Error.prototype,w(P,me);function be(){}be.prototype={length:0,item:function(o){return this[o]||null},toString:function(o,h){for(var C=[],O=0;O<this.length;O++)Je(this[O],C,o,h);return C.join("")}};function Ee(o,h){this._node=o,this._refresh=h,De(this)}function De(o){var h=o._node._inc||o._node.ownerDocument._inc;if(o._inc!=h){var C=o._refresh(o._node);Xe(o,"length",C.length),w(C,o),o._inc=h}}Ee.prototype.item=function(o){return De(this),this[o]},V(Ee,be);function ke(){}function Be(o,h){for(var C=o.length;C--;)if(o[C]===h)return C}function Ne(o,h,C,O){if(O?h[Be(h,O)]=C:h[h.length++]=C,o){C.ownerElement=o;var ae=o.ownerDocument;ae&&(O&&_e(ae,o,O),ge(ae,o,C))}}function we(o,h,C){var O=Be(h,C);if(O>=0){for(var ae=h.length-1;O<ae;)h[O]=h[++O];if(h.length=ae,o){var ue=o.ownerDocument;ue&&(_e(ue,o,C),C.ownerElement=null)}}else throw me(he,new Error(o.tagName+"@"+C))}ke.prototype={length:0,item:be.prototype.item,getNamedItem:function(o){for(var h=this.length;h--;){var C=this[h];if(C.nodeName==o)return C}},setNamedItem:function(o){var h=o.ownerElement;if(h&&h!=this._ownerElement)throw new me(ie);var C=this.getNamedItem(o.nodeName);return Ne(this._ownerElement,this,o,C),C},setNamedItemNS:function(o){var h=o.ownerElement,C;if(h&&h!=this._ownerElement)throw new me(ie);return C=this.getNamedItemNS(o.namespaceURI,o.localName),Ne(this._ownerElement,this,o,C),C},removeNamedItem:function(o){var h=this.getNamedItem(o);return we(this._ownerElement,this,h),h},removeNamedItemNS:function(o,h){var C=this.getNamedItemNS(o,h);return we(this._ownerElement,this,C),C},getNamedItemNS:function(o,h){for(var C=this.length;C--;){var O=this[C];if(O.localName==h&&O.namespaceURI==o)return O}return null}};function J(){}J.prototype={hasFeature:function(o,h){return!0},createDocument:function(o,h,C){var O=new $;if(O.implementation=this,O.childNodes=new be,O.doctype=C||null,C&&O.appendChild(C),h){var ae=O.createElementNS(o,h);O.appendChild(ae)}return O},createDocumentType:function(o,h,C){var O=new X;return O.name=o,O.nodeName=o,O.publicId=h||"",O.systemId=C||"",O}};function T(){}T.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(o,h){return f(this,o,h)},replaceChild:function(o,h){this.insertBefore(o,h),h&&this.removeChild(h)},removeChild:function(o){return u(this,o)},appendChild:function(o){return this.insertBefore(o,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(o){return qe(this.ownerDocument||this,this,o)},normalize:function(){for(var o=this.firstChild;o;){var h=o.nextSibling;h&&h.nodeType==q&&o.nodeType==q?(this.removeChild(h),o.appendData(h.data)):(o.normalize(),o=h)}},isSupported:function(o,h){return this.ownerDocument.implementation.hasFeature(o,h)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(o){for(var h=this;h;){var C=h._nsMap;if(C){for(var O in C)if(C[O]==o)return O}h=h.nodeType==M?h.ownerDocument:h.parentNode}return null},lookupNamespaceURI:function(o){for(var h=this;h;){var C=h._nsMap;if(C&&o in C)return C[o];h=h.nodeType==M?h.ownerDocument:h.parentNode}return null},isDefaultNamespace:function(o){var h=this.lookupPrefix(o);return h==null}};function U(o){return o=="<"&&"&lt;"||o==">"&&"&gt;"||o=="&"&&"&amp;"||o=='"'&&"&quot;"||"&#"+o.charCodeAt()+";"}w(G,T),w(G,T.prototype);function I(o,h){if(h(o))return!0;if(o=o.firstChild)do if(I(o,h))return!0;while(o=o.nextSibling)}function $(){}function ge(o,h,C){o&&o._inc++;var O=C.namespaceURI;O===n.XMLNS&&(h._nsMap[C.prefix?C.localName:""]=C.value)}function _e(o,h,C,O){o&&o._inc++;var ae=C.namespaceURI;ae===n.XMLNS&&delete h._nsMap[C.prefix?C.localName:""]}function x(o,h,C){if(o&&o._inc){o._inc++;var O=h.childNodes;if(C)O[O.length++]=C;else{for(var ae=h.firstChild,ue=0;ae;)O[ue++]=ae,ae=ae.nextSibling;O.length=ue,delete O[O.length]}}}function u(o,h){var C=h.previousSibling,O=h.nextSibling;return C?C.nextSibling=O:o.firstChild=O,O?O.previousSibling=C:o.lastChild=C,h.parentNode=null,h.previousSibling=null,h.nextSibling=null,x(o.ownerDocument,o),h}function f(o,h,C){var O=h.parentNode;if(O&&O.removeChild(h),h.nodeType===d){var ae=h.firstChild;if(ae==null)return h;var ue=h.lastChild}else ae=ue=h;var e=C?C.previousSibling:o.lastChild;ae.previousSibling=e,ue.nextSibling=C,e?e.nextSibling=ae:o.firstChild=ae,C==null?o.lastChild=ue:C.previousSibling=ue;do ae.parentNode=o;while(ae!==ue&&(ae=ae.nextSibling));return x(o.ownerDocument||o,o),h.nodeType==d&&(h.firstChild=h.lastChild=null),h}function a(o,h){return h.parentNode&&h.parentNode.removeChild(h),h.parentNode=o,h.previousSibling=o.lastChild,h.nextSibling=null,h.previousSibling?h.previousSibling.nextSibling=h:o.firstChild=h,o.lastChild=h,x(o.ownerDocument,o,h),h}$.prototype={nodeName:"#document",nodeType:m,doctype:null,documentElement:null,_inc:1,insertBefore:function(o,h){if(o.nodeType==d){for(var C=o.firstChild;C;){var O=C.nextSibling;this.insertBefore(C,h),C=O}return o}return this.documentElement==null&&o.nodeType==Q&&(this.documentElement=o),f(this,o,h),o.ownerDocument=this,o},removeChild:function(o){return this.documentElement==o&&(this.documentElement=null),u(this,o)},importNode:function(o,h){return tt(this,o,h)},getElementById:function(o){var h=null;return I(this.documentElement,function(C){if(C.nodeType==Q&&C.getAttribute("id")==o)return h=C,!0}),h},getElementsByClassName:function(o){var h=fe(o);return new Ee(this,function(C){var O=[];return h.length>0&&I(C.documentElement,function(ae){if(ae!==C&&ae.nodeType===Q){var ue=ae.getAttribute("class");if(ue){var e=o===ue;if(!e){var r=fe(ue);e=h.every(N(r))}e&&O.push(ae)}}}),O})},createElement:function(o){var h=new g;h.ownerDocument=this,h.nodeName=o,h.tagName=o,h.localName=o,h.childNodes=new be;var C=h.attributes=new ke;return C._ownerElement=h,h},createDocumentFragment:function(){var o=new xe;return o.ownerDocument=this,o.childNodes=new be,o},createTextNode:function(o){var h=new Z;return h.ownerDocument=this,h.appendData(o),h},createComment:function(o){var h=new te;return h.ownerDocument=this,h.appendData(o),h},createCDATASection:function(o){var h=new Ce;return h.ownerDocument=this,h.appendData(o),h},createProcessingInstruction:function(o,h){var C=new Oe;return C.ownerDocument=this,C.tagName=C.target=o,C.nodeValue=C.data=h,C},createAttribute:function(o){var h=new A;return h.ownerDocument=this,h.name=o,h.nodeName=o,h.localName=o,h.specified=!0,h},createEntityReference:function(o){var h=new Me;return h.ownerDocument=this,h.nodeName=o,h},createElementNS:function(o,h){var C=new g,O=h.split(":"),ae=C.attributes=new ke;return C.childNodes=new be,C.ownerDocument=this,C.nodeName=h,C.tagName=h,C.namespaceURI=o,O.length==2?(C.prefix=O[0],C.localName=O[1]):C.localName=h,ae._ownerElement=C,C},createAttributeNS:function(o,h){var C=new A,O=h.split(":");return C.ownerDocument=this,C.nodeName=h,C.name=h,C.namespaceURI=o,C.specified=!0,O.length==2?(C.prefix=O[0],C.localName=O[1]):C.localName=h,C}},V($,T);function g(){this._nsMap={}}g.prototype={nodeType:Q,hasAttribute:function(o){return this.getAttributeNode(o)!=null},getAttribute:function(o){var h=this.getAttributeNode(o);return h&&h.value||""},getAttributeNode:function(o){return this.attributes.getNamedItem(o)},setAttribute:function(o,h){var C=this.ownerDocument.createAttribute(o);C.value=C.nodeValue=""+h,this.setAttributeNode(C)},removeAttribute:function(o){var h=this.getAttributeNode(o);h&&this.removeAttributeNode(h)},appendChild:function(o){return o.nodeType===d?this.insertBefore(o,null):a(this,o)},setAttributeNode:function(o){return this.attributes.setNamedItem(o)},setAttributeNodeNS:function(o){return this.attributes.setNamedItemNS(o)},removeAttributeNode:function(o){return this.attributes.removeNamedItem(o.nodeName)},removeAttributeNS:function(o,h){var C=this.getAttributeNodeNS(o,h);C&&this.removeAttributeNode(C)},hasAttributeNS:function(o,h){return this.getAttributeNodeNS(o,h)!=null},getAttributeNS:function(o,h){var C=this.getAttributeNodeNS(o,h);return C&&C.value||""},setAttributeNS:function(o,h,C){var O=this.ownerDocument.createAttributeNS(o,h);O.value=O.nodeValue=""+C,this.setAttributeNode(O)},getAttributeNodeNS:function(o,h){return this.attributes.getNamedItemNS(o,h)},getElementsByTagName:function(o){return new Ee(this,function(h){var C=[];return I(h,function(O){O!==h&&O.nodeType==Q&&(o==="*"||O.tagName==o)&&C.push(O)}),C})},getElementsByTagNameNS:function(o,h){return new Ee(this,function(C){var O=[];return I(C,function(ae){ae!==C&&ae.nodeType===Q&&(o==="*"||ae.namespaceURI===o)&&(h==="*"||ae.localName==h)&&O.push(ae)}),O})}},$.prototype.getElementsByTagName=g.prototype.getElementsByTagName,$.prototype.getElementsByTagNameNS=g.prototype.getElementsByTagNameNS,V(g,T);function A(){}A.prototype.nodeType=M,V(A,T);function _(){}_.prototype={data:"",substringData:function(o,h){return this.data.substring(o,o+h)},appendData:function(o){o=this.data+o,this.nodeValue=this.data=o,this.length=o.length},insertData:function(o,h){this.replaceData(o,0,h)},appendChild:function(o){throw new Error(F[z])},deleteData:function(o,h){this.replaceData(o,h,"")},replaceData:function(o,h,C){var O=this.data.substring(0,o),ae=this.data.substring(o+h);C=O+C+ae,this.nodeValue=this.data=C,this.length=C.length}},V(_,T);function Z(){}Z.prototype={nodeName:"#text",nodeType:q,splitText:function(o){var h=this.data,C=h.substring(o);h=h.substring(0,o),this.data=this.nodeValue=h,this.length=h.length;var O=this.ownerDocument.createTextNode(C);return this.parentNode&&this.parentNode.insertBefore(O,this.nextSibling),O}},V(Z,_);function te(){}te.prototype={nodeName:"#comment",nodeType:R},V(te,_);function Ce(){}Ce.prototype={nodeName:"#cdata-section",nodeType:re},V(Ce,_);function X(){}X.prototype.nodeType=B,V(X,T);function Pe(){}Pe.prototype.nodeType=H,V(Pe,T);function Y(){}Y.prototype.nodeType=Ae,V(Y,T);function Me(){}Me.prototype.nodeType=K,V(Me,T);function xe(){}xe.prototype.nodeName="#document-fragment",xe.prototype.nodeType=d,V(xe,T);function Oe(){}Oe.prototype.nodeType=D,V(Oe,T);function je(){}je.prototype.serializeToString=function(o,h,C){return Ue.call(o,h,C)},T.prototype.toString=Ue;function Ue(o,h){var C=[],O=this.nodeType==9&&this.documentElement||this,ae=O.prefix,ue=O.namespaceURI;if(ue&&ae==null){var ae=O.lookupPrefix(ue);if(ae==null)var e=[{namespace:ue,prefix:null}]}return Je(this,C,o,h,e),C.join("")}function Fe(o,h,C){var O=o.prefix||"",ae=o.namespaceURI;if(!ae||O==="xml"&&ae===n.XML||ae===n.XMLNS)return!1;for(var ue=C.length;ue--;){var e=C[ue];if(e.prefix===O)return e.namespace!==ae}return!0}function ze(o,h,C){o.push(" ",h,'="',C.replace(/[<>&"\t\n\r]/g,U),'"')}function Je(o,h,C,O,ae){if(ae||(ae=[]),O)if(o=O(o),o){if(typeof o=="string"){h.push(o);return}}else return;switch(o.nodeType){case Q:var ue=o.attributes,e=ue.length,r=o.firstChild,t=o.tagName;C=n.isHTML(o.namespaceURI)||C;var i=t;if(!C&&!o.prefix&&o.namespaceURI){for(var l,c=0;c<ue.length;c++)if(ue.item(c).name==="xmlns"){l=ue.item(c).value;break}if(!l)for(var y=ae.length-1;y>=0;y--){var k=ae[y];if(k.prefix===""&&k.namespace===o.namespaceURI){l=k.namespace;break}}if(l!==o.namespaceURI)for(var y=ae.length-1;y>=0;y--){var k=ae[y];if(k.namespace===o.namespaceURI){k.prefix&&(i=k.prefix+":"+t);break}}}h.push("<",i);for(var j=0;j<e;j++){var de=ue.item(j);de.prefix=="xmlns"?ae.push({prefix:de.localName,namespace:de.value}):de.nodeName=="xmlns"&&ae.push({prefix:"",namespace:de.value})}for(var j=0;j<e;j++){var de=ue.item(j);if(Fe(de,C,ae)){var se=de.prefix||"",Te=de.namespaceURI;ze(h,se?"xmlns:"+se:"xmlns",Te),ae.push({prefix:se,namespace:Te})}Je(de,h,C,O,ae)}if(t===i&&Fe(o,C,ae)){var se=o.prefix||"",Te=o.namespaceURI;ze(h,se?"xmlns:"+se:"xmlns",Te),ae.push({prefix:se,namespace:Te})}if(r||C&&!/^(?:meta|link|img|br|hr|input)$/i.test(t)){if(h.push(">"),C&&/^script$/i.test(t))for(;r;)r.data?h.push(r.data):Je(r,h,C,O,ae.slice()),r=r.nextSibling;else for(;r;)Je(r,h,C,O,ae.slice()),r=r.nextSibling;h.push("</",i,">")}else h.push("/>");return;case m:case d:for(var r=o.firstChild;r;)Je(r,h,C,O,ae.slice()),r=r.nextSibling;return;case M:return ze(h,o.name,o.value);case q:return h.push(o.data.replace(/[<&>]/g,U));case re:return h.push("<![CDATA[",o.data,"]]>");case R:return h.push("<!--",o.data,"-->");case B:var Ie=o.publicId,Ge=o.systemId;if(h.push("<!DOCTYPE ",o.name),Ie)h.push(" PUBLIC ",Ie),Ge&&Ge!="."&&h.push(" ",Ge),h.push(">");else if(Ge&&Ge!=".")h.push(" SYSTEM ",Ge,">");else{var $e=o.internalSubset;$e&&h.push(" [",$e,"]"),h.push(">")}return;case D:return h.push("<?",o.target," ",o.data,"?>");case K:return h.push("&",o.nodeName,";");default:h.push("??",o.nodeName)}}function tt(o,h,C){var O;switch(h.nodeType){case Q:O=h.cloneNode(!1),O.ownerDocument=o;case d:break;case M:C=!0;break}if(O||(O=h.cloneNode(!1)),O.ownerDocument=o,O.parentNode=null,C)for(var ae=h.firstChild;ae;)O.appendChild(tt(o,ae,C)),ae=ae.nextSibling;return O}function qe(o,h,C){var O=new h.constructor;for(var ae in h){var ue=h[ae];typeof ue!="object"&&ue!=O[ae]&&(O[ae]=ue)}switch(h.childNodes&&(O.childNodes=new be),O.ownerDocument=o,O.nodeType){case Q:var e=h.attributes,r=O.attributes=new ke,t=e.length;r._ownerElement=O;for(var i=0;i<t;i++)O.setAttributeNode(qe(o,e.item(i),!0));break;case M:C=!0}if(C)for(var l=h.firstChild;l;)O.appendChild(qe(o,l,C)),l=l.nextSibling;return O}function Xe(o,h,C){o[h]=C}try{if(Object.defineProperty){let o=function(h){switch(h.nodeType){case Q:case d:var C=[];for(h=h.firstChild;h;)h.nodeType!==7&&h.nodeType!==8&&C.push(o(h)),h=h.nextSibling;return C.join("");default:return h.nodeValue}};var Ve=o;Object.defineProperty(Ee.prototype,"length",{get:function(){return De(this),this.$$length}}),Object.defineProperty(T.prototype,"textContent",{get:function(){return o(this)},set:function(h){switch(this.nodeType){case Q:case d:for(;this.firstChild;)this.removeChild(this.firstChild);(h||String(h))&&this.appendChild(this.ownerDocument.createTextNode(h));break;default:this.data=h,this.value=h,this.nodeValue=h}}}),Xe=function(h,C,O){h["$$"+C]=O}}}catch(o){}S.DocumentType=X,S.DOMException=me,S.DOMImplementation=J,S.Element=g,S.Node=T,S.NodeList=be,S.XMLSerializer=je},"./node_modules/@xmldom/xmldom/lib/entities.js":function(p,S,s){var v=s("./node_modules/@xmldom/xmldom/lib/conventions.js").freeze;S.XML_ENTITIES=v({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),S.HTML_ENTITIES=v({lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",times:"\xD7",divide:"\xF7",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",euro:"\u20AC",trade:"\u2122",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"}),S.entityMap=S.HTML_ENTITIES},"./node_modules/@xmldom/xmldom/lib/index.js":function(p,S,s){var v=s("./node_modules/@xmldom/xmldom/lib/dom.js");S.DOMImplementation=v.DOMImplementation,S.XMLSerializer=v.XMLSerializer,S.DOMParser=s("./node_modules/@xmldom/xmldom/lib/dom-parser.js").DOMParser},"./node_modules/@xmldom/xmldom/lib/sax.js":function(p,S,s){var v=s("./node_modules/@xmldom/xmldom/lib/conventions.js").NAMESPACE,n=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,ee=new RegExp("[\\-\\.0-9"+n.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),E=new RegExp("^"+n.source+ee.source+"*(?::"+n.source+ee.source+"*)?$"),L=0,fe=1,N=2,w=3,V=4,G=5,Q=6,M=7;function q(b,z){this.message=b,this.locator=z,Error.captureStackTrace&&Error.captureStackTrace(this,q)}q.prototype=new Error,q.prototype.name=q.name;function re(){}re.prototype={parse:function(b,z,W){var ne=this.domBuilder;ne.startDocument(),d(z,z={}),K(b,z,W,ne,this.errorHandler),ne.endDocument()}};function K(b,z,W,ne,oe){function pe(a){if(a>65535){a-=65536;var g=55296+(a>>10),A=56320+(a&1023);return String.fromCharCode(g,A)}else return String.fromCharCode(a)}function he(a){var g=a.slice(1,-1);return Object.hasOwnProperty.call(W,g)?W[g]:g.charAt(0)==="#"?pe(parseInt(g.substr(1).replace("x","0x"))):(oe.error("entity not found:"+a),a)}function ye(a){if(a>be){var g=b.substring(be,a).replace(/&#?\w+;/g,he);Se&&ie(be),ne.characters(g,0,a-be),be=a}}function ie(a,g){for(;a>=ve&&(g=Le.exec(b));)le=g.index,ve=le+g[0].length,Se.lineNumber++;Se.columnNumber=a-le+1}for(var le=0,ve=0,Le=/.*(?:\r\n?|\n)|.*$/g,Se=ne.locator,ce=[{currentNSMap:z}],me={},be=0;;){try{var Ee=b.indexOf("<",be);if(Ee<0){if(!b.substr(be).match(/^\s*$/)){var De=ne.doc,ke=De.createTextNode(b.substr(be));De.appendChild(ke),ne.currentElement=ke}return}switch(Ee>be&&ye(Ee),b.charAt(Ee+1)){case"/":var Be=b.indexOf(">",Ee+3),Ne=b.substring(Ee+2,Be).replace(/[ \t\n\r]+$/g,""),we=ce.pop();Be<0?(Ne=b.substring(Ee+2).replace(/[\s<].*/,""),oe.error("end tag name: "+Ne+" is not complete:"+we.tagName),Be=Ee+1+Ne.length):Ne.match(/\s</)&&(Ne=Ne.replace(/[\s<].*/,""),oe.error("end tag name: "+Ne+" maybe not complete"),Be=Ee+1+Ne.length);var J=we.localNSMap,T=we.tagName==Ne,U=T||we.tagName&&we.tagName.toLowerCase()==Ne.toLowerCase();if(U){if(ne.endElement(we.uri,we.localName,Ne),J)for(var I in J)ne.endPrefixMapping(I);T||oe.fatalError("end tag name: "+Ne+" is not match the current start tagName:"+we.tagName)}else ce.push(we);Be++;break;case"?":Se&&ie(Ee),Be=P(b,Ee,ne);break;case"!":Se&&ie(Ee),Be=H(b,Ee,ne,oe);break;default:Se&&ie(Ee);var $=new F,ge=ce[ce.length-1].currentNSMap,Be=D(b,Ee,$,ge,he,oe),_e=$.length;if(!$.closed&&B(b,Be,$.tagName,me)&&($.closed=!0,W.nbsp||oe.warning("unclosed xml attribute")),Se&&_e){for(var x=Ae(Se,{}),u=0;u<_e;u++){var f=$[u];ie(f.offset),f.locator=Ae(Se,{})}ne.locator=x,R($,ne,ge)&&ce.push($),ne.locator=Se}else R($,ne,ge)&&ce.push($);v.isHTML($.uri)&&!$.closed?Be=m(b,Be,$.tagName,he,ne):Be++}}catch(a){if(a instanceof q)throw a;oe.error("element parse error: "+a),Be=-1}Be>be?be=Be:ye(Math.max(Ee,be)+1)}}function Ae(b,z){return z.lineNumber=b.lineNumber,z.columnNumber=b.columnNumber,z}function D(b,z,W,ne,oe,pe){function he(ce,me,be){W.attributeNames.hasOwnProperty(ce)&&pe.fatalError("Attribute "+ce+" redefined"),W.addValue(ce,me.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,oe),be)}for(var ye,ie,le=++z,ve=L;;){var Le=b.charAt(le);switch(Le){case"=":if(ve===fe)ye=b.slice(z,le),ve=w;else if(ve===N)ve=w;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(ve===w||ve===fe)if(ve===fe&&(pe.warning('attribute value must after "="'),ye=b.slice(z,le)),z=le+1,le=b.indexOf(Le,z),le>0)ie=b.slice(z,le),he(ye,ie,z-1),ve=G;else throw new Error("attribute value no end '"+Le+"' match");else if(ve==V)ie=b.slice(z,le),he(ye,ie,z),pe.warning('attribute "'+ye+'" missed start quot('+Le+")!!"),z=le+1,ve=G;else throw new Error('attribute value must after "="');break;case"/":switch(ve){case L:W.setTagName(b.slice(z,le));case G:case Q:case M:ve=M,W.closed=!0;case V:case fe:case N:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return pe.error("unexpected end of input"),ve==L&&W.setTagName(b.slice(z,le)),le;case">":switch(ve){case L:W.setTagName(b.slice(z,le));case G:case Q:case M:break;case V:case fe:ie=b.slice(z,le),ie.slice(-1)==="/"&&(W.closed=!0,ie=ie.slice(0,-1));case N:ve===N&&(ie=ye),ve==V?(pe.warning('attribute "'+ie+'" missed quot(")!'),he(ye,ie,z)):((!v.isHTML(ne[""])||!ie.match(/^(?:disabled|checked|selected)$/i))&&pe.warning('attribute "'+ie+'" missed value!! "'+ie+'" instead!!'),he(ie,ie,z));break;case w:throw new Error("attribute value missed!!")}return le;case"\x80":Le=" ";default:if(Le<=" ")switch(ve){case L:W.setTagName(b.slice(z,le)),ve=Q;break;case fe:ye=b.slice(z,le),ve=N;break;case V:var ie=b.slice(z,le);pe.warning('attribute "'+ie+'" missed quot(")!!'),he(ye,ie,z);case G:ve=Q;break}else switch(ve){case N:var Se=W.tagName;(!v.isHTML(ne[""])||!ye.match(/^(?:disabled|checked|selected)$/i))&&pe.warning('attribute "'+ye+'" missed value!! "'+ye+'" instead2!!'),he(ye,ye,z),z=le,ve=fe;break;case G:pe.warning('attribute space is required"'+ye+'"!!');case Q:ve=fe,z=le;break;case w:ve=V,z=le;break;case M:throw new Error("elements closed character '/' and '>' must be connected to")}}le++}}function R(b,z,W){for(var ne=b.tagName,oe=null,pe=b.length;pe--;){var he=b[pe],ye=he.qName,ie=he.value,Se=ye.indexOf(":");if(Se>0)var le=he.prefix=ye.slice(0,Se),ve=ye.slice(Se+1),Le=le==="xmlns"&&ve;else ve=ye,le=null,Le=ye==="xmlns"&&"";he.localName=ve,Le!==!1&&(oe==null&&(oe={},d(W,W={})),W[Le]=oe[Le]=ie,he.uri=v.XMLNS,z.startPrefixMapping(Le,ie))}for(var pe=b.length;pe--;){he=b[pe];var le=he.prefix;le&&(le==="xml"&&(he.uri=v.XML),le!=="xmlns"&&(he.uri=W[le||""]))}var Se=ne.indexOf(":");Se>0?(le=b.prefix=ne.slice(0,Se),ve=b.localName=ne.slice(Se+1)):(le=null,ve=b.localName=ne);var ce=b.uri=W[le||""];if(z.startElement(ce,ve,ne,b),b.closed){if(z.endElement(ce,ve,ne),oe)for(le in oe)z.endPrefixMapping(le)}else return b.currentNSMap=W,b.localNSMap=oe,!0}function m(b,z,W,ne,oe){if(/^(?:script|textarea)$/i.test(W)){var pe=b.indexOf("</"+W+">",z),he=b.substring(z+1,pe);if(/[&<]/.test(he))return/^script$/i.test(W)?(oe.characters(he,0,he.length),pe):(he=he.replace(/&#?\w+;/g,ne),oe.characters(he,0,he.length),pe)}return z+1}function B(b,z,W,ne){var oe=ne[W];return oe==null&&(oe=b.lastIndexOf("</"+W+">"),oe<z&&(oe=b.lastIndexOf("</"+W)),ne[W]=oe),oe<z}function d(b,z){for(var W in b)z[W]=b[W]}function H(b,z,W,ne){var oe=b.charAt(z+2);switch(oe){case"-":if(b.charAt(z+3)==="-"){var pe=b.indexOf("-->",z+4);return pe>z?(W.comment(b,z+4,pe-z-4),pe+3):(ne.error("Unclosed comment"),-1)}else return-1;default:if(b.substr(z+3,6)=="CDATA["){var pe=b.indexOf("]]>",z+9);return W.startCDATA(),W.characters(b,z+9,pe-z-9),W.endCDATA(),pe+3}var he=Re(b,z),ye=he.length;if(ye>1&&/!doctype/i.test(he[0][0])){var ie=he[1][0],le=!1,ve=!1;ye>3&&(/^public$/i.test(he[2][0])?(le=he[3][0],ve=ye>4&&he[4][0]):/^system$/i.test(he[2][0])&&(ve=he[3][0]));var Le=he[ye-1];return W.startDTD(ie,le,ve),W.endDTD(),Le.index+Le[0].length}}return-1}function P(b,z,W){var ne=b.indexOf("?>",z);if(ne){var oe=b.substring(z,ne).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(oe){var pe=oe[0].length;return W.processingInstruction(oe[1],oe[2]),ne+2}else return-1}return-1}function F(){this.attributeNames={}}F.prototype={setTagName:function(b){if(!E.test(b))throw new Error("invalid tagName:"+b);this.tagName=b},addValue:function(b,z,W){if(!E.test(b))throw new Error("invalid attribute:"+b);this.attributeNames[b]=this.length,this[this.length++]={qName:b,value:z,offset:W}},length:0,getLocalName:function(b){return this[b].localName},getLocator:function(b){return this[b].locator},getQName:function(b){return this[b].qName},getURI:function(b){return this[b].uri},getValue:function(b){return this[b].value}};function Re(b,z){var W,ne=[],oe=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(oe.lastIndex=z,oe.exec(b);W=oe.exec(b);)if(ne.push(W),W[1])return ne}S.XMLReader=re,S.ParseError=q},"./node_modules/process/browser.js":function(p,S){var s=p.exports={},v,n;function ee(){throw new Error("setTimeout has not been defined")}function E(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?v=setTimeout:v=ee}catch(K){v=ee}try{typeof clearTimeout=="function"?n=clearTimeout:n=E}catch(K){n=E}})();function L(K){if(v===setTimeout)return setTimeout(K,0);if((v===ee||!v)&&setTimeout)return v=setTimeout,setTimeout(K,0);try{return v(K,0)}catch(Ae){try{return v.call(null,K,0)}catch(D){return v.call(this,K,0)}}}function fe(K){if(n===clearTimeout)return clearTimeout(K);if((n===E||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(K);try{return n(K)}catch(Ae){try{return n.call(null,K)}catch(D){return n.call(this,K)}}}var N=[],w=!1,V,G=-1;function Q(){!w||!V||(w=!1,V.length?N=V.concat(N):G=-1,N.length&&M())}function M(){if(!w){var K=L(Q);w=!0;for(var Ae=N.length;Ae;){for(V=N,N=[];++G<Ae;)V&&V[G].run();G=-1,Ae=N.length}V=null,w=!1,fe(K)}}s.nextTick=function(K){var Ae=new Array(arguments.length-1);if(arguments.length>1)for(var D=1;D<arguments.length;D++)Ae[D-1]=arguments[D];N.push(new q(K,Ae)),N.length===1&&!w&&L(M)};function q(K,Ae){this.fun=K,this.array=Ae}q.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={};function re(){}s.on=re,s.addListener=re,s.once=re,s.off=re,s.removeListener=re,s.removeAllListeners=re,s.emit=re,s.prependListener=re,s.prependOnceListener=re,s.listeners=function(K){return[]},s.binding=function(K){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(K){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},"./node_modules/webpack/buildin/amd-options.js":function(p,S){(function(s){p.exports=s}).call(this,{})},"./node_modules/webpack/buildin/global.js":function(p,S){var s;s=function(){return this}();try{s=s||new Function("return this")()}catch(v){typeof window=="object"&&(s=window)}p.exports=s},"./node_modules/webpack/buildin/module.js":function(p,S){p.exports=function(s){return s.webpackPolyfill||(s.deprecate=function(){},s.paths=[],s.children||(s.children=[]),Object.defineProperty(s,"loaded",{enumerable:!0,get:function(){return s.l}}),Object.defineProperty(s,"id",{enumerable:!0,get:function(){return s.i}}),s.webpackPolyfill=1),s}},"./package.json":function(p){p.exports=JSON.parse('{"name":"cos-js-sdk-v5","version":"1.4.6","description":"JavaScript SDK for [\u817E\u8BAF\u4E91\u5BF9\u8C61\u5B58\u50A8](https://cloud.tencent.com/product/cos)","main":"dist/cos-js-sdk-v5.js","types":"index.d.ts","scripts":{"server":"node server/sts.js","dev":"cross-env NODE_ENV=development webpack -w --mode=development","build":"cross-env NODE_ENV=production webpack --mode=production","cos-auth.min.js":"uglifyjs ./demo/common/cos-auth.js -o ./demo/common/cos-auth.min.js -c -m"},"repository":{"type":"git","url":"git+https://github.com/tencentyun/cos-js-sdk-v5.git"},"keywords":[],"author":"carsonxu","license":"ISC","bugs":{"url":"https://github.com/tencentyun/cos-js-sdk-v5/issues"},"homepage":"https://github.com/tencentyun/cos-js-sdk-v5#readme","dependencies":{"@xmldom/xmldom":"^0.8.2"},"devDependencies":{"@babel/core":"7.17.9","@babel/plugin-transform-runtime":"7.18.10","@babel/preset-env":"7.16.11","babel-loader":"8.2.5","body-parser":"^1.18.3","cross-env":"^5.2.0","express":"^4.16.4","qcloud-cos-sts":"^3.0.2","request":"^2.87.0","terser-webpack-plugin":"4.2.3","webpack":"4.46.0","webpack-cli":"4.10.0"}}')},"./src/advance.js":function(p,S,s){var v=s("./node_modules/@babel/runtime/helpers/typeof.js"),n=s("./src/session.js"),ee=s("./src/async.js"),E=s("./src/event.js").EventProxy,L=s("./src/util.js"),fe=s("./src/tracker.js");function N(d,H){var P=this,F=new E,Re=d.TaskId,b=d.Bucket,z=d.Region,W=d.Key,ne=d.Body,oe=d.ChunkSize||d.SliceSize||P.options.ChunkSize,pe=d.AsyncLimit,he=d.StorageClass,ye=d.ServerSideEncryption,ie,le,ve=d.onHashProgress,Le=d.tracker;Le&&Le.setParams({chunkSize:oe}),F.on("error",function(Se){if(!!P._isRunningTask(Re))return Se.UploadId=d.UploadData.UploadId||"",H(Se)}),F.on("upload_complete",function(Se){var ce=L.extend({UploadId:d.UploadData.UploadId||""},Se);H(null,ce)}),F.on("upload_slice_complete",function(Se){var ce={};L.each(d.Headers,function(me,be){var Ee=be.toLowerCase();(Ee.indexOf("x-cos-meta-")===0||Ee==="pic-operations")&&(ce[be]=me)}),q.call(P,{Bucket:b,Region:z,Key:W,UploadId:Se.UploadId,SliceList:Se.SliceList,Headers:ce,tracker:Le},function(me,be){if(!!P._isRunningTask(Re)){if(n.removeUsing(Se.UploadId),me)return le(null,!0),F.emit("error",me);n.removeUploadId.call(P,Se.UploadId),le({loaded:ie,total:ie},!0),F.emit("upload_complete",be)}})}),F.on("get_upload_data_finish",function(Se){var ce=n.getFileId(ne,d.ChunkSize,b,W);ce&&n.saveUploadId.call(P,ce,Se.UploadId,P.options.UploadIdCacheLimit),n.setUsing(Se.UploadId),le(null,!0),Q.call(P,{TaskId:Re,Bucket:b,Region:z,Key:W,Body:ne,FileSize:ie,SliceSize:oe,AsyncLimit:pe,ServerSideEncryption:ye,UploadData:Se,Headers:d.Headers,onProgress:le,tracker:Le},function(me,be){if(!!P._isRunningTask(Re)){if(me)return le(null,!0),F.emit("error",me);F.emit("upload_slice_complete",be)}})}),F.on("get_file_size_finish",function(){if(le=L.throttleOnProgress.call(P,ie,d.onProgress),d.UploadData.UploadId)F.emit("get_upload_data_finish",d.UploadData);else{var Se=L.extend({TaskId:Re,Bucket:b,Region:z,Key:W,Headers:d.Headers,StorageClass:he,Body:ne,FileSize:ie,SliceSize:oe,onHashProgress:ve,tracker:Le},d);w.call(P,Se,function(ce,me){if(!!P._isRunningTask(Re)){if(ce)return F.emit("error",ce);d.UploadData.UploadId=me.UploadId,d.UploadData.PartList=me.PartList,F.emit("get_upload_data_finish",d.UploadData)}})}}),ie=d.ContentLength,delete d.ContentLength,!d.Headers&&(d.Headers={}),L.each(d.Headers,function(Se,ce){ce.toLowerCase()==="content-length"&&delete d.Headers[ce]}),function(){for(var Se=[1,2,4,8,16,32,64,128,256,512,1024,1024*2,1024*4,1024*5],ce=1024*1024,me=0;me<Se.length&&(ce=Se[me]*1024*1024,!(ie/ce<=P.options.MaxPartNumber));me++);d.ChunkSize=d.SliceSize=oe=Math.max(oe,ce)}(),ie===0?(d.Body="",d.ContentLength=0,d.SkipTask=!0,P.putObject(d,H)):F.emit("get_file_size_finish")}function w(d,H){var P=d.TaskId,F=d.Bucket,Re=d.Region,b=d.Key,z=d.StorageClass,W=this,ne={},oe=d.FileSize,pe=d.SliceSize,he=Math.ceil(oe/pe),ye=0,ie=0,le=L.throttleOnProgress.call(W,oe,d.onHashProgress),ve=function(me,be){var Ee=pe*(me-1),De=Math.min(Ee+pe,oe),ke=De-Ee;ne[me]?be(null,{PartNumber:me,ETag:ne[me],Size:ke}):L.fileSlice(d.Body,Ee,De,!1,function(Be){L.getFileMd5(Be,function(Ne,we){if(Ne)return be(L.error(Ne));var J='"'+we+'"';ne[me]=J,ye+=1,ie+=ke,le({loaded:ie,total:oe}),be(null,{PartNumber:me,ETag:J,Size:ke})})})},Le=function(me,be){var Ee=me.length;if(Ee===0)return be(null,!0);if(Ee>he)return be(null,!1);if(Ee>1){var De=Math.max(me[0].Size,me[1].Size);if(De!==pe)return be(null,!1)}var ke=function Be(Ne){if(Ne<Ee){var we=me[Ne];ve(we.PartNumber,function(J,T){T&&T.ETag===we.ETag&&T.Size===we.Size?Be(Ne+1):be(null,!1)})}else be(null,!0)};ke(0)},Se=new E;Se.on("error",function(ce){if(!!W._isRunningTask(P))return H(ce)}),Se.on("upload_id_available",function(ce){var me={},be=[];L.each(ce.PartList,function(ke){me[ke.PartNumber]=ke});for(var Ee=1;Ee<=he;Ee++){var De=me[Ee];De?(De.PartNumber=Ee,De.Uploaded=!0):De={PartNumber:Ee,ETag:null,Uploaded:!1},be.push(De)}ce.PartList=be,H(null,ce)}),Se.on("no_available_upload_id",function(){if(!!W._isRunningTask(P)){var ce=L.extend({Bucket:F,Region:Re,Key:b,Query:L.clone(d.Query),StorageClass:z,Body:d.Body,calledBySdk:"sliceUploadFile",tracker:d.tracker},d),me=L.clone(d.Headers);delete me["x-cos-mime-limit"],ce.Headers=me,W.multipartInit(ce,function(be,Ee){if(!!W._isRunningTask(P)){if(be)return Se.emit("error",be);var De=Ee.UploadId;if(!De)return H(L.error(new Error("no such upload id")));Se.emit("upload_id_available",{UploadId:De,PartList:[]})}})}}),Se.on("has_and_check_upload_id",function(ce){ce=ce.reverse(),ee.eachLimit(ce,1,function(me,be){if(!!W._isRunningTask(P)){if(n.using[me]){be();return}G.call(W,{Bucket:F,Region:Re,Key:b,UploadId:me,tracker:d.tracker},function(Ee,De){if(!!W._isRunningTask(P)){if(Ee)return n.removeUsing(me),Se.emit("error",Ee);var ke=De.PartList;ke.forEach(function(Be){Be.PartNumber*=1,Be.Size*=1,Be.ETag=Be.ETag||""}),Le(ke,function(Be,Ne){if(!!W._isRunningTask(P)){if(Be)return Se.emit("error",Be);Ne?be({UploadId:me,PartList:ke}):be()}})}})}},function(me){!W._isRunningTask(P)||(le(null,!0),me&&me.UploadId?Se.emit("upload_id_available",me):Se.emit("no_available_upload_id"))})}),Se.on("seek_local_avail_upload_id",function(ce){var me=n.getFileId(d.Body,d.ChunkSize,F,b),be=n.getUploadIdList.call(W,me);if(!me||!be){Se.emit("has_and_check_upload_id",ce);return}var Ee=function De(ke){if(ke>=be.length){Se.emit("has_and_check_upload_id",ce);return}var Be=be[ke];if(!L.isInArray(ce,Be)){n.removeUploadId.call(W,Be),De(ke+1);return}if(n.using[Be]){De(ke+1);return}G.call(W,{Bucket:F,Region:Re,Key:b,UploadId:Be,tracker:d.tracker},function(Ne,we){!W._isRunningTask(P)||(Ne?(n.removeUploadId.call(W,Be),De(ke+1)):Se.emit("upload_id_available",{UploadId:Be,PartList:we.PartList}))})};Ee(0)}),Se.on("get_remote_upload_id_list",function(){V.call(W,{Bucket:F,Region:Re,Key:b,tracker:d.tracker},function(ce,me){if(!!W._isRunningTask(P)){if(ce)return Se.emit("error",ce);var be=L.filter(me.UploadList,function(ke){return ke.Key===b&&(!z||ke.StorageClass.toUpperCase()===z.toUpperCase())}).reverse().map(function(ke){return ke.UploadId||ke.UploadID});if(be.length)Se.emit("seek_local_avail_upload_id",be);else{var Ee=n.getFileId(d.Body,d.ChunkSize,F,b),De;Ee&&(De=n.getUploadIdList.call(W,Ee))&&L.each(De,function(ke){n.removeUploadId.call(W,ke)}),Se.emit("no_available_upload_id")}}})}),Se.emit("get_remote_upload_id_list")}function V(d,H){var P=this,F=[],Re={Bucket:d.Bucket,Region:d.Region,Prefix:d.Key,calledBySdk:d.calledBySdk||"sliceUploadFile",tracker:d.tracker},b=function z(){P.multipartList(Re,function(W,ne){if(W)return H(W);F.push.apply(F,ne.Upload||[]),ne.IsTruncated==="true"?(Re.KeyMarker=ne.NextKeyMarker,Re.UploadIdMarker=ne.NextUploadIdMarker,z()):H(null,{UploadList:F})})};b()}function G(d,H){var P=this,F=[],Re={Bucket:d.Bucket,Region:d.Region,Key:d.Key,UploadId:d.UploadId,calledBySdk:"sliceUploadFile",tracker:d.tracker},b=function z(){P.multipartListPart(Re,function(W,ne){if(W)return H(W);F.push.apply(F,ne.Part||[]),ne.IsTruncated==="true"?(Re.PartNumberMarker=ne.NextPartNumberMarker,z()):H(null,{PartList:F})})};b()}function Q(d,H){var P=this,F=d.TaskId,Re=d.Bucket,b=d.Region,z=d.Key,W=d.UploadData,ne=d.FileSize,oe=d.SliceSize,pe=Math.min(d.AsyncLimit||P.options.ChunkParallelLimit||1,256),he=d.Body,ye=Math.ceil(ne/oe),ie=0,le=d.ServerSideEncryption,ve=d.Headers,Le=L.filter(W.PartList,function(ce){return ce.Uploaded&&(ie+=ce.PartNumber>=ye&&ne%oe||oe),!ce.Uploaded}),Se=d.onProgress;ee.eachLimit(Le,pe,function(ce,me){if(!!P._isRunningTask(F)){var be=ce.PartNumber,Ee=Math.min(ne,ce.PartNumber*oe)-(ce.PartNumber-1)*oe,De=0;M.call(P,{TaskId:F,Bucket:Re,Region:b,Key:z,SliceSize:oe,FileSize:ne,PartNumber:be,ServerSideEncryption:le,Body:he,UploadData:W,Headers:ve,onProgress:function(Be){ie+=Be.loaded-De,De=Be.loaded,Se({loaded:ie,total:ne})},tracker:d.tracker},function(ke,Be){!P._isRunningTask(F)||(!ke&&!Be.ETag&&(ke='get ETag error, please add "ETag" to CORS ExposeHeader setting.( \u83B7\u53D6ETag\u5931\u8D25\uFF0C\u8BF7\u5728CORS ExposeHeader\u8BBE\u7F6E\u4E2D\u6DFB\u52A0ETag\uFF0C\u8BF7\u53C2\u8003\u6587\u6863\uFF1Ahttps://cloud.tencent.com/document/product/436/13318 )'),ke?ie-=De:(ie+=Ee-De,ce.ETag=Be.ETag),Se({loaded:ie,total:ne}),me(ke||null,Be))})}},function(ce){if(!!P._isRunningTask(F)){if(ce)return H(ce);H(null,{UploadId:W.UploadId,SliceList:W.PartList})}})}function M(d,H){var P=this,F=d.TaskId,Re=d.Bucket,b=d.Region,z=d.Key,W=d.FileSize,ne=d.Body,oe=d.PartNumber*1,pe=d.SliceSize,he=d.ServerSideEncryption,ye=d.UploadData,ie=d.Headers||{},le=P.options.ChunkRetryTimes+1,ve=pe*(oe-1),Le=pe,Se=ve+pe;Se>W&&(Se=W,Le=Se-ve);var ce=["x-cos-traffic-limit","x-cos-mime-limit"],me={};L.each(ie,function(Ee,De){ce.indexOf(De)>-1&&(me[De]=Ee)});var be=ye.PartList[oe-1];ee.retry(le,function(Ee){!P._isRunningTask(F)||L.fileSlice(ne,ve,Se,!0,function(De){P.multipartUpload({TaskId:F,Bucket:Re,Region:b,Key:z,ContentLength:Le,PartNumber:oe,UploadId:ye.UploadId,ServerSideEncryption:he,Body:De,Headers:me,onProgress:d.onProgress,calledBySdk:"sliceUploadFile",tracker:d.tracker},function(ke,Be){if(!!P._isRunningTask(F))return ke?Ee(ke):(be.Uploaded=!0,Ee(null,Be))})})},function(Ee,De){if(!!P._isRunningTask(F))return H(Ee,De)})}function q(d,H){var P=d.Bucket,F=d.Region,Re=d.Key,b=d.UploadId,z=d.SliceList,W=this,ne=this.options.ChunkRetryTimes+1,oe=d.Headers,pe=z.map(function(he){return{PartNumber:he.PartNumber,ETag:he.ETag}});ee.retry(ne,function(he){W.multipartComplete({Bucket:P,Region:F,Key:Re,UploadId:b,Parts:pe,Headers:oe,calledBySdk:"sliceUploadFile",tracker:d.tracker},he)},function(he,ye){H(he,ye)})}function re(d,H){var P=d.Bucket,F=d.Region,Re=d.Key,b=d.UploadId,z=d.Level||"task",W=d.AsyncLimit,ne=this,oe=new E;if(oe.on("error",function(pe){return H(pe)}),oe.on("get_abort_array",function(pe){K.call(ne,{Bucket:P,Region:F,Key:Re,Headers:d.Headers,AsyncLimit:W,AbortArray:pe},H)}),z==="bucket")V.call(ne,{Bucket:P,Region:F,calledBySdk:"abortUploadTask"},function(pe,he){if(pe)return H(pe);oe.emit("get_abort_array",he.UploadList||[])});else if(z==="file"){if(!Re)return H(L.error(new Error("abort_upload_task_no_key")));V.call(ne,{Bucket:P,Region:F,Key:Re,calledBySdk:"abortUploadTask"},function(pe,he){if(pe)return H(pe);oe.emit("get_abort_array",he.UploadList||[])})}else if(z==="task"){if(!b)return H(L.error(new Error("abort_upload_task_no_id")));if(!Re)return H(L.error(new Error("abort_upload_task_no_key")));oe.emit("get_abort_array",[{Key:Re,UploadId:b}])}else return H(L.error(new Error("abort_unknown_level")))}function K(d,H){var P=d.Bucket,F=d.Region,Re=d.Key,b=d.AbortArray,z=d.AsyncLimit||1,W=this,ne=0,oe=new Array(b.length);ee.eachLimit(b,z,function(pe,he){var ye=ne;if(Re&&Re!==pe.Key){oe[ye]={error:{KeyNotMatch:!0}},he(null);return}var ie=pe.UploadId||pe.UploadID;W.multipartAbort({Bucket:P,Region:F,Key:pe.Key,Headers:d.Headers,UploadId:ie},function(le){var ve={Bucket:P,Region:F,Key:pe.Key,UploadId:ie};oe[ye]={error:le,task:ve},he(null)}),ne++},function(pe){if(pe)return H(pe);for(var he=[],ye=[],ie=0,le=oe.length;ie<le;ie++){var ve=oe[ie];ve.task&&(ve.error?ye.push(ve.task):he.push(ve.task))}return H(null,{successList:he,errorList:ye})})}function Ae(d,H){var P=this,F=d.SliceSize===void 0?P.options.SliceSize:d.SliceSize,Re=[],b=d.Body,z=b.size||b.length||0,W={TaskId:""};if(P.options.EnableTracker){var ne=P.options.UseAccelerate||P.options.Domain&&P.options.Domain.includes("accelerate.");d.tracker=new fe({bucket:d.Bucket,region:d.Region,apiName:"uploadFile",fileKey:d.Key,fileSize:z,accelerate:ne,deepTracker:P.options.DeepTracker,customId:P.options.CustomId,delay:P.options.TrackerDelay})}L.each(d,function(le,ve){v(le)!=="object"&&typeof le!="function"&&(W[ve]=le)});var oe=d.onTaskReady,pe=function(ve){W.TaskId=ve,oe&&oe(ve)};d.onTaskReady=pe;var he=z>F?"sliceUploadFile":"putObject",ye=d.onFileFinish,ie=function(ve,Le){d.tracker&&d.tracker.formatResult(ve,Le),ye&&ye(ve,Le,W),H&&H(ve,Le)};Re.push({api:he,params:d,callback:ie}),P._addTasks(Re)}function D(d,H){var P=this,F=d.SliceSize===void 0?P.options.SliceSize:d.SliceSize,Re=0,b=0,z=L.throttleOnProgress.call(P,b,d.onProgress),W=d.files.length,ne=d.onFileFinish,oe=Array(W),pe=function(ie,le,ve){z(null,!0),ne&&ne(ie,le,ve),oe[ve.Index]={options:ve,error:ie,data:le},--W<=0&&H&&H(null,{files:oe})},he=[];L.each(d.files,function(ye,ie){(function(){var le=ye.Body,ve=le.size||le.length||0,Le={Index:ie,TaskId:""};if(Re+=ve,P.options.EnableTracker){var Se=P.options.UseAccelerate||P.options.Domain&&P.options.Domain.includes("accelerate.");ye.tracker=new fe({bucket:ye.Bucket,region:ye.Region,apiName:"uploadFiles",fileKey:ye.Key,fileSize:ve,accelerate:Se,deepTracker:P.options.DeepTracker,customId:P.options.CustomId,delay:P.options.TrackerDelay})}L.each(ye,function(we,J){v(we)!=="object"&&typeof we!="function"&&(Le[J]=we)});var ce=ye.onTaskReady,me=function(J){Le.TaskId=J,ce&&ce(J)};ye.onTaskReady=me;var be=0,Ee=ye.onProgress,De=function(J){b=b-be+J.loaded,be=J.loaded,Ee&&Ee(J),z({loaded:b,total:Re})};ye.onProgress=De;var ke=ve>F?"sliceUploadFile":"putObject",Be=ye.onFileFinish,Ne=function(J,T){ye.tracker&&ye.tracker.formatResult(J,T),Be&&Be(J,T),pe&&pe(J,T,Le)};he.push({api:ke,params:ye,callback:Ne})})()}),P._addTasks(he)}function R(d,H){var P=new E,F=this,Re=d.Bucket,b=d.Region,z=d.Key,W=d.CopySource,ne=L.getSourceParams.call(this,W);if(!ne){H(L.error(new Error("CopySource format error")));return}var oe=ne.Bucket,pe=ne.Region,he=decodeURIComponent(ne.Key),ye=d.CopySliceSize===void 0?F.options.CopySliceSize:d.CopySliceSize;ye=Math.max(0,ye);var ie=d.CopyChunkSize||this.options.CopyChunkSize,le=this.options.CopyChunkParallelLimit,ve=this.options.ChunkRetryTimes+1,Le=0,Se=0,ce,me,be={},Ee={},De={};P.on("copy_slice_complete",function(ke){var Be={};L.each(d.Headers,function(we,J){J.toLowerCase().indexOf("x-cos-meta-")===0&&(Be[J]=we)});var Ne=L.map(ke.PartList,function(we){return{PartNumber:we.PartNumber,ETag:we.ETag}});ee.retry(ve,function(we){F.multipartComplete({Bucket:Re,Region:b,Key:z,UploadId:ke.UploadId,Parts:Ne,calledBySdk:"sliceCopyFile"},we)},function(we,J){if(n.removeUsing(ke.UploadId),we)return me(null,!0),H(we);n.removeUploadId(ke.UploadId),me({loaded:ce,total:ce},!0),H(null,J)})}),P.on("get_copy_data_finish",function(ke){var Be=n.getCopyFileId(W,be,ie,Re,z);Be&&n.saveUploadId(Be,ke.UploadId,F.options.UploadIdCacheLimit),n.setUsing(ke.UploadId);var Ne=L.filter(ke.PartList,function(we){return we.Uploaded&&(Se+=we.PartNumber>=Le&&ce%ie||ie),!we.Uploaded});ee.eachLimit(Ne,le,function(we,J){var T=we.PartNumber,U=we.CopySourceRange,I=we.end-we.start;ee.retry(ve,function($){m.call(F,{Bucket:Re,Region:b,Key:z,CopySource:W,UploadId:ke.UploadId,PartNumber:T,CopySourceRange:U},$)},function($,ge){if($)return J($);Se+=I,me({loaded:Se,total:ce}),we.ETag=ge.ETag,J($||null,ge)})},function(we){if(we)return n.removeUsing(ke.UploadId),me(null,!0),H(we);P.emit("copy_slice_complete",ke)})}),P.on("get_chunk_size_finish",function(){var ke=function(){F.multipartInit({Bucket:Re,Region:b,Key:z,Headers:De},function(T,U){if(T)return H(T);d.UploadId=U.UploadId,P.emit("get_copy_data_finish",{UploadId:d.UploadId,PartList:d.PartList})})},Be=n.getCopyFileId(W,be,ie,Re,z),Ne=n.getUploadIdList(Be);if(!Be||!Ne)return ke();var we=function J(T){if(T>=Ne.length)return ke();var U=Ne[T];if(n.using[U])return J(T+1);G.call(F,{Bucket:Re,Region:b,Key:z,UploadId:U},function(I,$){if(I)n.removeUploadId(U),J(T+1);else{if(n.using[U])return J(T+1);var ge={},_e=0;L.each($.PartList,function(x){var u=parseInt(x.Size),f=_e+u-1;ge[x.PartNumber+"|"+_e+"|"+f]=x.ETag,_e+=u}),L.each(d.PartList,function(x){var u=ge[x.PartNumber+"|"+x.start+"|"+x.end];u&&(x.ETag=u,x.Uploaded=!0)}),P.emit("get_copy_data_finish",{UploadId:U,PartList:d.PartList})}})};we(0)}),P.on("get_file_size_finish",function(){if(function(){for(var Be=[1,2,4,8,16,32,64,128,256,512,1024,1024*2,1024*4,1024*5],Ne=1024*1024,we=0;we<Be.length&&(Ne=Be[we]*1024*1024,!(ce/Ne<=F.options.MaxPartNumber));we++);d.ChunkSize=ie=Math.max(ie,Ne),Le=Math.ceil(ce/ie);for(var J=[],T=1;T<=Le;T++){var U=(T-1)*ie,I=T*ie<ce?T*ie-1:ce-1,$={PartNumber:T,start:U,end:I,CopySourceRange:"bytes="+U+"-"+I};J.push($)}d.PartList=J}(),d.Headers["x-cos-metadata-directive"]==="Replaced"?De=d.Headers:De=Ee,De["x-cos-storage-class"]=d.Headers["x-cos-storage-class"]||Ee["x-cos-storage-class"],De=L.clearKey(De),Ee["x-cos-storage-class"]==="ARCHIVE"||Ee["x-cos-storage-class"]==="DEEP_ARCHIVE"){var ke=Ee["x-cos-restore"];if(!ke||ke==='ongoing-request="true"'){H(L.error(new Error("Unrestored archive object is not allowed to be copied")));return}}delete De["x-cos-copy-source"],delete De["x-cos-metadata-directive"],delete De["x-cos-copy-source-If-Modified-Since"],delete De["x-cos-copy-source-If-Unmodified-Since"],delete De["x-cos-copy-source-If-Match"],delete De["x-cos-copy-source-If-None-Match"],P.emit("get_chunk_size_finish")}),F.headObject({Bucket:oe,Region:pe,Key:he},function(ke,Be){if(ke){ke.statusCode&&ke.statusCode===404?H(L.error(ke,{ErrorStatus:he+" Not Exist"})):H(ke);return}if(ce=d.FileSize=Be.headers["content-length"],ce===void 0||!ce){H(L.error(new Error('get Content-Length error, please add "Content-Length" to CORS ExposeHeader setting.\uFF08 \u83B7\u53D6Content-Length\u5931\u8D25\uFF0C\u8BF7\u5728CORS ExposeHeader\u8BBE\u7F6E\u4E2D\u6DFB\u52A0Content-Length\uFF0C\u8BF7\u53C2\u8003\u6587\u6863\uFF1Ahttps://cloud.tencent.com/document/product/436/13318 \uFF09')));return}if(me=L.throttleOnProgress.call(F,ce,d.onProgress),ce<=ye)d.Headers["x-cos-metadata-directive"]||(d.Headers["x-cos-metadata-directive"]="Copy"),F.putObjectCopy(d,function(we,J){if(we)return me(null,!0),H(we);me({loaded:ce,total:ce},!0),H(we,J)});else{var Ne=Be.headers;be=Ne,Ee={"Cache-Control":Ne["cache-control"],"Content-Disposition":Ne["content-disposition"],"Content-Encoding":Ne["content-encoding"],"Content-Type":Ne["content-type"],Expires:Ne.expires,"x-cos-storage-class":Ne["x-cos-storage-class"]},L.each(Ne,function(we,J){var T="x-cos-meta-";J.indexOf(T)===0&&J.length>T.length&&(Ee[J]=we)}),P.emit("get_file_size_finish")}})}function m(d,H){var P=d.TaskId,F=d.Bucket,Re=d.Region,b=d.Key,z=d.CopySource,W=d.UploadId,ne=d.PartNumber*1,oe=d.CopySourceRange,pe=this.options.ChunkRetryTimes+1,he=this;ee.retry(pe,function(ye){he.uploadPartCopy({TaskId:P,Bucket:F,Region:Re,Key:b,CopySource:z,UploadId:W,PartNumber:ne,CopySourceRange:oe},function(ie,le){ye(ie||null,le)})},function(ye,ie){return H(ye,ie)})}var B={sliceUploadFile:N,abortUploadTask:re,uploadFile:Ae,uploadFiles:D,sliceCopyFile:R};p.exports.init=function(d,H){H.transferToTaskMethod(B,"sliceUploadFile"),L.each(B,function(P,F){d.prototype[F]=L.apiWrapper(F,P)})}},"./src/async.js":function(p,S){var s=function(E,L,fe,N){if(N=N||function(){},!E.length||L<=0)return N();var w=0,V=0,G=0;(function Q(){if(w>=E.length)return N();for(;G<L&&V<E.length;)V+=1,G+=1,fe(E[V-1],function(M){M?(N(M),N=function(){}):(w+=1,G-=1,w>=E.length?N():Q())})})()},v=function(E,L,fe){var N=function w(V){L(function(G,Q){G&&V<E?w(V+1):fe(G,Q)})};E<1?fe():N(1)},n={eachLimit:s,retry:v};p.exports=n},"./src/base.js":function(p,S,s){var v=s("./lib/request.js"),n=s("./src/util.js");function ee(e,r){typeof e=="function"&&(r=e,e={});var t=this.options.Protocol||(n.isBrowser&&location.protocol==="http:"?"http:":"https:"),i=this.options.ServiceDomain,l=e.AppId||this.options.appId,c=e.Region;i?(i=i.replace(/\{\{AppId\}\}/ig,l||"").replace(/\{\{Region\}\}/ig,c||"").replace(/\{\{.*?\}\}/ig,""),/^[a-zA-Z]+:\/\//.test(i)||(i=t+"//"+i),i.slice(-1)==="/"&&(i=i.slice(0,-1))):c?i=t+"//cos."+c+".myqcloud.com":i=t+"//service.cos.myqcloud.com";var y="",k=c?"cos."+c+".myqcloud.com":"service.cos.myqcloud.com",j=i.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1");k===j&&(y=k),C.call(this,{Action:"name/cos:GetService",url:i,method:"GET",headers:e.Headers,SignHost:y},function(de,se){if(de)return r(de);var Te=se&&se.ListAllMyBucketsResult&&se.ListAllMyBucketsResult.Buckets&&se.ListAllMyBucketsResult.Buckets.Bucket||[];Te=n.isArray(Te)?Te:[Te];var Ie=se&&se.ListAllMyBucketsResult&&se.ListAllMyBucketsResult.Owner||{};r(null,{Buckets:Te,Owner:Ie,statusCode:se.statusCode,headers:se.headers})})}function E(e,r){var t=this,i="";if(e.BucketAZConfig){var l={BucketAZConfig:e.BucketAZConfig};i=n.json2xml({CreateBucketConfiguration:l})}C.call(this,{Action:"name/cos:PutBucket",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,body:i},function(c,y){if(c)return r(c);var k=Xe({protocol:t.options.Protocol,domain:t.options.Domain,bucket:e.Bucket,region:e.Region,isLocation:!0});r(null,{Location:k,statusCode:y.statusCode,headers:y.headers})})}function L(e,r){C.call(this,{Action:"name/cos:HeadBucket",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,method:"HEAD"},r)}function fe(e,r){var t={};t.prefix=e.Prefix||"",t.delimiter=e.Delimiter,t.marker=e.Marker,t["max-keys"]=e.MaxKeys,t["encoding-type"]=e.EncodingType,C.call(this,{Action:"name/cos:GetBucket",ResourceKey:t.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:t},function(i,l){if(i)return r(i);var c=l.ListBucketResult||{},y=c.Contents||[],k=c.CommonPrefixes||[];y=n.isArray(y)?y:[y],k=n.isArray(k)?k:[k];var j=n.clone(c);n.extend(j,{Contents:y,CommonPrefixes:k,statusCode:l.statusCode,headers:l.headers}),r(null,j)})}function N(e,r){C.call(this,{Action:"name/cos:DeleteBucket",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,method:"DELETE"},function(t,i){if(t&&t.statusCode===204)return r(null,{statusCode:t.statusCode});if(t)return r(t);r(null,{statusCode:i.statusCode,headers:i.headers})})}function w(e,r){var t=e.Headers,i="";if(e.AccessControlPolicy){var l=n.clone(e.AccessControlPolicy||{}),c=l.Grants||l.Grant;c=n.isArray(c)?c:[c],delete l.Grant,delete l.Grants,l.AccessControlList={Grant:c},i=n.json2xml({AccessControlPolicy:l}),t["Content-Type"]="application/xml",t["Content-MD5"]=n.binaryBase64(n.md5(i))}n.each(t,function(y,k){k.indexOf("x-cos-grant-")===0&&(t[k]=qe(t[k]))}),C.call(this,{Action:"name/cos:PutBucketACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:t,action:"acl",body:i},function(y,k){if(y)return r(y);r(null,{statusCode:k.statusCode,headers:k.headers})})}function V(e,r){C.call(this,{Action:"name/cos:GetBucketACL",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"acl"},function(t,i){if(t)return r(t);var l=i.AccessControlPolicy||{},c=l.Owner||{},y=l.AccessControlList.Grant||[];y=n.isArray(y)?y:[y];var k=tt(l);i.headers&&i.headers["x-cos-acl"]&&(k.ACL=i.headers["x-cos-acl"]),k=n.extend(k,{Owner:c,Grants:y,statusCode:i.statusCode,headers:i.headers}),r(null,k)})}function G(e,r){var t=e.CORSConfiguration||{},i=t.CORSRules||e.CORSRules||[];i=n.clone(n.isArray(i)?i:[i]),n.each(i,function(k){n.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],function(j){var de=j+"s",se=k[de]||k[j]||[];delete k[de],k[j]=n.isArray(se)?se:[se]})});var l={CORSRule:i};e.ResponseVary&&(l.ResponseVary=e.ResponseVary);var c=n.json2xml({CORSConfiguration:l}),y=e.Headers;y["Content-Type"]="application/xml",y["Content-MD5"]=n.binaryBase64(n.md5(c)),C.call(this,{Action:"name/cos:PutBucketCORS",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:c,action:"cors",headers:y},function(k,j){if(k)return r(k);r(null,{statusCode:j.statusCode,headers:j.headers})})}function Q(e,r){C.call(this,{Action:"name/cos:GetBucketCORS",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"cors"},function(t,i){if(t){if(t.statusCode===404&&t.error&&t.error.Code==="NoSuchCORSConfiguration"){var l={CORSRules:[],statusCode:t.statusCode};t.headers&&(l.headers=t.headers),r(null,l)}else r(t);return}var c=i.CORSConfiguration||{},y=c.CORSRules||c.CORSRule||[];y=n.clone(n.isArray(y)?y:[y]);var k=c.ResponseVary;n.each(y,function(j){n.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],function(de){var se=de+"s",Te=j[se]||j[de]||[];delete j[de],j[se]=n.isArray(Te)?Te:[Te]})}),r(null,{CORSRules:y,ResponseVary:k,statusCode:i.statusCode,headers:i.headers})})}function M(e,r){C.call(this,{Action:"name/cos:DeleteBucketCORS",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"cors"},function(t,i){if(t&&t.statusCode===204)return r(null,{statusCode:t.statusCode});if(t)return r(t);r(null,{statusCode:i.statusCode||t.statusCode,headers:i.headers})})}function q(e,r){C.call(this,{Action:"name/cos:GetBucketLocation",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"location"},r)}function re(e,r){var t=e.Policy;try{typeof t=="string"&&(t=JSON.parse(t))}catch(c){}if(!t||typeof t=="string")return r(n.error(new Error("Policy format error")));var i=JSON.stringify(t);t.version||(t.version="2.0");var l=e.Headers;l["Content-Type"]="application/json",l["Content-MD5"]=n.binaryBase64(n.md5(i)),C.call(this,{Action:"name/cos:PutBucketPolicy",method:"PUT",Bucket:e.Bucket,Region:e.Region,action:"policy",body:i,headers:l},function(c,y){if(c&&c.statusCode===204)return r(null,{statusCode:c.statusCode});if(c)return r(c);r(null,{statusCode:y.statusCode,headers:y.headers})})}function K(e,r){C.call(this,{Action:"name/cos:GetBucketPolicy",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"policy",rawBody:!0},function(t,i){if(t)return t.statusCode&&t.statusCode===403?r(n.error(t,{ErrorStatus:"Access Denied"})):t.statusCode&&t.statusCode===405?r(n.error(t,{ErrorStatus:"Method Not Allowed"})):t.statusCode&&t.statusCode===404?r(n.error(t,{ErrorStatus:"Policy Not Found"})):r(t);var l={};try{l=JSON.parse(i.body)}catch(c){}r(null,{Policy:l,statusCode:i.statusCode,headers:i.headers})})}function Ae(e,r){C.call(this,{Action:"name/cos:DeleteBucketPolicy",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"policy"},function(t,i){if(t&&t.statusCode===204)return r(null,{statusCode:t.statusCode});if(t)return r(t);r(null,{statusCode:i.statusCode||t.statusCode,headers:i.headers})})}function D(e,r){var t=e.Tagging||{},i=t.TagSet||t.Tags||e.Tags||[];i=n.clone(n.isArray(i)?i:[i]);var l=n.json2xml({Tagging:{TagSet:{Tag:i}}}),c=e.Headers;c["Content-Type"]="application/xml",c["Content-MD5"]=n.binaryBase64(n.md5(l)),C.call(this,{Action:"name/cos:PutBucketTagging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:l,action:"tagging",headers:c},function(y,k){if(y&&y.statusCode===204)return r(null,{statusCode:y.statusCode});if(y)return r(y);r(null,{statusCode:k.statusCode,headers:k.headers})})}function R(e,r){C.call(this,{Action:"name/cos:GetBucketTagging",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging"},function(t,i){if(t){if(t.statusCode===404&&t.error&&(t.error==="Not Found"||t.error.Code==="NoSuchTagSet")){var l={Tags:[],statusCode:t.statusCode};t.headers&&(l.headers=t.headers),r(null,l)}else r(t);return}var c=[];try{c=i.Tagging.TagSet.Tag||[]}catch(y){}c=n.clone(n.isArray(c)?c:[c]),r(null,{Tags:c,statusCode:i.statusCode,headers:i.headers})})}function m(e,r){C.call(this,{Action:"name/cos:DeleteBucketTagging",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging"},function(t,i){if(t&&t.statusCode===204)return r(null,{statusCode:t.statusCode});if(t)return r(t);r(null,{statusCode:i.statusCode,headers:i.headers})})}function B(e,r){var t=e.LifecycleConfiguration||{},i=t.Rules||e.Rules||[];i=n.clone(i);var l=n.json2xml({LifecycleConfiguration:{Rule:i}}),c=e.Headers;c["Content-Type"]="application/xml",c["Content-MD5"]=n.binaryBase64(n.md5(l)),C.call(this,{Action:"name/cos:PutBucketLifecycle",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:l,action:"lifecycle",headers:c},function(y,k){if(y&&y.statusCode===204)return r(null,{statusCode:y.statusCode});if(y)return r(y);r(null,{statusCode:k.statusCode,headers:k.headers})})}function d(e,r){C.call(this,{Action:"name/cos:GetBucketLifecycle",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"lifecycle"},function(t,i){if(t){if(t.statusCode===404&&t.error&&t.error.Code==="NoSuchLifecycleConfiguration"){var l={Rules:[],statusCode:t.statusCode};t.headers&&(l.headers=t.headers),r(null,l)}else r(t);return}var c=[];try{c=i.LifecycleConfiguration.Rule||[]}catch(y){}c=n.clone(n.isArray(c)?c:[c]),r(null,{Rules:c,statusCode:i.statusCode,headers:i.headers})})}function H(e,r){C.call(this,{Action:"name/cos:DeleteBucketLifecycle",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"lifecycle"},function(t,i){if(t&&t.statusCode===204)return r(null,{statusCode:t.statusCode});if(t)return r(t);r(null,{statusCode:i.statusCode,headers:i.headers})})}function P(e,r){if(!e.VersioningConfiguration){r(n.error(new Error("missing param VersioningConfiguration")));return}var t=e.VersioningConfiguration||{},i=n.json2xml({VersioningConfiguration:t}),l=e.Headers;l["Content-Type"]="application/xml",l["Content-MD5"]=n.binaryBase64(n.md5(i)),C.call(this,{Action:"name/cos:PutBucketVersioning",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"versioning",headers:l},function(c,y){if(c&&c.statusCode===204)return r(null,{statusCode:c.statusCode});if(c)return r(c);r(null,{statusCode:y.statusCode,headers:y.headers})})}function F(e,r){C.call(this,{Action:"name/cos:GetBucketVersioning",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"versioning"},function(t,i){t||!i.VersioningConfiguration&&(i.VersioningConfiguration={}),r(t,i)})}function Re(e,r){var t=n.clone(e.ReplicationConfiguration),i=n.json2xml({ReplicationConfiguration:t});i=i.replace(/<(\/?)Rules>/ig,"<$1Rule>"),i=i.replace(/<(\/?)Tags>/ig,"<$1Tag>");var l=e.Headers;l["Content-Type"]="application/xml",l["Content-MD5"]=n.binaryBase64(n.md5(i)),C.call(this,{Action:"name/cos:PutBucketReplication",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"replication",headers:l},function(c,y){if(c&&c.statusCode===204)return r(null,{statusCode:c.statusCode});if(c)return r(c);r(null,{statusCode:y.statusCode,headers:y.headers})})}function b(e,r){C.call(this,{Action:"name/cos:GetBucketReplication",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"replication"},function(t,i){if(t){if(t.statusCode===404&&t.error&&(t.error==="Not Found"||t.error.Code==="ReplicationConfigurationnotFoundError")){var l={ReplicationConfiguration:{Rules:[]},statusCode:t.statusCode};t.headers&&(l.headers=t.headers),r(null,l)}else r(t);return}!i.ReplicationConfiguration&&(i.ReplicationConfiguration={}),i.ReplicationConfiguration.Rule&&(i.ReplicationConfiguration.Rules=n.makeArray(i.ReplicationConfiguration.Rule),delete i.ReplicationConfiguration.Rule),r(t,i)})}function z(e,r){C.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"replication"},function(t,i){if(t&&t.statusCode===204)return r(null,{statusCode:t.statusCode});if(t)return r(t);r(null,{statusCode:i.statusCode,headers:i.headers})})}function W(e,r){if(!e.WebsiteConfiguration){r(n.error(new Error("missing param WebsiteConfiguration")));return}var t=n.clone(e.WebsiteConfiguration||{}),i=t.RoutingRules||t.RoutingRule||[];i=n.isArray(i)?i:[i],delete t.RoutingRule,delete t.RoutingRules,i.length&&(t.RoutingRules={RoutingRule:i});var l=n.json2xml({WebsiteConfiguration:t}),c=e.Headers;c["Content-Type"]="application/xml",c["Content-MD5"]=n.binaryBase64(n.md5(l)),C.call(this,{Action:"name/cos:PutBucketWebsite",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:l,action:"website",headers:c},function(y,k){if(y&&y.statusCode===204)return r(null,{statusCode:y.statusCode});if(y)return r(y);r(null,{statusCode:k.statusCode,headers:k.headers})})}function ne(e,r){C.call(this,{Action:"name/cos:GetBucketWebsite",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"website"},function(t,i){if(t){if(t.statusCode===404&&t.error.Code==="NoSuchWebsiteConfiguration"){var l={WebsiteConfiguration:{},statusCode:t.statusCode};t.headers&&(l.headers=t.headers),r(null,l)}else r(t);return}var c=i.WebsiteConfiguration||{};if(c.RoutingRules){var y=n.clone(c.RoutingRules.RoutingRule||[]);y=n.makeArray(y),c.RoutingRules=y}r(null,{WebsiteConfiguration:c,statusCode:i.statusCode,headers:i.headers})})}function oe(e,r){C.call(this,{Action:"name/cos:DeleteBucketWebsite",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"website"},function(t,i){if(t&&t.statusCode===204)return r(null,{statusCode:t.statusCode});if(t)return r(t);r(null,{statusCode:i.statusCode,headers:i.headers})})}function pe(e,r){if(!e.RefererConfiguration){r(n.error(new Error("missing param RefererConfiguration")));return}var t=n.clone(e.RefererConfiguration||{}),i=t.DomainList||{},l=i.Domains||i.Domain||[];l=n.isArray(l)?l:[l],l.length&&(t.DomainList={Domain:l});var c=n.json2xml({RefererConfiguration:t}),y=e.Headers;y["Content-Type"]="application/xml",y["Content-MD5"]=n.binaryBase64(n.md5(c)),C.call(this,{Action:"name/cos:PutBucketReferer",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:c,action:"referer",headers:y},function(k,j){if(k&&k.statusCode===204)return r(null,{statusCode:k.statusCode});if(k)return r(k);r(null,{statusCode:j.statusCode,headers:j.headers})})}function he(e,r){C.call(this,{Action:"name/cos:GetBucketReferer",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"referer"},function(t,i){if(t){if(t.statusCode===404&&t.error.Code==="NoSuchRefererConfiguration"){var l={WebsiteConfiguration:{},statusCode:t.statusCode};t.headers&&(l.headers=t.headers),r(null,l)}else r(t);return}var c=i.RefererConfiguration||{};if(c.DomainList){var y=n.makeArray(c.DomainList.Domain||[]);c.DomainList={Domains:y}}r(null,{RefererConfiguration:c,statusCode:i.statusCode,headers:i.headers})})}function ye(e,r){var t=e.DomainConfiguration||{},i=t.DomainRule||e.DomainRule||[];i=n.clone(i);var l=n.json2xml({DomainConfiguration:{DomainRule:i}}),c=e.Headers;c["Content-Type"]="application/xml",c["Content-MD5"]=n.binaryBase64(n.md5(l)),C.call(this,{Action:"name/cos:PutBucketDomain",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:l,action:"domain",headers:c},function(y,k){if(y&&y.statusCode===204)return r(null,{statusCode:y.statusCode});if(y)return r(y);r(null,{statusCode:k.statusCode,headers:k.headers})})}function ie(e,r){C.call(this,{Action:"name/cos:GetBucketDomain",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"domain"},function(t,i){if(t)return r(t);var l=[];try{l=i.DomainConfiguration.DomainRule||[]}catch(c){}l=n.clone(n.isArray(l)?l:[l]),r(null,{DomainRule:l,statusCode:i.statusCode,headers:i.headers})})}function le(e,r){C.call(this,{Action:"name/cos:DeleteBucketDomain",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"domain"},function(t,i){if(t&&t.statusCode===204)return r(null,{statusCode:t.statusCode});if(t)return r(t);r(null,{statusCode:i.statusCode,headers:i.headers})})}function ve(e,r){var t=e.OriginConfiguration||{},i=t.OriginRule||e.OriginRule||[];i=n.clone(i);var l=n.json2xml({OriginConfiguration:{OriginRule:i}}),c=e.Headers;c["Content-Type"]="application/xml",c["Content-MD5"]=n.binaryBase64(n.md5(l)),C.call(this,{Action:"name/cos:PutBucketOrigin",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:l,action:"origin",headers:c},function(y,k){if(y&&y.statusCode===204)return r(null,{statusCode:y.statusCode});if(y)return r(y);r(null,{statusCode:k.statusCode,headers:k.headers})})}function Le(e,r){C.call(this,{Action:"name/cos:GetBucketOrigin",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"origin"},function(t,i){if(t)return r(t);var l=[];try{l=i.OriginConfiguration.OriginRule||[]}catch(c){}l=n.clone(n.isArray(l)?l:[l]),r(null,{OriginRule:l,statusCode:i.statusCode,headers:i.headers})})}function Se(e,r){C.call(this,{Action:"name/cos:DeleteBucketOrigin",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"origin"},function(t,i){if(t&&t.statusCode===204)return r(null,{statusCode:t.statusCode});if(t)return r(t);r(null,{statusCode:i.statusCode,headers:i.headers})})}function ce(e,r){var t=n.json2xml({BucketLoggingStatus:e.BucketLoggingStatus||""}),i=e.Headers;i["Content-Type"]="application/xml",i["Content-MD5"]=n.binaryBase64(n.md5(t)),C.call(this,{Action:"name/cos:PutBucketLogging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:t,action:"logging",headers:i},function(l,c){if(l&&l.statusCode===204)return r(null,{statusCode:l.statusCode});if(l)return r(l);r(null,{statusCode:c.statusCode,headers:c.headers})})}function me(e,r){C.call(this,{Action:"name/cos:GetBucketLogging",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"logging"},function(t,i){if(t)return r(t);r(null,{BucketLoggingStatus:i.BucketLoggingStatus,statusCode:i.statusCode,headers:i.headers})})}function be(e,r){var t=n.clone(e.InventoryConfiguration);if(t.OptionalFields){var i=t.OptionalFields||[];t.OptionalFields={Field:i}}if(t.Destination&&t.Destination.COSBucketDestination&&t.Destination.COSBucketDestination.Encryption){var l=t.Destination.COSBucketDestination.Encryption;Object.keys(l).indexOf("SSECOS")>-1&&(l["SSE-COS"]=l.SSECOS,delete l.SSECOS)}var c=n.json2xml({InventoryConfiguration:t}),y=e.Headers;y["Content-Type"]="application/xml",y["Content-MD5"]=n.binaryBase64(n.md5(c)),C.call(this,{Action:"name/cos:PutBucketInventory",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:c,action:"inventory",qs:{id:e.Id},headers:y},function(k,j){if(k&&k.statusCode===204)return r(null,{statusCode:k.statusCode});if(k)return r(k);r(null,{statusCode:j.statusCode,headers:j.headers})})}function Ee(e,r){C.call(this,{Action:"name/cos:GetBucketInventory",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{id:e.Id}},function(t,i){if(t)return r(t);var l=i.InventoryConfiguration;if(l&&l.OptionalFields&&l.OptionalFields.Field){var c=l.OptionalFields.Field;n.isArray(c)||(c=[c]),l.OptionalFields=c}if(l.Destination&&l.Destination.COSBucketDestination&&l.Destination.COSBucketDestination.Encryption){var y=l.Destination.COSBucketDestination.Encryption;Object.keys(y).indexOf("SSE-COS")>-1&&(y.SSECOS=y["SSE-COS"],delete y["SSE-COS"])}r(null,{InventoryConfiguration:l,statusCode:i.statusCode,headers:i.headers})})}function De(e,r){C.call(this,{Action:"name/cos:ListBucketInventory",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{"continuation-token":e.ContinuationToken}},function(t,i){if(t)return r(t);var l=i.ListInventoryConfigurationResult,c=l.InventoryConfiguration||[];c=n.isArray(c)?c:[c],delete l.InventoryConfiguration,n.each(c,function(y){if(y&&y.OptionalFields&&y.OptionalFields.Field){var k=y.OptionalFields.Field;n.isArray(k)||(k=[k]),y.OptionalFields=k}if(y.Destination&&y.Destination.COSBucketDestination&&y.Destination.COSBucketDestination.Encryption){var j=y.Destination.COSBucketDestination.Encryption;Object.keys(j).indexOf("SSE-COS")>-1&&(j.SSECOS=j["SSE-COS"],delete j["SSE-COS"])}}),l.InventoryConfigurations=c,n.extend(l,{statusCode:i.statusCode,headers:i.headers}),r(null,l)})}function ke(e,r){C.call(this,{Action:"name/cos:DeleteBucketInventory",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{id:e.Id}},function(t,i){if(t&&t.statusCode===204)return r(null,{statusCode:t.statusCode});if(t)return r(t);r(null,{statusCode:i.statusCode,headers:i.headers})})}function Be(e,r){if(!e.AccelerateConfiguration){r(n.error(new Error("missing param AccelerateConfiguration")));return}var t={AccelerateConfiguration:e.AccelerateConfiguration||{}},i=n.json2xml(t),l={};l["Content-Type"]="application/xml",l["Content-MD5"]=n.binaryBase64(n.md5(i)),C.call(this,{Action:"name/cos:PutBucketAccelerate",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"accelerate",headers:l},function(c,y){if(c)return r(c);r(null,{statusCode:y.statusCode,headers:y.headers})})}function Ne(e,r){C.call(this,{Action:"name/cos:GetBucketAccelerate",method:"GET",Bucket:e.Bucket,Region:e.Region,action:"accelerate"},function(t,i){t||!i.AccelerateConfiguration&&(i.AccelerateConfiguration={}),r(t,i)})}function we(e,r){var t=e.ServerSideEncryptionConfiguration||{},i=t.Rule||t.Rules||[],l=n.json2xml({ServerSideEncryptionConfiguration:{Rule:i}}),c=e.Headers;c["Content-Type"]="application/xml",c["Content-MD5"]=n.binaryBase64(n.md5(l)),C.call(this,{Action:"name/cos:PutBucketEncryption",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:l,action:"encryption",headers:c},function(y,k){if(y&&y.statusCode===204)return r(null,{statusCode:y.statusCode});if(y)return r(y);r(null,{statusCode:k.statusCode,headers:k.headers})})}function J(e,r){C.call(this,{Action:"name/cos:GetBucketEncryption",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"encryption"},function(t,i){if(t){if(t.statusCode===404&&t.code==="NoSuchEncryptionConfiguration"){var l={EncryptionConfiguration:{Rules:[]},statusCode:t.statusCode};t.headers&&(l.headers=t.headers),r(null,l)}else r(t);return}var c=n.makeArray(i.EncryptionConfiguration&&i.EncryptionConfiguration.Rule||[]);i.EncryptionConfiguration={Rules:c},r(t,i)})}function T(e,r){C.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"encryption"},function(t,i){if(t&&t.statusCode===204)return r(null,{statusCode:t.statusCode});if(t)return r(t);r(null,{statusCode:i.statusCode,headers:i.headers})})}function U(e,r){C.call(this,{Action:"name/cos:HeadObject",method:"HEAD",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers},function(t,i){if(t){var l=t.statusCode;return e.Headers["If-Modified-Since"]&&l&&l===304?r(null,{NotModified:!0,statusCode:l}):r(t)}i.ETag=n.attr(i.headers,"etag",""),r(null,i)})}function I(e,r){var t={};t.prefix=e.Prefix||"",t.delimiter=e.Delimiter,t["key-marker"]=e.KeyMarker,t["version-id-marker"]=e.VersionIdMarker,t["max-keys"]=e.MaxKeys,t["encoding-type"]=e.EncodingType,C.call(this,{Action:"name/cos:GetBucketObjectVersions",ResourceKey:t.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:t,action:"versions"},function(i,l){if(i)return r(i);var c=l.ListVersionsResult||{},y=c.DeleteMarker||[];y=n.isArray(y)?y:[y];var k=c.Version||[];k=n.isArray(k)?k:[k];var j=n.clone(c);delete j.DeleteMarker,delete j.Version,n.extend(j,{DeleteMarkers:y,Versions:k,statusCode:l.statusCode,headers:l.headers}),r(null,j)})}function $(e,r){var t=e.Query||{},i=e.QueryString||"",l=n.throttleOnProgress.call(this,0,e.onProgress),c=e.tracker;c&&c.setParams({signStartTime:new Date().getTime()}),t["response-content-type"]=e.ResponseContentType,t["response-content-language"]=e.ResponseContentLanguage,t["response-expires"]=e.ResponseExpires,t["response-cache-control"]=e.ResponseCacheControl,t["response-content-disposition"]=e.ResponseContentDisposition,t["response-content-encoding"]=e.ResponseContentEncoding,C.call(this,{Action:"name/cos:GetObject",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,DataType:e.DataType,headers:e.Headers,qs:t,qsStr:i,rawBody:!0,onDownloadProgress:l,tracker:c},function(y,k){if(l(null,!0),y){var j=y.statusCode;return e.Headers["If-Modified-Since"]&&j&&j===304?r(null,{NotModified:!0}):r(y)}r(null,{Body:k.body,ETag:n.attr(k.headers,"etag",""),statusCode:k.statusCode,headers:k.headers})})}function ge(e,r){var t=this,i=e.ContentLength,l=n.throttleOnProgress.call(t,i,e.onProgress),c=e.Headers;!c["Cache-Control"]&&!c["cache-control"]&&(c["Cache-Control"]=""),!c["Content-Type"]&&!c["content-type"]&&(c["Content-Type"]=e.Body&&e.Body.type||"");var y=e.UploadAddMetaMd5||t.options.UploadAddMetaMd5||t.options.UploadCheckContentMd5,k=e.tracker;y&&k&&k.setParams({md5StartTime:new Date().getTime()}),n.getBodyMd5(y,e.Body,function(j){j&&(k&&k.setParams({md5EndTime:new Date().getTime()}),t.options.UploadCheckContentMd5&&(c["Content-MD5"]=n.binaryBase64(j)),(e.UploadAddMetaMd5||t.options.UploadAddMetaMd5)&&(c["x-cos-meta-md5"]=j)),e.ContentLength!==void 0&&(c["Content-Length"]=e.ContentLength),l(null,!0),C.call(t,{Action:"name/cos:PutObject",TaskId:e.TaskId,method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:e.Query,body:e.Body,onProgress:l,tracker:k},function(de,se){if(de)return l(null,!0),r(de);l({loaded:i,total:i},!0);var Te=Xe({ForcePathStyle:t.options.ForcePathStyle,protocol:t.options.Protocol,domain:t.options.Domain,bucket:e.Bucket,region:t.options.UseAccelerate?"accelerate":e.Region,object:e.Key});Te=Te.substr(Te.indexOf("://")+3),se.Location=Te,se.ETag=n.attr(se.headers,"etag",""),r(null,se)})},e.onHashProgress)}function _e(e,r){C.call(this,{Action:"name/cos:DeleteObject",method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,VersionId:e.VersionId,action:e.Recursive?"recursive":""},function(t,i){if(t){var l=t.statusCode;return l&&l===404?r(null,{BucketNotFound:!0,statusCode:l}):r(t)}r(null,{statusCode:i.statusCode,headers:i.headers})})}function x(e,r){C.call(this,{Action:"name/cos:GetObjectACL",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"acl"},function(t,i){if(t)return r(t);var l=i.AccessControlPolicy||{},c=l.Owner||{},y=l.AccessControlList&&l.AccessControlList.Grant||[];y=n.isArray(y)?y:[y];var k=tt(l);delete k.GrantWrite,i.headers&&i.headers["x-cos-acl"]&&(k.ACL=i.headers["x-cos-acl"]),k=n.extend(k,{Owner:c,Grants:y,statusCode:i.statusCode,headers:i.headers}),r(null,k)})}function u(e,r){var t=e.Headers,i="";if(e.AccessControlPolicy){var l=n.clone(e.AccessControlPolicy||{}),c=l.Grants||l.Grant;c=n.isArray(c)?c:[c],delete l.Grant,delete l.Grants,l.AccessControlList={Grant:c},i=n.json2xml({AccessControlPolicy:l}),t["Content-Type"]="application/xml",t["Content-MD5"]=n.binaryBase64(n.md5(i))}n.each(t,function(y,k){k.indexOf("x-cos-grant-")===0&&(t[k]=qe(t[k]))}),C.call(this,{Action:"name/cos:PutObjectACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"acl",headers:t,body:i},function(y,k){if(y)return r(y);r(null,{statusCode:k.statusCode,headers:k.headers})})}function f(e,r){var t=e.Headers;t.Origin=e.Origin,t["Access-Control-Request-Method"]=e.AccessControlRequestMethod,t["Access-Control-Request-Headers"]=e.AccessControlRequestHeaders,C.call(this,{Action:"name/cos:OptionsObject",method:"OPTIONS",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:t},function(i,l){if(i)return i.statusCode&&i.statusCode===403?r(null,{OptionsForbidden:!0,statusCode:i.statusCode}):r(i);var c=l.headers||{};r(null,{AccessControlAllowOrigin:c["access-control-allow-origin"],AccessControlAllowMethods:c["access-control-allow-methods"],AccessControlAllowHeaders:c["access-control-allow-headers"],AccessControlExposeHeaders:c["access-control-expose-headers"],AccessControlMaxAge:c["access-control-max-age"],statusCode:l.statusCode,headers:l.headers})})}function a(e,r){var t=this,i=e.Headers;!i["Cache-Control"]&&!i["cache-control"]&&(i["Cache-Control"]="");var l=e.CopySource||"",c=n.getSourceParams.call(this,l);if(!c){r(n.error(new Error("CopySource format error")));return}var y=c[1],k=c[3],j=decodeURIComponent(c[4]);C.call(this,{Scope:[{action:"name/cos:GetObject",bucket:y,region:k,prefix:j},{action:"name/cos:PutObject",bucket:e.Bucket,region:e.Region,prefix:e.Key}],method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers},function(de,se){if(de)return r(de);var Te=n.clone(se.CopyObjectResult||{}),Ie=Xe({ForcePathStyle:t.options.ForcePathStyle,protocol:t.options.Protocol,domain:t.options.Domain,bucket:e.Bucket,region:e.Region,object:e.Key,isLocation:!0});n.extend(Te,{Location:Ie,statusCode:se.statusCode,headers:se.headers}),r(null,Te)})}function g(e,r){var t=e.CopySource||"",i=n.getSourceParams.call(this,t);if(!i){r(n.error(new Error("CopySource format error")));return}var l=i[1],c=i[3],y=decodeURIComponent(i[4]);C.call(this,{Scope:[{action:"name/cos:GetObject",bucket:l,region:c,prefix:y},{action:"name/cos:PutObject",bucket:e.Bucket,region:e.Region,prefix:e.Key}],method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,qs:{partNumber:e.PartNumber,uploadId:e.UploadId},headers:e.Headers},function(k,j){if(k)return r(k);var de=n.clone(j.CopyPartResult||{});n.extend(de,{statusCode:j.statusCode,headers:j.headers}),r(null,de)})}function A(e,r){var t=e.Objects||[],i=e.Quiet;t=n.isArray(t)?t:[t];var l=n.json2xml({Delete:{Object:t,Quiet:i||!1}}),c=e.Headers;c["Content-Type"]="application/xml",c["Content-MD5"]=n.binaryBase64(n.md5(l));var y=n.map(t,function(k){return{action:"name/cos:DeleteObject",bucket:e.Bucket,region:e.Region,prefix:k.Key}});C.call(this,{Scope:y,method:"POST",Bucket:e.Bucket,Region:e.Region,body:l,action:"delete",headers:c},function(k,j){if(k)return r(k);var de=j.DeleteResult||{},se=de.Deleted||[],Te=de.Error||[];se=n.isArray(se)?se:[se],Te=n.isArray(Te)?Te:[Te];var Ie=n.clone(de);n.extend(Ie,{Error:Te,Deleted:se,statusCode:j.statusCode,headers:j.headers}),r(null,Ie)})}function _(e,r){var t=e.Headers;if(!e.RestoreRequest){r(n.error(new Error("missing param RestoreRequest")));return}var i=e.RestoreRequest||{},l=n.json2xml({RestoreRequest:i});t["Content-Type"]="application/xml",t["Content-MD5"]=n.binaryBase64(n.md5(l)),C.call(this,{Action:"name/cos:RestoreObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,body:l,action:"restore",headers:t},r)}function Z(e,r){var t=e.Tagging||{},i=t.TagSet||t.Tags||e.Tags||[];i=n.clone(n.isArray(i)?i:[i]);var l=n.json2xml({Tagging:{TagSet:{Tag:i}}}),c=e.Headers;c["Content-Type"]="application/xml",c["Content-MD5"]=n.binaryBase64(n.md5(l)),C.call(this,{Action:"name/cos:PutObjectTagging",method:"PUT",Bucket:e.Bucket,Key:e.Key,Region:e.Region,body:l,action:"tagging",headers:c,VersionId:e.VersionId},function(y,k){if(y&&y.statusCode===204)return r(null,{statusCode:y.statusCode});if(y)return r(y);r(null,{statusCode:k.statusCode,headers:k.headers})})}function te(e,r){C.call(this,{Action:"name/cos:GetObjectTagging",method:"GET",Key:e.Key,Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging",VersionId:e.VersionId},function(t,i){if(t){if(t.statusCode===404&&t.error&&(t.error==="Not Found"||t.error.Code==="NoSuchTagSet")){var l={Tags:[],statusCode:t.statusCode};t.headers&&(l.headers=t.headers),r(null,l)}else r(t);return}var c=[];try{c=i.Tagging.TagSet.Tag||[]}catch(y){}c=n.clone(n.isArray(c)?c:[c]),r(null,{Tags:c,statusCode:i.statusCode,headers:i.headers})})}function Ce(e,r){C.call(this,{Action:"name/cos:DeleteObjectTagging",method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"tagging",VersionId:e.VersionId},function(t,i){if(t&&t.statusCode===204)return r(null,{statusCode:t.statusCode});if(t)return r(t);r(null,{statusCode:i.statusCode,headers:i.headers})})}function X(e,r){var t=e.SelectType;if(!t)return r(n.error(new Error("missing param SelectType")));var i=e.SelectRequest||{},l=n.json2xml({SelectRequest:i}),c=e.Headers;c["Content-Type"]="application/xml",c["Content-MD5"]=n.binaryBase64(n.md5(l)),C.call(this,{Action:"name/cos:GetObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"select",qs:{"select-type":e.SelectType},VersionId:e.VersionId,body:l,DataType:"arraybuffer",rawBody:!0},function(y,k){if(y&&y.statusCode===204)return r(null,{statusCode:y.statusCode});if(y)return r(y);var j=n.parseSelectPayload(k.body);r(null,{statusCode:k.statusCode,headers:k.headers,Body:j.body,Payload:j.payload})})}function Pe(e,r){var t=this,i=e.Headers,l=e.tracker;!i["Cache-Control"]&&!i["cache-control"]&&(i["Cache-Control"]=""),!i["Content-Type"]&&!i["content-type"]&&(i["Content-Type"]=e.Body&&e.Body.type||"");var c=e.Body&&(e.UploadAddMetaMd5||t.options.UploadAddMetaMd5);c&&l&&l.setParams({md5StartTime:new Date().getTime()}),n.getBodyMd5(c,e.Body,function(y){y&&(e.Headers["x-cos-meta-md5"]=y),c&&l&&l.setParams({md5EndTime:new Date().getTime()}),C.call(t,{Action:"name/cos:InitiateMultipartUpload",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"uploads",headers:e.Headers,qs:e.Query,tracker:l},function(k,j){if(k)return l&&l.parent&&l.parent.setParams({errorNode:"multipartInit"}),r(k);if(j=n.clone(j||{}),j&&j.InitiateMultipartUploadResult)return r(null,n.extend(j.InitiateMultipartUploadResult,{statusCode:j.statusCode,headers:j.headers}));r(null,j)})},e.onHashProgress)}function Y(e,r){var t=this;n.getFileSize("multipartUpload",e,function(){var i=e.tracker,l=t.options.UploadCheckContentMd5;l&&i&&i.setParams({md5StartTime:new Date().getTime()}),n.getBodyMd5(l,e.Body,function(c){c&&(e.Headers["Content-MD5"]=n.binaryBase64(c)),l&&i&&i.setParams({md5EndTime:new Date().getTime()}),i&&i.setParams({partNumber:e.PartNumber}),C.call(t,{Action:"name/cos:UploadPart",TaskId:e.TaskId,method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,qs:{partNumber:e.PartNumber,uploadId:e.UploadId},headers:e.Headers,onProgress:e.onProgress,body:e.Body||null,tracker:i},function(y,k){if(y)return i&&i.parent&&i.parent.setParams({errorNode:"multipartUpload"}),r(y);r(null,{ETag:n.attr(k.headers,"etag",""),statusCode:k.statusCode,headers:k.headers})})})})}function Me(e,r){for(var t=this,i=e.UploadId,l=e.Parts,c=e.tracker,y=0,k=l.length;y<k;y++)l[y].ETag&&l[y].ETag.indexOf('"')===0||(l[y].ETag='"'+l[y].ETag+'"');var j=n.json2xml({CompleteMultipartUpload:{Part:l}});j=j.replace(/\n\s*/g,"");var de=e.Headers;de["Content-Type"]="application/xml",de["Content-MD5"]=n.binaryBase64(n.md5(j)),C.call(this,{Action:"name/cos:CompleteMultipartUpload",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,qs:{uploadId:i},body:j,headers:de,tracker:c},function(se,Te){if(se)return c&&c.parent&&c.parent.setParams({errorNode:"multipartComplete"}),r(se);var Ie=Xe({ForcePathStyle:t.options.ForcePathStyle,protocol:t.options.Protocol,domain:t.options.Domain,bucket:e.Bucket,region:e.Region,object:e.Key,isLocation:!0}),Ge=Te.CompleteMultipartUploadResult||{};Ge.ProcessResults&&Ge&&Ge.ProcessResults&&(Ge.UploadResult={OriginalInfo:{Key:Ge.Key,Location:Ie,ETag:Ge.ETag,ImageInfo:Ge.ImageInfo},ProcessResults:Ge.ProcessResults},delete Ge.ImageInfo,delete Ge.ProcessResults);var $e=n.extend(Ge,{Location:Ie,statusCode:Te.statusCode,headers:Te.headers});r(null,$e)})}function xe(e,r){var t={};t.delimiter=e.Delimiter,t["encoding-type"]=e.EncodingType,t.prefix=e.Prefix||"",t["max-uploads"]=e.MaxUploads,t["key-marker"]=e.KeyMarker,t["upload-id-marker"]=e.UploadIdMarker,t=n.clearKey(t);var i=e.tracker;i&&i.setParams({signStartTime:new Date().getTime()}),C.call(this,{Action:"name/cos:ListMultipartUploads",ResourceKey:t.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:t,action:"uploads",tracker:i},function(l,c){if(l)return i&&i.parent&&i.parent.setParams({errorNode:"multipartList"}),r(l);if(c&&c.ListMultipartUploadsResult){var y=c.ListMultipartUploadsResult.Upload||[];y=n.isArray(y)?y:[y],c.ListMultipartUploadsResult.Upload=y}var k=n.clone(c.ListMultipartUploadsResult||{});n.extend(k,{statusCode:c.statusCode,headers:c.headers}),r(null,k)})}function Oe(e,r){var t={},i=e.tracker;t.uploadId=e.UploadId,t["encoding-type"]=e.EncodingType,t["max-parts"]=e.MaxParts,t["part-number-marker"]=e.PartNumberMarker,C.call(this,{Action:"name/cos:ListParts",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:t},function(l,c){if(l)return i&&i.parent&&i.parent.setParams({errorNode:"multipartListPart"}),r(l);var y=c.ListPartsResult||{},k=y.Part||[];k=n.isArray(k)?k:[k],y.Part=k;var j=n.clone(y);n.extend(j,{statusCode:c.statusCode,headers:c.headers}),r(null,j)})}function je(e,r){var t={};t.uploadId=e.UploadId,C.call(this,{Action:"name/cos:AbortMultipartUpload",method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:t},function(i,l){if(i)return r(i);r(null,{statusCode:l.statusCode,headers:l.headers})})}function Ue(e,r){C.call(this,{method:e.Method,Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:e.Action,headers:e.Headers,qs:e.Query,body:e.Body,Url:e.Url,rawBody:e.RawBody,DataType:e.DataType},function(t,i){if(t)return r(t);i&&i.body&&(i.Body=i.body,delete i.body),r(t,i)})}function Fe(e,r){var t=e.Headers;!t["Cache-Control"]&&!t["cache-control"]&&(t["Cache-Control"]=""),!t["Content-Type"]&&!t["content-type"]&&(t["Content-Type"]=e.Body&&e.Body.type||""),C.call(this,{Action:"name/cos:AppendObject",method:"POST",Bucket:e.Bucket,Region:e.Region,action:"append",Key:e.Key,body:e.Body,qs:{position:e.Position},headers:e.Headers},function(i,l){if(i)return r(i);r(null,l)})}function ze(e){var r=this;return n.getAuth({SecretId:e.SecretId||this.options.SecretId||"",SecretKey:e.SecretKey||this.options.SecretKey||"",Bucket:e.Bucket,Region:e.Region,Method:e.Method,Key:e.Key,Query:e.Query,Headers:e.Headers,Expires:e.Expires,UseRawKey:r.options.UseRawKey,SystemClockOffset:r.options.SystemClockOffset})}function Je(e,r){var t=this,i=e.UseAccelerate===void 0?t.options.UseAccelerate:e.UseAccelerate,l=Xe({ForcePathStyle:t.options.ForcePathStyle,protocol:e.Protocol||t.options.Protocol,domain:e.Domain||t.options.Domain,bucket:e.Bucket,region:i?"accelerate":e.Region,object:e.Key}),c="";e.Query&&(c+=n.obj2str(e.Query)),e.QueryString&&(c+=(c?"&":"")+e.QueryString);var y=l;if(e.Sign!==void 0&&!e.Sign)return c&&(y+="?"+c),r(null,{Url:y}),y;var k=Ve.call(this,{Bucket:e.Bucket,Region:e.Region,UseAccelerate:e.UseAccelerate,Url:l}),j=o.call(this,{Action:(e.Method||"").toUpperCase()==="PUT"?"name/cos:PutObject":"name/cos:GetObject",Bucket:e.Bucket||"",Region:e.Region||"",Method:e.Method||"get",Key:e.Key,Expires:e.Expires,Headers:e.Headers,Query:e.Query,SignHost:k,ForceSignHost:e.ForceSignHost===!1?!1:t.options.ForceSignHost},function(de,se){if(!!r){if(de){r(de);return}var Te=function($e){var Ye=$e.match(/q-url-param-list.*?(?=&)/g)[0],nt="q-url-param-list="+encodeURIComponent(Ye.replace(/q-url-param-list=/,"")).toLowerCase(),Ze=new RegExp(Ye,"g"),We=$e.replace(Ze,nt);return We},Ie=l;Ie+="?"+(se.Authorization.indexOf("q-signature")>-1?Te(se.Authorization):"sign="+encodeURIComponent(se.Authorization)),se.SecurityToken&&(Ie+="&x-cos-security-token="+se.SecurityToken),se.ClientIP&&(Ie+="&clientIP="+se.ClientIP),se.ClientUA&&(Ie+="&clientUA="+se.ClientUA),se.Token&&(Ie+="&token="+se.Token),c&&(Ie+="&"+c),setTimeout(function(){r(null,{Url:Ie})})}});return j?(y+="?"+j.Authorization+(j.SecurityToken?"&x-cos-security-token="+j.SecurityToken:""),c&&(y+="&"+c)):c&&(y+="?"+c),y}function tt(e){var r={GrantFullControl:[],GrantWrite:[],GrantRead:[],GrantReadAcp:[],GrantWriteAcp:[],ACL:""},t={FULL_CONTROL:"GrantFullControl",WRITE:"GrantWrite",READ:"GrantRead",READ_ACP:"GrantReadAcp",WRITE_ACP:"GrantWriteAcp"},i=e&&e.AccessControlList||{},l=i.Grant;l&&(l=n.isArray(l)?l:[l]);var c={READ:0,WRITE:0,FULL_CONTROL:0};return l&&l.length&&n.each(l,function(y){y.Grantee.ID==="qcs::cam::anyone:anyone"||y.Grantee.URI==="http://cam.qcloud.com/groups/global/AllUsers"?c[y.Permission]=1:y.Grantee.ID!==e.Owner.ID&&r[t[y.Permission]].push('id="'+y.Grantee.ID+'"')}),c.FULL_CONTROL||c.WRITE&&c.READ?r.ACL="public-read-write":c.READ?r.ACL="public-read":r.ACL="private",n.each(t,function(y){r[y]=qe(r[y].join(","))}),r}function qe(e){var r=e.split(","),t={},i,l;for(i=0;i<r.length;)l=r[i].trim(),t[l]?r.splice(i,1):(t[l]=!0,r[i]=l,i++);return r.join(",")}function Xe(e){var r=e.region||"",t=e.bucket||"",i=t.substr(0,t.lastIndexOf("-")),l=t.substr(t.lastIndexOf("-")+1),c=e.domain,y=e.object;typeof c=="function"&&(c=c({Bucket:t,Region:r}));var k=e.protocol||(n.isBrowser&&location.protocol==="http:"?"http:":"https:");c||(["cn-south","cn-south-2","cn-north","cn-east","cn-southwest","sg"].indexOf(r)>-1?c="{Region}.myqcloud.com":c="cos.{Region}.myqcloud.com",e.ForcePathStyle||(c="{Bucket}."+c)),c=c.replace(/\{\{AppId\}\}/ig,l).replace(/\{\{Bucket\}\}/ig,i).replace(/\{\{Region\}\}/ig,r).replace(/\{\{.*?\}\}/ig,""),c=c.replace(/\{AppId\}/ig,l).replace(/\{BucketName\}/ig,i).replace(/\{Bucket\}/ig,t).replace(/\{Region\}/ig,r).replace(/\{.*?\}/ig,""),/^[a-zA-Z]+:\/\//.test(c)||(c=k+"//"+c),c.slice(-1)==="/"&&(c=c.slice(0,-1));var j=c;return e.ForcePathStyle&&(j+="/"+t),j+="/",y&&(j+=n.camSafeUrlEncode(y).replace(/%2F/g,"/")),e.isLocation&&(j=j.replace(/^https?:\/\//,"")),j}var Ve=function(r){if(!r.Bucket||!r.Region)return"";var t=r.UseAccelerate===void 0?this.options.UseAccelerate:r.UseAccelerate,i=r.Url||Xe({ForcePathStyle:this.options.ForcePathStyle,protocol:this.options.Protocol,domain:this.options.Domain,bucket:r.Bucket,region:t?"accelerate":r.Region}),l=i.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1"),c=new RegExp("^([a-z\\d-]+-\\d+\\.)?(cos|cosv6|ci|pic)\\.([a-z\\d-]+)\\.myqcloud\\.com$");return c.test(l)?l:""};function o(e,r){var t=n.clone(e.Headers),i="";n.each(t,function(He,Ke){(He===""||["content-type","cache-control","expires"].indexOf(Ke.toLowerCase())>-1)&&delete t[Ke],Ke.toLowerCase()==="host"&&(i=He)});var l=e.ForceSignHost!==!1;!i&&e.SignHost&&l&&(t.Host=e.SignHost);var c=!1,y=function(Ke,Qe){c||(c=!0,Qe&&Qe.XCosSecurityToken&&!Qe.SecurityToken&&(Qe=n.clone(Qe),Qe.SecurityToken=Qe.XCosSecurityToken,delete Qe.XCosSecurityToken),r&&r(Ke,Qe))},k=this,j=e.Bucket||"",de=e.Region||"",se=e.Key||"";k.options.ForcePathStyle&&j&&(se=j+"/"+se);var Te="/"+se,Ie={},Ge=e.Scope;if(!Ge){var $e=e.Action||"",Ye=e.ResourceKey||e.Key||"";Ge=e.Scope||[{action:$e,bucket:j,region:de,prefix:Ye}]}var nt=n.md5(JSON.stringify(Ge));k._StsCache=k._StsCache||[],function(){var He,Ke;for(He=k._StsCache.length-1;He>=0;He--){Ke=k._StsCache[He];var Qe=Math.round(n.getSkewTime(k.options.SystemClockOffset)/1e3)+30;if(Ke.StartTime&&Qe<Ke.StartTime||Qe>=Ke.ExpiredTime){k._StsCache.splice(He,1);continue}if(!Ke.ScopeLimit||Ke.ScopeLimit&&Ke.ScopeKey===nt){Ie=Ke;break}}}();var Ze=function(){var Ke="";Ie.StartTime&&e.Expires?Ke=Ie.StartTime+";"+(Ie.StartTime+e.Expires*1):Ie.StartTime&&Ie.ExpiredTime&&(Ke=Ie.StartTime+";"+Ie.ExpiredTime);var Qe=n.getAuth({SecretId:Ie.TmpSecretId,SecretKey:Ie.TmpSecretKey,Method:e.Method,Pathname:Te,Query:e.Query,Headers:t,Expires:e.Expires,UseRawKey:k.options.UseRawKey,SystemClockOffset:k.options.SystemClockOffset,KeyTime:Ke,ForceSignHost:l}),et={Authorization:Qe,SecurityToken:Ie.SecurityToken||Ie.XCosSecurityToken||"",Token:Ie.Token||"",ClientIP:Ie.ClientIP||"",ClientUA:Ie.ClientUA||""};y(null,et)},We=function(Ke){if(Ke.Authorization){var Qe=!1,et=Ke.Authorization;if(et)if(et.indexOf(" ")>-1)Qe=!1;else if(et.indexOf("q-sign-algorithm=")>-1&&et.indexOf("q-ak=")>-1&&et.indexOf("q-sign-time=")>-1&&et.indexOf("q-key-time=")>-1&&et.indexOf("q-url-param-list=")>-1)Qe=!0;else try{et=atob(et),et.indexOf("a=")>-1&&et.indexOf("k=")>-1&&et.indexOf("t=")>-1&&et.indexOf("r=")>-1&&et.indexOf("b=")>-1&&(Qe=!0)}catch(rt){}if(!Qe)return n.error(new Error("getAuthorization callback params format error"))}else{if(!Ke.TmpSecretId)return n.error(new Error('getAuthorization callback params missing "TmpSecretId"'));if(!Ke.TmpSecretKey)return n.error(new Error('getAuthorization callback params missing "TmpSecretKey"'));if(!Ke.SecurityToken&&!Ke.XCosSecurityToken)return n.error(new Error('getAuthorization callback params missing "SecurityToken"'));if(!Ke.ExpiredTime)return n.error(new Error('getAuthorization callback params missing "ExpiredTime"'));if(Ke.ExpiredTime&&Ke.ExpiredTime.toString().length!==10)return n.error(new Error('getAuthorization callback params "ExpiredTime" should be 10 digits'));if(Ke.StartTime&&Ke.StartTime.toString().length!==10)return n.error(new Error('getAuthorization callback params "StartTime" should be 10 StartTime'))}return!1};if(Ie.ExpiredTime&&Ie.ExpiredTime-n.getSkewTime(k.options.SystemClockOffset)/1e3>60)Ze();else if(k.options.getAuthorization)k.options.getAuthorization.call(k,{Bucket:j,Region:de,Method:e.Method,Key:se,Pathname:Te,Query:e.Query,Headers:t,Scope:Ge,SystemClockOffset:k.options.SystemClockOffset,ForceSignHost:l},function(He){typeof He=="string"&&(He={Authorization:He});var Ke=We(He);if(Ke)return y(Ke);He.Authorization?y(null,He):(Ie=He||{},Ie.Scope=Ge,Ie.ScopeKey=nt,k._StsCache.push(Ie),Ze())});else if(k.options.getSTS)k.options.getSTS.call(k,{Bucket:j,Region:de},function(He){Ie=He||{},Ie.Scope=Ge,Ie.ScopeKey=nt,Ie.TmpSecretId||(Ie.TmpSecretId=Ie.SecretId),Ie.TmpSecretKey||(Ie.TmpSecretKey=Ie.SecretKey);var Ke=We(Ie);if(Ke)return y(Ke);k._StsCache.push(Ie),Ze()});else return function(){var He=n.getAuth({SecretId:e.SecretId||k.options.SecretId,SecretKey:e.SecretKey||k.options.SecretKey,Method:e.Method,Pathname:Te,Query:e.Query,Headers:t,Expires:e.Expires,UseRawKey:k.options.UseRawKey,SystemClockOffset:k.options.SystemClockOffset,ForceSignHost:l}),Ke={Authorization:He,SecurityToken:k.options.SecurityToken||k.options.XCosSecurityToken};return y(null,Ke),Ke}();return""}function h(e){var r=!1,t=!1,i=e.headers&&(e.headers.date||e.headers.Date)||e.error&&e.error.ServerTime;try{var l=e.error.Code,c=e.error.Message;(l==="RequestTimeTooSkewed"||l==="AccessDenied"&&c==="Request has expired")&&(t=!0)}catch(k){}if(e)if(t&&i){var y=Date.parse(i);this.options.CorrectClockSkew&&Math.abs(n.getSkewTime(this.options.SystemClockOffset)-y)>=3e4&&(console.error("error: Local time is too skewed."),this.options.SystemClockOffset=y-Date.now(),r=!0)}else Math.floor(e.statusCode/100)===5&&(r=!0);return r}function C(e,r){var t=this;!e.headers&&(e.headers={}),!e.qs&&(e.qs={}),e.VersionId&&(e.qs.versionId=e.VersionId),e.qs=n.clearKey(e.qs),e.headers&&(e.headers=n.clearKey(e.headers)),e.qs&&(e.qs=n.clearKey(e.qs));var i=n.clone(e.qs);e.action&&(i[e.action]="");var l=e.url||e.Url,c=e.SignHost||Ve.call(this,{Bucket:e.Bucket,Region:e.Region,Url:l}),y=e.tracker,k=function j(de){var se=t.options.SystemClockOffset;y&&y.setParams({signStartTime:new Date().getTime(),retryTimes:de-1}),o.call(t,{Bucket:e.Bucket||"",Region:e.Region||"",Method:e.method,Key:e.Key,Query:i,Headers:e.headers,SignHost:c,Action:e.Action,ResourceKey:e.ResourceKey,Scope:e.Scope,ForceSignHost:t.options.ForceSignHost},function(Te,Ie){if(Te){r(Te);return}y&&y.setParams({signEndTime:new Date().getTime(),httpStartTime:new Date().getTime()}),e.AuthData=Ie,O.call(t,e,function(Ge,$e){y&&y.setParams({httpEndTime:new Date().getTime()}),Ge&&de<2&&(se!==t.options.SystemClockOffset||h.call(t,Ge))?(e.headers&&(delete e.headers.Authorization,delete e.headers.token,delete e.headers.clientIP,delete e.headers.clientUA,e.headers["x-cos-security-token"]&&delete e.headers["x-cos-security-token"],e.headers["x-ci-security-token"]&&delete e.headers["x-ci-security-token"]),j(de+1)):r(Ge,$e)})})};k(1)}function O(e,r){var t=this,i=e.TaskId;if(!(i&&!t._isRunningTask(i))){var l=e.Bucket,c=e.Region,y=e.Key,k=e.method||"GET",j=e.Url||e.url,de=e.body,se=e.rawBody;t.options.UseAccelerate&&(c="accelerate"),j=j||Xe({ForcePathStyle:t.options.ForcePathStyle,protocol:t.options.Protocol,domain:t.options.Domain,bucket:l,region:c,object:y}),e.action&&(j=j+"?"+e.action),e.qsStr&&(j.indexOf("?")>-1?j=j+"&"+e.qsStr:j=j+"?"+e.qsStr);var Te={method:k,url:j,headers:e.headers,qs:e.qs,body:de},Ie="x-cos-security-token";if(n.isCIHost(j)&&(Ie="x-ci-security-token"),Te.headers.Authorization=e.AuthData.Authorization,e.AuthData.Token&&(Te.headers.token=e.AuthData.Token),e.AuthData.ClientIP&&(Te.headers.clientIP=e.AuthData.ClientIP),e.AuthData.ClientUA&&(Te.headers.clientUA=e.AuthData.ClientUA),e.AuthData.SecurityToken&&(Te.headers[Ie]=e.AuthData.SecurityToken),Te.headers&&(Te.headers=n.clearKey(Te.headers)),Te=n.clearKey(Te),e.onProgress&&typeof e.onProgress=="function"){var Ge=de&&(de.size||de.length)||0;Te.onProgress=function(He){if(!(i&&!t._isRunningTask(i))){var Ke=He?He.loaded:0;e.onProgress({loaded:Ke,total:Ge})}}}e.onDownloadProgress&&(Te.onDownloadProgress=e.onDownloadProgress),e.DataType&&(Te.dataType=e.DataType),this.options.Timeout&&(Te.timeout=this.options.Timeout),t.options.ForcePathStyle&&(Te.pathStyle=t.options.ForcePathStyle),t.emit("before-send",Te);var $e=Te.url.includes("accelerate."),Ye=Te.qs?Object.keys(Te.qs).map(function(He){return"".concat(He,"=").concat(Te.qs[He])}).join("&"):"",nt=Ye?Te.url+"?"+Ye:Te.url;e.tracker&&e.tracker.setParams({reqUrl:nt,accelerate:$e?"Y":"N"}),e.tracker&&e.tracker.parent&&e.tracker.parent.setParams({reqUrl:nt,accelerate:$e?"Y":"N"});var Ze=(t.options.Request||v)(Te,function(He){if(He.error!=="abort"){var Ke={options:Te,error:et,statusCode:Qe&&Qe.statusCode||0,headers:Qe&&Qe.headers||{},body:rt};t.emit("after-receive",Ke),et=Ke.error,rt=Ke.body,Qe={statusCode:Ke.statusCode,headers:Ke.headers},t.emit("after-receive",He);var Qe={statusCode:He.statusCode,statusMessage:He.statusMessage,headers:He.headers},et=He.error,rt=He.body,dt,ot=function(ut,lt){if(i&&t.off("inner-kill-task",We),!dt){dt=!0;var ct={};Qe&&Qe.statusCode&&(ct.statusCode=Qe.statusCode),Qe&&Qe.headers&&(ct.headers=Qe.headers),ut?(ut=n.extend(ut||{},ct),r(ut,null)):(lt=n.extend(lt||{},ct),r(null,lt)),Ze=null}};if(et)return ot(n.error(et));var st=Qe.statusCode,ft=Math.floor(st/100)===2;if(se&&ft)return ot(null,{body:rt});var it;try{it=rt&&rt.indexOf("<")>-1&&rt.indexOf(">")>-1&&n.xml2json(rt)||{}}catch(ht){it={}}var at=it&&it.Error;ft?ot(null,it):at?ot(n.error(new Error(at.Message),{code:at.Code,error:at})):st?ot(n.error(new Error(Qe.statusMessage),{code:""+st})):st&&ot(n.error(new Error("statusCode error")))}}),We=function He(Ke){Ke.TaskId===i&&(Ze&&Ze.abort&&Ze.abort(),t.off("inner-kill-task",He))};i&&t.on("inner-kill-task",We)}}var ae={getService:ee,putBucket:E,headBucket:L,getBucket:fe,deleteBucket:N,putBucketAcl:w,getBucketAcl:V,putBucketCors:G,getBucketCors:Q,deleteBucketCors:M,getBucketLocation:q,getBucketPolicy:K,putBucketPolicy:re,deleteBucketPolicy:Ae,putBucketTagging:D,getBucketTagging:R,deleteBucketTagging:m,putBucketLifecycle:B,getBucketLifecycle:d,deleteBucketLifecycle:H,putBucketVersioning:P,getBucketVersioning:F,putBucketReplication:Re,getBucketReplication:b,deleteBucketReplication:z,putBucketWebsite:W,getBucketWebsite:ne,deleteBucketWebsite:oe,putBucketReferer:pe,getBucketReferer:he,putBucketDomain:ye,getBucketDomain:ie,deleteBucketDomain:le,putBucketOrigin:ve,getBucketOrigin:Le,deleteBucketOrigin:Se,putBucketLogging:ce,getBucketLogging:me,putBucketInventory:be,getBucketInventory:Ee,listBucketInventory:De,deleteBucketInventory:ke,putBucketAccelerate:Be,getBucketAccelerate:Ne,putBucketEncryption:we,getBucketEncryption:J,deleteBucketEncryption:T,getObject:$,headObject:U,listObjectVersions:I,putObject:ge,deleteObject:_e,getObjectAcl:x,putObjectAcl:u,optionsObject:f,putObjectCopy:a,deleteMultipleObject:A,restoreObject:_,putObjectTagging:Z,getObjectTagging:te,deleteObjectTagging:Ce,selectObjectContent:X,appendObject:Fe,uploadPartCopy:g,multipartInit:Pe,multipartUpload:Y,multipartComplete:Me,multipartList:xe,multipartListPart:Oe,multipartAbort:je,request:Ue,getObjectUrl:Je,getAuth:ze};function ue(e,r,t){n.each(["Cors","Acl"],function(i){if(e.slice(-i.length)===i){var l=e.slice(0,-i.length)+i.toUpperCase(),c=n.apiWrapper(e,r),y=!1;t[l]=function(){!y&&console.warn("warning: cos."+l+" has been deprecated. Please Use cos."+e+" instead."),y=!0,c.apply(this,arguments)}}})}p.exports.init=function(e,r){r.transferToTaskMethod(ae,"putObject"),n.each(ae,function(t,i){e.prototype[i]=n.apiWrapper(i,t),ue(i,t,e.prototype)})}},"./src/cos.js":function(p,S,s){"use strict";var v=s("./src/util.js"),n=s("./src/event.js"),ee=s("./src/task.js"),E=s("./src/base.js"),L=s("./src/advance.js"),fe=s("./package.json"),N={AppId:"",SecretId:"",SecretKey:"",SecurityToken:"",ChunkRetryTimes:2,FileParallelLimit:3,ChunkParallelLimit:3,ChunkSize:1024*1024,SliceSize:1024*1024,CopyChunkParallelLimit:20,CopyChunkSize:1024*1024*10,CopySliceSize:1024*1024*10,MaxPartNumber:1e4,ProgressInterval:1e3,Domain:"",ServiceDomain:"",Protocol:"",CompatibilityMode:!1,ForcePathStyle:!1,UseRawKey:!1,Timeout:0,CorrectClockSkew:!0,SystemClockOffset:0,UploadCheckContentMd5:!1,UploadQueueSize:1e4,UploadAddMetaMd5:!1,UploadIdCacheLimit:50,UseAccelerate:!1,ForceSignHost:!0,EnableTracker:!1,DeepTracker:!1,TrackerDelay:5e3,CustomId:""},w=function(G){this.options=v.extend(v.clone(N),G||{}),this.options.FileParallelLimit=Math.max(1,this.options.FileParallelLimit),this.options.ChunkParallelLimit=Math.max(1,this.options.ChunkParallelLimit),this.options.ChunkRetryTimes=Math.max(0,this.options.ChunkRetryTimes),this.options.ChunkSize=Math.max(1024*1024,this.options.ChunkSize),this.options.CopyChunkParallelLimit=Math.max(1,this.options.CopyChunkParallelLimit),this.options.CopyChunkSize=Math.max(1024*1024,this.options.CopyChunkSize),this.options.CopySliceSize=Math.max(0,this.options.CopySliceSize),this.options.MaxPartNumber=Math.max(1024,Math.min(1e4,this.options.MaxPartNumber)),this.options.Timeout=Math.max(0,this.options.Timeout),this.options.AppId&&console.warn('warning: AppId has been deprecated, Please put it at the end of parameter Bucket(E.g: "test-1250000000").'),this.options.SecretId&&this.options.SecretId.indexOf(" ")>-1&&(console.error("error: SecretId\u683C\u5F0F\u9519\u8BEF\uFF0C\u8BF7\u68C0\u67E5"),console.error("error: SecretId format is incorrect. Please check")),this.options.SecretKey&&this.options.SecretKey.indexOf(" ")>-1&&(console.error("error: SecretKey\u683C\u5F0F\u9519\u8BEF\uFF0C\u8BF7\u68C0\u67E5"),console.error("error: SecretKey format is incorrect. Please check")),v.isNode()&&(console.warn("warning: cos-js-sdk-v5 \u4E0D\u652F\u6301 nodejs \u73AF\u5883\u4F7F\u7528\uFF0C\u8BF7\u6539\u7528 cos-nodejs-sdk-v5\uFF0C\u53C2\u8003\u6587\u6863\uFF1A https://cloud.tencent.com/document/product/436/8629"),console.warn("warning: cos-js-sdk-v5 does not support nodejs environment. Please use cos-nodejs-sdk-v5 instead. See: https://cloud.tencent.com/document/product/436/8629")),n.init(this),ee.init(this)};E.init(w,ee),L.init(w,ee),w.util={md5:v.md5,xml2json:v.xml2json,json2xml:v.json2xml},w.getAuthorization=v.getAuth,w.version=fe.version,p.exports=w},"./src/event.js":function(p,S){var s=function(ee){var E={},L=function(N){return!E[N]&&(E[N]=[]),E[N]};ee.on=function(fe,N){fe==="task-list-update"&&console.warn('warning: Event "'+fe+'" has been deprecated. Please use "list-update" instead.'),L(fe).push(N)},ee.off=function(fe,N){for(var w=L(fe),V=w.length-1;V>=0;V--)N===w[V]&&w.splice(V,1)},ee.emit=function(fe,N){for(var w=L(fe).map(function(G){return G}),V=0;V<w.length;V++)w[V](N)}},v=function(){s(this)};p.exports.init=s,p.exports.EventProxy=v},"./src/session.js":function(p,S,s){var v=s("./src/util.js"),n="cos_sdk_upload_cache",ee=30*24*3600,E,L,fe=function(){try{var M=JSON.parse(localStorage.getItem(n))}catch(q){}M||(M=[]),E=M},N=function(){try{E.length?localStorage.setItem(n,JSON.stringify(E)):localStorage.removeItem(n)}catch(M){}},w=function(){if(!E){fe.call(this);for(var M=!1,q=Math.round(Date.now()/1e3),re=E.length-1;re>=0;re--){var K=E[re][2];(!K||K+ee<q)&&(E.splice(re,1),M=!0)}M&&N()}},V=function(){L||(L=setTimeout(function(){N(),L=null},400))},G={using:{},setUsing:function(M){G.using[M]=!0},removeUsing:function(M){delete G.using[M]},getFileId:function(M,q,re,K){return M.name&&M.size&&M.lastModifiedDate&&q?v.md5([M.name,M.size,M.lastModifiedDate,q,re,K].join("::")):null},getCopyFileId:function(M,q,re,K,Ae){var D=q["content-length"],R=q.etag||"",m=q["last-modified"];return M&&re?v.md5([M,D,R,m,re,K,Ae].join("::")):null},getUploadIdList:function(M){if(!M)return null;w.call(this);for(var q=[],re=0;re<E.length;re++)E[re][0]===M&&q.push(E[re][1]);return q.length?q:null},saveUploadId:function(M,q,re){if(w.call(this),!!M){for(var K=E.length-1;K>=0;K--){var Ae=E[K];Ae[0]===M&&Ae[1]===q&&E.splice(K,1)}E.unshift([M,q,Math.round(Date.now()/1e3)]),E.length>re&&E.splice(re),V()}},removeUploadId:function(M){w.call(this),delete G.using[M];for(var q=E.length-1;q>=0;q--)E[q][1]===M&&E.splice(q,1);V()}};p.exports=G},"./src/task.js":function(p,S,s){var v=s("./src/session.js"),n=s("./src/util.js"),ee={},E=function(N,w){ee[w]=N[w],N[w]=function(V,G){V.SkipTask?ee[w].call(this,V,G):this._addTask(w,V,G)}},L=function(N){var w=[],V={},G=0,Q=0,M=function(m){var B={id:m.id,Bucket:m.Bucket,Region:m.Region,Key:m.Key,FilePath:m.FilePath,state:m.state,loaded:m.loaded,size:m.size,speed:m.speed,percent:m.percent,hashPercent:m.hashPercent,error:m.error};return m.FilePath&&(B.FilePath=m.FilePath),m._custom&&(B._custom=m._custom),B},q=function(){var R,m=function(){R=0,N.emit("task-list-update",{list:n.map(w,M)}),N.emit("list-update",{list:n.map(w,M)})};return function(){R||(R=setTimeout(m))}}(),re=function(){if(!(w.length<=N.options.UploadQueueSize)){for(var m=0;m<Q&&m<w.length&&w.length>N.options.UploadQueueSize;){var B=w[m].state==="waiting"||w[m].state==="checking"||w[m].state==="uploading";!w[m]||!B?(V[w[m].id]&&delete V[w[m].id],w.splice(m,1),Q--):m++}q()}},K=function R(){if(!(G>=N.options.FileParallelLimit)){for(;w[Q]&&w[Q].state!=="waiting";)Q++;if(!(Q>=w.length)){var m=w[Q];Q++,G++,m.state="checking",m.params.onTaskStart&&m.params.onTaskStart(M(m)),!m.params.UploadData&&(m.params.UploadData={});var B=n.formatParams(m.api,m.params);ee[m.api].call(N,B,function(d,H){!N._isRunningTask(m.id)||((m.state==="checking"||m.state==="uploading")&&(m.state=d?"error":"success",d&&(m.error=d),G--,q(),R(),m.callback&&m.callback(d,H),m.state==="success"&&(m.params&&(delete m.params.UploadData,delete m.params.Body,delete m.params),delete m.callback)),re())}),q(),setTimeout(R)}}},Ae=function(m,B){var d=V[m];if(!!d){var H=d&&d.state==="waiting",P=d&&(d.state==="checking"||d.state==="uploading");if(B==="canceled"&&d.state!=="canceled"||B==="paused"&&H||B==="paused"&&P){if(B==="paused"&&d.params.Body&&typeof d.params.Body.pipe=="function"){console.error("stream not support pause");return}d.state=B,N.emit("inner-kill-task",{TaskId:m,toState:B});try{var F=d&&d.params&&d.params.UploadData.UploadId}catch(Re){}B==="canceled"&&F&&v.removeUsing(F),q(),P&&(G--,K()),B==="canceled"&&(d.params&&(delete d.params.UploadData,delete d.params.Body,delete d.params),delete d.callback)}re()}};N._addTasks=function(R){n.each(R,function(m){N._addTask(m.api,m.params,m.callback,!0)}),q()};var D=!0;N._addTask=function(R,m,B,d){m=n.formatParams(R,m);var H=n.uuid();m.TaskId=H,m.onTaskReady&&m.onTaskReady(H),m.TaskReady&&(m.TaskReady(H),D&&console.warn('warning: Param "TaskReady" has been deprecated. Please use "onTaskReady" instead.'),D=!1);var P={params:m,callback:B,api:R,index:w.length,id:H,Bucket:m.Bucket,Region:m.Region,Key:m.Key,FilePath:m.FilePath||"",state:"waiting",loaded:0,size:0,speed:0,percent:0,hashPercent:0,error:null,_custom:m._custom},F=m.onHashProgress;m.onHashProgress=function(b){!N._isRunningTask(P.id)||(P.hashPercent=b.percent,F&&F(b),q())};var Re=m.onProgress;return m.onProgress=function(b){!N._isRunningTask(P.id)||(P.state==="checking"&&(P.state="uploading"),P.loaded=b.loaded,P.speed=b.speed,P.percent=b.percent,Re&&Re(b),q())},n.getFileSize(R,m,function(b,z){if(b)return B(n.error(b));V[H]=P,w.push(P),P.size=z,!d&&q(),K(),re()}),H},N._isRunningTask=function(R){var m=V[R];return!!(m&&(m.state==="checking"||m.state==="uploading"))},N.getTaskList=function(){return n.map(w,M)},N.cancelTask=function(R){Ae(R,"canceled")},N.pauseTask=function(R){Ae(R,"paused")},N.restartTask=function(R){var m=V[R];m&&(m.state==="paused"||m.state==="error")&&(m.state="waiting",q(),Q=Math.min(Q,m.index),K())},N.isUploadRunning=function(){return G||Q<w.length}};p.exports.transferToTaskMethod=E,p.exports.init=L},"./src/tracker.js":function(p,S,s){var v=s("./node_modules/@babel/runtime/helpers/classCallCheck.js"),n=s("./node_modules/@babel/runtime/helpers/createClass.js"),ee=s("./node_modules/@babel/runtime/helpers/typeof.js"),E=s("./package.json"),L=s("./lib/beacon.min.js"),fe=null,N=function(m){return fe||(fe=new L({appkey:"0AND0VEVB24UBGDU",versionCode:E.version,channelID:"js_sdk",openid:"openid",unionid:"unid",strictMode:!1,delay:m,sessionDuration:60*1e3})),fe},w={getUid:function(){var m=function(){return((1+Math.random())*65536|0).toString(16).substring(1)};return m()+m()+"-"+m()+"-"+m()+"-"+m()+"-"+m()+m()+m()},getNetType:function(){if((typeof navigator=="undefined"?"undefined":ee(navigator))==="object"){var m=navigator.connection||navigator.mozConnection||navigator.webkitConnection;return(m==null?void 0:m.type)||(m==null?void 0:m.effectiveType)||"unknown"}return"unknown"},getOsType:function(){if((typeof navigator=="undefined"?"undefined":ee(navigator))!=="object")return"unknown os";var m=navigator.userAgent.toLowerCase(),B=/macintosh|mac os x/i.test(navigator.userAgent);return m.indexOf("win32")>=0||m.indexOf("wow32")>=0?"win32":m.indexOf("win64")>=0||m.indexOf("wow64")>=0?"win64":B?"mac":"unknown os"},isMobile:function(){var m=/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i;return!!((typeof navigator=="undefined"?"undefined":ee(navigator))==="object"&&navigator.userAgent.match(m))},isAndroid:function(){var m=/(Android|Adr|Linux)/i;return!!((typeof navigator=="undefined"?"undefined":ee(navigator))==="object"&&navigator.userAgent.match(m))},isIOS:function(){var m=/(iPhone|iPod|iPad|iOS)/i;return!!((typeof navigator=="undefined"?"undefined":ee(navigator))==="object"&&navigator.userAgent.match(m))},isOtherMobile:function(){return isMobile&&!isAndroid&&!isIOS},getDeviceName:function(){if((typeof navigator=="undefined"?"undefined":ee(navigator))!=="object")return"unknown device";var m=navigator.userAgent.toLowerCase();if(m.includes("app/tencent_wemeet"))return"tencent_wemeet";if(m.indexOf("maxthon")>=0){var B=m.match(/maxthon\/([\d.]+)/),d=B&&B[1]||"";return"\u50B2\u6E38\u6D4F\u89C8\u5668 ".concat(d).trim()}if(m.indexOf("qqbrowser")>=0){var H=m.match(/qqbrowser\/([\d.]+)/),P=H&&H[1]||"";return"QQ\u6D4F\u89C8\u5668 ".concat(P).trim()}if(m.indexOf("se 2.x")>=0)return"\u641C\u72D7\u6D4F\u89C8\u5668";if(m.indexOf("wxwork")>=0)return"\u5FAE\u4FE1\u5185\u7F6E\u6D4F\u89C8\u5668";if(m.indexOf("msie")>=0){var F=m.match(/msie ([\d.]+)/),Re=F&&F[1]||"";return"IE ".concat(Re).trim()}if(m.indexOf("firefox")>=0){var b=m.match(/firefox\/([\d.]+)/),z=b&&b[1]||"";return"Firefox ".concat(z).trim()}if(m.indexOf("chrome")>=0){var W=m.match(/chrome\/([\d.]+)/),ne=W&&W[1]||"";return"Chrome ".concat(ne).trim()}if(m.indexOf("opera")>=0){var oe=m.match(/opera.([\d.]+)/),pe=oe&&oe[1]||"";return"Opera ".concat(pe).trim()}if(m.indexOf("safari")>=0){var he=m.match(/version\/([\d.]+)/),ye=he&&he[1]||"";return"Safari ".concat(ye).trim()}if(m.indexOf("edge")>=0){var ie=m.match(/edge\/([\d.]+)/),le=ie&&ie[1]||"";return"edge ".concat(le).trim()}return m.substr(0,200)}},V={isMobile:w.isMobile(),isBrowser:!w.isMobile(),mobileOsType:w.isAndroid()?"android":w.isIOS?"ios":"other_mobile",pcOsType:w.getOsType()},G={deviceType:V.isMobile?"mobile":V.isBrowser?"browser":"unknown",devicePlatform:V.isMobile?V.mobileOsType:V.pcOsType,deviceName:w.getDeviceName()},Q=["multipartInit","multipartUpload","multipartComplete","multipartList","multipartListPart","multipartAbort"],M=["putObject","postObject","appendObject","sliceUploadFile","uploadFile","uploadFiles"].concat(Q),q=["getObject"];function re(R){return M.includes(R)?"cos_upload":q.includes(R)?"cos_download":"base_service"}function K(R){return R.replace(/([A-Z])/g,"_$1").toLowerCase()}function Ae(R){var m={},B=["tracePlatform","cossdkVersion","region","networkType","host","accelerate","requestPath","size","httpMd5","httpSign","httpFull","name","result","tookTime","errorNode","errorCode","errorMessage","errorRequestId","errorStatusCode","errorServiceName","errorType","traceId","bucket","appid","partNumber","retryTimes","reqUrl","customId","fullError","deviceType","devicePlatform","deviceName"],d=["tracePlatform","cossdkVersion","region","bucket","appid","networkType","host","accelerate","requestPath","partNumber","size","name","result","tookTime","errorRequestId","retryTimes","reqUrl","customId","deviceType","devicePlatform","deviceName"],H=R.result==="Success"?d:B;for(var P in R)if(!!H.includes(P)){var F=K(P);m[F]=R[P]}return m}var D=function(){"use strict";function R(m){v(this,R);var B=m.parent,d=m.traceId,H=m.bucket,P=m.region,F=m.apiName,Re=m.fileKey,b=m.fileSize,z=m.accelerate,W=m.customId,ne=m.delay,oe=m.deepTracker,pe=H&&H.substr(H.lastIndexOf("-")+1)||"";this.parent=B,this.deepTracker=oe,this.params={cossdkVersion:E.version,region:P,networkType:"",host:"",accelerate:z?"Y":"N",requestPath:Re||"",size:b||-1,httpMd5:0,httpSign:0,httpFull:0,name:F||"",result:"",tookTime:0,errorNode:"",errorCode:"",errorMessage:"",errorRequestId:"",errorStatusCode:0,errorServiceName:"",tracePlatform:"cos-js-sdk-v5",traceId:d||w.getUid(),bucket:H,appid:pe,partNumber:0,retryTimes:0,reqUrl:"",customId:W||"",deviceType:G.deviceType,devicePlatform:G.devicePlatform,deviceName:G.deviceName,md5StartTime:0,md5EndTime:0,signStartTime:0,signEndTime:0,httpStartTime:0,httpEndTime:0,startTime:new Date().getTime(),endTime:0},this.beacon=N(ne)}return n(R,[{key:"formatResult",value:function(B,d){var H,P,F,Re,b,z,W=new Date().getTime(),ne=W-this.params.startTime,oe=w.getNetType(),pe=B?(B==null?void 0:B.code)||(B==null||(H=B.error)===null||H===void 0?void 0:H.code)||(B==null||(P=B.error)===null||P===void 0?void 0:P.Code):"",he=B?(B==null?void 0:B.message)||(B==null||(F=B.error)===null||F===void 0?void 0:F.message)||(B==null||(Re=B.error)===null||Re===void 0?void 0:Re.Message):"",ye=B?(B==null?void 0:B.resource)||(B==null||(b=B.error)===null||b===void 0?void 0:b.resource)||(B==null||(z=B.error)===null||z===void 0?void 0:z.Resource):"",ie=B?B==null?void 0:B.statusCode:d.statusCode,le=B?(B==null?void 0:B.headers)&&(B==null?void 0:B.headers["x-cos-request-id"]):(d==null?void 0:d.headers)&&(d==null?void 0:d.headers["x-cos-request-id"]),ve=B?le?"Server":"Client":"";if(Object.assign(this.params,{tookTime:ne,networkType:oe,httpMd5:this.params.md5EndTime-this.params.md5StartTime,httpSign:this.params.signEndTime-this.params.signStartTime,httpFull:this.params.httpEndTime-this.params.httpStartTime,result:B?"Fail":"Success",errorType:ve,errorCode:pe,errorStatusCode:ie,errorMessage:he,errorServiceName:ye,errorRequestId:le}),B&&(!pe||!he)&&(this.params.fullError=B?JSON.stringify(B):""),this.params.name==="getObject"&&(this.params.size=d?d.headers&&d.headers["content-length"]:-1),this.params.reqUrl)try{var Le=/^http(s)?:\/\/(.*?)\//.exec(this.params.reqUrl);this.params.host=Le[2]}catch(Se){this.params.host=this.params.reqUrl}this.sendEvents()}},{key:"setParams",value:function(B){Object.assign(this.params,B)}},{key:"sendEvents",value:function(){if(!(Q.includes(this.params.name)&&!this.deepTracker)){var B=re(this.params.name),d=Ae(this.params);this.params.delay===0?this.beacon.onDirectUserAction(B,d):this.beacon.onUserAction(B,d),this.destroy()}}},{key:"generateSubTracker",value:function(B){return Object.assign(B,{parent:this,deepTracker:this.deepTracker,traceId:this.params.traceId,bucket:this.params.bucket,region:this.params.region,fileKey:this.params.requestPath,customId:this.params.customId,delay:this.params.delay}),new R(B)}},{key:"destroy",value:function(){this.beacon=null,this.params={}}}]),R}();p.exports=D},"./src/util.js":function(p,S,s){"use strict";(function(v){var n=s("./node_modules/@babel/runtime/helpers/typeof.js"),ee=s("./lib/md5.js"),E=s("./lib/crypto.js"),L=s("./lib/xml2json.js"),fe=s("./lib/json2xml.js"),N=s("./src/tracker.js");function w(J){return encodeURIComponent(J).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function V(J,T){var U=[];for(var I in J)J.hasOwnProperty(I)&&U.push(T?w(I).toLowerCase():I);return U.sort(function($,ge){return $=$.toLowerCase(),ge=ge.toLowerCase(),$===ge?0:$>ge?1:-1})}var G=function(T,U){var I,$,ge,_e=[],x=V(T);for(I=0;I<x.length;I++)$=x[I],ge=T[$]===void 0||T[$]===null?"":""+T[$],$=U?w($).toLowerCase():w($),ge=w(ge)||"",_e.push($+"="+ge);return _e.join("&")},Q=["content-disposition","content-encoding","content-length","content-md5","expect","host","if-match","if-modified-since","if-none-match","if-unmodified-since","origin","range","response-cache-control","response-content-disposition","response-content-encoding","response-content-language","response-content-type","response-expires","transfer-encoding","versionid"],M=function(T){var U={};for(var I in T){var $=I.toLowerCase();($.indexOf("x-cos-")>-1||Q.indexOf($)>-1)&&(U[I]=T[I])}return U},q=function(T){T=T||{};var U=T.SecretId,I=T.SecretKey,$=T.KeyTime,ge=(T.method||T.Method||"get").toLowerCase(),_e=b(T.Query||T.params||{}),x=M(b(T.Headers||T.headers||{})),u=T.Key||"",f;T.UseRawKey?f=T.Pathname||T.pathname||"/"+u:(f=T.Pathname||T.pathname||u,f.indexOf("/")!==0&&(f="/"+f));var a=T.ForceSignHost!==!1;if(!x.Host&&!x.host&&T.Bucket&&T.Region&&a&&(x.Host=T.Bucket+".cos."+T.Region+".myqcloud.com"),!U)throw new Error("missing param SecretId");if(!I)throw new Error("missing param SecretKey");var g=Math.round(Ee(T.SystemClockOffset)/1e3)-1,A=g,_=T.Expires||T.expires;_===void 0?A+=900:A+=_*1||0;var Z="sha1",te=U,Ce=$||g+";"+A,X=$||g+";"+A,Pe=V(x,!0).join(";").toLowerCase(),Y=V(_e,!0).join(";").toLowerCase(),Me=E.HmacSHA1(X,I).toString(),xe=[ge,f,we.obj2str(_e,!0),we.obj2str(x,!0),""].join(`
  12. `),Oe=["sha1",Ce,E.SHA1(xe).toString(),""].join(`
  13. `),je=E.HmacSHA1(Oe,Me).toString(),Ue=["q-sign-algorithm="+Z,"q-ak="+te,"q-sign-time="+Ce,"q-key-time="+X,"q-header-list="+Pe,"q-url-param-list="+Y,"q-signature="+je].join("&");return Ue},re=function(T,U,I){var $=U/8,ge=T.slice(I,I+$);return new Uint8Array(ge).reverse(),new{8:Uint8Array,16:Uint16Array,32:Uint32Array}[U](ge)[0]},K=function(T,U,I,$){var ge=T.slice(U,I),_e="";return new Uint8Array(ge).forEach(function(x){_e+=String.fromCharCode(x)}),$&&(_e=decodeURIComponent(escape(_e))),_e},Ae=function(T){for(var U={},I=K(T),$={records:[]};T.byteLength;){var ge=re(T,32,0),_e=re(T,32,4),x=ge-_e-16,u=0,f;for(T=T.slice(12);u<_e;){var a=re(T,8,u),g=K(T,u+1,u+1+a),A=re(T,16,u+a+2),_=K(T,u+a+4,u+a+4+A);U[g]=_,u+=a+4+A}if(U[":event-type"]==="Records")f=K(T,u,u+x,!0),$.records.push(f);else if(U[":event-type"]==="Stats")f=K(T,u,u+x,!0),$.stats=we.xml2json(f).Stats;else if(U[":event-type"]==="error"){var Z=U[":error-code"],te=U[":error-message"],Ce=new Error(te);Ce.message=te,Ce.name=Ce.code=Z,$.error=Ce}else["Progress","Continuation","End"].includes(U[":event-type"]);T=T.slice(u+x+4)}return{payload:$.records.join(""),body:I}},D=function(T){var U=this.options.CopySourceParser;if(U)return U(T);var I=T.match(/^([^.]+-\d+)\.cos(v6|-cdc)?\.([^.]+)\.myqcloud\.com\/(.+)$/);return I?{Bucket:I[1],Region:I[3],Key:I[4]}:null},R=function(){},m=function(T){var U={};for(var I in T)T.hasOwnProperty(I)&&T[I]!==void 0&&T[I]!==null&&(U[I]=T[I]);return U},B=function(T,U){var I,$=new FileReader;FileReader.prototype.readAsBinaryString?(I=FileReader.prototype.readAsBinaryString,$.onload=function(){U(this.result)}):FileReader.prototype.readAsArrayBuffer?I=function(_e){var x="",u=this,f=new FileReader;f.onload=function(a){for(var g=new Uint8Array(f.result),A=g.byteLength,_=0;_<A;_++)x+=String.fromCharCode(g[_]);U(x)},f.readAsArrayBuffer(_e)}:console.error("FileReader not support readAsBinaryString"),I.call($,T)},d=function(){var J=function(I,$){I=I.split("."),$=$.split(".");for(var ge=0;ge<$.length;ge++)if(I[ge]!==$[ge])return parseInt(I[ge])>parseInt($[ge])?1:-1;return 0},T=function(I){if(!I)return!1;var $=(I.match(/Chrome\/([.\d]+)/)||[])[1],ge=(I.match(/QBCore\/([.\d]+)/)||[])[1],_e=(I.match(/QQBrowser\/([.\d]+)/)||[])[1],x=$&&J($,"53.0.2785.116")<0&&ge&&J(ge,"3.53.991.400")<0&&_e&&J(_e,"9.0.2524.400")<=0||!1;return x};return T(typeof navigator!="undefined"&&navigator.userAgent)}(),H=function(T,U,I,$,ge){var _e;if(T.slice?_e=T.slice(U,I):T.mozSlice?_e=T.mozSlice(U,I):T.webkitSlice&&(_e=T.webkitSlice(U,I)),$&&d){var x=new FileReader;x.onload=function(u){_e=null,ge(new Blob([x.result]))},x.readAsArrayBuffer(_e)}else ge(_e)},P=function(T,U,I,$){I=I||R,T?typeof U=="string"?I(we.md5(U,!0)):Blob&&U instanceof Blob?we.getFileMd5(U,function(ge,_e){I(_e)},$):I():I()},F=1024*1024,Re=function(T,U,I){var $=T.size,ge=0,_e=ee.getCtx(),x=function u(f){if(f>=$){var a=_e.digest("hex");U(null,a);return}var g=Math.min($,f+F);we.fileSlice(T,f,g,!1,function(A){B(A,function(_){A=null,_e=_e.update(_,!0),ge+=_.length,_=null,I&&I({loaded:ge,total:$,percent:Math.round(ge/$*1e4)/1e4}),u(f+F)})})};x(0)};function b(J){return ye(J,function(T){return n(T)==="object"&&T!==null?b(T):T})}function z(J,T,U){return J&&T in J?J[T]:U}function W(J,T){return he(T,function(U,I){J[I]=T[I]}),J}function ne(J){return J instanceof Array}function oe(J,T){for(var U=!1,I=0;I<J.length;I++)if(T===J[I]){U=!0;break}return U}function pe(J){return ne(J)?J:[J]}function he(J,T){for(var U in J)J.hasOwnProperty(U)&&T(J[U],U)}function ye(J,T){var U=ne(J)?[]:{};for(var I in J)J.hasOwnProperty(I)&&(U[I]=T(J[I],I));return U}function ie(J,T){var U=ne(J),I=U?[]:{};for(var $ in J)J.hasOwnProperty($)&&T(J[$],$)&&(U?I.push(J[$]):I[$]=J[$]);return I}var le=function(T){var U,I,$,ge="";for(U=0,I=T.length/2;U<I;U++)$=parseInt(T[U*2]+T[U*2+1],16),ge+=String.fromCharCode($);return btoa(ge)},ve=function(){var T=function(){return((1+Math.random())*65536|0).toString(16).substring(1)};return T()+T()+"-"+T()+"-"+T()+"-"+T()+"-"+T()+T()+T()},Le=function(T,U){var I=U.Bucket,$=U.Region,ge=U.Key,_e=this.options.Domain,x=!_e||typeof _e=="string"&&_e.indexOf("{Bucket}")>-1,u=!_e||typeof _e=="string"&&_e.indexOf("{Region}")>-1;if(T.indexOf("Bucket")>-1||T==="deleteMultipleObject"||T==="multipartList"||T==="listObjectVersions"){if(x&&!I)return"Bucket";if(u&&!$)return"Region"}else if(T.indexOf("Object")>-1||T.indexOf("multipart")>-1||T==="sliceUploadFile"||T==="abortUploadTask"){if(x&&!I)return"Bucket";if(u&&!$)return"Region";if(!ge)return"Key"}return!1},Se=function(T,U){if(U=W({},U),T!=="getAuth"&&T!=="getV4Auth"&&T!=="getObjectUrl"){var I=U.Headers||{};if(U&&n(U)==="object"){(function(){for(var ge in U)U.hasOwnProperty(ge)&&ge.indexOf("x-cos-")>-1&&(I[ge]=U[ge])})();var $={"x-cos-mfa":"MFA","Content-MD5":"ContentMD5","Content-Length":"ContentLength","Content-Type":"ContentType",Expect:"Expect",Expires:"Expires","Cache-Control":"CacheControl","Content-Disposition":"ContentDisposition","Content-Encoding":"ContentEncoding",Range:"Range","If-Modified-Since":"IfModifiedSince","If-Unmodified-Since":"IfUnmodifiedSince","If-Match":"IfMatch","If-None-Match":"IfNoneMatch","x-cos-copy-source":"CopySource","x-cos-copy-source-Range":"CopySourceRange","x-cos-metadata-directive":"MetadataDirective","x-cos-copy-source-If-Modified-Since":"CopySourceIfModifiedSince","x-cos-copy-source-If-Unmodified-Since":"CopySourceIfUnmodifiedSince","x-cos-copy-source-If-Match":"CopySourceIfMatch","x-cos-copy-source-If-None-Match":"CopySourceIfNoneMatch","x-cos-acl":"ACL","x-cos-grant-read":"GrantRead","x-cos-grant-write":"GrantWrite","x-cos-grant-full-control":"GrantFullControl","x-cos-grant-read-acp":"GrantReadAcp","x-cos-grant-write-acp":"GrantWriteAcp","x-cos-storage-class":"StorageClass","x-cos-traffic-limit":"TrafficLimit","x-cos-mime-limit":"MimeLimit","x-cos-server-side-encryption-customer-algorithm":"SSECustomerAlgorithm","x-cos-server-side-encryption-customer-key":"SSECustomerKey","x-cos-server-side-encryption-customer-key-MD5":"SSECustomerKeyMD5","x-cos-server-side-encryption":"ServerSideEncryption","x-cos-server-side-encryption-cos-kms-key-id":"SSEKMSKeyId","x-cos-server-side-encryption-context":"SSEContext"};we.each($,function(ge,_e){U[ge]!==void 0&&(I[_e]=U[ge])}),U.Headers=m(I)}}return U},ce=function(T,U){return function(I,$){var ge=this;typeof I=="function"&&($=I,I={}),I=Se(T,I);var _e;if(ge.options.EnableTracker)if(I.calledBySdk==="sliceUploadFile")_e=I.tracker&&I.tracker.generateSubTracker({apiName:T});else if(["uploadFile","uploadFiles"].includes(T))_e=null;else{var x=-1;I.Body&&(x=typeof I.Body=="string"?I.Body.length:I.Body.size||I.Body.byteLength||-1),_e=new N({bucket:I.Bucket,region:I.Region,apiName:T,fileKey:I.Key,fileSize:x,deepTracker:ge.options.DeepTracker,customId:ge.options.CustomId,delay:ge.options.TrackerDelay})}I.tracker=_e;var u=function(te){return te&&te.headers&&(te.headers["x-cos-request-id"]&&(te.RequestId=te.headers["x-cos-request-id"]),te.headers["x-ci-request-id"]&&(te.RequestId=te.headers["x-ci-request-id"]),te.headers["x-cos-version-id"]&&(te.VersionId=te.headers["x-cos-version-id"]),te.headers["x-cos-delete-marker"]&&(te.DeleteMarker=te.headers["x-cos-delete-marker"])),te},f=function(te,Ce){_e&&_e.formatResult(te,Ce),$&&$(u(te),u(Ce))},a=function(){if(T!=="getService"&&T!=="abortUploadTask"){var te=Le.call(ge,T,I);if(te)return"missing param "+te;if(I.Region){if(ge.options.CompatibilityMode){if(!/^([a-z\d-.]+)$/.test(I.Region))return"Region format error."}else{if(I.Region.indexOf("cos.")>-1)return'param Region should not be start with "cos."';if(!/^([a-z\d-]+)$/.test(I.Region))return"Region format error."}!ge.options.CompatibilityMode&&I.Region.indexOf("-")===-1&&I.Region!=="yfb"&&I.Region!=="default"&&I.Region!=="accelerate"&&console.warn("warning: param Region format error, find help here: https://cloud.tencent.com/document/product/436/6224")}if(I.Bucket){if(!/^([a-z\d-]+)-(\d+)$/.test(I.Bucket))if(I.AppId)I.Bucket=I.Bucket+"-"+I.AppId;else if(ge.options.AppId)I.Bucket=I.Bucket+"-"+ge.options.AppId;else return'Bucket should format as "test-1250000000".';I.AppId&&(console.warn('warning: AppId has been deprecated, Please put it at the end of parameter Bucket(E.g Bucket:"test-1250000000" ).'),delete I.AppId)}!ge.options.UseRawKey&&I.Key&&I.Key.substr(0,1)==="/"&&(I.Key=I.Key.substr(1))}},g=a(),A=T==="getAuth"||T==="getObjectUrl";if(typeof Promise=="function"&&!A&&!$)return new Promise(function(Z,te){if($=function(X,Pe){X?te(X):Z(Pe)},g)return f(we.error(new Error(g)));U.call(ge,I,f)});if(g)return f(we.error(new Error(g)));var _=U.call(ge,I,f);if(A)return _}},me=function(T,U){var I=this,$=0,ge=0,_e=Date.now(),x,u;function f(){if(u=0,U&&typeof U=="function"){x=Date.now();var a=Math.max(0,Math.round((ge-$)/((x-_e)/1e3)*100)/100)||0,g;ge===0&&T===0?g=1:g=Math.floor(ge/T*100)/100||0,_e=x,$=ge;try{U({loaded:ge,total:T,speed:a,percent:g})}catch(A){}}}return function(a,g){if(a&&(ge=a.loaded,T=a.total),g)clearTimeout(u),f();else{if(u)return;u=setTimeout(f,I.options.ProgressInterval)}}},be=function(T,U,I){var $;if(typeof U.Body=="string"?U.Body=new Blob([U.Body],{type:"text/plain"}):U.Body instanceof ArrayBuffer&&(U.Body=new Blob([U.Body])),U.Body&&(U.Body instanceof Blob||U.Body.toString()==="[object File]"||U.Body.toString()==="[object Blob]"))$=U.Body.size;else{I(we.error(new Error("params body format error, Only allow File|Blob|String.")));return}U.ContentLength=$,I(null,$)},Ee=function(T){return Date.now()+(T||0)},De=function(T,U){var I=T;return T.message=T.message||null,typeof U=="string"?(T.error=U,T.message=U):n(U)==="object"&&U!==null&&(W(T,U),(U.code||U.name)&&(T.code=U.code||U.name),U.message&&(T.message=U.message),U.stack&&(T.stack=U.stack)),typeof Object.defineProperty=="function"&&(Object.defineProperty(T,"name",{writable:!0,enumerable:!1}),Object.defineProperty(T,"message",{enumerable:!0})),T.name=U&&U.name||T.name||T.code||"Error",T.code||(T.code=T.name),T.error||(T.error=b(I)),T},ke=function(){return(typeof globalThis=="undefined"?"undefined":n(globalThis))==="object"&&(globalThis.constructor.name==="DedicatedWorkerGlobalScope"||globalThis.FileReaderSync)},Be=function(){return(typeof window=="undefined"?"undefined":n(window))!=="object"&&(typeof v=="undefined"?"undefined":n(v))==="object"&&!0&&!ke()},Ne=function(T){return/^https?:\/\/([^/]+\.)?ci\.[^/]+/.test(T)},we={noop:R,formatParams:Se,apiWrapper:ce,xml2json:L,json2xml:fe,md5:ee,clearKey:m,fileSlice:H,getBodyMd5:P,getFileMd5:Re,binaryBase64:le,extend:W,isArray:ne,isInArray:oe,makeArray:pe,each:he,map:ye,filter:ie,clone:b,attr:z,uuid:ve,camSafeUrlEncode:w,throttleOnProgress:me,getFileSize:be,getSkewTime:Ee,error:De,obj2str:G,getAuth:q,parseSelectPayload:Ae,getSourceParams:D,isBrowser:!0,isNode:Be,isCIHost:Ne};p.exports=we}).call(this,s("./node_modules/process/browser.js"))}})})}}]);