您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

13 行
191 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[5754],{65754:function(module){(function(C,u){module.exports=u()})(this,function(){return function(y){var C={};function u(v){if(C[v])return C[v].exports;var T=C[v]={i:v,l:!1,exports:{}};return y[v].call(T.exports,T,T.exports,u),T.l=!0,T.exports}return u.m=y,u.c=C,u.d=function(v,T,l){u.o(v,T)||Object.defineProperty(v,T,{enumerable:!0,get:l})},u.r=function(v){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(v,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(v,"__esModule",{value:!0})},u.t=function(v,T){if(T&1&&(v=u(v)),T&8||T&4&&typeof v=="object"&&v&&v.__esModule)return v;var l=Object.create(null);if(u.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:v}),T&2&&typeof v!="string")for(var k in v)u.d(l,k,function(P){return v[P]}.bind(null,k));return l},u.n=function(v){var T=v&&v.__esModule?function(){return v.default}:function(){return v};return u.d(T,"a",T),T},u.o=function(v,T){return Object.prototype.hasOwnProperty.call(v,T)},u.p="/dist/",u(u.s="./index.js")}({"./index.js":function(y,C,u){var v=u("./src/cos.js");y.exports=v},"./lib/beacon.min.js":function(y,C,u){var v,T,l=u("./node_modules/@babel/runtime/helpers/typeof.js");(function(k,P){l(C)=="object"&&typeof y!="undefined"?y.exports=P():(v=P,T=typeof v=="function"?v.call(C,u,C,y):v,T!==void 0&&(y.exports=T))})(this,function(){"use strict";var k=function(i,a){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,p){s.__proto__=p}||function(s,p){for(var R in p)Object.prototype.hasOwnProperty.call(p,R)&&(s[R]=p[R])},k(i,a)},P=function(){return P=Object.assign||function(i){for(var a,s=1,p=arguments.length;s<p;s++)for(var R in a=arguments[s])Object.prototype.hasOwnProperty.call(a,R)&&(i[R]=a[R]);return i},P.apply(this,arguments)};function ee(d,i,a,s){return new(a||(a=Promise))(function(p,R){function O(Ce){try{ae(s.next(Ce))}catch(W){R(W)}}function G(Ce){try{ae(s.throw(Ce))}catch(W){R(W)}}function ae(Ce){var W;Ce.done?p(Ce.value):(W=Ce.value,W instanceof a?W:new a(function(Oe){Oe(W)})).then(O,G)}ae((s=s.apply(d,i||[])).next())})}function B(d,i){var a,s,p,R,O={label:0,sent:function(){if(1&p[0])throw p[1];return p[1]},trys:[],ops:[]};return R={next:G(0),throw:G(1),return:G(2)},typeof Symbol=="function"&&(R[Symbol.iterator]=function(){return this}),R;function G(ae){return function(Ce){return function(W){if(a)throw new TypeError("Generator is already executing.");for(;O;)try{if(a=1,s&&(p=2&W[0]?s.return:W[0]?s.throw||((p=s.return)&&p.call(s),0):s.next)&&!(p=p.call(s,W[1])).done)return p;switch(s=0,p&&(W=[2&W[0],p.value]),W[0]){case 0:case 1:p=W;break;case 4:return O.label++,{value:W[1],done:!1};case 5:O.label++,s=W[1],W=[0];continue;case 7:W=O.ops.pop(),O.trys.pop();continue;default:if(p=O.trys,!((p=p.length>0&&p[p.length-1])||W[0]!==6&&W[0]!==2)){O=0;continue}if(W[0]===3&&(!p||W[1]>p[0]&&W[1]<p[3])){O.label=W[1];break}if(W[0]===6&&O.label<p[1]){O.label=p[1],p=W;break}if(p&&O.label<p[2]){O.label=p[2],O.ops.push(W);break}p[2]&&O.ops.pop(),O.trys.pop();continue}W=i.call(d,O)}catch(Oe){W=[6,Oe],s=0}finally{a=p=0}if(5&W[0])throw W[1];return{value:W[0]?W[1]:void 0,done:!0}}([ae,Ce])}}}var b="__BEACON_",q="__BEACON_deviceId",L="last_report_time",z="sending_event_ids",_="beacon_config",j="beacon_config_request_time",Q=function(){function d(){var i=this;this.emit=function(a,s){if(i){var p,R=i.__EventsList[a];if(R==null?void 0:R.length){R=R.slice();for(var O=0;O<R.length;O++){p=R[O];try{var G=p.callback.apply(i,[s]);if(p.type===1&&i.remove(a,p.callback),G===!1)break}catch(ae){throw ae}}}return i}},this.__EventsList={}}return d.prototype.indexOf=function(i,a){for(var s=0;s<i.length;s++)if(i[s].callback===a)return s;return-1},d.prototype.on=function(i,a,s){if(s===void 0&&(s=0),this){var p=this.__EventsList[i];if(p||(p=this.__EventsList[i]=[]),this.indexOf(p,a)===-1){var R={name:i,type:s||0,callback:a};return p.push(R),this}return this}},d.prototype.one=function(i,a){this.on(i,a,1)},d.prototype.remove=function(i,a){if(this){var s=this.__EventsList[i];if(!s)return null;if(!a){try{delete this.__EventsList[i]}catch(R){}return null}if(s.length){var p=this.indexOf(s,a);s.splice(p,1)}return this}},d}();function M(d,i){for(var a={},s=0,p=Object.keys(d);s<p.length;s++){var R=p[s],O=d[R];if(typeof O=="string")a[ge(R)]=ge(O);else{if(i)throw new Error("value mast be string !!!!");a[ge(String(R))]=ge(String(O))}}return a}function ge(d){if(typeof d!="string")return d;try{return d.replace(new RegExp("\\|","g"),"%7C").replace(new RegExp("\\&","g"),"%26").replace(new RegExp("\\=","g"),"%3D").replace(new RegExp("\\+","g"),"%2B")}catch(i){return""}}function A(d){return String(d.A99)+String(d.A100)}var S=function(){},m=function(){function d(i){var a=this;this.lifeCycle=new Q,this.uploadJobQueue=[],this.additionalParams={},this.delayTime=0,this._normalLogPipeline=function(s){if(!s||!s.reduce||!s.length)throw new TypeError("createPipeline \u65B9\u6CD5\u9700\u8981\u4F20\u5165\u81F3\u5C11\u6709\u4E00\u4E2A pipe \u7684\u6570\u7EC4");return s.length===1?function(p,R){s[0](p,R||S)}:s.reduce(function(p,R){return function(O,G){return G===void 0&&(G=S),p(O,function(ae){return R==null?void 0:R(ae,G)})}})}([function(s){a.send({url:a.strategy.getUploadUrl(),data:s,method:"post",contentType:"application/json;charset=UTF-8"},function(){var p=a.config.onReportSuccess;typeof p=="function"&&p(JSON.stringify(s.events))},function(){var p=a.config.onReportFail;typeof p=="function"&&p(JSON.stringify(s.events))})}]),function(s,p){if(!s)throw p instanceof Error?p:new Error(p)}(Boolean(i.appkey),"appkey must be initial"),this.config=P({},i)}return d.prototype.onUserAction=function(i,a){this.preReport(i,a,!1)},d.prototype.onDirectUserAction=function(i,a){this.preReport(i,a,!0)},d.prototype.preReport=function(i,a,s){i?this.strategy.isEventUpOnOff()&&(this.strategy.isBlackEvent(i)||this.strategy.isSampleEvent(i)||this.onReport(i,a,s)):this.errorReport.reportError("602"," no eventCode")},d.prototype.addAdditionalParams=function(i){for(var a=0,s=Object.keys(i);a<s.length;a++){var p=s[a];this.additionalParams[p]=i[p]}},d.prototype.setChannelId=function(i){this.commonInfo.channelID=String(i)},d.prototype.setOpenId=function(i){this.commonInfo.openid=String(i)},d.prototype.setUnionid=function(i){this.commonInfo.unid=String(i)},d.prototype.getDeviceId=function(){return this.commonInfo.deviceId},d.prototype.getCommonInfo=function(){return this.commonInfo},d.prototype.removeSendingId=function(i){try{var a=JSON.parse(this.storage.getItem(z)),s=a.indexOf(i);s!=-1&&(a.splice(s,1),this.storage.setItem(z,JSON.stringify(a)))}catch(p){}},d}(),K=function(){function d(i,a,s,p){this.requestParams={},this.network=p,this.requestParams.attaid="00400014144",this.requestParams.token="6478159937",this.requestParams.product_id=i.appkey,this.requestParams.platform=s,this.requestParams.uin=a.deviceId,this.requestParams.model="",this.requestParams.os=s,this.requestParams.app_version=i.appVersion,this.requestParams.sdk_version=a.sdkVersion,this.requestParams.error_stack="",this.uploadUrl=i.isOversea?"https://htrace.wetvinfo.com/kv":"https://h.trace.qq.com/kv"}return d.prototype.reportError=function(i,a){this.requestParams._dc=Math.random(),this.requestParams.error_msg=a,this.requestParams.error_code=i,this.network.get(this.uploadUrl,{params:this.requestParams}).catch(function(s){})},d}(),g=function(){function d(i,a,s,p,R){this.strategy={isEventUpOnOff:!0,httpsUploadUrl:"https://otheve.beacon.qq.com/analytics/v2_upload",requestInterval:30,blacklist:[],samplelist:[]},this.realSample={},this.appkey="",this.needQueryConfig=!0,this.appkey=a.appkey,this.storage=p,this.needQueryConfig=i;try{var O=JSON.parse(this.storage.getItem(_));O&&this.processData(O)}catch(G){}a.isOversea&&(this.strategy.httpsUploadUrl="https://svibeacon.onezapp.com/analytics/v2_upload"),!a.isOversea&&this.needRequestConfig()&&this.requestConfig(a.appVersion,s,R)}return d.prototype.requestConfig=function(i,a,s){var p=this;this.storage.setItem(j,Date.now().toString()),s.post("https://oth.str.beacon.qq.com/trpc.beacon.configserver.BeaconConfigService/QueryConfig",{platformId:typeof wx=="undefined"?"3":"4",mainAppKey:this.appkey,appVersion:i,sdkVersion:a.sdkVersion,osVersion:a.userAgent,model:"",packageName:"",params:{A3:a.deviceId}}).then(function(R){if(R.data.ret==0)try{var O=JSON.parse(R.data.beaconConfig);O&&(p.processData(O),p.storage.setItem(_,R.data.beaconConfig))}catch(G){}else p.processData(null),p.storage.setItem(_,"")}).catch(function(R){})},d.prototype.processData=function(i){var a,s,p,R,O;this.strategy.isEventUpOnOff=(a=i==null?void 0:i.isEventUpOnOff)!==null&&a!==void 0?a:this.strategy.isEventUpOnOff,this.strategy.httpsUploadUrl=(s=i==null?void 0:i.httpsUploadUrl)!==null&&s!==void 0?s:this.strategy.httpsUploadUrl,this.strategy.requestInterval=(p=i==null?void 0:i.requestInterval)!==null&&p!==void 0?p:this.strategy.requestInterval,this.strategy.blacklist=(R=i==null?void 0:i.blacklist)!==null&&R!==void 0?R:this.strategy.blacklist,this.strategy.samplelist=(O=i==null?void 0:i.samplelist)!==null&&O!==void 0?O:this.strategy.samplelist;for(var G=0,ae=this.strategy.samplelist;G<ae.length;G++){var Ce=ae[G].split(",");Ce.length==2&&(this.realSample[Ce[0]]=Ce[1])}},d.prototype.needRequestConfig=function(){if(!this.needQueryConfig)return!1;var i=Number(this.storage.getItem(j));return Date.now()-i>60*this.strategy.requestInterval*1e3},d.prototype.getUploadUrl=function(){return this.strategy.httpsUploadUrl+"?appkey="+this.appkey},d.prototype.isBlackEvent=function(i){return this.strategy.blacklist.indexOf(i)!=-1},d.prototype.isEventUpOnOff=function(){return this.strategy.isEventUpOnOff},d.prototype.isSampleEvent=function(i){return!!Object.prototype.hasOwnProperty.call(this.realSample,i)&&this.realSample[i]<Math.floor(Math.random()*Math.floor(1e4))},d}(),D="session_storage_key",U=function(){function d(i,a,s){this.getSessionStackDepth=0,this.beacon=s,this.storage=i,this.duration=a,this.appkey=s.config.appkey}return d.prototype.getSession=function(){this.getSessionStackDepth+=1;var i=this.storage.getItem(D);if(!i)return this.createSession();var a="",s=0;try{var p=JSON.parse(i)||{sessionId:void 0,sessionStart:void 0};if(!p.sessionId||!p.sessionStart)return this.createSession();var R=Number(this.storage.getItem(L));if(Date.now()-R>this.duration)return this.createSession();a=p.sessionId,s=p.sessionStart,this.getSessionStackDepth=0}catch(O){}return{sessionId:a,sessionStart:s}},d.prototype.createSession=function(){var i=Date.now(),a={sessionId:this.appkey+"_"+i.toString(),sessionStart:i};this.storage.setItem(D,JSON.stringify(a)),this.storage.setItem(L,i.toString());var s="is_new_user",p=this.storage.getItem(s);return this.getSessionStackDepth<=1&&this.beacon.onDirectUserAction("rqd_applaunched",{A21:p?"N":"Y"}),this.storage.setItem(s,JSON.stringify(!1)),a},d}();function F(){var d=navigator.userAgent,i=d.indexOf("compatible")>-1&&d.indexOf("MSIE")>-1,a=d.indexOf("Edge")>-1&&!i,s=d.indexOf("Trident")>-1&&d.indexOf("rv:11.0")>-1;if(i){new RegExp("MSIE (\\d+\\.\\d+);").test(d);var p=parseFloat(RegExp.$1);return p==7?7:p==8?8:p==9?9:p==10?10:6}return a?-2:s?11:-1}function $(d,i){var a,s;return(a="https://tun-cos-1258344701.file.myqcloud.com/fp.js",s===void 0&&(s=Date.now()+"-"+Math.random()),new Promise(function(p,R){if(document.getElementById(s))p(void 0);else{var O=document.getElementsByTagName("head")[0],G=document.createElement("script");G.onload=function(){return function(){G.onload=null,p(void 0)}},G.onerror=function(ae){G.onerror=null,O.removeChild(G),R(ae)},G.src=a,G.id=s,O.appendChild(G)}})).then(function(){new Fingerprint().getQimei36(d,i)}).catch(function(p){}),""}var w=function(){return(w=Object.assign||function(i){for(var a,s=1,p=arguments.length;s<p;s++)for(var R in a=arguments[s])Object.prototype.hasOwnProperty.call(a,R)&&(i[R]=a[R]);return i}).apply(this,arguments)},H,N=function(){function d(i,a){a===void 0&&(a={}),this.reportOptions={},this.config=i,this.reportOptions=a}return d.canUseDB=function(){return!!(window==null?void 0:window.indexedDB)},d.prototype.openDB=function(){var i=this;return new Promise(function(a,s){if(!d.canUseDB())return s({message:"\u5F53\u524D\u4E0D\u652F\u6301 indexeddb"});var p=i.config,R=p.name,O=p.version,G=p.stores,ae=indexedDB.open(R,O);ae.onsuccess=function(){i.db=ae.result,a(),w({result:1,func:"open",params:JSON.stringify(i.config)},i.reportOptions)},ae.onerror=function(Ce){var W,Oe;s(Ce),w({result:0,func:"open",params:JSON.stringify(i.config),error_msg:(Oe=(W=Ce.target)===null||W===void 0?void 0:W.error)===null||Oe===void 0?void 0:Oe.message},i.reportOptions)},ae.onupgradeneeded=function(){i.db=ae.result;try{G==null||G.forEach(function(Ce){i.createStore(Ce)})}catch(Ce){w({result:0,func:"open",params:JSON.stringify(i.config),error_msg:Ce.message},i.reportOptions),s(Ce)}}})},d.prototype.useStore=function(i){return this.storeName=i,this},d.prototype.deleteDB=function(){var i=this;return this.closeDB(),new Promise(function(a,s){var p=indexedDB.deleteDatabase(i.config.name);p.onsuccess=function(){return a()},p.onerror=s})},d.prototype.closeDB=function(){var i;(i=this.db)===null||i===void 0||i.close(),this.db=null},d.prototype.getStoreCount=function(){var i=this;return new Promise(function(a,s){var p=i.getStore("readonly").count();p.onsuccess=function(){return a(p.result)},p.onerror=s})},d.prototype.clearStore=function(){var i=this;return new Promise(function(a,s){var p=i.getStore("readwrite").clear();p.onsuccess=function(){return a()},p.onerror=s})},d.prototype.add=function(i,a){var s=this;return new Promise(function(p,R){var O=s.getStore("readwrite").add(i,a);O.onsuccess=function(){p(O.result)},O.onerror=R})},d.prototype.put=function(i,a){var s=this;return new Promise(function(p,R){var O=s.getStore("readwrite").put(i,a);O.onsuccess=function(){p(O.result)},O.onerror=R})},d.prototype.getStoreAllData=function(){var i=this;return new Promise(function(a,s){var p=i.getStore("readonly").openCursor(),R=[];p.onsuccess=function(){var O;if((O=p.result)===null||O===void 0?void 0:O.value){var G=p.result.value;R.push(G),p.result.continue()}else a(R)},p.onerror=s})},d.prototype.getDataRangeByIndex=function(i,a,s,p,R){var O=this;return new Promise(function(G,ae){var Ce=O.getStore().index(i),W=IDBKeyRange.bound(a,s,p,R),Oe=[],ke=Ce.openCursor(W);ke.onsuccess=function(){var Ie;((Ie=ke==null?void 0:ke.result)===null||Ie===void 0?void 0:Ie.value)?(Oe.push(ke==null?void 0:ke.result.value),ke==null||ke.result.continue()):G(Oe)},ke.onerror=ae})},d.prototype.removeDataByIndex=function(i,a,s,p,R){var O=this;return new Promise(function(G,ae){var Ce=O.getStore("readwrite").index(i),W=IDBKeyRange.bound(a,s,p,R),Oe=Ce.openCursor(W),ke=0;Oe.onsuccess=function(Ie){var Pe=Ie.target.result;Pe?(ke+=1,Pe.delete(),Pe.continue()):G(ke)},Oe.onerror=ae})},d.prototype.createStore=function(i){var a=i.name,s=i.indexes,p=s===void 0?[]:s,R=i.options;if(this.db){this.db.objectStoreNames.contains(a)&&this.db.deleteObjectStore(a);var O=this.db.createObjectStore(a,R);p.forEach(function(G){O.createIndex(G.indexName,G.keyPath,G.options)})}},d.prototype.getStore=function(i){var a;return i===void 0&&(i="readonly"),(a=this.db)===null||a===void 0?void 0:a.transaction(this.storeName,i).objectStore(this.storeName)},d}(),X="event_table_v3",J="eventId",ce=function(){function d(i){this.isReady=!1,this.taskQueue=Promise.resolve(),this.db=new N({name:"Beacon_"+i+"_V3",version:1,stores:[{name:X,options:{keyPath:J},indexes:[{indexName:J,keyPath:J,options:{unique:!0}}]}]}),this.open()}return d.prototype.getCount=function(){var i=this;return this.readyExec(function(){return i.db.getStoreCount()})},d.prototype.setItem=function(i,a){var s=this;return this.readyExec(function(){return s.db.add({eventId:i,value:a})})},d.prototype.getItem=function(i){return ee(this,void 0,void 0,function(){var a=this;return B(this,function(s){return[2,this.readyExec(function(){return a.db.getDataRangeByIndex(J,i,i)})]})})},d.prototype.removeItem=function(i){var a=this;return this.readyExec(function(){return a.db.removeDataByIndex(J,i,i)})},d.prototype.updateItem=function(i,a){var s=this;return this.readyExec(function(){return s.db.put({eventId:i,value:a})})},d.prototype.iterate=function(i){var a=this;return this.readyExec(function(){return a.db.getStoreAllData().then(function(s){s.forEach(function(p){i(p.value)})})})},d.prototype.open=function(){return ee(this,void 0,void 0,function(){var i=this;return B(this,function(a){switch(a.label){case 0:return this.taskQueue=this.taskQueue.then(function(){return i.db.openDB()}),[4,this.taskQueue];case 1:return a.sent(),this.isReady=!0,this.db.useStore(X),[2]}})})},d.prototype.readyExec=function(i){return this.isReady?i():(this.taskQueue=this.taskQueue.then(function(){return i()}),this.taskQueue)},d}(),se=function(){function d(i){this.keyObject={},this.storage=i}return d.prototype.getCount=function(){return this.storage.getStoreCount()},d.prototype.removeItem=function(i){this.storage.removeItem(i),delete this.keyObject[i]},d.prototype.setItem=function(i,a){var s=JSON.stringify(a);this.storage.setItem(i,s),this.keyObject[i]=a},d.prototype.iterate=function(i){for(var a=Object.keys(this.keyObject),s=0;s<a.length;s++){var p=this.storage.getItem(a[s]);i(JSON.parse(p))}},d}(),re=function(){function d(i,a){var s=this;this.dbEventCount=0,F()>0||!window.indexedDB||/X5Lite/.test(navigator.userAgent)?(this.store=new se(a),this.dbEventCount=this.store.getCount()):(this.store=new ce(i),this.getCount().then(function(p){s.dbEventCount=p}).catch(function(p){}))}return d.prototype.getCount=function(){return ee(this,void 0,void 0,function(){return B(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.store.getCount()];case 1:return[2,i.sent()];case 2:return i.sent(),[2,Promise.reject()];case 3:return[2]}})})},d.prototype.insertEvent=function(i,a){return ee(this,void 0,void 0,function(){var s,p;return B(this,function(R){switch(R.label){case 0:if(this.dbEventCount>=1e4)return[2,Promise.reject()];s=A(i.mapValue),R.label=1;case 1:return R.trys.push([1,3,,4]),this.dbEventCount++,[4,this.store.setItem(s,i)];case 2:return[2,R.sent()];case 3:return p=R.sent(),a&&a(p,i),this.dbEventCount--,[2,Promise.reject()];case 4:return[2]}})})},d.prototype.getEvents=function(){return ee(this,void 0,void 0,function(){var i;return B(this,function(a){switch(a.label){case 0:i=[],a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.store.iterate(function(s){i.push(s)})];case 2:return a.sent(),[2,Promise.all(i)];case 3:return a.sent(),[2,Promise.all(i)];case 4:return[2]}})})},d.prototype.removeEvent=function(i){return ee(this,void 0,void 0,function(){var a;return B(this,function(s){switch(s.label){case 0:a=A(i.mapValue),s.label=1;case 1:return s.trys.push([1,3,,4]),this.dbEventCount--,[4,this.store.removeItem(a)];case 2:return[2,s.sent()];case 3:return s.sent(),this.dbEventCount++,[2,Promise.reject()];case 4:return[2]}})})},d}(),Z=function(){return(Z=Object.assign||function(i){for(var a,s=1,p=arguments.length;s<p;s++)for(var R in a=arguments[s])Object.prototype.hasOwnProperty.call(a,R)&&(i[R]=a[R]);return i}).apply(this,arguments)};function te(d){try{return decodeURIComponent(d.replace(/\+/g," "))}catch(i){return null}}function ie(d,i){var a=[null,void 0,"",NaN].includes(d);if(i.isSkipEmpty&&a)return null;var s=!i.isSkipEmpty&&a?"":d;try{return i.encode?encodeURIComponent(s):s}catch(p){return null}}function we(d,i){i===void 0&&(i={encode:!0,isSkipEmpty:!1});var a=d.url,s=d.query,p=s===void 0?{}:s,R=d.hash,O=a.split("#"),G=O[0],ae=O[1],Ce=ae===void 0?"":ae,W=G.split("?")[0],Oe=[],ke=ie(R||Ce,i),Ie=Z(Z({},function(Pe){var Me=Pe.split("#"),Ge=Me[0],Fe=Me[1],je=Fe===void 0?"":Fe,Ne=Ge.split("?"),ze=Ne[0],Xe=Ne[1],nt=Xe===void 0?"":Xe,Ye=te(je),Qe=Object.create(null);return nt.split("&").forEach(function(Ze){var Ve=Ze.split("="),Je=Ve[0],$e=Ve[1],rt=$e===void 0?"":$e,he=te(Je),et=te(rt);he===null||et===null||he===""&&et===""||Qe[he]||(Qe[he]=et)}),{url:ze,query:Qe,hash:Ye}}(a).query),p);return Object.keys(Ie).forEach(function(Pe){var Me=ie(Pe,i),Ge=ie(Ie[Pe],i);Me!==null&&Ge!==null&&Oe.push(Me+"="+Ge)}),W+(Oe.length?"?"+Oe.join("&"):"")+(ke?"#"+ke:"")}function de(d,i){return new Promise(function(a,s){if(i&&document.querySelectorAll("script[data-tag="+i+"]").length)return a();var p=document.createElement("script"),R=Z({type:"text/javascript",charset:"utf-8"},d);Object.keys(R).forEach(function(O){return function(G,ae,Ce){if(G)return Ce===void 0?G.getAttribute(ae):G.setAttribute(ae,Ce)}(p,O,R[O])}),i&&(p.dataset.tag=i),p.onload=function(){return a()},p.onreadystatechange=function(){var O=p.readyState;["complete","loaded"].includes(O)&&(p.onreadystatechange=null,a())},p.onerror=s,document.body.appendChild(p)})}(function(d){d[d.equal=0]="equal",d[d.low=-1]="low",d[d.high=1]="high"})(H||(H={}));var Y=function(){return(Y=Object.assign||function(i){for(var a,s=1,p=arguments.length;s<p;s++)for(var R in a=arguments[s])Object.prototype.hasOwnProperty.call(a,R)&&(i[R]=a[R]);return i}).apply(this,arguments)};function pe(d,i,a,s){return new(a||(a=Promise))(function(p,R){function O(Ce){try{ae(s.next(Ce))}catch(W){R(W)}}function G(Ce){try{ae(s.throw(Ce))}catch(W){R(W)}}function ae(Ce){var W;Ce.done?p(Ce.value):(W=Ce.value,W instanceof a?W:new a(function(Oe){Oe(W)})).then(O,G)}ae((s=s.apply(d,i||[])).next())})}function oe(d,i){var a,s,p,R,O={label:0,sent:function(){if(1&p[0])throw p[1];return p[1]},trys:[],ops:[]};return R={next:G(0),throw:G(1),return:G(2)},typeof Symbol=="function"&&(R[Symbol.iterator]=function(){return this}),R;function G(ae){return function(Ce){return function(W){if(a)throw new TypeError("Generator is already executing.");for(;O;)try{if(a=1,s&&(p=2&W[0]?s.return:W[0]?s.throw||((p=s.return)&&p.call(s),0):s.next)&&!(p=p.call(s,W[1])).done)return p;switch(s=0,p&&(W=[2&W[0],p.value]),W[0]){case 0:case 1:p=W;break;case 4:return O.label++,{value:W[1],done:!1};case 5:O.label++,s=W[1],W=[0];continue;case 7:W=O.ops.pop(),O.trys.pop();continue;default:if(!((p=(p=O.trys).length>0&&p[p.length-1])||W[0]!==6&&W[0]!==2)){O=0;continue}if(W[0]===3&&(!p||W[1]>p[0]&&W[1]<p[3])){O.label=W[1];break}if(W[0]===6&&O.label<p[1]){O.label=p[1],p=W;break}if(p&&O.label<p[2]){O.label=p[2],O.ops.push(W);break}p[2]&&O.ops.pop(),O.trys.pop();continue}W=i.call(d,O)}catch(Oe){W=[6,Oe],s=0}finally{a=p=0}if(5&W[0])throw W[1];return{value:W[0]?W[1]:void 0,done:!0}}([ae,Ce])}}}var le=function(){function d(){this.interceptors=[]}return d.prototype.use=function(i,a){return this.interceptors.push({resolved:i,rejected:a}),this.interceptors.length-1},d.prototype.traverse=function(i,a){a===void 0&&(a=!1);var s=Promise.resolve(i);return(a?Array.prototype.reduceRight:Array.prototype.reduce).call(this.interceptors,function(p,R){if(R){var O=R.resolved,G=R.rejected;s=s.then(O,G)}return p},""),s},d.prototype.eject=function(i){this.interceptors[i]&&(this.interceptors[i]=null)},d}(),ye={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 le,response:new le}},ve=/^([a-z][a-z\d+\-.]*:)?\/\//i,me=Object.prototype.toString;function Ee(d){return pe(this,void 0,void 0,function(){var i;return oe(this,function(a){switch(a.label){case 0:if(window.fetch)return[2];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,de({src:d})];case 2:return a.sent(),[3,4];case 3:throw i=a.sent(),new Error("\u52A0\u8F7D polyfill "+d+" \u5931\u8D25: "+i.message);case 4:return[2]}})})}function Se(d){return["Accept","Content-Type"].forEach(function(i){return a=i,void((s=d.headers)&&Object.keys(s).forEach(function(p){p!==a&&p.toUpperCase()===a.toUpperCase()&&(s[a]=s[p],delete s[p])}));var a,s}),function(i){if(me.call(i)!=="[object Object]")return!1;var a=Object.getPrototypeOf(i);return a===null||a===Object.prototype}(d.body)&&(d.body=JSON.stringify(d.body),d.headers&&(d.headers["Content-Type"]="application/json;charset=utf-8")),d}function be(d){return pe(this,void 0,void 0,function(){var i,a,s,p,R,O,G,ae,Ce,W,Oe,ke,Ie,Pe,Me,Ge,Fe;return oe(this,function(je){switch(je.label){case 0:return i=ye.baseURL,a=ye.defaults,s=ye.interceptors,[4,Ee(ye.polyfillUrl)];case 1:return je.sent(),(p=Y(Y({},a),d)).headers||(p.headers=function(Ne){Ne===void 0&&(Ne="GET");var ze=ye.headers[Ne]||{};return Y(Y({},ye.headers.common),ze)}(p.method)),Se(p),[4,s.request.traverse(p,!0)];case 2:if((R=je.sent())instanceof Error)throw R;return R.url=function(Ne,ze){return!Ne||ve.test(ze)?ze:Ne.replace(/\/+$/,"")+"/"+ze.replace(/^\/+/,"")}(i,R.url),O=R.url,G=R.timeout,ae=R.params,Ce=R.method,W=["GET","DELETE","OPTIONS","HEAD"].includes(Ce===void 0?"GET":Ce)&&!!ae,Oe=W?we({url:O,query:ae}):O,ke=[],G&&!R.signal&&(Me=new Promise(function(Ne){Ie=setTimeout(function(){Ne(new Error("timeout"))},G)}),ke.push(Me),Pe=new AbortController,R.signal=Pe.signal),ke.push(fetch(Oe,R).catch(function(Ne){return Ne})),[4,Promise.race(ke)];case 3:return Ge=je.sent(),Ie&&clearTimeout(Ie),[4,s.response.traverse(Ge)];case 4:if((Fe=je.sent())instanceof Error)throw Pe==null||Pe.abort(),Fe;return[2,Fe]}})})}var Ae=function(){function d(i){ye.interceptors.request.use(function(a){var s=a.url,p=a.method,R=a.body,O=R;if(i.onReportBeforeSend){var G=i.onReportBeforeSend({url:s,method:p,data:R?JSON.parse(R):null});O=(G==null?void 0:G.data)?JSON.stringify(G.data):null}return p!="GET"&&O?P(P({},a),{body:O}):a})}return d.prototype.get=function(i,a){return ee(this,void 0,void 0,function(){var s,p;return B(this,function(R){switch(R.label){case 0:return[4,be(P({url:i},a))];case 1:return[4,(s=R.sent()).json()];case 2:return p=R.sent(),[2,Promise.resolve({data:p,status:s.status,statusText:s.statusText,headers:s.headers})]}})})},d.prototype.post=function(i,a,s){return ee(this,void 0,void 0,function(){var p,R;return B(this,function(O){switch(O.label){case 0:return[4,be(P({url:i,body:a,method:"POST"},s))];case 1:return[4,(p=O.sent()).json()];case 2:return R=O.sent(),[2,Promise.resolve({data:R,status:p.status,statusText:p.statusText,headers:p.headers})]}})})},d}(),V=function(){function d(i){this.appkey=i}return d.prototype.getItem=function(i){try{return window.localStorage.getItem(this.getStoreKey(i))}catch(a){return""}},d.prototype.removeItem=function(i){try{window.localStorage.removeItem(this.getStoreKey(i))}catch(a){}},d.prototype.setItem=function(i,a){try{window.localStorage.setItem(this.getStoreKey(i),a)}catch(s){}},d.prototype.setSessionItem=function(i,a){try{window.sessionStorage.setItem(this.getStoreKey(i),a)}catch(s){}},d.prototype.getSessionItem=function(i){try{return window.sessionStorage.getItem(this.getStoreKey(i))}catch(a){return""}},d.prototype.getStoreKey=function(i){return b+this.appkey+"_"+i},d.prototype.createDeviceId=function(){try{var i=window.localStorage.getItem(q);return i||(i=function(a){for(var s="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz0123456789",p="",R=0;R<a;R++)p+=s.charAt(Math.floor(Math.random()*s.length));return p}(32),window.localStorage.setItem(q,i)),i}catch(a){return""}},d.prototype.clear=function(){try{for(var i=window.localStorage.length,a=0;a<i;a++){var s=window.localStorage.key(a);(s==null?void 0:s.substr(0,9))==b&&window.localStorage.removeItem(s)}}catch(p){}},d.prototype.getStoreCount=function(){var i=0;try{i=window.localStorage.length}catch(a){}return i},d}(),x="logid_start",I="4.5.14-web";return function(d){function i(a){var s=d.call(this,a)||this;s.qimei36="",s.uselessCycleTaskNum=0,s.underWeakNet=!1,s.pauseSearching=!1,s.send=function(G,ae,Ce){s.storage.setItem(L,Date.now().toString()),s.network.post(s.uploadUrl||s.strategy.getUploadUrl(),G.data).then(function(W){var Oe;((Oe=W==null?void 0:W.data)===null||Oe===void 0?void 0:Oe.result)==100?s.delayTime=1e3*W.data.delayTime:s.delayTime=0,ae&&ae(G.data),G.data.events.forEach(function(ke){s.store.removeEvent(ke).then(function(){s.removeSendingId(A(ke.mapValue))})}),s.doCustomCycleTask()}).catch(function(W){var Oe=G.data.events;s.errorReport.reportError(W.code?W.code.toString():"600",W.message),Ce&&Ce(G.data);var ke=JSON.parse(s.storage.getItem(z));Oe.forEach(function(Ie){ke&&ke.indexOf(A(Ie))!=-1&&s.store.insertEvent(Ie,function(Pe,Me){Pe&&s.errorReport.reportError("604","insertEvent fail!")}),s.removeSendingId(A(Ie))}),s.monitorUploadFailed()})};var p,R,O=F();return s.isUnderIE8=O>0&&O<8,s.isUnderIE8||(s.isUnderIE=O>0,a.needInitQimei&&$(a.appkey,function(G){s.qimei36=G.q36}),s.network=new Ae(a),s.storage=new V(a.appkey),s.initCommonInfo(a),s.store=new re(a.appkey,s.storage),s.errorReport=new K(s.config,s.commonInfo,"web",s.network),s.strategy=new g(a.needQueryConfig==null||a.needQueryConfig,s.config,s.commonInfo,s.storage,s.network),s.logidStartTime=s.storage.getItem(x),s.logidStartTime||(s.logidStartTime=Date.now().toString(),s.storage.setItem(x,s.logidStartTime)),p=s.logidStartTime,R=Date.now()-Number.parseFloat(p),Math.floor(R/864e5)>=365&&s.storage.clear(),s.initSession(a),s.onDirectUserAction("rqd_js_init",{}),setTimeout(function(){return s.lifeCycle.emit("init")},0),s.initDelayTime=a.delay?a.delay:1e3,s.cycleTask(s.initDelayTime)),s}return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function p(){this.constructor=a}k(a,s),a.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}(i,d),i.prototype.initSession=function(a){var s=18e5;a.sessionDuration&&a.sessionDuration>3e4&&(s=a.sessionDuration),this.beaconSession=new U(this.storage,s,this)},i.prototype.initCommonInfo=function(a){var s=Number(this.storage.getItem(L));try{var p=JSON.parse(this.storage.getItem(z));(Date.now()-s>3e4||!p)&&this.storage.setItem(z,JSON.stringify([]))}catch(O){}a.uploadUrl&&(this.uploadUrl=a.uploadUrl+"?appkey="+a.appkey);var R=[window.screen.width,window.screen.height];window.devicePixelRatio&&R.push(window.devicePixelRatio),this.commonInfo={deviceId:this.storage.createDeviceId(),language:navigator&&navigator.language||"zh_CN",query:window.location.search,userAgent:navigator.userAgent,pixel:R.join("*"),channelID:a.channelID?String(a.channelID):"",openid:a.openid?String(a.openid):"",unid:a.unionid?String(a.unionid):"",sdkVersion:I},this.config.appVersion=a.versionCode?String(a.versionCode):"",this.config.strictMode=a.strictMode},i.prototype.cycleTask=function(a){var s=this;this.intervalID=window.setInterval(function(){s.pauseSearching||s.store.getEvents().then(function(p){p.length==0&&(s.pauseSearching=!0);var R=[],O=JSON.parse(s.storage.getItem(z));O||(O=[]),p&&p.forEach(function(G){var ae=A(G.mapValue);O.indexOf(ae)==-1&&(R.push(G),O.push(ae))}),R.length!=0&&(s.storage.setItem(z,JSON.stringify(O)),s._normalLogPipeline(s.assembleData(R)))}).catch(function(p){})},a)},i.prototype.onReport=function(a,s,p){var R=this;if(this.isUnderIE8)this.errorReport.reportError("601","UnderIE8");else{this.pauseSearching=!1;var O=this.generateData(a,s,p);if(p&&this.delayTime==0&&!this.underWeakNet)this._normalLogPipeline(this.assembleData(O));else{var G=O.shift();G&&this.store.insertEvent(G,function(ae){ae&&R.errorReport.reportError("604","insertEvent fail!")}).catch(function(ae){R._normalLogPipeline(R.assembleData(O))})}}},i.prototype.onSendBeacon=function(a,s){if(this.isUnderIE)this.errorReport.reportError("605","UnderIE");else{this.pauseSearching=!1;var p=this.assembleData(this.generateData(a,s,!0));typeof navigator.sendBeacon=="function"&&navigator.sendBeacon(this.uploadUrl||this.strategy.getUploadUrl(),JSON.stringify(p))}},i.prototype.generateData=function(a,s,p){var R=[],O="4.5.14-web_"+(p?"direct_log_id":"normal_log_id"),G=Number(this.storage.getItem(O));return G=G||1,s=P(P({},s),{A99:p?"Y":"N",A100:G.toString(),A72:I,A88:this.logidStartTime}),G++,this.storage.setItem(O,G.toString()),R.push({eventCode:a,eventTime:Date.now().toString(),mapValue:M(s,this.config.strictMode)}),R},i.prototype.assembleData=function(a){var s=this.beaconSession.getSession();return{appVersion:this.config.appVersion?ge(this.config.appVersion):"",sdkId:"js",sdkVersion:I,mainAppKey:this.config.appkey,platformId:3,common:M(P(P({},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:s.sessionId,A101:this.commonInfo.userAgent,A102:window.location.href,A104:document.referrer,A119:this.commonInfo.query,A153:this.qimei36}),!1),events:a}},i.prototype.monitorUploadFailed=function(){this.uselessCycleTaskNum++,this.uselessCycleTaskNum>=5&&(window.clearInterval(this.intervalID),this.cycleTask(6e4),this.underWeakNet=!0)},i.prototype.doCustomCycleTask=function(){this.uselessCycleTaskNum>=5&&(window.clearInterval(this.intervalID),this.cycleTask(this.initDelayTime)),this.uselessCycleTaskNum=0,this.underWeakNet=!1},i}(m)})},"./lib/crypto.js":function(y,C,u){(function(v){var T=u("./node_modules/@babel/runtime/helpers/typeof.js"),l=l||function(k,P){var ee={},B=ee.lib={},b=function(){},q=B.Base={extend:function(S){b.prototype=this;var m=new b;return S&&m.mixIn(S),m.hasOwnProperty("init")||(m.init=function(){m.$super.init.apply(this,arguments)}),m.init.prototype=m,m.$super=this,m},create:function(){var S=this.extend();return S.init.apply(S,arguments),S},init:function(){},mixIn:function(S){for(var m in S)S.hasOwnProperty(m)&&(this[m]=S[m]);S.hasOwnProperty("toString")&&(this.toString=S.toString)},clone:function(){return this.init.prototype.extend(this)}},L=B.WordArray=q.extend({init:function(S,m){S=this.words=S||[],this.sigBytes=m!=P?m:4*S.length},toString:function(S){return(S||_).stringify(this)},concat:function(S){var m=this.words,K=S.words,g=this.sigBytes;if(S=S.sigBytes,this.clamp(),g%4)for(var D=0;D<S;D++)m[g+D>>>2]|=(K[D>>>2]>>>24-8*(D%4)&255)<<24-8*((g+D)%4);else if(65535<K.length)for(D=0;D<S;D+=4)m[g+D>>>2]=K[D>>>2];else m.push.apply(m,K);return this.sigBytes+=S,this},clamp:function(){var S=this.words,m=this.sigBytes;S[m>>>2]&=4294967295<<32-8*(m%4),S.length=k.ceil(m/4)},clone:function(){var S=q.clone.call(this);return S.words=this.words.slice(0),S},random:function(S){for(var m=[],K=0;K<S;K+=4)m.push(4294967296*k.random()|0);return new L.init(m,S)}}),z=ee.enc={},_=z.Hex={stringify:function(S){var m=S.words;S=S.sigBytes;for(var K=[],g=0;g<S;g++){var D=m[g>>>2]>>>24-8*(g%4)&255;K.push((D>>>4).toString(16)),K.push((D&15).toString(16))}return K.join("")},parse:function(S){for(var m=S.length,K=[],g=0;g<m;g+=2)K[g>>>3]|=parseInt(S.substr(g,2),16)<<24-4*(g%8);return new L.init(K,m/2)}},j=z.Latin1={stringify:function(S){var m=S.words;S=S.sigBytes;for(var K=[],g=0;g<S;g++)K.push(String.fromCharCode(m[g>>>2]>>>24-8*(g%4)&255));return K.join("")},parse:function(S){for(var m=S.length,K=[],g=0;g<m;g++)K[g>>>2]|=(S.charCodeAt(g)&255)<<24-8*(g%4);return new L.init(K,m)}},Q=z.Utf8={stringify:function(S){try{return decodeURIComponent(escape(j.stringify(S)))}catch(m){throw Error("Malformed UTF-8 data")}},parse:function(S){return j.parse(unescape(encodeURIComponent(S)))}},M=B.BufferedBlockAlgorithm=q.extend({reset:function(){this._data=new L.init,this._nDataBytes=0},_append:function(S){typeof S=="string"&&(S=Q.parse(S)),this._data.concat(S),this._nDataBytes+=S.sigBytes},_process:function(S){var m=this._data,K=m.words,g=m.sigBytes,D=this.blockSize,U=g/(4*D),U=S?k.ceil(U):k.max((U|0)-this._minBufferSize,0);if(S=U*D,g=k.min(4*S,g),S){for(var F=0;F<S;F+=D)this._doProcessBlock(K,F);F=K.splice(0,S),m.sigBytes-=g}return new L.init(F,g)},clone:function(){var S=q.clone.call(this);return S._data=this._data.clone(),S},_minBufferSize:0});B.Hasher=M.extend({cfg:q.extend(),init:function(S){this.cfg=this.cfg.extend(S),this.reset()},reset:function(){M.reset.call(this),this._doReset()},update:function(S){return this._append(S),this._process(),this},finalize:function(S){return S&&this._append(S),this._doFinalize()},blockSize:16,_createHelper:function(S){return function(m,K){return new S.init(K).finalize(m)}},_createHmacHelper:function(S){return function(m,K){return new ge.HMAC.init(S,K).finalize(m)}}});var ge=ee.algo={};return ee}(Math);(function(){var k=l,P=k.lib,ee=P.WordArray,B=P.Hasher,b=[],P=k.algo.SHA1=B.extend({_doReset:function(){this._hash=new ee.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(L,z){for(var _=this._hash.words,j=_[0],Q=_[1],M=_[2],ge=_[3],A=_[4],S=0;80>S;S++){if(16>S)b[S]=L[z+S]|0;else{var m=b[S-3]^b[S-8]^b[S-14]^b[S-16];b[S]=m<<1|m>>>31}m=(j<<5|j>>>27)+A+b[S],m=20>S?m+((Q&M|~Q&ge)+1518500249):40>S?m+((Q^M^ge)+1859775393):60>S?m+((Q&M|Q&ge|M&ge)-1894007588):m+((Q^M^ge)-899497514),A=ge,ge=M,M=Q<<30|Q>>>2,Q=j,j=m}_[0]=_[0]+j|0,_[1]=_[1]+Q|0,_[2]=_[2]+M|0,_[3]=_[3]+ge|0,_[4]=_[4]+A|0},_doFinalize:function(){var L=this._data,z=L.words,_=8*this._nDataBytes,j=8*L.sigBytes;return z[j>>>5]|=128<<24-j%32,z[(j+64>>>9<<4)+14]=Math.floor(_/4294967296),z[(j+64>>>9<<4)+15]=_,L.sigBytes=4*z.length,this._process(),this._hash},clone:function(){var L=B.clone.call(this);return L._hash=this._hash.clone(),L}});k.SHA1=B._createHelper(P),k.HmacSHA1=B._createHmacHelper(P)})(),function(){var k=l,P=k.enc.Utf8;k.algo.HMAC=k.lib.Base.extend({init:function(B,b){B=this._hasher=new B.init,typeof b=="string"&&(b=P.parse(b));var q=B.blockSize,L=4*q;b.sigBytes>L&&(b=B.finalize(b)),b.clamp();for(var z=this._oKey=b.clone(),_=this._iKey=b.clone(),j=z.words,Q=_.words,M=0;M<q;M++)j[M]^=1549556828,Q[M]^=909522486;z.sigBytes=_.sigBytes=L,this.reset()},reset:function(){var B=this._hasher;B.reset(),B.update(this._iKey)},update:function(B){return this._hasher.update(B),this},finalize:function(B){var b=this._hasher;return B=b.finalize(B),b.reset(),b.finalize(this._oKey.clone().concat(B))}})}(),function(){var k=l,P=k.lib,ee=P.WordArray,B=k.enc,b=B.Base64={stringify:function(L){var z=L.words,_=L.sigBytes,j=this._map;L.clamp();for(var Q=[],M=0;M<_;M+=3)for(var ge=z[M>>>2]>>>24-M%4*8&255,A=z[M+1>>>2]>>>24-(M+1)%4*8&255,S=z[M+2>>>2]>>>24-(M+2)%4*8&255,m=ge<<16|A<<8|S,K=0;K<4&&M+K*.75<_;K++)Q.push(j.charAt(m>>>6*(3-K)&63));var g=j.charAt(64);if(g)for(;Q.length%4;)Q.push(g);return Q.join("")},parse:function(L){var z=L.length,_=this._map,j=_.charAt(64);if(j){var Q=L.indexOf(j);Q!=-1&&(z=Q)}for(var M=[],ge=0,A=0;A<z;A++)if(A%4){var S=_.indexOf(L.charAt(A-1))<<A%4*2,m=_.indexOf(L.charAt(A))>>>6-A%4*2;M[ge>>>2]|=(S|m)<<24-ge%4*8,ge++}return ee.create(M,ge)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),T(v)==="object"?v.exports=l:window.CryptoJS=l}).call(this,u("./node_modules/webpack/buildin/module.js")(y))},"./lib/json2xml.js":function(y,C,u){var v=u("./node_modules/@babel/runtime/helpers/typeof.js"),T="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",l="-.0-9\xB7\u0300-\u036F\u203F\u2040",k=new RegExp("^([^"+T+"])|^((x|X)(m|M)(l|L))|([^"+T+l+"])","g"),P=/[^\x09\x0A\x0D\x20-\xFF\x85\xA0-\uD7FF\uE000-\uFDCF\uFDE0-\uFFFD]/gm,ee=function(z){var _=[];if(z instanceof Object)for(var j in z)z.hasOwnProperty(j)&&_.push(j);return _},B=function(z,_){var j=function(M,ge,A,S,m){var K=_.indent!==void 0?_.indent:" ",g=_.prettyPrint?`
  2. `+new Array(S).join(K):"";_.removeIllegalNameCharacters&&(M=M.replace(k,"_"));var D=[g,"<",M,A||""];return ge&&ge.length>0?(D.push(">"),D.push(ge),m&&D.push(g),D.push("</"),D.push(M),D.push(">")):D.push("/>"),D.join("")};return function Q(M,ge,A){var S=v(M);switch((Array.isArray?Array.isArray(M):M instanceof Array)?S="array":M instanceof Date&&(S="date"),S){case"array":var m=[];return M.map(function(U){m.push(Q(U,1,A+1))}),_.prettyPrint&&m.push(`
  3. `),m.join("");break;case"date":return M.toJSON?M.toJSON():M+"";case"object":var K=[];for(var g in M)if(M.hasOwnProperty(g))if(M[g]instanceof Array)for(var D=0;D<M[g].length;D++)M[g].hasOwnProperty(D)&&K.push(j(g,Q(M[g][D],0,A+1),null,A+1,ee(M[g][D]).length));else K.push(j(g,Q(M[g],0,A+1),null,A+1));return _.prettyPrint&&K.length>0&&K.push(`
  4. `),K.join("");break;case"function":return M();default:return _.escape?q(M):""+M}}(z,0,0)},b=function(z){var _=['<?xml version="1.0" encoding="UTF-8"'];return z&&_.push(' standalone="yes"'),_.push("?>"),_.join("")};function q(L){return(""+L).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&apos;").replace(/"/g,"&quot;").replace(P,"")}y.exports=function(L,z){if(z||(z={xmlHeader:{standalone:!0},prettyPrint:!0,indent:" ",escape:!0}),typeof L=="string")try{L=JSON.parse(L.toString())}catch(M){return!1}var _="",j="";z&&(v(z)=="object"?(z.xmlHeader&&(_=b(!!z.xmlHeader.standalone)),typeof z.docType!="undefined"&&(j="<!DOCTYPE "+z.docType+">")):_=b()),z=z||{};var Q=[_,z.prettyPrint&&j?`
  5. `:"",j,B(L,z)];return Q.join("").replace(/\n{2,}/g,`
  6. `).replace(/\s+$/g,"")}},"./lib/md5.js":function(module,exports,__nested_webpack_require_69768__){(function(process,global,module){var __WEBPACK_AMD_DEFINE_RESULT__,_typeof=__nested_webpack_require_69768__("./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_69768__("./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(y){return Object.prototype.toString.call(y)==="[object Array]"}),ARRAY_BUFFER&&(root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(y){return _typeof(y)==="object"&&y.buffer&&y.buffer.constructor===ArrayBuffer});var createOutputMethod=function(C){return function(u,v){return new Md5(!0).update(u,v)[C]()}},createMethod=function(){var C=createOutputMethod("hex");NODE_JS&&(C=nodeWrap(C)),C.getCtx=C.create=function(){return new Md5},C.update=function(T){return C.create().update(T)};for(var u=0;u<OUTPUT_TYPES.length;++u){var v=OUTPUT_TYPES[u];C[v]=createOutputMethod(v)}return C},nodeWrap=function(method){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),nodeMethod=function(C){if(typeof C=="string")return crypto.createHash("md5").update(C,"utf8").digest("hex");if(C==null)throw ERROR;return C.constructor===ArrayBuffer&&(C=new Uint8Array(C)),Array.isArray(C)||ArrayBuffer.isView(C)||C.constructor===Buffer?crypto.createHash("md5").update(new Buffer(C)).digest("hex"):method(C)};return nodeMethod};function Md5(y){if(y)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 C=new ArrayBuffer(68);this.buffer8=new Uint8Array(C),this.blocks=new Uint32Array(C)}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(y,C){if(!this.finalized){for(var u,v=0,T,l=y.length,k=this.blocks,P=this.buffer8;v<l;){if(this.hashed&&(this.hashed=!1,k[0]=k[16],k[16]=k[1]=k[2]=k[3]=k[4]=k[5]=k[6]=k[7]=k[8]=k[9]=k[10]=k[11]=k[12]=k[13]=k[14]=k[15]=0),ARRAY_BUFFER)for(T=this.start;v<l&&T<64;++v)u=y.charCodeAt(v),C||u<128?P[T++]=u:u<2048?(P[T++]=192|u>>6,P[T++]=128|u&63):u<55296||u>=57344?(P[T++]=224|u>>12,P[T++]=128|u>>6&63,P[T++]=128|u&63):(u=65536+((u&1023)<<10|y.charCodeAt(++v)&1023),P[T++]=240|u>>18,P[T++]=128|u>>12&63,P[T++]=128|u>>6&63,P[T++]=128|u&63);else for(T=this.start;v<l&&T<64;++v)u=y.charCodeAt(v),C||u<128?k[T>>2]|=u<<SHIFT[T++&3]:u<2048?(k[T>>2]|=(192|u>>6)<<SHIFT[T++&3],k[T>>2]|=(128|u&63)<<SHIFT[T++&3]):u<55296||u>=57344?(k[T>>2]|=(224|u>>12)<<SHIFT[T++&3],k[T>>2]|=(128|u>>6&63)<<SHIFT[T++&3],k[T>>2]|=(128|u&63)<<SHIFT[T++&3]):(u=65536+((u&1023)<<10|y.charCodeAt(++v)&1023),k[T>>2]|=(240|u>>18)<<SHIFT[T++&3],k[T>>2]|=(128|u>>12&63)<<SHIFT[T++&3],k[T>>2]|=(128|u>>6&63)<<SHIFT[T++&3],k[T>>2]|=(128|u&63)<<SHIFT[T++&3]);this.lastByteIndex=T,this.bytes+=T-this.start,T>=64?(this.start=T-64,this.hash(),this.hashed=!0):this.start=T}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 y=this.blocks,C=this.lastByteIndex;y[C>>2]|=EXTRA[C&3],C>=56&&(this.hashed||this.hash(),y[0]=y[16],y[16]=y[1]=y[2]=y[3]=y[4]=y[5]=y[6]=y[7]=y[8]=y[9]=y[10]=y[11]=y[12]=y[13]=y[14]=y[15]=0),y[14]=this.bytes<<3,y[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},Md5.prototype.hash=function(){var y,C,u,v,T,l,k=this.blocks;this.first?(y=k[0]-680876937,y=(y<<7|y>>>25)-271733879<<0,v=(-1732584194^y&2004318071)+k[1]-117830708,v=(v<<12|v>>>20)+y<<0,u=(-271733879^v&(y^-271733879))+k[2]-1126478375,u=(u<<17|u>>>15)+v<<0,C=(y^u&(v^y))+k[3]-1316259209,C=(C<<22|C>>>10)+u<<0):(y=this.h0,C=this.h1,u=this.h2,v=this.h3,y+=(v^C&(u^v))+k[0]-680876936,y=(y<<7|y>>>25)+C<<0,v+=(u^y&(C^u))+k[1]-389564586,v=(v<<12|v>>>20)+y<<0,u+=(C^v&(y^C))+k[2]+606105819,u=(u<<17|u>>>15)+v<<0,C+=(y^u&(v^y))+k[3]-1044525330,C=(C<<22|C>>>10)+u<<0),y+=(v^C&(u^v))+k[4]-176418897,y=(y<<7|y>>>25)+C<<0,v+=(u^y&(C^u))+k[5]+1200080426,v=(v<<12|v>>>20)+y<<0,u+=(C^v&(y^C))+k[6]-1473231341,u=(u<<17|u>>>15)+v<<0,C+=(y^u&(v^y))+k[7]-45705983,C=(C<<22|C>>>10)+u<<0,y+=(v^C&(u^v))+k[8]+1770035416,y=(y<<7|y>>>25)+C<<0,v+=(u^y&(C^u))+k[9]-1958414417,v=(v<<12|v>>>20)+y<<0,u+=(C^v&(y^C))+k[10]-42063,u=(u<<17|u>>>15)+v<<0,C+=(y^u&(v^y))+k[11]-1990404162,C=(C<<22|C>>>10)+u<<0,y+=(v^C&(u^v))+k[12]+1804603682,y=(y<<7|y>>>25)+C<<0,v+=(u^y&(C^u))+k[13]-40341101,v=(v<<12|v>>>20)+y<<0,u+=(C^v&(y^C))+k[14]-1502002290,u=(u<<17|u>>>15)+v<<0,C+=(y^u&(v^y))+k[15]+1236535329,C=(C<<22|C>>>10)+u<<0,y+=(u^v&(C^u))+k[1]-165796510,y=(y<<5|y>>>27)+C<<0,v+=(C^u&(y^C))+k[6]-1069501632,v=(v<<9|v>>>23)+y<<0,u+=(y^C&(v^y))+k[11]+643717713,u=(u<<14|u>>>18)+v<<0,C+=(v^y&(u^v))+k[0]-373897302,C=(C<<20|C>>>12)+u<<0,y+=(u^v&(C^u))+k[5]-701558691,y=(y<<5|y>>>27)+C<<0,v+=(C^u&(y^C))+k[10]+38016083,v=(v<<9|v>>>23)+y<<0,u+=(y^C&(v^y))+k[15]-660478335,u=(u<<14|u>>>18)+v<<0,C+=(v^y&(u^v))+k[4]-405537848,C=(C<<20|C>>>12)+u<<0,y+=(u^v&(C^u))+k[9]+568446438,y=(y<<5|y>>>27)+C<<0,v+=(C^u&(y^C))+k[14]-1019803690,v=(v<<9|v>>>23)+y<<0,u+=(y^C&(v^y))+k[3]-187363961,u=(u<<14|u>>>18)+v<<0,C+=(v^y&(u^v))+k[8]+1163531501,C=(C<<20|C>>>12)+u<<0,y+=(u^v&(C^u))+k[13]-1444681467,y=(y<<5|y>>>27)+C<<0,v+=(C^u&(y^C))+k[2]-51403784,v=(v<<9|v>>>23)+y<<0,u+=(y^C&(v^y))+k[7]+1735328473,u=(u<<14|u>>>18)+v<<0,C+=(v^y&(u^v))+k[12]-1926607734,C=(C<<20|C>>>12)+u<<0,T=C^u,y+=(T^v)+k[5]-378558,y=(y<<4|y>>>28)+C<<0,v+=(T^y)+k[8]-2022574463,v=(v<<11|v>>>21)+y<<0,l=v^y,u+=(l^C)+k[11]+1839030562,u=(u<<16|u>>>16)+v<<0,C+=(l^u)+k[14]-35309556,C=(C<<23|C>>>9)+u<<0,T=C^u,y+=(T^v)+k[1]-1530992060,y=(y<<4|y>>>28)+C<<0,v+=(T^y)+k[4]+1272893353,v=(v<<11|v>>>21)+y<<0,l=v^y,u+=(l^C)+k[7]-155497632,u=(u<<16|u>>>16)+v<<0,C+=(l^u)+k[10]-1094730640,C=(C<<23|C>>>9)+u<<0,T=C^u,y+=(T^v)+k[13]+681279174,y=(y<<4|y>>>28)+C<<0,v+=(T^y)+k[0]-358537222,v=(v<<11|v>>>21)+y<<0,l=v^y,u+=(l^C)+k[3]-722521979,u=(u<<16|u>>>16)+v<<0,C+=(l^u)+k[6]+76029189,C=(C<<23|C>>>9)+u<<0,T=C^u,y+=(T^v)+k[9]-640364487,y=(y<<4|y>>>28)+C<<0,v+=(T^y)+k[12]-421815835,v=(v<<11|v>>>21)+y<<0,l=v^y,u+=(l^C)+k[15]+530742520,u=(u<<16|u>>>16)+v<<0,C+=(l^u)+k[2]-995338651,C=(C<<23|C>>>9)+u<<0,y+=(u^(C|~v))+k[0]-198630844,y=(y<<6|y>>>26)+C<<0,v+=(C^(y|~u))+k[7]+1126891415,v=(v<<10|v>>>22)+y<<0,u+=(y^(v|~C))+k[14]-1416354905,u=(u<<15|u>>>17)+v<<0,C+=(v^(u|~y))+k[5]-57434055,C=(C<<21|C>>>11)+u<<0,y+=(u^(C|~v))+k[12]+1700485571,y=(y<<6|y>>>26)+C<<0,v+=(C^(y|~u))+k[3]-1894986606,v=(v<<10|v>>>22)+y<<0,u+=(y^(v|~C))+k[10]-1051523,u=(u<<15|u>>>17)+v<<0,C+=(v^(u|~y))+k[1]-2054922799,C=(C<<21|C>>>11)+u<<0,y+=(u^(C|~v))+k[8]+1873313359,y=(y<<6|y>>>26)+C<<0,v+=(C^(y|~u))+k[15]-30611744,v=(v<<10|v>>>22)+y<<0,u+=(y^(v|~C))+k[6]-1560198380,u=(u<<15|u>>>17)+v<<0,C+=(v^(u|~y))+k[13]+1309151649,C=(C<<21|C>>>11)+u<<0,y+=(u^(C|~v))+k[4]-145523070,y=(y<<6|y>>>26)+C<<0,v+=(C^(y|~u))+k[11]-1120210379,v=(v<<10|v>>>22)+y<<0,u+=(y^(v|~C))+k[2]+718787259,u=(u<<15|u>>>17)+v<<0,C+=(v^(u|~y))+k[9]-343485551,C=(C<<21|C>>>11)+u<<0,this.first?(this.h0=y+1732584193<<0,this.h1=C-271733879<<0,this.h2=u-1732584194<<0,this.h3=v+271733878<<0,this.first=!1):(this.h0=this.h0+y<<0,this.h1=this.h1+C<<0,this.h2=this.h2+u<<0,this.h3=this.h3+v<<0)},Md5.prototype.hex=function(){this.finalize();var y=this.h0,C=this.h1,u=this.h2,v=this.h3;return HEX_CHARS[y>>4&15]+HEX_CHARS[y&15]+HEX_CHARS[y>>12&15]+HEX_CHARS[y>>8&15]+HEX_CHARS[y>>20&15]+HEX_CHARS[y>>16&15]+HEX_CHARS[y>>28&15]+HEX_CHARS[y>>24&15]+HEX_CHARS[C>>4&15]+HEX_CHARS[C&15]+HEX_CHARS[C>>12&15]+HEX_CHARS[C>>8&15]+HEX_CHARS[C>>20&15]+HEX_CHARS[C>>16&15]+HEX_CHARS[C>>28&15]+HEX_CHARS[C>>24&15]+HEX_CHARS[u>>4&15]+HEX_CHARS[u&15]+HEX_CHARS[u>>12&15]+HEX_CHARS[u>>8&15]+HEX_CHARS[u>>20&15]+HEX_CHARS[u>>16&15]+HEX_CHARS[u>>28&15]+HEX_CHARS[u>>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(y){if(y==="hex")return this.hex();this.finalize();var C=this.h0,u=this.h1,v=this.h2,T=this.h3,l=[C&255,C>>8&255,C>>16&255,C>>24&255,u&255,u>>8&255,u>>16&255,u>>24&255,v&255,v>>8&255,v>>16&255,v>>24&255,T&255,T>>8&255,T>>16&255,T>>24&255];return l},Md5.prototype.array=Md5.prototype.digest,Md5.prototype.arrayBuffer=function(){this.finalize();var y=new ArrayBuffer(16),C=new Uint32Array(y);return C[0]=this.h0,C[1]=this.h1,C[2]=this.h2,C[3]=this.h3,y},Md5.prototype.buffer=Md5.prototype.arrayBuffer,Md5.prototype.base64=function(){for(var y,C,u,v="",T=this.array(),l=0;l<15;)y=T[l++],C=T[l++],u=T[l++],v+=BASE64_ENCODE_CHAR[y>>>2]+BASE64_ENCODE_CHAR[(y<<4|C>>>4)&63]+BASE64_ENCODE_CHAR[(C<<2|u>>>6)&63]+BASE64_ENCODE_CHAR[u&63];return y=T[l],v+=BASE64_ENCODE_CHAR[y>>>2]+BASE64_ENCODE_CHAR[y<<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_69768__,exports,module),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()}).call(this,__nested_webpack_require_69768__("./node_modules/process/browser.js"),__nested_webpack_require_69768__("./node_modules/webpack/buildin/global.js"),__nested_webpack_require_69768__("./node_modules/webpack/buildin/module.js")(module))},"./lib/request.js":function(y,C,u){var v=u("./node_modules/@babel/runtime/helpers/typeof.js"),T=function(b){switch(v(b)){case"string":return b;case"boolean":return b?"true":"false";case"number":return isFinite(b)?b:"";default:return""}},l=function(b,q,L,z){return q=q||"&",L=L||"=",b===null&&(b=void 0),v(b)==="object"?Object.keys(b).map(function(_){var j=encodeURIComponent(T(_))+L;return Array.isArray(b[_])?b[_].map(function(Q){return j+encodeURIComponent(T(Q))}).join(q):j+encodeURIComponent(T(b[_]))}).filter(Boolean).join(q):z?encodeURIComponent(T(z))+L+encodeURIComponent(T(b)):""},k=function(b,q,L){var z={};return q.getAllResponseHeaders().trim().split(`
  7. `).forEach(function(_){if(_){var j=_.indexOf(":"),Q=_.substr(0,j).trim().toLowerCase(),M=_.substr(j+1).trim();z[Q]=M}}),{error:b,statusCode:q.status,statusMessage:q.statusText,headers:z,body:L}},P=function(b,q){return!q&&q==="text"?b.responseText:b.response},ee=function(b,q){var L=(b.method||"GET").toUpperCase(),z=b.url;if(b.qs){var _=l(b.qs);_&&(z+=(z.indexOf("?")===-1?"?":"&")+_)}var j=new XMLHttpRequest;if(j.open(L,z,!0),j.responseType=b.dataType||"text",b.xhrFields)for(var Q in b.xhrFields)j[Q]=b.xhrFields[Q];var M=b.headers;if(M)for(var ge in M)M.hasOwnProperty(ge)&&ge.toLowerCase()!=="content-length"&&ge.toLowerCase()!=="user-agent"&&ge.toLowerCase()!=="origin"&&ge.toLowerCase()!=="host"&&j.setRequestHeader(ge,M[ge]);return b.onProgress&&j.upload&&(j.upload.onprogress=b.onProgress),b.onDownloadProgress&&(j.onprogress=b.onDownloadProgress),b.timeout&&(j.timeout=b.timeout),j.ontimeout=function(A){var S=new Error("timeout");q(k(S,j))},j.onload=function(){q(k(null,j,P(j,b.dataType)))},j.onerror=function(A){var S=P(j,b.dataType);if(S)q(k(null,j,S));else{var m=j.statusText;!m&&j.status===0&&(m=new Error("CORS blocked or network error")),q(k(m,j,S))}},j.send(b.body||""),j};y.exports=ee},"./lib/xml2json.js":function(y,C,u){var v=u("./node_modules/@xmldom/xmldom/lib/index.js").DOMParser,T=function(){this.version="1.3.5";var k={mergeCDATA:!0,normalize:!0,stripElemPrefix:!0},P=new RegExp(/(?!xmlns)^.*:/),ee=new RegExp(/^\s+|\s+$/g);return this.grokType=function(B){return/^\s*$/.test(B)?null:/^(?:true|false)$/i.test(B)?B.toLowerCase()==="true":isFinite(B)?parseFloat(B):B},this.parseString=function(B,b){if(B){var q=this.stringToXML(B);return q.getElementsByTagName("parsererror").length?null:this.parseXML(q,b)}else return null},this.parseXML=function(B,b){for(var q in b)k[q]=b[q];var L={},z=0,_="",j=B.childNodes.length;if(j)for(var Q,M,ge,A=0;A<B.childNodes.length;A++)Q=B.childNodes.item(A),Q.nodeType===4?k.mergeCDATA&&(_+=Q.nodeValue):Q.nodeType===3?_+=Q.nodeValue:Q.nodeType===1&&(z===0&&(L={}),k.stripElemPrefix?M=Q.nodeName.replace(P,""):M=Q.nodeName,ge=T.parseXML(Q),L.hasOwnProperty(M)?(L[M].constructor!==Array&&(L[M]=[L[M]]),L[M].push(ge)):(L[M]=ge,z++));return Object.keys(L).length||(L=_||""),L},this.xmlToString=function(B){try{var b=B.xml?B.xml:new XMLSerializer().serializeToString(B);return b}catch(q){return null}},this.stringToXML=function(B){try{var b=null;if(window.DOMParser){var q=new v;return b=q.parseFromString(B,"text/xml"),b}else return b=new ActiveXObject("Microsoft.XMLDOM"),b.async=!1,b.loadXML(B),b}catch(L){return null}},this}.call({}),l=function(P){return T.parseString(P)};y.exports=l},"./node_modules/@babel/runtime/helpers/classCallCheck.js":function(y,C){function u(v,T){if(!(v instanceof T))throw new TypeError("Cannot call a class as a function")}y.exports=u,y.exports.__esModule=!0,y.exports.default=y.exports},"./node_modules/@babel/runtime/helpers/createClass.js":function(y,C){function u(T,l){for(var k=0;k<l.length;k++){var P=l[k];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(T,P.key,P)}}function v(T,l,k){return l&&u(T.prototype,l),k&&u(T,k),Object.defineProperty(T,"prototype",{writable:!1}),T}y.exports=v,y.exports.__esModule=!0,y.exports.default=y.exports},"./node_modules/@babel/runtime/helpers/typeof.js":function(y,C){function u(v){return y.exports=u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(T){return typeof T}:function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},y.exports.__esModule=!0,y.exports.default=y.exports,u(v)}y.exports=u,y.exports.__esModule=!0,y.exports.default=y.exports},"./node_modules/@xmldom/xmldom/lib/conventions.js":function(y,C,u){"use strict";function v(ee,B,b){if(b===void 0&&(b=Array.prototype),ee&&typeof b.find=="function")return b.find.call(ee,B);for(var q=0;q<ee.length;q++)if(Object.prototype.hasOwnProperty.call(ee,q)){var L=ee[q];if(B.call(void 0,L,q,ee))return L}}function T(ee,B){return B===void 0&&(B=Object),B&&typeof B.freeze=="function"?B.freeze(ee):ee}function l(ee,B){if(ee===null||typeof ee!="object")throw new TypeError("target is not an object");for(var b in B)Object.prototype.hasOwnProperty.call(B,b)&&(ee[b]=B[b]);return ee}var k=T({HTML:"text/html",isHTML:function(ee){return ee===k.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),P=T({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(ee){return ee===P.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});C.assign=l,C.find=v,C.freeze=T,C.MIME_TYPE=k,C.NAMESPACE=P},"./node_modules/@xmldom/xmldom/lib/dom-parser.js":function(y,C,u){var v=u("./node_modules/@xmldom/xmldom/lib/conventions.js"),T=u("./node_modules/@xmldom/xmldom/lib/dom.js"),l=u("./node_modules/@xmldom/xmldom/lib/entities.js"),k=u("./node_modules/@xmldom/xmldom/lib/sax.js"),P=T.DOMImplementation,ee=v.NAMESPACE,B=k.ParseError,b=k.XMLReader;function q(A){return A.replace(/\r[\n\u0085]/g,`
  8. `).replace(/[\r\u0085\u2028]/g,`
  9. `)}function L(A){this.options=A||{locator:{}}}L.prototype.parseFromString=function(A,S){var m=this.options,K=new b,g=m.domBuilder||new _,D=m.errorHandler,U=m.locator,F=m.xmlns||{},$=/\/x?html?$/.test(S),w=$?l.HTML_ENTITIES:l.XML_ENTITIES;U&&g.setDocumentLocator(U),K.errorHandler=z(D,g,U),K.domBuilder=m.domBuilder||g,$&&(F[""]=ee.HTML),F.xml=F.xml||ee.XML;var H=m.normalizeLineEndings||q;return A&&typeof A=="string"?K.parse(H(A),F,w):K.errorHandler.error("invalid doc source"),g.doc};function z(A,S,m){if(!A){if(S instanceof _)return S;A=S}var K={},g=A instanceof Function;m=m||{};function D(U){var F=A[U];!F&&g&&(F=A.length==2?function($){A(U,$)}:A),K[U]=F&&function($){F("[xmldom "+U+"] "+$+Q(m))}||function(){}}return D("warning"),D("error"),D("fatalError"),K}function _(){this.cdata=!1}function j(A,S){S.lineNumber=A.lineNumber,S.columnNumber=A.columnNumber}_.prototype={startDocument:function(){this.doc=new P().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(A,S,m,K){var g=this.doc,D=g.createElementNS(A,m||S),U=K.length;ge(this,D),this.currentElement=D,this.locator&&j(this.locator,D);for(var F=0;F<U;F++){var A=K.getURI(F),$=K.getValue(F),m=K.getQName(F),w=g.createAttributeNS(A,m);this.locator&&j(K.getLocator(F),w),w.value=w.nodeValue=$,D.setAttributeNode(w)}},endElement:function(A,S,m){var K=this.currentElement,g=K.tagName;this.currentElement=K.parentNode},startPrefixMapping:function(A,S){},endPrefixMapping:function(A){},processingInstruction:function(A,S){var m=this.doc.createProcessingInstruction(A,S);this.locator&&j(this.locator,m),ge(this,m)},ignorableWhitespace:function(A,S,m){},characters:function(A,S,m){if(A=M.apply(this,arguments),A){if(this.cdata)var K=this.doc.createCDATASection(A);else var K=this.doc.createTextNode(A);this.currentElement?this.currentElement.appendChild(K):/^\s*$/.test(A)&&this.doc.appendChild(K),this.locator&&j(this.locator,K)}},skippedEntity:function(A){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(A){(this.locator=A)&&(A.lineNumber=0)},comment:function(A,S,m){A=M.apply(this,arguments);var K=this.doc.createComment(A);this.locator&&j(this.locator,K),ge(this,K)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(A,S,m){var K=this.doc.implementation;if(K&&K.createDocumentType){var g=K.createDocumentType(A,S,m);this.locator&&j(this.locator,g),ge(this,g),this.doc.doctype=g}},warning:function(A){console.warn("[xmldom warning] "+A,Q(this.locator))},error:function(A){console.error("[xmldom error] "+A,Q(this.locator))},fatalError:function(A){throw new B(A,this.locator)}};function Q(A){if(A)return`
  10. @`+(A.systemId||"")+"#[line:"+A.lineNumber+",col:"+A.columnNumber+"]"}function M(A,S,m){return typeof A=="string"?A.substr(S,m):A.length>=S+m||S?new java.lang.String(A,S,m)+"":A}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(A){_.prototype[A]=function(){return null}});function ge(A,S){A.currentElement?A.currentElement.appendChild(S):A.doc.appendChild(S)}C.__DOMHandler=_,C.normalizeLineEndings=q,C.DOMParser=L},"./node_modules/@xmldom/xmldom/lib/dom.js":function(y,C,u){var v=u("./node_modules/@xmldom/xmldom/lib/conventions.js"),T=v.find,l=v.NAMESPACE;function k(t){return t!==""}function P(t){return t?t.split(/[\t\n\f\r ]+/).filter(k):[]}function ee(t,n){return t.hasOwnProperty(n)||(t[n]=!0),t}function B(t){if(!t)return[];var n=P(t);return Object.keys(n.reduce(ee,{}))}function b(t){return function(n){return t&&t.indexOf(n)!==-1}}function q(t,n){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}function L(t,n){var r=t.prototype;if(!(r instanceof n)){let E=function(){};var h=E;E.prototype=n.prototype,E=new E,q(r,E),t.prototype=r=E}r.constructor!=t&&(typeof t!="function"&&console.error("unknown Class:"+t),r.constructor=t)}var z={},_=z.ELEMENT_NODE=1,j=z.ATTRIBUTE_NODE=2,Q=z.TEXT_NODE=3,M=z.CDATA_SECTION_NODE=4,ge=z.ENTITY_REFERENCE_NODE=5,A=z.ENTITY_NODE=6,S=z.PROCESSING_INSTRUCTION_NODE=7,m=z.COMMENT_NODE=8,K=z.DOCUMENT_NODE=9,g=z.DOCUMENT_TYPE_NODE=10,D=z.DOCUMENT_FRAGMENT_NODE=11,U=z.NOTATION_NODE=12,F={},$={},w=F.INDEX_SIZE_ERR=($[1]="Index size error",1),H=F.DOMSTRING_SIZE_ERR=($[2]="DOMString size error",2),N=F.HIERARCHY_REQUEST_ERR=($[3]="Hierarchy request error",3),X=F.WRONG_DOCUMENT_ERR=($[4]="Wrong document",4),J=F.INVALID_CHARACTER_ERR=($[5]="Invalid character",5),ce=F.NO_DATA_ALLOWED_ERR=($[6]="No data allowed",6),se=F.NO_MODIFICATION_ALLOWED_ERR=($[7]="No modification allowed",7),re=F.NOT_FOUND_ERR=($[8]="Not found",8),Z=F.NOT_SUPPORTED_ERR=($[9]="Not supported",9),te=F.INUSE_ATTRIBUTE_ERR=($[10]="Attribute in use",10),ie=F.INVALID_STATE_ERR=($[11]="Invalid state",11),we=F.SYNTAX_ERR=($[12]="Syntax error",12),de=F.INVALID_MODIFICATION_ERR=($[13]="Invalid modification",13),Y=F.NAMESPACE_ERR=($[14]="Invalid namespace",14),pe=F.INVALID_ACCESS_ERR=($[15]="Invalid access",15);function oe(t,n){if(n instanceof Error)var r=n;else r=this,Error.call(this,$[t]),this.message=$[t],Error.captureStackTrace&&Error.captureStackTrace(this,oe);return r.code=t,n&&(this.message=this.message+": "+n),r}oe.prototype=Error.prototype,q(F,oe);function le(){}le.prototype={length:0,item:function(t){return this[t]||null},toString:function(t,n){for(var r=[],h=0;h<this.length;h++)tt(this[h],r,t,n);return r.join("")},filter:function(t){return Array.prototype.filter.call(this,t)},indexOf:function(t){return Array.prototype.indexOf.call(this,t)}};function ye(t,n){this._node=t,this._refresh=n,ve(this)}function ve(t){var n=t._node._inc||t._node.ownerDocument._inc;if(t._inc!=n){var r=t._refresh(t._node);o(t,"length",r.length),q(r,t),t._inc=n}}ye.prototype.item=function(t){return ve(this),this[t]},L(ye,le);function me(){}function Ee(t,n){for(var r=t.length;r--;)if(t[r]===n)return r}function Se(t,n,r,h){if(h?n[Ee(n,h)]=r:n[n.length++]=r,t){r.ownerElement=t;var E=t.ownerDocument;E&&(h&&a(E,t,h),i(E,t,r))}}function be(t,n,r){var h=Ee(n,r);if(h>=0){for(var E=n.length-1;h<E;)n[h]=n[++h];if(n.length=E,t){var ne=t.ownerDocument;ne&&(a(ne,t,r),r.ownerElement=null)}}else throw new oe(re,new Error(t.tagName+"@"+r))}me.prototype={length:0,item:le.prototype.item,getNamedItem:function(t){for(var n=this.length;n--;){var r=this[n];if(r.nodeName==t)return r}},setNamedItem:function(t){var n=t.ownerElement;if(n&&n!=this._ownerElement)throw new oe(te);var r=this.getNamedItem(t.nodeName);return Se(this._ownerElement,this,t,r),r},setNamedItemNS:function(t){var n=t.ownerElement,r;if(n&&n!=this._ownerElement)throw new oe(te);return r=this.getNamedItemNS(t.namespaceURI,t.localName),Se(this._ownerElement,this,t,r),r},removeNamedItem:function(t){var n=this.getNamedItem(t);return be(this._ownerElement,this,n),n},removeNamedItemNS:function(t,n){var r=this.getNamedItemNS(t,n);return be(this._ownerElement,this,r),r},getNamedItemNS:function(t,n){for(var r=this.length;r--;){var h=this[r];if(h.localName==n&&h.namespaceURI==t)return h}return null}};function Ae(){}Ae.prototype={hasFeature:function(t,n){return!0},createDocument:function(t,n,r){var h=new d;if(h.implementation=this,h.childNodes=new le,h.doctype=r||null,r&&h.appendChild(r),n){var E=h.createElementNS(t,n);h.appendChild(E)}return h},createDocumentType:function(t,n,r){var h=new Ye;return h.name=t,h.nodeName=t,h.publicId=n||"",h.systemId=r||"",h}};function V(){}V.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(t,n){return Me(this,t,n)},replaceChild:function(t,n){Me(this,t,n,Pe),n&&this.removeChild(n)},removeChild:function(t){return p(this,t)},appendChild:function(t){return this.insertBefore(t,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(t){return f(this.ownerDocument||this,this,t)},normalize:function(){for(var t=this.firstChild;t;){var n=t.nextSibling;n&&n.nodeType==Q&&t.nodeType==Q?(this.removeChild(n),t.appendData(n.data)):(t.normalize(),t=n)}},isSupported:function(t,n){return this.ownerDocument.implementation.hasFeature(t,n)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(t){for(var n=this;n;){var r=n._nsMap;if(r){for(var h in r)if(Object.prototype.hasOwnProperty.call(r,h)&&r[h]===t)return h}n=n.nodeType==j?n.ownerDocument:n.parentNode}return null},lookupNamespaceURI:function(t){for(var n=this;n;){var r=n._nsMap;if(r&&Object.prototype.hasOwnProperty.call(r,t))return r[t];n=n.nodeType==j?n.ownerDocument:n.parentNode}return null},isDefaultNamespace:function(t){var n=this.lookupPrefix(t);return n==null}};function x(t){return t=="<"&&"&lt;"||t==">"&&"&gt;"||t=="&"&&"&amp;"||t=='"'&&"&quot;"||"&#"+t.charCodeAt()+";"}q(z,V),q(z,V.prototype);function I(t,n){if(n(t))return!0;if(t=t.firstChild)do if(I(t,n))return!0;while(t=t.nextSibling)}function d(){this.ownerDocument=this}function i(t,n,r){t&&t._inc++;var h=r.namespaceURI;h===l.XMLNS&&(n._nsMap[r.prefix?r.localName:""]=r.value)}function a(t,n,r,h){t&&t._inc++;var E=r.namespaceURI;E===l.XMLNS&&delete n._nsMap[r.prefix?r.localName:""]}function s(t,n,r){if(t&&t._inc){t._inc++;var h=n.childNodes;if(r)h[h.length++]=r;else{for(var E=n.firstChild,ne=0;E;)h[ne++]=E,E=E.nextSibling;h.length=ne,delete h[h.length]}}}function p(t,n){var r=n.previousSibling,h=n.nextSibling;return r?r.nextSibling=h:t.firstChild=h,h?h.previousSibling=r:t.lastChild=r,n.parentNode=null,n.previousSibling=null,n.nextSibling=null,s(t.ownerDocument,t),n}function R(t){return t&&(t.nodeType===V.DOCUMENT_NODE||t.nodeType===V.DOCUMENT_FRAGMENT_NODE||t.nodeType===V.ELEMENT_NODE)}function O(t){return t&&(ae(t)||Ce(t)||G(t)||t.nodeType===V.DOCUMENT_FRAGMENT_NODE||t.nodeType===V.COMMENT_NODE||t.nodeType===V.PROCESSING_INSTRUCTION_NODE)}function G(t){return t&&t.nodeType===V.DOCUMENT_TYPE_NODE}function ae(t){return t&&t.nodeType===V.ELEMENT_NODE}function Ce(t){return t&&t.nodeType===V.TEXT_NODE}function W(t,n){var r=t.childNodes||[];if(T(r,ae)||G(n))return!1;var h=T(r,G);return!(n&&h&&r.indexOf(h)>r.indexOf(n))}function Oe(t,n){var r=t.childNodes||[];function h(ne){return ae(ne)&&ne!==n}if(T(r,h))return!1;var E=T(r,G);return!(n&&E&&r.indexOf(E)>r.indexOf(n))}function ke(t,n,r){if(!R(t))throw new oe(N,"Unexpected parent node type "+t.nodeType);if(r&&r.parentNode!==t)throw new oe(re,"child not in parent");if(!O(n)||G(n)&&t.nodeType!==V.DOCUMENT_NODE)throw new oe(N,"Unexpected node type "+n.nodeType+" for parent node type "+t.nodeType)}function Ie(t,n,r){var h=t.childNodes||[],E=n.childNodes||[];if(n.nodeType===V.DOCUMENT_FRAGMENT_NODE){var ne=E.filter(ae);if(ne.length>1||T(E,Ce))throw new oe(N,"More than one element or text in fragment");if(ne.length===1&&!W(t,r))throw new oe(N,"Element in fragment can not be inserted before doctype")}if(ae(n)&&!W(t,r))throw new oe(N,"Only one element can be added and only after doctype");if(G(n)){if(T(h,G))throw new oe(N,"Only one doctype is allowed");var fe=T(h,ae);if(r&&h.indexOf(fe)<h.indexOf(r))throw new oe(N,"Doctype can only be inserted before an element");if(!r&&fe)throw new oe(N,"Doctype can not be appended since element is present")}}function Pe(t,n,r){var h=t.childNodes||[],E=n.childNodes||[];if(n.nodeType===V.DOCUMENT_FRAGMENT_NODE){var ne=E.filter(ae);if(ne.length>1||T(E,Ce))throw new oe(N,"More than one element or text in fragment");if(ne.length===1&&!Oe(t,r))throw new oe(N,"Element in fragment can not be inserted before doctype")}if(ae(n)&&!Oe(t,r))throw new oe(N,"Only one element can be added and only after doctype");if(G(n)){let Te=function(Be){return G(Be)&&Be!==r};var ue=Te;if(T(h,Te))throw new oe(N,"Only one doctype is allowed");var fe=T(h,ae);if(r&&h.indexOf(fe)<h.indexOf(r))throw new oe(N,"Doctype can only be inserted before an element")}}function Me(t,n,r,h){ke(t,n,r),t.nodeType===V.DOCUMENT_NODE&&(h||Ie)(t,n,r);var E=n.parentNode;if(E&&E.removeChild(n),n.nodeType===D){var ne=n.firstChild;if(ne==null)return n;var fe=n.lastChild}else ne=fe=n;var ue=r?r.previousSibling:t.lastChild;ne.previousSibling=ue,fe.nextSibling=r,ue?ue.nextSibling=ne:t.firstChild=ne,r==null?t.lastChild=fe:r.previousSibling=fe;do ne.parentNode=t;while(ne!==fe&&(ne=ne.nextSibling));return s(t.ownerDocument||t,t),n.nodeType==D&&(n.firstChild=n.lastChild=null),n}function Ge(t,n){return n.parentNode&&n.parentNode.removeChild(n),n.parentNode=t,n.previousSibling=t.lastChild,n.nextSibling=null,n.previousSibling?n.previousSibling.nextSibling=n:t.firstChild=n,t.lastChild=n,s(t.ownerDocument,t,n),n}d.prototype={nodeName:"#document",nodeType:K,doctype:null,documentElement:null,_inc:1,insertBefore:function(t,n){if(t.nodeType==D){for(var r=t.firstChild;r;){var h=r.nextSibling;this.insertBefore(r,n),r=h}return t}return Me(this,t,n),t.ownerDocument=this,this.documentElement===null&&t.nodeType===_&&(this.documentElement=t),t},removeChild:function(t){return this.documentElement==t&&(this.documentElement=null),p(this,t)},replaceChild:function(t,n){Me(this,t,n,Pe),t.ownerDocument=this,n&&this.removeChild(n),ae(t)&&(this.documentElement=t)},importNode:function(t,n){return e(this,t,n)},getElementById:function(t){var n=null;return I(this.documentElement,function(r){if(r.nodeType==_&&r.getAttribute("id")==t)return n=r,!0}),n},getElementsByClassName:function(t){var n=B(t);return new ye(this,function(r){var h=[];return n.length>0&&I(r.documentElement,function(E){if(E!==r&&E.nodeType===_){var ne=E.getAttribute("class");if(ne){var fe=t===ne;if(!fe){var ue=B(ne);fe=n.every(b(ue))}fe&&h.push(E)}}}),h})},createElement:function(t){var n=new Fe;n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.localName=t,n.childNodes=new le;var r=n.attributes=new me;return r._ownerElement=n,n},createDocumentFragment:function(){var t=new Je;return t.ownerDocument=this,t.childNodes=new le,t},createTextNode:function(t){var n=new ze;return n.ownerDocument=this,n.appendData(t),n},createComment:function(t){var n=new Xe;return n.ownerDocument=this,n.appendData(t),n},createCDATASection:function(t){var n=new nt;return n.ownerDocument=this,n.appendData(t),n},createProcessingInstruction:function(t,n){var r=new $e;return r.ownerDocument=this,r.tagName=r.target=t,r.nodeValue=r.data=n,r},createAttribute:function(t){var n=new je;return n.ownerDocument=this,n.name=t,n.nodeName=t,n.localName=t,n.specified=!0,n},createEntityReference:function(t){var n=new Ve;return n.ownerDocument=this,n.nodeName=t,n},createElementNS:function(t,n){var r=new Fe,h=n.split(":"),E=r.attributes=new me;return r.childNodes=new le,r.ownerDocument=this,r.nodeName=n,r.tagName=n,r.namespaceURI=t,h.length==2?(r.prefix=h[0],r.localName=h[1]):r.localName=n,E._ownerElement=r,r},createAttributeNS:function(t,n){var r=new je,h=n.split(":");return r.ownerDocument=this,r.nodeName=n,r.name=n,r.namespaceURI=t,r.specified=!0,h.length==2?(r.prefix=h[0],r.localName=h[1]):r.localName=n,r}},L(d,V);function Fe(){this._nsMap={}}Fe.prototype={nodeType:_,hasAttribute:function(t){return this.getAttributeNode(t)!=null},getAttribute:function(t){var n=this.getAttributeNode(t);return n&&n.value||""},getAttributeNode:function(t){return this.attributes.getNamedItem(t)},setAttribute:function(t,n){var r=this.ownerDocument.createAttribute(t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},removeAttribute:function(t){var n=this.getAttributeNode(t);n&&this.removeAttributeNode(n)},appendChild:function(t){return t.nodeType===D?this.insertBefore(t,null):Ge(this,t)},setAttributeNode:function(t){return this.attributes.setNamedItem(t)},setAttributeNodeNS:function(t){return this.attributes.setNamedItemNS(t)},removeAttributeNode:function(t){return this.attributes.removeNamedItem(t.nodeName)},removeAttributeNS:function(t,n){var r=this.getAttributeNodeNS(t,n);r&&this.removeAttributeNode(r)},hasAttributeNS:function(t,n){return this.getAttributeNodeNS(t,n)!=null},getAttributeNS:function(t,n){var r=this.getAttributeNodeNS(t,n);return r&&r.value||""},setAttributeNS:function(t,n,r){var h=this.ownerDocument.createAttributeNS(t,n);h.value=h.nodeValue=""+r,this.setAttributeNode(h)},getAttributeNodeNS:function(t,n){return this.attributes.getNamedItemNS(t,n)},getElementsByTagName:function(t){return new ye(this,function(n){var r=[];return I(n,function(h){h!==n&&h.nodeType==_&&(t==="*"||h.tagName==t)&&r.push(h)}),r})},getElementsByTagNameNS:function(t,n){return new ye(this,function(r){var h=[];return I(r,function(E){E!==r&&E.nodeType===_&&(t==="*"||E.namespaceURI===t)&&(n==="*"||E.localName==n)&&h.push(E)}),h})}},d.prototype.getElementsByTagName=Fe.prototype.getElementsByTagName,d.prototype.getElementsByTagNameNS=Fe.prototype.getElementsByTagNameNS,L(Fe,V);function je(){}je.prototype.nodeType=j,L(je,V);function Ne(){}Ne.prototype={data:"",substringData:function(t,n){return this.data.substring(t,t+n)},appendData:function(t){t=this.data+t,this.nodeValue=this.data=t,this.length=t.length},insertData:function(t,n){this.replaceData(t,0,n)},appendChild:function(t){throw new Error($[N])},deleteData:function(t,n){this.replaceData(t,n,"")},replaceData:function(t,n,r){var h=this.data.substring(0,t),E=this.data.substring(t+n);r=h+r+E,this.nodeValue=this.data=r,this.length=r.length}},L(Ne,V);function ze(){}ze.prototype={nodeName:"#text",nodeType:Q,splitText:function(t){var n=this.data,r=n.substring(t);n=n.substring(0,t),this.data=this.nodeValue=n,this.length=n.length;var h=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(h,this.nextSibling),h}},L(ze,Ne);function Xe(){}Xe.prototype={nodeName:"#comment",nodeType:m},L(Xe,Ne);function nt(){}nt.prototype={nodeName:"#cdata-section",nodeType:M},L(nt,Ne);function Ye(){}Ye.prototype.nodeType=g,L(Ye,V);function Qe(){}Qe.prototype.nodeType=U,L(Qe,V);function Ze(){}Ze.prototype.nodeType=A,L(Ze,V);function Ve(){}Ve.prototype.nodeType=ge,L(Ve,V);function Je(){}Je.prototype.nodeName="#document-fragment",Je.prototype.nodeType=D,L(Je,V);function $e(){}$e.prototype.nodeType=S,L($e,V);function rt(){}rt.prototype.serializeToString=function(t,n,r){return he.call(t,n,r)},V.prototype.toString=he;function he(t,n){var r=[],h=this.nodeType==9&&this.documentElement||this,E=h.prefix,ne=h.namespaceURI;if(ne&&E==null){var E=h.lookupPrefix(ne);if(E==null)var fe=[{namespace:ne,prefix:null}]}return tt(this,r,t,n,fe),r.join("")}function et(t,n,r){var h=t.prefix||"",E=t.namespaceURI;if(!E||h==="xml"&&E===l.XML||E===l.XMLNS)return!1;for(var ne=r.length;ne--;){var fe=r[ne];if(fe.prefix===h)return fe.namespace!==E}return!0}function ot(t,n,r){t.push(" ",n,'="',r.replace(/[<>&"\t\n\r]/g,x),'"')}function tt(t,n,r,h,E){if(E||(E=[]),h)if(t=h(t),t){if(typeof t=="string"){n.push(t);return}}else return;switch(t.nodeType){case _:var ne=t.attributes,fe=ne.length,ue=t.firstChild,Te=t.tagName;r=l.isHTML(t.namespaceURI)||r;var Be=Te;if(!r&&!t.prefix&&t.namespaceURI){for(var Ue,We=0;We<ne.length;We++)if(ne.item(We).name==="xmlns"){Ue=ne.item(We).value;break}if(!Ue)for(var He=E.length-1;He>=0;He--){var Le=E[He];if(Le.prefix===""&&Le.namespace===t.namespaceURI){Ue=Le.namespace;break}}if(Ue!==t.namespaceURI)for(var He=E.length-1;He>=0;He--){var Le=E[He];if(Le.namespace===t.namespaceURI){Le.prefix&&(Be=Le.prefix+":"+Te);break}}}n.push("<",Be);for(var qe=0;qe<fe;qe++){var xe=ne.item(qe);xe.prefix=="xmlns"?E.push({prefix:xe.localName,namespace:xe.value}):xe.nodeName=="xmlns"&&E.push({prefix:"",namespace:xe.value})}for(var qe=0;qe<fe;qe++){var xe=ne.item(qe);if(et(xe,r,E)){var Re=xe.prefix||"",_e=xe.namespaceURI;ot(n,Re?"xmlns:"+Re:"xmlns",_e),E.push({prefix:Re,namespace:_e})}tt(xe,n,r,h,E)}if(Te===Be&&et(t,r,E)){var Re=t.prefix||"",_e=t.namespaceURI;ot(n,Re?"xmlns:"+Re:"xmlns",_e),E.push({prefix:Re,namespace:_e})}if(ue||r&&!/^(?:meta|link|img|br|hr|input)$/i.test(Te)){if(n.push(">"),r&&/^script$/i.test(Te))for(;ue;)ue.data?n.push(ue.data):tt(ue,n,r,h,E.slice()),ue=ue.nextSibling;else for(;ue;)tt(ue,n,r,h,E.slice()),ue=ue.nextSibling;n.push("</",Be,">")}else n.push("/>");return;case K:case D:for(var ue=t.firstChild;ue;)tt(ue,n,r,h,E.slice()),ue=ue.nextSibling;return;case j:return ot(n,t.name,t.value);case Q:return n.push(t.data.replace(/[<&>]/g,x));case M:return n.push("<![CDATA[",t.data,"]]>");case m:return n.push("<!--",t.data,"-->");case g:var De=t.publicId,Ke=t.systemId;if(n.push("<!DOCTYPE ",t.name),De)n.push(" PUBLIC ",De),Ke&&Ke!="."&&n.push(" ",Ke),n.push(">");else if(Ke&&Ke!=".")n.push(" SYSTEM ",Ke,">");else{var st=t.internalSubset;st&&n.push(" [",st,"]"),n.push(">")}return;case S:return n.push("<?",t.target," ",t.data,"?>");case ge:return n.push("&",t.nodeName,";");default:n.push("??",t.nodeName)}}function e(t,n,r){var h;switch(n.nodeType){case _:h=n.cloneNode(!1),h.ownerDocument=t;case D:break;case j:r=!0;break}if(h||(h=n.cloneNode(!1)),h.ownerDocument=t,h.parentNode=null,r)for(var E=n.firstChild;E;)h.appendChild(e(t,E,r)),E=E.nextSibling;return h}function f(t,n,r){var h=new n.constructor;for(var E in n)if(Object.prototype.hasOwnProperty.call(n,E)){var ne=n[E];typeof ne!="object"&&ne!=h[E]&&(h[E]=ne)}switch(n.childNodes&&(h.childNodes=new le),h.ownerDocument=t,h.nodeType){case _:var fe=n.attributes,ue=h.attributes=new me,Te=fe.length;ue._ownerElement=h;for(var Be=0;Be<Te;Be++)h.setAttributeNode(f(t,fe.item(Be),!0));break;case j:r=!0}if(r)for(var Ue=n.firstChild;Ue;)h.appendChild(f(t,Ue,r)),Ue=Ue.nextSibling;return h}function o(t,n,r){t[n]=r}try{if(Object.defineProperty){let t=function(n){switch(n.nodeType){case _:case D:var r=[];for(n=n.firstChild;n;)n.nodeType!==7&&n.nodeType!==8&&r.push(t(n)),n=n.nextSibling;return r.join("");default:return n.nodeValue}};var c=t;Object.defineProperty(ye.prototype,"length",{get:function(){return ve(this),this.$$length}}),Object.defineProperty(V.prototype,"textContent",{get:function(){return t(this)},set:function(n){switch(this.nodeType){case _:case D:for(;this.firstChild;)this.removeChild(this.firstChild);(n||String(n))&&this.appendChild(this.ownerDocument.createTextNode(n));break;default:this.data=n,this.value=n,this.nodeValue=n}}}),o=function(n,r,h){n["$$"+r]=h}}}catch(t){}C.DocumentType=Ye,C.DOMException=oe,C.DOMImplementation=Ae,C.Element=Fe,C.Node=V,C.NodeList=le,C.XMLSerializer=rt},"./node_modules/@xmldom/xmldom/lib/entities.js":function(y,C,u){var v=u("./node_modules/@xmldom/xmldom/lib/conventions.js").freeze;C.XML_ENTITIES=v({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),C.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"}),C.entityMap=C.HTML_ENTITIES},"./node_modules/@xmldom/xmldom/lib/index.js":function(y,C,u){var v=u("./node_modules/@xmldom/xmldom/lib/dom.js");C.DOMImplementation=v.DOMImplementation,C.XMLSerializer=v.XMLSerializer,C.DOMParser=u("./node_modules/@xmldom/xmldom/lib/dom-parser.js").DOMParser},"./node_modules/@xmldom/xmldom/lib/sax.js":function(y,C,u){var v=u("./node_modules/@xmldom/xmldom/lib/conventions.js").NAMESPACE,T=/[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]/,l=new RegExp("[\\-\\.0-9"+T.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),k=new RegExp("^"+T.source+l.source+"*(?::"+T.source+l.source+"*)?$"),P=0,ee=1,B=2,b=3,q=4,L=5,z=6,_=7;function j(w,H){this.message=w,this.locator=H,Error.captureStackTrace&&Error.captureStackTrace(this,j)}j.prototype=new Error,j.prototype.name=j.name;function Q(){}Q.prototype={parse:function(w,H,N){var X=this.domBuilder;X.startDocument(),g(H,H={}),M(w,H,N,X,this.errorHandler),X.endDocument()}};function M(w,H,N,X,J){function ce(R){if(R>65535){R-=65536;var O=55296+(R>>10),G=56320+(R&1023);return String.fromCharCode(O,G)}else return String.fromCharCode(R)}function se(R){var O=R.slice(1,-1);return Object.hasOwnProperty.call(N,O)?N[O]:O.charAt(0)==="#"?ce(parseInt(O.substr(1).replace("x","0x"))):(J.error("entity not found:"+R),R)}function re(R){if(R>oe){var O=w.substring(oe,R).replace(/&#?\w+;/g,se);de&&Z(oe),X.characters(O,0,R-oe),oe=R}}function Z(R,O){for(;R>=ie&&(O=we.exec(w));)te=O.index,ie=te+O[0].length,de.lineNumber++;de.columnNumber=R-te+1}for(var te=0,ie=0,we=/.*(?:\r\n?|\n)|.*$/g,de=X.locator,Y=[{currentNSMap:H}],pe={},oe=0;;){try{var le=w.indexOf("<",oe);if(le<0){if(!w.substr(oe).match(/^\s*$/)){var ye=X.doc,ve=ye.createTextNode(w.substr(oe));ye.appendChild(ve),X.currentElement=ve}return}switch(le>oe&&re(le),w.charAt(le+1)){case"/":var me=w.indexOf(">",le+3),Ee=w.substring(le+2,me).replace(/[ \t\n\r]+$/g,""),Se=Y.pop();me<0?(Ee=w.substring(le+2).replace(/[\s<].*/,""),J.error("end tag name: "+Ee+" is not complete:"+Se.tagName),me=le+1+Ee.length):Ee.match(/\s</)&&(Ee=Ee.replace(/[\s<].*/,""),J.error("end tag name: "+Ee+" maybe not complete"),me=le+1+Ee.length);var be=Se.localNSMap,Ae=Se.tagName==Ee,V=Ae||Se.tagName&&Se.tagName.toLowerCase()==Ee.toLowerCase();if(V){if(X.endElement(Se.uri,Se.localName,Ee),be)for(var x in be)Object.prototype.hasOwnProperty.call(be,x)&&X.endPrefixMapping(x);Ae||J.fatalError("end tag name: "+Ee+" is not match the current start tagName:"+Se.tagName)}else Y.push(Se);me++;break;case"?":de&&Z(le),me=U(w,le,X);break;case"!":de&&Z(le),me=D(w,le,X,J);break;default:de&&Z(le);var I=new F,d=Y[Y.length-1].currentNSMap,me=A(w,le,I,d,se,J),i=I.length;if(!I.closed&&K(w,me,I.tagName,pe)&&(I.closed=!0,N.nbsp||J.warning("unclosed xml attribute")),de&&i){for(var a=ge(de,{}),s=0;s<i;s++){var p=I[s];Z(p.offset),p.locator=ge(de,{})}X.locator=a,S(I,X,d)&&Y.push(I),X.locator=de}else S(I,X,d)&&Y.push(I);v.isHTML(I.uri)&&!I.closed?me=m(w,me,I.tagName,se,X):me++}}catch(R){if(R instanceof j)throw R;J.error("element parse error: "+R),me=-1}me>oe?oe=me:re(Math.max(le,oe)+1)}}function ge(w,H){return H.lineNumber=w.lineNumber,H.columnNumber=w.columnNumber,H}function A(w,H,N,X,J,ce){function se(Y,pe,oe){N.attributeNames.hasOwnProperty(Y)&&ce.fatalError("Attribute "+Y+" redefined"),N.addValue(Y,pe.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,J),oe)}for(var re,Z,te=++H,ie=P;;){var we=w.charAt(te);switch(we){case"=":if(ie===ee)re=w.slice(H,te),ie=b;else if(ie===B)ie=b;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(ie===b||ie===ee)if(ie===ee&&(ce.warning('attribute value must after "="'),re=w.slice(H,te)),H=te+1,te=w.indexOf(we,H),te>0)Z=w.slice(H,te),se(re,Z,H-1),ie=L;else throw new Error("attribute value no end '"+we+"' match");else if(ie==q)Z=w.slice(H,te),se(re,Z,H),ce.warning('attribute "'+re+'" missed start quot('+we+")!!"),H=te+1,ie=L;else throw new Error('attribute value must after "="');break;case"/":switch(ie){case P:N.setTagName(w.slice(H,te));case L:case z:case _:ie=_,N.closed=!0;case q:case ee:case B:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return ce.error("unexpected end of input"),ie==P&&N.setTagName(w.slice(H,te)),te;case">":switch(ie){case P:N.setTagName(w.slice(H,te));case L:case z:case _:break;case q:case ee:Z=w.slice(H,te),Z.slice(-1)==="/"&&(N.closed=!0,Z=Z.slice(0,-1));case B:ie===B&&(Z=re),ie==q?(ce.warning('attribute "'+Z+'" missed quot(")!'),se(re,Z,H)):((!v.isHTML(X[""])||!Z.match(/^(?:disabled|checked|selected)$/i))&&ce.warning('attribute "'+Z+'" missed value!! "'+Z+'" instead!!'),se(Z,Z,H));break;case b:throw new Error("attribute value missed!!")}return te;case"\x80":we=" ";default:if(we<=" ")switch(ie){case P:N.setTagName(w.slice(H,te)),ie=z;break;case ee:re=w.slice(H,te),ie=B;break;case q:var Z=w.slice(H,te);ce.warning('attribute "'+Z+'" missed quot(")!!'),se(re,Z,H);case L:ie=z;break}else switch(ie){case B:var de=N.tagName;(!v.isHTML(X[""])||!re.match(/^(?:disabled|checked|selected)$/i))&&ce.warning('attribute "'+re+'" missed value!! "'+re+'" instead2!!'),se(re,re,H),H=te,ie=ee;break;case L:ce.warning('attribute space is required"'+re+'"!!');case z:ie=ee,H=te;break;case b:ie=q,H=te;break;case _:throw new Error("elements closed character '/' and '>' must be connected to")}}te++}}function S(w,H,N){for(var X=w.tagName,J=null,ce=w.length;ce--;){var se=w[ce],re=se.qName,Z=se.value,de=re.indexOf(":");if(de>0)var te=se.prefix=re.slice(0,de),ie=re.slice(de+1),we=te==="xmlns"&&ie;else ie=re,te=null,we=re==="xmlns"&&"";se.localName=ie,we!==!1&&(J==null&&(J={},g(N,N={})),N[we]=J[we]=Z,se.uri=v.XMLNS,H.startPrefixMapping(we,Z))}for(var ce=w.length;ce--;){se=w[ce];var te=se.prefix;te&&(te==="xml"&&(se.uri=v.XML),te!=="xmlns"&&(se.uri=N[te||""]))}var de=X.indexOf(":");de>0?(te=w.prefix=X.slice(0,de),ie=w.localName=X.slice(de+1)):(te=null,ie=w.localName=X);var Y=w.uri=N[te||""];if(H.startElement(Y,ie,X,w),w.closed){if(H.endElement(Y,ie,X),J)for(te in J)Object.prototype.hasOwnProperty.call(J,te)&&H.endPrefixMapping(te)}else return w.currentNSMap=N,w.localNSMap=J,!0}function m(w,H,N,X,J){if(/^(?:script|textarea)$/i.test(N)){var ce=w.indexOf("</"+N+">",H),se=w.substring(H+1,ce);if(/[&<]/.test(se))return/^script$/i.test(N)?(J.characters(se,0,se.length),ce):(se=se.replace(/&#?\w+;/g,X),J.characters(se,0,se.length),ce)}return H+1}function K(w,H,N,X){var J=X[N];return J==null&&(J=w.lastIndexOf("</"+N+">"),J<H&&(J=w.lastIndexOf("</"+N)),X[N]=J),J<H}function g(w,H){for(var N in w)Object.prototype.hasOwnProperty.call(w,N)&&(H[N]=w[N])}function D(w,H,N,X){var J=w.charAt(H+2);switch(J){case"-":if(w.charAt(H+3)==="-"){var ce=w.indexOf("-->",H+4);return ce>H?(N.comment(w,H+4,ce-H-4),ce+3):(X.error("Unclosed comment"),-1)}else return-1;default:if(w.substr(H+3,6)=="CDATA["){var ce=w.indexOf("]]>",H+9);return N.startCDATA(),N.characters(w,H+9,ce-H-9),N.endCDATA(),ce+3}var se=$(w,H),re=se.length;if(re>1&&/!doctype/i.test(se[0][0])){var Z=se[1][0],te=!1,ie=!1;re>3&&(/^public$/i.test(se[2][0])?(te=se[3][0],ie=re>4&&se[4][0]):/^system$/i.test(se[2][0])&&(ie=se[3][0]));var we=se[re-1];return N.startDTD(Z,te,ie),N.endDTD(),we.index+we[0].length}}return-1}function U(w,H,N){var X=w.indexOf("?>",H);if(X){var J=w.substring(H,X).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(J){var ce=J[0].length;return N.processingInstruction(J[1],J[2]),X+2}else return-1}return-1}function F(){this.attributeNames={}}F.prototype={setTagName:function(w){if(!k.test(w))throw new Error("invalid tagName:"+w);this.tagName=w},addValue:function(w,H,N){if(!k.test(w))throw new Error("invalid attribute:"+w);this.attributeNames[w]=this.length,this[this.length++]={qName:w,value:H,offset:N}},length:0,getLocalName:function(w){return this[w].localName},getLocator:function(w){return this[w].locator},getQName:function(w){return this[w].qName},getURI:function(w){return this[w].uri},getValue:function(w){return this[w].value}};function $(w,H){var N,X=[],J=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(J.lastIndex=H,J.exec(w);N=J.exec(w);)if(X.push(N),N[1])return X}C.XMLReader=Q,C.ParseError=j},"./node_modules/process/browser.js":function(y,C){var u=y.exports={},v,T;function l(){throw new Error("setTimeout has not been defined")}function k(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?v=setTimeout:v=l}catch(M){v=l}try{typeof clearTimeout=="function"?T=clearTimeout:T=k}catch(M){T=k}})();function P(M){if(v===setTimeout)return setTimeout(M,0);if((v===l||!v)&&setTimeout)return v=setTimeout,setTimeout(M,0);try{return v(M,0)}catch(ge){try{return v.call(null,M,0)}catch(A){return v.call(this,M,0)}}}function ee(M){if(T===clearTimeout)return clearTimeout(M);if((T===k||!T)&&clearTimeout)return T=clearTimeout,clearTimeout(M);try{return T(M)}catch(ge){try{return T.call(null,M)}catch(A){return T.call(this,M)}}}var B=[],b=!1,q,L=-1;function z(){!b||!q||(b=!1,q.length?B=q.concat(B):L=-1,B.length&&_())}function _(){if(!b){var M=P(z);b=!0;for(var ge=B.length;ge;){for(q=B,B=[];++L<ge;)q&&q[L].run();L=-1,ge=B.length}q=null,b=!1,ee(M)}}u.nextTick=function(M){var ge=new Array(arguments.length-1);if(arguments.length>1)for(var A=1;A<arguments.length;A++)ge[A-1]=arguments[A];B.push(new j(M,ge)),B.length===1&&!b&&P(_)};function j(M,ge){this.fun=M,this.array=ge}j.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",u.versions={};function Q(){}u.on=Q,u.addListener=Q,u.once=Q,u.off=Q,u.removeListener=Q,u.removeAllListeners=Q,u.emit=Q,u.prependListener=Q,u.prependOnceListener=Q,u.listeners=function(M){return[]},u.binding=function(M){throw new Error("process.binding is not supported")},u.cwd=function(){return"/"},u.chdir=function(M){throw new Error("process.chdir is not supported")},u.umask=function(){return 0}},"./node_modules/webpack/buildin/amd-options.js":function(y,C){(function(u){y.exports=u}).call(this,{})},"./node_modules/webpack/buildin/global.js":function(y,C){var u;u=function(){return this}();try{u=u||new Function("return this")()}catch(v){typeof window=="object"&&(u=window)}y.exports=u},"./node_modules/webpack/buildin/module.js":function(y,C){y.exports=function(u){return u.webpackPolyfill||(u.deprecate=function(){},u.paths=[],u.children||(u.children=[]),Object.defineProperty(u,"loaded",{enumerable:!0,get:function(){return u.l}}),Object.defineProperty(u,"id",{enumerable:!0,get:function(){return u.i}}),u.webpackPolyfill=1),u}},"./package.json":function(y){y.exports=JSON.parse('{"name":"cos-js-sdk-v5","version":"1.4.16","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","test":"jest --coverage"},"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.6"},"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","jest":"^29.3.1","jest-environment-jsdom":"^29.3.1","qcloud-cos-sts":"^3.0.2","request":"^2.87.0","terser-webpack-plugin":"4.2.3","uglifyjs":"^2.4.11","webpack":"4.46.0","webpack-cli":"4.10.0"}}')},"./src/advance.js":function(y,C,u){var v=u("./node_modules/@babel/runtime/helpers/typeof.js"),T=u("./src/session.js"),l=u("./src/async.js"),k=u("./src/event.js").EventProxy,P=u("./src/util.js"),ee=u("./src/tracker.js");function B(g,D){var U=this,F=new k,$=g.TaskId,w=g.Bucket,H=g.Region,N=g.Key,X=g.Body,J=g.ChunkSize||g.SliceSize||U.options.ChunkSize,ce=g.AsyncLimit,se=g.StorageClass,re=g.ServerSideEncryption,Z,te,ie=g.onHashProgress,we=g.tracker;we&&we.setParams({chunkSize:J}),F.on("error",function(de){if(!!U._isRunningTask($))return de.UploadId=g.UploadData.UploadId||"",D(de)}),F.on("upload_complete",function(de){var Y=P.extend({UploadId:g.UploadData.UploadId||""},de);D(null,Y)}),F.on("upload_slice_complete",function(de){var Y={};P.each(g.Headers,function(pe,oe){var le=oe.toLowerCase();(le.indexOf("x-cos-meta-")===0||le==="pic-operations")&&(Y[oe]=pe)}),j.call(U,{Bucket:w,Region:H,Key:N,UploadId:de.UploadId,SliceList:de.SliceList,Headers:Y,tracker:we},function(pe,oe){if(!!U._isRunningTask($)){if(T.removeUsing(de.UploadId),pe)return te(null,!0),F.emit("error",pe);T.removeUploadId.call(U,de.UploadId),te({loaded:Z,total:Z},!0),F.emit("upload_complete",oe)}})}),F.on("get_upload_data_finish",function(de){var Y=T.getFileId(X,g.ChunkSize,w,N);Y&&T.saveUploadId.call(U,Y,de.UploadId,U.options.UploadIdCacheLimit),T.setUsing(de.UploadId),te(null,!0),z.call(U,{TaskId:$,Bucket:w,Region:H,Key:N,Body:X,FileSize:Z,SliceSize:J,AsyncLimit:ce,ServerSideEncryption:re,UploadData:de,Headers:g.Headers,onProgress:te,tracker:we},function(pe,oe){if(!!U._isRunningTask($)){if(pe)return te(null,!0),F.emit("error",pe);F.emit("upload_slice_complete",oe)}})}),F.on("get_file_size_finish",function(){if(te=P.throttleOnProgress.call(U,Z,g.onProgress),g.UploadData.UploadId)F.emit("get_upload_data_finish",g.UploadData);else{var de=P.extend({TaskId:$,Bucket:w,Region:H,Key:N,Headers:g.Headers,StorageClass:se,Body:X,FileSize:Z,SliceSize:J,onHashProgress:ie,tracker:we},g);b.call(U,de,function(Y,pe){if(!!U._isRunningTask($)){if(Y)return F.emit("error",Y);g.UploadData.UploadId=pe.UploadId,g.UploadData.PartList=pe.PartList,F.emit("get_upload_data_finish",g.UploadData)}})}}),Z=g.ContentLength,delete g.ContentLength,!g.Headers&&(g.Headers={}),P.each(g.Headers,function(de,Y){Y.toLowerCase()==="content-length"&&delete g.Headers[Y]}),function(){for(var de=[1,2,4,8,16,32,64,128,256,512,1024,1024*2,1024*4,1024*5],Y=1024*1024,pe=0;pe<de.length&&(Y=de[pe]*1024*1024,!(Z/Y<=U.options.MaxPartNumber));pe++);g.ChunkSize=g.SliceSize=J=Math.max(J,Y)}(),Z===0?(g.Body="",g.ContentLength=0,g.SkipTask=!0,U.putObject(g,D)):F.emit("get_file_size_finish")}function b(g,D){var U=g.TaskId,F=g.Bucket,$=g.Region,w=g.Key,H=g.StorageClass,N=this,X={},J=g.FileSize,ce=g.SliceSize,se=Math.ceil(J/ce),re=0,Z=0,te=P.throttleOnProgress.call(N,J,g.onHashProgress),ie=function(pe,oe){var le=ce*(pe-1),ye=Math.min(le+ce,J),ve=ye-le;X[pe]?oe(null,{PartNumber:pe,ETag:X[pe],Size:ve}):P.fileSlice(g.Body,le,ye,!1,function(me){P.getFileMd5(me,function(Ee,Se){if(Ee)return oe(P.error(Ee));var be='"'+Se+'"';X[pe]=be,re+=1,Z+=ve,te({loaded:Z,total:J}),oe(null,{PartNumber:pe,ETag:be,Size:ve})})})},we=function(pe,oe){var le=pe.length;if(le===0)return oe(null,!0);if(le>se)return oe(null,!1);if(le>1){var ye=Math.max(pe[0].Size,pe[1].Size);if(ye!==ce)return oe(null,!1)}var ve=function me(Ee){if(Ee<le){var Se=pe[Ee];ie(Se.PartNumber,function(be,Ae){Ae&&Ae.ETag===Se.ETag&&Ae.Size===Se.Size?me(Ee+1):oe(null,!1)})}else oe(null,!0)};ve(0)},de=new k;de.on("error",function(Y){if(!!N._isRunningTask(U))return D(Y)}),de.on("upload_id_available",function(Y){var pe={},oe=[];P.each(Y.PartList,function(ve){pe[ve.PartNumber]=ve});for(var le=1;le<=se;le++){var ye=pe[le];ye?(ye.PartNumber=le,ye.Uploaded=!0):ye={PartNumber:le,ETag:null,Uploaded:!1},oe.push(ye)}Y.PartList=oe,D(null,Y)}),de.on("no_available_upload_id",function(){if(!!N._isRunningTask(U)){var Y=P.extend({Bucket:F,Region:$,Key:w,Query:P.clone(g.Query),StorageClass:H,Body:g.Body,calledBySdk:"sliceUploadFile",tracker:g.tracker},g),pe=P.clone(g.Headers);delete pe["x-cos-mime-limit"],Y.Headers=pe,N.multipartInit(Y,function(oe,le){if(!!N._isRunningTask(U)){if(oe)return de.emit("error",oe);var ye=le.UploadId;if(!ye)return D(P.error(new Error("no such upload id")));de.emit("upload_id_available",{UploadId:ye,PartList:[]})}})}}),de.on("has_and_check_upload_id",function(Y){Y=Y.reverse(),l.eachLimit(Y,1,function(pe,oe){if(!!N._isRunningTask(U)){if(T.using[pe]){oe();return}L.call(N,{Bucket:F,Region:$,Key:w,UploadId:pe,tracker:g.tracker},function(le,ye){if(!!N._isRunningTask(U)){if(le)return T.removeUsing(pe),de.emit("error",le);var ve=ye.PartList;ve.forEach(function(me){me.PartNumber*=1,me.Size*=1,me.ETag=me.ETag||""}),we(ve,function(me,Ee){if(!!N._isRunningTask(U)){if(me)return de.emit("error",me);Ee?oe({UploadId:pe,PartList:ve}):oe()}})}})}},function(pe){!N._isRunningTask(U)||(te(null,!0),pe&&pe.UploadId?de.emit("upload_id_available",pe):de.emit("no_available_upload_id"))})}),de.on("seek_local_avail_upload_id",function(Y){var pe=T.getFileId(g.Body,g.ChunkSize,F,w),oe=T.getUploadIdList.call(N,pe);if(!pe||!oe){de.emit("has_and_check_upload_id",Y);return}var le=function ye(ve){if(ve>=oe.length){de.emit("has_and_check_upload_id",Y);return}var me=oe[ve];if(!P.isInArray(Y,me)){T.removeUploadId.call(N,me),ye(ve+1);return}if(T.using[me]){ye(ve+1);return}L.call(N,{Bucket:F,Region:$,Key:w,UploadId:me,tracker:g.tracker},function(Ee,Se){!N._isRunningTask(U)||(Ee?(T.removeUploadId.call(N,me),ye(ve+1)):de.emit("upload_id_available",{UploadId:me,PartList:Se.PartList}))})};le(0)}),de.on("get_remote_upload_id_list",function(){q.call(N,{Bucket:F,Region:$,Key:w,tracker:g.tracker},function(Y,pe){if(!!N._isRunningTask(U)){if(Y)return de.emit("error",Y);var oe=P.filter(pe.UploadList,function(ve){return ve.Key===w&&(!H||ve.StorageClass.toUpperCase()===H.toUpperCase())}).reverse().map(function(ve){return ve.UploadId||ve.UploadID});if(oe.length)de.emit("seek_local_avail_upload_id",oe);else{var le=T.getFileId(g.Body,g.ChunkSize,F,w),ye;le&&(ye=T.getUploadIdList.call(N,le))&&P.each(ye,function(ve){T.removeUploadId.call(N,ve)}),de.emit("no_available_upload_id")}}})}),de.emit("get_remote_upload_id_list")}function q(g,D){var U=this,F=[],$={Bucket:g.Bucket,Region:g.Region,Prefix:g.Key,calledBySdk:g.calledBySdk||"sliceUploadFile",tracker:g.tracker},w=function H(){U.multipartList($,function(N,X){if(N)return D(N);F.push.apply(F,X.Upload||[]),X.IsTruncated==="true"?($.KeyMarker=X.NextKeyMarker,$.UploadIdMarker=X.NextUploadIdMarker,H()):D(null,{UploadList:F})})};w()}function L(g,D){var U=this,F=[],$={Bucket:g.Bucket,Region:g.Region,Key:g.Key,UploadId:g.UploadId,calledBySdk:"sliceUploadFile",tracker:g.tracker},w=function H(){U.multipartListPart($,function(N,X){if(N)return D(N);F.push.apply(F,X.Part||[]),X.IsTruncated==="true"?($.PartNumberMarker=X.NextPartNumberMarker,H()):D(null,{PartList:F})})};w()}function z(g,D){var U=this,F=g.TaskId,$=g.Bucket,w=g.Region,H=g.Key,N=g.UploadData,X=g.FileSize,J=g.SliceSize,ce=Math.min(g.AsyncLimit||U.options.ChunkParallelLimit||1,256),se=g.Body,re=Math.ceil(X/J),Z=0,te=g.ServerSideEncryption,ie=g.Headers,we=P.filter(N.PartList,function(Y){return Y.Uploaded&&(Z+=Y.PartNumber>=re&&X%J||J),!Y.Uploaded}),de=g.onProgress;l.eachLimit(we,ce,function(Y,pe){if(!!U._isRunningTask(F)){var oe=Y.PartNumber,le=Math.min(X,Y.PartNumber*J)-(Y.PartNumber-1)*J,ye=0;_.call(U,{TaskId:F,Bucket:$,Region:w,Key:H,SliceSize:J,FileSize:X,PartNumber:oe,ServerSideEncryption:te,Body:se,UploadData:N,Headers:ie,onProgress:function(me){Z+=me.loaded-ye,ye=me.loaded,de({loaded:Z,total:X})},tracker:g.tracker},function(ve,me){!U._isRunningTask(F)||(!ve&&!me.ETag&&(ve='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 )'),ve?Z-=ye:(Z+=le-ye,Y.ETag=me.ETag),de({loaded:Z,total:X}),pe(ve||null,me))})}},function(Y){if(!!U._isRunningTask(F)){if(Y)return D(Y);D(null,{UploadId:N.UploadId,SliceList:N.PartList})}})}function _(g,D){var U=this,F=g.TaskId,$=g.Bucket,w=g.Region,H=g.Key,N=g.FileSize,X=g.Body,J=g.PartNumber*1,ce=g.SliceSize,se=g.ServerSideEncryption,re=g.UploadData,Z=g.Headers||{},te=U.options.ChunkRetryTimes+1,ie=ce*(J-1),we=ce,de=ie+ce;de>N&&(de=N,we=de-ie);var Y=["x-cos-traffic-limit","x-cos-mime-limit"],pe={};P.each(Z,function(le,ye){Y.indexOf(ye)>-1&&(pe[ye]=le)});var oe=re.PartList[J-1];l.retry(te,function(le){!U._isRunningTask(F)||P.fileSlice(X,ie,de,!0,function(ye){U.multipartUpload({TaskId:F,Bucket:$,Region:w,Key:H,ContentLength:we,PartNumber:J,UploadId:re.UploadId,ServerSideEncryption:se,Body:ye,Headers:pe,onProgress:g.onProgress,calledBySdk:"sliceUploadFile",tracker:g.tracker},function(ve,me){if(!!U._isRunningTask(F))return ve?le(ve):(oe.Uploaded=!0,le(null,me))})})},function(le,ye){if(!!U._isRunningTask(F))return D(le,ye)})}function j(g,D){var U=g.Bucket,F=g.Region,$=g.Key,w=g.UploadId,H=g.SliceList,N=this,X=this.options.ChunkRetryTimes+1,J=g.Headers,ce=H.map(function(se){return{PartNumber:se.PartNumber,ETag:se.ETag}});l.retry(X,function(se){N.multipartComplete({Bucket:U,Region:F,Key:$,UploadId:w,Parts:ce,Headers:J,calledBySdk:"sliceUploadFile",tracker:g.tracker},se)},function(se,re){D(se,re)})}function Q(g,D){var U=g.Bucket,F=g.Region,$=g.Key,w=g.UploadId,H=g.Level||"task",N=g.AsyncLimit,X=this,J=new k;if(J.on("error",function(ce){return D(ce)}),J.on("get_abort_array",function(ce){M.call(X,{Bucket:U,Region:F,Key:$,Headers:g.Headers,AsyncLimit:N,AbortArray:ce},D)}),H==="bucket")q.call(X,{Bucket:U,Region:F,calledBySdk:"abortUploadTask"},function(ce,se){if(ce)return D(ce);J.emit("get_abort_array",se.UploadList||[])});else if(H==="file"){if(!$)return D(P.error(new Error("abort_upload_task_no_key")));q.call(X,{Bucket:U,Region:F,Key:$,calledBySdk:"abortUploadTask"},function(ce,se){if(ce)return D(ce);J.emit("get_abort_array",se.UploadList||[])})}else if(H==="task"){if(!w)return D(P.error(new Error("abort_upload_task_no_id")));if(!$)return D(P.error(new Error("abort_upload_task_no_key")));J.emit("get_abort_array",[{Key:$,UploadId:w}])}else return D(P.error(new Error("abort_unknown_level")))}function M(g,D){var U=g.Bucket,F=g.Region,$=g.Key,w=g.AbortArray,H=g.AsyncLimit||1,N=this,X=0,J=new Array(w.length);l.eachLimit(w,H,function(ce,se){var re=X;if($&&$!==ce.Key){J[re]={error:{KeyNotMatch:!0}},se(null);return}var Z=ce.UploadId||ce.UploadID;N.multipartAbort({Bucket:U,Region:F,Key:ce.Key,Headers:g.Headers,UploadId:Z},function(te){var ie={Bucket:U,Region:F,Key:ce.Key,UploadId:Z};J[re]={error:te,task:ie},se(null)}),X++},function(ce){if(ce)return D(ce);for(var se=[],re=[],Z=0,te=J.length;Z<te;Z++){var ie=J[Z];ie.task&&(ie.error?re.push(ie.task):se.push(ie.task))}return D(null,{successList:se,errorList:re})})}function ge(g,D){var U=this,F=g.SliceSize===void 0?U.options.SliceSize:g.SliceSize,$=[],w=g.Body,H=w.size||w.length||0,N={TaskId:""};if(U.options.EnableTracker){var X=U.options.UseAccelerate||typeof U.options.Domain=="string"&&U.options.Domain.includes("accelerate.");g.tracker=new ee({bucket:g.Bucket,region:g.Region,apiName:"uploadFile",fileKey:g.Key,fileSize:H,accelerate:X,deepTracker:U.options.DeepTracker,customId:U.options.CustomId,delay:U.options.TrackerDelay})}P.each(g,function(te,ie){v(te)!=="object"&&typeof te!="function"&&(N[ie]=te)});var J=g.onTaskReady,ce=function(ie){N.TaskId=ie,J&&J(ie)};g.onTaskReady=ce;var se=H>F?"sliceUploadFile":"putObject",re=g.onFileFinish,Z=function(ie,we){g.tracker&&g.tracker.formatResult(ie,we),re&&re(ie,we,N),D&&D(ie,we)};$.push({api:se,params:g,callback:Z}),U._addTasks($)}function A(g,D){var U=this,F=g.SliceSize===void 0?U.options.SliceSize:g.SliceSize,$=0,w=0,H=P.throttleOnProgress.call(U,w,g.onProgress),N=g.files.length,X=g.onFileFinish,J=Array(N),ce=function(Z,te,ie){H(null,!0),X&&X(Z,te,ie),J[ie.Index]={options:ie,error:Z,data:te},--N<=0&&D&&D(null,{files:J})},se=[];P.each(g.files,function(re,Z){(function(){var te=re.Body,ie=te.size||te.length||0,we={Index:Z,TaskId:""};if($+=ie,U.options.EnableTracker){var de=U.options.UseAccelerate||typeof U.options.Domain=="string"&&U.options.Domain.includes("accelerate.");re.tracker=new ee({bucket:re.Bucket,region:re.Region,apiName:"uploadFiles",fileKey:re.Key,fileSize:ie,accelerate:de,deepTracker:U.options.DeepTracker,customId:U.options.CustomId,delay:U.options.TrackerDelay})}P.each(re,function(Se,be){v(Se)!=="object"&&typeof Se!="function"&&(we[be]=Se)});var Y=re.onTaskReady,pe=function(be){we.TaskId=be,Y&&Y(be)};re.onTaskReady=pe;var oe=0,le=re.onProgress,ye=function(be){w=w-oe+be.loaded,oe=be.loaded,le&&le(be),H({loaded:w,total:$})};re.onProgress=ye;var ve=ie>F?"sliceUploadFile":"putObject",me=re.onFileFinish,Ee=function(be,Ae){re.tracker&&re.tracker.formatResult(be,Ae),me&&me(be,Ae),ce&&ce(be,Ae,we)};se.push({api:ve,params:re,callback:Ee})})()}),U._addTasks(se)}function S(g,D){var U=new k,F=this,$=g.Bucket,w=g.Region,H=g.Key,N=g.CopySource,X=P.getSourceParams.call(this,N);if(!X){D(P.error(new Error("CopySource format error")));return}var J=X.Bucket,ce=X.Region,se=decodeURIComponent(X.Key),re=g.CopySliceSize===void 0?F.options.CopySliceSize:g.CopySliceSize;re=Math.max(0,re);var Z=g.CopyChunkSize||this.options.CopyChunkSize,te=this.options.CopyChunkParallelLimit,ie=this.options.ChunkRetryTimes+1,we=0,de=0,Y,pe,oe={},le={},ye={};U.on("copy_slice_complete",function(ve){var me={};P.each(g.Headers,function(Se,be){be.toLowerCase().indexOf("x-cos-meta-")===0&&(me[be]=Se)});var Ee=P.map(ve.PartList,function(Se){return{PartNumber:Se.PartNumber,ETag:Se.ETag}});l.retry(ie,function(Se){F.multipartComplete({Bucket:$,Region:w,Key:H,UploadId:ve.UploadId,Parts:Ee,calledBySdk:"sliceCopyFile"},Se)},function(Se,be){if(T.removeUsing(ve.UploadId),Se)return pe(null,!0),D(Se);T.removeUploadId(ve.UploadId),pe({loaded:Y,total:Y},!0),D(null,be)})}),U.on("get_copy_data_finish",function(ve){var me=T.getCopyFileId(N,oe,Z,$,H);me&&T.saveUploadId(me,ve.UploadId,F.options.UploadIdCacheLimit),T.setUsing(ve.UploadId);var Ee=P.filter(ve.PartList,function(Se){return Se.Uploaded&&(de+=Se.PartNumber>=we&&Y%Z||Z),!Se.Uploaded});l.eachLimit(Ee,te,function(Se,be){var Ae=Se.PartNumber,V=Se.CopySourceRange,x=Se.end-Se.start;l.retry(ie,function(I){m.call(F,{Bucket:$,Region:w,Key:H,CopySource:N,UploadId:ve.UploadId,PartNumber:Ae,CopySourceRange:V},I)},function(I,d){if(I)return be(I);de+=x,pe({loaded:de,total:Y}),Se.ETag=d.ETag,be(I||null,d)})},function(Se){if(Se)return T.removeUsing(ve.UploadId),pe(null,!0),D(Se);U.emit("copy_slice_complete",ve)})}),U.on("get_chunk_size_finish",function(){var ve=function(){F.multipartInit({Bucket:$,Region:w,Key:H,Headers:ye},function(Ae,V){if(Ae)return D(Ae);g.UploadId=V.UploadId,U.emit("get_copy_data_finish",{UploadId:g.UploadId,PartList:g.PartList})})},me=T.getCopyFileId(N,oe,Z,$,H),Ee=T.getUploadIdList(me);if(!me||!Ee)return ve();var Se=function be(Ae){if(Ae>=Ee.length)return ve();var V=Ee[Ae];if(T.using[V])return be(Ae+1);L.call(F,{Bucket:$,Region:w,Key:H,UploadId:V},function(x,I){if(x)T.removeUploadId(V),be(Ae+1);else{if(T.using[V])return be(Ae+1);var d={},i=0;P.each(I.PartList,function(a){var s=parseInt(a.Size),p=i+s-1;d[a.PartNumber+"|"+i+"|"+p]=a.ETag,i+=s}),P.each(g.PartList,function(a){var s=d[a.PartNumber+"|"+a.start+"|"+a.end];s&&(a.ETag=s,a.Uploaded=!0)}),U.emit("get_copy_data_finish",{UploadId:V,PartList:g.PartList})}})};Se(0)}),U.on("get_file_size_finish",function(){if(function(){for(var me=[1,2,4,8,16,32,64,128,256,512,1024,1024*2,1024*4,1024*5],Ee=1024*1024,Se=0;Se<me.length&&(Ee=me[Se]*1024*1024,!(Y/Ee<=F.options.MaxPartNumber));Se++);g.ChunkSize=Z=Math.max(Z,Ee),we=Math.ceil(Y/Z);for(var be=[],Ae=1;Ae<=we;Ae++){var V=(Ae-1)*Z,x=Ae*Z<Y?Ae*Z-1:Y-1,I={PartNumber:Ae,start:V,end:x,CopySourceRange:"bytes="+V+"-"+x};be.push(I)}g.PartList=be}(),g.Headers["x-cos-metadata-directive"]==="Replaced"?ye=g.Headers:ye=le,ye["x-cos-storage-class"]=g.Headers["x-cos-storage-class"]||le["x-cos-storage-class"],ye=P.clearKey(ye),le["x-cos-storage-class"]==="ARCHIVE"||le["x-cos-storage-class"]==="DEEP_ARCHIVE"){var ve=le["x-cos-restore"];if(!ve||ve==='ongoing-request="true"'){D(P.error(new Error("Unrestored archive object is not allowed to be copied")));return}}delete ye["x-cos-copy-source"],delete ye["x-cos-metadata-directive"],delete ye["x-cos-copy-source-If-Modified-Since"],delete ye["x-cos-copy-source-If-Unmodified-Since"],delete ye["x-cos-copy-source-If-Match"],delete ye["x-cos-copy-source-If-None-Match"],U.emit("get_chunk_size_finish")}),F.headObject({Bucket:J,Region:ce,Key:se},function(ve,me){if(ve){ve.statusCode&&ve.statusCode===404?D(P.error(ve,{ErrorStatus:se+" Not Exist"})):D(ve);return}if(Y=g.FileSize=me.headers["content-length"],Y===void 0||!Y){D(P.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(pe=P.throttleOnProgress.call(F,Y,g.onProgress),Y<=re)g.Headers["x-cos-metadata-directive"]||(g.Headers["x-cos-metadata-directive"]="Copy"),F.putObjectCopy(g,function(Se,be){if(Se)return pe(null,!0),D(Se);pe({loaded:Y,total:Y},!0),D(Se,be)});else{var Ee=me.headers;oe=Ee,le={"Cache-Control":Ee["cache-control"],"Content-Disposition":Ee["content-disposition"],"Content-Encoding":Ee["content-encoding"],"Content-Type":Ee["content-type"],Expires:Ee.expires,"x-cos-storage-class":Ee["x-cos-storage-class"]},P.each(Ee,function(Se,be){var Ae="x-cos-meta-";be.indexOf(Ae)===0&&be.length>Ae.length&&(le[be]=Se)}),U.emit("get_file_size_finish")}})}function m(g,D){var U=g.TaskId,F=g.Bucket,$=g.Region,w=g.Key,H=g.CopySource,N=g.UploadId,X=g.PartNumber*1,J=g.CopySourceRange,ce=this.options.ChunkRetryTimes+1,se=this;l.retry(ce,function(re){se.uploadPartCopy({TaskId:U,Bucket:F,Region:$,Key:w,CopySource:H,UploadId:N,PartNumber:X,CopySourceRange:J},function(Z,te){re(Z||null,te)})},function(re,Z){return D(re,Z)})}var K={sliceUploadFile:B,abortUploadTask:Q,uploadFile:ge,uploadFiles:A,sliceCopyFile:S};y.exports.init=function(g,D){D.transferToTaskMethod(K,"sliceUploadFile"),P.each(K,function(U,F){g.prototype[F]=P.apiWrapper(F,U)})}},"./src/async.js":function(y,C){var u=function(k,P,ee,B){if(B=B||function(){},!k.length||P<=0)return B();var b=0,q=0,L=0;(function z(){if(b>=k.length)return B();for(;L<P&&q<k.length;)q+=1,L+=1,ee(k[q-1],function(_){_?(B(_),B=function(){}):(b+=1,L-=1,b>=k.length?B():z())})})()},v=function(k,P,ee){var B=function b(q){P(function(L,z){L&&q<k?b(q+1):ee(L,z)})};k<1?ee():B(1)},T={eachLimit:u,retry:v};y.exports=T},"./src/base.js":function(y,C,u){var v=u("./node_modules/@babel/runtime/helpers/typeof.js"),T=u("./lib/request.js"),l=u("./src/util.js");function k(e,f){typeof e=="function"&&(f=e,e={});var o=this.options.Protocol||(l.isBrowser&&(typeof location=="undefined"?"undefined":v(location))==="object"&&location.protocol==="http:"?"http:":"https:"),c=this.options.ServiceDomain,t=e.AppId||this.options.appId,n=e.Region;c?(c=c.replace(/\{\{AppId\}\}/ig,t||"").replace(/\{\{Region\}\}/ig,n||"").replace(/\{\{.*?\}\}/ig,""),/^[a-zA-Z]+:\/\//.test(c)||(c=o+"//"+c),c.slice(-1)==="/"&&(c=c.slice(0,-1))):n?c=o+"//cos."+n+".myqcloud.com":c=o+"//service.cos.myqcloud.com";var r="",h=n?"cos."+n+".myqcloud.com":"service.cos.myqcloud.com",E=c.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1");h===E&&(r=h),he.call(this,{Action:"name/cos:GetService",url:c,method:"GET",headers:e.Headers,SignHost:r},function(ne,fe){if(ne)return f(ne);var ue=fe&&fe.ListAllMyBucketsResult&&fe.ListAllMyBucketsResult.Buckets&&fe.ListAllMyBucketsResult.Buckets.Bucket||[];ue=l.isArray(ue)?ue:[ue];var Te=fe&&fe.ListAllMyBucketsResult&&fe.ListAllMyBucketsResult.Owner||{};f(null,{Buckets:ue,Owner:Te,statusCode:fe.statusCode,headers:fe.headers})})}function P(e,f){var o=this,c="";if(e.BucketAZConfig){var t={BucketAZConfig:e.BucketAZConfig};c=l.json2xml({CreateBucketConfiguration:t})}he.call(this,{Action:"name/cos:PutBucket",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,body:c},function(n,r){if(n)return f(n);var h=Ve({protocol:o.options.Protocol,domain:o.options.Domain,bucket:e.Bucket,region:e.Region,isLocation:!0});f(null,{Location:h,statusCode:r.statusCode,headers:r.headers})})}function ee(e,f){he.call(this,{Action:"name/cos:HeadBucket",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,method:"HEAD"},f)}function B(e,f){var o={};o.prefix=e.Prefix||"",o.delimiter=e.Delimiter,o.marker=e.Marker,o["max-keys"]=e.MaxKeys,o["encoding-type"]=e.EncodingType,he.call(this,{Action:"name/cos:GetBucket",ResourceKey:o.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:o},function(c,t){if(c)return f(c);var n=t.ListBucketResult||{},r=n.Contents||[],h=n.CommonPrefixes||[];r=l.isArray(r)?r:[r],h=l.isArray(h)?h:[h];var E=l.clone(n);l.extend(E,{Contents:r,CommonPrefixes:h,statusCode:t.statusCode,headers:t.headers}),f(null,E)})}function b(e,f){he.call(this,{Action:"name/cos:DeleteBucket",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,method:"DELETE"},function(o,c){if(o&&o.statusCode===204)return f(null,{statusCode:o.statusCode});if(o)return f(o);f(null,{statusCode:c.statusCode,headers:c.headers})})}function q(e,f){var o=e.Headers,c="";if(e.AccessControlPolicy){var t=l.clone(e.AccessControlPolicy||{}),n=t.Grants||t.Grant;n=l.isArray(n)?n:[n],delete t.Grant,delete t.Grants,t.AccessControlList={Grant:n},c=l.json2xml({AccessControlPolicy:t}),o["Content-Type"]="application/xml",o["Content-MD5"]=l.binaryBase64(l.md5(c))}l.each(o,function(r,h){h.indexOf("x-cos-grant-")===0&&(o[h]=Ze(o[h]))}),he.call(this,{Action:"name/cos:PutBucketACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:o,action:"acl",body:c},function(r,h){if(r)return f(r);f(null,{statusCode:h.statusCode,headers:h.headers})})}function L(e,f){he.call(this,{Action:"name/cos:GetBucketACL",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"acl"},function(o,c){if(o)return f(o);var t=c.AccessControlPolicy||{},n=t.Owner||{},r=t.AccessControlList.Grant||[];r=l.isArray(r)?r:[r];var h=Qe(t);c.headers&&c.headers["x-cos-acl"]&&(h.ACL=c.headers["x-cos-acl"]),h=l.extend(h,{Owner:n,Grants:r,statusCode:c.statusCode,headers:c.headers}),f(null,h)})}function z(e,f){var o=e.CORSConfiguration||{},c=o.CORSRules||e.CORSRules||[];c=l.clone(l.isArray(c)?c:[c]),l.each(c,function(h){l.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],function(E){var ne=E+"s",fe=h[ne]||h[E]||[];delete h[ne],h[E]=l.isArray(fe)?fe:[fe]})});var t={CORSRule:c};e.ResponseVary&&(t.ResponseVary=e.ResponseVary);var n=l.json2xml({CORSConfiguration:t}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=l.binaryBase64(l.md5(n)),he.call(this,{Action:"name/cos:PutBucketCORS",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"cors",headers:r},function(h,E){if(h)return f(h);f(null,{statusCode:E.statusCode,headers:E.headers})})}function _(e,f){he.call(this,{Action:"name/cos:GetBucketCORS",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"cors"},function(o,c){if(o){if(o.statusCode===404&&o.error&&o.error.Code==="NoSuchCORSConfiguration"){var t={CORSRules:[],statusCode:o.statusCode};o.headers&&(t.headers=o.headers),f(null,t)}else f(o);return}var n=c.CORSConfiguration||{},r=n.CORSRules||n.CORSRule||[];r=l.clone(l.isArray(r)?r:[r]);var h=n.ResponseVary;l.each(r,function(E){l.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],function(ne){var fe=ne+"s",ue=E[fe]||E[ne]||[];delete E[ne],E[fe]=l.isArray(ue)?ue:[ue]})}),f(null,{CORSRules:r,ResponseVary:h,statusCode:c.statusCode,headers:c.headers})})}function j(e,f){he.call(this,{Action:"name/cos:DeleteBucketCORS",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"cors"},function(o,c){if(o&&o.statusCode===204)return f(null,{statusCode:o.statusCode});if(o)return f(o);f(null,{statusCode:c.statusCode||o.statusCode,headers:c.headers})})}function Q(e,f){he.call(this,{Action:"name/cos:GetBucketLocation",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"location"},f)}function M(e,f){var o=e.Policy;try{typeof o=="string"&&(o=JSON.parse(o))}catch(n){}if(!o||typeof o=="string")return f(l.error(new Error("Policy format error")));var c=JSON.stringify(o);o.version||(o.version="2.0");var t=e.Headers;t["Content-Type"]="application/json",t["Content-MD5"]=l.binaryBase64(l.md5(c)),he.call(this,{Action:"name/cos:PutBucketPolicy",method:"PUT",Bucket:e.Bucket,Region:e.Region,action:"policy",body:c,headers:t},function(n,r){if(n&&n.statusCode===204)return f(null,{statusCode:n.statusCode});if(n)return f(n);f(null,{statusCode:r.statusCode,headers:r.headers})})}function ge(e,f){he.call(this,{Action:"name/cos:GetBucketPolicy",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"policy",rawBody:!0},function(o,c){if(o)return o.statusCode&&o.statusCode===403?f(l.error(o,{ErrorStatus:"Access Denied"})):o.statusCode&&o.statusCode===405?f(l.error(o,{ErrorStatus:"Method Not Allowed"})):o.statusCode&&o.statusCode===404?f(l.error(o,{ErrorStatus:"Policy Not Found"})):f(o);var t={};try{t=JSON.parse(c.body)}catch(n){}f(null,{Policy:t,statusCode:c.statusCode,headers:c.headers})})}function A(e,f){he.call(this,{Action:"name/cos:DeleteBucketPolicy",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"policy"},function(o,c){if(o&&o.statusCode===204)return f(null,{statusCode:o.statusCode});if(o)return f(o);f(null,{statusCode:c.statusCode||o.statusCode,headers:c.headers})})}function S(e,f){var o=e.Tagging||{},c=o.TagSet||o.Tags||e.Tags||[];c=l.clone(l.isArray(c)?c:[c]);var t=l.json2xml({Tagging:{TagSet:{Tag:c}}}),n=e.Headers;n["Content-Type"]="application/xml",n["Content-MD5"]=l.binaryBase64(l.md5(t)),he.call(this,{Action:"name/cos:PutBucketTagging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:t,action:"tagging",headers:n},function(r,h){if(r&&r.statusCode===204)return f(null,{statusCode:r.statusCode});if(r)return f(r);f(null,{statusCode:h.statusCode,headers:h.headers})})}function m(e,f){he.call(this,{Action:"name/cos:GetBucketTagging",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging"},function(o,c){if(o){if(o.statusCode===404&&o.error&&(o.error==="Not Found"||o.error.Code==="NoSuchTagSet")){var t={Tags:[],statusCode:o.statusCode};o.headers&&(t.headers=o.headers),f(null,t)}else f(o);return}var n=[];try{n=c.Tagging.TagSet.Tag||[]}catch(r){}n=l.clone(l.isArray(n)?n:[n]),f(null,{Tags:n,statusCode:c.statusCode,headers:c.headers})})}function K(e,f){he.call(this,{Action:"name/cos:DeleteBucketTagging",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging"},function(o,c){if(o&&o.statusCode===204)return f(null,{statusCode:o.statusCode});if(o)return f(o);f(null,{statusCode:c.statusCode,headers:c.headers})})}function g(e,f){var o=e.LifecycleConfiguration||{},c=o.Rules||e.Rules||[];c=l.clone(c);var t=l.json2xml({LifecycleConfiguration:{Rule:c}}),n=e.Headers;n["Content-Type"]="application/xml",n["Content-MD5"]=l.binaryBase64(l.md5(t)),he.call(this,{Action:"name/cos:PutBucketLifecycle",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:t,action:"lifecycle",headers:n},function(r,h){if(r&&r.statusCode===204)return f(null,{statusCode:r.statusCode});if(r)return f(r);f(null,{statusCode:h.statusCode,headers:h.headers})})}function D(e,f){he.call(this,{Action:"name/cos:GetBucketLifecycle",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"lifecycle"},function(o,c){if(o){if(o.statusCode===404&&o.error&&o.error.Code==="NoSuchLifecycleConfiguration"){var t={Rules:[],statusCode:o.statusCode};o.headers&&(t.headers=o.headers),f(null,t)}else f(o);return}var n=[];try{n=c.LifecycleConfiguration.Rule||[]}catch(r){}n=l.clone(l.isArray(n)?n:[n]),f(null,{Rules:n,statusCode:c.statusCode,headers:c.headers})})}function U(e,f){he.call(this,{Action:"name/cos:DeleteBucketLifecycle",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"lifecycle"},function(o,c){if(o&&o.statusCode===204)return f(null,{statusCode:o.statusCode});if(o)return f(o);f(null,{statusCode:c.statusCode,headers:c.headers})})}function F(e,f){if(!e.VersioningConfiguration){f(l.error(new Error("missing param VersioningConfiguration")));return}var o=e.VersioningConfiguration||{},c=l.json2xml({VersioningConfiguration:o}),t=e.Headers;t["Content-Type"]="application/xml",t["Content-MD5"]=l.binaryBase64(l.md5(c)),he.call(this,{Action:"name/cos:PutBucketVersioning",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:c,action:"versioning",headers:t},function(n,r){if(n&&n.statusCode===204)return f(null,{statusCode:n.statusCode});if(n)return f(n);f(null,{statusCode:r.statusCode,headers:r.headers})})}function $(e,f){he.call(this,{Action:"name/cos:GetBucketVersioning",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"versioning"},function(o,c){o||!c.VersioningConfiguration&&(c.VersioningConfiguration={}),f(o,c)})}function w(e,f){var o=l.clone(e.ReplicationConfiguration),c=l.json2xml({ReplicationConfiguration:o});c=c.replace(/<(\/?)Rules>/ig,"<$1Rule>"),c=c.replace(/<(\/?)Tags>/ig,"<$1Tag>");var t=e.Headers;t["Content-Type"]="application/xml",t["Content-MD5"]=l.binaryBase64(l.md5(c)),he.call(this,{Action:"name/cos:PutBucketReplication",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:c,action:"replication",headers:t},function(n,r){if(n&&n.statusCode===204)return f(null,{statusCode:n.statusCode});if(n)return f(n);f(null,{statusCode:r.statusCode,headers:r.headers})})}function H(e,f){he.call(this,{Action:"name/cos:GetBucketReplication",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"replication"},function(o,c){if(o){if(o.statusCode===404&&o.error&&(o.error==="Not Found"||o.error.Code==="ReplicationConfigurationnotFoundError")){var t={ReplicationConfiguration:{Rules:[]},statusCode:o.statusCode};o.headers&&(t.headers=o.headers),f(null,t)}else f(o);return}!c.ReplicationConfiguration&&(c.ReplicationConfiguration={}),c.ReplicationConfiguration.Rule&&(c.ReplicationConfiguration.Rules=l.makeArray(c.ReplicationConfiguration.Rule),delete c.ReplicationConfiguration.Rule),f(o,c)})}function N(e,f){he.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"replication"},function(o,c){if(o&&o.statusCode===204)return f(null,{statusCode:o.statusCode});if(o)return f(o);f(null,{statusCode:c.statusCode,headers:c.headers})})}function X(e,f){if(!e.WebsiteConfiguration){f(l.error(new Error("missing param WebsiteConfiguration")));return}var o=l.clone(e.WebsiteConfiguration||{}),c=o.RoutingRules||o.RoutingRule||[];c=l.isArray(c)?c:[c],delete o.RoutingRule,delete o.RoutingRules,c.length&&(o.RoutingRules={RoutingRule:c});var t=l.json2xml({WebsiteConfiguration:o}),n=e.Headers;n["Content-Type"]="application/xml",n["Content-MD5"]=l.binaryBase64(l.md5(t)),he.call(this,{Action:"name/cos:PutBucketWebsite",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:t,action:"website",headers:n},function(r,h){if(r&&r.statusCode===204)return f(null,{statusCode:r.statusCode});if(r)return f(r);f(null,{statusCode:h.statusCode,headers:h.headers})})}function J(e,f){he.call(this,{Action:"name/cos:GetBucketWebsite",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"website"},function(o,c){if(o){if(o.statusCode===404&&o.error.Code==="NoSuchWebsiteConfiguration"){var t={WebsiteConfiguration:{},statusCode:o.statusCode};o.headers&&(t.headers=o.headers),f(null,t)}else f(o);return}var n=c.WebsiteConfiguration||{};if(n.RoutingRules){var r=l.clone(n.RoutingRules.RoutingRule||[]);r=l.makeArray(r),n.RoutingRules=r}f(null,{WebsiteConfiguration:n,statusCode:c.statusCode,headers:c.headers})})}function ce(e,f){he.call(this,{Action:"name/cos:DeleteBucketWebsite",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"website"},function(o,c){if(o&&o.statusCode===204)return f(null,{statusCode:o.statusCode});if(o)return f(o);f(null,{statusCode:c.statusCode,headers:c.headers})})}function se(e,f){if(!e.RefererConfiguration){f(l.error(new Error("missing param RefererConfiguration")));return}var o=l.clone(e.RefererConfiguration||{}),c=o.DomainList||{},t=c.Domains||c.Domain||[];t=l.isArray(t)?t:[t],t.length&&(o.DomainList={Domain:t});var n=l.json2xml({RefererConfiguration:o}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=l.binaryBase64(l.md5(n)),he.call(this,{Action:"name/cos:PutBucketReferer",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"referer",headers:r},function(h,E){if(h&&h.statusCode===204)return f(null,{statusCode:h.statusCode});if(h)return f(h);f(null,{statusCode:E.statusCode,headers:E.headers})})}function re(e,f){he.call(this,{Action:"name/cos:GetBucketReferer",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"referer"},function(o,c){if(o){if(o.statusCode===404&&o.error.Code==="NoSuchRefererConfiguration"){var t={WebsiteConfiguration:{},statusCode:o.statusCode};o.headers&&(t.headers=o.headers),f(null,t)}else f(o);return}var n=c.RefererConfiguration||{};if(n.DomainList){var r=l.makeArray(n.DomainList.Domain||[]);n.DomainList={Domains:r}}f(null,{RefererConfiguration:n,statusCode:c.statusCode,headers:c.headers})})}function Z(e,f){var o=e.DomainConfiguration||{},c=o.DomainRule||e.DomainRule||[];c=l.clone(c);var t=l.json2xml({DomainConfiguration:{DomainRule:c}}),n=e.Headers;n["Content-Type"]="application/xml",n["Content-MD5"]=l.binaryBase64(l.md5(t)),he.call(this,{Action:"name/cos:PutBucketDomain",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:t,action:"domain",headers:n},function(r,h){if(r&&r.statusCode===204)return f(null,{statusCode:r.statusCode});if(r)return f(r);f(null,{statusCode:h.statusCode,headers:h.headers})})}function te(e,f){he.call(this,{Action:"name/cos:GetBucketDomain",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"domain"},function(o,c){if(o)return f(o);var t=[];try{t=c.DomainConfiguration.DomainRule||[]}catch(n){}t=l.clone(l.isArray(t)?t:[t]),f(null,{DomainRule:t,statusCode:c.statusCode,headers:c.headers})})}function ie(e,f){he.call(this,{Action:"name/cos:DeleteBucketDomain",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"domain"},function(o,c){if(o&&o.statusCode===204)return f(null,{statusCode:o.statusCode});if(o)return f(o);f(null,{statusCode:c.statusCode,headers:c.headers})})}function we(e,f){var o=e.OriginConfiguration||{},c=o.OriginRule||e.OriginRule||[];c=l.clone(c);var t=l.json2xml({OriginConfiguration:{OriginRule:c}}),n=e.Headers;n["Content-Type"]="application/xml",n["Content-MD5"]=l.binaryBase64(l.md5(t)),he.call(this,{Action:"name/cos:PutBucketOrigin",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:t,action:"origin",headers:n},function(r,h){if(r&&r.statusCode===204)return f(null,{statusCode:r.statusCode});if(r)return f(r);f(null,{statusCode:h.statusCode,headers:h.headers})})}function de(e,f){he.call(this,{Action:"name/cos:GetBucketOrigin",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"origin"},function(o,c){if(o)return f(o);var t=[];try{t=c.OriginConfiguration.OriginRule||[]}catch(n){}t=l.clone(l.isArray(t)?t:[t]),f(null,{OriginRule:t,statusCode:c.statusCode,headers:c.headers})})}function Y(e,f){he.call(this,{Action:"name/cos:DeleteBucketOrigin",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"origin"},function(o,c){if(o&&o.statusCode===204)return f(null,{statusCode:o.statusCode});if(o)return f(o);f(null,{statusCode:c.statusCode,headers:c.headers})})}function pe(e,f){var o=l.json2xml({BucketLoggingStatus:e.BucketLoggingStatus||""}),c=e.Headers;c["Content-Type"]="application/xml",c["Content-MD5"]=l.binaryBase64(l.md5(o)),he.call(this,{Action:"name/cos:PutBucketLogging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,action:"logging",headers:c},function(t,n){if(t&&t.statusCode===204)return f(null,{statusCode:t.statusCode});if(t)return f(t);f(null,{statusCode:n.statusCode,headers:n.headers})})}function oe(e,f){he.call(this,{Action:"name/cos:GetBucketLogging",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"logging"},function(o,c){if(o)return f(o);f(null,{BucketLoggingStatus:c.BucketLoggingStatus,statusCode:c.statusCode,headers:c.headers})})}function le(e,f){var o=l.clone(e.InventoryConfiguration);if(o.OptionalFields){var c=o.OptionalFields||[];o.OptionalFields={Field:c}}if(o.Destination&&o.Destination.COSBucketDestination&&o.Destination.COSBucketDestination.Encryption){var t=o.Destination.COSBucketDestination.Encryption;Object.keys(t).indexOf("SSECOS")>-1&&(t["SSE-COS"]=t.SSECOS,delete t.SSECOS)}var n=l.json2xml({InventoryConfiguration:o}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=l.binaryBase64(l.md5(n)),he.call(this,{Action:"name/cos:PutBucketInventory",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"inventory",qs:{id:e.Id},headers:r},function(h,E){if(h&&h.statusCode===204)return f(null,{statusCode:h.statusCode});if(h)return f(h);f(null,{statusCode:E.statusCode,headers:E.headers})})}function ye(e,f){he.call(this,{Action:"name/cos:GetBucketInventory",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{id:e.Id}},function(o,c){if(o)return f(o);var t=c.InventoryConfiguration;if(t&&t.OptionalFields&&t.OptionalFields.Field){var n=t.OptionalFields.Field;l.isArray(n)||(n=[n]),t.OptionalFields=n}if(t.Destination&&t.Destination.COSBucketDestination&&t.Destination.COSBucketDestination.Encryption){var r=t.Destination.COSBucketDestination.Encryption;Object.keys(r).indexOf("SSE-COS")>-1&&(r.SSECOS=r["SSE-COS"],delete r["SSE-COS"])}f(null,{InventoryConfiguration:t,statusCode:c.statusCode,headers:c.headers})})}function ve(e,f){he.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(o,c){if(o)return f(o);var t=c.ListInventoryConfigurationResult,n=t.InventoryConfiguration||[];n=l.isArray(n)?n:[n],delete t.InventoryConfiguration,l.each(n,function(r){if(r&&r.OptionalFields&&r.OptionalFields.Field){var h=r.OptionalFields.Field;l.isArray(h)||(h=[h]),r.OptionalFields=h}if(r.Destination&&r.Destination.COSBucketDestination&&r.Destination.COSBucketDestination.Encryption){var E=r.Destination.COSBucketDestination.Encryption;Object.keys(E).indexOf("SSE-COS")>-1&&(E.SSECOS=E["SSE-COS"],delete E["SSE-COS"])}}),t.InventoryConfigurations=n,l.extend(t,{statusCode:c.statusCode,headers:c.headers}),f(null,t)})}function me(e,f){he.call(this,{Action:"name/cos:DeleteBucketInventory",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{id:e.Id}},function(o,c){if(o&&o.statusCode===204)return f(null,{statusCode:o.statusCode});if(o)return f(o);f(null,{statusCode:c.statusCode,headers:c.headers})})}function Ee(e,f){if(!e.AccelerateConfiguration){f(l.error(new Error("missing param AccelerateConfiguration")));return}var o={AccelerateConfiguration:e.AccelerateConfiguration||{}},c=l.json2xml(o),t={};t["Content-Type"]="application/xml",t["Content-MD5"]=l.binaryBase64(l.md5(c)),he.call(this,{Action:"name/cos:PutBucketAccelerate",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:c,action:"accelerate",headers:t},function(n,r){if(n)return f(n);f(null,{statusCode:r.statusCode,headers:r.headers})})}function Se(e,f){he.call(this,{Action:"name/cos:GetBucketAccelerate",method:"GET",Bucket:e.Bucket,Region:e.Region,action:"accelerate"},function(o,c){o||!c.AccelerateConfiguration&&(c.AccelerateConfiguration={}),f(o,c)})}function be(e,f){var o=e.ServerSideEncryptionConfiguration||{},c=o.Rule||o.Rules||[],t=l.json2xml({ServerSideEncryptionConfiguration:{Rule:c}}),n=e.Headers;n["Content-Type"]="application/xml",n["Content-MD5"]=l.binaryBase64(l.md5(t)),he.call(this,{Action:"name/cos:PutBucketEncryption",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:t,action:"encryption",headers:n},function(r,h){if(r&&r.statusCode===204)return f(null,{statusCode:r.statusCode});if(r)return f(r);f(null,{statusCode:h.statusCode,headers:h.headers})})}function Ae(e,f){he.call(this,{Action:"name/cos:GetBucketEncryption",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"encryption"},function(o,c){if(o){if(o.statusCode===404&&o.code==="NoSuchEncryptionConfiguration"){var t={EncryptionConfiguration:{Rules:[]},statusCode:o.statusCode};o.headers&&(t.headers=o.headers),f(null,t)}else f(o);return}var n=l.makeArray(c.EncryptionConfiguration&&c.EncryptionConfiguration.Rule||[]);c.EncryptionConfiguration={Rules:n},f(o,c)})}function V(e,f){he.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"encryption"},function(o,c){if(o&&o.statusCode===204)return f(null,{statusCode:o.statusCode});if(o)return f(o);f(null,{statusCode:c.statusCode,headers:c.headers})})}function x(e,f){he.call(this,{Action:"name/cos:HeadObject",method:"HEAD",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers},function(o,c){if(o){var t=o.statusCode;return e.Headers["If-Modified-Since"]&&t&&t===304?f(null,{NotModified:!0,statusCode:t}):f(o)}c.ETag=l.attr(c.headers,"etag",""),f(null,c)})}function I(e,f){var o={};o.prefix=e.Prefix||"",o.delimiter=e.Delimiter,o["key-marker"]=e.KeyMarker,o["version-id-marker"]=e.VersionIdMarker,o["max-keys"]=e.MaxKeys,o["encoding-type"]=e.EncodingType,he.call(this,{Action:"name/cos:GetBucketObjectVersions",ResourceKey:o.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:o,action:"versions"},function(c,t){if(c)return f(c);var n=t.ListVersionsResult||{},r=n.DeleteMarker||[];r=l.isArray(r)?r:[r];var h=n.Version||[];h=l.isArray(h)?h:[h];var E=l.clone(n);delete E.DeleteMarker,delete E.Version,l.extend(E,{DeleteMarkers:r,Versions:h,statusCode:t.statusCode,headers:t.headers}),f(null,E)})}function d(e,f){var o=e.Query||{},c=e.QueryString||"",t=l.throttleOnProgress.call(this,0,e.onProgress),n=e.tracker;n&&n.setParams({signStartTime:new Date().getTime()}),o["response-content-type"]=e.ResponseContentType,o["response-content-language"]=e.ResponseContentLanguage,o["response-expires"]=e.ResponseExpires,o["response-cache-control"]=e.ResponseCacheControl,o["response-content-disposition"]=e.ResponseContentDisposition,o["response-content-encoding"]=e.ResponseContentEncoding,he.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:o,qsStr:c,rawBody:!0,onDownloadProgress:t,tracker:n},function(r,h){if(t(null,!0),r){var E=r.statusCode;return e.Headers["If-Modified-Since"]&&E&&E===304?f(null,{NotModified:!0}):f(r)}f(null,{Body:h.body,ETag:l.attr(h.headers,"etag",""),statusCode:h.statusCode,headers:h.headers})})}function i(e,f){var o=this,c=e.ContentLength,t=l.throttleOnProgress.call(o,c,e.onProgress),n=e.Headers;!n["Cache-Control"]&&!n["cache-control"]&&(n["Cache-Control"]=""),!n["Content-Type"]&&!n["content-type"]&&(n["Content-Type"]=e.Body&&e.Body.type||"");var r=e.UploadAddMetaMd5||o.options.UploadAddMetaMd5||o.options.UploadCheckContentMd5,h=e.tracker;r&&h&&h.setParams({md5StartTime:new Date().getTime()}),l.getBodyMd5(r,e.Body,function(E){E&&(h&&h.setParams({md5EndTime:new Date().getTime()}),o.options.UploadCheckContentMd5&&(n["Content-MD5"]=l.binaryBase64(E)),(e.UploadAddMetaMd5||o.options.UploadAddMetaMd5)&&(n["x-cos-meta-md5"]=E)),e.ContentLength!==void 0&&(n["Content-Length"]=e.ContentLength),t(null,!0),he.call(o,{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:t,tracker:h},function(ne,fe){if(ne)return t(null,!0),f(ne);t({loaded:c,total:c},!0);var ue=Ve({ForcePathStyle:o.options.ForcePathStyle,protocol:o.options.Protocol,domain:o.options.Domain,bucket:e.Bucket,region:o.options.UseAccelerate?"accelerate":e.Region,object:e.Key});ue=ue.substr(ue.indexOf("://")+3),fe.Location=ue,fe.ETag=l.attr(fe.headers,"etag",""),f(null,fe)})},e.onHashProgress)}function a(e,f){he.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(o,c){if(o){var t=o.statusCode;return t&&t===404?f(null,{BucketNotFound:!0,statusCode:t}):f(o)}f(null,{statusCode:c.statusCode,headers:c.headers})})}function s(e,f){var o={};e.VersionId&&(o.versionId=e.VersionId),he.call(this,{Action:"name/cos:GetObjectACL",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:o,action:"acl"},function(c,t){if(c)return f(c);var n=t.AccessControlPolicy||{},r=n.Owner||{},h=n.AccessControlList&&n.AccessControlList.Grant||[];h=l.isArray(h)?h:[h];var E=Qe(n);delete E.GrantWrite,t.headers&&t.headers["x-cos-acl"]&&(E.ACL=t.headers["x-cos-acl"]),E=l.extend(E,{Owner:r,Grants:h,statusCode:t.statusCode,headers:t.headers}),f(null,E)})}function p(e,f){var o=e.Headers,c="";if(e.AccessControlPolicy){var t=l.clone(e.AccessControlPolicy||{}),n=t.Grants||t.Grant;n=l.isArray(n)?n:[n],delete t.Grant,delete t.Grants,t.AccessControlList={Grant:n},c=l.json2xml({AccessControlPolicy:t}),o["Content-Type"]="application/xml",o["Content-MD5"]=l.binaryBase64(l.md5(c))}l.each(o,function(r,h){h.indexOf("x-cos-grant-")===0&&(o[h]=Ze(o[h]))}),he.call(this,{Action:"name/cos:PutObjectACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"acl",headers:o,body:c},function(r,h){if(r)return f(r);f(null,{statusCode:h.statusCode,headers:h.headers})})}function R(e,f){var o=e.Headers;o.Origin=e.Origin,o["Access-Control-Request-Method"]=e.AccessControlRequestMethod,o["Access-Control-Request-Headers"]=e.AccessControlRequestHeaders,he.call(this,{Action:"name/cos:OptionsObject",method:"OPTIONS",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:o},function(c,t){if(c)return c.statusCode&&c.statusCode===403?f(null,{OptionsForbidden:!0,statusCode:c.statusCode}):f(c);var n=t.headers||{};f(null,{AccessControlAllowOrigin:n["access-control-allow-origin"],AccessControlAllowMethods:n["access-control-allow-methods"],AccessControlAllowHeaders:n["access-control-allow-headers"],AccessControlExposeHeaders:n["access-control-expose-headers"],AccessControlMaxAge:n["access-control-max-age"],statusCode:t.statusCode,headers:t.headers})})}function O(e,f){var o=this,c=e.Headers;!c["Cache-Control"]&&!c["cache-control"]&&(c["Cache-Control"]="");var t=e.CopySource||"",n=l.getSourceParams.call(this,t);if(!n){f(l.error(new Error("CopySource format error")));return}var r=n.Bucket,h=n.Region,E=decodeURIComponent(n.Key);he.call(this,{Scope:[{action:"name/cos:GetObject",bucket:r,region:h,prefix:E},{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(ne,fe){if(ne)return f(ne);var ue=l.clone(fe.CopyObjectResult||{}),Te=Ve({ForcePathStyle:o.options.ForcePathStyle,protocol:o.options.Protocol,domain:o.options.Domain,bucket:e.Bucket,region:e.Region,object:e.Key,isLocation:!0});l.extend(ue,{Location:Te,statusCode:fe.statusCode,headers:fe.headers}),f(null,ue)})}function G(e,f){var o=e.CopySource||"",c=l.getSourceParams.call(this,o);if(!c){f(l.error(new Error("CopySource format error")));return}var t=c.Bucket,n=c.Region,r=decodeURIComponent(c.Key);he.call(this,{Scope:[{action:"name/cos:GetObject",bucket:t,region:n,prefix:r},{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(h,E){if(h)return f(h);var ne=l.clone(E.CopyPartResult||{});l.extend(ne,{statusCode:E.statusCode,headers:E.headers}),f(null,ne)})}function ae(e,f){var o=e.Objects||[],c=e.Quiet;o=l.isArray(o)?o:[o];var t=l.json2xml({Delete:{Object:o,Quiet:c||!1}}),n=e.Headers;n["Content-Type"]="application/xml",n["Content-MD5"]=l.binaryBase64(l.md5(t));var r=l.map(o,function(h){return{action:"name/cos:DeleteObject",bucket:e.Bucket,region:e.Region,prefix:h.Key}});he.call(this,{Scope:r,method:"POST",Bucket:e.Bucket,Region:e.Region,body:t,action:"delete",headers:n},function(h,E){if(h)return f(h);var ne=E.DeleteResult||{},fe=ne.Deleted||[],ue=ne.Error||[];fe=l.isArray(fe)?fe:[fe],ue=l.isArray(ue)?ue:[ue];var Te=l.clone(ne);l.extend(Te,{Error:ue,Deleted:fe,statusCode:E.statusCode,headers:E.headers}),f(null,Te)})}function Ce(e,f){var o=e.Headers;if(!e.RestoreRequest){f(l.error(new Error("missing param RestoreRequest")));return}var c=e.RestoreRequest||{},t=l.json2xml({RestoreRequest:c});o["Content-Type"]="application/xml",o["Content-MD5"]=l.binaryBase64(l.md5(t)),he.call(this,{Action:"name/cos:RestoreObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,body:t,action:"restore",headers:o},f)}function W(e,f){var o=e.Tagging||{},c=o.TagSet||o.Tags||e.Tags||[];c=l.clone(l.isArray(c)?c:[c]);var t=l.json2xml({Tagging:{TagSet:{Tag:c}}}),n=e.Headers;n["Content-Type"]="application/xml",n["Content-MD5"]=l.binaryBase64(l.md5(t)),he.call(this,{Action:"name/cos:PutObjectTagging",method:"PUT",Bucket:e.Bucket,Key:e.Key,Region:e.Region,body:t,action:"tagging",headers:n,VersionId:e.VersionId},function(r,h){if(r&&r.statusCode===204)return f(null,{statusCode:r.statusCode});if(r)return f(r);f(null,{statusCode:h.statusCode,headers:h.headers})})}function Oe(e,f){he.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(o,c){if(o){if(o.statusCode===404&&o.error&&(o.error==="Not Found"||o.error.Code==="NoSuchTagSet")){var t={Tags:[],statusCode:o.statusCode};o.headers&&(t.headers=o.headers),f(null,t)}else f(o);return}var n=[];try{n=c.Tagging.TagSet.Tag||[]}catch(r){}n=l.clone(l.isArray(n)?n:[n]),f(null,{Tags:n,statusCode:c.statusCode,headers:c.headers})})}function ke(e,f){he.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(o,c){if(o&&o.statusCode===204)return f(null,{statusCode:o.statusCode});if(o)return f(o);f(null,{statusCode:c.statusCode,headers:c.headers})})}function Ie(e,f){var o=e.SelectType;if(!o)return f(l.error(new Error("missing param SelectType")));var c=e.SelectRequest||{},t=l.json2xml({SelectRequest:c}),n=e.Headers;n["Content-Type"]="application/xml",n["Content-MD5"]=l.binaryBase64(l.md5(t)),he.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:t,DataType:"arraybuffer",rawBody:!0},function(r,h){if(r&&r.statusCode===204)return f(null,{statusCode:r.statusCode});if(r)return f(r);var E=l.parseSelectPayload(h.body);f(null,{statusCode:h.statusCode,headers:h.headers,Body:E.body,Payload:E.payload})})}function Pe(e,f){var o=this,c=e.Headers,t=e.tracker;!c["Cache-Control"]&&!c["cache-control"]&&(c["Cache-Control"]=""),!c["Content-Type"]&&!c["content-type"]&&(c["Content-Type"]=e.Body&&e.Body.type||"");var n=e.Body&&(e.UploadAddMetaMd5||o.options.UploadAddMetaMd5);n&&t&&t.setParams({md5StartTime:new Date().getTime()}),l.getBodyMd5(n,e.Body,function(r){r&&(e.Headers["x-cos-meta-md5"]=r),n&&t&&t.setParams({md5EndTime:new Date().getTime()}),he.call(o,{Action:"name/cos:InitiateMultipartUpload",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"uploads",headers:e.Headers,qs:e.Query,tracker:t},function(h,E){if(h)return t&&t.parent&&t.parent.setParams({errorNode:"multipartInit"}),f(h);if(E=l.clone(E||{}),E&&E.InitiateMultipartUploadResult)return f(null,l.extend(E.InitiateMultipartUploadResult,{statusCode:E.statusCode,headers:E.headers}));f(null,E)})},e.onHashProgress)}function Me(e,f){var o=this;l.getFileSize("multipartUpload",e,function(){var c=e.tracker,t=o.options.UploadCheckContentMd5;t&&c&&c.setParams({md5StartTime:new Date().getTime()}),l.getBodyMd5(t,e.Body,function(n){n&&(e.Headers["Content-MD5"]=l.binaryBase64(n)),t&&c&&c.setParams({md5EndTime:new Date().getTime()}),c&&c.setParams({partNumber:e.PartNumber}),he.call(o,{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:c},function(r,h){if(r)return c&&c.parent&&c.parent.setParams({errorNode:"multipartUpload"}),f(r);f(null,{ETag:l.attr(h.headers,"etag",""),statusCode:h.statusCode,headers:h.headers})})})})}function Ge(e,f){for(var o=this,c=e.UploadId,t=e.Parts,n=e.tracker,r=0,h=t.length;r<h;r++)t[r].ETag&&t[r].ETag.indexOf('"')===0||(t[r].ETag='"'+t[r].ETag+'"');var E=l.json2xml({CompleteMultipartUpload:{Part:t}});E=E.replace(/\n\s*/g,"");var ne=e.Headers;ne["Content-Type"]="application/xml",ne["Content-MD5"]=l.binaryBase64(l.md5(E)),he.call(this,{Action:"name/cos:CompleteMultipartUpload",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,qs:{uploadId:c},body:E,headers:ne,tracker:n},function(fe,ue){if(fe)return n&&n.parent&&n.parent.setParams({errorNode:"multipartComplete"}),f(fe);var Te=Ve({ForcePathStyle:o.options.ForcePathStyle,protocol:o.options.Protocol,domain:o.options.Domain,bucket:e.Bucket,region:e.Region,object:e.Key,isLocation:!0}),Be=ue.CompleteMultipartUploadResult||{};Be.ProcessResults&&Be&&Be.ProcessResults&&(Be.UploadResult={OriginalInfo:{Key:Be.Key,Location:Te,ETag:Be.ETag,ImageInfo:Be.ImageInfo},ProcessResults:Be.ProcessResults},delete Be.ImageInfo,delete Be.ProcessResults);var Ue=l.extend(Be,{Location:Te,statusCode:ue.statusCode,headers:ue.headers});f(null,Ue)})}function Fe(e,f){var o={};o.delimiter=e.Delimiter,o["encoding-type"]=e.EncodingType,o.prefix=e.Prefix||"",o["max-uploads"]=e.MaxUploads,o["key-marker"]=e.KeyMarker,o["upload-id-marker"]=e.UploadIdMarker,o=l.clearKey(o);var c=e.tracker;c&&c.setParams({signStartTime:new Date().getTime()}),he.call(this,{Action:"name/cos:ListMultipartUploads",ResourceKey:o.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:o,action:"uploads",tracker:c},function(t,n){if(t)return c&&c.parent&&c.parent.setParams({errorNode:"multipartList"}),f(t);if(n&&n.ListMultipartUploadsResult){var r=n.ListMultipartUploadsResult.Upload||[];r=l.isArray(r)?r:[r],n.ListMultipartUploadsResult.Upload=r}var h=l.clone(n.ListMultipartUploadsResult||{});l.extend(h,{statusCode:n.statusCode,headers:n.headers}),f(null,h)})}function je(e,f){var o={},c=e.tracker;o.uploadId=e.UploadId,o["encoding-type"]=e.EncodingType,o["max-parts"]=e.MaxParts,o["part-number-marker"]=e.PartNumberMarker,he.call(this,{Action:"name/cos:ListParts",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:o},function(t,n){if(t)return c&&c.parent&&c.parent.setParams({errorNode:"multipartListPart"}),f(t);var r=n.ListPartsResult||{},h=r.Part||[];h=l.isArray(h)?h:[h],r.Part=h;var E=l.clone(r);l.extend(E,{statusCode:n.statusCode,headers:n.headers}),f(null,E)})}function Ne(e,f){var o={};o.uploadId=e.UploadId,he.call(this,{Action:"name/cos:AbortMultipartUpload",method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:o},function(c,t){if(c)return f(c);f(null,{statusCode:t.statusCode,headers:t.headers})})}function ze(e,f){he.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(o,c){if(o)return f(o);c&&c.body&&(c.Body=c.body,delete c.body),f(o,c)})}function Xe(e,f){var o=e.Headers;!o["Cache-Control"]&&!o["cache-control"]&&(o["Cache-Control"]=""),!o["Content-Type"]&&!o["content-type"]&&(o["Content-Type"]=e.Body&&e.Body.type||""),he.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(c,t){if(c)return f(c);f(null,t)})}function nt(e){var f=this;return l.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:f.options.UseRawKey,SystemClockOffset:f.options.SystemClockOffset})}function Ye(e,f){var o=this,c=e.UseAccelerate===void 0?o.options.UseAccelerate:e.UseAccelerate,t=Ve({ForcePathStyle:o.options.ForcePathStyle,protocol:e.Protocol||o.options.Protocol,domain:e.Domain||o.options.Domain,bucket:e.Bucket,region:c?"accelerate":e.Region,object:e.Key}),n="";e.Query&&(n+=l.obj2str(e.Query)),e.QueryString&&(n+=(n?"&":"")+e.QueryString);var r=t;if(e.Sign!==void 0&&!e.Sign)return n&&(r+="?"+n),f(null,{Url:r}),r;var h=Je.call(this,{Bucket:e.Bucket,Region:e.Region,UseAccelerate:e.UseAccelerate,Url:t}),E=$e.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:h,ForceSignHost:e.ForceSignHost===!1?!1:o.options.ForceSignHost},function(ne,fe){if(!!f){if(ne){f(ne);return}var ue=function(Ue){var We=Ue.match(/q-url-param-list.*?(?=&)/g)[0],He="q-url-param-list="+encodeURIComponent(We.replace(/q-url-param-list=/,"")).toLowerCase(),Le=new RegExp(We,"g"),qe=Ue.replace(Le,He);return qe},Te=t;Te+="?"+(fe.Authorization.indexOf("q-signature")>-1?ue(fe.Authorization):"sign="+encodeURIComponent(fe.Authorization)),fe.SecurityToken&&(Te+="&x-cos-security-token="+fe.SecurityToken),fe.ClientIP&&(Te+="&clientIP="+fe.ClientIP),fe.ClientUA&&(Te+="&clientUA="+fe.ClientUA),fe.Token&&(Te+="&token="+fe.Token),n&&(Te+="&"+n),setTimeout(function(){f(null,{Url:Te})})}});return E?(r+="?"+E.Authorization+(E.SecurityToken?"&x-cos-security-token="+E.SecurityToken:""),n&&(r+="&"+n)):n&&(r+="?"+n),r}function Qe(e){var f={GrantFullControl:[],GrantWrite:[],GrantRead:[],GrantReadAcp:[],GrantWriteAcp:[],ACL:""},o={FULL_CONTROL:"GrantFullControl",WRITE:"GrantWrite",READ:"GrantRead",READ_ACP:"GrantReadAcp",WRITE_ACP:"GrantWriteAcp"},c=e&&e.AccessControlList||{},t=c.Grant;t&&(t=l.isArray(t)?t:[t]);var n={READ:0,WRITE:0,FULL_CONTROL:0};return t&&t.length&&l.each(t,function(r){r.Grantee.ID==="qcs::cam::anyone:anyone"||r.Grantee.URI==="http://cam.qcloud.com/groups/global/AllUsers"?n[r.Permission]=1:r.Grantee.ID!==e.Owner.ID&&f[o[r.Permission]].push('id="'+r.Grantee.ID+'"')}),n.FULL_CONTROL||n.WRITE&&n.READ?f.ACL="public-read-write":n.READ?f.ACL="public-read":f.ACL="private",l.each(o,function(r){f[r]=Ze(f[r].join(","))}),f}function Ze(e){var f=e.split(","),o={},c,t;for(c=0;c<f.length;)t=f[c].trim(),o[t]?f.splice(c,1):(o[t]=!0,f[c]=t,c++);return f.join(",")}function Ve(e){var f=e.region||"",o=e.bucket||"",c=o.substr(0,o.lastIndexOf("-")),t=o.substr(o.lastIndexOf("-")+1),n=e.domain,r=e.object;typeof n=="function"&&(n=n({Bucket:o,Region:f})),["http","https"].includes(e.protocol)&&(e.protocol=e.protocol+":");var h=e.protocol||(l.isBrowser&&(typeof location=="undefined"?"undefined":v(location))==="object"&&location.protocol==="http:"?"http:":"https:");n||(["cn-south","cn-south-2","cn-north","cn-east","cn-southwest","sg"].indexOf(f)>-1?n="{Region}.myqcloud.com":n="cos.{Region}.myqcloud.com",e.ForcePathStyle||(n="{Bucket}."+n)),n=n.replace(/\{\{AppId\}\}/ig,t).replace(/\{\{Bucket\}\}/ig,c).replace(/\{\{Region\}\}/ig,f).replace(/\{\{.*?\}\}/ig,""),n=n.replace(/\{AppId\}/ig,t).replace(/\{BucketName\}/ig,c).replace(/\{Bucket\}/ig,o).replace(/\{Region\}/ig,f).replace(/\{.*?\}/ig,""),/^[a-zA-Z]+:\/\//.test(n)||(n=h+"//"+n),n.slice(-1)==="/"&&(n=n.slice(0,-1));var E=n;return e.ForcePathStyle&&(E+="/"+o),E+="/",r&&(E+=l.camSafeUrlEncode(r).replace(/%2F/g,"/")),e.isLocation&&(E=E.replace(/^https?:\/\//,"")),E}var Je=function(f){if(!f.Bucket||!f.Region)return"";var o=f.UseAccelerate===void 0?this.options.UseAccelerate:f.UseAccelerate,c=f.Url||Ve({ForcePathStyle:this.options.ForcePathStyle,protocol:this.options.Protocol,domain:this.options.Domain,bucket:f.Bucket,region:o?"accelerate":f.Region}),t=c.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1"),n=new RegExp("^([a-z\\d-]+-\\d+\\.)?(cos|cosv6|ci|pic)\\.([a-z\\d-]+)\\.myqcloud\\.com$");return n.test(t)?t:""};function $e(e,f){var o=l.clone(e.Headers),c="";l.each(o,function(xe,Re){(xe===""||["content-type","cache-control","expires"].indexOf(Re.toLowerCase())>-1)&&delete o[Re],Re.toLowerCase()==="host"&&(c=xe)});var t=e.ForceSignHost!==!1;!c&&e.SignHost&&t&&(o.Host=e.SignHost);var n=!1,r=function(Re,_e){n||(n=!0,_e&&_e.XCosSecurityToken&&!_e.SecurityToken&&(_e=l.clone(_e),_e.SecurityToken=_e.XCosSecurityToken,delete _e.XCosSecurityToken),f&&f(Re,_e))},h=this,E=e.Bucket||"",ne=e.Region||"",fe=e.Key||"";h.options.ForcePathStyle&&E&&(fe=E+"/"+fe);var ue="/"+fe,Te={},Be=e.Scope;if(!Be){var Ue=e.Action||"",We=e.ResourceKey||e.Key||"";Be=e.Scope||[{action:Ue,bucket:E,region:ne,prefix:We}]}var He=l.md5(JSON.stringify(Be));h._StsCache=h._StsCache||[],function(){var xe,Re;for(xe=h._StsCache.length-1;xe>=0;xe--){Re=h._StsCache[xe];var _e=Math.round(l.getSkewTime(h.options.SystemClockOffset)/1e3)+30;if(Re.StartTime&&_e<Re.StartTime||_e>=Re.ExpiredTime){h._StsCache.splice(xe,1);continue}if(!Re.ScopeLimit||Re.ScopeLimit&&Re.ScopeKey===He){Te=Re;break}}}();var Le=function(){var Re="";Te.StartTime&&e.Expires?Re=Te.StartTime+";"+(Te.StartTime+e.Expires*1):Te.StartTime&&Te.ExpiredTime&&(Re=Te.StartTime+";"+Te.ExpiredTime);var _e=l.getAuth({SecretId:Te.TmpSecretId,SecretKey:Te.TmpSecretKey,Method:e.Method,Pathname:ue,Query:e.Query,Headers:o,Expires:e.Expires,UseRawKey:h.options.UseRawKey,SystemClockOffset:h.options.SystemClockOffset,KeyTime:Re,ForceSignHost:t}),De={Authorization:_e,SecurityToken:Te.SecurityToken||Te.XCosSecurityToken||"",Token:Te.Token||"",ClientIP:Te.ClientIP||"",ClientUA:Te.ClientUA||""};r(null,De)},qe=function(Re){if(Re.Authorization){var _e=!1,De=Re.Authorization;if(De)if(De.indexOf(" ")>-1)_e=!1;else if(De.indexOf("q-sign-algorithm=")>-1&&De.indexOf("q-ak=")>-1&&De.indexOf("q-sign-time=")>-1&&De.indexOf("q-key-time=")>-1&&De.indexOf("q-url-param-list=")>-1)_e=!0;else try{De=atob(De),De.indexOf("a=")>-1&&De.indexOf("k=")>-1&&De.indexOf("t=")>-1&&De.indexOf("r=")>-1&&De.indexOf("b=")>-1&&(_e=!0)}catch(Ke){}if(!_e)return l.error(new Error("getAuthorization callback params format error"))}else{if(!Re.TmpSecretId)return l.error(new Error('getAuthorization callback params missing "TmpSecretId"'));if(!Re.TmpSecretKey)return l.error(new Error('getAuthorization callback params missing "TmpSecretKey"'));if(!Re.SecurityToken&&!Re.XCosSecurityToken)return l.error(new Error('getAuthorization callback params missing "SecurityToken"'));if(!Re.ExpiredTime)return l.error(new Error('getAuthorization callback params missing "ExpiredTime"'));if(Re.ExpiredTime&&Re.ExpiredTime.toString().length!==10)return l.error(new Error('getAuthorization callback params "ExpiredTime" should be 10 digits'));if(Re.StartTime&&Re.StartTime.toString().length!==10)return l.error(new Error('getAuthorization callback params "StartTime" should be 10 StartTime'))}return!1};if(Te.ExpiredTime&&Te.ExpiredTime-l.getSkewTime(h.options.SystemClockOffset)/1e3>60)Le();else if(h.options.getAuthorization)h.options.getAuthorization.call(h,{Bucket:E,Region:ne,Method:e.Method,Key:fe,Pathname:ue,Query:e.Query,Headers:o,Scope:Be,SystemClockOffset:h.options.SystemClockOffset,ForceSignHost:t},function(xe){typeof xe=="string"&&(xe={Authorization:xe});var Re=qe(xe);if(Re)return r(Re);xe.Authorization?r(null,xe):(Te=xe||{},Te.Scope=Be,Te.ScopeKey=He,h._StsCache.push(Te),Le())});else if(h.options.getSTS)h.options.getSTS.call(h,{Bucket:E,Region:ne},function(xe){Te=xe||{},Te.Scope=Be,Te.ScopeKey=He,Te.TmpSecretId||(Te.TmpSecretId=Te.SecretId),Te.TmpSecretKey||(Te.TmpSecretKey=Te.SecretKey);var Re=qe(Te);if(Re)return r(Re);h._StsCache.push(Te),Le()});else return function(){var xe=l.getAuth({SecretId:e.SecretId||h.options.SecretId,SecretKey:e.SecretKey||h.options.SecretKey,Method:e.Method,Pathname:ue,Query:e.Query,Headers:o,Expires:e.Expires,UseRawKey:h.options.UseRawKey,SystemClockOffset:h.options.SystemClockOffset,ForceSignHost:t}),Re={Authorization:xe,SecurityToken:h.options.SecurityToken||h.options.XCosSecurityToken};return r(null,Re),Re}();return""}function rt(e){var f=!1,o=!1,c=e.headers&&(e.headers.date||e.headers.Date)||e.error&&e.error.ServerTime;try{var t=e.error.Code,n=e.error.Message;(t==="RequestTimeTooSkewed"||t==="AccessDenied"&&n==="Request has expired")&&(o=!0)}catch(h){}if(e)if(o&&c){var r=Date.parse(c);this.options.CorrectClockSkew&&Math.abs(l.getSkewTime(this.options.SystemClockOffset)-r)>=3e4&&(console.error("error: Local time is too skewed."),this.options.SystemClockOffset=r-Date.now(),f=!0)}else Math.floor(e.statusCode/100)===5&&(f=!0);return f}function he(e,f){var o=this;!e.headers&&(e.headers={}),!e.qs&&(e.qs={}),e.VersionId&&(e.qs.versionId=e.VersionId),e.qs=l.clearKey(e.qs),e.headers&&(e.headers=l.clearKey(e.headers)),e.qs&&(e.qs=l.clearKey(e.qs));var c=l.clone(e.qs);e.action&&(c[e.action]="");var t=e.url||e.Url,n=e.SignHost||Je.call(this,{Bucket:e.Bucket,Region:e.Region,Url:t}),r=e.tracker,h=function E(ne){var fe=o.options.SystemClockOffset;r&&r.setParams({signStartTime:new Date().getTime(),retryTimes:ne-1}),$e.call(o,{Bucket:e.Bucket||"",Region:e.Region||"",Method:e.method,Key:e.Key,Query:c,Headers:e.headers,SignHost:n,Action:e.Action,ResourceKey:e.ResourceKey,Scope:e.Scope,ForceSignHost:o.options.ForceSignHost},function(ue,Te){if(ue){f(ue);return}r&&r.setParams({signEndTime:new Date().getTime(),httpStartTime:new Date().getTime()}),e.AuthData=Te,et.call(o,e,function(Be,Ue){r&&r.setParams({httpEndTime:new Date().getTime()}),Be&&ne<2&&(fe!==o.options.SystemClockOffset||rt.call(o,Be))?(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"]),E(ne+1)):f(Be,Ue)})})};h(1)}function et(e,f){var o=this,c=e.TaskId;if(!(c&&!o._isRunningTask(c))){var t=e.Bucket,n=e.Region,r=e.Key,h=e.method||"GET",E=e.Url||e.url,ne=e.body,fe=e.rawBody;o.options.UseAccelerate&&(n="accelerate"),E=E||Ve({ForcePathStyle:o.options.ForcePathStyle,protocol:o.options.Protocol,domain:o.options.Domain,bucket:t,region:n,object:r}),e.action&&(E=E+"?"+(l.isIOS_QQ?"".concat(e.action,"="):e.action)),e.qsStr&&(E.indexOf("?")>-1?E=E+"&"+e.qsStr:E=E+"?"+e.qsStr);var ue={method:h,url:E,headers:e.headers,qs:e.qs,body:ne},Te="x-cos-security-token";if(l.isCIHost(E)&&(Te="x-ci-security-token"),ue.headers.Authorization=e.AuthData.Authorization,e.AuthData.Token&&(ue.headers.token=e.AuthData.Token),e.AuthData.ClientIP&&(ue.headers.clientIP=e.AuthData.ClientIP),e.AuthData.ClientUA&&(ue.headers.clientUA=e.AuthData.ClientUA),e.AuthData.SecurityToken&&(ue.headers[Te]=e.AuthData.SecurityToken),ue.headers&&(ue.headers=l.clearKey(ue.headers)),ue=l.clearKey(ue),e.onProgress&&typeof e.onProgress=="function"){var Be=ne&&(ne.size||ne.length)||0;ue.onProgress=function(xe){if(!(c&&!o._isRunningTask(c))){var Re=xe?xe.loaded:0;e.onProgress({loaded:Re,total:Be})}}}e.onDownloadProgress&&(ue.onDownloadProgress=e.onDownloadProgress),e.DataType&&(ue.dataType=e.DataType),this.options.Timeout&&(ue.timeout=this.options.Timeout),o.options.ForcePathStyle&&(ue.pathStyle=o.options.ForcePathStyle),o.emit("before-send",ue);var Ue=ue.url.includes("accelerate."),We=ue.qs?Object.keys(ue.qs).map(function(xe){return"".concat(xe,"=").concat(ue.qs[xe])}).join("&"):"",He=We?ue.url+"?"+We:ue.url;e.tracker&&e.tracker.setParams({reqUrl:He,accelerate:Ue?"Y":"N"}),e.tracker&&e.tracker.parent&&e.tracker.parent.setParams({reqUrl:He,accelerate:Ue?"Y":"N"});var Le=(o.options.Request||T)(ue,function(xe){if(!(xe&&xe.error==="abort")){var Re={options:ue,error:xe&&xe.error,statusCode:xe&&xe.statusCode||0,statusMessage:xe&&xe.statusMessage||"",headers:xe&&xe.headers||{},body:xe&&xe.body};o.emit("after-receive",Re);var _e=Re.error,De=Re.body,Ke={statusCode:Re.statusCode,statusMessage:Re.statusMessage,headers:Re.headers},st,it=function(lt,ft){if(c&&o.off("inner-kill-task",qe),!st){st=!0;var dt={};Ke&&Ke.statusCode&&(dt.statusCode=Ke.statusCode),Ke&&Ke.headers&&(dt.headers=Ke.headers),lt?(lt=l.extend(lt||{},dt),f(lt,null)):(ft=l.extend(ft||{},dt),f(null,ft)),Le=null}};if(_e)return it(l.error(_e));var ut=Ke.statusCode,ht=Math.floor(ut/100)===2;if(fe&&ht)return it(null,{body:De});var at;try{at=De&&De.indexOf("<")>-1&&De.indexOf(">")>-1&&l.xml2json(De)||{}}catch(gt){at={}}var ct=at&&at.Error;ht?it(null,at):ct?it(l.error(new Error(ct.Message),{code:ct.Code,error:ct})):ut?it(l.error(new Error(Ke.statusMessage),{code:""+ut})):ut&&it(l.error(new Error("statusCode error")))}}),qe=function xe(Re){Re.TaskId===c&&(Le&&Le.abort&&Le.abort(),o.off("inner-kill-task",xe))};c&&o.on("inner-kill-task",qe)}}var ot={getService:k,putBucket:P,headBucket:ee,getBucket:B,deleteBucket:b,putBucketAcl:q,getBucketAcl:L,putBucketCors:z,getBucketCors:_,deleteBucketCors:j,getBucketLocation:Q,getBucketPolicy:ge,putBucketPolicy:M,deleteBucketPolicy:A,putBucketTagging:S,getBucketTagging:m,deleteBucketTagging:K,putBucketLifecycle:g,getBucketLifecycle:D,deleteBucketLifecycle:U,putBucketVersioning:F,getBucketVersioning:$,putBucketReplication:w,getBucketReplication:H,deleteBucketReplication:N,putBucketWebsite:X,getBucketWebsite:J,deleteBucketWebsite:ce,putBucketReferer:se,getBucketReferer:re,putBucketDomain:Z,getBucketDomain:te,deleteBucketDomain:ie,putBucketOrigin:we,getBucketOrigin:de,deleteBucketOrigin:Y,putBucketLogging:pe,getBucketLogging:oe,putBucketInventory:le,getBucketInventory:ye,listBucketInventory:ve,deleteBucketInventory:me,putBucketAccelerate:Ee,getBucketAccelerate:Se,putBucketEncryption:be,getBucketEncryption:Ae,deleteBucketEncryption:V,getObject:d,headObject:x,listObjectVersions:I,putObject:i,deleteObject:a,getObjectAcl:s,putObjectAcl:p,optionsObject:R,putObjectCopy:O,deleteMultipleObject:ae,restoreObject:Ce,putObjectTagging:W,getObjectTagging:Oe,deleteObjectTagging:ke,selectObjectContent:Ie,appendObject:Xe,uploadPartCopy:G,multipartInit:Pe,multipartUpload:Me,multipartComplete:Ge,multipartList:Fe,multipartListPart:je,multipartAbort:Ne,request:ze,getObjectUrl:Ye,getAuth:nt};function tt(e,f,o){l.each(["Cors","Acl"],function(c){if(e.slice(-c.length)===c){var t=e.slice(0,-c.length)+c.toUpperCase(),n=l.apiWrapper(e,f),r=!1;o[t]=function(){!r&&console.warn("warning: cos."+t+" has been deprecated. Please Use cos."+e+" instead."),r=!0,n.apply(this,arguments)}}})}y.exports.init=function(e,f){f.transferToTaskMethod(ot,"putObject"),l.each(ot,function(o,c){e.prototype[c]=l.apiWrapper(c,o),tt(c,o,e.prototype)})}},"./src/cos.js":function(y,C,u){"use strict";var v=u("./src/util.js"),T=u("./src/event.js"),l=u("./src/task.js"),k=u("./src/base.js"),P=u("./src/advance.js"),ee=u("./package.json"),B={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:""},b=function(L){this.options=v.extend(v.clone(B),L||{}),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")),T.init(this),l.init(this)};k.init(b,l),P.init(b,l),b.util={md5:v.md5,xml2json:v.xml2json,json2xml:v.json2xml},b.getAuthorization=v.getAuth,b.version=ee.version,y.exports=b},"./src/event.js":function(y,C){var u=function(l){var k={},P=function(B){return!k[B]&&(k[B]=[]),k[B]};l.on=function(ee,B){ee==="task-list-update"&&console.warn('warning: Event "'+ee+'" has been deprecated. Please use "list-update" instead.'),P(ee).push(B)},l.off=function(ee,B){for(var b=P(ee),q=b.length-1;q>=0;q--)B===b[q]&&b.splice(q,1)},l.emit=function(ee,B){for(var b=P(ee).map(function(L){return L}),q=0;q<b.length;q++)b[q](B)}},v=function(){u(this)};y.exports.init=u,y.exports.EventProxy=v},"./src/session.js":function(y,C,u){var v=u("./src/util.js"),T="cos_sdk_upload_cache",l=30*24*3600,k,P,ee=function(){try{var _=JSON.parse(localStorage.getItem(T))}catch(j){}_||(_=[]),k=_},B=function(){try{k.length?localStorage.setItem(T,JSON.stringify(k)):localStorage.removeItem(T)}catch(_){}},b=function(){if(!k){ee.call(this);for(var _=!1,j=Math.round(Date.now()/1e3),Q=k.length-1;Q>=0;Q--){var M=k[Q][2];(!M||M+l<j)&&(k.splice(Q,1),_=!0)}_&&B()}},q=function(){P||(P=setTimeout(function(){B(),P=null},400))},L={using:{},setUsing:function(_){L.using[_]=!0},removeUsing:function(_){delete L.using[_]},getFileId:function(_,j,Q,M){return _.name&&_.size&&_.lastModifiedDate&&j?v.md5([_.name,_.size,_.lastModifiedDate,j,Q,M].join("::")):null},getCopyFileId:function(_,j,Q,M,ge){var A=j["content-length"],S=j.etag||"",m=j["last-modified"];return _&&Q?v.md5([_,A,S,m,Q,M,ge].join("::")):null},getUploadIdList:function(_){if(!_)return null;b.call(this);for(var j=[],Q=0;Q<k.length;Q++)k[Q][0]===_&&j.push(k[Q][1]);return j.length?j:null},saveUploadId:function(_,j,Q){if(b.call(this),!!_){for(var M=k.length-1;M>=0;M--){var ge=k[M];ge[0]===_&&ge[1]===j&&k.splice(M,1)}k.unshift([_,j,Math.round(Date.now()/1e3)]),k.length>Q&&k.splice(Q),q()}},removeUploadId:function(_){b.call(this),delete L.using[_];for(var j=k.length-1;j>=0;j--)k[j][1]===_&&k.splice(j,1);q()}};y.exports=L},"./src/task.js":function(y,C,u){var v=u("./src/session.js"),T=u("./src/util.js"),l={},k=function(B,b){l[b]=B[b],B[b]=function(q,L){q.SkipTask?l[b].call(this,q,L):this._addTask(b,q,L)}},P=function(B){var b=[],q={},L=0,z=0,_=function(m){var K={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&&(K.FilePath=m.FilePath),m._custom&&(K._custom=m._custom),K},j=function(){var S,m=function(){S=0,B.emit("task-list-update",{list:T.map(b,_)}),B.emit("list-update",{list:T.map(b,_)})};return function(){S||(S=setTimeout(m))}}(),Q=function(){if(!(b.length<=B.options.UploadQueueSize)){for(var m=0;m<z&&m<b.length&&b.length>B.options.UploadQueueSize;){var K=b[m].state==="waiting"||b[m].state==="checking"||b[m].state==="uploading";!b[m]||!K?(q[b[m].id]&&delete q[b[m].id],b.splice(m,1),z--):m++}j()}},M=function S(){if(!(L>=B.options.FileParallelLimit)){for(;b[z]&&b[z].state!=="waiting";)z++;if(!(z>=b.length)){var m=b[z];z++,L++,m.state="checking",m.params.onTaskStart&&m.params.onTaskStart(_(m)),!m.params.UploadData&&(m.params.UploadData={});var K=T.formatParams(m.api,m.params);l[m.api].call(B,K,function(g,D){!B._isRunningTask(m.id)||((m.state==="checking"||m.state==="uploading")&&(m.state=g?"error":"success",g&&(m.error=g),L--,j(),S(),m.callback&&m.callback(g,D),m.state==="success"&&(m.params&&(delete m.params.UploadData,delete m.params.Body,delete m.params),delete m.callback)),Q())}),j(),setTimeout(S)}}},ge=function(m,K){var g=q[m];if(!!g){var D=g&&g.state==="waiting",U=g&&(g.state==="checking"||g.state==="uploading");if(K==="canceled"&&g.state!=="canceled"||K==="paused"&&D||K==="paused"&&U){if(K==="paused"&&g.params.Body&&typeof g.params.Body.pipe=="function"){console.error("stream not support pause");return}g.state=K,B.emit("inner-kill-task",{TaskId:m,toState:K});try{var F=g&&g.params&&g.params.UploadData.UploadId}catch($){}K==="canceled"&&F&&v.removeUsing(F),j(),U&&(L--,M()),K==="canceled"&&(g.params&&(delete g.params.UploadData,delete g.params.Body,delete g.params),delete g.callback)}Q()}};B._addTasks=function(S){T.each(S,function(m){B._addTask(m.api,m.params,m.callback,!0)}),j()};var A=!0;B._addTask=function(S,m,K,g){m=T.formatParams(S,m);var D=T.uuid();m.TaskId=D,m.onTaskReady&&m.onTaskReady(D),m.TaskReady&&(m.TaskReady(D),A&&console.warn('warning: Param "TaskReady" has been deprecated. Please use "onTaskReady" instead.'),A=!1);var U={params:m,callback:K,api:S,index:b.length,id:D,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(w){!B._isRunningTask(U.id)||(U.hashPercent=w.percent,F&&F(w),j())};var $=m.onProgress;return m.onProgress=function(w){!B._isRunningTask(U.id)||(U.state==="checking"&&(U.state="uploading"),U.loaded=w.loaded,U.speed=w.speed,U.percent=w.percent,$&&$(w),j())},T.getFileSize(S,m,function(w,H){if(w)return K(T.error(w));q[D]=U,b.push(U),U.size=H,!g&&j(),M(),Q()}),D},B._isRunningTask=function(S){var m=q[S];return!!(m&&(m.state==="checking"||m.state==="uploading"))},B.getTaskList=function(){return T.map(b,_)},B.cancelTask=function(S){ge(S,"canceled")},B.pauseTask=function(S){ge(S,"paused")},B.restartTask=function(S){var m=q[S];m&&(m.state==="paused"||m.state==="error")&&(m.state="waiting",j(),z=Math.min(z,m.index),M())},B.isUploadRunning=function(){return L||z<b.length}};y.exports.transferToTaskMethod=k,y.exports.init=P},"./src/tracker.js":function(y,C,u){var v=u("./node_modules/@babel/runtime/helpers/classCallCheck.js"),T=u("./node_modules/@babel/runtime/helpers/createClass.js"),l=u("./node_modules/@babel/runtime/helpers/typeof.js"),k=u("./package.json"),P=null,ee=function(S){if(!P){var m=u("./lib/beacon.min.js");P=new m({appkey:"0AND0VEVB24UBGDU",versionCode:k.version,channelID:"js_sdk",openid:"openid",unionid:"unid",strictMode:!1,delay:S,sessionDuration:60*1e3})}return P},B={getUid:function(){var S=function(){return((1+Math.random())*65536|0).toString(16).substring(1)};return S()+S()+"-"+S()+"-"+S()+"-"+S()+"-"+S()+S()+S()},getNetType:function(){if((typeof navigator=="undefined"?"undefined":l(navigator))==="object"){var S=navigator.connection||navigator.mozConnection||navigator.webkitConnection;return(S==null?void 0:S.type)||(S==null?void 0:S.effectiveType)||"unknown"}return"unknown"},getOsType:function(){if((typeof navigator=="undefined"?"undefined":l(navigator))!=="object")return"unknown os";var S=navigator.userAgent.toLowerCase(),m=/macintosh|mac os x/i.test(navigator.userAgent);return S.indexOf("win32")>=0||S.indexOf("wow32")>=0?"win32":S.indexOf("win64")>=0||S.indexOf("wow64")>=0?"win64":m?"mac":"unknown os"},isMobile:function(){var S=/(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":l(navigator))==="object"&&navigator.userAgent.match(S))},isAndroid:function(){var S=/(Android|Adr|Linux)/i;return!!((typeof navigator=="undefined"?"undefined":l(navigator))==="object"&&navigator.userAgent.match(S))},isIOS:function(){var S=/(iPhone|iPod|iPad|iOS)/i;return!!((typeof navigator=="undefined"?"undefined":l(navigator))==="object"&&navigator.userAgent.match(S))},isOtherMobile:function(){return isMobile&&!isAndroid&&!isIOS},getDeviceName:function(){if((typeof navigator=="undefined"?"undefined":l(navigator))!=="object")return"unknown device";var S=navigator.userAgent.toLowerCase();if(S.includes("app/tencent_wemeet"))return"tencent_wemeet";if(S.indexOf("maxthon")>=0){var m=S.match(/maxthon\/([\d.]+)/),K=m&&m[1]||"";return"\u50B2\u6E38\u6D4F\u89C8\u5668 ".concat(K).trim()}if(S.indexOf("qqbrowser")>=0){var g=S.match(/qqbrowser\/([\d.]+)/),D=g&&g[1]||"";return"QQ\u6D4F\u89C8\u5668 ".concat(D).trim()}if(S.indexOf("se 2.x")>=0)return"\u641C\u72D7\u6D4F\u89C8\u5668";if(S.indexOf("wxwork")>=0)return"\u5FAE\u4FE1\u5185\u7F6E\u6D4F\u89C8\u5668";if(S.indexOf("msie")>=0){var U=S.match(/msie ([\d.]+)/),F=U&&U[1]||"";return"IE ".concat(F).trim()}if(S.indexOf("firefox")>=0){var $=S.match(/firefox\/([\d.]+)/),w=$&&$[1]||"";return"Firefox ".concat(w).trim()}if(S.indexOf("chrome")>=0){var H=S.match(/chrome\/([\d.]+)/),N=H&&H[1]||"";return"Chrome ".concat(N).trim()}if(S.indexOf("opera")>=0){var X=S.match(/opera.([\d.]+)/),J=X&&X[1]||"";return"Opera ".concat(J).trim()}if(S.indexOf("safari")>=0){var ce=S.match(/version\/([\d.]+)/),se=ce&&ce[1]||"";return"Safari ".concat(se).trim()}if(S.indexOf("edge")>=0){var re=S.match(/edge\/([\d.]+)/),Z=re&&re[1]||"";return"edge ".concat(Z).trim()}return S.substr(0,200)}},b={isMobile:B.isMobile(),isBrowser:!B.isMobile(),mobileOsType:B.isAndroid()?"android":B.isIOS?"ios":"other_mobile",pcOsType:B.getOsType()},q={deviceType:b.isMobile?"mobile":b.isBrowser?"browser":"unknown",devicePlatform:b.isMobile?b.mobileOsType:b.pcOsType,deviceName:B.getDeviceName()},L=["multipartInit","multipartUpload","multipartComplete","multipartList","multipartListPart","multipartAbort"],z=["putObject","postObject","appendObject","sliceUploadFile","uploadFile","uploadFiles"].concat(L),_=["getObject"];function j(A){return z.includes(A)?"cos_upload":_.includes(A)?"cos_download":"base_service"}function Q(A){return A.replace(/([A-Z])/g,"_$1").toLowerCase()}function M(A){var S={},m=["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"],K=["tracePlatform","cossdkVersion","region","bucket","appid","networkType","host","accelerate","requestPath","partNumber","size","name","result","tookTime","errorRequestId","retryTimes","reqUrl","customId","deviceType","devicePlatform","deviceName"],g=A.result==="Success"?K:m;for(var D in A)if(!!g.includes(D)){var U=Q(D);S[U]=A[D]}return S}var ge=function(){"use strict";function A(S){v(this,A);var m=S.parent,K=S.traceId,g=S.bucket,D=S.region,U=S.apiName,F=S.fileKey,$=S.fileSize,w=S.accelerate,H=S.customId,N=S.delay,X=S.deepTracker,J=g&&g.substr(g.lastIndexOf("-")+1)||"";this.parent=m,this.deepTracker=X,this.delay=N,this.params={cossdkVersion:k.version,region:D,networkType:"",host:"",accelerate:w?"Y":"N",requestPath:F||"",size:$||-1,httpMd5:0,httpSign:0,httpFull:0,name:U||"",result:"",tookTime:0,errorNode:"",errorCode:"",errorMessage:"",errorRequestId:"",errorStatusCode:0,errorServiceName:"",tracePlatform:"cos-js-sdk-v5",traceId:K||B.getUid(),bucket:g,appid:J,partNumber:0,retryTimes:0,reqUrl:"",customId:H||"",deviceType:q.deviceType,devicePlatform:q.devicePlatform,deviceName:q.deviceName,md5StartTime:0,md5EndTime:0,signStartTime:0,signEndTime:0,httpStartTime:0,httpEndTime:0,startTime:new Date().getTime(),endTime:0},this.beacon=ee(N)}return T(A,[{key:"formatResult",value:function(m,K){var g,D,U,F,$,w,H=new Date().getTime(),N=H-this.params.startTime,X=B.getNetType(),J=m?(m==null?void 0:m.code)||(m==null||(g=m.error)===null||g===void 0?void 0:g.code)||(m==null||(D=m.error)===null||D===void 0?void 0:D.Code):"",ce=m?(m==null?void 0:m.message)||(m==null||(U=m.error)===null||U===void 0?void 0:U.message)||(m==null||(F=m.error)===null||F===void 0?void 0:F.Message):"",se=m?(m==null?void 0:m.resource)||(m==null||($=m.error)===null||$===void 0?void 0:$.resource)||(m==null||(w=m.error)===null||w===void 0?void 0:w.Resource):"",re=m?m==null?void 0:m.statusCode:K.statusCode,Z=m?(m==null?void 0:m.headers)&&(m==null?void 0:m.headers["x-cos-request-id"]):(K==null?void 0:K.headers)&&(K==null?void 0:K.headers["x-cos-request-id"]),te=m?Z?"Server":"Client":"";if(Object.assign(this.params,{tookTime:N,networkType:X,httpMd5:this.params.md5EndTime-this.params.md5StartTime,httpSign:this.params.signEndTime-this.params.signStartTime,httpFull:this.params.httpEndTime-this.params.httpStartTime,result:m?"Fail":"Success",errorType:te,errorCode:J,errorStatusCode:re,errorMessage:ce,errorServiceName:se,errorRequestId:Z}),m&&(!J||!ce)&&(this.params.fullError=m?JSON.stringify(m):""),this.params.name==="getObject"&&(this.params.size=K?K.headers&&K.headers["content-length"]:-1),this.params.reqUrl)try{var ie=/^http(s)?:\/\/(.*?)\//.exec(this.params.reqUrl);this.params.host=ie[2]}catch(we){this.params.host=this.params.reqUrl}this.sendEvents()}},{key:"setParams",value:function(m){Object.assign(this.params,m)}},{key:"sendEvents",value:function(){if(!(L.includes(this.params.name)&&!this.deepTracker)){var m=j(this.params.name),K=M(this.params);this.beacon||(this.beacon=ee(this.delay||5e3)),this.delay===0?this.beacon&&this.beacon.onDirectUserAction(m,K):this.beacon&&this.beacon.onUserAction(m,K)}}},{key:"generateSubTracker",value:function(m){return Object.assign(m,{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.delay}),new A(m)}}]),A}();y.exports=ge},"./src/util.js":function(y,C,u){"use strict";(function(v){var T=u("./node_modules/@babel/runtime/helpers/typeof.js"),l=u("./lib/md5.js"),k=u("./lib/crypto.js"),P=u("./lib/xml2json.js"),ee=u("./lib/json2xml.js"),B=u("./src/tracker.js");function b(V){return encodeURIComponent(V).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function q(V,x){var I=[];for(var d in V)V.hasOwnProperty(d)&&I.push(x?b(d).toLowerCase():d);return I.sort(function(i,a){return i=i.toLowerCase(),a=a.toLowerCase(),i===a?0:i>a?1:-1})}var L=function(x,I){var d,i,a,s=[],p=q(x);for(d=0;d<p.length;d++)i=p[d],a=x[i]===void 0||x[i]===null?"":""+x[i],i=I?b(i).toLowerCase():b(i),a=b(a)||"",s.push(i+"="+a);return s.join("&")},z=["cache-control","content-disposition","content-encoding","content-length","content-md5","expect","expires","host","if-match","if-modified-since","if-none-match","if-unmodified-since","origin","range","transfer-encoding"],_=function(x){var I={};for(var d in x){var i=d.toLowerCase();(i.indexOf("x-cos-")>-1||z.indexOf(i)>-1)&&(I[d]=x[d])}return I},j=function(x){x=x||{};var I=x.SecretId,d=x.SecretKey,i=x.KeyTime,a=(x.method||x.Method||"get").toLowerCase(),s=w(x.Query||x.params||{}),p=_(w(x.Headers||x.headers||{})),R=x.Key||"",O;x.UseRawKey?O=x.Pathname||x.pathname||"/"+R:(O=x.Pathname||x.pathname||R,O.indexOf("/")!==0&&(O="/"+O));var G=x.ForceSignHost!==!1;if(!p.Host&&!p.host&&x.Bucket&&x.Region&&G&&(p.Host=x.Bucket+".cos."+x.Region+".myqcloud.com"),!I)throw new Error("missing param SecretId");if(!d)throw new Error("missing param SecretKey");var ae=Math.round(le(x.SystemClockOffset)/1e3)-1,Ce=ae,W=x.Expires||x.expires;W===void 0?Ce+=900:Ce+=W*1||0;var Oe="sha1",ke=I,Ie=i||ae+";"+Ce,Pe=i||ae+";"+Ce,Me=q(p,!0).join(";").toLowerCase(),Ge=q(s,!0).join(";").toLowerCase(),Fe=k.HmacSHA1(Pe,d).toString(),je=[a,O,Ae.obj2str(s,!0),Ae.obj2str(p,!0),""].join(`
  11. `),Ne=["sha1",Ie,k.SHA1(je).toString(),""].join(`
  12. `),ze=k.HmacSHA1(Ne,Fe).toString(),Xe=["q-sign-algorithm="+Oe,"q-ak="+ke,"q-sign-time="+Ie,"q-key-time="+Pe,"q-header-list="+Me,"q-url-param-list="+Ge,"q-signature="+ze].join("&");return Xe},Q=function(x,I,d){var i=I/8,a=x.slice(d,d+i);return new Uint8Array(a).reverse(),new{8:Uint8Array,16:Uint16Array,32:Uint32Array}[I](a)[0]},M=function(x,I,d,i){var a=x.slice(I,d),s="";return new Uint8Array(a).forEach(function(p){s+=String.fromCharCode(p)}),i&&(s=decodeURIComponent(escape(s))),s},ge=function(x){for(var I={},d=M(x),i={records:[]};x.byteLength;){var a=Q(x,32,0),s=Q(x,32,4),p=a-s-16,R=0,O;for(x=x.slice(12);R<s;){var G=Q(x,8,R),ae=M(x,R+1,R+1+G),Ce=Q(x,16,R+G+2),W=M(x,R+G+4,R+G+4+Ce);I[ae]=W,R+=G+4+Ce}if(I[":event-type"]==="Records")O=M(x,R,R+p,!0),i.records.push(O);else if(I[":event-type"]==="Stats")O=M(x,R,R+p,!0),i.stats=Ae.xml2json(O).Stats;else if(I[":event-type"]==="error"){var Oe=I[":error-code"],ke=I[":error-message"],Ie=new Error(ke);Ie.message=ke,Ie.name=Ie.code=Oe,i.error=Ie}else["Progress","Continuation","End"].includes(I[":event-type"]);x=x.slice(R+p+4)}return{payload:i.records.join(""),body:d}},A=function(x){var I=this.options.CopySourceParser;if(I)return I(x);var d=x.match(/^([^.]+-\d+)\.cos(v6|-cdc|-cdz|-internal)?\.([^.]+)\.((myqcloud\.com)|(tencentcos\.cn))\/(.+)$/);return d?{Bucket:d[1],Region:d[3],Key:d[7]}:null},S=function(){},m=function(x){var I={};for(var d in x)x.hasOwnProperty(d)&&x[d]!==void 0&&x[d]!==null&&(I[d]=x[d]);return I},K=function(x,I){var d,i=new FileReader;FileReader.prototype.readAsBinaryString?(d=FileReader.prototype.readAsBinaryString,i.onload=function(){I(this.result)}):FileReader.prototype.readAsArrayBuffer?d=function(s){var p="",R=this,O=new FileReader;O.onload=function(G){for(var ae=new Uint8Array(O.result),Ce=ae.byteLength,W=0;W<Ce;W++)p+=String.fromCharCode(ae[W]);I(p)},O.readAsArrayBuffer(s)}:console.error("FileReader not support readAsBinaryString"),d.call(i,x)},g=function(){var V=function(d,i){d=d.split("."),i=i.split(".");for(var a=0;a<i.length;a++)if(d[a]!==i[a])return parseInt(d[a])>parseInt(i[a])?1:-1;return 0},x=function(d){if(!d)return!1;var i=(d.match(/Chrome\/([.\d]+)/)||[])[1],a=(d.match(/QBCore\/([.\d]+)/)||[])[1],s=(d.match(/QQBrowser\/([.\d]+)/)||[])[1],p=i&&V(i,"53.0.2785.116")<0&&a&&V(a,"3.53.991.400")<0&&s&&V(s,"9.0.2524.400")<=0||!1;return p};return x(typeof navigator!="undefined"&&navigator.userAgent)}(),D=function(x,I,d,i,a){var s;if(x.slice?s=x.slice(I,d):x.mozSlice?s=x.mozSlice(I,d):x.webkitSlice&&(s=x.webkitSlice(I,d)),i&&g){var p=new FileReader;p.onload=function(R){s=null,a(new Blob([p.result]))},p.readAsArrayBuffer(s)}else a(s)},U=function(x,I,d,i){d=d||S,x?typeof I=="string"?d(Ae.md5(I,!0)):Blob&&I instanceof Blob?Ae.getFileMd5(I,function(a,s){d(s)},i):d():d()},F=1024*1024,$=function(x,I,d){var i=x.size,a=0,s=l.getCtx(),p=function R(O){if(O>=i){var G=s.digest("hex");I(null,G);return}var ae=Math.min(i,O+F);Ae.fileSlice(x,O,ae,!1,function(Ce){K(Ce,function(W){Ce=null,s=s.update(W,!0),a+=W.length,W=null,d&&d({loaded:a,total:i,percent:Math.round(a/i*1e4)/1e4}),R(O+F)})})};p(0)};function w(V){return re(V,function(x){return T(x)==="object"&&x!==null?w(x):x})}function H(V,x,I){return V&&x in V?V[x]:I}function N(V,x){return se(x,function(I,d){V[d]=x[d]}),V}function X(V){return V instanceof Array}function J(V,x){for(var I=!1,d=0;d<V.length;d++)if(x===V[d]){I=!0;break}return I}function ce(V){return X(V)?V:[V]}function se(V,x){for(var I in V)V.hasOwnProperty(I)&&x(V[I],I)}function re(V,x){var I=X(V)?[]:{};for(var d in V)V.hasOwnProperty(d)&&(I[d]=x(V[d],d));return I}function Z(V,x){var I=X(V),d=I?[]:{};for(var i in V)V.hasOwnProperty(i)&&x(V[i],i)&&(I?d.push(V[i]):d[i]=V[i]);return d}var te=function(x){var I,d,i,a="";for(I=0,d=x.length/2;I<d;I++)i=parseInt(x[I*2]+x[I*2+1],16),a+=String.fromCharCode(i);return btoa(a)},ie=function(){var x=function(){return((1+Math.random())*65536|0).toString(16).substring(1)};return x()+x()+"-"+x()+"-"+x()+"-"+x()+"-"+x()+x()+x()},we=function(x,I){var d=I.Bucket,i=I.Region,a=I.Key,s=this.options.Domain,p=!s||typeof s=="string"&&s.indexOf("{Bucket}")>-1,R=!s||typeof s=="string"&&s.indexOf("{Region}")>-1;if(x.indexOf("Bucket")>-1||x==="deleteMultipleObject"||x==="multipartList"||x==="listObjectVersions"){if(p&&!d)return"Bucket";if(R&&!i)return"Region"}else if(x.indexOf("Object")>-1||x.indexOf("multipart")>-1||x==="sliceUploadFile"||x==="abortUploadTask"){if(p&&!d)return"Bucket";if(R&&!i)return"Region";if(!a)return"Key"}return!1},de=function(x,I){if(I=N({},I),x!=="getAuth"&&x!=="getV4Auth"&&x!=="getObjectUrl"){var d=I.Headers||{};if(I&&T(I)==="object"){(function(){for(var a in I)I.hasOwnProperty(a)&&a.indexOf("x-cos-")>-1&&(d[a]=I[a])})();var i={"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","Pic-Operations":"PicOperations"};Ae.each(i,function(a,s){I[a]!==void 0&&(d[s]=I[a])}),I.Headers=m(d)}}return I},Y=function(x,I){return function(d,i){var a=this;typeof d=="function"&&(i=d,d={}),d=de(x,d);var s;if(a.options.EnableTracker)if(d.calledBySdk==="sliceUploadFile")s=d.tracker&&d.tracker.generateSubTracker({apiName:x});else if(["uploadFile","uploadFiles"].includes(x))s=null;else{var p=-1;d.Body&&(p=typeof d.Body=="string"?d.Body.length:d.Body.size||d.Body.byteLength||-1),s=new B({bucket:d.Bucket,region:d.Region,apiName:x,fileKey:d.Key,fileSize:p,deepTracker:a.options.DeepTracker,customId:a.options.CustomId,delay:a.options.TrackerDelay})}d.tracker=s;var R=function(ke){return ke&&ke.headers&&(ke.headers["x-cos-request-id"]&&(ke.RequestId=ke.headers["x-cos-request-id"]),ke.headers["x-ci-request-id"]&&(ke.RequestId=ke.headers["x-ci-request-id"]),ke.headers["x-cos-version-id"]&&(ke.VersionId=ke.headers["x-cos-version-id"]),ke.headers["x-cos-delete-marker"]&&(ke.DeleteMarker=ke.headers["x-cos-delete-marker"])),ke},O=function(ke,Ie){s&&s.formatResult(ke,Ie),i&&i(R(ke),R(Ie))},G=function(){if(x!=="getService"&&x!=="abortUploadTask"){var ke=we.call(a,x,d);if(ke)return"missing param "+ke;if(d.Region){if(a.options.CompatibilityMode){if(!/^([a-z\d-.]+)$/.test(d.Region))return"Region format error."}else{if(d.Region.indexOf("cos.")>-1)return'param Region should not be start with "cos."';if(!/^([a-z\d-]+)$/.test(d.Region))return"Region format error."}!a.options.CompatibilityMode&&d.Region.indexOf("-")===-1&&d.Region!=="yfb"&&d.Region!=="default"&&d.Region!=="accelerate"&&console.warn("warning: param Region format error, find help here: https://cloud.tencent.com/document/product/436/6224")}if(d.Bucket){if(!/^([a-z\d-]+)-(\d+)$/.test(d.Bucket))if(d.AppId)d.Bucket=d.Bucket+"-"+d.AppId;else if(a.options.AppId)d.Bucket=d.Bucket+"-"+a.options.AppId;else return'Bucket should format as "test-1250000000".';d.AppId&&(console.warn('warning: AppId has been deprecated, Please put it at the end of parameter Bucket(E.g Bucket:"test-1250000000" ).'),delete d.AppId)}!a.options.UseRawKey&&d.Key&&d.Key.substr(0,1)==="/"&&(d.Key=d.Key.substr(1))}},ae=G(),Ce=["getAuth","getObjectUrl"].includes(x);if(typeof Promise=="function"&&!Ce&&!i)return new Promise(function(Oe,ke){if(i=function(Pe,Me){Pe?ke(Pe):Oe(Me)},ae)return O(Ae.error(new Error(ae)));I.call(a,d,O)});if(ae)return O(Ae.error(new Error(ae)));var W=I.call(a,d,O);if(Ce)return W}},pe=function(x,I){var d=this,i=0,a=0,s=Date.now(),p,R;function O(){if(R=0,I&&typeof I=="function"){p=Date.now();var G=Math.max(0,Math.round((a-i)/((p-s)/1e3)*100)/100)||0,ae;a===0&&x===0?ae=1:ae=Math.floor(a/x*100)/100||0,s=p,i=a;try{I({loaded:a,total:x,speed:G,percent:ae})}catch(Ce){}}}return function(G,ae){if(G&&(a=G.loaded,x=G.total),ae)clearTimeout(R),O();else{if(R)return;R=setTimeout(O,d.options.ProgressInterval)}}},oe=function(x,I,d){var i;if(typeof I.Body=="string"?I.Body=new Blob([I.Body],{type:"text/plain"}):I.Body instanceof ArrayBuffer&&(I.Body=new Blob([I.Body])),I.Body&&(I.Body instanceof Blob||I.Body.toString()==="[object File]"||I.Body.toString()==="[object Blob]"))i=I.Body.size;else{d(Ae.error(new Error("params body format error, Only allow File|Blob|String.")));return}I.ContentLength=i,d(null,i)},le=function(x){return Date.now()+(x||0)},ye=function(x,I){var d=x;return x.message=x.message||null,typeof I=="string"?(x.error=I,x.message=I):T(I)==="object"&&I!==null&&(N(x,I),(I.code||I.name)&&(x.code=I.code||I.name),I.message&&(x.message=I.message),I.stack&&(x.stack=I.stack)),typeof Object.defineProperty=="function"&&(Object.defineProperty(x,"name",{writable:!0,enumerable:!1}),Object.defineProperty(x,"message",{enumerable:!0})),x.name=I&&I.name||x.name||x.code||"Error",x.code||(x.code=x.name),x.error||(x.error=w(d)),x},ve=function(){return(typeof globalThis=="undefined"?"undefined":T(globalThis))==="object"&&(globalThis.constructor.name==="DedicatedWorkerGlobalScope"||globalThis.FileReaderSync)},me=function(){return(typeof window=="undefined"?"undefined":T(window))!=="object"&&(typeof v=="undefined"?"undefined":T(v))==="object"&&!0&&!ve()},Ee=function(x){return/^https?:\/\/([^/]+\.)?ci\.[^/]+/.test(x)},Se=function(){if((typeof navigator=="undefined"?"undefined":T(navigator))!=="object")return!1;var V=navigator.userAgent,x=!!V.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);return x}(),be=function(){return(typeof navigator=="undefined"?"undefined":T(navigator))!=="object"?!1:/\sQQ/i.test(navigator.userAgent)}(),Ae={noop:S,formatParams:de,apiWrapper:Y,xml2json:P,json2xml:ee,md5:l,clearKey:m,fileSlice:D,getBodyMd5:U,getFileMd5:$,binaryBase64:te,extend:N,isArray:X,isInArray:J,makeArray:ce,each:se,map:re,filter:Z,clone:w,attr:H,uuid:ie,camSafeUrlEncode:b,throttleOnProgress:pe,getFileSize:oe,getSkewTime:le,error:ye,obj2str:L,getAuth:j,parseSelectPayload:ge,getSourceParams:A,isBrowser:!0,isNode:me,isCIHost:Ee,isIOS_QQ:Se&&be};y.exports=Ae}).call(this,u("./node_modules/process/browser.js"))}})})}}]);