index-38534125-1702450930307.js 270 KB

123456789
  1. import{c3 as commonjsGlobal,c4 as getDefaultExportFromCjs,B as request,d as defineComponent,e as reactive,r as ref,f as createVNode,cg as NGrid,ch as NGi,w as NSpace,j as NButton,k as createTextVNode,H as nextTick,b as useMessage,y as watch,C as NUpload,v as NModal}from"./index-6ea91fe3-1702450930307.js";var cosJsSdkV5={exports:{}};(function(module,exports){(function(r,e){module.exports=e()})(commonjsGlobal,function(){return function(i){var r={};function e(t){if(r[t])return r[t].exports;var l=r[t]={i:t,l:!1,exports:{}};return i[t].call(l.exports,l,l.exports,e),l.l=!0,l.exports}return e.m=i,e.c=r,e.d=function(t,l,o){e.o(t,l)||Object.defineProperty(t,l,{enumerable:!0,get:o})},e.r=function(t){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,l){if(l&1&&(t=e(t)),l&8||l&4&&typeof t=="object"&&t&&t.__esModule)return t;var o=Object.create(null);if(e.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),l&2&&typeof t!="string")for(var s in t)e.d(o,s,(function(E){return t[E]}).bind(null,s));return o},e.n=function(t){var l=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(l,"a",l),l},e.o=function(t,l){return Object.prototype.hasOwnProperty.call(t,l)},e.p="/dist/",e(e.s="./index.js")}({"./index.js":function(i,r,e){var t=e("./src/cos.js");i.exports=t},"./lib/base64.js":function(i,r){var e=function(t){t=t||{};var l=t.Base64,o="2.1.9",s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E=function(U){for(var z={},R=0,V=U.length;R<V;R++)z[U.charAt(R)]=R;return z}(s),w=String.fromCharCode,S=function(z){if(z.length<2){var R=z.charCodeAt(0);return R<128?z:R<2048?w(192|R>>>6)+w(128|R&63):w(224|R>>>12&15)+w(128|R>>>6&63)+w(128|R&63)}else{var R=65536+(z.charCodeAt(0)-55296)*1024+(z.charCodeAt(1)-56320);return w(240|R>>>18&7)+w(128|R>>>12&63)+w(128|R>>>6&63)+w(128|R&63)}},A=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,T=function(z){return z.replace(A,S)},_=function(z){var R=[0,2,1][z.length%3],V=z.charCodeAt(0)<<16|(z.length>1?z.charCodeAt(1):0)<<8|(z.length>2?z.charCodeAt(2):0),X=[s.charAt(V>>>18),s.charAt(V>>>12&63),R>=2?"=":s.charAt(V>>>6&63),R>=1?"=":s.charAt(V&63)];return X.join("")},q=t.btoa?function(U){return t.btoa(U)}:function(U){return U.replace(/[\s\S]{1,3}/g,_)},P=function(U){return q(T(U))},L=function(z,R){return R?P(String(z)).replace(/[+\/]/g,function(V){return V=="+"?"-":"_"}).replace(/=/g,""):P(String(z))},Y=function(z){return L(z,!0)},G=new RegExp(["[À-ß][€-¿]","[à-ï][€-¿]{2}","[ð-÷][€-¿]{3}"].join("|"),"g"),ne=function(z){switch(z.length){case 4:var R=(7&z.charCodeAt(0))<<18|(63&z.charCodeAt(1))<<12|(63&z.charCodeAt(2))<<6|63&z.charCodeAt(3),V=R-65536;return w((V>>>10)+55296)+w((V&1023)+56320);case 3:return w((15&z.charCodeAt(0))<<12|(63&z.charCodeAt(1))<<6|63&z.charCodeAt(2));default:return w((31&z.charCodeAt(0))<<6|63&z.charCodeAt(1))}},I=function(z){return z.replace(G,ne)},D=function(z){var R=z.length,V=R%4,X=(R>0?E[z.charAt(0)]<<18:0)|(R>1?E[z.charAt(1)]<<12:0)|(R>2?E[z.charAt(2)]<<6:0)|(R>3?E[z.charAt(3)]:0),W=[w(X>>>16),w(X>>>8&255),w(X&255)];return W.length-=[0,0,2,1][V],W.join("")},C=t.atob?function(U){return t.atob(U)}:function(U){return U.replace(/[\s\S]{1,4}/g,D)},k=function(U){return I(C(U))},g=function(z){return k(String(z).replace(/[-_]/g,function(R){return R=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},F=function(){var z=t.Base64;return t.Base64=l,z},H={VERSION:o,atob:C,btoa:q,fromBase64:g,toBase64:L,utob:T,encode:L,encodeURI:Y,btou:I,decode:g,noConflict:F};return H}();i.exports=e},"./lib/beacon.min.js":function(i,r,e){var t,l,o=e("./node_modules/@babel/runtime/helpers/typeof.js");(function(s,E){o(r)=="object"&&typeof i<"u"?i.exports=E():(t=E,l=typeof t=="function"?t.call(r,e,r,i):t,l!==void 0&&(i.exports=l))})(this,function(){var s=function(c,a){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,y){d.__proto__=y}||function(d,y){for(var N in y)Object.prototype.hasOwnProperty.call(y,N)&&(d[N]=y[N])},s(c,a)},E=function(){return E=Object.assign||function(c){for(var a,d=1,y=arguments.length;d<y;d++)for(var N in a=arguments[d])Object.prototype.hasOwnProperty.call(a,N)&&(c[N]=a[N]);return c},E.apply(this,arguments)};function w(h,c,a,d){return new(a||(a=Promise))(function(y,N){function M(he){try{de(d.next(he))}catch($){N($)}}function Q(he){try{de(d.throw(he))}catch($){N($)}}function de(he){var $;he.done?y(he.value):($=he.value,$ instanceof a?$:new a(function(Se){Se($)})).then(M,Q)}de((d=d.apply(h,c||[])).next())})}function S(h,c){var a,d,y,N,M={label:0,sent:function(){if(1&y[0])throw y[1];return y[1]},trys:[],ops:[]};return N={next:Q(0),throw:Q(1),return:Q(2)},typeof Symbol=="function"&&(N[Symbol.iterator]=function(){return this}),N;function Q(de){return function(he){return function($){if(a)throw new TypeError("Generator is already executing.");for(;M;)try{if(a=1,d&&(y=2&$[0]?d.return:$[0]?d.throw||((y=d.return)&&y.call(d),0):d.next)&&!(y=y.call(d,$[1])).done)return y;switch(d=0,y&&($=[2&$[0],y.value]),$[0]){case 0:case 1:y=$;break;case 4:return M.label++,{value:$[1],done:!1};case 5:M.label++,d=$[1],$=[0];continue;case 7:$=M.ops.pop(),M.trys.pop();continue;default:if(y=M.trys,!((y=y.length>0&&y[y.length-1])||$[0]!==6&&$[0]!==2)){M=0;continue}if($[0]===3&&(!y||$[1]>y[0]&&$[1]<y[3])){M.label=$[1];break}if($[0]===6&&M.label<y[1]){M.label=y[1],y=$;break}if(y&&M.label<y[2]){M.label=y[2],M.ops.push($);break}y[2]&&M.ops.pop(),M.trys.pop();continue}$=c.call(h,M)}catch(Se){$=[6,Se],d=0}finally{a=y=0}if(5&$[0])throw $[1];return{value:$[0]?$[1]:void 0,done:!0}}([de,he])}}}var A="__BEACON_",T="__BEACON_deviceId",_="last_report_time",q="sending_event_ids",P="beacon_config",L="beacon_config_request_time",Y=function(){function h(){var c=this;this.emit=function(a,d){if(c){var y,N=c.__EventsList[a];if(N!=null&&N.length){N=N.slice();for(var M=0;M<N.length;M++){y=N[M];try{var Q=y.callback.apply(c,[d]);if(y.type===1&&c.remove(a,y.callback),Q===!1)break}catch(de){throw de}}}return c}},this.__EventsList={}}return h.prototype.indexOf=function(c,a){for(var d=0;d<c.length;d++)if(c[d].callback===a)return d;return-1},h.prototype.on=function(c,a,d){if(d===void 0&&(d=0),this){var y=this.__EventsList[c];if(y||(y=this.__EventsList[c]=[]),this.indexOf(y,a)===-1){var N={name:c,type:d||0,callback:a};return y.push(N),this}return this}},h.prototype.one=function(c,a){this.on(c,a,1)},h.prototype.remove=function(c,a){if(this){var d=this.__EventsList[c];if(!d)return null;if(!a){try{delete this.__EventsList[c]}catch(N){}return null}if(d.length){var y=this.indexOf(d,a);d.splice(y,1)}return this}},h}();function G(h,c){for(var a={},d=0,y=Object.keys(h);d<y.length;d++){var N=y[d],M=h[N];if(typeof M=="string")a[ne(N)]=ne(M);else{if(c)throw new Error("value mast be string !!!!");a[ne(String(N))]=ne(String(M))}}return a}function ne(h){if(typeof h!="string")return h;try{return h.replace(new RegExp("\\|","g"),"%7C").replace(new RegExp("\\&","g"),"%26").replace(new RegExp("\\=","g"),"%3D").replace(new RegExp("\\+","g"),"%2B")}catch(c){return""}}function I(h){return String(h.A99)+String(h.A100)}var D=function(){},C=function(){function h(c){var a=this;this.lifeCycle=new Y,this.uploadJobQueue=[],this.additionalParams={},this.delayTime=0,this._normalLogPipeline=function(d){if(!d||!d.reduce||!d.length)throw new TypeError("createPipeline 方法需要传入至少有一个 pipe 的数组");return d.length===1?function(y,N){d[0](y,N||D)}:d.reduce(function(y,N){return function(M,Q){return Q===void 0&&(Q=D),y(M,function(de){return N==null?void 0:N(de,Q)})}})}([function(d){a.send({url:a.strategy.getUploadUrl(),data:d,method:"post",contentType:"application/json;charset=UTF-8"},function(){var y=a.config.onReportSuccess;typeof y=="function"&&y(JSON.stringify(d.events))},function(){var y=a.config.onReportFail;typeof y=="function"&&y(JSON.stringify(d.events))})}]),function(d,y){if(!d)throw y instanceof Error?y:new Error(y)}(!!c.appkey,"appkey must be initial"),this.config=E({},c)}return h.prototype.onUserAction=function(c,a){this.preReport(c,a,!1)},h.prototype.onDirectUserAction=function(c,a){this.preReport(c,a,!0)},h.prototype.preReport=function(c,a,d){c?this.strategy.isEventUpOnOff()&&(this.strategy.isBlackEvent(c)||this.strategy.isSampleEvent(c)||this.onReport(c,a,d)):this.errorReport.reportError("602"," no eventCode")},h.prototype.addAdditionalParams=function(c){for(var a=0,d=Object.keys(c);a<d.length;a++){var y=d[a];this.additionalParams[y]=c[y]}},h.prototype.setChannelId=function(c){this.commonInfo.channelID=String(c)},h.prototype.setOpenId=function(c){this.commonInfo.openid=String(c)},h.prototype.setUnionid=function(c){this.commonInfo.unid=String(c)},h.prototype.getDeviceId=function(){return this.commonInfo.deviceId},h.prototype.getCommonInfo=function(){return this.commonInfo},h.prototype.removeSendingId=function(c){try{var a=JSON.parse(this.storage.getItem(q)),d=a.indexOf(c);d!=-1&&(a.splice(d,1),this.storage.setItem(q,JSON.stringify(a)))}catch(y){}},h}(),k=function(){function h(c,a,d,y){this.requestParams={},this.network=y,this.requestParams.attaid="00400014144",this.requestParams.token="6478159937",this.requestParams.product_id=c.appkey,this.requestParams.platform=d,this.requestParams.uin=a.deviceId,this.requestParams.model="",this.requestParams.os=d,this.requestParams.app_version=c.appVersion,this.requestParams.sdk_version=a.sdkVersion,this.requestParams.error_stack="",this.uploadUrl=c.isOversea?"https://htrace.wetvinfo.com/kv":"https://h.trace.qq.com/kv"}return h.prototype.reportError=function(c,a){this.requestParams._dc=Math.random(),this.requestParams.error_msg=a,this.requestParams.error_code=c,this.network.get(this.uploadUrl,{params:this.requestParams}).catch(function(d){})},h}(),g=function(){function h(c,a,d,y,N){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=y,this.needQueryConfig=c;try{var M=JSON.parse(this.storage.getItem(P));M&&this.processData(M)}catch(Q){}a.isOversea&&(this.strategy.httpsUploadUrl="https://svibeacon.onezapp.com/analytics/v2_upload"),!a.isOversea&&this.needRequestConfig()&&this.requestConfig(a.appVersion,d,N)}return h.prototype.requestConfig=function(c,a,d){var y=this;this.storage.setItem(L,Date.now().toString()),d.post("https://oth.str.beacon.qq.com/trpc.beacon.configserver.BeaconConfigService/QueryConfig",{platformId:typeof wx>"u"?"3":"4",mainAppKey:this.appkey,appVersion:c,sdkVersion:a.sdkVersion,osVersion:a.userAgent,model:"",packageName:"",params:{A3:a.deviceId}}).then(function(N){if(N.data.ret==0)try{var M=JSON.parse(N.data.beaconConfig);M&&(y.processData(M),y.storage.setItem(P,N.data.beaconConfig))}catch(Q){}else y.processData(null),y.storage.setItem(P,"")}).catch(function(N){})},h.prototype.processData=function(c){var a,d,y,N,M;this.strategy.isEventUpOnOff=(a=c==null?void 0:c.isEventUpOnOff)!==null&&a!==void 0?a:this.strategy.isEventUpOnOff,this.strategy.httpsUploadUrl=(d=c==null?void 0:c.httpsUploadUrl)!==null&&d!==void 0?d:this.strategy.httpsUploadUrl,this.strategy.requestInterval=(y=c==null?void 0:c.requestInterval)!==null&&y!==void 0?y:this.strategy.requestInterval,this.strategy.blacklist=(N=c==null?void 0:c.blacklist)!==null&&N!==void 0?N:this.strategy.blacklist,this.strategy.samplelist=(M=c==null?void 0:c.samplelist)!==null&&M!==void 0?M:this.strategy.samplelist;for(var Q=0,de=this.strategy.samplelist;Q<de.length;Q++){var he=de[Q].split(",");he.length==2&&(this.realSample[he[0]]=he[1])}},h.prototype.needRequestConfig=function(){if(!this.needQueryConfig)return!1;var c=Number(this.storage.getItem(L));return Date.now()-c>60*this.strategy.requestInterval*1e3},h.prototype.getUploadUrl=function(){return this.strategy.httpsUploadUrl+"?appkey="+this.appkey},h.prototype.isBlackEvent=function(c){return this.strategy.blacklist.indexOf(c)!=-1},h.prototype.isEventUpOnOff=function(){return this.strategy.isEventUpOnOff},h.prototype.isSampleEvent=function(c){return!!Object.prototype.hasOwnProperty.call(this.realSample,c)&&this.realSample[c]<Math.floor(Math.random()*Math.floor(1e4))},h}(),F="session_storage_key",H=function(){function h(c,a,d){this.getSessionStackDepth=0,this.beacon=d,this.storage=c,this.duration=a,this.appkey=d.config.appkey}return h.prototype.getSession=function(){this.getSessionStackDepth+=1;var c=this.storage.getItem(F);if(!c)return this.createSession();var a="",d=0;try{var y=JSON.parse(c)||{sessionId:void 0,sessionStart:void 0};if(!y.sessionId||!y.sessionStart)return this.createSession();var N=Number(this.storage.getItem(_));if(Date.now()-N>this.duration)return this.createSession();a=y.sessionId,d=y.sessionStart,this.getSessionStackDepth=0}catch(M){}return{sessionId:a,sessionStart:d}},h.prototype.createSession=function(){var c=Date.now(),a={sessionId:this.appkey+"_"+c.toString(),sessionStart:c};this.storage.setItem(F,JSON.stringify(a)),this.storage.setItem(_,c.toString());var d="is_new_user",y=this.storage.getItem(d);return this.getSessionStackDepth<=1&&this.beacon.onDirectUserAction("rqd_applaunched",{A21:y?"N":"Y"}),this.storage.setItem(d,JSON.stringify(!1)),a},h}();function U(){var h=navigator.userAgent,c=h.indexOf("compatible")>-1&&h.indexOf("MSIE")>-1,a=h.indexOf("Edge")>-1&&!c,d=h.indexOf("Trident")>-1&&h.indexOf("rv:11.0")>-1;if(c){new RegExp("MSIE (\\d+\\.\\d+);").test(h);var y=parseFloat(RegExp.$1);return y==7?7:y==8?8:y==9?9:y==10?10:6}return a?-2:d?11:-1}function z(h,c){var a,d;return(a="https://tun-cos-1258344701.file.myqcloud.com/fp.js",d===void 0&&(d=Date.now()+"-"+Math.random()),new Promise(function(y,N){if(document.getElementById(d))y(void 0);else{var M=document.getElementsByTagName("head")[0],Q=document.createElement("script");Q.onload=function(){return function(){Q.onload=null,y(void 0)}},Q.onerror=function(de){Q.onerror=null,M.removeChild(Q),N(de)},Q.src=a,Q.id=d,M.appendChild(Q)}})).then(function(){new Fingerprint().getQimei36(h,c)}).catch(function(y){}),""}var R=function(){return(R=Object.assign||function(c){for(var a,d=1,y=arguments.length;d<y;d++)for(var N in a=arguments[d])Object.prototype.hasOwnProperty.call(a,N)&&(c[N]=a[N]);return c}).apply(this,arguments)},V,X=function(){function h(c,a){a===void 0&&(a={}),this.reportOptions={},this.config=c,this.reportOptions=a}return h.canUseDB=function(){return!!(window!=null&&window.indexedDB)},h.prototype.openDB=function(){var c=this;return new Promise(function(a,d){if(!h.canUseDB())return d({message:"当前不支持 indexeddb"});var y=c.config,N=y.name,M=y.version,Q=y.stores,de=indexedDB.open(N,M);de.onsuccess=function(){c.db=de.result,a(),R({result:1,func:"open",params:JSON.stringify(c.config)},c.reportOptions)},de.onerror=function(he){var $,Se;d(he),R({result:0,func:"open",params:JSON.stringify(c.config),error_msg:(Se=($=he.target)===null||$===void 0?void 0:$.error)===null||Se===void 0?void 0:Se.message},c.reportOptions)},de.onupgradeneeded=function(){c.db=de.result;try{Q==null||Q.forEach(function(he){c.createStore(he)})}catch(he){R({result:0,func:"open",params:JSON.stringify(c.config),error_msg:he.message},c.reportOptions),d(he)}}})},h.prototype.useStore=function(c){return this.storeName=c,this},h.prototype.deleteDB=function(){var c=this;return this.closeDB(),new Promise(function(a,d){var y=indexedDB.deleteDatabase(c.config.name);y.onsuccess=function(){return a()},y.onerror=d})},h.prototype.closeDB=function(){var c;(c=this.db)===null||c===void 0||c.close(),this.db=null},h.prototype.getStoreCount=function(){var c=this;return new Promise(function(a,d){var y=c.getStore("readonly").count();y.onsuccess=function(){return a(y.result)},y.onerror=d})},h.prototype.clearStore=function(){var c=this;return new Promise(function(a,d){var y=c.getStore("readwrite").clear();y.onsuccess=function(){return a()},y.onerror=d})},h.prototype.add=function(c,a){var d=this;return new Promise(function(y,N){var M=d.getStore("readwrite").add(c,a);M.onsuccess=function(){y(M.result)},M.onerror=N})},h.prototype.put=function(c,a){var d=this;return new Promise(function(y,N){var M=d.getStore("readwrite").put(c,a);M.onsuccess=function(){y(M.result)},M.onerror=N})},h.prototype.getStoreAllData=function(){var c=this;return new Promise(function(a,d){var y=c.getStore("readonly").openCursor(),N=[];y.onsuccess=function(){var M;if(!((M=y.result)===null||M===void 0)&&M.value){var Q=y.result.value;N.push(Q),y.result.continue()}else a(N)},y.onerror=d})},h.prototype.getDataRangeByIndex=function(c,a,d,y,N){var M=this;return new Promise(function(Q,de){var he=M.getStore().index(c),$=IDBKeyRange.bound(a,d,y,N),Se=[],Ie=he.openCursor($);Ie.onsuccess=function(){var Fe;!((Fe=Ie==null?void 0:Ie.result)===null||Fe===void 0)&&Fe.value?(Se.push(Ie==null?void 0:Ie.result.value),Ie==null||Ie.result.continue()):Q(Se)},Ie.onerror=de})},h.prototype.removeDataByIndex=function(c,a,d,y,N){var M=this;return new Promise(function(Q,de){var he=M.getStore("readwrite").index(c),$=IDBKeyRange.bound(a,d,y,N),Se=he.openCursor($),Ie=0;Se.onsuccess=function(Fe){var Re=Fe.target.result;Re?(Ie+=1,Re.delete(),Re.continue()):Q(Ie)},Se.onerror=de})},h.prototype.createStore=function(c){var a=c.name,d=c.indexes,y=d===void 0?[]:d,N=c.options;if(this.db){this.db.objectStoreNames.contains(a)&&this.db.deleteObjectStore(a);var M=this.db.createObjectStore(a,N);y.forEach(function(Q){M.createIndex(Q.indexName,Q.keyPath,Q.options)})}},h.prototype.getStore=function(c){var a;return c===void 0&&(c="readonly"),(a=this.db)===null||a===void 0?void 0:a.transaction(this.storeName,c).objectStore(this.storeName)},h}(),W="event_table_v3",J="eventId",ie=function(){function h(c){this.isReady=!1,this.taskQueue=Promise.resolve(),this.db=new X({name:"Beacon_"+c+"_V3",version:1,stores:[{name:W,options:{keyPath:J},indexes:[{indexName:J,keyPath:J,options:{unique:!0}}]}]}),this.open()}return h.prototype.getCount=function(){var c=this;return this.readyExec(function(){return c.db.getStoreCount()})},h.prototype.setItem=function(c,a){var d=this;return this.readyExec(function(){return d.db.add({eventId:c,value:a})})},h.prototype.getItem=function(c){return w(this,void 0,void 0,function(){var a=this;return S(this,function(d){return[2,this.readyExec(function(){return a.db.getDataRangeByIndex(J,c,c)})]})})},h.prototype.removeItem=function(c){var a=this;return this.readyExec(function(){return a.db.removeDataByIndex(J,c,c)})},h.prototype.updateItem=function(c,a){var d=this;return this.readyExec(function(){return d.db.put({eventId:c,value:a})})},h.prototype.iterate=function(c){var a=this;return this.readyExec(function(){return a.db.getStoreAllData().then(function(d){d.forEach(function(y){c(y.value)})})})},h.prototype.open=function(){return w(this,void 0,void 0,function(){var c=this;return S(this,function(a){switch(a.label){case 0:return this.taskQueue=this.taskQueue.then(function(){return c.db.openDB()}),[4,this.taskQueue];case 1:return a.sent(),this.isReady=!0,this.db.useStore(W),[2]}})})},h.prototype.readyExec=function(c){return this.isReady?c():(this.taskQueue=this.taskQueue.then(function(){return c()}),this.taskQueue)},h}(),se=function(){function h(c){this.keyObject={},this.storage=c}return h.prototype.getCount=function(){return this.storage.getStoreCount()},h.prototype.removeItem=function(c){this.storage.removeItem(c),delete this.keyObject[c]},h.prototype.setItem=function(c,a){var d=JSON.stringify(a);this.storage.setItem(c,d),this.keyObject[c]=a},h.prototype.iterate=function(c){for(var a=Object.keys(this.keyObject),d=0;d<a.length;d++){var y=this.storage.getItem(a[d]);c(JSON.parse(y))}},h}(),oe=function(){function h(c,a){var d=this;this.dbEventCount=0,U()>0||!window.indexedDB||/X5Lite/.test(navigator.userAgent)?(this.store=new se(a),this.dbEventCount=this.store.getCount()):(this.store=new ie(c),this.getCount().then(function(y){d.dbEventCount=y}).catch(function(y){}))}return h.prototype.getCount=function(){return w(this,void 0,void 0,function(){return S(this,function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),[4,this.store.getCount()];case 1:return[2,c.sent()];case 2:return c.sent(),[2,Promise.reject()];case 3:return[2]}})})},h.prototype.insertEvent=function(c,a){return w(this,void 0,void 0,function(){var d,y;return S(this,function(N){switch(N.label){case 0:if(this.dbEventCount>=1e4)return[2,Promise.reject()];d=I(c.mapValue),N.label=1;case 1:return N.trys.push([1,3,,4]),this.dbEventCount++,[4,this.store.setItem(d,c)];case 2:return[2,N.sent()];case 3:return y=N.sent(),a&&a(y,c),this.dbEventCount--,[2,Promise.reject()];case 4:return[2]}})})},h.prototype.getEvents=function(){return w(this,void 0,void 0,function(){var c;return S(this,function(a){switch(a.label){case 0:c=[],a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.store.iterate(function(d){c.push(d)})];case 2:return a.sent(),[2,Promise.all(c)];case 3:return a.sent(),[2,Promise.all(c)];case 4:return[2]}})})},h.prototype.removeEvent=function(c){return w(this,void 0,void 0,function(){var a;return S(this,function(d){switch(d.label){case 0:a=I(c.mapValue),d.label=1;case 1:return d.trys.push([1,3,,4]),this.dbEventCount--,[4,this.store.removeItem(a)];case 2:return[2,d.sent()];case 3:return d.sent(),this.dbEventCount++,[2,Promise.reject()];case 4:return[2]}})})},h}(),ee=function(){return(ee=Object.assign||function(c){for(var a,d=1,y=arguments.length;d<y;d++)for(var N in a=arguments[d])Object.prototype.hasOwnProperty.call(a,N)&&(c[N]=a[N]);return c}).apply(this,arguments)};function ce(h){try{return decodeURIComponent(h.replace(/\+/g," "))}catch(c){return null}}function ae(h,c){var a=[null,void 0,"",NaN].includes(h);if(c.isSkipEmpty&&a)return null;var d=!c.isSkipEmpty&&a?"":h;try{return c.encode?encodeURIComponent(d):d}catch(y){return null}}function pe(h,c){c===void 0&&(c={encode:!0,isSkipEmpty:!1});var a=h.url,d=h.query,y=d===void 0?{}:d,N=h.hash,M=a.split("#"),Q=M[0],de=M[1],he=de===void 0?"":de,$=Q.split("?")[0],Se=[],Ie=ae(N||he,c),Fe=ee(ee({},function(Re){var Le=Re.split("#"),Ve=Le[0],Ke=Le[1],We=Ke===void 0?"":Ke,ze=Ve.split("?"),Ge=ze[0],Xe=ze[1],rt=Xe===void 0?"":Xe,et=ce(We),nt=Object.create(null);return rt.split("&").forEach(function(f){var v=f.split("="),O=v[0],K=v[1],fe=K===void 0?"":K,xe=ce(O),Me=ce(fe);xe===null||Me===null||xe===""&&Me===""||nt[xe]||(nt[xe]=Me)}),{url:Ge,query:nt,hash:et}}(a).query),y);return Object.keys(Fe).forEach(function(Re){var Le=ae(Re,c),Ve=ae(Fe[Re],c);Le!==null&&Ve!==null&&Se.push(Le+"="+Ve)}),$+(Se.length?"?"+Se.join("&"):"")+(Ie?"#"+Ie:"")}function Z(h,c){return new Promise(function(a,d){if(c&&document.querySelectorAll("script[data-tag="+c+"]").length)return a();var y=document.createElement("script"),N=ee({type:"text/javascript",charset:"utf-8"},h);Object.keys(N).forEach(function(M){return function(Q,de,he){if(Q)return he===void 0?Q.getAttribute(de):Q.setAttribute(de,he)}(y,M,N[M])}),c&&(y.dataset.tag=c),y.onload=function(){return a()},y.onreadystatechange=function(){var M=y.readyState;["complete","loaded"].includes(M)&&(y.onreadystatechange=null,a())},y.onerror=d,document.body.appendChild(y)})}(function(h){h[h.equal=0]="equal",h[h.low=-1]="low",h[h.high=1]="high"})(V||(V={}));var re=function(){return(re=Object.assign||function(c){for(var a,d=1,y=arguments.length;d<y;d++)for(var N in a=arguments[d])Object.prototype.hasOwnProperty.call(a,N)&&(c[N]=a[N]);return c}).apply(this,arguments)};function ge(h,c,a,d){return new(a||(a=Promise))(function(y,N){function M(he){try{de(d.next(he))}catch($){N($)}}function Q(he){try{de(d.throw(he))}catch($){N($)}}function de(he){var $;he.done?y(he.value):($=he.value,$ instanceof a?$:new a(function(Se){Se($)})).then(M,Q)}de((d=d.apply(h,c||[])).next())})}function ye(h,c){var a,d,y,N,M={label:0,sent:function(){if(1&y[0])throw y[1];return y[1]},trys:[],ops:[]};return N={next:Q(0),throw:Q(1),return:Q(2)},typeof Symbol=="function"&&(N[Symbol.iterator]=function(){return this}),N;function Q(de){return function(he){return function($){if(a)throw new TypeError("Generator is already executing.");for(;M;)try{if(a=1,d&&(y=2&$[0]?d.return:$[0]?d.throw||((y=d.return)&&y.call(d),0):d.next)&&!(y=y.call(d,$[1])).done)return y;switch(d=0,y&&($=[2&$[0],y.value]),$[0]){case 0:case 1:y=$;break;case 4:return M.label++,{value:$[1],done:!1};case 5:M.label++,d=$[1],$=[0];continue;case 7:$=M.ops.pop(),M.trys.pop();continue;default:if(!((y=(y=M.trys).length>0&&y[y.length-1])||$[0]!==6&&$[0]!==2)){M=0;continue}if($[0]===3&&(!y||$[1]>y[0]&&$[1]<y[3])){M.label=$[1];break}if($[0]===6&&M.label<y[1]){M.label=y[1],y=$;break}if(y&&M.label<y[2]){M.label=y[2],M.ops.push($);break}y[2]&&M.ops.pop(),M.trys.pop();continue}$=c.call(h,M)}catch(Se){$=[6,Se],d=0}finally{a=y=0}if(5&$[0])throw $[1];return{value:$[0]?$[1]:void 0,done:!0}}([de,he])}}}var ve=function(){function h(){this.interceptors=[]}return h.prototype.use=function(c,a){return this.interceptors.push({resolved:c,rejected:a}),this.interceptors.length-1},h.prototype.traverse=function(c,a){a===void 0&&(a=!1);var d=Promise.resolve(c);return(a?Array.prototype.reduceRight:Array.prototype.reduce).call(this.interceptors,function(y,N){if(N){var M=N.resolved,Q=N.rejected;d=d.then(M,Q)}return y},""),d},h.prototype.eject=function(c){this.interceptors[c]&&(this.interceptors[c]=null)},h}(),me={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 ve,response:new ve}},Ce=/^([a-z][a-z\d+\-.]*:)?\/\//i,Ee=Object.prototype.toString;function be(h){return ge(this,void 0,void 0,function(){var c;return ye(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,Z({src:h})];case 2:return a.sent(),[3,4];case 3:throw c=a.sent(),new Error("加载 polyfill "+h+" 失败: "+c.message);case 4:return[2]}})})}function Be(h){return["Accept","Content-Type"].forEach(function(c){return a=c,void((d=h.headers)&&Object.keys(d).forEach(function(y){y!==a&&y.toUpperCase()===a.toUpperCase()&&(d[a]=d[y],delete d[y])}));var a,d}),function(c){if(Ee.call(c)!=="[object Object]")return!1;var a=Object.getPrototypeOf(c);return a===null||a===Object.prototype}(h.body)&&(h.body=JSON.stringify(h.body),h.headers&&(h.headers["Content-Type"]="application/json;charset=utf-8")),h}function we(h){return ge(this,void 0,void 0,function(){var c,a,d,y,N,M,Q,de,he,$,Se,Ie,Fe,Re,Le,Ve,Ke;return ye(this,function(We){switch(We.label){case 0:return c=me.baseURL,a=me.defaults,d=me.interceptors,[4,be(me.polyfillUrl)];case 1:return We.sent(),(y=re(re({},a),h)).headers||(y.headers=function(ze){ze===void 0&&(ze="GET");var Ge=me.headers[ze]||{};return re(re({},me.headers.common),Ge)}(y.method)),Be(y),[4,d.request.traverse(y,!0)];case 2:if((N=We.sent())instanceof Error)throw N;return N.url=function(ze,Ge){return!ze||Ce.test(Ge)?Ge:ze.replace(/\/+$/,"")+"/"+Ge.replace(/^\/+/,"")}(c,N.url),M=N.url,Q=N.timeout,de=N.params,he=N.method,$=["GET","DELETE","OPTIONS","HEAD"].includes(he===void 0?"GET":he)&&!!de,Se=$?pe({url:M,query:de}):M,Ie=[],Q&&!N.signal&&(Le=new Promise(function(ze){Fe=setTimeout(function(){ze(new Error("timeout"))},Q)}),Ie.push(Le),Re=new AbortController,N.signal=Re.signal),Ie.push(fetch(Se,N).catch(function(ze){return ze})),[4,Promise.race(Ie)];case 3:return Ve=We.sent(),Fe&&clearTimeout(Fe),[4,d.response.traverse(Ve)];case 4:if((Ke=We.sent())instanceof Error)throw Re==null||Re.abort(),Ke;return[2,Ke]}})})}var _e=function(){function h(c){me.interceptors.request.use(function(a){var d=a.url,y=a.method,N=a.body,M=N;if(c.onReportBeforeSend){var Q=c.onReportBeforeSend({url:d,method:y,data:N?JSON.parse(N):null});M=Q!=null&&Q.data?JSON.stringify(Q.data):null}return y!="GET"&&M?E(E({},a),{body:M}):a})}return h.prototype.get=function(c,a){return w(this,void 0,void 0,function(){var d,y;return S(this,function(N){switch(N.label){case 0:return[4,we(E({url:c},a))];case 1:return[4,(d=N.sent()).json()];case 2:return y=N.sent(),[2,Promise.resolve({data:y,status:d.status,statusText:d.statusText,headers:d.headers})]}})})},h.prototype.post=function(c,a,d){return w(this,void 0,void 0,function(){var y,N;return S(this,function(M){switch(M.label){case 0:return[4,we(E({url:c,body:a,method:"POST"},d))];case 1:return[4,(y=M.sent()).json()];case 2:return N=M.sent(),[2,Promise.resolve({data:N,status:y.status,statusText:y.statusText,headers:y.headers})]}})})},h}(),Ue=function(){function h(c){this.appkey=c}return h.prototype.getItem=function(c){try{return window.localStorage.getItem(this.getStoreKey(c))}catch(a){return""}},h.prototype.removeItem=function(c){try{window.localStorage.removeItem(this.getStoreKey(c))}catch(a){}},h.prototype.setItem=function(c,a){try{window.localStorage.setItem(this.getStoreKey(c),a)}catch(d){}},h.prototype.setSessionItem=function(c,a){try{window.sessionStorage.setItem(this.getStoreKey(c),a)}catch(d){}},h.prototype.getSessionItem=function(c){try{return window.sessionStorage.getItem(this.getStoreKey(c))}catch(a){return""}},h.prototype.getStoreKey=function(c){return A+this.appkey+"_"+c},h.prototype.createDeviceId=function(){try{var c=window.localStorage.getItem(T);return c||(c=function(a){for(var d="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz0123456789",y="",N=0;N<a;N++)y+=d.charAt(Math.floor(Math.random()*d.length));return y}(32),window.localStorage.setItem(T,c)),c}catch(a){return""}},h.prototype.clear=function(){try{for(var c=window.localStorage.length,a=0;a<c;a++){var d=window.localStorage.key(a);(d==null?void 0:d.substr(0,9))==A&&window.localStorage.removeItem(d)}}catch(y){}},h.prototype.getStoreCount=function(){var c=0;try{c=window.localStorage.length}catch(a){}return c},h}(),Pe="logid_start",ue="4.5.14-web";return function(h){function c(a){var d=h.call(this,a)||this;d.qimei36="",d.uselessCycleTaskNum=0,d.underWeakNet=!1,d.pauseSearching=!1,d.send=function(Q,de,he){d.storage.setItem(_,Date.now().toString()),d.network.post(d.uploadUrl||d.strategy.getUploadUrl(),Q.data).then(function($){var Se;((Se=$==null?void 0:$.data)===null||Se===void 0?void 0:Se.result)==100?d.delayTime=1e3*$.data.delayTime:d.delayTime=0,de&&de(Q.data),Q.data.events.forEach(function(Ie){d.store.removeEvent(Ie).then(function(){d.removeSendingId(I(Ie.mapValue))})}),d.doCustomCycleTask()}).catch(function($){var Se=Q.data.events;d.errorReport.reportError($.code?$.code.toString():"600",$.message),he&&he(Q.data);var Ie=JSON.parse(d.storage.getItem(q));Se.forEach(function(Fe){Ie&&Ie.indexOf(I(Fe))!=-1&&d.store.insertEvent(Fe,function(Re,Le){Re&&d.errorReport.reportError("604","insertEvent fail!")}),d.removeSendingId(I(Fe))}),d.monitorUploadFailed()})};var y,N,M=U();return d.isUnderIE8=M>0&&M<8,d.isUnderIE8||(d.isUnderIE=M>0,a.needInitQimei&&z(a.appkey,function(Q){d.qimei36=Q.q36}),d.network=new _e(a),d.storage=new Ue(a.appkey),d.initCommonInfo(a),d.store=new oe(a.appkey,d.storage),d.errorReport=new k(d.config,d.commonInfo,"web",d.network),d.strategy=new g(a.needQueryConfig==null||a.needQueryConfig,d.config,d.commonInfo,d.storage,d.network),d.logidStartTime=d.storage.getItem(Pe),d.logidStartTime||(d.logidStartTime=Date.now().toString(),d.storage.setItem(Pe,d.logidStartTime)),y=d.logidStartTime,N=Date.now()-Number.parseFloat(y),Math.floor(N/864e5)>=365&&d.storage.clear(),d.initSession(a),d.onDirectUserAction("rqd_js_init",{}),setTimeout(function(){return d.lifeCycle.emit("init")},0),d.initDelayTime=a.delay?a.delay:1e3,d.cycleTask(d.initDelayTime)),d}return function(a,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function y(){this.constructor=a}s(a,d),a.prototype=d===null?Object.create(d):(y.prototype=d.prototype,new y)}(c,h),c.prototype.initSession=function(a){var d=18e5;a.sessionDuration&&a.sessionDuration>3e4&&(d=a.sessionDuration),this.beaconSession=new H(this.storage,d,this)},c.prototype.initCommonInfo=function(a){var d=Number(this.storage.getItem(_));try{var y=JSON.parse(this.storage.getItem(q));(Date.now()-d>3e4||!y)&&this.storage.setItem(q,JSON.stringify([]))}catch(M){}a.uploadUrl&&(this.uploadUrl=a.uploadUrl+"?appkey="+a.appkey);var N=[window.screen.width,window.screen.height];window.devicePixelRatio&&N.push(window.devicePixelRatio),this.commonInfo={deviceId:this.storage.createDeviceId(),language:navigator&&navigator.language||"zh_CN",query:window.location.search,userAgent:navigator.userAgent,pixel:N.join("*"),channelID:a.channelID?String(a.channelID):"",openid:a.openid?String(a.openid):"",unid:a.unionid?String(a.unionid):"",sdkVersion:ue},this.config.appVersion=a.versionCode?String(a.versionCode):"",this.config.strictMode=a.strictMode},c.prototype.cycleTask=function(a){var d=this;this.intervalID=window.setInterval(function(){d.pauseSearching||d.store.getEvents().then(function(y){y.length==0&&(d.pauseSearching=!0);var N=[],M=JSON.parse(d.storage.getItem(q));M||(M=[]),y&&y.forEach(function(Q){var de=I(Q.mapValue);M.indexOf(de)==-1&&(N.push(Q),M.push(de))}),N.length!=0&&(d.storage.setItem(q,JSON.stringify(M)),d._normalLogPipeline(d.assembleData(N)))}).catch(function(y){})},a)},c.prototype.onReport=function(a,d,y){var N=this;if(this.isUnderIE8)this.errorReport.reportError("601","UnderIE8");else{this.pauseSearching=!1;var M=this.generateData(a,d,y);if(y&&this.delayTime==0&&!this.underWeakNet)this._normalLogPipeline(this.assembleData(M));else{var Q=M.shift();Q&&this.store.insertEvent(Q,function(de){de&&N.errorReport.reportError("604","insertEvent fail!")}).catch(function(de){N._normalLogPipeline(N.assembleData(M))})}}},c.prototype.onSendBeacon=function(a,d){if(this.isUnderIE)this.errorReport.reportError("605","UnderIE");else{this.pauseSearching=!1;var y=this.assembleData(this.generateData(a,d,!0));typeof navigator.sendBeacon=="function"&&navigator.sendBeacon(this.uploadUrl||this.strategy.getUploadUrl(),JSON.stringify(y))}},c.prototype.generateData=function(a,d,y){var N=[],M="4.5.14-web_"+(y?"direct_log_id":"normal_log_id"),Q=Number(this.storage.getItem(M));return Q=Q||1,d=E(E({},d),{A99:y?"Y":"N",A100:Q.toString(),A72:ue,A88:this.logidStartTime}),Q++,this.storage.setItem(M,Q.toString()),N.push({eventCode:a,eventTime:Date.now().toString(),mapValue:G(d,this.config.strictMode)}),N},c.prototype.assembleData=function(a){var d=this.beaconSession.getSession();return{appVersion:this.config.appVersion?ne(this.config.appVersion):"",sdkId:"js",sdkVersion:ue,mainAppKey:this.config.appkey,platformId:3,common:G(E(E({},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:d.sessionId,A101:this.commonInfo.userAgent,A102:window.location.href,A104:document.referrer,A119:this.commonInfo.query,A153:this.qimei36}),!1),events:a}},c.prototype.monitorUploadFailed=function(){this.uselessCycleTaskNum++,this.uselessCycleTaskNum>=5&&(window.clearInterval(this.intervalID),this.cycleTask(6e4),this.underWeakNet=!0)},c.prototype.doCustomCycleTask=function(){this.uselessCycleTaskNum>=5&&(window.clearInterval(this.intervalID),this.cycleTask(this.initDelayTime)),this.uselessCycleTaskNum=0,this.underWeakNet=!1},c}(C)})},"./lib/crypto.js":function(i,r,e){(function(t){var l=e("./node_modules/@babel/runtime/helpers/typeof.js"),o=o||function(s,E){var w={},S=w.lib={},A=function(){},T=S.Base={extend:function(D){A.prototype=this;var C=new A;return D&&C.mixIn(D),C.hasOwnProperty("init")||(C.init=function(){C.$super.init.apply(this,arguments)}),C.init.prototype=C,C.$super=this,C},create:function(){var D=this.extend();return D.init.apply(D,arguments),D},init:function(){},mixIn:function(D){for(var C in D)D.hasOwnProperty(C)&&(this[C]=D[C]);D.hasOwnProperty("toString")&&(this.toString=D.toString)},clone:function(){return this.init.prototype.extend(this)}},_=S.WordArray=T.extend({init:function(D,C){D=this.words=D||[],this.sigBytes=C!=E?C:4*D.length},toString:function(D){return(D||P).stringify(this)},concat:function(D){var C=this.words,k=D.words,g=this.sigBytes;if(D=D.sigBytes,this.clamp(),g%4)for(var F=0;F<D;F++)C[g+F>>>2]|=(k[F>>>2]>>>24-8*(F%4)&255)<<24-8*((g+F)%4);else if(65535<k.length)for(F=0;F<D;F+=4)C[g+F>>>2]=k[F>>>2];else C.push.apply(C,k);return this.sigBytes+=D,this},clamp:function(){var D=this.words,C=this.sigBytes;D[C>>>2]&=4294967295<<32-8*(C%4),D.length=s.ceil(C/4)},clone:function(){var D=T.clone.call(this);return D.words=this.words.slice(0),D},random:function(D){for(var C=[],k=0;k<D;k+=4)C.push(4294967296*s.random()|0);return new _.init(C,D)}}),q=w.enc={},P=q.Hex={stringify:function(D){var C=D.words;D=D.sigBytes;for(var k=[],g=0;g<D;g++){var F=C[g>>>2]>>>24-8*(g%4)&255;k.push((F>>>4).toString(16)),k.push((F&15).toString(16))}return k.join("")},parse:function(D){for(var C=D.length,k=[],g=0;g<C;g+=2)k[g>>>3]|=parseInt(D.substr(g,2),16)<<24-4*(g%8);return new _.init(k,C/2)}},L=q.Latin1={stringify:function(D){var C=D.words;D=D.sigBytes;for(var k=[],g=0;g<D;g++)k.push(String.fromCharCode(C[g>>>2]>>>24-8*(g%4)&255));return k.join("")},parse:function(D){for(var C=D.length,k=[],g=0;g<C;g++)k[g>>>2]|=(D.charCodeAt(g)&255)<<24-8*(g%4);return new _.init(k,C)}},Y=q.Utf8={stringify:function(D){try{return decodeURIComponent(escape(L.stringify(D)))}catch(C){throw Error("Malformed UTF-8 data")}},parse:function(D){return L.parse(unescape(encodeURIComponent(D)))}},G=S.BufferedBlockAlgorithm=T.extend({reset:function(){this._data=new _.init,this._nDataBytes=0},_append:function(D){typeof D=="string"&&(D=Y.parse(D)),this._data.concat(D),this._nDataBytes+=D.sigBytes},_process:function(D){var C=this._data,k=C.words,g=C.sigBytes,F=this.blockSize,H=g/(4*F),H=D?s.ceil(H):s.max((H|0)-this._minBufferSize,0);if(D=H*F,g=s.min(4*D,g),D){for(var U=0;U<D;U+=F)this._doProcessBlock(k,U);U=k.splice(0,D),C.sigBytes-=g}return new _.init(U,g)},clone:function(){var D=T.clone.call(this);return D._data=this._data.clone(),D},_minBufferSize:0});S.Hasher=G.extend({cfg:T.extend(),init:function(D){this.cfg=this.cfg.extend(D),this.reset()},reset:function(){G.reset.call(this),this._doReset()},update:function(D){return this._append(D),this._process(),this},finalize:function(D){return D&&this._append(D),this._doFinalize()},blockSize:16,_createHelper:function(D){return function(C,k){return new D.init(k).finalize(C)}},_createHmacHelper:function(D){return function(C,k){return new ne.HMAC.init(D,k).finalize(C)}}});var ne=w.algo={};return w}(Math);(function(){var s=o,A=s.lib,E=A.WordArray,w=A.Hasher,S=[],A=s.algo.SHA1=w.extend({_doReset:function(){this._hash=new E.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(_,q){for(var P=this._hash.words,L=P[0],Y=P[1],G=P[2],ne=P[3],I=P[4],D=0;80>D;D++){if(16>D)S[D]=_[q+D]|0;else{var C=S[D-3]^S[D-8]^S[D-14]^S[D-16];S[D]=C<<1|C>>>31}C=(L<<5|L>>>27)+I+S[D],C=20>D?C+((Y&G|~Y&ne)+1518500249):40>D?C+((Y^G^ne)+1859775393):60>D?C+((Y&G|Y&ne|G&ne)-1894007588):C+((Y^G^ne)-899497514),I=ne,ne=G,G=Y<<30|Y>>>2,Y=L,L=C}P[0]=P[0]+L|0,P[1]=P[1]+Y|0,P[2]=P[2]+G|0,P[3]=P[3]+ne|0,P[4]=P[4]+I|0},_doFinalize:function(){var _=this._data,q=_.words,P=8*this._nDataBytes,L=8*_.sigBytes;return q[L>>>5]|=128<<24-L%32,q[(L+64>>>9<<4)+14]=Math.floor(P/4294967296),q[(L+64>>>9<<4)+15]=P,_.sigBytes=4*q.length,this._process(),this._hash},clone:function(){var _=w.clone.call(this);return _._hash=this._hash.clone(),_}});s.SHA1=w._createHelper(A),s.HmacSHA1=w._createHmacHelper(A)})(),function(){var s=o,E=s.enc.Utf8;s.algo.HMAC=s.lib.Base.extend({init:function(S,A){S=this._hasher=new S.init,typeof A=="string"&&(A=E.parse(A));var T=S.blockSize,_=4*T;A.sigBytes>_&&(A=S.finalize(A)),A.clamp();for(var q=this._oKey=A.clone(),P=this._iKey=A.clone(),L=q.words,Y=P.words,G=0;G<T;G++)L[G]^=1549556828,Y[G]^=909522486;q.sigBytes=P.sigBytes=_,this.reset()},reset:function(){var S=this._hasher;S.reset(),S.update(this._iKey)},update:function(S){return this._hasher.update(S),this},finalize:function(S){var A=this._hasher;return S=A.finalize(S),A.reset(),A.finalize(this._oKey.clone().concat(S))}})}(),function(){var s=o,E=s.lib,w=E.WordArray,S=s.enc;S.Base64={stringify:function(T){var _=T.words,q=T.sigBytes,P=this._map;T.clamp();for(var L=[],Y=0;Y<q;Y+=3)for(var G=_[Y>>>2]>>>24-Y%4*8&255,ne=_[Y+1>>>2]>>>24-(Y+1)%4*8&255,I=_[Y+2>>>2]>>>24-(Y+2)%4*8&255,D=G<<16|ne<<8|I,C=0;C<4&&Y+C*.75<q;C++)L.push(P.charAt(D>>>6*(3-C)&63));var k=P.charAt(64);if(k)for(;L.length%4;)L.push(k);return L.join("")},parse:function(T){var _=T.length,q=this._map,P=q.charAt(64);if(P){var L=T.indexOf(P);L!=-1&&(_=L)}for(var Y=[],G=0,ne=0;ne<_;ne++)if(ne%4){var I=q.indexOf(T.charAt(ne-1))<<ne%4*2,D=q.indexOf(T.charAt(ne))>>>6-ne%4*2;Y[G>>>2]|=(I|D)<<24-G%4*8,G++}return w.create(Y,G)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),l(t)==="object"?t.exports=o:window.CryptoJS=o}).call(this,e("./node_modules/webpack/buildin/module.js")(i))},"./lib/json2xml.js":function(i,r,e){var t=e("./node_modules/@babel/runtime/helpers/typeof.js"),l="a-zA-Z_À-ÖØ-öø-ÿͰ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿿、-퟿豈-﷏ﷰ-�",o="-.0-9·̀-ͯ‿⁀",s=new RegExp("^([^"+l+"])|^((x|X)(m|M)(l|L))|([^"+l+o+"])","g"),E=/[^\x09\x0A\x0D\x20-\xFF\x85\xA0-\uD7FF\uE000-\uFDCF\uFDE0-\uFFFD]/gm,w=function(q){var P=[];if(q instanceof Object)for(var L in q)q.hasOwnProperty(L)&&P.push(L);return P},S=function(q,P){var L=function(G,ne,I,D,C){var k=P.indent!==void 0?P.indent:" ",g=P.prettyPrint?"\n"+new Array(D).join(k):"";P.removeIllegalNameCharacters&&(G=G.replace(s,"_"));var F=[g,"<",G,I||""];return ne&&ne.length>0?(F.push(">"),F.push(ne),C&&F.push(g),F.push("</"),F.push(G),F.push(">")):F.push("/>"),F.join("")};return function Y(G,ne,I){var D=t(G);switch((Array.isArray?Array.isArray(G):G instanceof Array)?D="array":G instanceof Date&&(D="date"),D){case"array":var C=[];return G.map(function(H){C.push(Y(H,1,I+1))}),P.prettyPrint&&C.push("\n"),C.join("");case"date":return G.toJSON?G.toJSON():G+"";case"object":var k=[];for(var g in G)if(G.hasOwnProperty(g))if(G[g]instanceof Array)for(var F=0;F<G[g].length;F++)G[g].hasOwnProperty(F)&&k.push(L(g,Y(G[g][F],0,I+1),null,I+1,w(G[g][F]).length));else k.push(L(g,Y(G[g],0,I+1),null,I+1));return P.prettyPrint&&k.length>0&&k.push("\n"),k.join("");case"function":return G();default:return P.escape?T(G):""+G}}(q,0,0)},A=function(q){var P=['<?xml version="1.0" encoding="UTF-8"'];return q&&P.push(' standalone="yes"'),P.push("?>"),P.join("")};function T(_){return(""+_).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&apos;").replace(/"/g,"&quot;").replace(E,"")}i.exports=function(_,q){if(q||(q={xmlHeader:{standalone:!0},prettyPrint:!0,indent:" ",escape:!0}),typeof _=="string")try{_=JSON.parse(_.toString())}catch(G){return!1}var P="",L="";q&&(t(q)=="object"?(q.xmlHeader&&(P=A(!!q.xmlHeader.standalone)),typeof q.docType<"u"&&(L="<!DOCTYPE "+q.docType+">")):P=A()),q=q||{};var Y=[P,q.prettyPrint&&L?"\n":"",L,S(_,q)];return Y.join("").replace(/\n{2,}/g,"\n").replace(/\s+$/g,"")}},"./lib/md5.js":function(module,exports,__webpack_require__){(function(process,global,module){var __WEBPACK_AMD_DEFINE_RESULT__,_typeof=__webpack_require__("./node_modules/@babel/runtime/helpers/typeof.js");(function(){var ERROR="input is invalid type",WINDOW=(typeof window>"u"?"undefined":_typeof(window))==="object",root=WINDOW?window:{};root.JS_MD5_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&(typeof self>"u"?"undefined":_typeof(self))==="object",NODE_JS=!root.JS_MD5_NO_NODE_JS&&(typeof process>"u"?"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=__webpack_require__("./node_modules/webpack/buildin/amd-options.js"),ARRAY_BUFFER=!root.JS_MD5_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",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(i){return Object.prototype.toString.call(i)==="[object Array]"}),ARRAY_BUFFER&&(root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(i){return _typeof(i)==="object"&&i.buffer&&i.buffer.constructor===ArrayBuffer});var createOutputMethod=function(r){return function(e,t){return new Md5(!0).update(e,t)[r]()}},createMethod=function(){var r=createOutputMethod("hex");NODE_JS&&(r=nodeWrap(r)),r.getCtx=r.create=function(){return new Md5},r.update=function(l){return r.create().update(l)};for(var e=0;e<OUTPUT_TYPES.length;++e){var t=OUTPUT_TYPES[e];r[t]=createOutputMethod(t)}return r},nodeWrap=function nodeWrap(method){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),nodeMethod=function i(r){if(typeof r=="string")return crypto.createHash("md5").update(r,"utf8").digest("hex");if(r==null)throw ERROR;return r.constructor===ArrayBuffer&&(r=new Uint8Array(r)),Array.isArray(r)||ArrayBuffer.isView(r)||r.constructor===Buffer?crypto.createHash("md5").update(new Buffer(r)).digest("hex"):method(r)};return nodeMethod};function Md5(i){if(i)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 r=new ArrayBuffer(68);this.buffer8=new Uint8Array(r),this.blocks=new Uint32Array(r)}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(i,r){if(!this.finalized){for(var e,t=0,l,o=i.length,s=this.blocks,E=this.buffer8;t<o;){if(this.hashed&&(this.hashed=!1,s[0]=s[16],s[16]=s[1]=s[2]=s[3]=s[4]=s[5]=s[6]=s[7]=s[8]=s[9]=s[10]=s[11]=s[12]=s[13]=s[14]=s[15]=0),ARRAY_BUFFER)for(l=this.start;t<o&&l<64;++t)e=i.charCodeAt(t),r||e<128?E[l++]=e:e<2048?(E[l++]=192|e>>6,E[l++]=128|e&63):e<55296||e>=57344?(E[l++]=224|e>>12,E[l++]=128|e>>6&63,E[l++]=128|e&63):(e=65536+((e&1023)<<10|i.charCodeAt(++t)&1023),E[l++]=240|e>>18,E[l++]=128|e>>12&63,E[l++]=128|e>>6&63,E[l++]=128|e&63);else for(l=this.start;t<o&&l<64;++t)e=i.charCodeAt(t),r||e<128?s[l>>2]|=e<<SHIFT[l++&3]:e<2048?(s[l>>2]|=(192|e>>6)<<SHIFT[l++&3],s[l>>2]|=(128|e&63)<<SHIFT[l++&3]):e<55296||e>=57344?(s[l>>2]|=(224|e>>12)<<SHIFT[l++&3],s[l>>2]|=(128|e>>6&63)<<SHIFT[l++&3],s[l>>2]|=(128|e&63)<<SHIFT[l++&3]):(e=65536+((e&1023)<<10|i.charCodeAt(++t)&1023),s[l>>2]|=(240|e>>18)<<SHIFT[l++&3],s[l>>2]|=(128|e>>12&63)<<SHIFT[l++&3],s[l>>2]|=(128|e>>6&63)<<SHIFT[l++&3],s[l>>2]|=(128|e&63)<<SHIFT[l++&3]);this.lastByteIndex=l,this.bytes+=l-this.start,l>=64?(this.start=l-64,this.hash(),this.hashed=!0):this.start=l}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 i=this.blocks,r=this.lastByteIndex;i[r>>2]|=EXTRA[r&3],r>=56&&(this.hashed||this.hash(),i[0]=i[16],i[16]=i[1]=i[2]=i[3]=i[4]=i[5]=i[6]=i[7]=i[8]=i[9]=i[10]=i[11]=i[12]=i[13]=i[14]=i[15]=0),i[14]=this.bytes<<3,i[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},Md5.prototype.hash=function(){var i,r,e,t,l,o,s=this.blocks;this.first?(i=s[0]-680876937,i=(i<<7|i>>>25)-271733879<<0,t=(-1732584194^i&2004318071)+s[1]-117830708,t=(t<<12|t>>>20)+i<<0,e=(-271733879^t&(i^-271733879))+s[2]-1126478375,e=(e<<17|e>>>15)+t<<0,r=(i^e&(t^i))+s[3]-1316259209,r=(r<<22|r>>>10)+e<<0):(i=this.h0,r=this.h1,e=this.h2,t=this.h3,i+=(t^r&(e^t))+s[0]-680876936,i=(i<<7|i>>>25)+r<<0,t+=(e^i&(r^e))+s[1]-389564586,t=(t<<12|t>>>20)+i<<0,e+=(r^t&(i^r))+s[2]+606105819,e=(e<<17|e>>>15)+t<<0,r+=(i^e&(t^i))+s[3]-1044525330,r=(r<<22|r>>>10)+e<<0),i+=(t^r&(e^t))+s[4]-176418897,i=(i<<7|i>>>25)+r<<0,t+=(e^i&(r^e))+s[5]+1200080426,t=(t<<12|t>>>20)+i<<0,e+=(r^t&(i^r))+s[6]-1473231341,e=(e<<17|e>>>15)+t<<0,r+=(i^e&(t^i))+s[7]-45705983,r=(r<<22|r>>>10)+e<<0,i+=(t^r&(e^t))+s[8]+1770035416,i=(i<<7|i>>>25)+r<<0,t+=(e^i&(r^e))+s[9]-1958414417,t=(t<<12|t>>>20)+i<<0,e+=(r^t&(i^r))+s[10]-42063,e=(e<<17|e>>>15)+t<<0,r+=(i^e&(t^i))+s[11]-1990404162,r=(r<<22|r>>>10)+e<<0,i+=(t^r&(e^t))+s[12]+1804603682,i=(i<<7|i>>>25)+r<<0,t+=(e^i&(r^e))+s[13]-40341101,t=(t<<12|t>>>20)+i<<0,e+=(r^t&(i^r))+s[14]-1502002290,e=(e<<17|e>>>15)+t<<0,r+=(i^e&(t^i))+s[15]+1236535329,r=(r<<22|r>>>10)+e<<0,i+=(e^t&(r^e))+s[1]-165796510,i=(i<<5|i>>>27)+r<<0,t+=(r^e&(i^r))+s[6]-1069501632,t=(t<<9|t>>>23)+i<<0,e+=(i^r&(t^i))+s[11]+643717713,e=(e<<14|e>>>18)+t<<0,r+=(t^i&(e^t))+s[0]-373897302,r=(r<<20|r>>>12)+e<<0,i+=(e^t&(r^e))+s[5]-701558691,i=(i<<5|i>>>27)+r<<0,t+=(r^e&(i^r))+s[10]+38016083,t=(t<<9|t>>>23)+i<<0,e+=(i^r&(t^i))+s[15]-660478335,e=(e<<14|e>>>18)+t<<0,r+=(t^i&(e^t))+s[4]-405537848,r=(r<<20|r>>>12)+e<<0,i+=(e^t&(r^e))+s[9]+568446438,i=(i<<5|i>>>27)+r<<0,t+=(r^e&(i^r))+s[14]-1019803690,t=(t<<9|t>>>23)+i<<0,e+=(i^r&(t^i))+s[3]-187363961,e=(e<<14|e>>>18)+t<<0,r+=(t^i&(e^t))+s[8]+1163531501,r=(r<<20|r>>>12)+e<<0,i+=(e^t&(r^e))+s[13]-1444681467,i=(i<<5|i>>>27)+r<<0,t+=(r^e&(i^r))+s[2]-51403784,t=(t<<9|t>>>23)+i<<0,e+=(i^r&(t^i))+s[7]+1735328473,e=(e<<14|e>>>18)+t<<0,r+=(t^i&(e^t))+s[12]-1926607734,r=(r<<20|r>>>12)+e<<0,l=r^e,i+=(l^t)+s[5]-378558,i=(i<<4|i>>>28)+r<<0,t+=(l^i)+s[8]-2022574463,t=(t<<11|t>>>21)+i<<0,o=t^i,e+=(o^r)+s[11]+1839030562,e=(e<<16|e>>>16)+t<<0,r+=(o^e)+s[14]-35309556,r=(r<<23|r>>>9)+e<<0,l=r^e,i+=(l^t)+s[1]-1530992060,i=(i<<4|i>>>28)+r<<0,t+=(l^i)+s[4]+1272893353,t=(t<<11|t>>>21)+i<<0,o=t^i,e+=(o^r)+s[7]-155497632,e=(e<<16|e>>>16)+t<<0,r+=(o^e)+s[10]-1094730640,r=(r<<23|r>>>9)+e<<0,l=r^e,i+=(l^t)+s[13]+681279174,i=(i<<4|i>>>28)+r<<0,t+=(l^i)+s[0]-358537222,t=(t<<11|t>>>21)+i<<0,o=t^i,e+=(o^r)+s[3]-722521979,e=(e<<16|e>>>16)+t<<0,r+=(o^e)+s[6]+76029189,r=(r<<23|r>>>9)+e<<0,l=r^e,i+=(l^t)+s[9]-640364487,i=(i<<4|i>>>28)+r<<0,t+=(l^i)+s[12]-421815835,t=(t<<11|t>>>21)+i<<0,o=t^i,e+=(o^r)+s[15]+530742520,e=(e<<16|e>>>16)+t<<0,r+=(o^e)+s[2]-995338651,r=(r<<23|r>>>9)+e<<0,i+=(e^(r|~t))+s[0]-198630844,i=(i<<6|i>>>26)+r<<0,t+=(r^(i|~e))+s[7]+1126891415,t=(t<<10|t>>>22)+i<<0,e+=(i^(t|~r))+s[14]-1416354905,e=(e<<15|e>>>17)+t<<0,r+=(t^(e|~i))+s[5]-57434055,r=(r<<21|r>>>11)+e<<0,i+=(e^(r|~t))+s[12]+1700485571,i=(i<<6|i>>>26)+r<<0,t+=(r^(i|~e))+s[3]-1894986606,t=(t<<10|t>>>22)+i<<0,e+=(i^(t|~r))+s[10]-1051523,e=(e<<15|e>>>17)+t<<0,r+=(t^(e|~i))+s[1]-2054922799,r=(r<<21|r>>>11)+e<<0,i+=(e^(r|~t))+s[8]+1873313359,i=(i<<6|i>>>26)+r<<0,t+=(r^(i|~e))+s[15]-30611744,t=(t<<10|t>>>22)+i<<0,e+=(i^(t|~r))+s[6]-1560198380,e=(e<<15|e>>>17)+t<<0,r+=(t^(e|~i))+s[13]+1309151649,r=(r<<21|r>>>11)+e<<0,i+=(e^(r|~t))+s[4]-145523070,i=(i<<6|i>>>26)+r<<0,t+=(r^(i|~e))+s[11]-1120210379,t=(t<<10|t>>>22)+i<<0,e+=(i^(t|~r))+s[2]+718787259,e=(e<<15|e>>>17)+t<<0,r+=(t^(e|~i))+s[9]-343485551,r=(r<<21|r>>>11)+e<<0,this.first?(this.h0=i+1732584193<<0,this.h1=r-271733879<<0,this.h2=e-1732584194<<0,this.h3=t+271733878<<0,this.first=!1):(this.h0=this.h0+i<<0,this.h1=this.h1+r<<0,this.h2=this.h2+e<<0,this.h3=this.h3+t<<0)},Md5.prototype.hex=function(){this.finalize();var i=this.h0,r=this.h1,e=this.h2,t=this.h3;return HEX_CHARS[i>>4&15]+HEX_CHARS[i&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[r&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[e&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[t&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]},Md5.prototype.toString=Md5.prototype.hex,Md5.prototype.digest=function(i){if(i==="hex")return this.hex();this.finalize();var r=this.h0,e=this.h1,t=this.h2,l=this.h3,o=[r&255,r>>8&255,r>>16&255,r>>24&255,e&255,e>>8&255,e>>16&255,e>>24&255,t&255,t>>8&255,t>>16&255,t>>24&255,l&255,l>>8&255,l>>16&255,l>>24&255];return o},Md5.prototype.array=Md5.prototype.digest,Md5.prototype.arrayBuffer=function(){this.finalize();var i=new ArrayBuffer(16),r=new Uint32Array(i);return r[0]=this.h0,r[1]=this.h1,r[2]=this.h2,r[3]=this.h3,i},Md5.prototype.buffer=Md5.prototype.arrayBuffer,Md5.prototype.base64=function(){for(var i,r,e,t="",l=this.array(),o=0;o<15;)i=l[o++],r=l[o++],e=l[o++],t+=BASE64_ENCODE_CHAR[i>>>2]+BASE64_ENCODE_CHAR[(i<<4|r>>>4)&63]+BASE64_ENCODE_CHAR[(r<<2|e>>>6)&63]+BASE64_ENCODE_CHAR[e&63];return i=l[o],t+=BASE64_ENCODE_CHAR[i>>>2]+BASE64_ENCODE_CHAR[i<<4&63]+"==",t};var exports=createMethod();COMMON_JS?module.exports=exports:(root.md5=exports,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=(function(){return exports}).call(exports,__webpack_require__,exports,module),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()}).call(this,__webpack_require__("./node_modules/process/browser.js"),__webpack_require__("./node_modules/webpack/buildin/global.js"),__webpack_require__("./node_modules/webpack/buildin/module.js")(module))},"./lib/request.js":function(i,r,e){var t=e("./node_modules/@babel/runtime/helpers/typeof.js"),l=function(A){switch(t(A)){case"string":return A;case"boolean":return A?"true":"false";case"number":return isFinite(A)?A:"";default:return""}},o=function(A,T,_,q){return T=T||"&",_=_||"=",A===null&&(A=void 0),t(A)==="object"?Object.keys(A).map(function(P){var L=encodeURIComponent(l(P))+_;return Array.isArray(A[P])?A[P].map(function(Y){return L+encodeURIComponent(l(Y))}).join(T):L+encodeURIComponent(l(A[P]))}).filter(Boolean).join(T):q?encodeURIComponent(l(q))+_+encodeURIComponent(l(A)):""},s=function(A,T,_){var q={};return T.getAllResponseHeaders().trim().split("\n").forEach(function(P){if(P){var L=P.indexOf(":"),Y=P.substr(0,L).trim().toLowerCase(),G=P.substr(L+1).trim();q[Y]=G}}),{error:A,statusCode:T.status,statusMessage:T.statusText,headers:q,body:_}},E=function(A,T){return!T&&T==="text"?A.responseText:A.response},w=function(A,T){var _=(A.method||"GET").toUpperCase(),q=A.url;if(A.qs){var P=o(A.qs);P&&(q+=(q.indexOf("?")===-1?"?":"&")+P)}var L=new XMLHttpRequest;if(L.open(_,q,!0),L.responseType=A.dataType||"text",A.xhrFields)for(var Y in A.xhrFields)L[Y]=A.xhrFields[Y];var G=A.headers;if(G)for(var ne in G)G.hasOwnProperty(ne)&&ne.toLowerCase()!=="content-length"&&ne.toLowerCase()!=="user-agent"&&ne.toLowerCase()!=="origin"&&ne.toLowerCase()!=="host"&&L.setRequestHeader(ne,G[ne]);return A.onProgress&&L.upload&&(L.upload.onprogress=A.onProgress),A.onDownloadProgress&&(L.onprogress=A.onDownloadProgress),A.timeout&&(L.timeout=A.timeout),L.ontimeout=function(I){var D=new Error("timeout");T(s(D,L))},L.onload=function(){T(s(null,L,E(L,A.dataType)))},L.onerror=function(I){var D=E(L,A.dataType);if(D)T(s(null,L,D));else{var C=L.statusText;!C&&L.status===0&&(C=new Error("CORS blocked or network error")),T(s(C,L,D))}},L.send(A.body||""),L};i.exports=w},"./lib/xml2json.js":function(i,r,e){var t=e("./node_modules/@xmldom/xmldom/lib/index.js").DOMParser,l=(function(){this.version="1.3.5";var s={mergeCDATA:!0,normalize:!0,stripElemPrefix:!0},E=new RegExp(/(?!xmlns)^.*:/);return this.grokType=function(w){return/^\s*$/.test(w)?null:/^(?:true|false)$/i.test(w)?w.toLowerCase()==="true":isFinite(w)?parseFloat(w):w},this.parseString=function(w,S){if(w){var A=this.stringToXML(w);return A.getElementsByTagName("parsererror").length?null:this.parseXML(A,S)}else return null},this.parseXML=function(w,S){for(var A in S)s[A]=S[A];var T={},_=0,q="",P=w.childNodes.length;if(P)for(var L,Y,G,ne=0;ne<w.childNodes.length;ne++)L=w.childNodes.item(ne),L.nodeType===4?s.mergeCDATA&&(q+=L.nodeValue):L.nodeType===3?q+=L.nodeValue:L.nodeType===1&&(_===0&&(T={}),s.stripElemPrefix?Y=L.nodeName.replace(E,""):Y=L.nodeName,G=l.parseXML(L),T.hasOwnProperty(Y)?(T[Y].constructor!==Array&&(T[Y]=[T[Y]]),T[Y].push(G)):(T[Y]=G,_++));return Object.keys(T).length||(T=q||""),T},this.xmlToString=function(w){try{var S=w.xml?w.xml:new XMLSerializer().serializeToString(w);return S}catch(A){return null}},this.stringToXML=function(w){try{var S=null;if(window.DOMParser){var A=new t;return S=A.parseFromString(w,"text/xml"),S}else return S=new ActiveXObject("Microsoft.XMLDOM"),S.async=!1,S.loadXML(w),S}catch(T){return null}},this}).call({}),o=function(E){return l.parseString(E)};i.exports=o},"./node_modules/@babel/runtime/helpers/classCallCheck.js":function(i,r){function e(t,l){if(!(t instanceof l))throw new TypeError("Cannot call a class as a function")}i.exports=e,i.exports.__esModule=!0,i.exports.default=i.exports},"./node_modules/@babel/runtime/helpers/createClass.js":function(i,r,e){var t=e("./node_modules/@babel/runtime/helpers/toPropertyKey.js");function l(s,E){for(var w=0;w<E.length;w++){var S=E[w];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(s,t(S.key),S)}}function o(s,E,w){return E&&l(s.prototype,E),w&&l(s,w),Object.defineProperty(s,"prototype",{writable:!1}),s}i.exports=o,i.exports.__esModule=!0,i.exports.default=i.exports},"./node_modules/@babel/runtime/helpers/toPrimitive.js":function(i,r,e){var t=e("./node_modules/@babel/runtime/helpers/typeof.js").default;function l(o,s){if(t(o)!=="object"||o===null)return o;var E=o[Symbol.toPrimitive];if(E!==void 0){var w=E.call(o,s||"default");if(t(w)!=="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(o)}i.exports=l,i.exports.__esModule=!0,i.exports.default=i.exports},"./node_modules/@babel/runtime/helpers/toPropertyKey.js":function(i,r,e){var t=e("./node_modules/@babel/runtime/helpers/typeof.js").default,l=e("./node_modules/@babel/runtime/helpers/toPrimitive.js");function o(s){var E=l(s,"string");return t(E)==="symbol"?E:String(E)}i.exports=o,i.exports.__esModule=!0,i.exports.default=i.exports},"./node_modules/@babel/runtime/helpers/typeof.js":function(i,r){function e(t){"@babel/helpers - typeof";return i.exports=e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},i.exports.__esModule=!0,i.exports.default=i.exports,e(t)}i.exports=e,i.exports.__esModule=!0,i.exports.default=i.exports},"./node_modules/@xmldom/xmldom/lib/conventions.js":function(i,r,e){function t(w,S,A){if(A===void 0&&(A=Array.prototype),w&&typeof A.find=="function")return A.find.call(w,S);for(var T=0;T<w.length;T++)if(Object.prototype.hasOwnProperty.call(w,T)){var _=w[T];if(S.call(void 0,_,T,w))return _}}function l(w,S){return S===void 0&&(S=Object),S&&typeof S.freeze=="function"?S.freeze(w):w}function o(w,S){if(w===null||typeof w!="object")throw new TypeError("target is not an object");for(var A in S)Object.prototype.hasOwnProperty.call(S,A)&&(w[A]=S[A]);return w}var s=l({HTML:"text/html",isHTML:function(w){return w===s.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),E=l({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(w){return w===E.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});r.assign=o,r.find=t,r.freeze=l,r.MIME_TYPE=s,r.NAMESPACE=E},"./node_modules/@xmldom/xmldom/lib/dom-parser.js":function(i,r,e){var t=e("./node_modules/@xmldom/xmldom/lib/conventions.js"),l=e("./node_modules/@xmldom/xmldom/lib/dom.js"),o=e("./node_modules/@xmldom/xmldom/lib/entities.js"),s=e("./node_modules/@xmldom/xmldom/lib/sax.js"),E=l.DOMImplementation,w=t.NAMESPACE,S=s.ParseError,A=s.XMLReader;function T(I){return I.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function _(I){this.options=I||{locator:{}}}_.prototype.parseFromString=function(I,D){var C=this.options,k=new A,g=C.domBuilder||new P,F=C.errorHandler,H=C.locator,U=C.xmlns||{},z=/\/x?html?$/.test(D),R=z?o.HTML_ENTITIES:o.XML_ENTITIES;H&&g.setDocumentLocator(H),k.errorHandler=q(F,g,H),k.domBuilder=C.domBuilder||g,z&&(U[""]=w.HTML),U.xml=U.xml||w.XML;var V=C.normalizeLineEndings||T;return I&&typeof I=="string"?k.parse(V(I),U,R):k.errorHandler.error("invalid doc source"),g.doc};function q(I,D,C){if(!I){if(D instanceof P)return D;I=D}var k={},g=I instanceof Function;C=C||{};function F(H){var U=I[H];!U&&g&&(U=I.length==2?function(z){I(H,z)}:I),k[H]=U&&function(z){U("[xmldom "+H+"] "+z+Y(C))}||function(){}}return F("warning"),F("error"),F("fatalError"),k}function P(){this.cdata=!1}function L(I,D){D.lineNumber=I.lineNumber,D.columnNumber=I.columnNumber}P.prototype={startDocument:function(){this.doc=new E().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(I,D,C,k){var g=this.doc,F=g.createElementNS(I,C||D),H=k.length;ne(this,F),this.currentElement=F,this.locator&&L(this.locator,F);for(var U=0;U<H;U++){var I=k.getURI(U),z=k.getValue(U),C=k.getQName(U),R=g.createAttributeNS(I,C);this.locator&&L(k.getLocator(U),R),R.value=R.nodeValue=z,F.setAttributeNode(R)}},endElement:function(I,D,C){var k=this.currentElement;k.tagName,this.currentElement=k.parentNode},startPrefixMapping:function(I,D){},endPrefixMapping:function(I){},processingInstruction:function(I,D){var C=this.doc.createProcessingInstruction(I,D);this.locator&&L(this.locator,C),ne(this,C)},ignorableWhitespace:function(I,D,C){},characters:function(I,D,C){if(I=G.apply(this,arguments),I){if(this.cdata)var k=this.doc.createCDATASection(I);else var k=this.doc.createTextNode(I);this.currentElement?this.currentElement.appendChild(k):/^\s*$/.test(I)&&this.doc.appendChild(k),this.locator&&L(this.locator,k)}},skippedEntity:function(I){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(I){(this.locator=I)&&(I.lineNumber=0)},comment:function(I,D,C){I=G.apply(this,arguments);var k=this.doc.createComment(I);this.locator&&L(this.locator,k),ne(this,k)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(I,D,C){var k=this.doc.implementation;if(k&&k.createDocumentType){var g=k.createDocumentType(I,D,C);this.locator&&L(this.locator,g),ne(this,g),this.doc.doctype=g}},warning:function(I){console.warn("[xmldom warning] "+I,Y(this.locator))},error:function(I){console.error("[xmldom error] "+I,Y(this.locator))},fatalError:function(I){throw new S(I,this.locator)}};function Y(I){if(I)return"\n@"+(I.systemId||"")+"#[line:"+I.lineNumber+",col:"+I.columnNumber+"]"}function G(I,D,C){return typeof I=="string"?I.substr(D,C):I.length>=D+C||D?new java.lang.String(I,D,C)+"":I}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(I){P.prototype[I]=function(){return null}});function ne(I,D){I.currentElement?I.currentElement.appendChild(D):I.doc.appendChild(D)}r.__DOMHandler=P,r.normalizeLineEndings=T,r.DOMParser=_},"./node_modules/@xmldom/xmldom/lib/dom.js":function(i,r,e){var t=e("./node_modules/@xmldom/xmldom/lib/conventions.js"),l=t.find,o=t.NAMESPACE;function s(f){return f!==""}function E(f){return f?f.split(/[\t\n\f\r ]+/).filter(s):[]}function w(f,v){return f.hasOwnProperty(v)||(f[v]=!0),f}function S(f){if(!f)return[];var v=E(f);return Object.keys(v.reduce(w,{}))}function A(f){return function(v){return f&&f.indexOf(v)!==-1}}function T(f,v){for(var O in f)Object.prototype.hasOwnProperty.call(f,O)&&(v[O]=f[O])}function _(f,v){var O=f.prototype;if(!(O instanceof v)){let K=function(){};K.prototype=v.prototype,K=new K,T(O,K),f.prototype=O=K}O.constructor!=f&&(typeof f!="function"&&console.error("unknown Class:"+f),O.constructor=f)}var q={},P=q.ELEMENT_NODE=1,L=q.ATTRIBUTE_NODE=2,Y=q.TEXT_NODE=3,G=q.CDATA_SECTION_NODE=4,ne=q.ENTITY_REFERENCE_NODE=5,I=q.ENTITY_NODE=6,D=q.PROCESSING_INSTRUCTION_NODE=7,C=q.COMMENT_NODE=8,k=q.DOCUMENT_NODE=9,g=q.DOCUMENT_TYPE_NODE=10,F=q.DOCUMENT_FRAGMENT_NODE=11,H=q.NOTATION_NODE=12,U={},z={};U.INDEX_SIZE_ERR=(z[1]="Index size error",1),U.DOMSTRING_SIZE_ERR=(z[2]="DOMString size error",2);var R=U.HIERARCHY_REQUEST_ERR=(z[3]="Hierarchy request error",3);U.WRONG_DOCUMENT_ERR=(z[4]="Wrong document",4),U.INVALID_CHARACTER_ERR=(z[5]="Invalid character",5),U.NO_DATA_ALLOWED_ERR=(z[6]="No data allowed",6),U.NO_MODIFICATION_ALLOWED_ERR=(z[7]="No modification allowed",7);var V=U.NOT_FOUND_ERR=(z[8]="Not found",8);U.NOT_SUPPORTED_ERR=(z[9]="Not supported",9);var X=U.INUSE_ATTRIBUTE_ERR=(z[10]="Attribute in use",10);U.INVALID_STATE_ERR=(z[11]="Invalid state",11),U.SYNTAX_ERR=(z[12]="Syntax error",12),U.INVALID_MODIFICATION_ERR=(z[13]="Invalid modification",13),U.NAMESPACE_ERR=(z[14]="Invalid namespace",14),U.INVALID_ACCESS_ERR=(z[15]="Invalid access",15);function W(f,v){if(v instanceof Error)var O=v;else O=this,Error.call(this,z[f]),this.message=z[f],Error.captureStackTrace&&Error.captureStackTrace(this,W);return O.code=f,v&&(this.message=this.message+": "+v),O}W.prototype=Error.prototype,T(U,W);function J(){}J.prototype={length:0,item:function(f){return f>=0&&f<this.length?this[f]:null},toString:function(f,v){for(var O=[],K=0;K<this.length;K++)Xe(this[K],O,f,v);return O.join("")},filter:function(f){return Array.prototype.filter.call(this,f)},indexOf:function(f){return Array.prototype.indexOf.call(this,f)}};function ie(f,v){this._node=f,this._refresh=v,se(this)}function se(f){var v=f._node._inc||f._node.ownerDocument._inc;if(f._inc!==v){var O=f._refresh(f._node);if(nt(f,"length",O.length),!f.$$length||O.length<f.$$length)for(var K=O.length;K in f;K++)Object.prototype.hasOwnProperty.call(f,K)&&delete f[K];T(O,f),f._inc=v}}ie.prototype.item=function(f){return se(this),this[f]||null},_(ie,J);function oe(){}function ee(f,v){for(var O=f.length;O--;)if(f[O]===v)return O}function ce(f,v,O,K){if(K?v[ee(v,K)]=O:v[v.length++]=O,f){O.ownerElement=f;var fe=f.ownerDocument;fe&&(K&&me(fe,f,K),ve(fe,f,O))}}function ae(f,v,O){var K=ee(v,O);if(K>=0){for(var fe=v.length-1;K<fe;)v[K]=v[++K];if(v.length=fe,f){var xe=f.ownerDocument;xe&&(me(xe,f,O),O.ownerElement=null)}}else throw new W(V,new Error(f.tagName+"@"+O))}oe.prototype={length:0,item:J.prototype.item,getNamedItem:function(f){for(var v=this.length;v--;){var O=this[v];if(O.nodeName==f)return O}},setNamedItem:function(f){var v=f.ownerElement;if(v&&v!=this._ownerElement)throw new W(X);var O=this.getNamedItem(f.nodeName);return ce(this._ownerElement,this,f,O),O},setNamedItemNS:function(f){var v=f.ownerElement,O;if(v&&v!=this._ownerElement)throw new W(X);return O=this.getNamedItemNS(f.namespaceURI,f.localName),ce(this._ownerElement,this,f,O),O},removeNamedItem:function(f){var v=this.getNamedItem(f);return ae(this._ownerElement,this,v),v},removeNamedItemNS:function(f,v){var O=this.getNamedItemNS(f,v);return ae(this._ownerElement,this,O),O},getNamedItemNS:function(f,v){for(var O=this.length;O--;){var K=this[O];if(K.localName==v&&K.namespaceURI==f)return K}return null}};function pe(){}pe.prototype={hasFeature:function(f,v){return!0},createDocument:function(f,v,O){var K=new ye;if(K.implementation=this,K.childNodes=new J,K.doctype=O||null,O&&K.appendChild(O),v){var fe=K.createElementNS(f,v);K.appendChild(fe)}return K},createDocumentType:function(f,v,O){var K=new Se;return K.name=f,K.nodeName=f,K.publicId=v||"",K.systemId=O||"",K}};function Z(){}Z.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(f,v){return d(this,f,v)},replaceChild:function(f,v){d(this,f,v,a),v&&this.removeChild(v)},removeChild:function(f){return Ee(this,f)},appendChild:function(f){return this.insertBefore(f,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(f){return et(this.ownerDocument||this,this,f)},normalize:function(){for(var f=this.firstChild;f;){var v=f.nextSibling;v&&v.nodeType==Y&&f.nodeType==Y?(this.removeChild(v),f.appendData(v.data)):(f.normalize(),f=v)}},isSupported:function(f,v){return this.ownerDocument.implementation.hasFeature(f,v)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(f){for(var v=this;v;){var O=v._nsMap;if(O){for(var K in O)if(Object.prototype.hasOwnProperty.call(O,K)&&O[K]===f)return K}v=v.nodeType==L?v.ownerDocument:v.parentNode}return null},lookupNamespaceURI:function(f){for(var v=this;v;){var O=v._nsMap;if(O&&Object.prototype.hasOwnProperty.call(O,f))return O[f];v=v.nodeType==L?v.ownerDocument:v.parentNode}return null},isDefaultNamespace:function(f){var v=this.lookupPrefix(f);return v==null}};function re(f){return f=="<"&&"&lt;"||f==">"&&"&gt;"||f=="&"&&"&amp;"||f=='"'&&"&quot;"||"&#"+f.charCodeAt()+";"}T(q,Z),T(q,Z.prototype);function ge(f,v){if(v(f))return!0;if(f=f.firstChild)do if(ge(f,v))return!0;while(f=f.nextSibling)}function ye(){this.ownerDocument=this}function ve(f,v,O){f&&f._inc++;var K=O.namespaceURI;K===o.XMLNS&&(v._nsMap[O.prefix?O.localName:""]=O.value)}function me(f,v,O,K){f&&f._inc++;var fe=O.namespaceURI;fe===o.XMLNS&&delete v._nsMap[O.prefix?O.localName:""]}function Ce(f,v,O){if(f&&f._inc){f._inc++;var K=v.childNodes;if(O)K[K.length++]=O;else{for(var fe=v.firstChild,xe=0;fe;)K[xe++]=fe,fe=fe.nextSibling;K.length=xe,delete K[K.length]}}}function Ee(f,v){var O=v.previousSibling,K=v.nextSibling;return O?O.nextSibling=K:f.firstChild=K,K?K.previousSibling=O:f.lastChild=O,v.parentNode=null,v.previousSibling=null,v.nextSibling=null,Ce(f.ownerDocument,f),v}function be(f){return f&&(f.nodeType===Z.DOCUMENT_NODE||f.nodeType===Z.DOCUMENT_FRAGMENT_NODE||f.nodeType===Z.ELEMENT_NODE)}function Be(f){return f&&(_e(f)||Ue(f)||we(f)||f.nodeType===Z.DOCUMENT_FRAGMENT_NODE||f.nodeType===Z.COMMENT_NODE||f.nodeType===Z.PROCESSING_INSTRUCTION_NODE)}function we(f){return f&&f.nodeType===Z.DOCUMENT_TYPE_NODE}function _e(f){return f&&f.nodeType===Z.ELEMENT_NODE}function Ue(f){return f&&f.nodeType===Z.TEXT_NODE}function Pe(f,v){var O=f.childNodes||[];if(l(O,_e)||we(v))return!1;var K=l(O,we);return!(v&&K&&O.indexOf(K)>O.indexOf(v))}function ue(f,v){var O=f.childNodes||[];function K(xe){return _e(xe)&&xe!==v}if(l(O,K))return!1;var fe=l(O,we);return!(v&&fe&&O.indexOf(fe)>O.indexOf(v))}function h(f,v,O){if(!be(f))throw new W(R,"Unexpected parent node type "+f.nodeType);if(O&&O.parentNode!==f)throw new W(V,"child not in parent");if(!Be(v)||we(v)&&f.nodeType!==Z.DOCUMENT_NODE)throw new W(R,"Unexpected node type "+v.nodeType+" for parent node type "+f.nodeType)}function c(f,v,O){var K=f.childNodes||[],fe=v.childNodes||[];if(v.nodeType===Z.DOCUMENT_FRAGMENT_NODE){var xe=fe.filter(_e);if(xe.length>1||l(fe,Ue))throw new W(R,"More than one element or text in fragment");if(xe.length===1&&!Pe(f,O))throw new W(R,"Element in fragment can not be inserted before doctype")}if(_e(v)&&!Pe(f,O))throw new W(R,"Only one element can be added and only after doctype");if(we(v)){if(l(K,we))throw new W(R,"Only one doctype is allowed");var Me=l(K,_e);if(O&&K.indexOf(Me)<K.indexOf(O))throw new W(R,"Doctype can only be inserted before an element");if(!O&&Me)throw new W(R,"Doctype can not be appended since element is present")}}function a(f,v,O){var K=f.childNodes||[],fe=v.childNodes||[];if(v.nodeType===Z.DOCUMENT_FRAGMENT_NODE){var xe=fe.filter(_e);if(xe.length>1||l(fe,Ue))throw new W(R,"More than one element or text in fragment");if(xe.length===1&&!ue(f,O))throw new W(R,"Element in fragment can not be inserted before doctype")}if(_e(v)&&!ue(f,O))throw new W(R,"Only one element can be added and only after doctype");if(we(v)){if(l(K,function(Ye){return we(Ye)&&Ye!==O}))throw new W(R,"Only one doctype is allowed");var Me=l(K,_e);if(O&&K.indexOf(Me)<K.indexOf(O))throw new W(R,"Doctype can only be inserted before an element")}}function d(f,v,O,K){h(f,v,O),f.nodeType===Z.DOCUMENT_NODE&&(K||c)(f,v,O);var fe=v.parentNode;if(fe&&fe.removeChild(v),v.nodeType===F){var xe=v.firstChild;if(xe==null)return v;var Me=v.lastChild}else xe=Me=v;var le=O?O.previousSibling:f.lastChild;xe.previousSibling=le,Me.nextSibling=O,le?le.nextSibling=xe:f.firstChild=xe,O==null?f.lastChild=Me:O.previousSibling=Me;do xe.parentNode=f;while(xe!==Me&&(xe=xe.nextSibling));return Ce(f.ownerDocument||f,f),v.nodeType==F&&(v.firstChild=v.lastChild=null),v}function y(f,v){return v.parentNode&&v.parentNode.removeChild(v),v.parentNode=f,v.previousSibling=f.lastChild,v.nextSibling=null,v.previousSibling?v.previousSibling.nextSibling=v:f.firstChild=v,f.lastChild=v,Ce(f.ownerDocument,f,v),v}ye.prototype={nodeName:"#document",nodeType:k,doctype:null,documentElement:null,_inc:1,insertBefore:function(f,v){if(f.nodeType==F){for(var O=f.firstChild;O;){var K=O.nextSibling;this.insertBefore(O,v),O=K}return f}return d(this,f,v),f.ownerDocument=this,this.documentElement===null&&f.nodeType===P&&(this.documentElement=f),f},removeChild:function(f){return this.documentElement==f&&(this.documentElement=null),Ee(this,f)},replaceChild:function(f,v){d(this,f,v,a),f.ownerDocument=this,v&&this.removeChild(v),_e(f)&&(this.documentElement=f)},importNode:function(f,v){return rt(this,f,v)},getElementById:function(f){var v=null;return ge(this.documentElement,function(O){if(O.nodeType==P&&O.getAttribute("id")==f)return v=O,!0}),v},getElementsByClassName:function(f){var v=S(f);return new ie(this,function(O){var K=[];return v.length>0&&ge(O.documentElement,function(fe){if(fe!==O&&fe.nodeType===P){var xe=fe.getAttribute("class");if(xe){var Me=f===xe;if(!Me){var le=S(xe);Me=v.every(A(le))}Me&&K.push(fe)}}}),K})},createElement:function(f){var v=new N;v.ownerDocument=this,v.nodeName=f,v.tagName=f,v.localName=f,v.childNodes=new J;var O=v.attributes=new oe;return O._ownerElement=v,v},createDocumentFragment:function(){var f=new Le;return f.ownerDocument=this,f.childNodes=new J,f},createTextNode:function(f){var v=new de;return v.ownerDocument=this,v.appendData(f),v},createComment:function(f){var v=new he;return v.ownerDocument=this,v.appendData(f),v},createCDATASection:function(f){var v=new $;return v.ownerDocument=this,v.appendData(f),v},createProcessingInstruction:function(f,v){var O=new Ve;return O.ownerDocument=this,O.tagName=O.nodeName=O.target=f,O.nodeValue=O.data=v,O},createAttribute:function(f){var v=new M;return v.ownerDocument=this,v.name=f,v.nodeName=f,v.localName=f,v.specified=!0,v},createEntityReference:function(f){var v=new Re;return v.ownerDocument=this,v.nodeName=f,v},createElementNS:function(f,v){var O=new N,K=v.split(":"),fe=O.attributes=new oe;return O.childNodes=new J,O.ownerDocument=this,O.nodeName=v,O.tagName=v,O.namespaceURI=f,K.length==2?(O.prefix=K[0],O.localName=K[1]):O.localName=v,fe._ownerElement=O,O},createAttributeNS:function(f,v){var O=new M,K=v.split(":");return O.ownerDocument=this,O.nodeName=v,O.name=v,O.namespaceURI=f,O.specified=!0,K.length==2?(O.prefix=K[0],O.localName=K[1]):O.localName=v,O}},_(ye,Z);function N(){this._nsMap={}}N.prototype={nodeType:P,hasAttribute:function(f){return this.getAttributeNode(f)!=null},getAttribute:function(f){var v=this.getAttributeNode(f);return v&&v.value||""},getAttributeNode:function(f){return this.attributes.getNamedItem(f)},setAttribute:function(f,v){var O=this.ownerDocument.createAttribute(f);O.value=O.nodeValue=""+v,this.setAttributeNode(O)},removeAttribute:function(f){var v=this.getAttributeNode(f);v&&this.removeAttributeNode(v)},appendChild:function(f){return f.nodeType===F?this.insertBefore(f,null):y(this,f)},setAttributeNode:function(f){return this.attributes.setNamedItem(f)},setAttributeNodeNS:function(f){return this.attributes.setNamedItemNS(f)},removeAttributeNode:function(f){return this.attributes.removeNamedItem(f.nodeName)},removeAttributeNS:function(f,v){var O=this.getAttributeNodeNS(f,v);O&&this.removeAttributeNode(O)},hasAttributeNS:function(f,v){return this.getAttributeNodeNS(f,v)!=null},getAttributeNS:function(f,v){var O=this.getAttributeNodeNS(f,v);return O&&O.value||""},setAttributeNS:function(f,v,O){var K=this.ownerDocument.createAttributeNS(f,v);K.value=K.nodeValue=""+O,this.setAttributeNode(K)},getAttributeNodeNS:function(f,v){return this.attributes.getNamedItemNS(f,v)},getElementsByTagName:function(f){return new ie(this,function(v){var O=[];return ge(v,function(K){K!==v&&K.nodeType==P&&(f==="*"||K.tagName==f)&&O.push(K)}),O})},getElementsByTagNameNS:function(f,v){return new ie(this,function(O){var K=[];return ge(O,function(fe){fe!==O&&fe.nodeType===P&&(f==="*"||fe.namespaceURI===f)&&(v==="*"||fe.localName==v)&&K.push(fe)}),K})}},ye.prototype.getElementsByTagName=N.prototype.getElementsByTagName,ye.prototype.getElementsByTagNameNS=N.prototype.getElementsByTagNameNS,_(N,Z);function M(){}M.prototype.nodeType=L,_(M,Z);function Q(){}Q.prototype={data:"",substringData:function(f,v){return this.data.substring(f,f+v)},appendData:function(f){f=this.data+f,this.nodeValue=this.data=f,this.length=f.length},insertData:function(f,v){this.replaceData(f,0,v)},appendChild:function(f){throw new Error(z[R])},deleteData:function(f,v){this.replaceData(f,v,"")},replaceData:function(f,v,O){var K=this.data.substring(0,f),fe=this.data.substring(f+v);O=K+O+fe,this.nodeValue=this.data=O,this.length=O.length}},_(Q,Z);function de(){}de.prototype={nodeName:"#text",nodeType:Y,splitText:function(f){var v=this.data,O=v.substring(f);v=v.substring(0,f),this.data=this.nodeValue=v,this.length=v.length;var K=this.ownerDocument.createTextNode(O);return this.parentNode&&this.parentNode.insertBefore(K,this.nextSibling),K}},_(de,Q);function he(){}he.prototype={nodeName:"#comment",nodeType:C},_(he,Q);function $(){}$.prototype={nodeName:"#cdata-section",nodeType:G},_($,Q);function Se(){}Se.prototype.nodeType=g,_(Se,Z);function Ie(){}Ie.prototype.nodeType=H,_(Ie,Z);function Fe(){}Fe.prototype.nodeType=I,_(Fe,Z);function Re(){}Re.prototype.nodeType=ne,_(Re,Z);function Le(){}Le.prototype.nodeName="#document-fragment",Le.prototype.nodeType=F,_(Le,Z);function Ve(){}Ve.prototype.nodeType=D,_(Ve,Z);function Ke(){}Ke.prototype.serializeToString=function(f,v,O){return We.call(f,v,O)},Z.prototype.toString=We;function We(f,v){var O=[],K=this.nodeType==9&&this.documentElement||this,fe=K.prefix,xe=K.namespaceURI;if(xe&&fe==null){var fe=K.lookupPrefix(xe);if(fe==null)var Me=[{namespace:xe,prefix:null}]}return Xe(this,O,f,v,Me),O.join("")}function ze(f,v,O){var K=f.prefix||"",fe=f.namespaceURI;if(!fe||K==="xml"&&fe===o.XML||fe===o.XMLNS)return!1;for(var xe=O.length;xe--;){var Me=O[xe];if(Me.prefix===K)return Me.namespace!==fe}return!0}function Ge(f,v,O){f.push(" ",v,'="',O.replace(/[<>&"\t\n\r]/g,re),'"')}function Xe(f,v,O,K,fe){if(fe||(fe=[]),K)if(f=K(f),f){if(typeof f=="string"){v.push(f);return}}else return;switch(f.nodeType){case P:var xe=f.attributes,Me=xe.length,B=f.firstChild,le=f.tagName;O=o.isHTML(f.namespaceURI)||O;var Ye=le;if(!O&&!f.prefix&&f.namespaceURI){for(var Qe,Je=0;Je<xe.length;Je++)if(xe.item(Je).name==="xmlns"){Qe=xe.item(Je).value;break}if(!Qe)for(var n=fe.length-1;n>=0;n--){var m=fe[n];if(m.prefix===""&&m.namespace===f.namespaceURI){Qe=m.namespace;break}}if(Qe!==f.namespaceURI)for(var n=fe.length-1;n>=0;n--){var m=fe[n];if(m.namespace===f.namespaceURI){m.prefix&&(Ye=m.prefix+":"+le);break}}}v.push("<",Ye);for(var u=0;u<Me;u++){var p=xe.item(u);p.prefix=="xmlns"?fe.push({prefix:p.localName,namespace:p.value}):p.nodeName=="xmlns"&&fe.push({prefix:"",namespace:p.value})}for(var u=0;u<Me;u++){var p=xe.item(u);if(ze(p,O,fe)){var x=p.prefix||"",b=p.namespaceURI;Ge(v,x?"xmlns:"+x:"xmlns",b),fe.push({prefix:x,namespace:b})}Xe(p,v,O,K,fe)}if(le===Ye&&ze(f,O,fe)){var x=f.prefix||"",b=f.namespaceURI;Ge(v,x?"xmlns:"+x:"xmlns",b),fe.push({prefix:x,namespace:b})}if(B||O&&!/^(?:meta|link|img|br|hr|input)$/i.test(le)){if(v.push(">"),O&&/^script$/i.test(le))for(;B;)B.data?v.push(B.data):Xe(B,v,O,K,fe.slice()),B=B.nextSibling;else for(;B;)Xe(B,v,O,K,fe.slice()),B=B.nextSibling;v.push("</",Ye,">")}else v.push("/>");return;case k:case F:for(var B=f.firstChild;B;)Xe(B,v,O,K,fe.slice()),B=B.nextSibling;return;case L:return Ge(v,f.name,f.value);case Y:return v.push(f.data.replace(/[<&>]/g,re));case G:return v.push("<![CDATA[",f.data,"]]>");case C:return v.push("<!--",f.data,"-->");case g:var j=f.publicId,te=f.systemId;if(v.push("<!DOCTYPE ",f.name),j)v.push(" PUBLIC ",j),te&&te!="."&&v.push(" ",te),v.push(">");else if(te&&te!=".")v.push(" SYSTEM ",te,">");else{var ke=f.internalSubset;ke&&v.push(" [",ke,"]"),v.push(">")}return;case D:return v.push("<?",f.target," ",f.data,"?>");case ne:return v.push("&",f.nodeName,";");default:v.push("??",f.nodeName)}}function rt(f,v,O){var K;switch(v.nodeType){case P:K=v.cloneNode(!1),K.ownerDocument=f;case F:break;case L:O=!0;break}if(K||(K=v.cloneNode(!1)),K.ownerDocument=f,K.parentNode=null,O)for(var fe=v.firstChild;fe;)K.appendChild(rt(f,fe,O)),fe=fe.nextSibling;return K}function et(f,v,O){var K=new v.constructor;for(var fe in v)if(Object.prototype.hasOwnProperty.call(v,fe)){var xe=v[fe];typeof xe!="object"&&xe!=K[fe]&&(K[fe]=xe)}switch(v.childNodes&&(K.childNodes=new J),K.ownerDocument=f,K.nodeType){case P:var Me=v.attributes,le=K.attributes=new oe,Ye=Me.length;le._ownerElement=K;for(var Qe=0;Qe<Ye;Qe++)K.setAttributeNode(et(f,Me.item(Qe),!0));break;case L:O=!0}if(O)for(var Je=v.firstChild;Je;)K.appendChild(et(f,Je,O)),Je=Je.nextSibling;return K}function nt(f,v,O){f[v]=O}try{if(Object.defineProperty){let f=function(v){switch(v.nodeType){case P:case F:var O=[];for(v=v.firstChild;v;)v.nodeType!==7&&v.nodeType!==8&&O.push(f(v)),v=v.nextSibling;return O.join("");default:return v.nodeValue}};Object.defineProperty(ie.prototype,"length",{get:function(){return se(this),this.$$length}}),Object.defineProperty(Z.prototype,"textContent",{get:function(){return f(this)},set:function(v){switch(this.nodeType){case P:case F:for(;this.firstChild;)this.removeChild(this.firstChild);(v||String(v))&&this.appendChild(this.ownerDocument.createTextNode(v));break;default:this.data=v,this.value=v,this.nodeValue=v}}}),nt=function(v,O,K){v["$$"+O]=K}}}catch(f){}r.DocumentType=Se,r.DOMException=W,r.DOMImplementation=pe,r.Element=N,r.Node=Z,r.NodeList=J,r.XMLSerializer=Ke},"./node_modules/@xmldom/xmldom/lib/entities.js":function(i,r,e){var t=e("./node_modules/@xmldom/xmldom/lib/conventions.js").freeze;r.XML_ENTITIES=t({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),r.HTML_ENTITIES=t({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),r.entityMap=r.HTML_ENTITIES},"./node_modules/@xmldom/xmldom/lib/index.js":function(i,r,e){var t=e("./node_modules/@xmldom/xmldom/lib/dom.js");r.DOMImplementation=t.DOMImplementation,r.XMLSerializer=t.XMLSerializer,r.DOMParser=e("./node_modules/@xmldom/xmldom/lib/dom-parser.js").DOMParser},"./node_modules/@xmldom/xmldom/lib/sax.js":function(i,r,e){var t=e("./node_modules/@xmldom/xmldom/lib/conventions.js").NAMESPACE,l=/[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]/,o=new RegExp("[\\-\\.0-9"+l.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),s=new RegExp("^"+l.source+o.source+"*(?::"+l.source+o.source+"*)?$"),E=0,w=1,S=2,A=3,T=4,_=5,q=6,P=7;function L(R,V){this.message=R,this.locator=V,Error.captureStackTrace&&Error.captureStackTrace(this,L)}L.prototype=new Error,L.prototype.name=L.name;function Y(){}Y.prototype={parse:function(R,V,X){var W=this.domBuilder;W.startDocument(),g(V,V={}),G(R,V,X,W,this.errorHandler),W.endDocument()}};function G(R,V,X,W,J){function ie(N){if(N>65535){N-=65536;var M=55296+(N>>10),Q=56320+(N&1023);return String.fromCharCode(M,Q)}else return String.fromCharCode(N)}function se(N){var M=N.slice(1,-1);return Object.hasOwnProperty.call(X,M)?X[M]:M.charAt(0)==="#"?ie(parseInt(M.substr(1).replace("x","0x"))):(J.error("entity not found:"+N),N)}function oe(N){if(N>ye){var M=R.substring(ye,N).replace(/&#?\w+;/g,se);Z&&ee(ye),W.characters(M,0,N-ye),ye=N}}function ee(N,M){for(;N>=ae&&(M=pe.exec(R));)ce=M.index,ae=ce+M[0].length,Z.lineNumber++;Z.columnNumber=N-ce+1}for(var ce=0,ae=0,pe=/.*(?:\r\n?|\n)|.*$/g,Z=W.locator,re=[{currentNSMap:V}],ge={},ye=0;;){try{var ve=R.indexOf("<",ye);if(ve<0){if(!R.substr(ye).match(/^\s*$/)){var me=W.doc,Ce=me.createTextNode(R.substr(ye));me.appendChild(Ce),W.currentElement=Ce}return}switch(ve>ye&&oe(ve),R.charAt(ve+1)){case"/":var h=R.indexOf(">",ve+3),Ee=R.substring(ve+2,h).replace(/[ \t\n\r]+$/g,""),be=re.pop();h<0?(Ee=R.substring(ve+2).replace(/[\s<].*/,""),J.error("end tag name: "+Ee+" is not complete:"+be.tagName),h=ve+1+Ee.length):Ee.match(/\s</)&&(Ee=Ee.replace(/[\s<].*/,""),J.error("end tag name: "+Ee+" maybe not complete"),h=ve+1+Ee.length);var Be=be.localNSMap,we=be.tagName==Ee,_e=we||be.tagName&&be.tagName.toLowerCase()==Ee.toLowerCase();if(_e){if(W.endElement(be.uri,be.localName,Ee),Be)for(var Ue in Be)Object.prototype.hasOwnProperty.call(Be,Ue)&&W.endPrefixMapping(Ue);we||J.fatalError("end tag name: "+Ee+" is not match the current start tagName:"+be.tagName)}else re.push(be);h++;break;case"?":Z&&ee(ve),h=H(R,ve,W);break;case"!":Z&&ee(ve),h=F(R,ve,W,J);break;default:Z&&ee(ve);var Pe=new U,ue=re[re.length-1].currentNSMap,h=I(R,ve,Pe,ue,se,J),c=Pe.length;if(!Pe.closed&&k(R,h,Pe.tagName,ge)&&(Pe.closed=!0,X.nbsp||J.warning("unclosed xml attribute")),Z&&c){for(var a=ne(Z,{}),d=0;d<c;d++){var y=Pe[d];ee(y.offset),y.locator=ne(Z,{})}W.locator=a,D(Pe,W,ue)&&re.push(Pe),W.locator=Z}else D(Pe,W,ue)&&re.push(Pe);t.isHTML(Pe.uri)&&!Pe.closed?h=C(R,h,Pe.tagName,se,W):h++}}catch(N){if(N instanceof L)throw N;J.error("element parse error: "+N),h=-1}h>ye?ye=h:oe(Math.max(ve,ye)+1)}}function ne(R,V){return V.lineNumber=R.lineNumber,V.columnNumber=R.columnNumber,V}function I(R,V,X,W,J,ie){function se(Z,re,ge){X.attributeNames.hasOwnProperty(Z)&&ie.fatalError("Attribute "+Z+" redefined"),X.addValue(Z,re.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,J),ge)}for(var oe,ee,ce=++V,ae=E;;){var pe=R.charAt(ce);switch(pe){case"=":if(ae===w)oe=R.slice(V,ce),ae=A;else if(ae===S)ae=A;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(ae===A||ae===w)if(ae===w&&(ie.warning('attribute value must after "="'),oe=R.slice(V,ce)),V=ce+1,ce=R.indexOf(pe,V),ce>0)ee=R.slice(V,ce),se(oe,ee,V-1),ae=_;else throw new Error("attribute value no end '"+pe+"' match");else if(ae==T)ee=R.slice(V,ce),se(oe,ee,V),ie.warning('attribute "'+oe+'" missed start quot('+pe+")!!"),V=ce+1,ae=_;else throw new Error('attribute value must after "="');break;case"/":switch(ae){case E:X.setTagName(R.slice(V,ce));case _:case q:case P:ae=P,X.closed=!0;case T:case w:break;case S:X.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return ie.error("unexpected end of input"),ae==E&&X.setTagName(R.slice(V,ce)),ce;case">":switch(ae){case E:X.setTagName(R.slice(V,ce));case _:case q:case P:break;case T:case w:ee=R.slice(V,ce),ee.slice(-1)==="/"&&(X.closed=!0,ee=ee.slice(0,-1));case S:ae===S&&(ee=oe),ae==T?(ie.warning('attribute "'+ee+'" missed quot(")!'),se(oe,ee,V)):((!t.isHTML(W[""])||!ee.match(/^(?:disabled|checked|selected)$/i))&&ie.warning('attribute "'+ee+'" missed value!! "'+ee+'" instead!!'),se(ee,ee,V));break;case A:throw new Error("attribute value missed!!")}return ce;case"€":pe=" ";default:if(pe<=" ")switch(ae){case E:X.setTagName(R.slice(V,ce)),ae=q;break;case w:oe=R.slice(V,ce),ae=S;break;case T:var ee=R.slice(V,ce);ie.warning('attribute "'+ee+'" missed quot(")!!'),se(oe,ee,V);case _:ae=q;break}else switch(ae){case S:X.tagName,(!t.isHTML(W[""])||!oe.match(/^(?:disabled|checked|selected)$/i))&&ie.warning('attribute "'+oe+'" missed value!! "'+oe+'" instead2!!'),se(oe,oe,V),V=ce,ae=w;break;case _:ie.warning('attribute space is required"'+oe+'"!!');case q:ae=w,V=ce;break;case A:ae=T,V=ce;break;case P:throw new Error("elements closed character '/' and '>' must be connected to")}}ce++}}function D(R,V,X){for(var W=R.tagName,J=null,pe=R.length;pe--;){var ie=R[pe],se=ie.qName,oe=ie.value,Z=se.indexOf(":");if(Z>0)var ee=ie.prefix=se.slice(0,Z),ce=se.slice(Z+1),ae=ee==="xmlns"&&ce;else ce=se,ee=null,ae=se==="xmlns"&&"";ie.localName=ce,ae!==!1&&(J==null&&(J={},g(X,X={})),X[ae]=J[ae]=oe,ie.uri=t.XMLNS,V.startPrefixMapping(ae,oe))}for(var pe=R.length;pe--;){ie=R[pe];var ee=ie.prefix;ee&&(ee==="xml"&&(ie.uri=t.XML),ee!=="xmlns"&&(ie.uri=X[ee||""]))}var Z=W.indexOf(":");Z>0?(ee=R.prefix=W.slice(0,Z),ce=R.localName=W.slice(Z+1)):(ee=null,ce=R.localName=W);var re=R.uri=X[ee||""];if(V.startElement(re,ce,W,R),R.closed){if(V.endElement(re,ce,W),J)for(ee in J)Object.prototype.hasOwnProperty.call(J,ee)&&V.endPrefixMapping(ee)}else return R.currentNSMap=X,R.localNSMap=J,!0}function C(R,V,X,W,J){if(/^(?:script|textarea)$/i.test(X)){var ie=R.indexOf("</"+X+">",V),se=R.substring(V+1,ie);if(/[&<]/.test(se))return/^script$/i.test(X)?(J.characters(se,0,se.length),ie):(se=se.replace(/&#?\w+;/g,W),J.characters(se,0,se.length),ie)}return V+1}function k(R,V,X,W){var J=W[X];return J==null&&(J=R.lastIndexOf("</"+X+">"),J<V&&(J=R.lastIndexOf("</"+X)),W[X]=J),J<V}function g(R,V){for(var X in R)Object.prototype.hasOwnProperty.call(R,X)&&(V[X]=R[X])}function F(R,V,X,W){var J=R.charAt(V+2);switch(J){case"-":if(R.charAt(V+3)==="-"){var ie=R.indexOf("-->",V+4);return ie>V?(X.comment(R,V+4,ie-V-4),ie+3):(W.error("Unclosed comment"),-1)}else return-1;default:if(R.substr(V+3,6)=="CDATA["){var ie=R.indexOf("]]>",V+9);return X.startCDATA(),X.characters(R,V+9,ie-V-9),X.endCDATA(),ie+3}var se=z(R,V),oe=se.length;if(oe>1&&/!doctype/i.test(se[0][0])){var ee=se[1][0],ce=!1,ae=!1;oe>3&&(/^public$/i.test(se[2][0])?(ce=se[3][0],ae=oe>4&&se[4][0]):/^system$/i.test(se[2][0])&&(ae=se[3][0]));var pe=se[oe-1];return X.startDTD(ee,ce,ae),X.endDTD(),pe.index+pe[0].length}}return-1}function H(R,V,X){var W=R.indexOf("?>",V);if(W){var J=R.substring(V,W).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return J?(J[0].length,X.processingInstruction(J[1],J[2]),W+2):-1}return-1}function U(){this.attributeNames={}}U.prototype={setTagName:function(R){if(!s.test(R))throw new Error("invalid tagName:"+R);this.tagName=R},addValue:function(R,V,X){if(!s.test(R))throw new Error("invalid attribute:"+R);this.attributeNames[R]=this.length,this[this.length++]={qName:R,value:V,offset:X}},length:0,getLocalName:function(R){return this[R].localName},getLocator:function(R){return this[R].locator},getQName:function(R){return this[R].qName},getURI:function(R){return this[R].uri},getValue:function(R){return this[R].value}};function z(R,V){var X,W=[],J=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(J.lastIndex=V,J.exec(R);X=J.exec(R);)if(W.push(X),X[1])return W}r.XMLReader=Y,r.ParseError=L},"./node_modules/process/browser.js":function(i,r){var e=i.exports={},t,l;function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?t=setTimeout:t=o}catch(G){t=o}try{typeof clearTimeout=="function"?l=clearTimeout:l=s}catch(G){l=s}})();function E(G){if(t===setTimeout)return setTimeout(G,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(G,0);try{return t(G,0)}catch(ne){try{return t.call(null,G,0)}catch(I){return t.call(this,G,0)}}}function w(G){if(l===clearTimeout)return clearTimeout(G);if((l===s||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(G);try{return l(G)}catch(ne){try{return l.call(null,G)}catch(I){return l.call(this,G)}}}var S=[],A=!1,T,_=-1;function q(){!A||!T||(A=!1,T.length?S=T.concat(S):_=-1,S.length&&P())}function P(){if(!A){var G=E(q);A=!0;for(var ne=S.length;ne;){for(T=S,S=[];++_<ne;)T&&T[_].run();_=-1,ne=S.length}T=null,A=!1,w(G)}}e.nextTick=function(G){var ne=new Array(arguments.length-1);if(arguments.length>1)for(var I=1;I<arguments.length;I++)ne[I-1]=arguments[I];S.push(new L(G,ne)),S.length===1&&!A&&E(P)};function L(G,ne){this.fun=G,this.array=ne}L.prototype.run=function(){this.fun.apply(null,this.array)},e.title="browser",e.browser=!0,e.env={},e.argv=[],e.version="",e.versions={};function Y(){}e.on=Y,e.addListener=Y,e.once=Y,e.off=Y,e.removeListener=Y,e.removeAllListeners=Y,e.emit=Y,e.prependListener=Y,e.prependOnceListener=Y,e.listeners=function(G){return[]},e.binding=function(G){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(G){throw new Error("process.chdir is not supported")},e.umask=function(){return 0}},"./node_modules/webpack/buildin/amd-options.js":function(i,r){(function(e){i.exports=e}).call(this,{})},"./node_modules/webpack/buildin/global.js":function(i,r){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){typeof window=="object"&&(e=window)}i.exports=e},"./node_modules/webpack/buildin/module.js":function(i,r){i.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},"./package.json":function(i){i.exports=JSON.parse('{"name":"cos-js-sdk-v5","version":"1.4.21","description":"JavaScript SDK for [腾讯云对象存储](https://cloud.tencent.com/product/cos)","main":"dist/cos-js-sdk-v5.js","types":"index.d.ts","scripts":{"prettier":"prettier --write src demo/demo.js test/test.js server/sts.js index.d.ts","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 --runInBand --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","prettier":"^3.0.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(i,r,e){var t=e("./node_modules/@babel/runtime/helpers/typeof.js"),l=e("./src/session.js"),o=e("./src/async.js"),s=e("./src/event.js").EventProxy,E=e("./src/util.js"),w=e("./src/tracker.js");function S(g,F){var H=this,U=new s,z=g.TaskId,R=g.Bucket,V=g.Region,X=g.Key,W=g.Body,J=g.ChunkSize||g.SliceSize||H.options.ChunkSize,ie=g.AsyncLimit,se=g.StorageClass,oe=g.ServerSideEncryption,ee,ce,ae=g.onHashProgress,pe=g.tracker;pe&&pe.setParams({chunkSize:J}),U.on("error",function(Z){if(H._isRunningTask(z))return Z.UploadId=g.UploadData.UploadId||"",F(Z)}),U.on("upload_complete",function(Z){var re=E.extend({UploadId:g.UploadData.UploadId||""},Z);F(null,re)}),U.on("upload_slice_complete",function(Z){var re={};E.each(g.Headers,function(ge,ye){var ve=ye.toLowerCase();(ve.indexOf("x-cos-meta-")===0||ve==="pic-operations")&&(re[ye]=ge)}),L.call(H,{Bucket:R,Region:V,Key:X,UploadId:Z.UploadId,SliceList:Z.SliceList,Headers:re,tracker:pe},function(ge,ye){if(H._isRunningTask(z)){if(l.removeUsing(Z.UploadId),ge)return ce(null,!0),U.emit("error",ge);l.removeUploadId.call(H,Z.UploadId),ce({loaded:ee,total:ee},!0),U.emit("upload_complete",ye)}})}),U.on("get_upload_data_finish",function(Z){var re=l.getFileId(W,g.ChunkSize,R,X);re&&l.saveUploadId.call(H,re,Z.UploadId,H.options.UploadIdCacheLimit),l.setUsing(Z.UploadId),ce(null,!0),q.call(H,{TaskId:z,Bucket:R,Region:V,Key:X,Body:W,FileSize:ee,SliceSize:J,AsyncLimit:ie,ServerSideEncryption:oe,UploadData:Z,Headers:g.Headers,onProgress:ce,tracker:pe},function(ge,ye){if(H._isRunningTask(z)){if(ge)return ce(null,!0),U.emit("error",ge);U.emit("upload_slice_complete",ye)}})}),U.on("get_file_size_finish",function(){if(ce=E.throttleOnProgress.call(H,ee,g.onProgress),g.UploadData.UploadId)U.emit("get_upload_data_finish",g.UploadData);else{var Z=E.extend({TaskId:z,Bucket:R,Region:V,Key:X,Headers:g.Headers,StorageClass:se,Body:W,FileSize:ee,SliceSize:J,onHashProgress:ae,tracker:pe},g);A.call(H,Z,function(re,ge){if(H._isRunningTask(z)){if(re)return U.emit("error",re);g.UploadData.UploadId=ge.UploadId,g.UploadData.PartList=ge.PartList,U.emit("get_upload_data_finish",g.UploadData)}})}}),ee=g.ContentLength,delete g.ContentLength,!g.Headers&&(g.Headers={}),E.each(g.Headers,function(Z,re){re.toLowerCase()==="content-length"&&delete g.Headers[re]}),function(){for(var Z=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],re=1024*1024,ge=0;ge<Z.length&&(re=Z[ge]*1024*1024,!(ee/re<=H.options.MaxPartNumber));ge++);g.ChunkSize=g.SliceSize=J=Math.max(J,re)}(),ee===0?(g.Body="",g.ContentLength=0,g.SkipTask=!0,H.putObject(g,F)):U.emit("get_file_size_finish")}function A(g,F){var H=g.TaskId,U=g.Bucket,z=g.Region,R=g.Key,V=g.StorageClass,X=this,W={},J=g.FileSize,ie=g.SliceSize,se=Math.ceil(J/ie),oe=0,ee=E.throttleOnProgress.call(X,J,g.onHashProgress),ce=function(re,ge){var ye=ie*(re-1),ve=Math.min(ye+ie,J),me=ve-ye;W[re]?ge(null,{PartNumber:re,ETag:W[re],Size:me}):E.fileSlice(g.Body,ye,ve,!1,function(Ce){E.getFileMd5(Ce,function(Ee,be){if(Ee)return ge(E.error(Ee));var Be='"'+be+'"';W[re]=Be,oe+=me,ee({loaded:oe,total:J}),ge(null,{PartNumber:re,ETag:Be,Size:me})})})},ae=function(re,ge){var ye=re.length;if(ye===0)return ge(null,!0);if(ye>se)return ge(null,!1);if(ye>1){var ve=Math.max(re[0].Size,re[1].Size);if(ve!==ie)return ge(null,!1)}var me=function Ce(Ee){if(Ee<ye){var be=re[Ee];ce(be.PartNumber,function(Be,we){we&&we.ETag===be.ETag&&we.Size===be.Size?Ce(Ee+1):ge(null,!1)})}else ge(null,!0)};me(0)},pe=new s;pe.on("error",function(Z){if(X._isRunningTask(H))return F(Z)}),pe.on("upload_id_available",function(Z){var re={},ge=[];E.each(Z.PartList,function(me){re[me.PartNumber]=me});for(var ye=1;ye<=se;ye++){var ve=re[ye];ve?(ve.PartNumber=ye,ve.Uploaded=!0):ve={PartNumber:ye,ETag:null,Uploaded:!1},ge.push(ve)}Z.PartList=ge,F(null,Z)}),pe.on("no_available_upload_id",function(){if(X._isRunningTask(H)){var Z=E.extend({Bucket:U,Region:z,Key:R,Query:E.clone(g.Query),StorageClass:V,Body:g.Body,calledBySdk:"sliceUploadFile",tracker:g.tracker},g),re=E.clone(g.Headers);delete re["x-cos-mime-limit"],Z.Headers=re,X.multipartInit(Z,function(ge,ye){if(X._isRunningTask(H)){if(ge)return pe.emit("error",ge);var ve=ye.UploadId;if(!ve)return F(E.error(new Error("no such upload id")));pe.emit("upload_id_available",{UploadId:ve,PartList:[]})}})}}),pe.on("has_and_check_upload_id",function(Z){Z=Z.reverse(),o.eachLimit(Z,1,function(re,ge){if(X._isRunningTask(H)){if(l.using[re]){ge();return}_.call(X,{Bucket:U,Region:z,Key:R,UploadId:re,tracker:g.tracker},function(ye,ve){if(X._isRunningTask(H)){if(ye)return l.removeUsing(re),pe.emit("error",ye);var me=ve.PartList;me.forEach(function(Ce){Ce.PartNumber*=1,Ce.Size*=1,Ce.ETag=Ce.ETag||""}),ae(me,function(Ce,Ee){if(X._isRunningTask(H)){if(Ce)return pe.emit("error",Ce);Ee?ge({UploadId:re,PartList:me}):ge()}})}})}},function(re){X._isRunningTask(H)&&(ee(null,!0),re&&re.UploadId?pe.emit("upload_id_available",re):pe.emit("no_available_upload_id"))})}),pe.on("seek_local_avail_upload_id",function(Z){var re=l.getFileId(g.Body,g.ChunkSize,U,R),ge=l.getUploadIdList.call(X,re);if(!re||!ge){pe.emit("has_and_check_upload_id",Z);return}var ye=function ve(me){if(me>=ge.length){pe.emit("has_and_check_upload_id",Z);return}var Ce=ge[me];if(!E.isInArray(Z,Ce)){l.removeUploadId.call(X,Ce),ve(me+1);return}if(l.using[Ce]){ve(me+1);return}_.call(X,{Bucket:U,Region:z,Key:R,UploadId:Ce,tracker:g.tracker},function(Ee,be){X._isRunningTask(H)&&(Ee?(l.removeUploadId.call(X,Ce),ve(me+1)):pe.emit("upload_id_available",{UploadId:Ce,PartList:be.PartList}))})};ye(0)}),pe.on("get_remote_upload_id_list",function(){T.call(X,{Bucket:U,Region:z,Key:R,tracker:g.tracker},function(Z,re){if(X._isRunningTask(H)){if(Z)return pe.emit("error",Z);var ge=E.filter(re.UploadList,function(me){return me.Key===R&&(!V||me.StorageClass.toUpperCase()===V.toUpperCase())}).reverse().map(function(me){return me.UploadId||me.UploadID});if(ge.length)pe.emit("seek_local_avail_upload_id",ge);else{var ye=l.getFileId(g.Body,g.ChunkSize,U,R),ve;ye&&(ve=l.getUploadIdList.call(X,ye))&&E.each(ve,function(me){l.removeUploadId.call(X,me)}),pe.emit("no_available_upload_id")}}})}),pe.emit("get_remote_upload_id_list")}function T(g,F){var H=this,U=[],z={Bucket:g.Bucket,Region:g.Region,Prefix:g.Key,calledBySdk:g.calledBySdk||"sliceUploadFile",tracker:g.tracker},R=function V(){H.multipartList(z,function(X,W){if(X)return F(X);U.push.apply(U,W.Upload||[]),W.IsTruncated==="true"?(z.KeyMarker=W.NextKeyMarker,z.UploadIdMarker=W.NextUploadIdMarker,V()):F(null,{UploadList:U})})};R()}function _(g,F){var H=this,U=[],z={Bucket:g.Bucket,Region:g.Region,Key:g.Key,UploadId:g.UploadId,calledBySdk:"sliceUploadFile",tracker:g.tracker},R=function V(){H.multipartListPart(z,function(X,W){if(X)return F(X);U.push.apply(U,W.Part||[]),W.IsTruncated==="true"?(z.PartNumberMarker=W.NextPartNumberMarker,V()):F(null,{PartList:U})})};R()}function q(g,F){var H=this,U=g.TaskId,z=g.Bucket,R=g.Region,V=g.Key,X=g.UploadData,W=g.FileSize,J=g.SliceSize,ie=Math.min(g.AsyncLimit||H.options.ChunkParallelLimit||1,256),se=g.Body,oe=Math.ceil(W/J),ee=0,ce=g.ServerSideEncryption,ae=g.Headers,pe=E.filter(X.PartList,function(re){return re.Uploaded&&(ee+=re.PartNumber>=oe&&W%J||J),!re.Uploaded}),Z=g.onProgress;o.eachLimit(pe,ie,function(re,ge){if(H._isRunningTask(U)){var ye=re.PartNumber,ve=Math.min(W,re.PartNumber*J)-(re.PartNumber-1)*J,me=0;P.call(H,{TaskId:U,Bucket:z,Region:R,Key:V,SliceSize:J,FileSize:W,PartNumber:ye,ServerSideEncryption:ce,Body:se,UploadData:X,Headers:ae,onProgress:function(Ee){ee+=Ee.loaded-me,me=Ee.loaded,Z({loaded:ee,total:W})},tracker:g.tracker},function(Ce,Ee){H._isRunningTask(U)&&(!Ce&&!Ee.ETag&&(Ce='get ETag error, please add "ETag" to CORS ExposeHeader setting.( 获取ETag失败,请在CORS ExposeHeader设置中添加ETag,请参考文档:https://cloud.tencent.com/document/product/436/13318 )'),Ce?ee-=me:(ee+=ve-me,re.ETag=Ee.ETag),Z({loaded:ee,total:W}),ge(Ce||null,Ee))})}},function(re){if(H._isRunningTask(U)){if(re)return F(re);F(null,{UploadId:X.UploadId,SliceList:X.PartList})}})}function P(g,F){var H=this,U=g.TaskId,z=g.Bucket,R=g.Region,V=g.Key,X=g.FileSize,W=g.Body,J=g.PartNumber*1,ie=g.SliceSize,se=g.ServerSideEncryption,oe=g.UploadData,ee=g.Headers||{},ce=H.options.ChunkRetryTimes+1,ae=ie*(J-1),pe=ie,Z=ae+ie;Z>X&&(Z=X,pe=Z-ae);var re=["x-cos-traffic-limit","x-cos-mime-limit"],ge={};E.each(ee,function(ve,me){re.indexOf(me)>-1&&(ge[me]=ve)});var ye=oe.PartList[J-1];o.retry(ce,function(ve){H._isRunningTask(U)&&E.fileSlice(W,ae,Z,!0,function(me){H.multipartUpload({TaskId:U,Bucket:z,Region:R,Key:V,ContentLength:pe,PartNumber:J,UploadId:oe.UploadId,ServerSideEncryption:se,Body:me,Headers:ge,onProgress:g.onProgress,calledBySdk:"sliceUploadFile",tracker:g.tracker},function(Ce,Ee){if(H._isRunningTask(U))return Ce?ve(Ce):(ye.Uploaded=!0,ve(null,Ee))})})},function(ve,me){if(H._isRunningTask(U))return F(ve,me)})}function L(g,F){var H=g.Bucket,U=g.Region,z=g.Key,R=g.UploadId,V=g.SliceList,X=this,W=this.options.ChunkRetryTimes+1,J=g.Headers,ie=V.map(function(se){return{PartNumber:se.PartNumber,ETag:se.ETag}});o.retry(W,function(se){X.multipartComplete({Bucket:H,Region:U,Key:z,UploadId:R,Parts:ie,Headers:J,calledBySdk:"sliceUploadFile",tracker:g.tracker},se)},function(se,oe){F(se,oe)})}function Y(g,F){var H=g.Bucket,U=g.Region,z=g.Key,R=g.UploadId,V=g.Level||"task",X=g.AsyncLimit,W=this,J=new s;if(J.on("error",function(ie){return F(ie)}),J.on("get_abort_array",function(ie){G.call(W,{Bucket:H,Region:U,Key:z,Headers:g.Headers,AsyncLimit:X,AbortArray:ie},F)}),V==="bucket")T.call(W,{Bucket:H,Region:U,calledBySdk:"abortUploadTask"},function(ie,se){if(ie)return F(ie);J.emit("get_abort_array",se.UploadList||[])});else if(V==="file"){if(!z)return F(E.error(new Error("abort_upload_task_no_key")));T.call(W,{Bucket:H,Region:U,Key:z,calledBySdk:"abortUploadTask"},function(ie,se){if(ie)return F(ie);J.emit("get_abort_array",se.UploadList||[])})}else if(V==="task"){if(!R)return F(E.error(new Error("abort_upload_task_no_id")));if(!z)return F(E.error(new Error("abort_upload_task_no_key")));J.emit("get_abort_array",[{Key:z,UploadId:R}])}else return F(E.error(new Error("abort_unknown_level")))}function G(g,F){var H=g.Bucket,U=g.Region,z=g.Key,R=g.AbortArray,V=g.AsyncLimit||1,X=this,W=0,J=new Array(R.length);o.eachLimit(R,V,function(ie,se){var oe=W;if(z&&z!==ie.Key){J[oe]={error:{KeyNotMatch:!0}},se(null);return}var ee=ie.UploadId||ie.UploadID;X.multipartAbort({Bucket:H,Region:U,Key:ie.Key,Headers:g.Headers,UploadId:ee},function(ce){var ae={Bucket:H,Region:U,Key:ie.Key,UploadId:ee};J[oe]={error:ce,task:ae},se(null)}),W++},function(ie){if(ie)return F(ie);for(var se=[],oe=[],ee=0,ce=J.length;ee<ce;ee++){var ae=J[ee];ae.task&&(ae.error?oe.push(ae.task):se.push(ae.task))}return F(null,{successList:se,errorList:oe})})}function ne(g,F){var H=this,U=g.SliceSize===void 0?H.options.SliceSize:g.SliceSize,z=[],R=g.Body,V=R.size||R.length||0,X={TaskId:""};if(H.options.EnableTracker){var W=H.options.UseAccelerate||typeof H.options.Domain=="string"&&H.options.Domain.includes("accelerate.");g.tracker=new w({bucket:g.Bucket,region:g.Region,apiName:"uploadFile",fileKey:g.Key,fileSize:V,accelerate:W,deepTracker:H.options.DeepTracker,customId:H.options.CustomId,delay:H.options.TrackerDelay})}E.each(g,function(ce,ae){t(ce)!=="object"&&typeof ce!="function"&&(X[ae]=ce)});var J=g.onTaskReady,ie=function(ae){X.TaskId=ae,J&&J(ae)};g.onTaskReady=ie;var se=V>U?"sliceUploadFile":"putObject",oe=g.onFileFinish,ee=function(ae,pe){g.tracker&&g.tracker.formatResult(ae,pe),oe&&oe(ae,pe,X),F&&F(ae,pe)};z.push({api:se,params:g,callback:ee}),H._addTasks(z)}function I(g,F){var H=this,U=g.SliceSize===void 0?H.options.SliceSize:g.SliceSize,z=0,R=0,V=E.throttleOnProgress.call(H,R,g.onProgress),X=g.files.length,W=g.onFileFinish,J=Array(X),ie=function(ee,ce,ae){V(null,!0),W&&W(ee,ce,ae),J[ae.Index]={options:ae,error:ee,data:ce},--X<=0&&F&&F(null,{files:J})},se=[];E.each(g.files,function(oe,ee){(function(){var ce=oe.Body,ae=ce.size||ce.length||0,pe={Index:ee,TaskId:""};if(!H.options.UseRawKey&&oe.Key&&oe.Key.substr(0,1)==="/"&&(oe.Key=oe.Key.substr(1)),z+=ae,H.options.EnableTracker){var Z=H.options.UseAccelerate||typeof H.options.Domain=="string"&&H.options.Domain.includes("accelerate.");oe.tracker=new w({bucket:oe.Bucket,region:oe.Region,apiName:"uploadFiles",fileKey:oe.Key,fileSize:ae,accelerate:Z,deepTracker:H.options.DeepTracker,customId:H.options.CustomId,delay:H.options.TrackerDelay})}E.each(oe,function(Be,we){t(Be)!=="object"&&typeof Be!="function"&&(pe[we]=Be)});var re=oe.onTaskReady,ge=function(we){pe.TaskId=we,re&&re(we)};oe.onTaskReady=ge;var ye=0,ve=oe.onProgress,me=function(we){R=R-ye+we.loaded,ye=we.loaded,ve&&ve(we),V({loaded:R,total:z})};oe.onProgress=me;var Ce=ae>U?"sliceUploadFile":"putObject",Ee=oe.onFileFinish,be=function(we,_e){oe.tracker&&oe.tracker.formatResult(we,_e),Ee&&Ee(we,_e),ie&&ie(we,_e,pe)};se.push({api:Ce,params:oe,callback:be})})()}),H._addTasks(se)}function D(g,F){var H=new s,U=this,z=g.Bucket,R=g.Region,V=g.Key,X=g.CopySource,W=E.getSourceParams.call(this,X);if(!W){F(E.error(new Error("CopySource format error")));return}var J=W.Bucket,ie=W.Region,se=decodeURIComponent(W.Key),oe=g.CopySliceSize===void 0?U.options.CopySliceSize:g.CopySliceSize;oe=Math.max(0,oe);var ee=g.CopyChunkSize||this.options.CopyChunkSize,ce=this.options.CopyChunkParallelLimit,ae=this.options.ChunkRetryTimes+1,pe=0,Z=0,re,ge,ye={},ve={},me={};H.on("copy_slice_complete",function(Ce){E.each(g.Headers,function(be,Be){Be.toLowerCase().indexOf("x-cos-meta-")});var Ee=E.map(Ce.PartList,function(be){return{PartNumber:be.PartNumber,ETag:be.ETag}});o.retry(ae,function(be){U.multipartComplete({Bucket:z,Region:R,Key:V,UploadId:Ce.UploadId,Parts:Ee,calledBySdk:"sliceCopyFile"},be)},function(be,Be){if(l.removeUsing(Ce.UploadId),be)return ge(null,!0),F(be);l.removeUploadId(Ce.UploadId),ge({loaded:re,total:re},!0),F(null,Be)})}),H.on("get_copy_data_finish",function(Ce){var Ee=l.getCopyFileId(X,ye,ee,z,V);Ee&&l.saveUploadId(Ee,Ce.UploadId,U.options.UploadIdCacheLimit),l.setUsing(Ce.UploadId);var be=E.filter(Ce.PartList,function(Be){return Be.Uploaded&&(Z+=Be.PartNumber>=pe&&re%ee||ee),!Be.Uploaded});o.eachLimit(be,ce,function(Be,we){var _e=Be.PartNumber,Ue=Be.CopySourceRange,Pe=Be.end-Be.start;o.retry(ae,function(ue){C.call(U,{Bucket:z,Region:R,Key:V,CopySource:X,UploadId:Ce.UploadId,PartNumber:_e,CopySourceRange:Ue},ue)},function(ue,h){if(ue)return we(ue);Z+=Pe,ge({loaded:Z,total:re}),Be.ETag=h.ETag,we(ue||null,h)})},function(Be){if(Be)return l.removeUsing(Ce.UploadId),ge(null,!0),F(Be);H.emit("copy_slice_complete",Ce)})}),H.on("get_chunk_size_finish",function(){var Ce=function(){U.multipartInit({Bucket:z,Region:R,Key:V,Headers:me},function(_e,Ue){if(_e)return F(_e);g.UploadId=Ue.UploadId,H.emit("get_copy_data_finish",{UploadId:g.UploadId,PartList:g.PartList})})},Ee=l.getCopyFileId(X,ye,ee,z,V),be=l.getUploadIdList(Ee);if(!Ee||!be)return Ce();var Be=function we(_e){if(_e>=be.length)return Ce();var Ue=be[_e];if(l.using[Ue])return we(_e+1);_.call(U,{Bucket:z,Region:R,Key:V,UploadId:Ue},function(Pe,ue){if(Pe)l.removeUploadId(Ue),we(_e+1);else{if(l.using[Ue])return we(_e+1);var h={},c=0;E.each(ue.PartList,function(a){var d=parseInt(a.Size),y=c+d-1;h[a.PartNumber+"|"+c+"|"+y]=a.ETag,c+=d}),E.each(g.PartList,function(a){var d=h[a.PartNumber+"|"+a.start+"|"+a.end];d&&(a.ETag=d,a.Uploaded=!0)}),H.emit("get_copy_data_finish",{UploadId:Ue,PartList:g.PartList})}})};Be(0)}),H.on("get_file_size_finish",function(){if(function(){for(var Ee=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],be=1024*1024,Be=0;Be<Ee.length&&(be=Ee[Be]*1024*1024,!(re/be<=U.options.MaxPartNumber));Be++);g.ChunkSize=ee=Math.max(ee,be),pe=Math.ceil(re/ee);for(var we=[],_e=1;_e<=pe;_e++){var Ue=(_e-1)*ee,Pe=_e*ee<re?_e*ee-1:re-1,ue={PartNumber:_e,start:Ue,end:Pe,CopySourceRange:"bytes="+Ue+"-"+Pe};we.push(ue)}g.PartList=we}(),g.Headers["x-cos-metadata-directive"]==="Replaced"?me=g.Headers:me=ve,me["x-cos-storage-class"]=g.Headers["x-cos-storage-class"]||ve["x-cos-storage-class"],me=E.clearKey(me),ve["x-cos-storage-class"]==="ARCHIVE"||ve["x-cos-storage-class"]==="DEEP_ARCHIVE"){var Ce=ve["x-cos-restore"];if(!Ce||Ce==='ongoing-request="true"'){F(E.error(new Error("Unrestored archive object is not allowed to be copied")));return}}delete me["x-cos-copy-source"],delete me["x-cos-metadata-directive"],delete me["x-cos-copy-source-If-Modified-Since"],delete me["x-cos-copy-source-If-Unmodified-Since"],delete me["x-cos-copy-source-If-Match"],delete me["x-cos-copy-source-If-None-Match"],H.emit("get_chunk_size_finish")}),U.headObject({Bucket:J,Region:ie,Key:se},function(Ce,Ee){if(Ce){Ce.statusCode&&Ce.statusCode===404?F(E.error(Ce,{ErrorStatus:se+" Not Exist"})):F(Ce);return}if(re=g.FileSize=Ee.headers["content-length"],re===void 0||!re){F(E.error(new Error('get Content-Length error, please add "Content-Length" to CORS ExposeHeader setting.( 获取Content-Length失败,请在CORS ExposeHeader设置中添加Content-Length,请参考文档:https://cloud.tencent.com/document/product/436/13318 )')));return}if(ge=E.throttleOnProgress.call(U,re,g.onProgress),re<=oe)g.Headers["x-cos-metadata-directive"]||(g.Headers["x-cos-metadata-directive"]="Copy"),U.putObjectCopy(g,function(Be,we){if(Be)return ge(null,!0),F(Be);ge({loaded:re,total:re},!0),F(Be,we)});else{var be=Ee.headers;ye=be,ve={"Cache-Control":be["cache-control"],"Content-Disposition":be["content-disposition"],"Content-Encoding":be["content-encoding"],"Content-Type":be["content-type"],Expires:be.expires,"x-cos-storage-class":be["x-cos-storage-class"]},E.each(be,function(Be,we){var _e="x-cos-meta-";we.indexOf(_e)===0&&we.length>_e.length&&(ve[we]=Be)}),H.emit("get_file_size_finish")}})}function C(g,F){var H=g.TaskId,U=g.Bucket,z=g.Region,R=g.Key,V=g.CopySource,X=g.UploadId,W=g.PartNumber*1,J=g.CopySourceRange,ie=this.options.ChunkRetryTimes+1,se=this;o.retry(ie,function(oe){se.uploadPartCopy({TaskId:H,Bucket:U,Region:z,Key:R,CopySource:V,UploadId:X,PartNumber:W,CopySourceRange:J},function(ee,ce){oe(ee||null,ce)})},function(oe,ee){return F(oe,ee)})}var k={sliceUploadFile:S,abortUploadTask:Y,uploadFile:ne,uploadFiles:I,sliceCopyFile:D};i.exports.init=function(g,F){F.transferToTaskMethod(k,"sliceUploadFile"),E.each(k,function(H,U){g.prototype[U]=E.apiWrapper(U,H)})}},"./src/async.js":function(i,r){var e=function(s,E,w,S){if(S=S||function(){},!s.length||E<=0)return S();var A=0,T=0,_=0;(function q(){if(A>=s.length)return S();for(;_<E&&T<s.length;)T+=1,_+=1,w(s[T-1],function(P){P?(S(P),S=function(){}):(A+=1,_-=1,A>=s.length?S():q())})})()},t=function(s,E,w){var S=function A(T){E(function(_,q){_&&T<s?A(T+1):w(_,q)})};s<1?w():S(1)},l={eachLimit:e,retry:t};i.exports=l},"./src/base.js":function(i,r,e){var t=e("./node_modules/@babel/runtime/helpers/typeof.js"),l=e("./lib/request.js"),o=e("./src/util.js");function s(n,m){typeof n=="function"&&(m=n,n={});var u=this.options.Protocol||(o.isBrowser&&(typeof location>"u"?"undefined":t(location))==="object"&&location.protocol==="http:"?"http:":"https:"),p=this.options.ServiceDomain,x=n.AppId||this.options.appId,b=n.Region;p?(p=p.replace(/\{\{AppId\}\}/gi,x||"").replace(/\{\{Region\}\}/gi,b||"").replace(/\{\{.*?\}\}/gi,""),/^[a-zA-Z]+:\/\//.test(p)||(p=u+"//"+p),p.slice(-1)==="/"&&(p=p.slice(0,-1))):b?p=u+"//cos."+b+".myqcloud.com":p=u+"//service.cos.myqcloud.com";var B="",j=b?"cos."+b+".myqcloud.com":"service.cos.myqcloud.com",te=p.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1");j===te&&(B=j),le.call(this,{Action:"name/cos:GetService",url:p,method:"GET",headers:n.Headers,SignHost:B},function(ke,De){if(ke)return m(ke);var Ae=De&&De.ListAllMyBucketsResult&&De.ListAllMyBucketsResult.Buckets&&De.ListAllMyBucketsResult.Buckets.Bucket||[];Ae=o.isArray(Ae)?Ae:[Ae];var Te=De&&De.ListAllMyBucketsResult&&De.ListAllMyBucketsResult.Owner||{};m(null,{Buckets:Ae,Owner:Te,statusCode:De.statusCode,headers:De.headers})})}function E(n,m){var u=this,p="";if(n.BucketAZConfig){var x={BucketAZConfig:n.BucketAZConfig};p=o.json2xml({CreateBucketConfiguration:x})}le.call(this,{Action:"name/cos:PutBucket",method:"PUT",Bucket:n.Bucket,Region:n.Region,headers:n.Headers,body:p},function(b,B){if(b)return m(b);var j=K({protocol:u.options.Protocol,domain:u.options.Domain,bucket:n.Bucket,region:n.Region,isLocation:!0});m(null,{Location:j,statusCode:B.statusCode,headers:B.headers})})}function w(n,m){le.call(this,{Action:"name/cos:HeadBucket",Bucket:n.Bucket,Region:n.Region,headers:n.Headers,method:"HEAD"},m)}function S(n,m){var u={};u.prefix=n.Prefix||"",u.delimiter=n.Delimiter,u.marker=n.Marker,u["max-keys"]=n.MaxKeys,u["encoding-type"]=n.EncodingType,le.call(this,{Action:"name/cos:GetBucket",ResourceKey:u.prefix,method:"GET",Bucket:n.Bucket,Region:n.Region,headers:n.Headers,qs:u},function(p,x){if(p)return m(p);var b=x.ListBucketResult||{},B=b.Contents||[],j=b.CommonPrefixes||[];B=o.isArray(B)?B:[B],j=o.isArray(j)?j:[j];var te=o.clone(b);o.extend(te,{Contents:B,CommonPrefixes:j,statusCode:x.statusCode,headers:x.headers}),m(null,te)})}function A(n,m){le.call(this,{Action:"name/cos:DeleteBucket",Bucket:n.Bucket,Region:n.Region,headers:n.Headers,method:"DELETE"},function(u,p){if(u&&u.statusCode===204)return m(null,{statusCode:u.statusCode});if(u)return m(u);m(null,{statusCode:p.statusCode,headers:p.headers})})}function T(n,m){var u=n.Headers,p="";if(n.AccessControlPolicy){var x=o.clone(n.AccessControlPolicy||{}),b=x.Grants||x.Grant;b=o.isArray(b)?b:[b],delete x.Grant,delete x.Grants,x.AccessControlList={Grant:b},p=o.json2xml({AccessControlPolicy:x}),u["Content-Type"]="application/xml",u["Content-MD5"]=o.b64(o.md5(p))}o.each(u,function(B,j){j.indexOf("x-cos-grant-")===0&&(u[j]=O(u[j]))}),le.call(this,{Action:"name/cos:PutBucketACL",method:"PUT",Bucket:n.Bucket,Region:n.Region,headers:u,action:"acl",body:p},function(B,j){if(B)return m(B);m(null,{statusCode:j.statusCode,headers:j.headers})})}function _(n,m){le.call(this,{Action:"name/cos:GetBucketACL",method:"GET",Bucket:n.Bucket,Region:n.Region,headers:n.Headers,action:"acl"},function(u,p){if(u)return m(u);var x=p.AccessControlPolicy||{},b=x.Owner||{},B=x.AccessControlList.Grant||[];B=o.isArray(B)?B:[B];var j=v(x);p.headers&&p.headers["x-cos-acl"]&&(j.ACL=p.headers["x-cos-acl"]),j=o.extend(j,{Owner:b,Grants:B,statusCode:p.statusCode,headers:p.headers}),m(null,j)})}function q(n,m){var u=n.CORSConfiguration||{},p=u.CORSRules||n.CORSRules||[];p=o.clone(o.isArray(p)?p:[p]),o.each(p,function(j){o.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],function(te){var ke=te+"s",De=j[ke]||j[te]||[];delete j[ke],j[te]=o.isArray(De)?De:[De]})});var x={CORSRule:p};n.ResponseVary&&(x.ResponseVary=n.ResponseVary);var b=o.json2xml({CORSConfiguration:x}),B=n.Headers;B["Content-Type"]="application/xml",B["Content-MD5"]=o.b64(o.md5(b)),le.call(this,{Action:"name/cos:PutBucketCORS",method:"PUT",Bucket:n.Bucket,Region:n.Region,body:b,action:"cors",headers:B},function(j,te){if(j)return m(j);m(null,{statusCode:te.statusCode,headers:te.headers})})}function P(n,m){le.call(this,{Action:"name/cos:GetBucketCORS",method:"GET",Bucket:n.Bucket,Region:n.Region,headers:n.Headers,action:"cors"},function(u,p){if(u){if(u.statusCode===404&&u.error&&u.error.Code==="NoSuchCORSConfiguration"){var x={CORSRules:[],statusCode:u.statusCode};u.headers&&(x.headers=u.headers),m(null,x)}else m(u);return}var b=p.CORSConfiguration||{},B=b.CORSRules||b.CORSRule||[];B=o.clone(o.isArray(B)?B:[B]);var j=b.ResponseVary;o.each(B,function(te){o.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],function(ke){var De=ke+"s",Ae=te[De]||te[ke]||[];delete te[ke],te[De]=o.isArray(Ae)?Ae:[Ae]})}),m(null,{CORSRules:B,ResponseVary:j,statusCode:p.statusCode,headers:p.headers})})}function L(n,m){le.call(this,{Action:"name/cos:DeleteBucketCORS",method:"DELETE",Bucket:n.Bucket,Region:n.Region,headers:n.Headers,action:"cors"},function(u,p){if(u&&u.statusCode===204)return m(null,{statusCode:u.statusCode});if(u)return m(u);m(null,{statusCode:p.statusCode||u.statusCode,headers:p.headers})})}function Y(n,m){le.call(this,{Action:"name/cos:GetBucketLocation",method:"GET",Bucket:n.Bucket,Region:n.Region,headers:n.Headers,action:"location"},m)}function G(n,m){var u=n.Policy;try{typeof u=="string"&&(u=JSON.parse(u))}catch(b){}if(!u||typeof u=="string")return m(o.error(new Error("Policy format error")));var p=JSON.stringify(u);u.version||(u.version="2.0");var x=n.Headers;x["Content-Type"]="application/json",x["Content-MD5"]=o.b64(o.md5(p)),le.call(this,{Action:"name/cos:PutBucketPolicy",method:"PUT",Bucket:n.Bucket,Region:n.Region,action:"policy",body:p,headers:x},function(b,B){if(b&&b.statusCode===204)return m(null,{statusCode:b.statusCode});if(b)return m(b);m(null,{statusCode:B.statusCode,headers:B.headers})})}function ne(n,m){le.call(this,{Action:"name/cos:GetBucketPolicy",method:"GET",Bucket:n.Bucket,Region:n.Region,headers:n.Headers,action:"policy",rawBody:!0},function(u,p){if(u)return u.statusCode&&u.statusCode===403?m(o.error(u,{ErrorStatus:"Access Denied"})):u.statusCode&&u.statusCode===405?m(o.error(u,{ErrorStatus:"Method Not Allowed"})):u.statusCode&&u.statusCode===404?m(o.error(u,{ErrorStatus:"Policy Not Found"})):m(u);var x={};try{x=JSON.parse(p.body)}catch(b){}m(null,{Policy:x,statusCode:p.statusCode,headers:p.headers})})}function I(n,m){le.call(this,{Action:"name/cos:DeleteBucketPolicy",method:"DELETE",Bucket:n.Bucket,Region:n.Region,headers:n.Headers,action:"policy"},function(u,p){if(u&&u.statusCode===204)return m(null,{statusCode:u.statusCode});if(u)return m(u);m(null,{statusCode:p.statusCode||u.statusCode,headers:p.headers})})}function D(n,m){var u=n.Tagging||{},p=u.TagSet||u.Tags||n.Tags||[];p=o.clone(o.isArray(p)?p:[p]);var x=o.json2xml({Tagging:{TagSet:{Tag:p}}}),b=n.Headers;b["Content-Type"]="application/xml",b["Content-MD5"]=o.b64(o.md5(x)),le.call(this,{Action:"name/cos:PutBucketTagging",method:"PUT",Bucket:n.Bucket,Region:n.Region,body:x,action:"tagging",headers:b},function(B,j){if(B&&B.statusCode===204)return m(null,{statusCode:B.statusCode});if(B)return m(B);m(null,{statusCode:j.statusCode,headers:j.headers})})}function C(n,m){le.call(this,{Action:"name/cos:GetBucketTagging",method:"GET",Bucket:n.Bucket,Region:n.Region,headers:n.Headers,action:"tagging"},function(u,p){if(u){if(u.statusCode===404&&u.error&&(u.error==="Not Found"||u.error.Code==="NoSuchTagSet")){var x={Tags:[],statusCode:u.statusCode};u.headers&&(x.headers=u.headers),m(null,x)}else m(u);return}var b=[];try{b=p.Tagging.TagSet.Tag||[]}catch(B){}b=o.clone(o.isArray(b)?b:[b]),m(null,{Tags:b,statusCode:p.statusCode,headers:p.headers})})}function k(n,m){le.call(this,{Action:"name/cos:DeleteBucketTagging",method:"DELETE",Bucket:n.Bucket,Region:n.Region,headers:n.Headers,action:"tagging"},function(u,p){if(u&&u.statusCode===204)return m(null,{statusCode:u.statusCode});if(u)return m(u);m(null,{statusCode:p.statusCode,headers:p.headers})})}function g(n,m){var u=n.LifecycleConfiguration||{},p=u.Rules||n.Rules||[];p=o.clone(p);var x=o.json2xml({LifecycleConfiguration:{Rule:p}}),b=n.Headers;b["Content-Type"]="application/xml",b["Content-MD5"]=o.b64(o.md5(x)),le.call(this,{Action:"name/cos:PutBucketLifecycle",method:"PUT",Bucket:n.Bucket,Region:n.Region,body:x,action:"lifecycle",headers:b},function(B,j){if(B&&B.statusCode===204)return m(null,{statusCode:B.statusCode});if(B)return m(B);m(null,{statusCode:j.statusCode,headers:j.headers})})}function F(n,m){le.call(this,{Action:"name/cos:GetBucketLifecycle",method:"GET",Bucket:n.Bucket,Region:n.Region,headers:n.Headers,action:"lifecycle"},function(u,p){if(u){if(u.statusCode===404&&u.error&&u.error.Code==="NoSuchLifecycleConfiguration"){var x={Rules:[],statusCode:u.statusCode};u.headers&&(x.headers=u.headers),m(null,x)}else m(u);return}var b=[];try{b=p.LifecycleConfiguration.Rule||[]}catch(B){}b=o.clone(o.isArray(b)?b:[b]),m(null,{Rules:b,statusCode:p.statusCode,headers:p.headers})})}function H(n,m){le.call(this,{Action:"name/cos:DeleteBucketLifecycle",method:"DELETE",Bucket:n.Bucket,Region:n.Region,headers:n.Headers,action:"lifecycle"},function(u,p){if(u&&u.statusCode===204)return m(null,{statusCode:u.statusCode});if(u)return m(u);m(null,{statusCode:p.statusCode,headers:p.headers})})}function U(n,m){if(!n.VersioningConfiguration){m(o.error(new Error("missing param VersioningConfiguration")));return}var u=n.VersioningConfiguration||{},p=o.json2xml({VersioningConfiguration:u}),x=n.Headers;x["Content-Type"]="application/xml",x["Content-MD5"]=o.b64(o.md5(p)),le.call(this,{Action:"name/cos:PutBucketVersioning",method:"PUT",Bucket:n.Bucket,Region:n.Region,body:p,action:"versioning",headers:x},function(b,B){if(b&&b.statusCode===204)return m(null,{statusCode:b.statusCode});if(b)return m(b);m(null,{statusCode:B.statusCode,headers:B.headers})})}function z(n,m){le.call(this,{Action:"name/cos:GetBucketVersioning",method:"GET",Bucket:n.Bucket,Region:n.Region,headers:n.Headers,action:"versioning"},function(u,p){u||!p.VersioningConfiguration&&(p.VersioningConfiguration={}),m(u,p)})}function R(n,m){var u=o.clone(n.ReplicationConfiguration),p=o.json2xml({ReplicationConfiguration:u});p=p.replace(/<(\/?)Rules>/gi,"<$1Rule>"),p=p.replace(/<(\/?)Tags>/gi,"<$1Tag>");var x=n.Headers;x["Content-Type"]="application/xml",x["Content-MD5"]=o.b64(o.md5(p)),le.call(this,{Action:"name/cos:PutBucketReplication",method:"PUT",Bucket:n.Bucket,Region:n.Region,body:p,action:"replication",headers:x},function(b,B){if(b&&b.statusCode===204)return m(null,{statusCode:b.statusCode});if(b)return m(b);m(null,{statusCode:B.statusCode,headers:B.headers})})}function V(n,m){le.call(this,{Action:"name/cos:GetBucketReplication",method:"GET",Bucket:n.Bucket,Region:n.Region,headers:n.Headers,action:"replication"},function(u,p){if(u){if(u.statusCode===404&&u.error&&(u.error==="Not Found"||u.error.Code==="ReplicationConfigurationnotFoundError")){var x={ReplicationConfiguration:{Rules:[]},statusCode:u.statusCode};u.headers&&(x.headers=u.headers),m(null,x)}else m(u);return}!p.ReplicationConfiguration&&(p.ReplicationConfiguration={}),p.ReplicationConfiguration.Rule&&(p.ReplicationConfiguration.Rules=o.makeArray(p.ReplicationConfiguration.Rule),delete p.ReplicationConfiguration.Rule),m(u,p)})}function X(n,m){le.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:n.Bucket,Region:n.Region,headers:n.Headers,action:"replication"},function(u,p){if(u&&u.statusCode===204)return m(null,{statusCode:u.statusCode});if(u)return m(u);m(null,{statusCode:p.statusCode,headers:p.headers})})}function W(n,m){if(!n.WebsiteConfiguration){m(o.error(new Error("missing param WebsiteConfiguration")));return}var u=o.clone(n.WebsiteConfiguration||{}),p=u.RoutingRules||u.RoutingRule||[];p=o.isArray(p)?p:[p],delete u.RoutingRule,delete u.RoutingRules,p.length&&(u.RoutingRules={RoutingRule:p});var x=o.json2xml({WebsiteConfiguration:u}),b=n.Headers;b["Content-Type"]="application/xml",b["Content-MD5"]=o.b64(o.md5(x)),le.call(this,{Action:"name/cos:PutBucketWebsite",method:"PUT",Bucket:n.Bucket,Region:n.Region,body:x,action:"website",headers:b},function(B,j){if(B&&B.statusCode===204)return m(null,{statusCode:B.statusCode});if(B)return m(B);m(null,{statusCode:j.statusCode,headers:j.headers})})}function J(n,m){le.call(this,{Action:"name/cos:GetBucketWebsite",method:"GET",Bucket:n.Bucket,Region:n.Region,Key:n.Key,headers:n.Headers,action:"website"},function(u,p){if(u){if(u.statusCode===404&&u.error.Code==="NoSuchWebsiteConfiguration"){var x={WebsiteConfiguration:{},statusCode:u.statusCode};u.headers&&(x.headers=u.headers),m(null,x)}else m(u);return}var b=p.WebsiteConfiguration||{};if(b.RoutingRules){var B=o.clone(b.RoutingRules.RoutingRule||[]);B=o.makeArray(B),b.RoutingRules=B}m(null,{WebsiteConfiguration:b,statusCode:p.statusCode,headers:p.headers})})}function ie(n,m){le.call(this,{Action:"name/cos:DeleteBucketWebsite",method:"DELETE",Bucket:n.Bucket,Region:n.Region,headers:n.Headers,action:"website"},function(u,p){if(u&&u.statusCode===204)return m(null,{statusCode:u.statusCode});if(u)return m(u);m(null,{statusCode:p.statusCode,headers:p.headers})})}function se(n,m){if(!n.RefererConfiguration){m(o.error(new Error("missing param RefererConfiguration")));return}var u=o.clone(n.RefererConfiguration||{}),p=u.DomainList||{},x=p.Domains||p.Domain||[];x=o.isArray(x)?x:[x],x.length&&(u.DomainList={Domain:x});var b=o.json2xml({RefererConfiguration:u}),B=n.Headers;B["Content-Type"]="application/xml",B["Content-MD5"]=o.b64(o.md5(b)),le.call(this,{Action:"name/cos:PutBucketReferer",method:"PUT",Bucket:n.Bucket,Region:n.Region,body:b,action:"referer",headers:B},function(j,te){if(j&&j.statusCode===204)return m(null,{statusCode:j.statusCode});if(j)return m(j);m(null,{statusCode:te.statusCode,headers:te.headers})})}function oe(n,m){le.call(this,{Action:"name/cos:GetBucketReferer",method:"GET",Bucket:n.Bucket,Region:n.Region,Key:n.Key,headers:n.Headers,action:"referer"},function(u,p){if(u){if(u.statusCode===404&&u.error.Code==="NoSuchRefererConfiguration"){var x={WebsiteConfiguration:{},statusCode:u.statusCode};u.headers&&(x.headers=u.headers),m(null,x)}else m(u);return}var b=p.RefererConfiguration||{};if(b.DomainList){var B=o.makeArray(b.DomainList.Domain||[]);b.DomainList={Domains:B}}m(null,{RefererConfiguration:b,statusCode:p.statusCode,headers:p.headers})})}function ee(n,m){var u=n.DomainConfiguration||{},p=u.DomainRule||n.DomainRule||[];p=o.clone(p);var x=o.json2xml({DomainConfiguration:{DomainRule:p}}),b=n.Headers;b["Content-Type"]="application/xml",b["Content-MD5"]=o.b64(o.md5(x)),le.call(this,{Action:"name/cos:PutBucketDomain",method:"PUT",Bucket:n.Bucket,Region:n.Region,body:x,action:"domain",headers:b},function(B,j){if(B&&B.statusCode===204)return m(null,{statusCode:B.statusCode});if(B)return m(B);m(null,{statusCode:j.statusCode,headers:j.headers})})}function ce(n,m){le.call(this,{Action:"name/cos:GetBucketDomain",method:"GET",Bucket:n.Bucket,Region:n.Region,headers:n.Headers,action:"domain"},function(u,p){if(u)return m(u);var x=[];try{x=p.DomainConfiguration.DomainRule||[]}catch(b){}x=o.clone(o.isArray(x)?x:[x]),m(null,{DomainRule:x,statusCode:p.statusCode,headers:p.headers})})}function ae(n,m){le.call(this,{Action:"name/cos:DeleteBucketDomain",method:"DELETE",Bucket:n.Bucket,Region:n.Region,headers:n.Headers,action:"domain"},function(u,p){if(u&&u.statusCode===204)return m(null,{statusCode:u.statusCode});if(u)return m(u);m(null,{statusCode:p.statusCode,headers:p.headers})})}function pe(n,m){var u=n.OriginConfiguration||{},p=u.OriginRule||n.OriginRule||[];p=o.clone(p);var x=o.json2xml({OriginConfiguration:{OriginRule:p}}),b=n.Headers;b["Content-Type"]="application/xml",b["Content-MD5"]=o.b64(o.md5(x)),le.call(this,{Action:"name/cos:PutBucketOrigin",method:"PUT",Bucket:n.Bucket,Region:n.Region,body:x,action:"origin",headers:b},function(B,j){if(B&&B.statusCode===204)return m(null,{statusCode:B.statusCode});if(B)return m(B);m(null,{statusCode:j.statusCode,headers:j.headers})})}function Z(n,m){le.call(this,{Action:"name/cos:GetBucketOrigin",method:"GET",Bucket:n.Bucket,Region:n.Region,headers:n.Headers,action:"origin"},function(u,p){if(u)return m(u);var x=[];try{x=p.OriginConfiguration.OriginRule||[]}catch(b){}x=o.clone(o.isArray(x)?x:[x]),m(null,{OriginRule:x,statusCode:p.statusCode,headers:p.headers})})}function re(n,m){le.call(this,{Action:"name/cos:DeleteBucketOrigin",method:"DELETE",Bucket:n.Bucket,Region:n.Region,headers:n.Headers,action:"origin"},function(u,p){if(u&&u.statusCode===204)return m(null,{statusCode:u.statusCode});if(u)return m(u);m(null,{statusCode:p.statusCode,headers:p.headers})})}function ge(n,m){var u=o.json2xml({BucketLoggingStatus:n.BucketLoggingStatus||""}),p=n.Headers;p["Content-Type"]="application/xml",p["Content-MD5"]=o.b64(o.md5(u)),le.call(this,{Action:"name/cos:PutBucketLogging",method:"PUT",Bucket:n.Bucket,Region:n.Region,body:u,action:"logging",headers:p},function(x,b){if(x&&x.statusCode===204)return m(null,{statusCode:x.statusCode});if(x)return m(x);m(null,{statusCode:b.statusCode,headers:b.headers})})}function ye(n,m){le.call(this,{Action:"name/cos:GetBucketLogging",method:"GET",Bucket:n.Bucket,Region:n.Region,headers:n.Headers,action:"logging"},function(u,p){if(u)return m(u);m(null,{BucketLoggingStatus:p.BucketLoggingStatus,statusCode:p.statusCode,headers:p.headers})})}function ve(n,m,u){var p=o.clone(m.InventoryConfiguration);if(p.OptionalFields){var x=p.OptionalFields||[];p.OptionalFields={Field:x}}if(p.Destination&&p.Destination.COSBucketDestination&&p.Destination.COSBucketDestination.Encryption){var b=p.Destination.COSBucketDestination.Encryption;Object.keys(b).indexOf("SSECOS")>-1&&(b["SSE-COS"]=b.SSECOS,delete b.SSECOS)}var B=o.json2xml({InventoryConfiguration:p}),j=m.Headers;j["Content-Type"]="application/xml",j["Content-MD5"]=o.b64(o.md5(B));var te=n==="PUT"?"name/cos:PutBucketInventory":"name/cos:PostBucketInventory";le.call(this,{Action:te,method:n,Bucket:m.Bucket,Region:m.Region,body:B,action:"inventory",qs:{id:m.Id},headers:j},function(ke,De){if(ke&&ke.statusCode===204)return u(null,{statusCode:ke.statusCode});if(ke)return u(ke);u(null,{statusCode:De.statusCode,headers:De.headers})})}function me(n,m){return ve.call(this,"PUT",n,m)}function Ce(n,m){return ve.call(this,"POST",n,m)}function Ee(n,m){le.call(this,{Action:"name/cos:GetBucketInventory",method:"GET",Bucket:n.Bucket,Region:n.Region,headers:n.Headers,action:"inventory",qs:{id:n.Id}},function(u,p){if(u)return m(u);var x=p.InventoryConfiguration;if(x&&x.OptionalFields&&x.OptionalFields.Field){var b=x.OptionalFields.Field;o.isArray(b)||(b=[b]),x.OptionalFields=b}if(x.Destination&&x.Destination.COSBucketDestination&&x.Destination.COSBucketDestination.Encryption){var B=x.Destination.COSBucketDestination.Encryption;Object.keys(B).indexOf("SSE-COS")>-1&&(B.SSECOS=B["SSE-COS"],delete B["SSE-COS"])}m(null,{InventoryConfiguration:x,statusCode:p.statusCode,headers:p.headers})})}function be(n,m){le.call(this,{Action:"name/cos:ListBucketInventory",method:"GET",Bucket:n.Bucket,Region:n.Region,headers:n.Headers,action:"inventory",qs:{"continuation-token":n.ContinuationToken}},function(u,p){if(u)return m(u);var x=p.ListInventoryConfigurationResult,b=x.InventoryConfiguration||[];b=o.isArray(b)?b:[b],delete x.InventoryConfiguration,o.each(b,function(B){if(B&&B.OptionalFields&&B.OptionalFields.Field){var j=B.OptionalFields.Field;o.isArray(j)||(j=[j]),B.OptionalFields=j}if(B.Destination&&B.Destination.COSBucketDestination&&B.Destination.COSBucketDestination.Encryption){var te=B.Destination.COSBucketDestination.Encryption;Object.keys(te).indexOf("SSE-COS")>-1&&(te.SSECOS=te["SSE-COS"],delete te["SSE-COS"])}}),x.InventoryConfigurations=b,o.extend(x,{statusCode:p.statusCode,headers:p.headers}),m(null,x)})}function Be(n,m){le.call(this,{Action:"name/cos:DeleteBucketInventory",method:"DELETE",Bucket:n.Bucket,Region:n.Region,headers:n.Headers,action:"inventory",qs:{id:n.Id}},function(u,p){if(u&&u.statusCode===204)return m(null,{statusCode:u.statusCode});if(u)return m(u);m(null,{statusCode:p.statusCode,headers:p.headers})})}function we(n,m){if(!n.AccelerateConfiguration){m(o.error(new Error("missing param AccelerateConfiguration")));return}var u={AccelerateConfiguration:n.AccelerateConfiguration||{}},p=o.json2xml(u),x={};x["Content-Type"]="application/xml",x["Content-MD5"]=o.b64(o.md5(p)),le.call(this,{Action:"name/cos:PutBucketAccelerate",method:"PUT",Bucket:n.Bucket,Region:n.Region,body:p,action:"accelerate",headers:x},function(b,B){if(b)return m(b);m(null,{statusCode:B.statusCode,headers:B.headers})})}function _e(n,m){le.call(this,{Action:"name/cos:GetBucketAccelerate",method:"GET",Bucket:n.Bucket,Region:n.Region,action:"accelerate"},function(u,p){u||!p.AccelerateConfiguration&&(p.AccelerateConfiguration={}),m(u,p)})}function Ue(n,m){var u=n.ServerSideEncryptionConfiguration||{},p=u.Rule||u.Rules||[],x=o.json2xml({ServerSideEncryptionConfiguration:{Rule:p}}),b=n.Headers;b["Content-Type"]="application/xml",b["Content-MD5"]=o.b64(o.md5(x)),le.call(this,{Action:"name/cos:PutBucketEncryption",method:"PUT",Bucket:n.Bucket,Region:n.Region,body:x,action:"encryption",headers:b},function(B,j){if(B&&B.statusCode===204)return m(null,{statusCode:B.statusCode});if(B)return m(B);m(null,{statusCode:j.statusCode,headers:j.headers})})}function Pe(n,m){le.call(this,{Action:"name/cos:GetBucketEncryption",method:"GET",Bucket:n.Bucket,Region:n.Region,headers:n.Headers,action:"encryption"},function(u,p){if(u){if(u.statusCode===404&&u.code==="NoSuchEncryptionConfiguration"){var x={EncryptionConfiguration:{Rules:[]},statusCode:u.statusCode};u.headers&&(x.headers=u.headers),m(null,x)}else m(u);return}var b=o.makeArray(p.EncryptionConfiguration&&p.EncryptionConfiguration.Rule||[]);p.EncryptionConfiguration={Rules:b},m(u,p)})}function ue(n,m){le.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:n.Bucket,Region:n.Region,headers:n.Headers,action:"encryption"},function(u,p){if(u&&u.statusCode===204)return m(null,{statusCode:u.statusCode});if(u)return m(u);m(null,{statusCode:p.statusCode,headers:p.headers})})}function h(n,m){le.call(this,{Action:"name/cos:HeadObject",method:"HEAD",Bucket:n.Bucket,Region:n.Region,Key:n.Key,VersionId:n.VersionId,headers:n.Headers},function(u,p){if(u){var x=u.statusCode;return n.Headers["If-Modified-Since"]&&x&&x===304?m(null,{NotModified:!0,statusCode:x}):m(u)}p.ETag=o.attr(p.headers,"etag",""),m(null,p)})}function c(n,m){var u={};u.prefix=n.Prefix||"",u.delimiter=n.Delimiter,u["key-marker"]=n.KeyMarker,u["version-id-marker"]=n.VersionIdMarker,u["max-keys"]=n.MaxKeys,u["encoding-type"]=n.EncodingType,le.call(this,{Action:"name/cos:GetBucketObjectVersions",ResourceKey:u.prefix,method:"GET",Bucket:n.Bucket,Region:n.Region,headers:n.Headers,qs:u,action:"versions"},function(p,x){if(p)return m(p);var b=x.ListVersionsResult||{},B=b.DeleteMarker||[];B=o.isArray(B)?B:[B];var j=b.Version||[];j=o.isArray(j)?j:[j];var te=o.clone(b);delete te.DeleteMarker,delete te.Version,o.extend(te,{DeleteMarkers:B,Versions:j,statusCode:x.statusCode,headers:x.headers}),m(null,te)})}function a(n,m){var u=n.Query||{},p=n.QueryString||"",x=o.throttleOnProgress.call(this,0,n.onProgress),b=n.tracker;b&&b.setParams({signStartTime:new Date().getTime()}),u["response-content-type"]=n.ResponseContentType,u["response-content-language"]=n.ResponseContentLanguage,u["response-expires"]=n.ResponseExpires,u["response-cache-control"]=n.ResponseCacheControl,u["response-content-disposition"]=n.ResponseContentDisposition,u["response-content-encoding"]=n.ResponseContentEncoding,le.call(this,{Action:"name/cos:GetObject",method:"GET",Bucket:n.Bucket,Region:n.Region,Key:n.Key,VersionId:n.VersionId,DataType:n.DataType,headers:n.Headers,qs:u,qsStr:p,rawBody:!0,onDownloadProgress:x,tracker:b},function(B,j){if(x(null,!0),B){var te=B.statusCode;return n.Headers["If-Modified-Since"]&&te&&te===304?m(null,{NotModified:!0}):m(B)}m(null,{Body:j.body,ETag:o.attr(j.headers,"etag",""),statusCode:j.statusCode,headers:j.headers})})}function d(n,m){var u=this,p=n.ContentLength,x=o.throttleOnProgress.call(u,p,n.onProgress),b=n.Headers;!b["Cache-Control"]&&!b["cache-control"]&&(b["Cache-Control"]=""),!b["Content-Type"]&&!b["content-type"]&&(b["Content-Type"]=n.Body&&n.Body.type||"");var B=n.UploadAddMetaMd5||u.options.UploadAddMetaMd5||u.options.UploadCheckContentMd5,j=n.tracker;B&&j&&j.setParams({md5StartTime:new Date().getTime()}),o.getBodyMd5(B,n.Body,function(te){te&&(j&&j.setParams({md5EndTime:new Date().getTime()}),u.options.UploadCheckContentMd5&&(b["Content-MD5"]=o.b64(te)),(n.UploadAddMetaMd5||u.options.UploadAddMetaMd5)&&(b["x-cos-meta-md5"]=te)),n.ContentLength!==void 0&&(b["Content-Length"]=n.ContentLength),x(null,!0),le.call(u,{Action:"name/cos:PutObject",TaskId:n.TaskId,method:"PUT",Bucket:n.Bucket,Region:n.Region,Key:n.Key,headers:n.Headers,qs:n.Query,body:n.Body,onProgress:x,tracker:j},function(ke,De){if(ke)return x(null,!0),m(ke);x({loaded:p,total:p},!0);var Ae=K({ForcePathStyle:u.options.ForcePathStyle,protocol:u.options.Protocol,domain:u.options.Domain,bucket:n.Bucket,region:u.options.UseAccelerate?"accelerate":n.Region,object:n.Key});Ae=Ae.substr(Ae.indexOf("://")+3),De.Location=Ae,De.ETag=o.attr(De.headers,"etag",""),m(null,De)})},n.onHashProgress)}function y(n,m){le.call(this,{Action:"name/cos:DeleteObject",method:"DELETE",Bucket:n.Bucket,Region:n.Region,Key:n.Key,headers:n.Headers,VersionId:n.VersionId,action:n.Recursive?"recursive":""},function(u,p){if(u){var x=u.statusCode;return x&&x===404?m(null,{BucketNotFound:!0,statusCode:x}):m(u)}m(null,{statusCode:p.statusCode,headers:p.headers})})}function N(n,m){var u={};n.VersionId&&(u.versionId=n.VersionId),le.call(this,{Action:"name/cos:GetObjectACL",method:"GET",Bucket:n.Bucket,Region:n.Region,Key:n.Key,headers:n.Headers,qs:u,action:"acl"},function(p,x){if(p)return m(p);var b=x.AccessControlPolicy||{},B=b.Owner||{},j=b.AccessControlList&&b.AccessControlList.Grant||[];j=o.isArray(j)?j:[j];var te=v(b);delete te.GrantWrite,x.headers&&x.headers["x-cos-acl"]&&(te.ACL=x.headers["x-cos-acl"]),te=o.extend(te,{Owner:B,Grants:j,statusCode:x.statusCode,headers:x.headers}),m(null,te)})}function M(n,m){var u=n.Headers,p="";if(n.AccessControlPolicy){var x=o.clone(n.AccessControlPolicy||{}),b=x.Grants||x.Grant;b=o.isArray(b)?b:[b],delete x.Grant,delete x.Grants,x.AccessControlList={Grant:b},p=o.json2xml({AccessControlPolicy:x}),u["Content-Type"]="application/xml",u["Content-MD5"]=o.b64(o.md5(p))}o.each(u,function(B,j){j.indexOf("x-cos-grant-")===0&&(u[j]=O(u[j]))}),le.call(this,{Action:"name/cos:PutObjectACL",method:"PUT",Bucket:n.Bucket,Region:n.Region,Key:n.Key,action:"acl",headers:u,body:p},function(B,j){if(B)return m(B);m(null,{statusCode:j.statusCode,headers:j.headers})})}function Q(n,m){var u=n.Headers;u.Origin=n.Origin,u["Access-Control-Request-Method"]=n.AccessControlRequestMethod,u["Access-Control-Request-Headers"]=n.AccessControlRequestHeaders,le.call(this,{Action:"name/cos:OptionsObject",method:"OPTIONS",Bucket:n.Bucket,Region:n.Region,Key:n.Key,headers:u},function(p,x){if(p)return p.statusCode&&p.statusCode===403?m(null,{OptionsForbidden:!0,statusCode:p.statusCode}):m(p);var b=x.headers||{};m(null,{AccessControlAllowOrigin:b["access-control-allow-origin"],AccessControlAllowMethods:b["access-control-allow-methods"],AccessControlAllowHeaders:b["access-control-allow-headers"],AccessControlExposeHeaders:b["access-control-expose-headers"],AccessControlMaxAge:b["access-control-max-age"],statusCode:x.statusCode,headers:x.headers})})}function de(n,m){var u=this,p=n.Headers;!p["Cache-Control"]&&!p["cache-control"]&&(p["Cache-Control"]="");var x=n.CopySource||"",b=o.getSourceParams.call(this,x);if(!b){m(o.error(new Error("CopySource format error")));return}var B=b.Bucket,j=b.Region,te=decodeURIComponent(b.Key);le.call(this,{Scope:[{action:"name/cos:GetObject",bucket:B,region:j,prefix:te},{action:"name/cos:PutObject",bucket:n.Bucket,region:n.Region,prefix:n.Key}],method:"PUT",Bucket:n.Bucket,Region:n.Region,Key:n.Key,VersionId:n.VersionId,headers:n.Headers},function(ke,De){if(ke)return m(ke);var Ae=o.clone(De.CopyObjectResult||{}),Te=K({ForcePathStyle:u.options.ForcePathStyle,protocol:u.options.Protocol,domain:u.options.Domain,bucket:n.Bucket,region:n.Region,object:n.Key,isLocation:!0});o.extend(Ae,{Location:Te,statusCode:De.statusCode,headers:De.headers}),m(null,Ae)})}function he(n,m){var u=n.CopySource||"",p=o.getSourceParams.call(this,u);if(!p){m(o.error(new Error("CopySource format error")));return}var x=p.Bucket,b=p.Region,B=decodeURIComponent(p.Key);le.call(this,{Scope:[{action:"name/cos:GetObject",bucket:x,region:b,prefix:B},{action:"name/cos:PutObject",bucket:n.Bucket,region:n.Region,prefix:n.Key}],method:"PUT",Bucket:n.Bucket,Region:n.Region,Key:n.Key,VersionId:n.VersionId,qs:{partNumber:n.PartNumber,uploadId:n.UploadId},headers:n.Headers},function(j,te){if(j)return m(j);var ke=o.clone(te.CopyPartResult||{});o.extend(ke,{statusCode:te.statusCode,headers:te.headers}),m(null,ke)})}function $(n,m){var u=n.Objects||[],p=n.Quiet;u=o.isArray(u)?u:[u];var x=o.json2xml({Delete:{Object:u,Quiet:p||!1}}),b=n.Headers;b["Content-Type"]="application/xml",b["Content-MD5"]=o.b64(o.md5(x));var B=o.map(u,function(j){return{action:"name/cos:DeleteObject",bucket:n.Bucket,region:n.Region,prefix:j.Key}});le.call(this,{Scope:B,method:"POST",Bucket:n.Bucket,Region:n.Region,body:x,action:"delete",headers:b},function(j,te){if(j)return m(j);var ke=te.DeleteResult||{},De=ke.Deleted||[],Ae=ke.Error||[];De=o.isArray(De)?De:[De],Ae=o.isArray(Ae)?Ae:[Ae];var Te=o.clone(ke);o.extend(Te,{Error:Ae,Deleted:De,statusCode:te.statusCode,headers:te.headers}),m(null,Te)})}function Se(n,m){var u=n.Headers;if(!n.RestoreRequest){m(o.error(new Error("missing param RestoreRequest")));return}var p=n.RestoreRequest||{},x=o.json2xml({RestoreRequest:p});u["Content-Type"]="application/xml",u["Content-MD5"]=o.b64(o.md5(x)),le.call(this,{Action:"name/cos:RestoreObject",method:"POST",Bucket:n.Bucket,Region:n.Region,Key:n.Key,VersionId:n.VersionId,body:x,action:"restore",headers:u},m)}function Ie(n,m){var u=n.Tagging||{},p=u.TagSet||u.Tags||n.Tags||[];p=o.clone(o.isArray(p)?p:[p]);var x=o.json2xml({Tagging:{TagSet:{Tag:p}}}),b=n.Headers;b["Content-Type"]="application/xml",b["Content-MD5"]=o.b64(o.md5(x)),le.call(this,{Action:"name/cos:PutObjectTagging",method:"PUT",Bucket:n.Bucket,Key:n.Key,Region:n.Region,body:x,action:"tagging",headers:b,VersionId:n.VersionId},function(B,j){if(B&&B.statusCode===204)return m(null,{statusCode:B.statusCode});if(B)return m(B);m(null,{statusCode:j.statusCode,headers:j.headers})})}function Fe(n,m){le.call(this,{Action:"name/cos:GetObjectTagging",method:"GET",Key:n.Key,Bucket:n.Bucket,Region:n.Region,headers:n.Headers,action:"tagging",VersionId:n.VersionId},function(u,p){if(u){if(u.statusCode===404&&u.error&&(u.error==="Not Found"||u.error.Code==="NoSuchTagSet")){var x={Tags:[],statusCode:u.statusCode};u.headers&&(x.headers=u.headers),m(null,x)}else m(u);return}var b=[];try{b=p.Tagging.TagSet.Tag||[]}catch(B){}b=o.clone(o.isArray(b)?b:[b]),m(null,{Tags:b,statusCode:p.statusCode,headers:p.headers})})}function Re(n,m){le.call(this,{Action:"name/cos:DeleteObjectTagging",method:"DELETE",Bucket:n.Bucket,Region:n.Region,Key:n.Key,headers:n.Headers,action:"tagging",VersionId:n.VersionId},function(u,p){if(u&&u.statusCode===204)return m(null,{statusCode:u.statusCode});if(u)return m(u);m(null,{statusCode:p.statusCode,headers:p.headers})})}function Le(n,m){var u=n.SelectType;if(!u)return m(o.error(new Error("missing param SelectType")));var p=n.SelectRequest||{},x=o.json2xml({SelectRequest:p}),b=n.Headers;b["Content-Type"]="application/xml",b["Content-MD5"]=o.b64(o.md5(x)),le.call(this,{Action:"name/cos:GetObject",method:"POST",Bucket:n.Bucket,Region:n.Region,Key:n.Key,headers:n.Headers,action:"select",qs:{"select-type":n.SelectType},VersionId:n.VersionId,body:x,DataType:"arraybuffer",rawBody:!0},function(B,j){if(B&&B.statusCode===204)return m(null,{statusCode:B.statusCode});if(B)return m(B);var te=o.parseSelectPayload(j.body);m(null,{statusCode:j.statusCode,headers:j.headers,Body:te.body,Payload:te.payload})})}function Ve(n,m){var u=this,p=n.Headers,x=n.tracker;!p["Cache-Control"]&&!p["cache-control"]&&(p["Cache-Control"]=""),!p["Content-Type"]&&!p["content-type"]&&(p["Content-Type"]=n.Body&&n.Body.type||"");var b=n.Body&&(n.UploadAddMetaMd5||u.options.UploadAddMetaMd5);b&&x&&x.setParams({md5StartTime:new Date().getTime()}),o.getBodyMd5(b,n.Body,function(B){B&&(n.Headers["x-cos-meta-md5"]=B),b&&x&&x.setParams({md5EndTime:new Date().getTime()}),le.call(u,{Action:"name/cos:InitiateMultipartUpload",method:"POST",Bucket:n.Bucket,Region:n.Region,Key:n.Key,action:"uploads",headers:n.Headers,qs:n.Query,tracker:x},function(j,te){if(j)return x&&x.parent&&x.parent.setParams({errorNode:"multipartInit"}),m(j);if(te=o.clone(te||{}),te&&te.InitiateMultipartUploadResult)return m(null,o.extend(te.InitiateMultipartUploadResult,{statusCode:te.statusCode,headers:te.headers}));m(null,te)})},n.onHashProgress)}function Ke(n,m){var u=this;o.getFileSize("multipartUpload",n,function(){var p=n.tracker,x=u.options.UploadCheckContentMd5;x&&p&&p.setParams({md5StartTime:new Date().getTime()}),o.getBodyMd5(x,n.Body,function(b){b&&(n.Headers["Content-MD5"]=o.b64(b)),x&&p&&p.setParams({md5EndTime:new Date().getTime()}),p&&p.setParams({partNumber:n.PartNumber}),le.call(u,{Action:"name/cos:UploadPart",TaskId:n.TaskId,method:"PUT",Bucket:n.Bucket,Region:n.Region,Key:n.Key,qs:{partNumber:n.PartNumber,uploadId:n.UploadId},headers:n.Headers,onProgress:n.onProgress,body:n.Body||null,tracker:p},function(B,j){if(B)return p&&p.parent&&p.parent.setParams({errorNode:"multipartUpload"}),m(B);m(null,{ETag:o.attr(j.headers,"etag",""),statusCode:j.statusCode,headers:j.headers})})})})}function We(n,m){for(var u=this,p=n.UploadId,x=n.Parts,b=n.tracker,B=0,j=x.length;B<j;B++)x[B].ETag&&x[B].ETag.indexOf('"')===0||(x[B].ETag='"'+x[B].ETag+'"');var te=o.json2xml({CompleteMultipartUpload:{Part:x}});te=te.replace(/\n\s*/g,"");var ke=n.Headers;ke["Content-Type"]="application/xml",ke["Content-MD5"]=o.b64(o.md5(te)),le.call(this,{Action:"name/cos:CompleteMultipartUpload",method:"POST",Bucket:n.Bucket,Region:n.Region,Key:n.Key,qs:{uploadId:p},body:te,headers:ke,tracker:b},function(De,Ae){if(De)return b&&b.parent&&b.parent.setParams({errorNode:"multipartComplete"}),m(De);var Te=K({ForcePathStyle:u.options.ForcePathStyle,protocol:u.options.Protocol,domain:u.options.Domain,bucket:n.Bucket,region:n.Region,object:n.Key,isLocation:!0}),He=Ae.CompleteMultipartUploadResult||{};He.ProcessResults&&He&&He.ProcessResults&&(He.UploadResult={OriginalInfo:{Key:He.Key,Location:Te,ETag:He.ETag,ImageInfo:He.ImageInfo},ProcessResults:He.ProcessResults},delete He.ImageInfo,delete He.ProcessResults);var $e=o.extend(He,{Location:Te,statusCode:Ae.statusCode,headers:Ae.headers});m(null,$e)})}function ze(n,m){var u={};u.delimiter=n.Delimiter,u["encoding-type"]=n.EncodingType,u.prefix=n.Prefix||"",u["max-uploads"]=n.MaxUploads,u["key-marker"]=n.KeyMarker,u["upload-id-marker"]=n.UploadIdMarker,u=o.clearKey(u);var p=n.tracker;p&&p.setParams({signStartTime:new Date().getTime()}),le.call(this,{Action:"name/cos:ListMultipartUploads",ResourceKey:u.prefix,method:"GET",Bucket:n.Bucket,Region:n.Region,headers:n.Headers,qs:u,action:"uploads",tracker:p},function(x,b){if(x)return p&&p.parent&&p.parent.setParams({errorNode:"multipartList"}),m(x);if(b&&b.ListMultipartUploadsResult){var B=b.ListMultipartUploadsResult.Upload||[];B=o.isArray(B)?B:[B],b.ListMultipartUploadsResult.Upload=B}var j=o.clone(b.ListMultipartUploadsResult||{});o.extend(j,{statusCode:b.statusCode,headers:b.headers}),m(null,j)})}function Ge(n,m){var u={},p=n.tracker;u.uploadId=n.UploadId,u["encoding-type"]=n.EncodingType,u["max-parts"]=n.MaxParts,u["part-number-marker"]=n.PartNumberMarker,le.call(this,{Action:"name/cos:ListParts",method:"GET",Bucket:n.Bucket,Region:n.Region,Key:n.Key,headers:n.Headers,qs:u},function(x,b){if(x)return p&&p.parent&&p.parent.setParams({errorNode:"multipartListPart"}),m(x);var B=b.ListPartsResult||{},j=B.Part||[];j=o.isArray(j)?j:[j],B.Part=j;var te=o.clone(B);o.extend(te,{statusCode:b.statusCode,headers:b.headers}),m(null,te)})}function Xe(n,m){var u={};u.uploadId=n.UploadId,le.call(this,{Action:"name/cos:AbortMultipartUpload",method:"DELETE",Bucket:n.Bucket,Region:n.Region,Key:n.Key,headers:n.Headers,qs:u},function(p,x){if(p)return m(p);m(null,{statusCode:x.statusCode,headers:x.headers})})}function rt(n,m){le.call(this,{method:n.Method,Bucket:n.Bucket,Region:n.Region,Key:n.Key,action:n.Action,headers:n.Headers,qs:n.Query,body:n.Body,Url:n.Url,rawBody:n.RawBody,DataType:n.DataType},function(u,p){if(u)return m(u);p&&p.body&&(p.Body=p.body,delete p.body),m(u,p)})}function et(n,m){var u=n.Headers;!u["Cache-Control"]&&!u["cache-control"]&&(u["Cache-Control"]=""),!u["Content-Type"]&&!u["content-type"]&&(u["Content-Type"]=n.Body&&n.Body.type||""),le.call(this,{Action:"name/cos:AppendObject",method:"POST",Bucket:n.Bucket,Region:n.Region,action:"append",Key:n.Key,body:n.Body,qs:{position:n.Position},headers:n.Headers},function(p,x){if(p)return m(p);m(null,x)})}function nt(n){var m=this;return o.getAuth({SecretId:n.SecretId||this.options.SecretId||"",SecretKey:n.SecretKey||this.options.SecretKey||"",Bucket:n.Bucket,Region:n.Region,Method:n.Method,Key:n.Key,Query:n.Query,Headers:n.Headers,Expires:n.Expires,UseRawKey:m.options.UseRawKey,SystemClockOffset:m.options.SystemClockOffset})}function f(n,m){var u=this,p=n.UseAccelerate===void 0?u.options.UseAccelerate:n.UseAccelerate,x=K({ForcePathStyle:u.options.ForcePathStyle,protocol:n.Protocol||u.options.Protocol,domain:n.Domain||u.options.Domain,bucket:n.Bucket,region:p?"accelerate":n.Region,object:n.Key}),b="";n.Query&&(b+=o.obj2str(n.Query)),n.QueryString&&(b+=(b?"&":"")+n.QueryString);var B=x;if(n.Sign!==void 0&&!n.Sign)return b&&(B+="?"+b),m(null,{Url:B}),B;var j=fe.call(this,{Bucket:n.Bucket,Region:n.Region,UseAccelerate:n.UseAccelerate,Url:x}),te=xe.call(this,{Action:(n.Method||"").toUpperCase()==="PUT"?"name/cos:PutObject":"name/cos:GetObject",Bucket:n.Bucket||"",Region:n.Region||"",Method:n.Method||"get",Key:n.Key,Expires:n.Expires,Headers:n.Headers,Query:n.Query,SignHost:j,ForceSignHost:n.ForceSignHost===!1?!1:u.options.ForceSignHost},function(ke,De){if(m){if(ke){m(ke);return}var Ae=function($e){var ot=$e.match(/q-url-param-list.*?(?=&)/g)[0],it="q-url-param-list="+encodeURIComponent(ot.replace(/q-url-param-list=/,"")).toLowerCase(),Ze=new RegExp(ot,"g"),ut=$e.replace(Ze,it);return ut},Te=x;Te+="?"+(De.Authorization.indexOf("q-signature")>-1?Ae(De.Authorization):"sign="+encodeURIComponent(De.Authorization)),De.SecurityToken&&(Te+="&x-cos-security-token="+De.SecurityToken),De.ClientIP&&(Te+="&clientIP="+De.ClientIP),De.ClientUA&&(Te+="&clientUA="+De.ClientUA),De.Token&&(Te+="&token="+De.Token),b&&(Te+="&"+b),setTimeout(function(){m(null,{Url:Te})})}});return te?(B+="?"+te.Authorization+(te.SecurityToken?"&x-cos-security-token="+te.SecurityToken:""),b&&(B+="&"+b)):b&&(B+="?"+b),B}function v(n){var m={GrantFullControl:[],GrantWrite:[],GrantRead:[],GrantReadAcp:[],GrantWriteAcp:[],ACL:""},u={FULL_CONTROL:"GrantFullControl",WRITE:"GrantWrite",READ:"GrantRead",READ_ACP:"GrantReadAcp",WRITE_ACP:"GrantWriteAcp"},p=n&&n.AccessControlList||{},x=p.Grant;x&&(x=o.isArray(x)?x:[x]);var b={READ:0,WRITE:0,FULL_CONTROL:0};return x&&x.length&&o.each(x,function(B){B.Grantee.ID==="qcs::cam::anyone:anyone"||B.Grantee.URI==="http://cam.qcloud.com/groups/global/AllUsers"?b[B.Permission]=1:B.Grantee.ID!==n.Owner.ID&&m[u[B.Permission]].push('id="'+B.Grantee.ID+'"')}),b.FULL_CONTROL||b.WRITE&&b.READ?m.ACL="public-read-write":b.READ?m.ACL="public-read":m.ACL="private",o.each(u,function(B){m[B]=O(m[B].join(","))}),m}function O(n){var m=n.split(","),u={},p,x;for(p=0;p<m.length;)x=m[p].trim(),u[x]?m.splice(p,1):(u[x]=!0,m[p]=x,p++);return m.join(",")}function K(n){var m=n.region||"",u=n.bucket||"",p=u.substr(0,u.lastIndexOf("-")),x=u.substr(u.lastIndexOf("-")+1),b=n.domain,B=n.object;typeof b=="function"&&(b=b({Bucket:u,Region:m})),["http","https"].includes(n.protocol)&&(n.protocol=n.protocol+":");var j=n.protocol||(o.isBrowser&&(typeof location>"u"?"undefined":t(location))==="object"&&location.protocol==="http:"?"http:":"https:");b||(["cn-south","cn-south-2","cn-north","cn-east","cn-southwest","sg"].indexOf(m)>-1?b="{Region}.myqcloud.com":b="cos.{Region}.myqcloud.com",n.ForcePathStyle||(b="{Bucket}."+b)),b=b.replace(/\{\{AppId\}\}/gi,x).replace(/\{\{Bucket\}\}/gi,p).replace(/\{\{Region\}\}/gi,m).replace(/\{\{.*?\}\}/gi,""),b=b.replace(/\{AppId\}/gi,x).replace(/\{BucketName\}/gi,p).replace(/\{Bucket\}/gi,u).replace(/\{Region\}/gi,m).replace(/\{.*?\}/gi,""),/^[a-zA-Z]+:\/\//.test(b)||(b=j+"//"+b),b.slice(-1)==="/"&&(b=b.slice(0,-1));var te=b;return n.ForcePathStyle&&(te+="/"+u),te+="/",B&&(te+=o.camSafeUrlEncode(B).replace(/%2F/g,"/")),n.isLocation&&(te=te.replace(/^https?:\/\//,"")),te}var fe=function(m){if(!m.Bucket||!m.Region)return"";var u=m.UseAccelerate===void 0?this.options.UseAccelerate:m.UseAccelerate,p=m.Url||K({ForcePathStyle:this.options.ForcePathStyle,protocol:this.options.Protocol,domain:this.options.Domain,bucket:m.Bucket,region:u?"accelerate":m.Region}),x=p.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1"),b=new RegExp("^([a-z\\d-]+-\\d+\\.)?(cos|cosv6|ci|pic)\\.([a-z\\d-]+)\\.myqcloud\\.com$");return b.test(x)?x:""};function xe(n,m){var u=o.clone(n.Headers),p="";o.each(u,function(Ne,Oe){(Ne===""||["content-type","cache-control","expires"].indexOf(Oe.toLowerCase())>-1)&&delete u[Oe],Oe.toLowerCase()==="host"&&(p=Ne)});var x=n.ForceSignHost!==!1;!p&&n.SignHost&&x&&(u.Host=n.SignHost);var b=!1,B=function(Oe,je){b||(b=!0,je&&je.XCosSecurityToken&&!je.SecurityToken&&(je=o.clone(je),je.SecurityToken=je.XCosSecurityToken,delete je.XCosSecurityToken),m&&m(Oe,je))},j=this,te=n.Bucket||"",ke=n.Region||"",De=n.Key||"";j.options.ForcePathStyle&&te&&(De=te+"/"+De);var Ae="/"+De,Te={},He=n.Scope;if(!He){var $e=n.Action||"",ot=n.ResourceKey||n.Key||"";He=n.Scope||[{action:$e,bucket:te,region:ke,prefix:ot}]}var it=o.md5(JSON.stringify(He));j._StsCache=j._StsCache||[],function(){var Ne,Oe;for(Ne=j._StsCache.length-1;Ne>=0;Ne--){Oe=j._StsCache[Ne];var je=Math.round(o.getSkewTime(j.options.SystemClockOffset)/1e3)+30;if(Oe.StartTime&&je<Oe.StartTime||je>=Oe.ExpiredTime){j._StsCache.splice(Ne,1);continue}if(!Oe.ScopeLimit||Oe.ScopeLimit&&Oe.ScopeKey===it){Te=Oe;break}}}();var Ze=function(){var Oe="";Te.StartTime&&n.Expires?Oe=Te.StartTime+";"+(Te.StartTime+n.Expires*1):Te.StartTime&&Te.ExpiredTime&&(Oe=Te.StartTime+";"+Te.ExpiredTime);var je=o.getAuth({SecretId:Te.TmpSecretId,SecretKey:Te.TmpSecretKey,Method:n.Method,Pathname:Ae,Query:n.Query,Headers:u,Expires:n.Expires,UseRawKey:j.options.UseRawKey,SystemClockOffset:j.options.SystemClockOffset,KeyTime:Oe,ForceSignHost:x}),qe={Authorization:je,SecurityToken:Te.SecurityToken||Te.XCosSecurityToken||"",Token:Te.Token||"",ClientIP:Te.ClientIP||"",ClientUA:Te.ClientUA||""};B(null,qe)},ut=function(Oe){if(Oe.Authorization){var je=!1,qe=Oe.Authorization;if(qe)if(qe.indexOf(" ")>-1)je=!1;else if(qe.indexOf("q-sign-algorithm=")>-1&&qe.indexOf("q-ak=")>-1&&qe.indexOf("q-sign-time=")>-1&&qe.indexOf("q-key-time=")>-1&&qe.indexOf("q-url-param-list=")>-1)je=!0;else try{qe=atob(qe),qe.indexOf("a=")>-1&&qe.indexOf("k=")>-1&&qe.indexOf("t=")>-1&&qe.indexOf("r=")>-1&&qe.indexOf("b=")>-1&&(je=!0)}catch(tt){}if(!je)return o.error(new Error("getAuthorization callback params format error"))}else{if(!Oe.TmpSecretId)return o.error(new Error('getAuthorization callback params missing "TmpSecretId"'));if(!Oe.TmpSecretKey)return o.error(new Error('getAuthorization callback params missing "TmpSecretKey"'));if(!Oe.SecurityToken&&!Oe.XCosSecurityToken)return o.error(new Error('getAuthorization callback params missing "SecurityToken"'));if(!Oe.ExpiredTime)return o.error(new Error('getAuthorization callback params missing "ExpiredTime"'));if(Oe.ExpiredTime&&Oe.ExpiredTime.toString().length!==10)return o.error(new Error('getAuthorization callback params "ExpiredTime" should be 10 digits'));if(Oe.StartTime&&Oe.StartTime.toString().length!==10)return o.error(new Error('getAuthorization callback params "StartTime" should be 10 StartTime'))}return!1};if(Te.ExpiredTime&&Te.ExpiredTime-o.getSkewTime(j.options.SystemClockOffset)/1e3>60)Ze();else if(j.options.getAuthorization)j.options.getAuthorization.call(j,{Bucket:te,Region:ke,Method:n.Method,Key:De,Pathname:Ae,Query:n.Query,Headers:u,Scope:He,SystemClockOffset:j.options.SystemClockOffset,ForceSignHost:x},function(Ne){typeof Ne=="string"&&(Ne={Authorization:Ne});var Oe=ut(Ne);if(Oe)return B(Oe);Ne.Authorization?B(null,Ne):(Te=Ne||{},Te.Scope=He,Te.ScopeKey=it,j._StsCache.push(Te),Ze())});else if(j.options.getSTS)j.options.getSTS.call(j,{Bucket:te,Region:ke},function(Ne){Te=Ne||{},Te.Scope=He,Te.ScopeKey=it,Te.TmpSecretId||(Te.TmpSecretId=Te.SecretId),Te.TmpSecretKey||(Te.TmpSecretKey=Te.SecretKey);var Oe=ut(Te);if(Oe)return B(Oe);j._StsCache.push(Te),Ze()});else return function(){var Ne=o.getAuth({SecretId:n.SecretId||j.options.SecretId,SecretKey:n.SecretKey||j.options.SecretKey,Method:n.Method,Pathname:Ae,Query:n.Query,Headers:u,Expires:n.Expires,UseRawKey:j.options.UseRawKey,SystemClockOffset:j.options.SystemClockOffset,ForceSignHost:x}),Oe={Authorization:Ne,SecurityToken:j.options.SecurityToken||j.options.XCosSecurityToken};return B(null,Oe),Oe}();return""}function Me(n){var m=!1,u=!1,p=n.headers&&(n.headers.date||n.headers.Date)||n.error&&n.error.ServerTime;try{var x=n.error.Code,b=n.error.Message;(x==="RequestTimeTooSkewed"||x==="AccessDenied"&&b==="Request has expired")&&(u=!0)}catch(j){}if(n)if(u&&p){var B=Date.parse(p);this.options.CorrectClockSkew&&Math.abs(o.getSkewTime(this.options.SystemClockOffset)-B)>=3e4&&(console.error("error: Local time is too skewed."),this.options.SystemClockOffset=B-Date.now(),m=!0)}else Math.floor(n.statusCode/100)===5&&(m=!0);return m}function le(n,m){var u=this;!n.headers&&(n.headers={}),!n.qs&&(n.qs={}),n.VersionId&&(n.qs.versionId=n.VersionId),n.qs=o.clearKey(n.qs),n.headers&&(n.headers=o.clearKey(n.headers)),n.qs&&(n.qs=o.clearKey(n.qs));var p=o.clone(n.qs);n.action&&(p[n.action]="");var x=n.url||n.Url,b=n.SignHost||fe.call(this,{Bucket:n.Bucket,Region:n.Region,Url:x}),B=n.tracker,j=function te(ke){var De=u.options.SystemClockOffset;B&&B.setParams({signStartTime:new Date().getTime(),retryTimes:ke-1}),xe.call(u,{Bucket:n.Bucket||"",Region:n.Region||"",Method:n.method,Key:n.Key,Query:p,Headers:n.headers,SignHost:b,Action:n.Action,ResourceKey:n.ResourceKey,Scope:n.Scope,ForceSignHost:u.options.ForceSignHost},function(Ae,Te){if(Ae){m(Ae);return}B&&B.setParams({signEndTime:new Date().getTime(),httpStartTime:new Date().getTime()}),n.AuthData=Te,Ye.call(u,n,function(He,$e){B&&B.setParams({httpEndTime:new Date().getTime()}),He&&ke<2&&(De!==u.options.SystemClockOffset||Me.call(u,He))?(n.headers&&(delete n.headers.Authorization,delete n.headers.token,delete n.headers.clientIP,delete n.headers.clientUA,n.headers["x-cos-security-token"]&&delete n.headers["x-cos-security-token"],n.headers["x-ci-security-token"]&&delete n.headers["x-ci-security-token"]),te(ke+1)):m(He,$e)})})};j(1)}function Ye(n,m){var u=this,p=n.TaskId;if(!(p&&!u._isRunningTask(p))){var x=n.Bucket,b=n.Region,B=n.Key,j=n.method||"GET",te=n.Url||n.url,ke=n.body,De=n.rawBody;u.options.UseAccelerate&&(b="accelerate"),te=te||K({ForcePathStyle:u.options.ForcePathStyle,protocol:u.options.Protocol,domain:u.options.Domain,bucket:x,region:b,object:B}),n.action&&(te=te+"?"+(o.isIOS_QQ?"".concat(n.action,"="):n.action)),n.qsStr&&(te.indexOf("?")>-1?te=te+"&"+n.qsStr:te=te+"?"+n.qsStr);var Ae={method:j,url:te,headers:n.headers,qs:n.qs,body:ke},Te="x-cos-security-token";if(o.isCIHost(te)&&(Te="x-ci-security-token"),Ae.headers.Authorization=n.AuthData.Authorization,n.AuthData.Token&&(Ae.headers.token=n.AuthData.Token),n.AuthData.ClientIP&&(Ae.headers.clientIP=n.AuthData.ClientIP),n.AuthData.ClientUA&&(Ae.headers.clientUA=n.AuthData.ClientUA),n.AuthData.SecurityToken&&(Ae.headers[Te]=n.AuthData.SecurityToken),Ae.headers&&(Ae.headers=o.clearKey(Ae.headers)),Ae=o.clearKey(Ae),n.onProgress&&typeof n.onProgress=="function"){var He=ke&&(ke.size||ke.length)||0;Ae.onProgress=function(Ne){if(!(p&&!u._isRunningTask(p))){var Oe=Ne?Ne.loaded:0;n.onProgress({loaded:Oe,total:He})}}}n.onDownloadProgress&&(Ae.onDownloadProgress=n.onDownloadProgress),n.DataType&&(Ae.dataType=n.DataType),this.options.Timeout&&(Ae.timeout=this.options.Timeout),u.options.ForcePathStyle&&(Ae.pathStyle=u.options.ForcePathStyle),u.emit("before-send",Ae);var $e=Ae.url.includes("accelerate."),ot=Ae.qs?Object.keys(Ae.qs).map(function(Ne){return"".concat(Ne,"=").concat(Ae.qs[Ne])}).join("&"):"",it=ot?Ae.url+"?"+ot:Ae.url;n.tracker&&n.tracker.setParams({reqUrl:it,accelerate:$e?"Y":"N"}),n.tracker&&n.tracker.parent&&n.tracker.parent.setParams({reqUrl:it,accelerate:$e?"Y":"N"});var Ze=(u.options.Request||l)(Ae,function(Ne){if(!(Ne&&Ne.error==="abort")){var Oe={options:Ae,error:Ne&&Ne.error,statusCode:Ne&&Ne.statusCode||0,statusMessage:Ne&&Ne.statusMessage||"",headers:Ne&&Ne.headers||{},body:Ne&&Ne.body};u.emit("after-receive",Oe);var je=Oe.error,qe=Oe.body,tt={statusCode:Oe.statusCode,statusMessage:Oe.statusMessage,headers:Oe.headers},pt,at=function(dt,ht){if(p&&u.off("inner-kill-task",ut),!pt){pt=!0;var ft={};tt&&tt.statusCode&&(ft.statusCode=tt.statusCode),tt&&tt.headers&&(ft.headers=tt.headers),dt?(dt=o.extend(dt||{},ft),m(dt,null)):(ht=o.extend(ht||{},ft),m(null,ht)),Ze=null}};if(je)return at(o.error(je));var ct=tt.statusCode,gt=Math.floor(ct/100)===2;if(De&&gt)return at(null,{body:qe});var st;try{st=qe&&qe.indexOf("<")>-1&&qe.indexOf(">")>-1&&o.xml2json(qe)||{}}catch(vt){st={}}var lt=st&&st.Error;gt?at(null,st):lt?at(o.error(new Error(lt.Message),{code:lt.Code,error:lt})):ct?at(o.error(new Error(tt.statusMessage),{code:""+ct})):ct&&at(o.error(new Error("statusCode error")))}}),ut=function Ne(Oe){Oe.TaskId===p&&(Ze&&Ze.abort&&Ze.abort(),u.off("inner-kill-task",Ne))};p&&u.on("inner-kill-task",ut)}}var Qe={getService:s,putBucket:E,headBucket:w,getBucket:S,deleteBucket:A,putBucketAcl:T,getBucketAcl:_,putBucketCors:q,getBucketCors:P,deleteBucketCors:L,getBucketLocation:Y,getBucketPolicy:ne,putBucketPolicy:G,deleteBucketPolicy:I,putBucketTagging:D,getBucketTagging:C,deleteBucketTagging:k,putBucketLifecycle:g,getBucketLifecycle:F,deleteBucketLifecycle:H,putBucketVersioning:U,getBucketVersioning:z,putBucketReplication:R,getBucketReplication:V,deleteBucketReplication:X,putBucketWebsite:W,getBucketWebsite:J,deleteBucketWebsite:ie,putBucketReferer:se,getBucketReferer:oe,putBucketDomain:ee,getBucketDomain:ce,deleteBucketDomain:ae,putBucketOrigin:pe,getBucketOrigin:Z,deleteBucketOrigin:re,putBucketLogging:ge,getBucketLogging:ye,putBucketInventory:me,postBucketInventory:Ce,getBucketInventory:Ee,listBucketInventory:be,deleteBucketInventory:Be,putBucketAccelerate:we,getBucketAccelerate:_e,putBucketEncryption:Ue,getBucketEncryption:Pe,deleteBucketEncryption:ue,getObject:a,headObject:h,listObjectVersions:c,putObject:d,deleteObject:y,getObjectAcl:N,putObjectAcl:M,optionsObject:Q,putObjectCopy:de,deleteMultipleObject:$,restoreObject:Se,putObjectTagging:Ie,getObjectTagging:Fe,deleteObjectTagging:Re,selectObjectContent:Le,appendObject:et,uploadPartCopy:he,multipartInit:Ve,multipartUpload:Ke,multipartComplete:We,multipartList:ze,multipartListPart:Ge,multipartAbort:Xe,request:rt,getObjectUrl:f,getAuth:nt};function Je(n,m,u){o.each(["Cors","Acl"],function(p){if(n.slice(-p.length)===p){var x=n.slice(0,-p.length)+p.toUpperCase(),b=o.apiWrapper(n,m),B=!1;u[x]=function(){!B&&console.warn("warning: cos."+x+" has been deprecated. Please Use cos."+n+" instead."),B=!0,b.apply(this,arguments)}}})}i.exports.init=function(n,m){m.transferToTaskMethod(Qe,"putObject"),o.each(Qe,function(u,p){n.prototype[p]=o.apiWrapper(p,u),Je(p,u,n.prototype)})}},"./src/cos.js":function(i,r,e){var t=e("./src/util.js"),l=e("./src/event.js"),o=e("./src/task.js"),s=e("./src/base.js"),E=e("./src/advance.js"),w=e("./package.json"),S={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:""},A=function(_){this.options=t.extend(t.clone(S),_||{}),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格式错误,请检查"),console.error("error: SecretId format is incorrect. Please check")),this.options.SecretKey&&this.options.SecretKey.indexOf(" ")>-1&&(console.error("error: SecretKey格式错误,请检查"),console.error("error: SecretKey format is incorrect. Please check")),t.isNode()&&(console.warn("warning: cos-js-sdk-v5 不支持 nodejs 环境使用,请改用 cos-nodejs-sdk-v5,参考文档: 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")),l.init(this),o.init(this)};s.init(A,o),E.init(A,o),A.util={md5:t.md5,xml2json:t.xml2json,json2xml:t.json2xml,encodeBase64:t.encodeBase64},A.getAuthorization=t.getAuth,A.version=w.version,i.exports=A},"./src/event.js":function(i,r){var e=function(o){var s={},E=function(S){return!s[S]&&(s[S]=[]),s[S]};o.on=function(w,S){w==="task-list-update"&&console.warn('warning: Event "'+w+'" has been deprecated. Please use "list-update" instead.'),E(w).push(S)},o.off=function(w,S){for(var A=E(w),T=A.length-1;T>=0;T--)S===A[T]&&A.splice(T,1)},o.emit=function(w,S){for(var A=E(w).map(function(_){return _}),T=0;T<A.length;T++)A[T](S)}},t=function(){e(this)};i.exports.init=e,i.exports.EventProxy=t},"./src/session.js":function(i,r,e){var t=e("./src/util.js"),l="cos_sdk_upload_cache",o=30*24*3600,s,E,w=function(){try{var P=JSON.parse(localStorage.getItem(l))}catch(L){}P||(P=[]),s=P},S=function(){try{s.length?localStorage.setItem(l,JSON.stringify(s)):localStorage.removeItem(l)}catch(P){}},A=function(){if(!s){w.call(this);for(var P=!1,L=Math.round(Date.now()/1e3),Y=s.length-1;Y>=0;Y--){var G=s[Y][2];(!G||G+o<L)&&(s.splice(Y,1),P=!0)}P&&S()}},T=function(){E||(E=setTimeout(function(){S(),E=null},400))},_={using:{},setUsing:function(P){_.using[P]=!0},removeUsing:function(P){delete _.using[P]},getFileId:function(P,L,Y,G){return P.name&&P.size&&P.lastModifiedDate&&L?t.md5([P.name,P.size,P.lastModifiedDate,L,Y,G].join("::")):null},getCopyFileId:function(P,L,Y,G,ne){var I=L["content-length"],D=L.etag||"",C=L["last-modified"];return P&&Y?t.md5([P,I,D,C,Y,G,ne].join("::")):null},getUploadIdList:function(P){if(!P)return null;A.call(this);for(var L=[],Y=0;Y<s.length;Y++)s[Y][0]===P&&L.push(s[Y][1]);return L.length?L:null},saveUploadId:function(P,L,Y){if(A.call(this),!!P){for(var G=s.length-1;G>=0;G--){var ne=s[G];ne[0]===P&&ne[1]===L&&s.splice(G,1)}s.unshift([P,L,Math.round(Date.now()/1e3)]),s.length>Y&&s.splice(Y),T()}},removeUploadId:function(P){A.call(this),delete _.using[P];for(var L=s.length-1;L>=0;L--)s[L][1]===P&&s.splice(L,1);T()}};i.exports=_},"./src/task.js":function(i,r,e){var t=e("./src/session.js"),l=e("./src/util.js"),o={},s=function(S,A){o[A]=S[A],S[A]=function(T,_){T.SkipTask?o[A].call(this,T,_):this._addTask(A,T,_)}},E=function(S){var A=[],T={},_=0,q=0,P=function(C){var k={id:C.id,Bucket:C.Bucket,Region:C.Region,Key:C.Key,FilePath:C.FilePath,state:C.state,loaded:C.loaded,size:C.size,speed:C.speed,percent:C.percent,hashPercent:C.hashPercent,error:C.error};return C.FilePath&&(k.FilePath=C.FilePath),C._custom&&(k._custom=C._custom),k},L=function(){var D,C=function(){D=0,S.emit("task-list-update",{list:l.map(A,P)}),S.emit("list-update",{list:l.map(A,P)})};return function(){D||(D=setTimeout(C))}}(),Y=function(){if(!(A.length<=S.options.UploadQueueSize)){for(var C=0;C<q&&C<A.length&&A.length>S.options.UploadQueueSize;){var k=A[C].state==="waiting"||A[C].state==="checking"||A[C].state==="uploading";!A[C]||!k?(T[A[C].id]&&delete T[A[C].id],A.splice(C,1),q--):C++}L()}},G=function D(){if(!(_>=S.options.FileParallelLimit)){for(;A[q]&&A[q].state!=="waiting";)q++;if(!(q>=A.length)){var C=A[q];q++,_++,C.state="checking",C.params.onTaskStart&&C.params.onTaskStart(P(C)),!C.params.UploadData&&(C.params.UploadData={});var k=l.formatParams(C.api,C.params);o[C.api].call(S,k,function(g,F){S._isRunningTask(C.id)&&((C.state==="checking"||C.state==="uploading")&&(C.state=g?"error":"success",g&&(C.error=g),_--,L(),D(),C.callback&&C.callback(g,F),C.state==="success"&&(C.params&&(delete C.params.UploadData,delete C.params.Body,delete C.params),delete C.callback)),Y())}),L(),setTimeout(D)}}},ne=function(C,k){var g=T[C];if(g){var F=g&&g.state==="waiting",H=g&&(g.state==="checking"||g.state==="uploading");if(k==="canceled"&&g.state!=="canceled"||k==="paused"&&F||k==="paused"&&H){if(k==="paused"&&g.params.Body&&typeof g.params.Body.pipe=="function"){console.error("stream not support pause");return}g.state=k,S.emit("inner-kill-task",{TaskId:C,toState:k});try{var U=g&&g.params&&g.params.UploadData.UploadId}catch(z){}k==="canceled"&&U&&t.removeUsing(U),L(),H&&(_--,G()),k==="canceled"&&(g.params&&(delete g.params.UploadData,delete g.params.Body,delete g.params),delete g.callback)}Y()}};S._addTasks=function(D){l.each(D,function(C){S._addTask(C.api,C.params,C.callback,!0)}),L()};var I=!0;S._addTask=function(D,C,k,g){C=l.formatParams(D,C);var F=l.uuid();C.TaskId=F,C.onTaskReady&&C.onTaskReady(F),C.TaskReady&&(C.TaskReady(F),I&&console.warn('warning: Param "TaskReady" has been deprecated. Please use "onTaskReady" instead.'),I=!1);var H={params:C,callback:k,api:D,index:A.length,id:F,Bucket:C.Bucket,Region:C.Region,Key:C.Key,FilePath:C.FilePath||"",state:"waiting",loaded:0,size:0,speed:0,percent:0,hashPercent:0,error:null,_custom:C._custom},U=C.onHashProgress;C.onHashProgress=function(R){S._isRunningTask(H.id)&&(H.hashPercent=R.percent,U&&U(R),L())};var z=C.onProgress;return C.onProgress=function(R){S._isRunningTask(H.id)&&(H.state==="checking"&&(H.state="uploading"),H.loaded=R.loaded,H.speed=R.speed,H.percent=R.percent,z&&z(R),L())},l.getFileSize(D,C,function(R,V){if(R)return k(l.error(R));T[F]=H,A.push(H),H.size=V,!g&&L(),G(),Y()}),F},S._isRunningTask=function(D){var C=T[D];return!!(C&&(C.state==="checking"||C.state==="uploading"))},S.getTaskList=function(){return l.map(A,P)},S.cancelTask=function(D){ne(D,"canceled")},S.pauseTask=function(D){ne(D,"paused")},S.restartTask=function(D){var C=T[D];C&&(C.state==="paused"||C.state==="error")&&(C.state="waiting",L(),q=Math.min(q,C.index),G())},S.isUploadRunning=function(){return _||q<A.length}};i.exports.transferToTaskMethod=s,i.exports.init=E},"./src/tracker.js":function(i,r,e){var t=e("./node_modules/@babel/runtime/helpers/classCallCheck.js"),l=e("./node_modules/@babel/runtime/helpers/createClass.js"),o=e("./node_modules/@babel/runtime/helpers/typeof.js"),s=e("./package.json"),E=null,w=function(D){if(!E){var C=e("./lib/beacon.min.js");E=new C({appkey:"0AND0VEVB24UBGDU",versionCode:s.version,channelID:"js_sdk",openid:"openid",unionid:"unid",strictMode:!1,delay:D,sessionDuration:60*1e3})}return E},S={getUid:function(){var D=function(){return((1+Math.random())*65536|0).toString(16).substring(1)};return D()+D()+"-"+D()+"-"+D()+"-"+D()+"-"+D()+D()+D()},getNetType:function(){if((typeof navigator>"u"?"undefined":o(navigator))==="object"){var D=navigator.connection||navigator.mozConnection||navigator.webkitConnection;return(D==null?void 0:D.type)||(D==null?void 0:D.effectiveType)||"unknown"}return"unknown"},getOsType:function(){if((typeof navigator>"u"?"undefined":o(navigator))!=="object")return"unknown os";var D=navigator.userAgent.toLowerCase(),C=/macintosh|mac os x/i.test(navigator.userAgent);return D.indexOf("win32")>=0||D.indexOf("wow32")>=0?"win32":D.indexOf("win64")>=0||D.indexOf("wow64")>=0?"win64":C?"mac":"unknown os"},isMobile:function(){var D=/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i;return!!((typeof navigator>"u"?"undefined":o(navigator))==="object"&&navigator.userAgent.match(D))},isAndroid:function(){var D=/(Android|Adr|Linux)/i;return!!((typeof navigator>"u"?"undefined":o(navigator))==="object"&&navigator.userAgent.match(D))},isIOS:function(){var D=/(iPhone|iPod|iPad|iOS)/i;return!!((typeof navigator>"u"?"undefined":o(navigator))==="object"&&navigator.userAgent.match(D))},isOtherMobile:function(){return isMobile&&!isAndroid&&!isIOS},getDeviceName:function(){if((typeof navigator>"u"?"undefined":o(navigator))!=="object")return"unknown device";var D=navigator.userAgent.toLowerCase();if(D.includes("app/tencent_wemeet"))return"tencent_wemeet";if(D.indexOf("maxthon")>=0){var C=D.match(/maxthon\/([\d.]+)/),k=C&&C[1]||"";return"傲游浏览器 ".concat(k).trim()}if(D.indexOf("qqbrowser")>=0){var g=D.match(/qqbrowser\/([\d.]+)/),F=g&&g[1]||"";return"QQ浏览器 ".concat(F).trim()}if(D.indexOf("se 2.x")>=0)return"搜狗浏览器";if(D.indexOf("wxwork")>=0)return"微信内置浏览器";if(D.indexOf("msie")>=0){var H=D.match(/msie ([\d.]+)/),U=H&&H[1]||"";return"IE ".concat(U).trim()}if(D.indexOf("firefox")>=0){var z=D.match(/firefox\/([\d.]+)/),R=z&&z[1]||"";return"Firefox ".concat(R).trim()}if(D.indexOf("chrome")>=0){var V=D.match(/chrome\/([\d.]+)/),X=V&&V[1]||"";return"Chrome ".concat(X).trim()}if(D.indexOf("opera")>=0){var W=D.match(/opera.([\d.]+)/),J=W&&W[1]||"";return"Opera ".concat(J).trim()}if(D.indexOf("safari")>=0){var ie=D.match(/version\/([\d.]+)/),se=ie&&ie[1]||"";return"Safari ".concat(se).trim()}if(D.indexOf("edge")>=0){var oe=D.match(/edge\/([\d.]+)/),ee=oe&&oe[1]||"";return"edge ".concat(ee).trim()}return D.substr(0,200)}},A={isMobile:S.isMobile(),isBrowser:!S.isMobile(),mobileOsType:S.isAndroid()?"android":S.isIOS?"ios":"other_mobile",pcOsType:S.getOsType()},T={deviceType:A.isMobile?"mobile":A.isBrowser?"browser":"unknown",devicePlatform:A.isMobile?A.mobileOsType:A.pcOsType,deviceName:S.getDeviceName()},_=["multipartInit","multipartUpload","multipartComplete","multipartList","multipartListPart","multipartAbort"],q=["putObject","postObject","appendObject","sliceUploadFile","uploadFile","uploadFiles"].concat(_),P=["getObject"];function L(I){return q.includes(I)?"cos_upload":P.includes(I)?"cos_download":"base_service"}function Y(I){return I.replace(/([A-Z])/g,"_$1").toLowerCase()}function G(I){var D={},C=["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=I.result==="Success"?k:C;for(var F in I)if(g.includes(F)){var H=Y(F);D[H]=I[F]}return D}var ne=function(){function I(D){t(this,I);var C=D.parent,k=D.traceId,g=D.bucket,F=D.region,H=D.apiName,U=D.fileKey,z=D.fileSize,R=D.accelerate,V=D.customId,X=D.delay,W=D.deepTracker,J=g&&g.substr(g.lastIndexOf("-")+1)||"";this.parent=C,this.deepTracker=W,this.delay=X,this.params={cossdkVersion:s.version,region:F,networkType:"",host:"",accelerate:R?"Y":"N",requestPath:U||"",size:z||-1,httpMd5:0,httpSign:0,httpFull:0,name:H||"",result:"",tookTime:0,errorNode:"",errorCode:"",errorMessage:"",errorRequestId:"",errorStatusCode:0,errorServiceName:"",tracePlatform:"cos-js-sdk-v5",traceId:k||S.getUid(),bucket:g,appid:J,partNumber:0,retryTimes:0,reqUrl:"",customId:V||"",deviceType:T.deviceType,devicePlatform:T.devicePlatform,deviceName:T.deviceName,md5StartTime:0,md5EndTime:0,signStartTime:0,signEndTime:0,httpStartTime:0,httpEndTime:0,startTime:new Date().getTime(),endTime:0},this.beacon=w(X)}return l(I,[{key:"formatResult",value:function(C,k){var g,F,H,U,z,R,V=new Date().getTime(),X=V-this.params.startTime,W=S.getNetType(),J=C?(C==null?void 0:C.code)||(C==null||(g=C.error)===null||g===void 0?void 0:g.code)||(C==null||(F=C.error)===null||F===void 0?void 0:F.Code):"",ie=C?(C==null?void 0:C.message)||(C==null||(H=C.error)===null||H===void 0?void 0:H.message)||(C==null||(U=C.error)===null||U===void 0?void 0:U.Message):"",se=C?(C==null?void 0:C.resource)||(C==null||(z=C.error)===null||z===void 0?void 0:z.resource)||(C==null||(R=C.error)===null||R===void 0?void 0:R.Resource):"",oe=C?C==null?void 0:C.statusCode:k.statusCode,ee=C?(C==null?void 0:C.headers)&&(C==null?void 0:C.headers["x-cos-request-id"]):(k==null?void 0:k.headers)&&(k==null?void 0:k.headers["x-cos-request-id"]),ce=C?ee?"Server":"Client":"";if(Object.assign(this.params,{tookTime:X,networkType:W,httpMd5:this.params.md5EndTime-this.params.md5StartTime,httpSign:this.params.signEndTime-this.params.signStartTime,httpFull:this.params.httpEndTime-this.params.httpStartTime,result:C?"Fail":"Success",errorType:ce,errorCode:J,errorStatusCode:oe,errorMessage:ie,errorServiceName:se,errorRequestId:ee}),C&&(!J||!ie)&&(this.params.fullError=C?JSON.stringify(C):""),this.params.name==="getObject"&&(this.params.size=k?k.headers&&k.headers["content-length"]:-1),this.params.reqUrl)try{var ae=/^http(s)?:\/\/(.*?)\//.exec(this.params.reqUrl);this.params.host=ae[2]}catch(pe){this.params.host=this.params.reqUrl}this.sendEvents()}},{key:"setParams",value:function(C){Object.assign(this.params,C)}},{key:"sendEvents",value:function(){if(!(_.includes(this.params.name)&&!this.deepTracker)){var C=L(this.params.name),k=G(this.params);this.beacon||(this.beacon=w(this.delay||5e3)),this.delay===0?this.beacon&&this.beacon.onDirectUserAction(C,k):this.beacon&&this.beacon.onUserAction(C,k)}}},{key:"generateSubTracker",value:function(C){return Object.assign(C,{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 I(C)}}]),I}();i.exports=ne},"./src/util.js":function(i,r,e){(function(t){var l=e("./node_modules/@babel/runtime/helpers/typeof.js"),o=e("./lib/md5.js"),s=e("./lib/crypto.js"),E=e("./lib/xml2json.js"),w=e("./lib/json2xml.js"),S=e("./lib/base64.js"),A=e("./src/tracker.js");function T(ue){return encodeURIComponent(ue).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function _(ue,h){var c=[];for(var a in ue)ue.hasOwnProperty(a)&&c.push(h?T(a).toLowerCase():a);return c.sort(function(d,y){return d=d.toLowerCase(),y=y.toLowerCase(),d===y?0:d>y?1:-1})}var q=function(h,c){var a,d,y,N=[],M=_(h);for(a=0;a<M.length;a++)d=M[a],y=h[d]===void 0||h[d]===null?"":""+h[d],d=c?T(d).toLowerCase():T(d),y=T(y)||"",N.push(d+"="+y);return N.join("&")},P=["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"],L=function(h){var c={};for(var a in h){var d=a.toLowerCase();(d.indexOf("x-cos-")>-1||P.indexOf(d)>-1)&&(c[a]=h[a])}return c},Y=function(h){h=h||{};var c=h.SecretId,a=h.SecretKey,d=h.KeyTime,y=(h.method||h.Method||"get").toLowerCase(),N=V(h.Query||h.params||{}),M=L(V(h.Headers||h.headers||{})),Q=h.Key||"",de;h.UseRawKey?de=h.Pathname||h.pathname||"/"+Q:(de=h.Pathname||h.pathname||Q,de.indexOf("/")!==0&&(de="/"+de));var he=h.ForceSignHost!==!1;if(!M.Host&&!M.host&&h.Bucket&&h.Region&&he&&(M.Host=h.Bucket+".cos."+h.Region+".myqcloud.com"),!c)throw new Error("missing param SecretId");if(!a)throw new Error("missing param SecretKey");var $=Math.round(me(h.SystemClockOffset)/1e3)-1,Se=$,Ie=h.Expires||h.expires;Ie===void 0?Se+=900:Se+=Ie*1||0;var Fe="sha1",Re=c,Le=d||$+";"+Se,Ve=d||$+";"+Se,Ke=_(M,!0).join(";").toLowerCase(),We=_(N,!0).join(";").toLowerCase(),ze=s.HmacSHA1(Ve,a).toString(),Ge=[y,de,Pe.obj2str(N,!0),Pe.obj2str(M,!0),""].join("\n"),Xe=["sha1",Le,s.SHA1(Ge).toString(),""].join("\n"),rt=s.HmacSHA1(Xe,ze).toString(),et=["q-sign-algorithm="+Fe,"q-ak="+Re,"q-sign-time="+Le,"q-key-time="+Ve,"q-header-list="+Ke,"q-url-param-list="+We,"q-signature="+rt].join("&");return et},G=function(h,c,a){var d=c/8,y=h.slice(a,a+d);return new Uint8Array(y).reverse(),new{8:Uint8Array,16:Uint16Array,32:Uint32Array}[c](y)[0]},ne=function(h,c,a,d){var y=h.slice(c,a),N="";return new Uint8Array(y).forEach(function(M){N+=String.fromCharCode(M)}),d&&(N=decodeURIComponent(escape(N))),N},I=function(h){for(var c={},a=ne(h),d={records:[]};h.byteLength;){var y=G(h,32,0),N=G(h,32,4),M=y-N-16,Q=0,de;for(h=h.slice(12);Q<N;){var he=G(h,8,Q),$=ne(h,Q+1,Q+1+he),Se=G(h,16,Q+he+2),Ie=ne(h,Q+he+4,Q+he+4+Se);c[$]=Ie,Q+=he+4+Se}if(c[":event-type"]==="Records")de=ne(h,Q,Q+M,!0),d.records.push(de);else if(c[":event-type"]==="Stats")de=ne(h,Q,Q+M,!0),d.stats=Pe.xml2json(de).Stats;else if(c[":event-type"]==="error"){var Fe=c[":error-code"],Re=c[":error-message"],Le=new Error(Re);Le.message=Re,Le.name=Le.code=Fe,d.error=Le}h=h.slice(Q+M+4)}return{payload:d.records.join(""),body:a}},D=function(h){var c=this.options.CopySourceParser;if(c)return c(h);var a=h.match(/^([^.]+-\d+)\.cos(v6|-cdc|-cdz|-internal)?\.([^.]+)\.((myqcloud\.com)|(tencentcos\.cn))\/(.+)$/);return a?{Bucket:a[1],Region:a[3],Key:a[7]}:null},C=function(){},k=function(h){var c={};for(var a in h)h.hasOwnProperty(a)&&h[a]!==void 0&&h[a]!==null&&(c[a]=h[a]);return c},g=function(h,c){var a,d=new FileReader;FileReader.prototype.readAsBinaryString?(a=FileReader.prototype.readAsBinaryString,d.onload=function(){c(this.result)}):FileReader.prototype.readAsArrayBuffer?a=function(N){var M="",Q=new FileReader;Q.onload=function(de){for(var he=new Uint8Array(Q.result),$=he.byteLength,Se=0;Se<$;Se++)M+=String.fromCharCode(he[Se]);c(M)},Q.readAsArrayBuffer(N)}:console.error("FileReader not support readAsBinaryString"),a.call(d,h)},F=function(){var ue=function(a,d){a=a.split("."),d=d.split(".");for(var y=0;y<d.length;y++)if(a[y]!==d[y])return parseInt(a[y])>parseInt(d[y])?1:-1;return 0},h=function(a){if(!a)return!1;var d=(a.match(/Chrome\/([.\d]+)/)||[])[1],y=(a.match(/QBCore\/([.\d]+)/)||[])[1],N=(a.match(/QQBrowser\/([.\d]+)/)||[])[1],M=d&&ue(d,"53.0.2785.116")<0&&y&&ue(y,"3.53.991.400")<0&&N&&ue(N,"9.0.2524.400")<=0||!1;return M};return h(typeof navigator<"u"&&navigator.userAgent)}(),H=function(h,c,a,d,y){var N;if(h.slice?N=h.slice(c,a):h.mozSlice?N=h.mozSlice(c,a):h.webkitSlice&&(N=h.webkitSlice(c,a)),d&&F){var M=new FileReader;M.onload=function(Q){N=null,y(new Blob([M.result]))},M.readAsArrayBuffer(N)}else y(N)},U=function(h,c,a,d){a=a||C,h?typeof c=="string"?a(Pe.md5(c,!0)):Blob&&c instanceof Blob?Pe.getFileMd5(c,function(y,N){a(N)},d):a():a()},z=1024*1024,R=function(h,c,a){var d=h.size,y=0,N=o.getCtx(),M=function Q(de){if(de>=d){var he=N.digest("hex");c(null,he);return}var $=Math.min(d,de+z);Pe.fileSlice(h,de,$,!1,function(Se){g(Se,function(Ie){Se=null,N=N.update(Ie,!0),y+=Ie.length,Ie=null,a&&a({loaded:y,total:d,percent:Math.round(y/d*1e4)/1e4}),Q(de+z)})})};M(0)};function V(ue){return ee(ue,function(h){return l(h)==="object"&&h!==null?V(h):h})}function X(ue,h,c){return ue&&h in ue?ue[h]:c}function W(ue,h){return oe(h,function(c,a){ue[a]=h[a]}),ue}function J(ue){return ue instanceof Array}function ie(ue,h){for(var c=!1,a=0;a<ue.length;a++)if(h===ue[a]){c=!0;break}return c}function se(ue){return J(ue)?ue:[ue]}function oe(ue,h){for(var c in ue)ue.hasOwnProperty(c)&&h(ue[c],c)}function ee(ue,h){var c=J(ue)?[]:{};for(var a in ue)ue.hasOwnProperty(a)&&(c[a]=h(ue[a],a));return c}function ce(ue,h){var c=J(ue),a=c?[]:{};for(var d in ue)ue.hasOwnProperty(d)&&h(ue[d],d)&&(c?a.push(ue[d]):a[d]=ue[d]);return a}var ae=function(h){var c,a,d,y="";for(c=0,a=h.length/2;c<a;c++)d=parseInt(h[c*2]+h[c*2+1],16),y+=String.fromCharCode(d);return btoa(y)},pe=function(){var h=function(){return((1+Math.random())*65536|0).toString(16).substring(1)};return h()+h()+"-"+h()+"-"+h()+"-"+h()+"-"+h()+h()+h()},Z=function(h,c){var a=c.Bucket,d=c.Region,y=c.Key,N=this.options.Domain,M=!N||typeof N=="string"&&N.indexOf("{Bucket}")>-1,Q=!N||typeof N=="string"&&N.indexOf("{Region}")>-1;if(h.indexOf("Bucket")>-1||h==="deleteMultipleObject"||h==="multipartList"||h==="listObjectVersions"){if(M&&!a)return"Bucket";if(Q&&!d)return"Region"}else if(h.indexOf("Object")>-1||h.indexOf("multipart")>-1||h==="sliceUploadFile"||h==="abortUploadTask"){if(M&&!a)return"Bucket";if(Q&&!d)return"Region";if(!y)return"Key"}return!1},re=function(h,c){if(c=W({},c),h!=="getAuth"&&h!=="getV4Auth"&&h!=="getObjectUrl"){var a=c.Headers||{};if(c&&l(c)==="object"){(function(){for(var y in c)c.hasOwnProperty(y)&&y.indexOf("x-cos-")>-1&&(a[y]=c[y])})();var d={"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"};Pe.each(d,function(y,N){c[y]!==void 0&&(a[N]=c[y])}),c.Headers=k(a)}}return c},ge=function(h,c){return function(a,d){var y=this;typeof a=="function"&&(d=a,a={}),a=re(h,a);var N;if(y.options.EnableTracker)if(a.calledBySdk==="sliceUploadFile")N=a.tracker&&a.tracker.generateSubTracker({apiName:h});else if(["uploadFile","uploadFiles"].includes(h))N=null;else{var M=-1;a.Body&&(M=typeof a.Body=="string"?a.Body.length:a.Body.size||a.Body.byteLength||-1),N=new A({bucket:a.Bucket,region:a.Region,apiName:h,fileKey:a.Key,fileSize:M,deepTracker:y.options.DeepTracker,customId:y.options.CustomId,delay:y.options.TrackerDelay})}a.tracker=N;var Q=function(Re){return Re&&Re.headers&&(Re.headers["x-cos-request-id"]&&(Re.RequestId=Re.headers["x-cos-request-id"]),Re.headers["x-ci-request-id"]&&(Re.RequestId=Re.headers["x-ci-request-id"]),Re.headers["x-cos-version-id"]&&(Re.VersionId=Re.headers["x-cos-version-id"]),Re.headers["x-cos-delete-marker"]&&(Re.DeleteMarker=Re.headers["x-cos-delete-marker"])),Re},de=function(Re,Le){N&&N.formatResult(Re,Le),d&&d(Q(Re),Q(Le))},he=function(){if(h!=="getService"&&h!=="abortUploadTask"){var Re=Z.call(y,h,a);if(Re)return"missing param "+Re;if(a.Region){if(y.options.CompatibilityMode){if(!/^([a-z\d-.]+)$/.test(a.Region))return"Region format error."}else{if(a.Region.indexOf("cos.")>-1)return'param Region should not be start with "cos."';if(!/^([a-z\d-]+)$/.test(a.Region))return"Region format error."}!y.options.CompatibilityMode&&a.Region.indexOf("-")===-1&&a.Region!=="yfb"&&a.Region!=="default"&&a.Region!=="accelerate"&&console.warn("warning: param Region format error, find help here: https://cloud.tencent.com/document/product/436/6224")}if(a.Bucket){if(!/^([a-z\d-]+)-(\d+)$/.test(a.Bucket))if(a.AppId)a.Bucket=a.Bucket+"-"+a.AppId;else if(y.options.AppId)a.Bucket=a.Bucket+"-"+y.options.AppId;else return'Bucket should format as "test-1250000000".';a.AppId&&(console.warn('warning: AppId has been deprecated, Please put it at the end of parameter Bucket(E.g Bucket:"test-1250000000" ).'),delete a.AppId)}!y.options.UseRawKey&&a.Key&&a.Key.substr(0,1)==="/"&&(a.Key=a.Key.substr(1))}},$=he(),Se=["getAuth","getObjectUrl"].includes(h);if(typeof Promise=="function"&&!Se&&!d)return new Promise(function(Fe,Re){if(d=function(Ve,Ke){Ve?Re(Ve):Fe(Ke)},$)return de(Pe.error(new Error($)));c.call(y,a,de)});if($)return de(Pe.error(new Error($)));var Ie=c.call(y,a,de);if(Se)return Ie}},ye=function(h,c){var a=this,d=0,y=0,N=Date.now(),M,Q;function de(){if(Q=0,c&&typeof c=="function"){M=Date.now();var he=Math.max(0,Math.round((y-d)/((M-N)/1e3)*100)/100)||0,$;y===0&&h===0?$=1:$=Math.floor(y/h*100)/100||0,N=M,d=y;try{c({loaded:y,total:h,speed:he,percent:$})}catch(Se){}}}return function(he,$){if(he&&(y=he.loaded,h=he.total),$)clearTimeout(Q),de();else{if(Q)return;Q=setTimeout(de,a.options.ProgressInterval)}}},ve=function(h,c,a){var d;if(typeof c.Body=="string"?c.Body=new Blob([c.Body],{type:"text/plain"}):c.Body instanceof ArrayBuffer&&(c.Body=new Blob([c.Body])),c.Body&&(c.Body instanceof Blob||c.Body.toString()==="[object File]"||c.Body.toString()==="[object Blob]"))d=c.Body.size;else{a(Pe.error(new Error("params body format error, Only allow File|Blob|String.")));return}c.ContentLength=d,a(null,d)},me=function(h){return Date.now()+(h||0)},Ce=function(h,c){var a=h;return h.message=h.message||null,typeof c=="string"?(h.error=c,h.message=c):l(c)==="object"&&c!==null&&(W(h,c),(c.code||c.name)&&(h.code=c.code||c.name),c.message&&(h.message=c.message),c.stack&&(h.stack=c.stack)),typeof Object.defineProperty=="function"&&(Object.defineProperty(h,"name",{writable:!0,enumerable:!1}),Object.defineProperty(h,"message",{enumerable:!0})),h.name=c&&c.name||h.name||h.code||"Error",h.code||(h.code=h.name),h.error||(h.error=V(a)),h},Ee=function(){return(typeof globalThis>"u"?"undefined":l(globalThis))==="object"&&(globalThis.constructor.name==="DedicatedWorkerGlobalScope"||globalThis.FileReaderSync)},be=function(){return(typeof window>"u"?"undefined":l(window))!=="object"&&(typeof t>"u"?"undefined":l(t))==="object"&&!0&&!Ee()},Be=function(h){return/^https?:\/\/([^/]+\.)?ci\.[^/]+/.test(h)},we=function(){if((typeof navigator>"u"?"undefined":l(navigator))!=="object")return!1;var ue=navigator.userAgent,h=!!ue.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);return h}(),_e=function(){return(typeof navigator>"u"?"undefined":l(navigator))!=="object"?!1:/\sQQ/i.test(navigator.userAgent)}(),Ue=function(h,c){var a=S.encode(h);return c&&(a=a.replaceAll("+","-").replaceAll("/","_").replaceAll("=","")),a},Pe={noop:C,formatParams:re,apiWrapper:ge,xml2json:E,json2xml:w,md5:o,clearKey:k,fileSlice:H,getBodyMd5:U,getFileMd5:R,b64:ae,extend:W,isArray:J,isInArray:ie,makeArray:se,each:oe,map:ee,filter:ce,clone:V,attr:X,uuid:pe,camSafeUrlEncode:T,throttleOnProgress:ye,getFileSize:ve,getSkewTime:me,error:Ce,obj2str:q,getAuth:Y,parseSelectPayload:I,getSourceParams:D,isBrowser:!0,isNode:be,isCIHost:Be,isIOS_QQ:we&&_e,encodeBase64:Ue};i.exports=Pe}).call(this,e("./node_modules/process/browser.js"))}})})})(cosJsSdkV5);var cosJsSdkV5Exports=cosJsSdkV5.exports;const COS=getDefaultExportFromCjs(cosJsSdkV5Exports),ossSwitch="tencent",tencentBucket="daya-online-1303457149",getUploadSign=async i=>{const{bucketName:r,filename:e,postData:t}=i,l=ossSwitch;let o=r,s=e,E={};return o=tencentBucket,s="ktqy/"+e,E={key:"ktqy/"+t.key},request.post("/edu-app/open/getUploadSign",{data:{postData:E,pluginName:l,bucketName:o,filename:s},params:{pluginName:l}})},onFileUpload=({file:i,action:r,data:e,onProgress:t,onFinish:l,onError:o})=>{new COS({Domain:"https://oss.dayaedu.com",Protocol:"https",getAuthorization:async(E,w)=>{w({Authorization:e.signature})}}).uploadFile({Bucket:tencentBucket,Region:"ap-nanjing",Key:"ktqy/".concat(e.name),Body:e.file.file,SliceSize:1024*1024*500,onProgress:function(E){t({percent:Math.ceil((E.percent||0)*100)})}}).then(E=>{var w;((w=E.Location)==null?void 0:w.indexOf("http"))>=0?i.url=E.Location:i.url="https://"+E.Location,l()}).catch(E=>{console.log(E,"error"),o()})},onOnlyFileUpload=async(i,r)=>{{let e="",t=null;if(await new COS({Domain:"https://oss.dayaedu.com",Protocol:"https",getAuthorization:async(o,s)=>{s({Authorization:r.signature})}}).uploadFile({Bucket:tencentBucket,Region:"ap-nanjing",Key:"ktqy/".concat(r.name),Body:r.file,SliceSize:1024*1024*500}).then(o=>{var s;((s=o.Location)==null?void 0:s.indexOf("http"))>=0?e=o.Location:e="https://"+o.Location}).catch(o=>{t=o}),e)return e;throw new Error(t)}};/*!
  2. * Cropper.js v1.6.1
  3. * https://fengyuanchen.github.io/cropperjs
  4. *
  5. * Copyright 2015-present Chen Fengyuan
  6. * Released under the MIT license
  7. *
  8. * Date: 2023-09-17T03:44:19.860Z
  9. */function ownKeys(i,r){var e=Object.keys(i);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(i);r&&(t=t.filter(function(l){return Object.getOwnPropertyDescriptor(i,l).enumerable})),e.push.apply(e,t)}return e}function _objectSpread2(i){for(var r=1;r<arguments.length;r++){var e=arguments[r]!=null?arguments[r]:{};r%2?ownKeys(Object(e),!0).forEach(function(t){_defineProperty(i,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):ownKeys(Object(e)).forEach(function(t){Object.defineProperty(i,t,Object.getOwnPropertyDescriptor(e,t))})}return i}function _typeof(i){"@babel/helpers - typeof";return _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof(i)}function _classCallCheck(i,r){if(!(i instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(i,r){for(var e=0;e<r.length;e++){var t=r[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(i,_toPropertyKey(t.key),t)}}function _createClass(i,r,e){return r&&_defineProperties(i.prototype,r),e&&_defineProperties(i,e),Object.defineProperty(i,"prototype",{writable:!1}),i}function _defineProperty(i,r,e){return r=_toPropertyKey(r),r in i?Object.defineProperty(i,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[r]=e,i}function _toConsumableArray(i){return _arrayWithoutHoles(i)||_iterableToArray(i)||_unsupportedIterableToArray(i)||_nonIterableSpread()}function _arrayWithoutHoles(i){if(Array.isArray(i))return _arrayLikeToArray(i)}function _iterableToArray(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function _unsupportedIterableToArray(i,r){if(i){if(typeof i=="string")return _arrayLikeToArray(i,r);var e=Object.prototype.toString.call(i).slice(8,-1);if(e==="Object"&&i.constructor&&(e=i.constructor.name),e==="Map"||e==="Set")return Array.from(i);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return _arrayLikeToArray(i,r)}}function _arrayLikeToArray(i,r){(r==null||r>i.length)&&(r=i.length);for(var e=0,t=new Array(r);e<r;e++)t[e]=i[e];return t}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _toPrimitive(i,r){if(typeof i!="object"||i===null)return i;var e=i[Symbol.toPrimitive];if(e!==void 0){var t=e.call(i,r||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(i)}function _toPropertyKey(i){var r=_toPrimitive(i,"string");return typeof r=="symbol"?r:String(r)}var IS_BROWSER=typeof window<"u"&&typeof window.document<"u",WINDOW=IS_BROWSER?window:{},IS_TOUCH_DEVICE=IS_BROWSER&&WINDOW.document.documentElement?"ontouchstart"in WINDOW.document.documentElement:!1,HAS_POINTER_EVENT=IS_BROWSER?"PointerEvent"in WINDOW:!1,NAMESPACE="cropper",ACTION_ALL="all",ACTION_CROP="crop",ACTION_MOVE="move",ACTION_ZOOM="zoom",ACTION_EAST="e",ACTION_WEST="w",ACTION_SOUTH="s",ACTION_NORTH="n",ACTION_NORTH_EAST="ne",ACTION_NORTH_WEST="nw",ACTION_SOUTH_EAST="se",ACTION_SOUTH_WEST="sw",CLASS_CROP="".concat(NAMESPACE,"-crop"),CLASS_DISABLED="".concat(NAMESPACE,"-disabled"),CLASS_HIDDEN="".concat(NAMESPACE,"-hidden"),CLASS_HIDE="".concat(NAMESPACE,"-hide"),CLASS_INVISIBLE="".concat(NAMESPACE,"-invisible"),CLASS_MODAL="".concat(NAMESPACE,"-modal"),CLASS_MOVE="".concat(NAMESPACE,"-move"),DATA_ACTION="".concat(NAMESPACE,"Action"),DATA_PREVIEW="".concat(NAMESPACE,"Preview"),DRAG_MODE_CROP="crop",DRAG_MODE_MOVE="move",DRAG_MODE_NONE="none",EVENT_CROP="crop",EVENT_CROP_END="cropend",EVENT_CROP_MOVE="cropmove",EVENT_CROP_START="cropstart",EVENT_DBLCLICK="dblclick",EVENT_TOUCH_START=IS_TOUCH_DEVICE?"touchstart":"mousedown",EVENT_TOUCH_MOVE=IS_TOUCH_DEVICE?"touchmove":"mousemove",EVENT_TOUCH_END=IS_TOUCH_DEVICE?"touchend touchcancel":"mouseup",EVENT_POINTER_DOWN=HAS_POINTER_EVENT?"pointerdown":EVENT_TOUCH_START,EVENT_POINTER_MOVE=HAS_POINTER_EVENT?"pointermove":EVENT_TOUCH_MOVE,EVENT_POINTER_UP=HAS_POINTER_EVENT?"pointerup pointercancel":EVENT_TOUCH_END,EVENT_READY="ready",EVENT_RESIZE="resize",EVENT_WHEEL="wheel",EVENT_ZOOM="zoom",MIME_TYPE_JPEG="image/jpeg",REGEXP_ACTIONS=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,REGEXP_DATA_URL=/^data:/,REGEXP_DATA_URL_JPEG=/^data:image\/jpeg;base64,/,REGEXP_TAG_NAME=/^img|canvas$/i,MIN_CONTAINER_WIDTH=200,MIN_CONTAINER_HEIGHT=100,DEFAULTS={viewMode:0,dragMode:DRAG_MODE_CROP,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:MIN_CONTAINER_WIDTH,minContainerHeight:MIN_CONTAINER_HEIGHT,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},TEMPLATE='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>',isNaN=Number.isNaN||WINDOW.isNaN;function isNumber(i){return typeof i=="number"&&!isNaN(i)}var isPositiveNumber=function i(r){return r>0&&r<1/0};function isUndefined(i){return typeof i>"u"}function isObject(i){return _typeof(i)==="object"&&i!==null}var hasOwnProperty=Object.prototype.hasOwnProperty;function isPlainObject(i){if(!isObject(i))return!1;try{var r=i.constructor,e=r.prototype;return r&&e&&hasOwnProperty.call(e,"isPrototypeOf")}catch(t){return!1}}function isFunction(i){return typeof i=="function"}var slice=Array.prototype.slice;function toArray(i){return Array.from?Array.from(i):slice.call(i)}function forEach(i,r){return i&&isFunction(r)&&(Array.isArray(i)||isNumber(i.length)?toArray(i).forEach(function(e,t){r.call(i,e,t,i)}):isObject(i)&&Object.keys(i).forEach(function(e){r.call(i,i[e],e,i)})),i}var assign=Object.assign||function i(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),l=1;l<e;l++)t[l-1]=arguments[l];return isObject(r)&&t.length>0&&t.forEach(function(o){isObject(o)&&Object.keys(o).forEach(function(s){r[s]=o[s]})}),r},REGEXP_DECIMALS=/\.\d*(?:0|9){12}\d*$/;function normalizeDecimalNumber(i){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return REGEXP_DECIMALS.test(i)?Math.round(i*r)/r:i}var REGEXP_SUFFIX=/^width|height|left|top|marginLeft|marginTop$/;function setStyle(i,r){var e=i.style;forEach(r,function(t,l){REGEXP_SUFFIX.test(l)&&isNumber(t)&&(t="".concat(t,"px")),e[l]=t})}function hasClass(i,r){return i.classList?i.classList.contains(r):i.className.indexOf(r)>-1}function addClass(i,r){if(r){if(isNumber(i.length)){forEach(i,function(t){addClass(t,r)});return}if(i.classList){i.classList.add(r);return}var e=i.className.trim();e?e.indexOf(r)<0&&(i.className="".concat(e," ").concat(r)):i.className=r}}function removeClass(i,r){if(r){if(isNumber(i.length)){forEach(i,function(e){removeClass(e,r)});return}if(i.classList){i.classList.remove(r);return}i.className.indexOf(r)>=0&&(i.className=i.className.replace(r,""))}}function toggleClass(i,r,e){if(r){if(isNumber(i.length)){forEach(i,function(t){toggleClass(t,r,e)});return}e?addClass(i,r):removeClass(i,r)}}var REGEXP_CAMEL_CASE=/([a-z\d])([A-Z])/g;function toParamCase(i){return i.replace(REGEXP_CAMEL_CASE,"$1-$2").toLowerCase()}function getData(i,r){return isObject(i[r])?i[r]:i.dataset?i.dataset[r]:i.getAttribute("data-".concat(toParamCase(r)))}function setData(i,r,e){isObject(e)?i[r]=e:i.dataset?i.dataset[r]=e:i.setAttribute("data-".concat(toParamCase(r)),e)}function removeData(i,r){if(isObject(i[r]))try{delete i[r]}catch(e){i[r]=void 0}else if(i.dataset)try{delete i.dataset[r]}catch(e){i.dataset[r]=void 0}else i.removeAttribute("data-".concat(toParamCase(r)))}var REGEXP_SPACES=/\s\s*/,onceSupported=function(){var i=!1;if(IS_BROWSER){var r=!1,e=function(){},t=Object.defineProperty({},"once",{get:function(){return i=!0,r},set:function(o){r=o}});WINDOW.addEventListener("test",e,t),WINDOW.removeEventListener("test",e,t)}return i}();function removeListener(i,r,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=e;r.trim().split(REGEXP_SPACES).forEach(function(o){if(!onceSupported){var s=i.listeners;s&&s[o]&&s[o][e]&&(l=s[o][e],delete s[o][e],Object.keys(s[o]).length===0&&delete s[o],Object.keys(s).length===0&&delete i.listeners)}i.removeEventListener(o,l,t)})}function addListener(i,r,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=e;r.trim().split(REGEXP_SPACES).forEach(function(o){if(t.once&&!onceSupported){var s=i.listeners,E=s===void 0?{}:s;l=function(){delete E[o][e],i.removeEventListener(o,l,t);for(var S=arguments.length,A=new Array(S),T=0;T<S;T++)A[T]=arguments[T];e.apply(i,A)},E[o]||(E[o]={}),E[o][e]&&i.removeEventListener(o,E[o][e],t),E[o][e]=l,i.listeners=E}i.addEventListener(o,l,t)})}function dispatchEvent(i,r,e){var t;return isFunction(Event)&&isFunction(CustomEvent)?t=new CustomEvent(r,{detail:e,bubbles:!0,cancelable:!0}):(t=document.createEvent("CustomEvent"),t.initCustomEvent(r,!0,!0,e)),i.dispatchEvent(t)}function getOffset(i){var r=i.getBoundingClientRect();return{left:r.left+(window.pageXOffset-document.documentElement.clientLeft),top:r.top+(window.pageYOffset-document.documentElement.clientTop)}}var location$1=WINDOW.location,REGEXP_ORIGINS=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function isCrossOriginURL(i){var r=i.match(REGEXP_ORIGINS);return r!==null&&(r[1]!==location$1.protocol||r[2]!==location$1.hostname||r[3]!==location$1.port)}function addTimestamp(i){var r="timestamp=".concat(new Date().getTime());return i+(i.indexOf("?")===-1?"?":"&")+r}function getTransforms(i){var r=i.rotate,e=i.scaleX,t=i.scaleY,l=i.translateX,o=i.translateY,s=[];isNumber(l)&&l!==0&&s.push("translateX(".concat(l,"px)")),isNumber(o)&&o!==0&&s.push("translateY(".concat(o,"px)")),isNumber(r)&&r!==0&&s.push("rotate(".concat(r,"deg)")),isNumber(e)&&e!==1&&s.push("scaleX(".concat(e,")")),isNumber(t)&&t!==1&&s.push("scaleY(".concat(t,")"));var E=s.length?s.join(" "):"none";return{WebkitTransform:E,msTransform:E,transform:E}}function getMaxZoomRatio(i){var r=_objectSpread2({},i),e=0;return forEach(i,function(t,l){delete r[l],forEach(r,function(o){var s=Math.abs(t.startX-o.startX),E=Math.abs(t.startY-o.startY),w=Math.abs(t.endX-o.endX),S=Math.abs(t.endY-o.endY),A=Math.sqrt(s*s+E*E),T=Math.sqrt(w*w+S*S),_=(T-A)/A;Math.abs(_)>Math.abs(e)&&(e=_)})}),e}function getPointer(i,r){var e=i.pageX,t=i.pageY,l={endX:e,endY:t};return r?l:_objectSpread2({startX:e,startY:t},l)}function getPointersCenter(i){var r=0,e=0,t=0;return forEach(i,function(l){var o=l.startX,s=l.startY;r+=o,e+=s,t+=1}),r/=t,e/=t,{pageX:r,pageY:e}}function getAdjustedSizes(i){var r=i.aspectRatio,e=i.height,t=i.width,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",o=isPositiveNumber(t),s=isPositiveNumber(e);if(o&&s){var E=e*r;l==="contain"&&E>t||l==="cover"&&E<t?e=t/r:t=e*r}else o?e=t/r:s&&(t=e*r);return{width:t,height:e}}function getRotatedSizes(i){var r=i.width,e=i.height,t=i.degree;if(t=Math.abs(t)%180,t===90)return{width:e,height:r};var l=t%90*Math.PI/180,o=Math.sin(l),s=Math.cos(l),E=r*s+e*o,w=r*o+e*s;return t>90?{width:w,height:E}:{width:E,height:w}}function getSourceCanvas(i,r,e,t){var l=r.aspectRatio,o=r.naturalWidth,s=r.naturalHeight,E=r.rotate,w=E===void 0?0:E,S=r.scaleX,A=S===void 0?1:S,T=r.scaleY,_=T===void 0?1:T,q=e.aspectRatio,P=e.naturalWidth,L=e.naturalHeight,Y=t.fillColor,G=Y===void 0?"transparent":Y,ne=t.imageSmoothingEnabled,I=ne===void 0?!0:ne,D=t.imageSmoothingQuality,C=D===void 0?"low":D,k=t.maxWidth,g=k===void 0?1/0:k,F=t.maxHeight,H=F===void 0?1/0:F,U=t.minWidth,z=U===void 0?0:U,R=t.minHeight,V=R===void 0?0:R,X=document.createElement("canvas"),W=X.getContext("2d"),J=getAdjustedSizes({aspectRatio:q,width:g,height:H}),ie=getAdjustedSizes({aspectRatio:q,width:z,height:V},"cover"),se=Math.min(J.width,Math.max(ie.width,P)),oe=Math.min(J.height,Math.max(ie.height,L)),ee=getAdjustedSizes({aspectRatio:l,width:g,height:H}),ce=getAdjustedSizes({aspectRatio:l,width:z,height:V},"cover"),ae=Math.min(ee.width,Math.max(ce.width,o)),pe=Math.min(ee.height,Math.max(ce.height,s)),Z=[-ae/2,-pe/2,ae,pe];return X.width=normalizeDecimalNumber(se),X.height=normalizeDecimalNumber(oe),W.fillStyle=G,W.fillRect(0,0,se,oe),W.save(),W.translate(se/2,oe/2),W.rotate(w*Math.PI/180),W.scale(A,_),W.imageSmoothingEnabled=I,W.imageSmoothingQuality=C,W.drawImage.apply(W,[i].concat(_toConsumableArray(Z.map(function(re){return Math.floor(normalizeDecimalNumber(re))})))),W.restore(),X}var fromCharCode=String.fromCharCode;function getStringFromCharCode(i,r,e){var t="";e+=r;for(var l=r;l<e;l+=1)t+=fromCharCode(i.getUint8(l));return t}var REGEXP_DATA_URL_HEAD=/^data:.*,/;function dataURLToArrayBuffer(i){var r=i.replace(REGEXP_DATA_URL_HEAD,""),e=atob(r),t=new ArrayBuffer(e.length),l=new Uint8Array(t);return forEach(l,function(o,s){l[s]=e.charCodeAt(s)}),t}function arrayBufferToDataURL(i,r){for(var e=[],t=8192,l=new Uint8Array(i);l.length>0;)e.push(fromCharCode.apply(null,toArray(l.subarray(0,t)))),l=l.subarray(t);return"data:".concat(r,";base64,").concat(btoa(e.join("")))}function resetAndGetOrientation(i){var r=new DataView(i),e;try{var t,l,o;if(r.getUint8(0)===255&&r.getUint8(1)===216)for(var s=r.byteLength,E=2;E+1<s;){if(r.getUint8(E)===255&&r.getUint8(E+1)===225){l=E;break}E+=1}if(l){var w=l+4,S=l+10;if(getStringFromCharCode(r,w,4)==="Exif"){var A=r.getUint16(S);if(t=A===18761,(t||A===19789)&&r.getUint16(S+2,t)===42){var T=r.getUint32(S+4,t);T>=8&&(o=S+T)}}}if(o){var _=r.getUint16(o,t),q,P;for(P=0;P<_;P+=1)if(q=o+P*12+2,r.getUint16(q,t)===274){q+=8,e=r.getUint16(q,t),r.setUint16(q,1,t);break}}}catch(L){e=1}return e}function parseOrientation(i){var r=0,e=1,t=1;switch(i){case 2:e=-1;break;case 3:r=-180;break;case 4:t=-1;break;case 5:r=90,t=-1;break;case 6:r=90;break;case 7:r=90,e=-1;break;case 8:r=-90;break}return{rotate:r,scaleX:e,scaleY:t}}var render={render:function i(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function i(){var r=this.element,e=this.options,t=this.container,l=this.cropper,o=Number(e.minContainerWidth),s=Number(e.minContainerHeight);addClass(l,CLASS_HIDDEN),removeClass(r,CLASS_HIDDEN);var E={width:Math.max(t.offsetWidth,o>=0?o:MIN_CONTAINER_WIDTH),height:Math.max(t.offsetHeight,s>=0?s:MIN_CONTAINER_HEIGHT)};this.containerData=E,setStyle(l,{width:E.width,height:E.height}),addClass(r,CLASS_HIDDEN),removeClass(l,CLASS_HIDDEN)},initCanvas:function i(){var r=this.containerData,e=this.imageData,t=this.options.viewMode,l=Math.abs(e.rotate)%180===90,o=l?e.naturalHeight:e.naturalWidth,s=l?e.naturalWidth:e.naturalHeight,E=o/s,w=r.width,S=r.height;r.height*E>r.width?t===3?w=r.height*E:S=r.width/E:t===3?S=r.width/E:w=r.height*E;var A={aspectRatio:E,naturalWidth:o,naturalHeight:s,width:w,height:S};this.canvasData=A,this.limited=t===1||t===2,this.limitCanvas(!0,!0),A.width=Math.min(Math.max(A.width,A.minWidth),A.maxWidth),A.height=Math.min(Math.max(A.height,A.minHeight),A.maxHeight),A.left=(r.width-A.width)/2,A.top=(r.height-A.height)/2,A.oldLeft=A.left,A.oldTop=A.top,this.initialCanvasData=assign({},A)},limitCanvas:function i(r,e){var t=this.options,l=this.containerData,o=this.canvasData,s=this.cropBoxData,E=t.viewMode,w=o.aspectRatio,S=this.cropped&&s;if(r){var A=Number(t.minCanvasWidth)||0,T=Number(t.minCanvasHeight)||0;E>1?(A=Math.max(A,l.width),T=Math.max(T,l.height),E===3&&(T*w>A?A=T*w:T=A/w)):E>0&&(A?A=Math.max(A,S?s.width:0):T?T=Math.max(T,S?s.height:0):S&&(A=s.width,T=s.height,T*w>A?A=T*w:T=A/w));var _=getAdjustedSizes({aspectRatio:w,width:A,height:T});A=_.width,T=_.height,o.minWidth=A,o.minHeight=T,o.maxWidth=1/0,o.maxHeight=1/0}if(e)if(E>(S?0:1)){var q=l.width-o.width,P=l.height-o.height;o.minLeft=Math.min(0,q),o.minTop=Math.min(0,P),o.maxLeft=Math.max(0,q),o.maxTop=Math.max(0,P),S&&this.limited&&(o.minLeft=Math.min(s.left,s.left+(s.width-o.width)),o.minTop=Math.min(s.top,s.top+(s.height-o.height)),o.maxLeft=s.left,o.maxTop=s.top,E===2&&(o.width>=l.width&&(o.minLeft=Math.min(0,q),o.maxLeft=Math.max(0,q)),o.height>=l.height&&(o.minTop=Math.min(0,P),o.maxTop=Math.max(0,P))))}else o.minLeft=-o.width,o.minTop=-o.height,o.maxLeft=l.width,o.maxTop=l.height},renderCanvas:function i(r,e){var t=this.canvasData,l=this.imageData;if(e){var o=getRotatedSizes({width:l.naturalWidth*Math.abs(l.scaleX||1),height:l.naturalHeight*Math.abs(l.scaleY||1),degree:l.rotate||0}),s=o.width,E=o.height,w=t.width*(s/t.naturalWidth),S=t.height*(E/t.naturalHeight);t.left-=(w-t.width)/2,t.top-=(S-t.height)/2,t.width=w,t.height=S,t.aspectRatio=s/E,t.naturalWidth=s,t.naturalHeight=E,this.limitCanvas(!0,!1)}(t.width>t.maxWidth||t.width<t.minWidth)&&(t.left=t.oldLeft),(t.height>t.maxHeight||t.height<t.minHeight)&&(t.top=t.oldTop),t.width=Math.min(Math.max(t.width,t.minWidth),t.maxWidth),t.height=Math.min(Math.max(t.height,t.minHeight),t.maxHeight),this.limitCanvas(!1,!0),t.left=Math.min(Math.max(t.left,t.minLeft),t.maxLeft),t.top=Math.min(Math.max(t.top,t.minTop),t.maxTop),t.oldLeft=t.left,t.oldTop=t.top,setStyle(this.canvas,assign({width:t.width,height:t.height},getTransforms({translateX:t.left,translateY:t.top}))),this.renderImage(r),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function i(r){var e=this.canvasData,t=this.imageData,l=t.naturalWidth*(e.width/e.naturalWidth),o=t.naturalHeight*(e.height/e.naturalHeight);assign(t,{width:l,height:o,left:(e.width-l)/2,top:(e.height-o)/2}),setStyle(this.image,assign({width:t.width,height:t.height},getTransforms(assign({translateX:t.left,translateY:t.top},t)))),r&&this.output()},initCropBox:function i(){var r=this.options,e=this.canvasData,t=r.aspectRatio||r.initialAspectRatio,l=Number(r.autoCropArea)||.8,o={width:e.width,height:e.height};t&&(e.height*t>e.width?o.height=o.width/t:o.width=o.height*t),this.cropBoxData=o,this.limitCropBox(!0,!0),o.width=Math.min(Math.max(o.width,o.minWidth),o.maxWidth),o.height=Math.min(Math.max(o.height,o.minHeight),o.maxHeight),o.width=Math.max(o.minWidth,o.width*l),o.height=Math.max(o.minHeight,o.height*l),o.left=e.left+(e.width-o.width)/2,o.top=e.top+(e.height-o.height)/2,o.oldLeft=o.left,o.oldTop=o.top,this.initialCropBoxData=assign({},o)},limitCropBox:function i(r,e){var t=this.options,l=this.containerData,o=this.canvasData,s=this.cropBoxData,E=this.limited,w=t.aspectRatio;if(r){var S=Number(t.minCropBoxWidth)||0,A=Number(t.minCropBoxHeight)||0,T=E?Math.min(l.width,o.width,o.width+o.left,l.width-o.left):l.width,_=E?Math.min(l.height,o.height,o.height+o.top,l.height-o.top):l.height;S=Math.min(S,l.width),A=Math.min(A,l.height),w&&(S&&A?A*w>S?A=S/w:S=A*w:S?A=S/w:A&&(S=A*w),_*w>T?_=T/w:T=_*w),s.minWidth=Math.min(S,T),s.minHeight=Math.min(A,_),s.maxWidth=T,s.maxHeight=_}e&&(E?(s.minLeft=Math.max(0,o.left),s.minTop=Math.max(0,o.top),s.maxLeft=Math.min(l.width,o.left+o.width)-s.width,s.maxTop=Math.min(l.height,o.top+o.height)-s.height):(s.minLeft=0,s.minTop=0,s.maxLeft=l.width-s.width,s.maxTop=l.height-s.height))},renderCropBox:function i(){var r=this.options,e=this.containerData,t=this.cropBoxData;(t.width>t.maxWidth||t.width<t.minWidth)&&(t.left=t.oldLeft),(t.height>t.maxHeight||t.height<t.minHeight)&&(t.top=t.oldTop),t.width=Math.min(Math.max(t.width,t.minWidth),t.maxWidth),t.height=Math.min(Math.max(t.height,t.minHeight),t.maxHeight),this.limitCropBox(!1,!0),t.left=Math.min(Math.max(t.left,t.minLeft),t.maxLeft),t.top=Math.min(Math.max(t.top,t.minTop),t.maxTop),t.oldLeft=t.left,t.oldTop=t.top,r.movable&&r.cropBoxMovable&&setData(this.face,DATA_ACTION,t.width>=e.width&&t.height>=e.height?ACTION_MOVE:ACTION_ALL),setStyle(this.cropBox,assign({width:t.width,height:t.height},getTransforms({translateX:t.left,translateY:t.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function i(){this.preview(),dispatchEvent(this.element,EVENT_CROP,this.getData())}},preview={initPreview:function i(){var r=this.element,e=this.crossOrigin,t=this.options.preview,l=e?this.crossOriginUrl:this.url,o=r.alt||"The image to preview",s=document.createElement("img");if(e&&(s.crossOrigin=e),s.src=l,s.alt=o,this.viewBox.appendChild(s),this.viewBoxImage=s,!!t){var E=t;typeof t=="string"?E=r.ownerDocument.querySelectorAll(t):t.querySelector&&(E=[t]),this.previews=E,forEach(E,function(w){var S=document.createElement("img");setData(w,DATA_PREVIEW,{width:w.offsetWidth,height:w.offsetHeight,html:w.innerHTML}),e&&(S.crossOrigin=e),S.src=l,S.alt=o,S.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',w.innerHTML="",w.appendChild(S)})}},resetPreview:function i(){forEach(this.previews,function(r){var e=getData(r,DATA_PREVIEW);setStyle(r,{width:e.width,height:e.height}),r.innerHTML=e.html,removeData(r,DATA_PREVIEW)})},preview:function i(){var r=this.imageData,e=this.canvasData,t=this.cropBoxData,l=t.width,o=t.height,s=r.width,E=r.height,w=t.left-e.left-r.left,S=t.top-e.top-r.top;!this.cropped||this.disabled||(setStyle(this.viewBoxImage,assign({width:s,height:E},getTransforms(assign({translateX:-w,translateY:-S},r)))),forEach(this.previews,function(A){var T=getData(A,DATA_PREVIEW),_=T.width,q=T.height,P=_,L=q,Y=1;l&&(Y=_/l,L=o*Y),o&&L>q&&(Y=q/o,P=l*Y,L=q),setStyle(A,{width:P,height:L}),setStyle(A.getElementsByTagName("img")[0],assign({width:s*Y,height:E*Y},getTransforms(assign({translateX:-w*Y,translateY:-S*Y},r))))}))}},events={bind:function i(){var r=this.element,e=this.options,t=this.cropper;isFunction(e.cropstart)&&addListener(r,EVENT_CROP_START,e.cropstart),isFunction(e.cropmove)&&addListener(r,EVENT_CROP_MOVE,e.cropmove),isFunction(e.cropend)&&addListener(r,EVENT_CROP_END,e.cropend),isFunction(e.crop)&&addListener(r,EVENT_CROP,e.crop),isFunction(e.zoom)&&addListener(r,EVENT_ZOOM,e.zoom),addListener(t,EVENT_POINTER_DOWN,this.onCropStart=this.cropStart.bind(this)),e.zoomable&&e.zoomOnWheel&&addListener(t,EVENT_WHEEL,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&addListener(t,EVENT_DBLCLICK,this.onDblclick=this.dblclick.bind(this)),addListener(r.ownerDocument,EVENT_POINTER_MOVE,this.onCropMove=this.cropMove.bind(this)),addListener(r.ownerDocument,EVENT_POINTER_UP,this.onCropEnd=this.cropEnd.bind(this)),e.responsive&&addListener(window,EVENT_RESIZE,this.onResize=this.resize.bind(this))},unbind:function i(){var r=this.element,e=this.options,t=this.cropper;isFunction(e.cropstart)&&removeListener(r,EVENT_CROP_START,e.cropstart),isFunction(e.cropmove)&&removeListener(r,EVENT_CROP_MOVE,e.cropmove),isFunction(e.cropend)&&removeListener(r,EVENT_CROP_END,e.cropend),isFunction(e.crop)&&removeListener(r,EVENT_CROP,e.crop),isFunction(e.zoom)&&removeListener(r,EVENT_ZOOM,e.zoom),removeListener(t,EVENT_POINTER_DOWN,this.onCropStart),e.zoomable&&e.zoomOnWheel&&removeListener(t,EVENT_WHEEL,this.onWheel,{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&removeListener(t,EVENT_DBLCLICK,this.onDblclick),removeListener(r.ownerDocument,EVENT_POINTER_MOVE,this.onCropMove),removeListener(r.ownerDocument,EVENT_POINTER_UP,this.onCropEnd),e.responsive&&removeListener(window,EVENT_RESIZE,this.onResize)}},handlers={resize:function i(){if(!this.disabled){var r=this.options,e=this.container,t=this.containerData,l=e.offsetWidth/t.width,o=e.offsetHeight/t.height,s=Math.abs(l-1)>Math.abs(o-1)?l:o;if(s!==1){var E,w;r.restore&&(E=this.getCanvasData(),w=this.getCropBoxData()),this.render(),r.restore&&(this.setCanvasData(forEach(E,function(S,A){E[A]=S*s})),this.setCropBoxData(forEach(w,function(S,A){w[A]=S*s})))}}},dblclick:function i(){this.disabled||this.options.dragMode===DRAG_MODE_NONE||this.setDragMode(hasClass(this.dragBox,CLASS_CROP)?DRAG_MODE_MOVE:DRAG_MODE_CROP)},wheel:function i(r){var e=this,t=Number(this.options.wheelZoomRatio)||.1,l=1;this.disabled||(r.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){e.wheeling=!1},50),r.deltaY?l=r.deltaY>0?1:-1:r.wheelDelta?l=-r.wheelDelta/120:r.detail&&(l=r.detail>0?1:-1),this.zoom(-l*t,r)))},cropStart:function i(r){var e=r.buttons,t=r.button;if(!(this.disabled||(r.type==="mousedown"||r.type==="pointerdown"&&r.pointerType==="mouse")&&(isNumber(e)&&e!==1||isNumber(t)&&t!==0||r.ctrlKey))){var l=this.options,o=this.pointers,s;r.changedTouches?forEach(r.changedTouches,function(E){o[E.identifier]=getPointer(E)}):o[r.pointerId||0]=getPointer(r),Object.keys(o).length>1&&l.zoomable&&l.zoomOnTouch?s=ACTION_ZOOM:s=getData(r.target,DATA_ACTION),REGEXP_ACTIONS.test(s)&&dispatchEvent(this.element,EVENT_CROP_START,{originalEvent:r,action:s})!==!1&&(r.preventDefault(),this.action=s,this.cropping=!1,s===ACTION_CROP&&(this.cropping=!0,addClass(this.dragBox,CLASS_MODAL)))}},cropMove:function i(r){var e=this.action;if(!(this.disabled||!e)){var t=this.pointers;r.preventDefault(),dispatchEvent(this.element,EVENT_CROP_MOVE,{originalEvent:r,action:e})!==!1&&(r.changedTouches?forEach(r.changedTouches,function(l){assign(t[l.identifier]||{},getPointer(l,!0))}):assign(t[r.pointerId||0]||{},getPointer(r,!0)),this.change(r))}},cropEnd:function i(r){if(!this.disabled){var e=this.action,t=this.pointers;r.changedTouches?forEach(r.changedTouches,function(l){delete t[l.identifier]}):delete t[r.pointerId||0],e&&(r.preventDefault(),Object.keys(t).length||(this.action=""),this.cropping&&(this.cropping=!1,toggleClass(this.dragBox,CLASS_MODAL,this.cropped&&this.options.modal)),dispatchEvent(this.element,EVENT_CROP_END,{originalEvent:r,action:e}))}}},change={change:function i(r){var e=this.options,t=this.canvasData,l=this.containerData,o=this.cropBoxData,s=this.pointers,E=this.action,w=e.aspectRatio,S=o.left,A=o.top,T=o.width,_=o.height,q=S+T,P=A+_,L=0,Y=0,G=l.width,ne=l.height,I=!0,D;!w&&r.shiftKey&&(w=T&&_?T/_:1),this.limited&&(L=o.minLeft,Y=o.minTop,G=L+Math.min(l.width,t.width,t.left+t.width),ne=Y+Math.min(l.height,t.height,t.top+t.height));var C=s[Object.keys(s)[0]],k={x:C.endX-C.startX,y:C.endY-C.startY},g=function(H){switch(H){case ACTION_EAST:q+k.x>G&&(k.x=G-q);break;case ACTION_WEST:S+k.x<L&&(k.x=L-S);break;case ACTION_NORTH:A+k.y<Y&&(k.y=Y-A);break;case ACTION_SOUTH:P+k.y>ne&&(k.y=ne-P);break}};switch(E){case ACTION_ALL:S+=k.x,A+=k.y;break;case ACTION_EAST:if(k.x>=0&&(q>=G||w&&(A<=Y||P>=ne))){I=!1;break}g(ACTION_EAST),T+=k.x,T<0&&(E=ACTION_WEST,T=-T,S-=T),w&&(_=T/w,A+=(o.height-_)/2);break;case ACTION_NORTH:if(k.y<=0&&(A<=Y||w&&(S<=L||q>=G))){I=!1;break}g(ACTION_NORTH),_-=k.y,A+=k.y,_<0&&(E=ACTION_SOUTH,_=-_,A-=_),w&&(T=_*w,S+=(o.width-T)/2);break;case ACTION_WEST:if(k.x<=0&&(S<=L||w&&(A<=Y||P>=ne))){I=!1;break}g(ACTION_WEST),T-=k.x,S+=k.x,T<0&&(E=ACTION_EAST,T=-T,S-=T),w&&(_=T/w,A+=(o.height-_)/2);break;case ACTION_SOUTH:if(k.y>=0&&(P>=ne||w&&(S<=L||q>=G))){I=!1;break}g(ACTION_SOUTH),_+=k.y,_<0&&(E=ACTION_NORTH,_=-_,A-=_),w&&(T=_*w,S+=(o.width-T)/2);break;case ACTION_NORTH_EAST:if(w){if(k.y<=0&&(A<=Y||q>=G)){I=!1;break}g(ACTION_NORTH),_-=k.y,A+=k.y,T=_*w}else g(ACTION_NORTH),g(ACTION_EAST),k.x>=0?q<G?T+=k.x:k.y<=0&&A<=Y&&(I=!1):T+=k.x,k.y<=0?A>Y&&(_-=k.y,A+=k.y):(_-=k.y,A+=k.y);T<0&&_<0?(E=ACTION_SOUTH_WEST,_=-_,T=-T,A-=_,S-=T):T<0?(E=ACTION_NORTH_WEST,T=-T,S-=T):_<0&&(E=ACTION_SOUTH_EAST,_=-_,A-=_);break;case ACTION_NORTH_WEST:if(w){if(k.y<=0&&(A<=Y||S<=L)){I=!1;break}g(ACTION_NORTH),_-=k.y,A+=k.y,T=_*w,S+=o.width-T}else g(ACTION_NORTH),g(ACTION_WEST),k.x<=0?S>L?(T-=k.x,S+=k.x):k.y<=0&&A<=Y&&(I=!1):(T-=k.x,S+=k.x),k.y<=0?A>Y&&(_-=k.y,A+=k.y):(_-=k.y,A+=k.y);T<0&&_<0?(E=ACTION_SOUTH_EAST,_=-_,T=-T,A-=_,S-=T):T<0?(E=ACTION_NORTH_EAST,T=-T,S-=T):_<0&&(E=ACTION_SOUTH_WEST,_=-_,A-=_);break;case ACTION_SOUTH_WEST:if(w){if(k.x<=0&&(S<=L||P>=ne)){I=!1;break}g(ACTION_WEST),T-=k.x,S+=k.x,_=T/w}else g(ACTION_SOUTH),g(ACTION_WEST),k.x<=0?S>L?(T-=k.x,S+=k.x):k.y>=0&&P>=ne&&(I=!1):(T-=k.x,S+=k.x),k.y>=0?P<ne&&(_+=k.y):_+=k.y;T<0&&_<0?(E=ACTION_NORTH_EAST,_=-_,T=-T,A-=_,S-=T):T<0?(E=ACTION_SOUTH_EAST,T=-T,S-=T):_<0&&(E=ACTION_NORTH_WEST,_=-_,A-=_);break;case ACTION_SOUTH_EAST:if(w){if(k.x>=0&&(q>=G||P>=ne)){I=!1;break}g(ACTION_EAST),T+=k.x,_=T/w}else g(ACTION_SOUTH),g(ACTION_EAST),k.x>=0?q<G?T+=k.x:k.y>=0&&P>=ne&&(I=!1):T+=k.x,k.y>=0?P<ne&&(_+=k.y):_+=k.y;T<0&&_<0?(E=ACTION_NORTH_WEST,_=-_,T=-T,A-=_,S-=T):T<0?(E=ACTION_SOUTH_WEST,T=-T,S-=T):_<0&&(E=ACTION_NORTH_EAST,_=-_,A-=_);break;case ACTION_MOVE:this.move(k.x,k.y),I=!1;break;case ACTION_ZOOM:this.zoom(getMaxZoomRatio(s),r),I=!1;break;case ACTION_CROP:if(!k.x||!k.y){I=!1;break}D=getOffset(this.cropper),S=C.startX-D.left,A=C.startY-D.top,T=o.minWidth,_=o.minHeight,k.x>0?E=k.y>0?ACTION_SOUTH_EAST:ACTION_NORTH_EAST:k.x<0&&(S-=T,E=k.y>0?ACTION_SOUTH_WEST:ACTION_NORTH_WEST),k.y<0&&(A-=_),this.cropped||(removeClass(this.cropBox,CLASS_HIDDEN),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}I&&(o.width=T,o.height=_,o.left=S,o.top=A,this.action=E,this.renderCropBox()),forEach(s,function(F){F.startX=F.endX,F.startY=F.endY})}},methods={crop:function i(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&addClass(this.dragBox,CLASS_MODAL),removeClass(this.cropBox,CLASS_HIDDEN),this.setCropBoxData(this.initialCropBoxData)),this},reset:function i(){return this.ready&&!this.disabled&&(this.imageData=assign({},this.initialImageData),this.canvasData=assign({},this.initialCanvasData),this.cropBoxData=assign({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function i(){return this.cropped&&!this.disabled&&(assign(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),removeClass(this.dragBox,CLASS_MODAL),addClass(this.cropBox,CLASS_HIDDEN)),this},replace:function i(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&r&&(this.isImg&&(this.element.src=r),e?(this.url=r,this.image.src=r,this.ready&&(this.viewBoxImage.src=r,forEach(this.previews,function(t){t.getElementsByTagName("img")[0].src=r}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(r))),this},enable:function i(){return this.ready&&this.disabled&&(this.disabled=!1,removeClass(this.cropper,CLASS_DISABLED)),this},disable:function i(){return this.ready&&!this.disabled&&(this.disabled=!0,addClass(this.cropper,CLASS_DISABLED)),this},destroy:function i(){var r=this.element;return r[NAMESPACE]?(r[NAMESPACE]=void 0,this.isImg&&this.replaced&&(r.src=this.originalUrl),this.uncreate(),this):this},move:function i(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r,t=this.canvasData,l=t.left,o=t.top;return this.moveTo(isUndefined(r)?r:l+Number(r),isUndefined(e)?e:o+Number(e))},moveTo:function i(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r,t=this.canvasData,l=!1;return r=Number(r),e=Number(e),this.ready&&!this.disabled&&this.options.movable&&(isNumber(r)&&(t.left=r,l=!0),isNumber(e)&&(t.top=e,l=!0),l&&this.renderCanvas(!0)),this},zoom:function i(r,e){var t=this.canvasData;return r=Number(r),r<0?r=1/(1-r):r=1+r,this.zoomTo(t.width*r/t.naturalWidth,null,e)},zoomTo:function i(r,e,t){var l=this.options,o=this.canvasData,s=o.width,E=o.height,w=o.naturalWidth,S=o.naturalHeight;if(r=Number(r),r>=0&&this.ready&&!this.disabled&&l.zoomable){var A=w*r,T=S*r;if(dispatchEvent(this.element,EVENT_ZOOM,{ratio:r,oldRatio:s/w,originalEvent:t})===!1)return this;if(t){var _=this.pointers,q=getOffset(this.cropper),P=_&&Object.keys(_).length?getPointersCenter(_):{pageX:t.pageX,pageY:t.pageY};o.left-=(A-s)*((P.pageX-q.left-o.left)/s),o.top-=(T-E)*((P.pageY-q.top-o.top)/E)}else isPlainObject(e)&&isNumber(e.x)&&isNumber(e.y)?(o.left-=(A-s)*((e.x-o.left)/s),o.top-=(T-E)*((e.y-o.top)/E)):(o.left-=(A-s)/2,o.top-=(T-E)/2);o.width=A,o.height=T,this.renderCanvas(!0)}return this},rotate:function i(r){return this.rotateTo((this.imageData.rotate||0)+Number(r))},rotateTo:function i(r){return r=Number(r),isNumber(r)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=r%360,this.renderCanvas(!0,!0)),this},scaleX:function i(r){var e=this.imageData.scaleY;return this.scale(r,isNumber(e)?e:1)},scaleY:function i(r){var e=this.imageData.scaleX;return this.scale(isNumber(e)?e:1,r)},scale:function i(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r,t=this.imageData,l=!1;return r=Number(r),e=Number(e),this.ready&&!this.disabled&&this.options.scalable&&(isNumber(r)&&(t.scaleX=r,l=!0),isNumber(e)&&(t.scaleY=e,l=!0),l&&this.renderCanvas(!0,!0)),this},getData:function i(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.options,t=this.imageData,l=this.canvasData,o=this.cropBoxData,s;if(this.ready&&this.cropped){s={x:o.left-l.left,y:o.top-l.top,width:o.width,height:o.height};var E=t.width/t.naturalWidth;if(forEach(s,function(A,T){s[T]=A/E}),r){var w=Math.round(s.y+s.height),S=Math.round(s.x+s.width);s.x=Math.round(s.x),s.y=Math.round(s.y),s.width=S-s.x,s.height=w-s.y}}else s={x:0,y:0,width:0,height:0};return e.rotatable&&(s.rotate=t.rotate||0),e.scalable&&(s.scaleX=t.scaleX||1,s.scaleY=t.scaleY||1),s},setData:function i(r){var e=this.options,t=this.imageData,l=this.canvasData,o={};if(this.ready&&!this.disabled&&isPlainObject(r)){var s=!1;e.rotatable&&isNumber(r.rotate)&&r.rotate!==t.rotate&&(t.rotate=r.rotate,s=!0),e.scalable&&(isNumber(r.scaleX)&&r.scaleX!==t.scaleX&&(t.scaleX=r.scaleX,s=!0),isNumber(r.scaleY)&&r.scaleY!==t.scaleY&&(t.scaleY=r.scaleY,s=!0)),s&&this.renderCanvas(!0,!0);var E=t.width/t.naturalWidth;isNumber(r.x)&&(o.left=r.x*E+l.left),isNumber(r.y)&&(o.top=r.y*E+l.top),isNumber(r.width)&&(o.width=r.width*E),isNumber(r.height)&&(o.height=r.height*E),this.setCropBoxData(o)}return this},getContainerData:function i(){return this.ready?assign({},this.containerData):{}},getImageData:function i(){return this.sized?assign({},this.imageData):{}},getCanvasData:function i(){var r=this.canvasData,e={};return this.ready&&forEach(["left","top","width","height","naturalWidth","naturalHeight"],function(t){e[t]=r[t]}),e},setCanvasData:function i(r){var e=this.canvasData,t=e.aspectRatio;return this.ready&&!this.disabled&&isPlainObject(r)&&(isNumber(r.left)&&(e.left=r.left),isNumber(r.top)&&(e.top=r.top),isNumber(r.width)?(e.width=r.width,e.height=r.width/t):isNumber(r.height)&&(e.height=r.height,e.width=r.height*t),this.renderCanvas(!0)),this},getCropBoxData:function i(){var r=this.cropBoxData,e;return this.ready&&this.cropped&&(e={left:r.left,top:r.top,width:r.width,height:r.height}),e||{}},setCropBoxData:function i(r){var e=this.cropBoxData,t=this.options.aspectRatio,l,o;return this.ready&&this.cropped&&!this.disabled&&isPlainObject(r)&&(isNumber(r.left)&&(e.left=r.left),isNumber(r.top)&&(e.top=r.top),isNumber(r.width)&&r.width!==e.width&&(l=!0,e.width=r.width),isNumber(r.height)&&r.height!==e.height&&(o=!0,e.height=r.height),t&&(l?e.height=e.width/t:o&&(e.width=e.height*t)),this.renderCropBox()),this},getCroppedCanvas:function i(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var e=this.canvasData,t=getSourceCanvas(this.image,this.imageData,e,r);if(!this.cropped)return t;var l=this.getData(r.rounded),o=l.x,s=l.y,E=l.width,w=l.height,S=t.width/Math.floor(e.naturalWidth);S!==1&&(o*=S,s*=S,E*=S,w*=S);var A=E/w,T=getAdjustedSizes({aspectRatio:A,width:r.maxWidth||1/0,height:r.maxHeight||1/0}),_=getAdjustedSizes({aspectRatio:A,width:r.minWidth||0,height:r.minHeight||0},"cover"),q=getAdjustedSizes({aspectRatio:A,width:r.width||(S!==1?t.width:E),height:r.height||(S!==1?t.height:w)}),P=q.width,L=q.height;P=Math.min(T.width,Math.max(_.width,P)),L=Math.min(T.height,Math.max(_.height,L));var Y=document.createElement("canvas"),G=Y.getContext("2d");Y.width=normalizeDecimalNumber(P),Y.height=normalizeDecimalNumber(L),G.fillStyle=r.fillColor||"transparent",G.fillRect(0,0,P,L);var ne=r.imageSmoothingEnabled,I=ne===void 0?!0:ne,D=r.imageSmoothingQuality;G.imageSmoothingEnabled=I,D&&(G.imageSmoothingQuality=D);var C=t.width,k=t.height,g=o,F=s,H,U,z,R,V,X;g<=-E||g>C?(g=0,H=0,z=0,V=0):g<=0?(z=-g,g=0,H=Math.min(C,E+g),V=H):g<=C&&(z=0,H=Math.min(E,C-g),V=H),H<=0||F<=-w||F>k?(F=0,U=0,R=0,X=0):F<=0?(R=-F,F=0,U=Math.min(k,w+F),X=U):F<=k&&(R=0,U=Math.min(w,k-F),X=U);var W=[g,F,H,U];if(V>0&&X>0){var J=P/E;W.push(z*J,R*J,V*J,X*J)}return G.drawImage.apply(G,[t].concat(_toConsumableArray(W.map(function(ie){return Math.floor(normalizeDecimalNumber(ie))})))),Y},setAspectRatio:function i(r){var e=this.options;return!this.disabled&&!isUndefined(r)&&(e.aspectRatio=Math.max(0,r)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function i(r){var e=this.options,t=this.dragBox,l=this.face;if(this.ready&&!this.disabled){var o=r===DRAG_MODE_CROP,s=e.movable&&r===DRAG_MODE_MOVE;r=o||s?r:DRAG_MODE_NONE,e.dragMode=r,setData(t,DATA_ACTION,r),toggleClass(t,CLASS_CROP,o),toggleClass(t,CLASS_MOVE,s),e.cropBoxMovable||(setData(l,DATA_ACTION,r),toggleClass(l,CLASS_CROP,o),toggleClass(l,CLASS_MOVE,s))}return this}},AnotherCropper=WINDOW.Cropper,Cropper=function(){function i(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(_classCallCheck(this,i),!r||!REGEXP_TAG_NAME.test(r.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=r,this.options=assign({},DEFAULTS,isPlainObject(e)&&e),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return _createClass(i,[{key:"init",value:function(){var e=this.element,t=e.tagName.toLowerCase(),l;if(!e[NAMESPACE]){if(e[NAMESPACE]=this,t==="img"){if(this.isImg=!0,l=e.getAttribute("src")||"",this.originalUrl=l,!l)return;l=e.src}else t==="canvas"&&window.HTMLCanvasElement&&(l=e.toDataURL());this.load(l)}}},{key:"load",value:function(e){var t=this;if(e){this.url=e,this.imageData={};var l=this.element,o=this.options;if(!o.rotatable&&!o.scalable&&(o.checkOrientation=!1),!o.checkOrientation||!window.ArrayBuffer){this.clone();return}if(REGEXP_DATA_URL.test(e)){REGEXP_DATA_URL_JPEG.test(e)?this.read(dataURLToArrayBuffer(e)):this.clone();return}var s=new XMLHttpRequest,E=this.clone.bind(this);this.reloading=!0,this.xhr=s,s.onabort=E,s.onerror=E,s.ontimeout=E,s.onprogress=function(){s.getResponseHeader("content-type")!==MIME_TYPE_JPEG&&s.abort()},s.onload=function(){t.read(s.response)},s.onloadend=function(){t.reloading=!1,t.xhr=null},o.checkCrossOrigin&&isCrossOriginURL(e)&&l.crossOrigin&&(e=addTimestamp(e)),s.open("GET",e,!0),s.responseType="arraybuffer",s.withCredentials=l.crossOrigin==="use-credentials",s.send()}}},{key:"read",value:function(e){var t=this.options,l=this.imageData,o=resetAndGetOrientation(e),s=0,E=1,w=1;if(o>1){this.url=arrayBufferToDataURL(e,MIME_TYPE_JPEG);var S=parseOrientation(o);s=S.rotate,E=S.scaleX,w=S.scaleY}t.rotatable&&(l.rotate=s),t.scalable&&(l.scaleX=E,l.scaleY=w),this.clone()}},{key:"clone",value:function(){var e=this.element,t=this.url,l=e.crossOrigin,o=t;this.options.checkCrossOrigin&&isCrossOriginURL(t)&&(l||(l="anonymous"),o=addTimestamp(t)),this.crossOrigin=l,this.crossOriginUrl=o;var s=document.createElement("img");l&&(s.crossOrigin=l),s.src=o||t,s.alt=e.alt||"The image to crop",this.image=s,s.onload=this.start.bind(this),s.onerror=this.stop.bind(this),addClass(s,CLASS_HIDE),e.parentNode.insertBefore(s,e.nextSibling)}},{key:"start",value:function(){var e=this,t=this.image;t.onload=null,t.onerror=null,this.sizing=!0;var l=WINDOW.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(WINDOW.navigator.userAgent),o=function(S,A){assign(e.imageData,{naturalWidth:S,naturalHeight:A,aspectRatio:S/A}),e.initialImageData=assign({},e.imageData),e.sizing=!1,e.sized=!0,e.build()};if(t.naturalWidth&&!l){o(t.naturalWidth,t.naturalHeight);return}var s=document.createElement("img"),E=document.body||document.documentElement;this.sizingImage=s,s.onload=function(){o(s.width,s.height),l||E.removeChild(s)},s.src=t.src,l||(s.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",E.appendChild(s))}},{key:"stop",value:function(){var e=this.image;e.onload=null,e.onerror=null,e.parentNode.removeChild(e),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var e=this.element,t=this.options,l=this.image,o=e.parentNode,s=document.createElement("div");s.innerHTML=TEMPLATE;var E=s.querySelector(".".concat(NAMESPACE,"-container")),w=E.querySelector(".".concat(NAMESPACE,"-canvas")),S=E.querySelector(".".concat(NAMESPACE,"-drag-box")),A=E.querySelector(".".concat(NAMESPACE,"-crop-box")),T=A.querySelector(".".concat(NAMESPACE,"-face"));this.container=o,this.cropper=E,this.canvas=w,this.dragBox=S,this.cropBox=A,this.viewBox=E.querySelector(".".concat(NAMESPACE,"-view-box")),this.face=T,w.appendChild(l),addClass(e,CLASS_HIDDEN),o.insertBefore(E,e.nextSibling),removeClass(l,CLASS_HIDE),this.initPreview(),this.bind(),t.initialAspectRatio=Math.max(0,t.initialAspectRatio)||NaN,t.aspectRatio=Math.max(0,t.aspectRatio)||NaN,t.viewMode=Math.max(0,Math.min(3,Math.round(t.viewMode)))||0,addClass(A,CLASS_HIDDEN),t.guides||addClass(A.getElementsByClassName("".concat(NAMESPACE,"-dashed")),CLASS_HIDDEN),t.center||addClass(A.getElementsByClassName("".concat(NAMESPACE,"-center")),CLASS_HIDDEN),t.background&&addClass(E,"".concat(NAMESPACE,"-bg")),t.highlight||addClass(T,CLASS_INVISIBLE),t.cropBoxMovable&&(addClass(T,CLASS_MOVE),setData(T,DATA_ACTION,ACTION_ALL)),t.cropBoxResizable||(addClass(A.getElementsByClassName("".concat(NAMESPACE,"-line")),CLASS_HIDDEN),addClass(A.getElementsByClassName("".concat(NAMESPACE,"-point")),CLASS_HIDDEN)),this.render(),this.ready=!0,this.setDragMode(t.dragMode),t.autoCrop&&this.crop(),this.setData(t.data),isFunction(t.ready)&&addListener(e,EVENT_READY,t.ready,{once:!0}),dispatchEvent(e,EVENT_READY)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var e=this.cropper.parentNode;e&&e.removeChild(this.cropper),removeClass(this.element,CLASS_HIDDEN)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=AnotherCropper,i}},{key:"setDefaults",value:function(e){assign(DEFAULTS,isPlainObject(e)&&e)}}]),i}();assign(Cropper.prototype,render,preview,events,handlers,change,methods);const cropper="",Copper=defineComponent({name:"copper-image",emits:["close","cropperNo","cropperOk"],setup(i,{emit:r,expose:e}){const t=reactive({visible:!1,img:null,confirmLoading:!1,options:{img:"",autoCrop:!0,autoCropWidth:180,autoCropHeight:180,fixedBox:!0,full:!1,enlarge:1,previewsCircle:!0,centerBox:!0,outputType:"png",title:"修改头像",name:null},previews:{},url:{upload:"/sys/common/saveToImgByStr"},myCropper:null}),l=ref(),o=S=>{const{options:A}=t;t.visible=!0,t.options=Object.assign({},A,S),nextTick(()=>{s()})},s=()=>{t.myCropper=new Cropper(l.value,{viewMode:1,dragMode:"move",aspectRatio:t.options.autoCropWidth/t.options.autoCropHeight,initialAspectRatio:1,autoCropArea:1,cropBoxMovable:!0,cropBoxResizable:!1,background:!0,movable:!0,modal:!0,preview:".before"})},E=S=>{switch(S){case"left":t.myCropper.rotate(90);break;case"right":t.myCropper.rotate(-90);break;case"zoomIn":t.myCropper.zoom(.1);break;case"zoomOut":t.myCropper.zoom(-.1);break}},w=()=>{t.confirmLoading=!0,t.myCropper.getCroppedCanvas({imageSmoothingQuality:"high"}).toBlob(S=>{console.log(S,"1212"),r("cropperOk",S),t.confirmLoading=!1})};return e({edit:o}),()=>createVNode("div",null,[createVNode(NGrid,{cols:2,xGap:24,style:{paddingTop:"12px"}},{default:()=>[createVNode(NGi,null,{default:()=>{var S,A;return[createVNode("div",{style:"width: 100%; height: 300px"},[((S=t.options)==null?void 0:S.img)&&createVNode("img",{ref:l,src:(A=t.options)==null?void 0:A.img,alt:""},null)]),createVNode(NSpace,{justify:"center",style:{paddingTop:"12px"}},{default:()=>[createVNode(NButton,{type:"primary",size:"small",onClick:()=>E("left")},{default:()=>[createTextVNode("逆时针旋转")]}),createVNode(NButton,{type:"primary",size:"small",onClick:()=>E("right")},{default:()=>[createTextVNode("顺时针旋转")]}),createVNode(NButton,{type:"primary",size:"small",onClick:()=>E("zoomIn")},{default:()=>[createTextVNode("放大")]}),createVNode(NButton,{type:"primary",size:"small",onClick:()=>E("zoomOut")},{default:()=>[createTextVNode("缩小")]})]})]}}),createVNode(NGi,null,{default:()=>[createVNode("span",{style:{fontSize:"15px",fontWeight:600,paddingBottom:"8px",display:"inline-block"}},[createTextVNode("预览图片")]),createVNode("div",{class:"before",style:{width:t.options.autoCropWidth+"px",height:t.options.autoCropHeight+"px",overflow:"hidden"}},null)]})]}),createVNode(NSpace,{justify:"end"},{default:()=>[createVNode(NButton,{type:"default",onClick:()=>{t.confirmLoading=!1,r("close"),r("cropperNo")}},{default:()=>[createTextVNode("取消")]}),createVNode(NButton,{type:"primary",loading:t.confirmLoading,onClick:w},{default:()=>[createTextVNode("确认")]})]})])}}),UploadFile=defineComponent({name:"upload-file",props:{fileList:{type:String,default:""},imageList:{type:Array,default:()=>[]},accept:{type:String,default:".jpg,.png,.jpeg,.gif"},listType:{type:String,default:"image-card"},showType:{type:String,default:"default"},showFileList:{type:Boolean,default:!0},text:{type:String,default:"上传文件"},size:{type:Number,default:5},max:{type:Number,default:1},multiple:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},tips:{type:String,default:""},bucketName:{type:String,default:"gyt"},path:{type:String,default:""},fileName:{type:String,default:""},cropper:{type:Boolean,default:!1},options:{type:Object,default:()=>({viewMode:0,autoCrop:!0,enlarge:1,autoCropWidth:200,autoCropHeight:200,fixedBox:!1,previewsCircle:!0,title:"上传图片"})}},emits:["update:fileList","close","readFileInputEventAsArrayBuffer","remove"],setup(i,{emit:r,expose:e,slots:t}){const l="https://".concat(i.bucketName,".ks3-cn-beijing.ksyuncs.com/"),o=useMessage(),s=ref(!1),E=ref(!1);ref();const w=ref(),S=reactive([]),A=ref([]),T=()=>{if(i.fileList){const D=i.fileList.split("/");A.value=[{id:new Date().getTime().toString(),name:D[D.length-1],status:"finished",url:i.fileList}]}else if(Array.isArray(i.imageList)){const D=[];i.imageList.forEach(C=>{const k=C.split("/");D.push({id:Date.now().toString(),name:k[k.length-1],status:"finished",url:C})}),A.value=D}else A.value=[]};T(),watch(()=>i.imageList,()=>{T()}),watch(()=>i.fileList,()=>{console.log("list"),T()}),e({handleClearFile:()=>{var D;(D=w.value)==null||D.clear(),console.log("清空",w.value)}});const q=ref(),P=async D=>{const C=D.file;let k=!0;if(i.size&&(k=C.file.size/1024/1024<i.size,!k))return o.error("文件大小不能超过".concat(i.size,"M")),!1;if(!k)return k;if(i.cropper)return L(C.file,g=>{const F=Object.assign({},i.options,{img:g,name:C.file.name});s.value=!0,setTimeout(()=>{var H;(H=q.value)==null||H.edit(F),console.log(q.value,"cropper")},100)}),!1;try{E.value=!0,console.log(i.path,C.file);const g=C.file.name,F=g.slice(g.lastIndexOf(".")),H="".concat(i.path).concat(i.fileName||Date.now()+F),U={filename:H,bucketName:i.bucketName,postData:{filename:H,acl:"public-read",key:H,unknowValueField:[]}},{data:z}=await getUploadSign(U);S.push({id:C.id,tempFiileBuffer:C.file,policy:z.policy,signature:z.signature,acl:"public-read",key:H,KSSAccessKeyId:z.kssAccessKeyId,name:H})}catch(g){return E.value=!1,!1}return!0},L=async(D,C)=>{const k=new FileReader;k.addEventListener("load",()=>C(k.result)),k.readAsDataURL(D)},Y=D=>{const C=S.find(k=>k.id==D.file.id);r("update:fileList",D.file.url),r("readFileInputEventAsArrayBuffer",C.tempFiileBuffer),s.value=!1,E.value=!1},G=async D=>{console.log("🚀 ~ options",D),r("update:fileList",""),r("remove"),E.value=!1},ne=({file:D,action:C,onFinish:k,onError:g,onProgress:F})=>{const H=S.find(U=>U.id==D.id);H.file=D,onFileUpload({file:D,action:C,data:H,onProgress:F,onFinish:k,onError:g})},I=async D=>{try{const C="".concat(i.path).concat(i.fileName||new Date().getTime()+".png"),k={filename:C,bucketName:i.bucketName,postData:{filename:C,acl:"public-read",key:C,unknowValueField:[]}},{data:g}=await getUploadSign(k),F={policy:g.policy,signature:g.signature,acl:"public-read",key:C,KSSAccessKeyId:g.kssAccessKeyId,name:C,file:D},H=await onOnlyFileUpload(l,F);console.log(H,"upload"),r("update:fileList",H),s.value=!1}catch(C){return!1}};return()=>createVNode("div",null,[createVNode(NUpload,{ref:w,action:l,customRequest:ne,fileList:A.value,"onUpdate:fileList":D=>A.value=D,listType:i.listType,accept:i.accept,multiple:i.multiple,max:i.max,disabled:i.disabled,showFileList:i.showFileList,showPreviewButton:!0,onBeforeUpload:D=>P(D),onFinish:D=>Y(D),onRemove:D=>G(D)},{default:()=>[i.showType==="default"&&i.listType==="image"&&createVNode(NButton,{loading:E.value,type:"primary"},{default:()=>[i.text]}),i.showType==="custom"&&t.custom&&t.custom()]}),i.tips&&createVNode("p",{style:"font-size: 13px; color: #666; padding-top: 4px;"},[i.tips]),createVNode(NModal,{show:s.value,"onUpdate:show":D=>s.value=D,preset:"dialog",showIcon:!1,class:["modalTitle background"],title:"上传图片",style:{width:"800px"}},{default:()=>[createVNode(Copper,{ref:q,onClose:()=>s.value=!1,onCropperOk:I},null)]})])}});export{UploadFile as U,onOnlyFileUpload as a,getUploadSign as g,onFileUpload as o};