import{b3 as ci,b4 as li,E as di,d as Hr,e as zr,r as kt,f as Ve,ay as fi,az as xr,w as Er,j as St,k as xt,Q as hi,b as pi,y as br,L as gi,l as vi}from"./index-27f38392-1715840129614.js";var Kr={exports:{}};(function(m,i){(function(r,p){m.exports=p()})(ci,function(){return function(n){var r={};function p(a){if(r[a])return r[a].exports;var d=r[a]={i:a,l:!1,exports:{}};return n[a].call(d.exports,d,d.exports,p),d.l=!0,d.exports}return p.m=n,p.c=r,p.d=function(a,d,t){p.o(a,d)||Object.defineProperty(a,d,{enumerable:!0,get:t})},p.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},p.t=function(a,d){if(d&1&&(a=p(a)),d&8||d&4&&typeof a=="object"&&a&&a.__esModule)return a;var t=Object.create(null);if(p.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:a}),d&2&&typeof a!="string")for(var R in a)p.d(t,R,(function(B){return a[B]}).bind(null,R));return t},p.n=function(a){var d=a&&a.__esModule?function(){return a.default}:function(){return a};return p.d(d,"a",d),d},p.o=function(a,d){return Object.prototype.hasOwnProperty.call(a,d)},p.p="/dist/",p(p.s="./index.js")}({"./index.js":function(n,r,p){var a=p("./src/cos.js");n.exports=a},"./lib/base64.js":function(n,r){var p=function(a){a=a||{};var d=a.Base64,t="2.1.9",R="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",B=function(l){for(var v={},C=0,P=l.length;C>>6)+b(128|C&63):b(224|C>>>12&15)+b(128|C>>>6&63)+b(128|C&63)}else{var C=65536+(v.charCodeAt(0)-55296)*1024+(v.charCodeAt(1)-56320);return b(240|C>>>18&7)+b(128|C>>>12&63)+b(128|C>>>6&63)+b(128|C&63)}},k=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,U=function(v){return v.replace(k,A)},N=function(v){var C=[0,2,1][v.length%3],P=v.charCodeAt(0)<<16|(v.length>1?v.charCodeAt(1):0)<<8|(v.length>2?v.charCodeAt(2):0),T=[R.charAt(P>>>18),R.charAt(P>>>12&63),C>=2?"=":R.charAt(P>>>6&63),C>=1?"=":R.charAt(P&63)];return T.join("")},K=a.btoa?function(l){return a.btoa(l)}:function(l){return l.replace(/[\s\S]{1,3}/g,N)},M=function(l){return K(U(l))},j=function(v,C){return C?M(String(v)).replace(/[+\/]/g,function(P){return P=="+"?"-":"_"}).replace(/=/g,""):M(String(v))},W=function(v){return j(v,!0)},q=new RegExp(["[À-ß][€-¿]","[à-ï][€-¿]{2}","[ð-÷][€-¿]{3}"].join("|"),"g"),X=function(v){switch(v.length){case 4:var C=(7&v.charCodeAt(0))<<18|(63&v.charCodeAt(1))<<12|(63&v.charCodeAt(2))<<6|63&v.charCodeAt(3),P=C-65536;return b((P>>>10)+55296)+b((P&1023)+56320);case 3:return b((15&v.charCodeAt(0))<<12|(63&v.charCodeAt(1))<<6|63&v.charCodeAt(2));default:return b((31&v.charCodeAt(0))<<6|63&v.charCodeAt(1))}},L=function(v){return v.replace(q,X)},D=function(v){var C=v.length,P=C%4,T=(C>0?B[v.charAt(0)]<<18:0)|(C>1?B[v.charAt(1)]<<12:0)|(C>2?B[v.charAt(2)]<<6:0)|(C>3?B[v.charAt(3)]:0),V=[b(T>>>16),b(T>>>8&255),b(T&255)];return V.length-=[0,0,2,1][P],V.join("")},E=a.atob?function(l){return a.atob(l)}:function(l){return l.replace(/[\s\S]{1,4}/g,D)},F=function(l){return L(E(l))},u=function(v){return F(String(v).replace(/[-_]/g,function(C){return C=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},s=function(){var v=a.Base64;return a.Base64=d,v},h={VERSION:t,atob:E,btoa:K,fromBase64:u,toBase64:j,utob:U,encode:j,encodeURI:W,btou:L,decode:u,noConflict:s};return h}();n.exports=p},"./lib/crypto.js":function(n,r,p){(function(a){var d=p("./node_modules/@babel/runtime/helpers/typeof.js"),t=t||function(R,B){var b={},A=b.lib={},k=function(){},U=A.Base={extend:function(D){k.prototype=this;var E=new k;return D&&E.mixIn(D),E.hasOwnProperty("init")||(E.init=function(){E.$super.init.apply(this,arguments)}),E.init.prototype=E,E.$super=this,E},create:function(){var D=this.extend();return D.init.apply(D,arguments),D},init:function(){},mixIn:function(D){for(var E in D)D.hasOwnProperty(E)&&(this[E]=D[E]);D.hasOwnProperty("toString")&&(this.toString=D.toString)},clone:function(){return this.init.prototype.extend(this)}},N=A.WordArray=U.extend({init:function(D,E){D=this.words=D||[],this.sigBytes=E!=B?E:4*D.length},toString:function(D){return(D||M).stringify(this)},concat:function(D){var E=this.words,F=D.words,u=this.sigBytes;if(D=D.sigBytes,this.clamp(),u%4)for(var s=0;s>>2]|=(F[s>>>2]>>>24-8*(s%4)&255)<<24-8*((u+s)%4);else if(65535>>2]=F[s>>>2];else E.push.apply(E,F);return this.sigBytes+=D,this},clamp:function(){var D=this.words,E=this.sigBytes;D[E>>>2]&=4294967295<<32-8*(E%4),D.length=R.ceil(E/4)},clone:function(){var D=U.clone.call(this);return D.words=this.words.slice(0),D},random:function(D){for(var E=[],F=0;F>>2]>>>24-8*(u%4)&255;F.push((s>>>4).toString(16)),F.push((s&15).toString(16))}return F.join("")},parse:function(D){for(var E=D.length,F=[],u=0;u>>3]|=parseInt(D.substr(u,2),16)<<24-4*(u%8);return new N.init(F,E/2)}},j=K.Latin1={stringify:function(D){var E=D.words;D=D.sigBytes;for(var F=[],u=0;u>>2]>>>24-8*(u%4)&255));return F.join("")},parse:function(D){for(var E=D.length,F=[],u=0;u>>2]|=(D.charCodeAt(u)&255)<<24-8*(u%4);return new N.init(F,E)}},W=K.Utf8={stringify:function(D){try{return decodeURIComponent(escape(j.stringify(D)))}catch(E){throw Error("Malformed UTF-8 data")}},parse:function(D){return j.parse(unescape(encodeURIComponent(D)))}},q=A.BufferedBlockAlgorithm=U.extend({reset:function(){this._data=new N.init,this._nDataBytes=0},_append:function(D){typeof D=="string"&&(D=W.parse(D)),this._data.concat(D),this._nDataBytes+=D.sigBytes},_process:function(D){var E=this._data,F=E.words,u=E.sigBytes,s=this.blockSize,h=u/(4*s),h=D?R.ceil(h):R.max((h|0)-this._minBufferSize,0);if(D=h*s,u=R.min(4*D,u),D){for(var l=0;lD;D++){if(16>D)A[D]=N[K+D]|0;else{var E=A[D-3]^A[D-8]^A[D-14]^A[D-16];A[D]=E<<1|E>>>31}E=(j<<5|j>>>27)+L+A[D],E=20>D?E+((W&q|~W&X)+1518500249):40>D?E+((W^q^X)+1859775393):60>D?E+((W&q|W&X|q&X)-1894007588):E+((W^q^X)-899497514),L=X,X=q,q=W<<30|W>>>2,W=j,j=E}M[0]=M[0]+j|0,M[1]=M[1]+W|0,M[2]=M[2]+q|0,M[3]=M[3]+X|0,M[4]=M[4]+L|0},_doFinalize:function(){var N=this._data,K=N.words,M=8*this._nDataBytes,j=8*N.sigBytes;return K[j>>>5]|=128<<24-j%32,K[(j+64>>>9<<4)+14]=Math.floor(M/4294967296),K[(j+64>>>9<<4)+15]=M,N.sigBytes=4*K.length,this._process(),this._hash},clone:function(){var N=b.clone.call(this);return N._hash=this._hash.clone(),N}});R.SHA1=b._createHelper(k),R.HmacSHA1=b._createHmacHelper(k)})(),function(){var R=t,B=R.enc.Utf8;R.algo.HMAC=R.lib.Base.extend({init:function(A,k){A=this._hasher=new A.init,typeof k=="string"&&(k=B.parse(k));var U=A.blockSize,N=4*U;k.sigBytes>N&&(k=A.finalize(k)),k.clamp();for(var K=this._oKey=k.clone(),M=this._iKey=k.clone(),j=K.words,W=M.words,q=0;q>>2]>>>24-W%4*8&255,X=N[W+1>>>2]>>>24-(W+1)%4*8&255,L=N[W+2>>>2]>>>24-(W+2)%4*8&255,D=q<<16|X<<8|L,E=0;E<4&&W+E*.75>>6*(3-E)&63));var F=M.charAt(64);if(F)for(;j.length%4;)j.push(F);return j.join("")},parse:function(U){var N=U.length,K=this._map,M=K.charAt(64);if(M){var j=U.indexOf(M);j!=-1&&(N=j)}for(var W=[],q=0,X=0;X>>6-X%4*2;W[q>>>2]|=(L|D)<<24-q%4*8,q++}return b.create(W,q)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),d(a)==="object"?a.exports=t:window.CryptoJS=t}).call(this,p("./node_modules/webpack/buildin/module.js")(n))},"./lib/json2xml.js":function(n,r,p){var a=p("./node_modules/@babel/runtime/helpers/typeof.js"),d="a-zA-Z_À-ÖØ-öø-ÿͰ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿿、-퟿豈-﷏ﷰ-�",t="-.0-9·̀-ͯ‿⁀",R=new RegExp("^([^"+d+"])|^((x|X)(m|M)(l|L))|([^"+d+t+"])","g"),B=/[^\x09\x0A\x0D\x20-\xFF\x85\xA0-\uD7FF\uE000-\uFDCF\uFDE0-\uFFFD]/gm,b=function(K){var M=[];if(K instanceof Object)for(var j in K)K.hasOwnProperty(j)&&M.push(j);return M},A=function(K,M){var j=function(q,X,L,D,E){var F=M.indent!==void 0?M.indent:" ",u=M.prettyPrint?"\n"+new Array(D).join(F):"";M.removeIllegalNameCharacters&&(q=q.replace(R,"_"));var s=[u,"<",q,L||""];return X&&X.length>0?(s.push(">"),s.push(X),E&&s.push(u),s.push("")):s.push("/>"),s.join("")};return function W(q,X,L){var D=a(q);switch((Array.isArray?Array.isArray(q):q instanceof Array)?D="array":q instanceof Date&&(D="date"),D){case"array":var E=[];return q.map(function(h){E.push(W(h,1,L+1))}),M.prettyPrint&&E.push("\n"),E.join("");case"date":return q.toJSON?q.toJSON():q+"";case"object":var F=[];for(var u in q)if(q.hasOwnProperty(u))if(q[u]instanceof Array)for(var s=0;s0&&F.push("\n"),F.join("");case"function":return q();default:return M.escape?U(q):""+q}}(K,0,0)},k=function(K){var M=['"),M.join("")};function U(N){return(""+N).replace(/&/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""").replace(B,"")}n.exports=function(N,K){if(K||(K={xmlHeader:{standalone:!0},prettyPrint:!0,indent:" ",escape:!0}),typeof N=="string")try{N=JSON.parse(N.toString())}catch(q){return!1}var M="",j="";K&&(a(K)=="object"?(K.xmlHeader&&(M=k(!!K.xmlHeader.standalone)),typeof K.docType<"u"&&(j="")):M=k()),K=K||{};var W=[M,K.prettyPrint&&j?"\n":"",j,A(N,K)];return W.join("").replace(/\n{2,}/g,"\n").replace(/\s+$/g,"")}},"./lib/md5.js":function(n,r,p){(function(a){var d,t=p("./node_modules/@babel/runtime/helpers/typeof.js");(function(){var R=(typeof window>"u"?"undefined":t(window))==="object",B=R?window:{};B.JS_MD5_NO_WINDOW&&(R=!1);var b=!R&&(typeof self>"u"?"undefined":t(self))==="object";b&&(B=self);var A=!B.JS_MD5_NO_COMMON_JS&&t(a)==="object"&&a.exports,k=p("./node_modules/webpack/buildin/amd-options.js"),U=!B.JS_MD5_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",N="0123456789abcdef".split(""),K=[128,32768,8388608,-2147483648],M=[0,8,16,24],j=["hex","array","digest","buffer","arrayBuffer","base64"],W="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),q=[],X;if(U){var L=new ArrayBuffer(68);X=new Uint8Array(L),q=new Uint32Array(L)}(B.JS_MD5_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(s){return Object.prototype.toString.call(s)==="[object Array]"}),U&&(B.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(s){return t(s)==="object"&&s.buffer&&s.buffer.constructor===ArrayBuffer});var D=function(h){return function(l,v){return new F(!0).update(l,v)[h]()}},E=function(){var h=D("hex");h.getCtx=h.create=function(){return new F},h.update=function(C){return h.create().update(C)};for(var l=0;l>6,V[C++]=128|l&63):l<55296||l>=57344?(V[C++]=224|l>>12,V[C++]=128|l>>6&63,V[C++]=128|l&63):(l=65536+((l&1023)<<10|s.charCodeAt(++v)&1023),V[C++]=240|l>>18,V[C++]=128|l>>12&63,V[C++]=128|l>>6&63,V[C++]=128|l&63);else for(C=this.start;v>2]|=l<>2]|=(192|l>>6)<>2]|=(128|l&63)<=57344?(T[C>>2]|=(224|l>>12)<>2]|=(128|l>>6&63)<>2]|=(128|l&63)<>2]|=(240|l>>18)<>2]|=(128|l>>12&63)<>2]|=(128|l>>6&63)<>2]|=(128|l&63)<=64?(this.start=C-64,this.hash(),this.hashed=!0):this.start=C}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},F.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var s=this.blocks,h=this.lastByteIndex;s[h>>2]|=K[h&3],h>=56&&(this.hashed||this.hash(),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),s[14]=this.bytes<<3,s[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},F.prototype.hash=function(){var s,h,l,v,C,P,T=this.blocks;this.first?(s=T[0]-680876937,s=(s<<7|s>>>25)-271733879<<0,v=(-1732584194^s&2004318071)+T[1]-117830708,v=(v<<12|v>>>20)+s<<0,l=(-271733879^v&(s^-271733879))+T[2]-1126478375,l=(l<<17|l>>>15)+v<<0,h=(s^l&(v^s))+T[3]-1316259209,h=(h<<22|h>>>10)+l<<0):(s=this.h0,h=this.h1,l=this.h2,v=this.h3,s+=(v^h&(l^v))+T[0]-680876936,s=(s<<7|s>>>25)+h<<0,v+=(l^s&(h^l))+T[1]-389564586,v=(v<<12|v>>>20)+s<<0,l+=(h^v&(s^h))+T[2]+606105819,l=(l<<17|l>>>15)+v<<0,h+=(s^l&(v^s))+T[3]-1044525330,h=(h<<22|h>>>10)+l<<0),s+=(v^h&(l^v))+T[4]-176418897,s=(s<<7|s>>>25)+h<<0,v+=(l^s&(h^l))+T[5]+1200080426,v=(v<<12|v>>>20)+s<<0,l+=(h^v&(s^h))+T[6]-1473231341,l=(l<<17|l>>>15)+v<<0,h+=(s^l&(v^s))+T[7]-45705983,h=(h<<22|h>>>10)+l<<0,s+=(v^h&(l^v))+T[8]+1770035416,s=(s<<7|s>>>25)+h<<0,v+=(l^s&(h^l))+T[9]-1958414417,v=(v<<12|v>>>20)+s<<0,l+=(h^v&(s^h))+T[10]-42063,l=(l<<17|l>>>15)+v<<0,h+=(s^l&(v^s))+T[11]-1990404162,h=(h<<22|h>>>10)+l<<0,s+=(v^h&(l^v))+T[12]+1804603682,s=(s<<7|s>>>25)+h<<0,v+=(l^s&(h^l))+T[13]-40341101,v=(v<<12|v>>>20)+s<<0,l+=(h^v&(s^h))+T[14]-1502002290,l=(l<<17|l>>>15)+v<<0,h+=(s^l&(v^s))+T[15]+1236535329,h=(h<<22|h>>>10)+l<<0,s+=(l^v&(h^l))+T[1]-165796510,s=(s<<5|s>>>27)+h<<0,v+=(h^l&(s^h))+T[6]-1069501632,v=(v<<9|v>>>23)+s<<0,l+=(s^h&(v^s))+T[11]+643717713,l=(l<<14|l>>>18)+v<<0,h+=(v^s&(l^v))+T[0]-373897302,h=(h<<20|h>>>12)+l<<0,s+=(l^v&(h^l))+T[5]-701558691,s=(s<<5|s>>>27)+h<<0,v+=(h^l&(s^h))+T[10]+38016083,v=(v<<9|v>>>23)+s<<0,l+=(s^h&(v^s))+T[15]-660478335,l=(l<<14|l>>>18)+v<<0,h+=(v^s&(l^v))+T[4]-405537848,h=(h<<20|h>>>12)+l<<0,s+=(l^v&(h^l))+T[9]+568446438,s=(s<<5|s>>>27)+h<<0,v+=(h^l&(s^h))+T[14]-1019803690,v=(v<<9|v>>>23)+s<<0,l+=(s^h&(v^s))+T[3]-187363961,l=(l<<14|l>>>18)+v<<0,h+=(v^s&(l^v))+T[8]+1163531501,h=(h<<20|h>>>12)+l<<0,s+=(l^v&(h^l))+T[13]-1444681467,s=(s<<5|s>>>27)+h<<0,v+=(h^l&(s^h))+T[2]-51403784,v=(v<<9|v>>>23)+s<<0,l+=(s^h&(v^s))+T[7]+1735328473,l=(l<<14|l>>>18)+v<<0,h+=(v^s&(l^v))+T[12]-1926607734,h=(h<<20|h>>>12)+l<<0,C=h^l,s+=(C^v)+T[5]-378558,s=(s<<4|s>>>28)+h<<0,v+=(C^s)+T[8]-2022574463,v=(v<<11|v>>>21)+s<<0,P=v^s,l+=(P^h)+T[11]+1839030562,l=(l<<16|l>>>16)+v<<0,h+=(P^l)+T[14]-35309556,h=(h<<23|h>>>9)+l<<0,C=h^l,s+=(C^v)+T[1]-1530992060,s=(s<<4|s>>>28)+h<<0,v+=(C^s)+T[4]+1272893353,v=(v<<11|v>>>21)+s<<0,P=v^s,l+=(P^h)+T[7]-155497632,l=(l<<16|l>>>16)+v<<0,h+=(P^l)+T[10]-1094730640,h=(h<<23|h>>>9)+l<<0,C=h^l,s+=(C^v)+T[13]+681279174,s=(s<<4|s>>>28)+h<<0,v+=(C^s)+T[0]-358537222,v=(v<<11|v>>>21)+s<<0,P=v^s,l+=(P^h)+T[3]-722521979,l=(l<<16|l>>>16)+v<<0,h+=(P^l)+T[6]+76029189,h=(h<<23|h>>>9)+l<<0,C=h^l,s+=(C^v)+T[9]-640364487,s=(s<<4|s>>>28)+h<<0,v+=(C^s)+T[12]-421815835,v=(v<<11|v>>>21)+s<<0,P=v^s,l+=(P^h)+T[15]+530742520,l=(l<<16|l>>>16)+v<<0,h+=(P^l)+T[2]-995338651,h=(h<<23|h>>>9)+l<<0,s+=(l^(h|~v))+T[0]-198630844,s=(s<<6|s>>>26)+h<<0,v+=(h^(s|~l))+T[7]+1126891415,v=(v<<10|v>>>22)+s<<0,l+=(s^(v|~h))+T[14]-1416354905,l=(l<<15|l>>>17)+v<<0,h+=(v^(l|~s))+T[5]-57434055,h=(h<<21|h>>>11)+l<<0,s+=(l^(h|~v))+T[12]+1700485571,s=(s<<6|s>>>26)+h<<0,v+=(h^(s|~l))+T[3]-1894986606,v=(v<<10|v>>>22)+s<<0,l+=(s^(v|~h))+T[10]-1051523,l=(l<<15|l>>>17)+v<<0,h+=(v^(l|~s))+T[1]-2054922799,h=(h<<21|h>>>11)+l<<0,s+=(l^(h|~v))+T[8]+1873313359,s=(s<<6|s>>>26)+h<<0,v+=(h^(s|~l))+T[15]-30611744,v=(v<<10|v>>>22)+s<<0,l+=(s^(v|~h))+T[6]-1560198380,l=(l<<15|l>>>17)+v<<0,h+=(v^(l|~s))+T[13]+1309151649,h=(h<<21|h>>>11)+l<<0,s+=(l^(h|~v))+T[4]-145523070,s=(s<<6|s>>>26)+h<<0,v+=(h^(s|~l))+T[11]-1120210379,v=(v<<10|v>>>22)+s<<0,l+=(s^(v|~h))+T[2]+718787259,l=(l<<15|l>>>17)+v<<0,h+=(v^(l|~s))+T[9]-343485551,h=(h<<21|h>>>11)+l<<0,this.first?(this.h0=s+1732584193<<0,this.h1=h-271733879<<0,this.h2=l-1732584194<<0,this.h3=v+271733878<<0,this.first=!1):(this.h0=this.h0+s<<0,this.h1=this.h1+h<<0,this.h2=this.h2+l<<0,this.h3=this.h3+v<<0)},F.prototype.hex=function(){this.finalize();var s=this.h0,h=this.h1,l=this.h2,v=this.h3;return N[s>>4&15]+N[s&15]+N[s>>12&15]+N[s>>8&15]+N[s>>20&15]+N[s>>16&15]+N[s>>28&15]+N[s>>24&15]+N[h>>4&15]+N[h&15]+N[h>>12&15]+N[h>>8&15]+N[h>>20&15]+N[h>>16&15]+N[h>>28&15]+N[h>>24&15]+N[l>>4&15]+N[l&15]+N[l>>12&15]+N[l>>8&15]+N[l>>20&15]+N[l>>16&15]+N[l>>28&15]+N[l>>24&15]+N[v>>4&15]+N[v&15]+N[v>>12&15]+N[v>>8&15]+N[v>>20&15]+N[v>>16&15]+N[v>>28&15]+N[v>>24&15]},F.prototype.toString=F.prototype.hex,F.prototype.digest=function(s){if(s==="hex")return this.hex();this.finalize();var h=this.h0,l=this.h1,v=this.h2,C=this.h3,P=[h&255,h>>8&255,h>>16&255,h>>24&255,l&255,l>>8&255,l>>16&255,l>>24&255,v&255,v>>8&255,v>>16&255,v>>24&255,C&255,C>>8&255,C>>16&255,C>>24&255];return P},F.prototype.array=F.prototype.digest,F.prototype.arrayBuffer=function(){this.finalize();var s=new ArrayBuffer(16),h=new Uint32Array(s);return h[0]=this.h0,h[1]=this.h1,h[2]=this.h2,h[3]=this.h3,s},F.prototype.buffer=F.prototype.arrayBuffer,F.prototype.base64=function(){for(var s,h,l,v="",C=this.array(),P=0;P<15;)s=C[P++],h=C[P++],l=C[P++],v+=W[s>>>2]+W[(s<<4|h>>>4)&63]+W[(h<<2|l>>>6)&63]+W[l&63];return s=C[P],v+=W[s>>>2]+W[s<<4&63]+"==",v};var u=E();A?a.exports=u:(B.md5=u,k&&(d=(function(){return u}).call(u,p,u,a),d!==void 0&&(a.exports=d)))})()}).call(this,p("./node_modules/webpack/buildin/module.js")(n))},"./lib/request.js":function(n,r,p){var a=p("./node_modules/@babel/runtime/helpers/typeof.js"),d=function(k){switch(a(k)){case"string":return k;case"boolean":return k?"true":"false";case"number":return isFinite(k)?k:"";default:return""}},t=function(k,U,N,K){return U=U||"&",N=N||"=",k===null&&(k=void 0),a(k)==="object"?Object.keys(k).map(function(M){var j=encodeURIComponent(d(M))+N;return Array.isArray(k[M])?k[M].map(function(W){return j+encodeURIComponent(d(W))}).join(U):j+encodeURIComponent(d(k[M]))}).filter(Boolean).join(U):K?encodeURIComponent(d(K))+N+encodeURIComponent(d(k)):""},R=function(k,U,N){var K={},M=U.getAllResponseHeaders();return M&&M.length>0&&M.trim().split("\n").forEach(function(j){if(j){var W=j.indexOf(":"),q=j.substr(0,W).trim().toLowerCase(),X=j.substr(W+1).trim();K[q]=X}}),{error:k,statusCode:U.status,statusMessage:U.statusText,headers:K,body:N}},B=function(k,U){return!U&&U==="text"?k.responseText:k.response},b=function(k,U){var N=(k.method||"GET").toUpperCase(),K=k.url;if(k.qs){var M=t(k.qs);M&&(K+=(K.indexOf("?")===-1?"?":"&")+M)}var j=new XMLHttpRequest;if(j.open(N,K,!0),j.responseType=k.dataType||"text",k.xhrFields)for(var W in k.xhrFields)j[W]=k.xhrFields[W];var q=k.headers;if(q)for(var X in q)q.hasOwnProperty(X)&&X.toLowerCase()!=="content-length"&&X.toLowerCase()!=="user-agent"&&X.toLowerCase()!=="origin"&&X.toLowerCase()!=="host"&&j.setRequestHeader(X,q[X]);return k.onProgress&&j.upload&&(j.upload.onprogress=k.onProgress),k.onDownloadProgress&&(j.onprogress=k.onDownloadProgress),k.timeout&&(j.timeout=k.timeout),j.ontimeout=function(L){var D=new Error("timeout");U(R(D,j))},j.onload=function(){U(R(null,j,B(j,k.dataType)))},j.onerror=function(L){var D=B(j,k.dataType);if(D)U(R(null,j,D));else{var E=j.statusText;!E&&j.status===0&&(E=new Error("CORS blocked or network error")),U(R(E,j,D))}},j.send(k.body||""),j};n.exports=b},"./lib/xml2json.js":function(n,r,p){var a=p("./node_modules/@xmldom/xmldom/lib/index.js").DOMParser,d=(function(){this.version="1.3.5";var R={mergeCDATA:!0,normalize:!0,stripElemPrefix:!0},B=new RegExp(/(?!xmlns)^.*:/);return this.grokType=function(b){return/^\s*$/.test(b)?null:/^(?:true|false)$/i.test(b)?b.toLowerCase()==="true":isFinite(b)?parseFloat(b):b},this.parseString=function(b,A){if(b){var k=this.stringToXML(b);return k.getElementsByTagName("parsererror").length?null:this.parseXML(k,A)}else return null},this.parseXML=function(b,A){for(var k in A)R[k]=A[k];var U={},N=0,K="",M=b.childNodes.length;if(M)for(var j,W,q,X=0;X=D+E||D?new java.lang.String(L,D,E)+"":L}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(L){M.prototype[L]=function(){return null}});function X(L,D){L.currentElement?L.currentElement.appendChild(D):L.doc.appendChild(D)}r.__DOMHandler=M,r.normalizeLineEndings=U,r.DOMParser=N},"./node_modules/@xmldom/xmldom/lib/dom.js":function(n,r,p){var a=p("./node_modules/@xmldom/xmldom/lib/conventions.js"),d=a.find,t=a.NAMESPACE;function R(c){return c!==""}function B(c){return c?c.split(/[\t\n\f\r ]+/).filter(R):[]}function b(c,y){return c.hasOwnProperty(y)||(c[y]=!0),c}function A(c){if(!c)return[];var y=B(c);return Object.keys(y.reduce(b,{}))}function k(c){return function(y){return c&&c.indexOf(y)!==-1}}function U(c,y){for(var w in c)Object.prototype.hasOwnProperty.call(c,w)&&(y[w]=c[w])}function N(c,y){var w=c.prototype;if(!(w instanceof y)){let z=function(){};z.prototype=y.prototype,z=new z,U(w,z),c.prototype=w=z}w.constructor!=c&&(typeof c!="function"&&console.error("unknown Class:"+c),w.constructor=c)}var K={},M=K.ELEMENT_NODE=1,j=K.ATTRIBUTE_NODE=2,W=K.TEXT_NODE=3,q=K.CDATA_SECTION_NODE=4,X=K.ENTITY_REFERENCE_NODE=5,L=K.ENTITY_NODE=6,D=K.PROCESSING_INSTRUCTION_NODE=7,E=K.COMMENT_NODE=8,F=K.DOCUMENT_NODE=9,u=K.DOCUMENT_TYPE_NODE=10,s=K.DOCUMENT_FRAGMENT_NODE=11,h=K.NOTATION_NODE=12,l={},v={};l.INDEX_SIZE_ERR=(v[1]="Index size error",1),l.DOMSTRING_SIZE_ERR=(v[2]="DOMString size error",2);var C=l.HIERARCHY_REQUEST_ERR=(v[3]="Hierarchy request error",3);l.WRONG_DOCUMENT_ERR=(v[4]="Wrong document",4),l.INVALID_CHARACTER_ERR=(v[5]="Invalid character",5),l.NO_DATA_ALLOWED_ERR=(v[6]="No data allowed",6),l.NO_MODIFICATION_ALLOWED_ERR=(v[7]="No modification allowed",7);var P=l.NOT_FOUND_ERR=(v[8]="Not found",8);l.NOT_SUPPORTED_ERR=(v[9]="Not supported",9);var T=l.INUSE_ATTRIBUTE_ERR=(v[10]="Attribute in use",10);l.INVALID_STATE_ERR=(v[11]="Invalid state",11),l.SYNTAX_ERR=(v[12]="Syntax error",12),l.INVALID_MODIFICATION_ERR=(v[13]="Invalid modification",13),l.NAMESPACE_ERR=(v[14]="Invalid namespace",14),l.INVALID_ACCESS_ERR=(v[15]="Invalid access",15);function V(c,y){if(y instanceof Error)var w=y;else w=this,Error.call(this,v[c]),this.message=v[c],Error.captureStackTrace&&Error.captureStackTrace(this,V);return w.code=c,y&&(this.message=this.message+": "+y),w}V.prototype=Error.prototype,U(l,V);function $(){}$.prototype={length:0,item:function(c){return c>=0&&c=0){for(var le=y.length-1;z0},lookupPrefix:function(c){for(var y=this;y;){var w=y._nsMap;if(w){for(var z in w)if(Object.prototype.hasOwnProperty.call(w,z)&&w[z]===c)return z}y=y.nodeType==j?y.ownerDocument:y.parentNode}return null},lookupNamespaceURI:function(c){for(var y=this;y;){var w=y._nsMap;if(w&&Object.prototype.hasOwnProperty.call(w,c))return w[c];y=y.nodeType==j?y.ownerDocument:y.parentNode}return null},isDefaultNamespace:function(c){var y=this.lookupPrefix(c);return y==null}};function Z(c){return c=="<"&&"<"||c==">"&&">"||c=="&"&&"&"||c=='"'&&"""||"&#"+c.charCodeAt()+";"}U(K,Y),U(K,Y.prototype);function he(c,y){if(y(c))return!0;if(c=c.firstChild)do if(he(c,y))return!0;while(c=c.nextSibling)}function ve(){this.ownerDocument=this}function pe(c,y,w){c&&c._inc++;var z=w.namespaceURI;z===t.XMLNS&&(y._nsMap[w.prefix?w.localName:""]=w.value)}function ge(c,y,w,z){c&&c._inc++;var le=w.namespaceURI;le===t.XMLNS&&delete y._nsMap[w.prefix?w.localName:""]}function ye(c,y,w){if(c&&c._inc){c._inc++;var z=y.childNodes;if(w)z[z.length++]=w;else{for(var le=y.firstChild,Ee=0;le;)z[Ee++]=le,le=le.nextSibling;z.length=Ee,delete z[z.length]}}}function me(c,y){var w=y.previousSibling,z=y.nextSibling;return w?w.nextSibling=z:c.firstChild=z,z?z.previousSibling=w:c.lastChild=w,y.parentNode=null,y.previousSibling=null,y.nextSibling=null,ye(c.ownerDocument,c),y}function De(c){return c&&(c.nodeType===Y.DOCUMENT_NODE||c.nodeType===Y.DOCUMENT_FRAGMENT_NODE||c.nodeType===Y.ELEMENT_NODE)}function ke(c){return c&&(xe(c)||Ue(c)||Se(c)||c.nodeType===Y.DOCUMENT_FRAGMENT_NODE||c.nodeType===Y.COMMENT_NODE||c.nodeType===Y.PROCESSING_INSTRUCTION_NODE)}function Se(c){return c&&c.nodeType===Y.DOCUMENT_TYPE_NODE}function xe(c){return c&&c.nodeType===Y.ELEMENT_NODE}function Ue(c){return c&&c.nodeType===Y.TEXT_NODE}function Fe(c,y){var w=c.childNodes||[];if(d(w,xe)||Se(y))return!1;var z=d(w,Se);return!(y&&z&&w.indexOf(z)>w.indexOf(y))}function ie(c,y){var w=c.childNodes||[];function z(Ee){return xe(Ee)&&Ee!==y}if(d(w,z))return!1;var le=d(w,Se);return!(y&&le&&w.indexOf(le)>w.indexOf(y))}function I(c,y,w){if(!De(c))throw new V(C,"Unexpected parent node type "+c.nodeType);if(w&&w.parentNode!==c)throw new V(P,"child not in parent");if(!ke(y)||Se(y)&&c.nodeType!==Y.DOCUMENT_NODE)throw new V(C,"Unexpected node type "+y.nodeType+" for parent node type "+c.nodeType)}function G(c,y,w){var z=c.childNodes||[],le=y.childNodes||[];if(y.nodeType===Y.DOCUMENT_FRAGMENT_NODE){var Ee=le.filter(xe);if(Ee.length>1||d(le,Ue))throw new V(C,"More than one element or text in fragment");if(Ee.length===1&&!Fe(c,w))throw new V(C,"Element in fragment can not be inserted before doctype")}if(xe(y)&&!Fe(c,w))throw new V(C,"Only one element can be added and only after doctype");if(Se(y)){if(d(z,Se))throw new V(C,"Only one doctype is allowed");var je=d(z,xe);if(w&&z.indexOf(je)1||d(le,Ue))throw new V(C,"More than one element or text in fragment");if(Ee.length===1&&!ie(c,w))throw new V(C,"Element in fragment can not be inserted before doctype")}if(xe(y)&&!ie(c,w))throw new V(C,"Only one element can be added and only after doctype");if(Se(y)){if(d(z,function(de){return Se(de)&&de!==w}))throw new V(C,"Only one doctype is allowed");var je=d(z,xe);if(w&&z.indexOf(je)0&&he(w.documentElement,function(le){if(le!==w&&le.nodeType===M){var Ee=le.getAttribute("class");if(Ee){var je=c===Ee;if(!je){var Ye=A(Ee);je=y.every(k(Ye))}je&&z.push(le)}}}),z})},createElement:function(c){var y=new se;y.ownerDocument=this,y.nodeName=c,y.tagName=c,y.localName=c,y.childNodes=new $;var w=y.attributes=new re;return w._ownerElement=y,y},createDocumentFragment:function(){var c=new Re;return c.ownerDocument=this,c.childNodes=new $,c},createTextNode:function(c){var y=new Pe;return y.ownerDocument=this,y.appendData(c),y},createComment:function(c){var y=new Me;return y.ownerDocument=this,y.appendData(c),y},createCDATASection:function(c){var y=new Ke;return y.ownerDocument=this,y.appendData(c),y},createProcessingInstruction:function(c,y){var w=new Ze;return w.ownerDocument=this,w.tagName=w.nodeName=w.target=c,w.nodeValue=w.data=y,w},createAttribute:function(c){var y=new Ae;return y.ownerDocument=this,y.name=c,y.nodeName=c,y.localName=c,y.specified=!0,y},createEntityReference:function(c){var y=new Qe;return y.ownerDocument=this,y.nodeName=c,y},createElementNS:function(c,y){var w=new se,z=y.split(":"),le=w.attributes=new re;return w.childNodes=new $,w.ownerDocument=this,w.nodeName=y,w.tagName=y,w.namespaceURI=c,z.length==2?(w.prefix=z[0],w.localName=z[1]):w.localName=y,le._ownerElement=w,w},createAttributeNS:function(c,y){var w=new Ae,z=y.split(":");return w.ownerDocument=this,w.nodeName=y,w.name=y,w.namespaceURI=c,w.specified=!0,z.length==2?(w.prefix=z[0],w.localName=z[1]):w.localName=y,w}},N(ve,Y);function se(){this._nsMap={}}se.prototype={nodeType:M,hasAttribute:function(c){return this.getAttributeNode(c)!=null},getAttribute:function(c){var y=this.getAttributeNode(c);return y&&y.value||""},getAttributeNode:function(c){return this.attributes.getNamedItem(c)},setAttribute:function(c,y){var w=this.ownerDocument.createAttribute(c);w.value=w.nodeValue=""+y,this.setAttributeNode(w)},removeAttribute:function(c){var y=this.getAttributeNode(c);y&&this.removeAttributeNode(y)},appendChild:function(c){return c.nodeType===s?this.insertBefore(c,null):ue(this,c)},setAttributeNode:function(c){return this.attributes.setNamedItem(c)},setAttributeNodeNS:function(c){return this.attributes.setNamedItemNS(c)},removeAttributeNode:function(c){return this.attributes.removeNamedItem(c.nodeName)},removeAttributeNS:function(c,y){var w=this.getAttributeNodeNS(c,y);w&&this.removeAttributeNode(w)},hasAttributeNS:function(c,y){return this.getAttributeNodeNS(c,y)!=null},getAttributeNS:function(c,y){var w=this.getAttributeNodeNS(c,y);return w&&w.value||""},setAttributeNS:function(c,y,w){var z=this.ownerDocument.createAttributeNS(c,y);z.value=z.nodeValue=""+w,this.setAttributeNode(z)},getAttributeNodeNS:function(c,y){return this.attributes.getNamedItemNS(c,y)},getElementsByTagName:function(c){return new ee(this,function(y){var w=[];return he(y,function(z){z!==y&&z.nodeType==M&&(c==="*"||z.tagName==c)&&w.push(z)}),w})},getElementsByTagNameNS:function(c,y){return new ee(this,function(w){var z=[];return he(w,function(le){le!==w&&le.nodeType===M&&(c==="*"||le.namespaceURI===c)&&(y==="*"||le.localName==y)&&z.push(le)}),z})}},ve.prototype.getElementsByTagName=se.prototype.getElementsByTagName,ve.prototype.getElementsByTagNameNS=se.prototype.getElementsByTagNameNS,N(se,Y);function Ae(){}Ae.prototype.nodeType=j,N(Ae,Y);function Be(){}Be.prototype={data:"",substringData:function(c,y){return this.data.substring(c,c+y)},appendData:function(c){c=this.data+c,this.nodeValue=this.data=c,this.length=c.length},insertData:function(c,y){this.replaceData(c,0,y)},appendChild:function(c){throw new Error(v[C])},deleteData:function(c,y){this.replaceData(c,y,"")},replaceData:function(c,y,w){var z=this.data.substring(0,c),le=this.data.substring(c+y);w=z+w+le,this.nodeValue=this.data=w,this.length=w.length}},N(Be,Y);function Pe(){}Pe.prototype={nodeName:"#text",nodeType:W,splitText:function(c){var y=this.data,w=y.substring(c);y=y.substring(0,c),this.data=this.nodeValue=y,this.length=y.length;var z=this.ownerDocument.createTextNode(w);return this.parentNode&&this.parentNode.insertBefore(z,this.nextSibling),z}},N(Pe,Be);function Me(){}Me.prototype={nodeName:"#comment",nodeType:E},N(Me,Be);function Ke(){}Ke.prototype={nodeName:"#cdata-section",nodeType:q},N(Ke,Be);function _e(){}_e.prototype.nodeType=u,N(_e,Y);function Xe(){}Xe.prototype.nodeType=h,N(Xe,Y);function nt(){}nt.prototype.nodeType=L,N(nt,Y);function Qe(){}Qe.prototype.nodeType=X,N(Qe,Y);function Re(){}Re.prototype.nodeName="#document-fragment",Re.prototype.nodeType=s,N(Re,Y);function Ze(){}Ze.prototype.nodeType=D,N(Ze,Y);function ht(){}ht.prototype.serializeToString=function(c,y,w){return gt.call(c,y,w)},Y.prototype.toString=gt;function gt(c,y){var w=[],z=this.nodeType==9&&this.documentElement||this,le=z.prefix,Ee=z.namespaceURI;if(Ee&&le==null){var le=z.lookupPrefix(Ee);if(le==null)var je=[{namespace:Ee,prefix:null}]}return ot(this,w,c,y,je),w.join("")}function Tt(c,y,w){var z=c.prefix||"",le=c.namespaceURI;if(!le||z==="xml"&&le===t.XML||le===t.XMLNS)return!1;for(var Ee=w.length;Ee--;){var je=w[Ee];if(je.prefix===z)return je.namespace!==le}return!0}function Dt(c,y,w){c.push(" ",y,'="',w.replace(/[<>&"\t\n\r]/g,Z),'"')}function ot(c,y,w,z,le){if(le||(le=[]),z)if(c=z(c),c){if(typeof c=="string"){y.push(c);return}}else return;switch(c.nodeType){case M:var Ee=c.attributes,je=Ee.length,x=c.firstChild,Ye=c.tagName;w=t.isHTML(c.namespaceURI)||w;var de=Ye;if(!w&&!c.prefix&&c.namespaceURI){for(var ut,et=0;et=0;pt--){var e=le[pt];if(e.prefix===""&&e.namespace===c.namespaceURI){ut=e.namespace;break}}if(ut!==c.namespaceURI)for(var pt=le.length-1;pt>=0;pt--){var e=le[pt];if(e.namespace===c.namespaceURI){e.prefix&&(de=e.prefix+":"+Ye);break}}}y.push("<",de);for(var g=0;g"),w&&/^script$/i.test(Ye))for(;x;)x.data?y.push(x.data):ot(x,y,w,z,le.slice()),x=x.nextSibling;else for(;x;)ot(x,y,w,z,le.slice()),x=x.nextSibling;y.push("")}else y.push("/>");return;case F:case s:for(var x=c.firstChild;x;)ot(x,y,w,z,le.slice()),x=x.nextSibling;return;case j:return Dt(y,c.name,c.value);case W:return y.push(c.data.replace(/[<&>]/g,Z));case q:return y.push("");case E:return y.push("");case u:var O=c.publicId,_=c.systemId;if(y.push("");else if(_&&_!=".")y.push(" SYSTEM ",_,">");else{var Q=c.internalSubset;Q&&y.push(" [",Q,"]"),y.push(">")}return;case D:return y.push("");case X:return y.push("&",c.nodeName,";");default:y.push("??",c.nodeName)}}function wt(c,y,w){var z;switch(y.nodeType){case M:z=y.cloneNode(!1),z.ownerDocument=c;case s:break;case j:w=!0;break}if(z||(z=y.cloneNode(!1)),z.ownerDocument=c,z.parentNode=null,w)for(var le=y.firstChild;le;)z.appendChild(wt(c,le,w)),le=le.nextSibling;return z}function At(c,y,w){var z=new y.constructor;for(var le in y)if(Object.prototype.hasOwnProperty.call(y,le)){var Ee=y[le];typeof Ee!="object"&&Ee!=z[le]&&(z[le]=Ee)}switch(y.childNodes&&(z.childNodes=new $),z.ownerDocument=c,z.nodeType){case M:var je=y.attributes,Ye=z.attributes=new re,de=je.length;Ye._ownerElement=z;for(var ut=0;ut",lt:"<",quot:'"'}),r.HTML_ENTITIES=a({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(n,r,p){var a=p("./node_modules/@xmldom/xmldom/lib/dom.js");r.DOMImplementation=a.DOMImplementation,r.XMLSerializer=a.XMLSerializer,r.DOMParser=p("./node_modules/@xmldom/xmldom/lib/dom-parser.js").DOMParser},"./node_modules/@xmldom/xmldom/lib/sax.js":function(n,r,p){var a=p("./node_modules/@xmldom/xmldom/lib/conventions.js").NAMESPACE,d=/[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]/,t=new RegExp("[\\-\\.0-9"+d.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),R=new RegExp("^"+d.source+t.source+"*(?::"+d.source+t.source+"*)?$"),B=0,b=1,A=2,k=3,U=4,N=5,K=6,M=7;function j(C,P){this.message=C,this.locator=P,Error.captureStackTrace&&Error.captureStackTrace(this,j)}j.prototype=new Error,j.prototype.name=j.name;function W(){}W.prototype={parse:function(C,P,T){var V=this.domBuilder;V.startDocument(),u(P,P={}),q(C,P,T,V,this.errorHandler),V.endDocument()}};function q(C,P,T,V,$){function ee(se){if(se>65535){se-=65536;var Ae=55296+(se>>10),Be=56320+(se&1023);return String.fromCharCode(Ae,Be)}else return String.fromCharCode(se)}function ne(se){var Ae=se.slice(1,-1);return Object.hasOwnProperty.call(T,Ae)?T[Ae]:Ae.charAt(0)==="#"?ee(parseInt(Ae.substr(1).replace("x","0x"))):($.error("entity not found:"+se),se)}function re(se){if(se>ve){var Ae=C.substring(ve,se).replace(/&#?\w+;/g,ne);Y&&J(ve),V.characters(Ae,0,se-ve),ve=se}}function J(se,Ae){for(;se>=oe&&(Ae=fe.exec(C));)ce=Ae.index,oe=ce+Ae[0].length,Y.lineNumber++;Y.columnNumber=se-ce+1}for(var ce=0,oe=0,fe=/.*(?:\r\n?|\n)|.*$/g,Y=V.locator,Z=[{currentNSMap:P}],he={},ve=0;;){try{var pe=C.indexOf("<",ve);if(pe<0){if(!C.substr(ve).match(/^\s*$/)){var ge=V.doc,ye=ge.createTextNode(C.substr(ve));ge.appendChild(ye),V.currentElement=ye}return}switch(pe>ve&&re(pe),C.charAt(pe+1)){case"/":var I=C.indexOf(">",pe+3),me=C.substring(pe+2,I).replace(/[ \t\n\r]+$/g,""),De=Z.pop();I<0?(me=C.substring(pe+2).replace(/[\s<].*/,""),$.error("end tag name: "+me+" is not complete:"+De.tagName),I=pe+1+me.length):me.match(/\sve?ve=I:re(Math.max(pe,ve)+1)}}function X(C,P){return P.lineNumber=C.lineNumber,P.columnNumber=C.columnNumber,P}function L(C,P,T,V,$,ee){function ne(Y,Z,he){T.attributeNames.hasOwnProperty(Y)&&ee.fatalError("Attribute "+Y+" redefined"),T.addValue(Y,Z.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,$),he)}for(var re,J,ce=++P,oe=B;;){var fe=C.charAt(ce);switch(fe){case"=":if(oe===b)re=C.slice(P,ce),oe=k;else if(oe===A)oe=k;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(oe===k||oe===b)if(oe===b&&(ee.warning('attribute value must after "="'),re=C.slice(P,ce)),P=ce+1,ce=C.indexOf(fe,P),ce>0)J=C.slice(P,ce),ne(re,J,P-1),oe=N;else throw new Error("attribute value no end '"+fe+"' match");else if(oe==U)J=C.slice(P,ce),ne(re,J,P),ee.warning('attribute "'+re+'" missed start quot('+fe+")!!"),P=ce+1,oe=N;else throw new Error('attribute value must after "="');break;case"/":switch(oe){case B:T.setTagName(C.slice(P,ce));case N:case K:case M:oe=M,T.closed=!0;case U:case b:break;case A:T.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return ee.error("unexpected end of input"),oe==B&&T.setTagName(C.slice(P,ce)),ce;case">":switch(oe){case B:T.setTagName(C.slice(P,ce));case N:case K:case M:break;case U:case b:J=C.slice(P,ce),J.slice(-1)==="/"&&(T.closed=!0,J=J.slice(0,-1));case A:oe===A&&(J=re),oe==U?(ee.warning('attribute "'+J+'" missed quot(")!'),ne(re,J,P)):((!a.isHTML(V[""])||!J.match(/^(?:disabled|checked|selected)$/i))&&ee.warning('attribute "'+J+'" missed value!! "'+J+'" instead!!'),ne(J,J,P));break;case k:throw new Error("attribute value missed!!")}return ce;case"€":fe=" ";default:if(fe<=" ")switch(oe){case B:T.setTagName(C.slice(P,ce)),oe=K;break;case b:re=C.slice(P,ce),oe=A;break;case U:var J=C.slice(P,ce);ee.warning('attribute "'+J+'" missed quot(")!!'),ne(re,J,P);case N:oe=K;break}else switch(oe){case A:T.tagName,(!a.isHTML(V[""])||!re.match(/^(?:disabled|checked|selected)$/i))&&ee.warning('attribute "'+re+'" missed value!! "'+re+'" instead2!!'),ne(re,re,P),P=ce,oe=b;break;case N:ee.warning('attribute space is required"'+re+'"!!');case K:oe=b,P=ce;break;case k:oe=U,P=ce;break;case M:throw new Error("elements closed character '/' and '>' must be connected to")}}ce++}}function D(C,P,T){for(var V=C.tagName,$=null,fe=C.length;fe--;){var ee=C[fe],ne=ee.qName,re=ee.value,Y=ne.indexOf(":");if(Y>0)var J=ee.prefix=ne.slice(0,Y),ce=ne.slice(Y+1),oe=J==="xmlns"&&ce;else ce=ne,J=null,oe=ne==="xmlns"&&"";ee.localName=ce,oe!==!1&&($==null&&($={},u(T,T={})),T[oe]=$[oe]=re,ee.uri=a.XMLNS,P.startPrefixMapping(oe,re))}for(var fe=C.length;fe--;){ee=C[fe];var J=ee.prefix;J&&(J==="xml"&&(ee.uri=a.XML),J!=="xmlns"&&(ee.uri=T[J||""]))}var Y=V.indexOf(":");Y>0?(J=C.prefix=V.slice(0,Y),ce=C.localName=V.slice(Y+1)):(J=null,ce=C.localName=V);var Z=C.uri=T[J||""];if(P.startElement(Z,ce,V,C),C.closed){if(P.endElement(Z,ce,V),$)for(J in $)Object.prototype.hasOwnProperty.call($,J)&&P.endPrefixMapping(J)}else return C.currentNSMap=T,C.localNSMap=$,!0}function E(C,P,T,V,$){if(/^(?:script|textarea)$/i.test(T)){var ee=C.indexOf("",P),ne=C.substring(P+1,ee);if(/[&<]/.test(ne))return/^script$/i.test(T)?($.characters(ne,0,ne.length),ee):(ne=ne.replace(/&#?\w+;/g,V),$.characters(ne,0,ne.length),ee)}return P+1}function F(C,P,T,V){var $=V[T];return $==null&&($=C.lastIndexOf(""),$",P+4);return ee>P?(T.comment(C,P+4,ee-P-4),ee+3):(V.error("Unclosed comment"),-1)}else return-1;default:if(C.substr(P+3,6)=="CDATA["){var ee=C.indexOf("]]>",P+9);return T.startCDATA(),T.characters(C,P+9,ee-P-9),T.endCDATA(),ee+3}var ne=v(C,P),re=ne.length;if(re>1&&/!doctype/i.test(ne[0][0])){var J=ne[1][0],ce=!1,oe=!1;re>3&&(/^public$/i.test(ne[2][0])?(ce=ne[3][0],oe=re>4&&ne[4][0]):/^system$/i.test(ne[2][0])&&(oe=ne[3][0]));var fe=ne[re-1];return T.startDTD(J,ce,oe),T.endDTD(),fe.index+fe[0].length}}return-1}function h(C,P,T){var V=C.indexOf("?>",P);if(V){var $=C.substring(P,V).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return $?($[0].length,T.processingInstruction($[1],$[2]),V+2):-1}return-1}function l(){this.attributeNames={}}l.prototype={setTagName:function(C){if(!R.test(C))throw new Error("invalid tagName:"+C);this.tagName=C},addValue:function(C,P,T){if(!R.test(C))throw new Error("invalid attribute:"+C);this.attributeNames[C]=this.length,this[this.length++]={qName:C,value:P,offset:T}},length:0,getLocalName:function(C){return this[C].localName},getLocator:function(C){return this[C].locator},getQName:function(C){return this[C].qName},getURI:function(C){return this[C].uri},getValue:function(C){return this[C].value}};function v(C,P){var T,V=[],$=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for($.lastIndex=P,$.exec(C);T=$.exec(C);)if(V.push(T),T[1])return V}r.XMLReader=W,r.ParseError=j},"./node_modules/process/browser.js":function(n,r){var p=n.exports={},a,d;function t(){throw new Error("setTimeout has not been defined")}function R(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?a=setTimeout:a=t}catch(q){a=t}try{typeof clearTimeout=="function"?d=clearTimeout:d=R}catch(q){d=R}})();function B(q){if(a===setTimeout)return setTimeout(q,0);if((a===t||!a)&&setTimeout)return a=setTimeout,setTimeout(q,0);try{return a(q,0)}catch(X){try{return a.call(null,q,0)}catch(L){return a.call(this,q,0)}}}function b(q){if(d===clearTimeout)return clearTimeout(q);if((d===R||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(q);try{return d(q)}catch(X){try{return d.call(null,q)}catch(L){return d.call(this,q)}}}var A=[],k=!1,U,N=-1;function K(){!k||!U||(k=!1,U.length?A=U.concat(A):N=-1,A.length&&M())}function M(){if(!k){var q=B(K);k=!0;for(var X=A.length;X;){for(U=A,A=[];++N1)for(var L=1;Lne)return he(null,!1);if(ve>1){var pe=Math.max(Z[0].Size,Z[1].Size);if(pe!==ee)return he(null,!1)}var ge=function ye(me){if(me=he.length){fe.emit("has_and_check_upload_id",Y);return}var ye=he[ge];if(!B.isInArray(Y,ye)){d.removeUploadId.call(T,ye),pe(ge+1);return}if(d.using[ye]){pe(ge+1);return}N.call(T,{Bucket:l,Region:v,Key:C,UploadId:ye,tracker:u.tracker},function(me,De){T._isRunningTask(h)&&(me?(d.removeUploadId.call(T,ye),pe(ge+1)):fe.emit("upload_id_available",{UploadId:ye,PartList:De.PartList}))})};ve(0)}),fe.on("get_remote_upload_id_list",function(){U.call(T,{Bucket:l,Region:v,Key:C,tracker:u.tracker},function(Y,Z){if(T._isRunningTask(h)){if(Y)return fe.emit("error",Y);var he=B.filter(Z.UploadList,function(ge){return ge.Key===C&&(!P||ge.StorageClass.toUpperCase()===P.toUpperCase())}).reverse().map(function(ge){return ge.UploadId||ge.UploadID});if(he.length)fe.emit("seek_local_avail_upload_id",he);else{var ve=d.getFileId(u.Body,u.ChunkSize,l,C),pe;ve&&(pe=d.getUploadIdList.call(T,ve))&&B.each(pe,function(ge){d.removeUploadId.call(T,ge)}),fe.emit("no_available_upload_id")}}})}),fe.emit("get_remote_upload_id_list")}function U(u,s){var h=this,l=[],v={Bucket:u.Bucket,Region:u.Region,Prefix:u.Key,calledBySdk:u.calledBySdk||"sliceUploadFile",tracker:u.tracker},C=function P(){h.multipartList(v,function(T,V){if(T)return s(T);l.push.apply(l,V.Upload||[]),V.IsTruncated==="true"?(v.KeyMarker=V.NextKeyMarker,v.UploadIdMarker=V.NextUploadIdMarker,P()):s(null,{UploadList:l})})};C()}function N(u,s){var h=this,l=[],v={Bucket:u.Bucket,Region:u.Region,Key:u.Key,UploadId:u.UploadId,calledBySdk:"sliceUploadFile",tracker:u.tracker},C=function P(){h.multipartListPart(v,function(T,V){if(T)return s(T);l.push.apply(l,V.Part||[]),V.IsTruncated==="true"?(v.PartNumberMarker=V.NextPartNumberMarker,P()):s(null,{PartList:l})})};C()}function K(u,s){var h=this,l=u.TaskId,v=u.Bucket,C=u.Region,P=u.Key,T=u.UploadData,V=u.FileSize,$=u.SliceSize,ee=Math.min(u.AsyncLimit||h.options.ChunkParallelLimit||1,256),ne=u.Body,re=Math.ceil(V/$),J=0,ce=u.ServerSideEncryption,oe=u.Headers,fe=B.filter(T.PartList,function(Z){return Z.Uploaded&&(J+=Z.PartNumber>=re&&V%$||$),!Z.Uploaded}),Y=u.onProgress;t.eachLimit(fe,ee,function(Z,he){if(h._isRunningTask(l)){var ve=Z.PartNumber,pe=Math.min(V,Z.PartNumber*$)-(Z.PartNumber-1)*$,ge=0;M.call(h,{TaskId:l,Bucket:v,Region:C,Key:P,SliceSize:$,FileSize:V,PartNumber:ve,ServerSideEncryption:ce,Body:ne,UploadData:T,Headers:oe,onProgress:function(me){J+=me.loaded-ge,ge=me.loaded,Y({loaded:J,total:V})},tracker:u.tracker},function(ye,me){h._isRunningTask(l)&&(!ye&&!me.ETag&&(ye='get ETag error, please add "ETag" to CORS ExposeHeader setting.( 获取ETag失败,请在CORS ExposeHeader设置中添加ETag,请参考文档:https://cloud.tencent.com/document/product/436/13318 )'),ye?J-=ge:(J+=pe-ge,Z.ETag=me.ETag),Y({loaded:J,total:V}),he(ye||null,me))})}},function(Z){if(h._isRunningTask(l)){if(Z)return s(Z);s(null,{UploadId:T.UploadId,SliceList:T.PartList})}})}function M(u,s){var h=this,l=u.TaskId,v=u.Bucket,C=u.Region,P=u.Key,T=u.FileSize,V=u.Body,$=u.PartNumber*1,ee=u.SliceSize,ne=u.ServerSideEncryption,re=u.UploadData,J=u.Headers||{},ce=h.options.ChunkRetryTimes+1,oe=ee*($-1),fe=ee,Y=oe+ee;Y>T&&(Y=T,fe=Y-oe);var Z=["x-cos-traffic-limit","x-cos-mime-limit"],he={};B.each(J,function(pe,ge){Z.indexOf(ge)>-1&&(he[ge]=pe)});var ve=re.PartList[$-1];t.retry(ce,function(pe){h._isRunningTask(l)&&B.fileSlice(V,oe,Y,!0,function(ge){h.multipartUpload({TaskId:l,Bucket:v,Region:C,Key:P,ContentLength:fe,PartNumber:$,UploadId:re.UploadId,ServerSideEncryption:ne,Body:ge,Headers:he,onProgress:u.onProgress,calledBySdk:"sliceUploadFile",tracker:u.tracker},function(ye,me){if(h._isRunningTask(l))return ye?pe(ye):(ve.Uploaded=!0,pe(null,me))})})},function(pe,ge){if(h._isRunningTask(l))return s(pe,ge)})}function j(u,s){var h=u.Bucket,l=u.Region,v=u.Key,C=u.UploadId,P=u.SliceList,T=this,V=this.options.ChunkRetryTimes+1,$=u.Headers,ee=P.map(function(ne){return{PartNumber:ne.PartNumber,ETag:ne.ETag}});t.retry(V,function(ne){T.multipartComplete({Bucket:h,Region:l,Key:v,UploadId:C,Parts:ee,Headers:$,calledBySdk:"sliceUploadFile",tracker:u.tracker},ne)},function(ne,re){s(ne,re)})}function W(u,s){var h=u.Bucket,l=u.Region,v=u.Key,C=u.UploadId,P=u.Level||"task",T=u.AsyncLimit,V=this,$=new R;if($.on("error",function(ee){return s(ee)}),$.on("get_abort_array",function(ee){q.call(V,{Bucket:h,Region:l,Key:v,Headers:u.Headers,AsyncLimit:T,AbortArray:ee},s)}),P==="bucket")U.call(V,{Bucket:h,Region:l,calledBySdk:"abortUploadTask"},function(ee,ne){if(ee)return s(ee);$.emit("get_abort_array",ne.UploadList||[])});else if(P==="file"){if(!v)return s(B.error(new Error("abort_upload_task_no_key")));U.call(V,{Bucket:h,Region:l,Key:v,calledBySdk:"abortUploadTask"},function(ee,ne){if(ee)return s(ee);$.emit("get_abort_array",ne.UploadList||[])})}else if(P==="task"){if(!C)return s(B.error(new Error("abort_upload_task_no_id")));if(!v)return s(B.error(new Error("abort_upload_task_no_key")));$.emit("get_abort_array",[{Key:v,UploadId:C}])}else return s(B.error(new Error("abort_unknown_level")))}function q(u,s){var h=u.Bucket,l=u.Region,v=u.Key,C=u.AbortArray,P=u.AsyncLimit||1,T=this,V=0,$=new Array(C.length);t.eachLimit(C,P,function(ee,ne){var re=V;if(v&&v!==ee.Key){$[re]={error:{KeyNotMatch:!0}},ne(null);return}var J=ee.UploadId||ee.UploadID;T.multipartAbort({Bucket:h,Region:l,Key:ee.Key,Headers:u.Headers,UploadId:J},function(ce){var oe={Bucket:h,Region:l,Key:ee.Key,UploadId:J};$[re]={error:ce,task:oe},ne(null)}),V++},function(ee){if(ee)return s(ee);for(var ne=[],re=[],J=0,ce=$.length;Jl?"sliceUploadFile":"putObject";u.tracker=new b({Beacon:h.options.BeaconReporter,clsReporter:h.options.ClsReporter,bucket:u.Bucket,region:u.Region,apiName:"uploadFile",realApi:$,fileKey:u.Key,fileSize:P,accelerate:V,deepTracker:h.options.DeepTracker,customId:h.options.CustomId,delay:h.options.TrackerDelay})}B.each(u,function(oe,fe){a(oe)!=="object"&&typeof oe!="function"&&(T[fe]=oe)});var ee=u.onTaskReady,ne=function(fe){T.TaskId=fe,ee&&ee(fe)};u.onTaskReady=ne;var re=P>l?"sliceUploadFile":"putObject",J=u.onFileFinish,ce=function(fe,Y){u.tracker&&u.tracker.report(fe,Y),J&&J(fe,Y,T),s&&s(fe,Y)};v.push({api:re,params:u,callback:ce}),h._addTasks(v)}function L(u,s){var h=this,l=u.SliceSize===void 0?h.options.SliceSize:u.SliceSize,v=0,C=0,P=B.throttleOnProgress.call(h,C,u.onProgress),T=u.files.length,V=u.onFileFinish,$=Array(T),ee=function(J,ce,oe){P(null,!0),V&&V(J,ce,oe),$[oe.Index]={options:oe,error:J,data:ce},--T<=0&&s&&s(null,{files:$})},ne=[];B.each(u.files,function(re,J){(function(){var ce=re.Body,oe=ce.size||ce.length||0,fe={Index:J,TaskId:""};if(!h.options.UseRawKey&&re.Key&&re.Key.substr(0,1)==="/"&&(re.Key=re.Key.substr(1)),v+=oe,h.options.EnableReporter){var Y=h.options.UseAccelerate||typeof h.options.Domain=="string"&&h.options.Domain.includes("accelerate."),Z=oe>l?"sliceUploadFile":"putObject";re.tracker=new b({Beacon:h.options.BeaconReporter,clsReporter:h.options.ClsReporter,bucket:re.Bucket,region:re.Region,apiName:"uploadFiles",realApi:Z,fileKey:re.Key,fileSize:oe,accelerate:Y,deepTracker:h.options.DeepTracker,customId:h.options.CustomId,delay:h.options.TrackerDelay})}B.each(re,function(Se,xe){a(Se)!=="object"&&typeof Se!="function"&&(fe[xe]=Se)});var he=re.onTaskReady,ve=function(xe){fe.TaskId=xe,he&&he(xe)};re.onTaskReady=ve;var pe=0,ge=re.onProgress,ye=function(xe){C=C-pe+xe.loaded,pe=xe.loaded,ge&&ge(xe),P({loaded:C,total:v})};re.onProgress=ye;var me=oe>l?"sliceUploadFile":"putObject",De=re.onFileFinish,ke=function(xe,Ue){re.tracker&&re.tracker.report(xe,Ue),De&&De(xe,Ue),ee&&ee(xe,Ue,fe)};ne.push({api:me,params:re,callback:ke})})()}),h._addTasks(ne)}function D(u,s){var h=new R,l=this,v=u.Bucket,C=u.Region,P=u.Key,T=u.CopySource,V=B.getSourceParams.call(this,T);if(!V){s(B.error(new Error("CopySource format error")));return}var $=V.Bucket,ee=V.Region,ne=decodeURIComponent(V.Key),re=u.CopySliceSize===void 0?l.options.CopySliceSize:u.CopySliceSize;re=Math.max(0,re);var J=u.CopyChunkSize||this.options.CopyChunkSize,ce=this.options.CopyChunkParallelLimit,oe=this.options.ChunkRetryTimes+1,fe=0,Y=0,Z,he,ve={},pe={},ge={};h.on("copy_slice_complete",function(ye){B.each(u.Headers,function(De,ke){ke.toLowerCase().indexOf("x-cos-meta-")});var me=B.map(ye.PartList,function(De){return{PartNumber:De.PartNumber,ETag:De.ETag}});t.retry(oe,function(De){l.multipartComplete({Bucket:v,Region:C,Key:P,UploadId:ye.UploadId,Parts:me,tracker:u.tracker,calledBySdk:"sliceCopyFile"},De)},function(De,ke){if(d.removeUsing(ye.UploadId),De)return he(null,!0),s(De);d.removeUploadId(ye.UploadId),he({loaded:Z,total:Z},!0),s(null,ke)})}),h.on("get_copy_data_finish",function(ye){var me=d.getCopyFileId(T,ve,J,v,P);me&&d.saveUploadId(me,ye.UploadId,l.options.UploadIdCacheLimit),d.setUsing(ye.UploadId);var De=B.filter(ye.PartList,function(ke){return ke.Uploaded&&(Y+=ke.PartNumber>=fe&&Z%J||J),!ke.Uploaded});t.eachLimit(De,ce,function(ke,Se){var xe=ke.PartNumber,Ue=ke.CopySourceRange,Fe=ke.end-ke.start;t.retry(oe,function(ie){E.call(l,{Bucket:v,Region:C,Key:P,CopySource:T,UploadId:ye.UploadId,PartNumber:xe,CopySourceRange:Ue,tracker:u.tracker,calledBySdk:"sliceCopyFile"},ie)},function(ie,I){if(ie)return Se(ie);Y+=Fe,he({loaded:Y,total:Z}),ke.ETag=I.ETag,Se(ie||null,I)})},function(ke){if(ke)return d.removeUsing(ye.UploadId),he(null,!0),s(ke);h.emit("copy_slice_complete",ye)})}),h.on("get_chunk_size_finish",function(){var ye=function(){l.multipartInit({Bucket:v,Region:C,Key:P,Headers:ge,tracker:u.tracker,calledBySdk:"sliceCopyFile"},function(xe,Ue){if(xe)return s(xe);u.UploadId=Ue.UploadId,h.emit("get_copy_data_finish",{UploadId:u.UploadId,PartList:u.PartList})})},me=d.getCopyFileId(T,ve,J,v,P),De=d.getUploadIdList(me);if(!me||!De)return ye();var ke=function Se(xe){if(xe>=De.length)return ye();var Ue=De[xe];if(d.using[Ue])return Se(xe+1);N.call(l,{Bucket:v,Region:C,Key:P,UploadId:Ue,tracker:u.tracker,calledBySdk:"sliceCopyFile"},function(Fe,ie){if(Fe)d.removeUploadId(Ue),Se(xe+1);else{if(d.using[Ue])return Se(xe+1);var I={},G=0;B.each(ie.PartList,function(H){var te=parseInt(H.Size),ue=G+te-1;I[H.PartNumber+"|"+G+"|"+ue]=H.ETag,G+=te}),B.each(u.PartList,function(H){var te=I[H.PartNumber+"|"+H.start+"|"+H.end];te&&(H.ETag=te,H.Uploaded=!0)}),h.emit("get_copy_data_finish",{UploadId:Ue,PartList:u.PartList})}})};ke(0)}),h.on("get_file_size_finish",function(){if(function(){for(var me=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],De=1024*1024,ke=0;kexe.length&&(pe[Se]=ke)}),h.emit("get_file_size_finish")}})}function E(u,s){var h=u.TaskId,l=u.Bucket,v=u.Region,C=u.Key,P=u.CopySource,T=u.UploadId,V=u.PartNumber*1,$=u.CopySourceRange,ee=this.options.ChunkRetryTimes+1,ne=this;t.retry(ee,function(re){ne.uploadPartCopy({TaskId:h,Bucket:l,Region:v,Key:C,CopySource:P,UploadId:T,PartNumber:V,CopySourceRange:$,tracker:u.tracker,calledBySdk:u.calledBySdk},function(J,ce){re(J||null,ce)})},function(re,J){return s(re,J)})}var F={sliceUploadFile:A,abortUploadTask:W,uploadFile:X,uploadFiles:L,sliceCopyFile:D};n.exports.init=function(u,s){s.transferToTaskMethod(F,"sliceUploadFile"),B.each(F,function(h,l){u.prototype[l]=B.apiWrapper(l,h)})}},"./src/async.js":function(n,r){var p=function(R,B,b,A){if(A=A||function(){},!R.length||B<=0)return A();var k=0,U=0,N=0;(function K(){if(k>=R.length)return A();for(;N=R.length?A():K())})})()},a=function(R,B,b){var A=function k(U){B(function(N,K){N&&U"u"?"undefined":a(location))==="object"&&location.protocol==="http:"?"http:":"https:"),f=this.options.ServiceDomain,S=e.AppId||this.options.appId,x=e.Region;f?(f=f.replace(/\{\{AppId\}\}/gi,S||"").replace(/\{\{Region\}\}/gi,x||"").replace(/\{\{.*?\}\}/gi,""),/^[a-zA-Z]+:\/\//.test(f)||(f=o+"//"+f),f.slice(-1)==="/"&&(f=f.slice(0,-1))):x?f=o+"//cos."+x+".myqcloud.com":f=o+"//service.cos.myqcloud.com";var O="",_=x?"cos."+x+".myqcloud.com":"service.cos.myqcloud.com",Q=f.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1");_===Q&&(O=_),de.call(this,{Action:"name/cos:GetService",url:f,method:"GET",headers:e.Headers,SignHost:O,tracker:e.tracker},function(be,Ce){if(be)return g(be);var Oe=Ce&&Ce.ListAllMyBucketsResult&&Ce.ListAllMyBucketsResult.Buckets&&Ce.ListAllMyBucketsResult.Buckets.Bucket||[];Oe=t.isArray(Oe)?Oe:[Oe];var ae=Ce&&Ce.ListAllMyBucketsResult&&Ce.ListAllMyBucketsResult.Owner||{};g(null,{Buckets:Oe,Owner:ae,statusCode:Ce.statusCode,headers:Ce.headers})})}function B(e,g){var o=this,f="";if(e.BucketAZConfig){var S={BucketAZConfig:e.BucketAZConfig};f=t.json2xml({CreateBucketConfiguration:S})}de.call(this,{Action:"name/cos:PutBucket",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,body:f,tracker:e.tracker},function(x,O){if(x)return g(x);var _=z({protocol:o.options.Protocol,domain:o.options.Domain,bucket:e.Bucket,region:e.Region,isLocation:!0});g(null,{Location:_,statusCode:O.statusCode,headers:O.headers})})}function b(e,g){de.call(this,{Action:"name/cos:HeadBucket",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,method:"HEAD",tracker:e.tracker},g)}function A(e,g){var o={};o.prefix=e.Prefix||"",o.delimiter=e.Delimiter,o.marker=e.Marker,o["max-keys"]=e.MaxKeys,o["encoding-type"]=e.EncodingType,de.call(this,{Action:"name/cos:GetBucket",ResourceKey:o.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:o,tracker:e.tracker},function(f,S){if(f)return g(f);var x=S.ListBucketResult||{},O=x.Contents||[],_=x.CommonPrefixes||[];O=t.isArray(O)?O:[O],_=t.isArray(_)?_:[_];var Q=t.clone(x);t.extend(Q,{Contents:O,CommonPrefixes:_,statusCode:S.statusCode,headers:S.headers}),g(null,Q)})}function k(e,g){de.call(this,{Action:"name/cos:DeleteBucket",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,method:"DELETE",tracker:e.tracker},function(o,f){if(o&&o.statusCode===204)return g(null,{statusCode:o.statusCode});if(o)return g(o);g(null,{statusCode:f.statusCode,headers:f.headers})})}function U(e,g){var o=e.Headers,f="";if(e.AccessControlPolicy){var S=t.clone(e.AccessControlPolicy||{}),x=S.Grants||S.Grant;x=t.isArray(x)?x:[x],delete S.Grant,delete S.Grants,S.AccessControlList={Grant:x},f=t.json2xml({AccessControlPolicy:S}),o["Content-Type"]="application/xml",o["Content-MD5"]=t.b64(t.md5(f))}t.each(o,function(O,_){_.indexOf("x-cos-grant-")===0&&(o[_]=w(o[_]))}),de.call(this,{Action:"name/cos:PutBucketACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:o,action:"acl",body:f,tracker:e.tracker},function(O,_){if(O)return g(O);g(null,{statusCode:_.statusCode,headers:_.headers})})}function N(e,g){de.call(this,{Action:"name/cos:GetBucketACL",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"acl",tracker:e.tracker},function(o,f){if(o)return g(o);var S=f.AccessControlPolicy||{},x=S.Owner||{},O=S.AccessControlList.Grant||[];O=t.isArray(O)?O:[O];var _=y(S);f.headers&&f.headers["x-cos-acl"]&&(_.ACL=f.headers["x-cos-acl"]),_=t.extend(_,{Owner:x,Grants:O,statusCode:f.statusCode,headers:f.headers}),g(null,_)})}function K(e,g){var o=e.CORSConfiguration||{},f=o.CORSRules||e.CORSRules||[];f=t.clone(t.isArray(f)?f:[f]),t.each(f,function(_){t.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],function(Q){var be=Q+"s",Ce=_[be]||_[Q]||[];delete _[be],_[Q]=t.isArray(Ce)?Ce:[Ce]})});var S={CORSRule:f};e.ResponseVary&&(S.ResponseVary=e.ResponseVary);var x=t.json2xml({CORSConfiguration:S}),O=e.Headers;O["Content-Type"]="application/xml",O["Content-MD5"]=t.b64(t.md5(x)),de.call(this,{Action:"name/cos:PutBucketCORS",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:x,action:"cors",headers:O,tracker:e.tracker},function(_,Q){if(_)return g(_);g(null,{statusCode:Q.statusCode,headers:Q.headers})})}function M(e,g){de.call(this,{Action:"name/cos:GetBucketCORS",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"cors",tracker:e.tracker},function(o,f){if(o){if(o.statusCode===404&&o.error&&o.error.Code==="NoSuchCORSConfiguration"){var S={CORSRules:[],statusCode:o.statusCode};o.headers&&(S.headers=o.headers),g(null,S)}else g(o);return}var x=f.CORSConfiguration||{},O=x.CORSRules||x.CORSRule||[];O=t.clone(t.isArray(O)?O:[O]);var _=x.ResponseVary;t.each(O,function(Q){t.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],function(be){var Ce=be+"s",Oe=Q[Ce]||Q[be]||[];delete Q[be],Q[Ce]=t.isArray(Oe)?Oe:[Oe]})}),g(null,{CORSRules:O,ResponseVary:_,statusCode:f.statusCode,headers:f.headers})})}function j(e,g){de.call(this,{Action:"name/cos:DeleteBucketCORS",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"cors",tracker:e.tracker},function(o,f){if(o&&o.statusCode===204)return g(null,{statusCode:o.statusCode});if(o)return g(o);g(null,{statusCode:f.statusCode||o.statusCode,headers:f.headers})})}function W(e,g){de.call(this,{Action:"name/cos:GetBucketLocation",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"location",tracker:e.tracker},g)}function q(e,g){var o=e.Policy;try{typeof o=="string"&&(o=JSON.parse(o))}catch(x){}if(!o||typeof o=="string")return g(t.error(new Error("Policy format error")));var f=JSON.stringify(o);o.version||(o.version="2.0");var S=e.Headers;S["Content-Type"]="application/json",S["Content-MD5"]=t.b64(t.md5(f)),de.call(this,{Action:"name/cos:PutBucketPolicy",method:"PUT",Bucket:e.Bucket,Region:e.Region,action:"policy",body:f,headers:S,tracker:e.tracker},function(x,O){if(x&&x.statusCode===204)return g(null,{statusCode:x.statusCode});if(x)return g(x);g(null,{statusCode:O.statusCode,headers:O.headers})})}function X(e,g){de.call(this,{Action:"name/cos:GetBucketPolicy",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"policy",rawBody:!0,tracker:e.tracker},function(o,f){if(o)return o.statusCode&&o.statusCode===403?g(t.error(o,{ErrorStatus:"Access Denied"})):o.statusCode&&o.statusCode===405?g(t.error(o,{ErrorStatus:"Method Not Allowed"})):o.statusCode&&o.statusCode===404?g(t.error(o,{ErrorStatus:"Policy Not Found"})):g(o);var S={};try{S=JSON.parse(f.body)}catch(x){}g(null,{Policy:S,statusCode:f.statusCode,headers:f.headers})})}function L(e,g){de.call(this,{Action:"name/cos:DeleteBucketPolicy",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"policy",tracker:e.tracker},function(o,f){if(o&&o.statusCode===204)return g(null,{statusCode:o.statusCode});if(o)return g(o);g(null,{statusCode:f.statusCode||o.statusCode,headers:f.headers})})}function D(e,g){var o=e.Tagging||{},f=o.TagSet||o.Tags||e.Tags||[];f=t.clone(t.isArray(f)?f:[f]);var S=t.json2xml({Tagging:{TagSet:{Tag:f}}}),x=e.Headers;x["Content-Type"]="application/xml",x["Content-MD5"]=t.b64(t.md5(S)),de.call(this,{Action:"name/cos:PutBucketTagging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:S,action:"tagging",headers:x,tracker:e.tracker},function(O,_){if(O&&O.statusCode===204)return g(null,{statusCode:O.statusCode});if(O)return g(O);g(null,{statusCode:_.statusCode,headers:_.headers})})}function E(e,g){de.call(this,{Action:"name/cos:GetBucketTagging",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging",tracker:e.tracker},function(o,f){if(o){if(o.statusCode===404&&o.error&&(o.error==="Not Found"||o.error.Code==="NoSuchTagSet")){var S={Tags:[],statusCode:o.statusCode};o.headers&&(S.headers=o.headers),g(null,S)}else g(o);return}var x=[];try{x=f.Tagging.TagSet.Tag||[]}catch(O){}x=t.clone(t.isArray(x)?x:[x]),g(null,{Tags:x,statusCode:f.statusCode,headers:f.headers})})}function F(e,g){de.call(this,{Action:"name/cos:DeleteBucketTagging",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging",tracker:e.tracker},function(o,f){if(o&&o.statusCode===204)return g(null,{statusCode:o.statusCode});if(o)return g(o);g(null,{statusCode:f.statusCode,headers:f.headers})})}function u(e,g){var o=e.LifecycleConfiguration||{},f=o.Rules||e.Rules||[];f=t.clone(f);var S=t.json2xml({LifecycleConfiguration:{Rule:f}}),x=e.Headers;x["Content-Type"]="application/xml",x["Content-MD5"]=t.b64(t.md5(S)),de.call(this,{Action:"name/cos:PutBucketLifecycle",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:S,action:"lifecycle",headers:x,tracker:e.tracker},function(O,_){if(O&&O.statusCode===204)return g(null,{statusCode:O.statusCode});if(O)return g(O);g(null,{statusCode:_.statusCode,headers:_.headers})})}function s(e,g){de.call(this,{Action:"name/cos:GetBucketLifecycle",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"lifecycle",tracker:e.tracker},function(o,f){if(o){if(o.statusCode===404&&o.error&&o.error.Code==="NoSuchLifecycleConfiguration"){var S={Rules:[],statusCode:o.statusCode};o.headers&&(S.headers=o.headers),g(null,S)}else g(o);return}var x=[];try{x=f.LifecycleConfiguration.Rule||[]}catch(O){}x=t.clone(t.isArray(x)?x:[x]),g(null,{Rules:x,statusCode:f.statusCode,headers:f.headers})})}function h(e,g){de.call(this,{Action:"name/cos:DeleteBucketLifecycle",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"lifecycle",tracker:e.tracker},function(o,f){if(o&&o.statusCode===204)return g(null,{statusCode:o.statusCode});if(o)return g(o);g(null,{statusCode:f.statusCode,headers:f.headers})})}function l(e,g){if(!e.VersioningConfiguration){g(t.error(new Error("missing param VersioningConfiguration")));return}var o=e.VersioningConfiguration||{},f=t.json2xml({VersioningConfiguration:o}),S=e.Headers;S["Content-Type"]="application/xml",S["Content-MD5"]=t.b64(t.md5(f)),de.call(this,{Action:"name/cos:PutBucketVersioning",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:f,action:"versioning",headers:S,tracker:e.tracker},function(x,O){if(x&&x.statusCode===204)return g(null,{statusCode:x.statusCode});if(x)return g(x);g(null,{statusCode:O.statusCode,headers:O.headers})})}function v(e,g){de.call(this,{Action:"name/cos:GetBucketVersioning",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"versioning",tracker:e.tracker},function(o,f){o||!f.VersioningConfiguration&&(f.VersioningConfiguration={}),g(o,f)})}function C(e,g){var o=t.clone(e.ReplicationConfiguration),f=t.json2xml({ReplicationConfiguration:o});f=f.replace(/<(\/?)Rules>/gi,"<$1Rule>"),f=f.replace(/<(\/?)Tags>/gi,"<$1Tag>");var S=e.Headers;S["Content-Type"]="application/xml",S["Content-MD5"]=t.b64(t.md5(f)),de.call(this,{Action:"name/cos:PutBucketReplication",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:f,action:"replication",headers:S,tracker:e.tracker},function(x,O){if(x&&x.statusCode===204)return g(null,{statusCode:x.statusCode});if(x)return g(x);g(null,{statusCode:O.statusCode,headers:O.headers})})}function P(e,g){de.call(this,{Action:"name/cos:GetBucketReplication",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"replication",tracker:e.tracker},function(o,f){if(o){if(o.statusCode===404&&o.error&&(o.error==="Not Found"||o.error.Code==="ReplicationConfigurationnotFoundError")){var S={ReplicationConfiguration:{Rules:[]},statusCode:o.statusCode};o.headers&&(S.headers=o.headers),g(null,S)}else g(o);return}!f.ReplicationConfiguration&&(f.ReplicationConfiguration={}),f.ReplicationConfiguration.Rule&&(f.ReplicationConfiguration.Rules=t.makeArray(f.ReplicationConfiguration.Rule),delete f.ReplicationConfiguration.Rule),g(o,f)})}function T(e,g){de.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"replication",tracker:e.tracker},function(o,f){if(o&&o.statusCode===204)return g(null,{statusCode:o.statusCode});if(o)return g(o);g(null,{statusCode:f.statusCode,headers:f.headers})})}function V(e,g){if(!e.WebsiteConfiguration){g(t.error(new Error("missing param WebsiteConfiguration")));return}var o=t.clone(e.WebsiteConfiguration||{}),f=o.RoutingRules||o.RoutingRule||[];f=t.isArray(f)?f:[f],delete o.RoutingRule,delete o.RoutingRules,f.length&&(o.RoutingRules={RoutingRule:f});var S=t.json2xml({WebsiteConfiguration:o}),x=e.Headers;x["Content-Type"]="application/xml",x["Content-MD5"]=t.b64(t.md5(S)),de.call(this,{Action:"name/cos:PutBucketWebsite",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:S,action:"website",headers:x,tracker:e.tracker},function(O,_){if(O&&O.statusCode===204)return g(null,{statusCode:O.statusCode});if(O)return g(O);g(null,{statusCode:_.statusCode,headers:_.headers})})}function $(e,g){de.call(this,{Action:"name/cos:GetBucketWebsite",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"website",tracker:e.tracker},function(o,f){if(o){if(o.statusCode===404&&o.error.Code==="NoSuchWebsiteConfiguration"){var S={WebsiteConfiguration:{},statusCode:o.statusCode};o.headers&&(S.headers=o.headers),g(null,S)}else g(o);return}var x=f.WebsiteConfiguration||{};if(x.RoutingRules){var O=t.clone(x.RoutingRules.RoutingRule||[]);O=t.makeArray(O),x.RoutingRules=O}g(null,{WebsiteConfiguration:x,statusCode:f.statusCode,headers:f.headers})})}function ee(e,g){de.call(this,{Action:"name/cos:DeleteBucketWebsite",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"website",tracker:e.tracker},function(o,f){if(o&&o.statusCode===204)return g(null,{statusCode:o.statusCode});if(o)return g(o);g(null,{statusCode:f.statusCode,headers:f.headers})})}function ne(e,g){if(!e.RefererConfiguration){g(t.error(new Error("missing param RefererConfiguration")));return}var o=t.clone(e.RefererConfiguration||{}),f=o.DomainList||{},S=f.Domains||f.Domain||[];S=t.isArray(S)?S:[S],S.length&&(o.DomainList={Domain:S});var x=t.json2xml({RefererConfiguration:o}),O=e.Headers;O["Content-Type"]="application/xml",O["Content-MD5"]=t.b64(t.md5(x)),de.call(this,{Action:"name/cos:PutBucketReferer",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:x,action:"referer",headers:O,tracker:e.tracker},function(_,Q){if(_&&_.statusCode===204)return g(null,{statusCode:_.statusCode});if(_)return g(_);g(null,{statusCode:Q.statusCode,headers:Q.headers})})}function re(e,g){de.call(this,{Action:"name/cos:GetBucketReferer",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"referer",tracker:e.tracker},function(o,f){if(o){if(o.statusCode===404&&o.error.Code==="NoSuchRefererConfiguration"){var S={WebsiteConfiguration:{},statusCode:o.statusCode};o.headers&&(S.headers=o.headers),g(null,S)}else g(o);return}var x=f.RefererConfiguration||{};if(x.DomainList){var O=t.makeArray(x.DomainList.Domain||[]);x.DomainList={Domains:O}}g(null,{RefererConfiguration:x,statusCode:f.statusCode,headers:f.headers})})}function J(e,g){var o=e.DomainConfiguration||{},f=o.DomainRule||e.DomainRule||[];f=t.clone(f);var S=t.json2xml({DomainConfiguration:{DomainRule:f}}),x=e.Headers;x["Content-Type"]="application/xml",x["Content-MD5"]=t.b64(t.md5(S)),de.call(this,{Action:"name/cos:PutBucketDomain",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:S,action:"domain",headers:x,tracker:e.tracker},function(O,_){if(O&&O.statusCode===204)return g(null,{statusCode:O.statusCode});if(O)return g(O);g(null,{statusCode:_.statusCode,headers:_.headers})})}function ce(e,g){de.call(this,{Action:"name/cos:GetBucketDomain",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"domain",tracker:e.tracker},function(o,f){if(o)return g(o);var S=[];try{S=f.DomainConfiguration.DomainRule||[]}catch(x){}S=t.clone(t.isArray(S)?S:[S]),g(null,{DomainRule:S,statusCode:f.statusCode,headers:f.headers})})}function oe(e,g){de.call(this,{Action:"name/cos:DeleteBucketDomain",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"domain",tracker:e.tracker},function(o,f){if(o&&o.statusCode===204)return g(null,{statusCode:o.statusCode});if(o)return g(o);g(null,{statusCode:f.statusCode,headers:f.headers})})}function fe(e,g){var o=e.OriginConfiguration||{},f=o.OriginRule||e.OriginRule||[];f=t.clone(f);var S=t.json2xml({OriginConfiguration:{OriginRule:f}}),x=e.Headers;x["Content-Type"]="application/xml",x["Content-MD5"]=t.b64(t.md5(S)),de.call(this,{Action:"name/cos:PutBucketOrigin",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:S,action:"origin",headers:x,tracker:e.tracker},function(O,_){if(O&&O.statusCode===204)return g(null,{statusCode:O.statusCode});if(O)return g(O);g(null,{statusCode:_.statusCode,headers:_.headers})})}function Y(e,g){de.call(this,{Action:"name/cos:GetBucketOrigin",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"origin",tracker:e.tracker},function(o,f){if(o)return g(o);var S=[];try{S=f.OriginConfiguration.OriginRule||[]}catch(x){}S=t.clone(t.isArray(S)?S:[S]),g(null,{OriginRule:S,statusCode:f.statusCode,headers:f.headers})})}function Z(e,g){de.call(this,{Action:"name/cos:DeleteBucketOrigin",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"origin",tracker:e.tracker},function(o,f){if(o&&o.statusCode===204)return g(null,{statusCode:o.statusCode});if(o)return g(o);g(null,{statusCode:f.statusCode,headers:f.headers})})}function he(e,g){var o=t.json2xml({BucketLoggingStatus:e.BucketLoggingStatus||""}),f=e.Headers;f["Content-Type"]="application/xml",f["Content-MD5"]=t.b64(t.md5(o)),de.call(this,{Action:"name/cos:PutBucketLogging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,action:"logging",headers:f,tracker:e.tracker},function(S,x){if(S&&S.statusCode===204)return g(null,{statusCode:S.statusCode});if(S)return g(S);g(null,{statusCode:x.statusCode,headers:x.headers})})}function ve(e,g){de.call(this,{Action:"name/cos:GetBucketLogging",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"logging",tracker:e.tracker},function(o,f){if(o)return g(o);g(null,{BucketLoggingStatus:f.BucketLoggingStatus,statusCode:f.statusCode,headers:f.headers})})}function pe(e,g,o){var f=t.clone(g.InventoryConfiguration);if(f.OptionalFields){var S=f.OptionalFields||[];f.OptionalFields={Field:S}}if(f.Destination&&f.Destination.COSBucketDestination&&f.Destination.COSBucketDestination.Encryption){var x=f.Destination.COSBucketDestination.Encryption;Object.keys(x).indexOf("SSECOS")>-1&&(x["SSE-COS"]=x.SSECOS,delete x.SSECOS)}var O=t.json2xml({InventoryConfiguration:f}),_=g.Headers;_["Content-Type"]="application/xml",_["Content-MD5"]=t.b64(t.md5(O));var Q=e==="PUT"?"name/cos:PutBucketInventory":"name/cos:PostBucketInventory";de.call(this,{Action:Q,method:e,Bucket:g.Bucket,Region:g.Region,body:O,action:"inventory",qs:{id:g.Id},headers:_,tracker:g.tracker},function(be,Ce){if(be&&be.statusCode===204)return o(null,{statusCode:be.statusCode});if(be)return o(be);o(null,{statusCode:Ce.statusCode,headers:Ce.headers})})}function ge(e,g){return pe.call(this,"PUT",e,g)}function ye(e,g){return pe.call(this,"POST",e,g)}function me(e,g){de.call(this,{Action:"name/cos:GetBucketInventory",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{id:e.Id},tracker:e.tracker},function(o,f){if(o)return g(o);var S=f.InventoryConfiguration;if(S&&S.OptionalFields&&S.OptionalFields.Field){var x=S.OptionalFields.Field;t.isArray(x)||(x=[x]),S.OptionalFields=x}if(S.Destination&&S.Destination.COSBucketDestination&&S.Destination.COSBucketDestination.Encryption){var O=S.Destination.COSBucketDestination.Encryption;Object.keys(O).indexOf("SSE-COS")>-1&&(O.SSECOS=O["SSE-COS"],delete O["SSE-COS"])}g(null,{InventoryConfiguration:S,statusCode:f.statusCode,headers:f.headers})})}function De(e,g){de.call(this,{Action:"name/cos:ListBucketInventory",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{"continuation-token":e.ContinuationToken},tracker:e.tracker},function(o,f){if(o)return g(o);var S=f.ListInventoryConfigurationResult,x=S.InventoryConfiguration||[];x=t.isArray(x)?x:[x],delete S.InventoryConfiguration,t.each(x,function(O){if(O&&O.OptionalFields&&O.OptionalFields.Field){var _=O.OptionalFields.Field;t.isArray(_)||(_=[_]),O.OptionalFields=_}if(O.Destination&&O.Destination.COSBucketDestination&&O.Destination.COSBucketDestination.Encryption){var Q=O.Destination.COSBucketDestination.Encryption;Object.keys(Q).indexOf("SSE-COS")>-1&&(Q.SSECOS=Q["SSE-COS"],delete Q["SSE-COS"])}}),S.InventoryConfigurations=x,t.extend(S,{statusCode:f.statusCode,headers:f.headers}),g(null,S)})}function ke(e,g){de.call(this,{Action:"name/cos:DeleteBucketInventory",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{id:e.Id},tracker:e.tracker},function(o,f){if(o&&o.statusCode===204)return g(null,{statusCode:o.statusCode});if(o)return g(o);g(null,{statusCode:f.statusCode,headers:f.headers})})}function Se(e,g){if(!e.AccelerateConfiguration){g(t.error(new Error("missing param AccelerateConfiguration")));return}var o={AccelerateConfiguration:e.AccelerateConfiguration||{}},f=t.json2xml(o),S={};S["Content-Type"]="application/xml",S["Content-MD5"]=t.b64(t.md5(f)),de.call(this,{Action:"name/cos:PutBucketAccelerate",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:f,action:"accelerate",headers:S,tracker:e.tracker},function(x,O){if(x)return g(x);g(null,{statusCode:O.statusCode,headers:O.headers})})}function xe(e,g){de.call(this,{Action:"name/cos:GetBucketAccelerate",method:"GET",Bucket:e.Bucket,Region:e.Region,action:"accelerate",tracker:e.tracker},function(o,f){o||!f.AccelerateConfiguration&&(f.AccelerateConfiguration={}),g(o,f)})}function Ue(e,g){var o=e.ServerSideEncryptionConfiguration||{},f=o.Rule||o.Rules||[],S=t.json2xml({ServerSideEncryptionConfiguration:{Rule:f}}),x=e.Headers;x["Content-Type"]="application/xml",x["Content-MD5"]=t.b64(t.md5(S)),de.call(this,{Action:"name/cos:PutBucketEncryption",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:S,action:"encryption",headers:x,tracker:e.tracker},function(O,_){if(O&&O.statusCode===204)return g(null,{statusCode:O.statusCode});if(O)return g(O);g(null,{statusCode:_.statusCode,headers:_.headers})})}function Fe(e,g){de.call(this,{Action:"name/cos:GetBucketEncryption",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"encryption",tracker:e.tracker},function(o,f){if(o){if(o.statusCode===404&&o.code==="NoSuchEncryptionConfiguration"){var S={EncryptionConfiguration:{Rules:[]},statusCode:o.statusCode};o.headers&&(S.headers=o.headers),g(null,S)}else g(o);return}var x=t.makeArray(f.EncryptionConfiguration&&f.EncryptionConfiguration.Rule||[]);f.EncryptionConfiguration={Rules:x},g(o,f)})}function ie(e,g){de.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"encryption",tracker:e.tracker},function(o,f){if(o&&o.statusCode===204)return g(null,{statusCode:o.statusCode});if(o)return g(o);g(null,{statusCode:f.statusCode,headers:f.headers})})}function I(e,g){de.call(this,{Action:"name/cos:HeadObject",method:"HEAD",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers,tracker:e.tracker},function(o,f){if(o){var S=o.statusCode;return e.Headers["If-Modified-Since"]&&S&&S===304?g(null,{NotModified:!0,statusCode:S}):g(o)}f.ETag=t.attr(f.headers,"etag",""),g(null,f)})}function G(e,g){var o={};o.prefix=e.Prefix||"",o.delimiter=e.Delimiter,o["key-marker"]=e.KeyMarker,o["version-id-marker"]=e.VersionIdMarker,o["max-keys"]=e.MaxKeys,o["encoding-type"]=e.EncodingType,de.call(this,{Action:"name/cos:GetBucketObjectVersions",ResourceKey:o.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:o,action:"versions",tracker:e.tracker},function(f,S){if(f)return g(f);var x=S.ListVersionsResult||{},O=x.DeleteMarker||[];O=t.isArray(O)?O:[O];var _=x.Version||[];_=t.isArray(_)?_:[_];var Q=t.clone(x);delete Q.DeleteMarker,delete Q.Version,t.extend(Q,{DeleteMarkers:O,Versions:_,statusCode:S.statusCode,headers:S.headers}),g(null,Q)})}function H(e,g){var o=e.Query||{},f=e.QueryString||"",S=t.throttleOnProgress.call(this,0,e.onProgress),x=e.tracker;x&&x.setParams({signStartTime:new Date().getTime()}),o["response-content-type"]=e.ResponseContentType,o["response-content-language"]=e.ResponseContentLanguage,o["response-expires"]=e.ResponseExpires,o["response-cache-control"]=e.ResponseCacheControl,o["response-content-disposition"]=e.ResponseContentDisposition,o["response-content-encoding"]=e.ResponseContentEncoding,de.call(this,{Action:"name/cos:GetObject",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,DataType:e.DataType,headers:e.Headers,qs:o,qsStr:f,rawBody:!0,onDownloadProgress:S,tracker:x},function(O,_){if(S(null,!0),O){var Q=O.statusCode;return e.Headers["If-Modified-Since"]&&Q&&Q===304?g(null,{NotModified:!0}):g(O)}g(null,{Body:_.body,ETag:t.attr(_.headers,"etag",""),statusCode:_.statusCode,headers:_.headers})})}function te(e,g){var o=this,f=e.ContentLength,S=t.throttleOnProgress.call(o,f,e.onProgress),x=e.Headers;!x["Cache-Control"]&&!x["cache-control"]&&(x["Cache-Control"]=""),!x["Content-Type"]&&!x["content-type"]&&(x["Content-Type"]=e.Body&&e.Body.type||"");var O=e.UploadAddMetaMd5||o.options.UploadAddMetaMd5||o.options.UploadCheckContentMd5,_=e.tracker;O&&_&&_.setParams({md5StartTime:new Date().getTime()}),t.getBodyMd5(O,e.Body,function(Q){Q&&(_&&_.setParams({md5EndTime:new Date().getTime()}),o.options.UploadCheckContentMd5&&(x["Content-MD5"]=t.b64(Q)),(e.UploadAddMetaMd5||o.options.UploadAddMetaMd5)&&(x["x-cos-meta-md5"]=Q)),e.ContentLength!==void 0&&(x["Content-Length"]=e.ContentLength),S(null,!0),de.call(o,{Action:"name/cos:PutObject",TaskId:e.TaskId,method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:e.Query,body:e.Body,onProgress:S,tracker:_},function(be,Ce){if(be)return S(null,!0),g(be);S({loaded:f,total:f},!0);var Oe=z({ForcePathStyle:o.options.ForcePathStyle,protocol:o.options.Protocol,domain:o.options.Domain,bucket:e.Bucket,region:o.options.UseAccelerate?"accelerate":e.Region,object:e.Key});Oe=Oe.substr(Oe.indexOf("://")+3),Ce.Location=Oe,Ce.ETag=t.attr(Ce.headers,"etag",""),g(null,Ce)})},e.onHashProgress)}function ue(e,g){de.call(this,{Action:"name/cos:DeleteObject",method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,VersionId:e.VersionId,action:e.Recursive?"recursive":"",tracker:e.tracker},function(o,f){if(o){var S=o.statusCode;return S&&S===404?g(null,{BucketNotFound:!0,statusCode:S}):g(o)}g(null,{statusCode:f.statusCode,headers:f.headers})})}function se(e,g){var o={};e.VersionId&&(o.versionId=e.VersionId),de.call(this,{Action:"name/cos:GetObjectACL",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:o,action:"acl",tracker:e.tracker},function(f,S){if(f)return g(f);var x=S.AccessControlPolicy||{},O=x.Owner||{},_=x.AccessControlList&&x.AccessControlList.Grant||[];_=t.isArray(_)?_:[_];var Q=y(x);delete Q.GrantWrite,S.headers&&S.headers["x-cos-acl"]&&(Q.ACL=S.headers["x-cos-acl"]),Q=t.extend(Q,{Owner:O,Grants:_,statusCode:S.statusCode,headers:S.headers}),g(null,Q)})}function Ae(e,g){var o=e.Headers,f="";if(e.AccessControlPolicy){var S=t.clone(e.AccessControlPolicy||{}),x=S.Grants||S.Grant;x=t.isArray(x)?x:[x],delete S.Grant,delete S.Grants,S.AccessControlList={Grant:x},f=t.json2xml({AccessControlPolicy:S}),o["Content-Type"]="application/xml",o["Content-MD5"]=t.b64(t.md5(f))}t.each(o,function(O,_){_.indexOf("x-cos-grant-")===0&&(o[_]=w(o[_]))}),de.call(this,{Action:"name/cos:PutObjectACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"acl",headers:o,body:f,tracker:e.tracker},function(O,_){if(O)return g(O);g(null,{statusCode:_.statusCode,headers:_.headers})})}function Be(e,g){var o=e.Headers;o.Origin=e.Origin,o["Access-Control-Request-Method"]=e.AccessControlRequestMethod,o["Access-Control-Request-Headers"]=e.AccessControlRequestHeaders,de.call(this,{Action:"name/cos:OptionsObject",method:"OPTIONS",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:o,tracker:e.tracker},function(f,S){if(f)return f.statusCode&&f.statusCode===403?g(null,{OptionsForbidden:!0,statusCode:f.statusCode}):g(f);var x=S.headers||{};g(null,{AccessControlAllowOrigin:x["access-control-allow-origin"],AccessControlAllowMethods:x["access-control-allow-methods"],AccessControlAllowHeaders:x["access-control-allow-headers"],AccessControlExposeHeaders:x["access-control-expose-headers"],AccessControlMaxAge:x["access-control-max-age"],statusCode:S.statusCode,headers:S.headers})})}function Pe(e,g){var o=this,f=e.Headers;!f["Cache-Control"]&&!f["cache-control"]&&(f["Cache-Control"]="");var S=e.CopySource||"",x=t.getSourceParams.call(this,S);if(!x){g(t.error(new Error("CopySource format error")));return}var O=x.Bucket,_=x.Region,Q=decodeURIComponent(x.Key);de.call(this,{Scope:[{action:"name/cos:GetObject",bucket:O,region:_,prefix:Q},{action:"name/cos:PutObject",bucket:e.Bucket,region:e.Region,prefix:e.Key}],method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers,tracker:e.tracker},function(be,Ce){if(be)return g(be);var Oe=t.clone(Ce.CopyObjectResult||{}),ae=z({ForcePathStyle:o.options.ForcePathStyle,protocol:o.options.Protocol,domain:o.options.Domain,bucket:e.Bucket,region:e.Region,object:e.Key,isLocation:!0});t.extend(Oe,{Location:ae,statusCode:Ce.statusCode,headers:Ce.headers}),g(null,Oe)})}function Me(e,g){var o=e.CopySource||"",f=t.getSourceParams.call(this,o);if(!f){g(t.error(new Error("CopySource format error")));return}var S=f.Bucket,x=f.Region,O=decodeURIComponent(f.Key);de.call(this,{Scope:[{action:"name/cos:GetObject",bucket:S,region:x,prefix:O},{action:"name/cos:PutObject",bucket:e.Bucket,region:e.Region,prefix:e.Key}],method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,qs:{partNumber:e.PartNumber,uploadId:e.UploadId},headers:e.Headers,tracker:e.tracker},function(_,Q){if(_)return g(_);var be=t.clone(Q.CopyPartResult||{});t.extend(be,{statusCode:Q.statusCode,headers:Q.headers}),g(null,be)})}function Ke(e,g){var o=e.Objects||[],f=e.Quiet;o=t.isArray(o)?o:[o];var S=t.json2xml({Delete:{Object:o,Quiet:f||!1}}),x=e.Headers;x["Content-Type"]="application/xml",x["Content-MD5"]=t.b64(t.md5(S));var O=t.map(o,function(_){return{action:"name/cos:DeleteObject",bucket:e.Bucket,region:e.Region,prefix:_.Key}});de.call(this,{Scope:O,method:"POST",Bucket:e.Bucket,Region:e.Region,body:S,action:"delete",headers:x,tracker:e.tracker},function(_,Q){if(_)return g(_);var be=Q.DeleteResult||{},Ce=be.Deleted||[],Oe=be.Error||[];Ce=t.isArray(Ce)?Ce:[Ce],Oe=t.isArray(Oe)?Oe:[Oe];var ae=t.clone(be);t.extend(ae,{Error:Oe,Deleted:Ce,statusCode:Q.statusCode,headers:Q.headers}),g(null,ae)})}function _e(e,g){var o=e.Headers;if(!e.RestoreRequest){g(t.error(new Error("missing param RestoreRequest")));return}var f=e.RestoreRequest||{},S=t.json2xml({RestoreRequest:f});o["Content-Type"]="application/xml",o["Content-MD5"]=t.b64(t.md5(S)),de.call(this,{Action:"name/cos:RestoreObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,body:S,action:"restore",headers:o,tracker:e.tracker},g)}function Xe(e,g){var o=e.Tagging||{},f=o.TagSet||o.Tags||e.Tags||[];f=t.clone(t.isArray(f)?f:[f]);var S=t.json2xml({Tagging:{TagSet:{Tag:f}}}),x=e.Headers;x["Content-Type"]="application/xml",x["Content-MD5"]=t.b64(t.md5(S)),de.call(this,{Action:"name/cos:PutObjectTagging",method:"PUT",Bucket:e.Bucket,Key:e.Key,Region:e.Region,body:S,action:"tagging",headers:x,VersionId:e.VersionId,tracker:e.tracker},function(O,_){if(O&&O.statusCode===204)return g(null,{statusCode:O.statusCode});if(O)return g(O);g(null,{statusCode:_.statusCode,headers:_.headers})})}function nt(e,g){de.call(this,{Action:"name/cos:GetObjectTagging",method:"GET",Key:e.Key,Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging",VersionId:e.VersionId,tracker:e.tracker},function(o,f){if(o){if(o.statusCode===404&&o.error&&(o.error==="Not Found"||o.error.Code==="NoSuchTagSet")){var S={Tags:[],statusCode:o.statusCode};o.headers&&(S.headers=o.headers),g(null,S)}else g(o);return}var x=[];try{x=f.Tagging.TagSet.Tag||[]}catch(O){}x=t.clone(t.isArray(x)?x:[x]),g(null,{Tags:x,statusCode:f.statusCode,headers:f.headers})})}function Qe(e,g){de.call(this,{Action:"name/cos:DeleteObjectTagging",method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"tagging",VersionId:e.VersionId,tracker:e.tracker},function(o,f){if(o&&o.statusCode===204)return g(null,{statusCode:o.statusCode});if(o)return g(o);g(null,{statusCode:f.statusCode,headers:f.headers})})}function Re(e,g){var o=e.SelectType;if(!o)return g(t.error(new Error("missing param SelectType")));var f=e.SelectRequest||{},S=t.json2xml({SelectRequest:f}),x=e.Headers;x["Content-Type"]="application/xml",x["Content-MD5"]=t.b64(t.md5(S)),de.call(this,{Action:"name/cos:GetObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"select",qs:{"select-type":e.SelectType},VersionId:e.VersionId,body:S,DataType:"arraybuffer",rawBody:!0,tracker:e.tracker},function(O,_){if(O&&O.statusCode===204)return g(null,{statusCode:O.statusCode});if(O)return g(O);var Q=t.parseSelectPayload(_.body);g(null,{statusCode:_.statusCode,headers:_.headers,Body:Q.body,Payload:Q.payload})})}function Ze(e,g){var o=this,f=e.Headers,S=e.tracker;!f["Cache-Control"]&&!f["cache-control"]&&(f["Cache-Control"]=""),!f["Content-Type"]&&!f["content-type"]&&(f["Content-Type"]=e.Body&&e.Body.type||"");var x=e.Body&&(e.UploadAddMetaMd5||o.options.UploadAddMetaMd5);x&&S&&S.setParams({md5StartTime:new Date().getTime()}),t.getBodyMd5(x,e.Body,function(O){O&&(e.Headers["x-cos-meta-md5"]=O),x&&S&&S.setParams({md5EndTime:new Date().getTime()}),de.call(o,{Action:"name/cos:InitiateMultipartUpload",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"uploads",headers:e.Headers,qs:e.Query,tracker:S},function(_,Q){if(_)return S&&S.parent&&S.parent.setParams({errorNode:"multipartInit"}),g(_);if(Q=t.clone(Q||{}),Q&&Q.InitiateMultipartUploadResult)return g(null,t.extend(Q.InitiateMultipartUploadResult,{statusCode:Q.statusCode,headers:Q.headers}));g(null,Q)})},e.onHashProgress)}function ht(e,g){var o=this;t.getFileSize("multipartUpload",e,function(){var f=e.tracker,S=o.options.UploadCheckContentMd5;S&&f&&f.setParams({md5StartTime:new Date().getTime()}),t.getBodyMd5(S,e.Body,function(x){x&&(e.Headers["Content-MD5"]=t.b64(x)),S&&f&&f.setParams({md5EndTime:new Date().getTime()}),f&&f.setParams({partNumber:e.PartNumber}),de.call(o,{Action:"name/cos:UploadPart",TaskId:e.TaskId,method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,qs:{partNumber:e.PartNumber,uploadId:e.UploadId},headers:e.Headers,onProgress:e.onProgress,body:e.Body||null,tracker:f},function(O,_){if(O)return f&&f.parent&&f.parent.setParams({errorNode:"multipartUpload"}),g(O);g(null,{ETag:t.attr(_.headers,"etag",""),statusCode:_.statusCode,headers:_.headers})})})})}function gt(e,g){for(var o=this,f=e.UploadId,S=e.Parts,x=e.tracker,O=0,_=S.length;O<_;O++)S[O].ETag&&S[O].ETag.indexOf('"')===0||(S[O].ETag='"'+S[O].ETag+'"');var Q=t.json2xml({CompleteMultipartUpload:{Part:S}});Q=Q.replace(/\n\s*/g,"");var be=e.Headers;be["Content-Type"]="application/xml",be["Content-MD5"]=t.b64(t.md5(Q)),de.call(this,{Action:"name/cos:CompleteMultipartUpload",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,qs:{uploadId:f},body:Q,headers:be,tracker:x},function(Ce,Oe){if(Ce)return x&&x.parent&&x.parent.setParams({errorNode:"multipartComplete"}),g(Ce);var ae=z({ForcePathStyle:o.options.ForcePathStyle,protocol:o.options.Protocol,domain:o.options.Domain,bucket:e.Bucket,region:e.Region,object:e.Key,isLocation:!0}),Ne=Oe.CompleteMultipartUploadResult||{};Ne.ProcessResults&&Ne&&Ne.ProcessResults&&(Ne.UploadResult={OriginalInfo:{Key:Ne.Key,Location:ae,ETag:Ne.ETag,ImageInfo:Ne.ImageInfo},ProcessResults:Ne.ProcessResults},delete Ne.ImageInfo,delete Ne.ProcessResults);var at=t.extend(Ne,{Location:ae,statusCode:Oe.statusCode,headers:Oe.headers});g(null,at)})}function Tt(e,g){var o={};o.delimiter=e.Delimiter,o["encoding-type"]=e.EncodingType,o.prefix=e.Prefix||"",o["max-uploads"]=e.MaxUploads,o["key-marker"]=e.KeyMarker,o["upload-id-marker"]=e.UploadIdMarker,o=t.clearKey(o);var f=e.tracker;f&&f.setParams({signStartTime:new Date().getTime()}),de.call(this,{Action:"name/cos:ListMultipartUploads",ResourceKey:o.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:o,action:"uploads",tracker:f},function(S,x){if(S)return f&&f.parent&&f.parent.setParams({errorNode:"multipartList"}),g(S);if(x&&x.ListMultipartUploadsResult){var O=x.ListMultipartUploadsResult.Upload||[];O=t.isArray(O)?O:[O],x.ListMultipartUploadsResult.Upload=O}var _=t.clone(x.ListMultipartUploadsResult||{});t.extend(_,{statusCode:x.statusCode,headers:x.headers}),g(null,_)})}function Dt(e,g){var o={},f=e.tracker;o.uploadId=e.UploadId,o["encoding-type"]=e.EncodingType,o["max-parts"]=e.MaxParts,o["part-number-marker"]=e.PartNumberMarker,de.call(this,{Action:"name/cos:ListParts",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:o,tracker:f},function(S,x){if(S)return f&&f.parent&&f.parent.setParams({errorNode:"multipartListPart"}),g(S);var O=x.ListPartsResult||{},_=O.Part||[];_=t.isArray(_)?_:[_],O.Part=_;var Q=t.clone(O);t.extend(Q,{statusCode:x.statusCode,headers:x.headers}),g(null,Q)})}function ot(e,g){var o={};o.uploadId=e.UploadId,de.call(this,{Action:"name/cos:AbortMultipartUpload",method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:o,tracker:e.tracker},function(f,S){if(f)return g(f);g(null,{statusCode:S.statusCode,headers:S.headers})})}function wt(e,g){de.call(this,{method:e.Method,Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:e.Action,headers:e.Headers,qs:e.Query,body:e.Body,Url:e.Url,rawBody:e.RawBody,DataType:e.DataType,tracker:e.tracker},function(o,f){if(o)return g(o);f&&f.body&&(f.Body=f.body,delete f.body),g(o,f)})}function At(e,g){var o=e.Headers;!o["Cache-Control"]&&!o["cache-control"]&&(o["Cache-Control"]=""),!o["Content-Type"]&&!o["content-type"]&&(o["Content-Type"]=e.Body&&e.Body.type||""),de.call(this,{Action:"name/cos:AppendObject",method:"POST",Bucket:e.Bucket,Region:e.Region,action:"append",Key:e.Key,body:e.Body,qs:{position:e.Position},headers:e.Headers,tracker:e.tracker},function(f,S){if(f)return g(f);g(null,S)})}function Gt(e){var g=this;return t.getAuth({SecretId:e.SecretId||this.options.SecretId||"",SecretKey:e.SecretKey||this.options.SecretKey||"",Bucket:e.Bucket,Region:e.Region,Method:e.Method,Key:e.Key,Query:e.Query,Headers:e.Headers,Expires:e.Expires,UseRawKey:g.options.UseRawKey,SystemClockOffset:g.options.SystemClockOffset})}function c(e,g){var o=this,f=e.UseAccelerate===void 0?o.options.UseAccelerate:e.UseAccelerate,S=z({ForcePathStyle:o.options.ForcePathStyle,protocol:e.Protocol||o.options.Protocol,domain:e.Domain||o.options.Domain,bucket:e.Bucket,region:f?"accelerate":e.Region,object:e.Key}),x="";e.Query&&(x+=t.obj2str(e.Query)),e.QueryString&&(x+=(x?"&":"")+e.QueryString);var O=S;if(e.Sign!==void 0&&!e.Sign)return x&&(O+="?"+x),g(null,{Url:O}),O;var _=le.call(this,{Bucket:e.Bucket,Region:e.Region,UseAccelerate:e.UseAccelerate,Url:S}),Q=Ee.call(this,{Action:(e.Method||"").toUpperCase()==="PUT"?"name/cos:PutObject":"name/cos:GetObject",Bucket:e.Bucket||"",Region:e.Region||"",Method:e.Method||"get",Key:e.Key,Expires:e.Expires,Headers:e.Headers,Query:e.Query,SignHost:_,ForceSignHost:e.ForceSignHost===!1?!1:o.options.ForceSignHost},function(be,Ce){if(g){if(be){g(be);return}var Oe=function(at){var st=at.match(/q-url-param-list.*?(?=&)/g)[0],rt="q-url-param-list="+encodeURIComponent(st.replace(/q-url-param-list=/,"")).toLowerCase(),ct=new RegExp(st,"g"),lt=at.replace(ct,rt);return lt},ae=S;ae+="?"+(Ce.Authorization.indexOf("q-signature")>-1?Oe(Ce.Authorization):"sign="+encodeURIComponent(Ce.Authorization)),Ce.SecurityToken&&(ae+="&x-cos-security-token="+Ce.SecurityToken),Ce.ClientIP&&(ae+="&clientIP="+Ce.ClientIP),Ce.ClientUA&&(ae+="&clientUA="+Ce.ClientUA),Ce.Token&&(ae+="&token="+Ce.Token),x&&(ae+="&"+x),setTimeout(function(){g(null,{Url:ae})})}});return Q?(O+="?"+Q.Authorization+(Q.SecurityToken?"&x-cos-security-token="+Q.SecurityToken:""),x&&(O+="&"+x)):x&&(O+="?"+x),O}function y(e){var g={GrantFullControl:[],GrantWrite:[],GrantRead:[],GrantReadAcp:[],GrantWriteAcp:[],ACL:""},o={FULL_CONTROL:"GrantFullControl",WRITE:"GrantWrite",READ:"GrantRead",READ_ACP:"GrantReadAcp",WRITE_ACP:"GrantWriteAcp"},f=e&&e.AccessControlList||{},S=f.Grant;S&&(S=t.isArray(S)?S:[S]);var x={READ:0,WRITE:0,FULL_CONTROL:0};return S&&S.length&&t.each(S,function(O){O.Grantee.ID==="qcs::cam::anyone:anyone"||O.Grantee.URI==="http://cam.qcloud.com/groups/global/AllUsers"?x[O.Permission]=1:O.Grantee.ID!==e.Owner.ID&&g[o[O.Permission]].push('id="'+O.Grantee.ID+'"')}),x.FULL_CONTROL||x.WRITE&&x.READ?g.ACL="public-read-write":x.READ?g.ACL="public-read":g.ACL="private",t.each(o,function(O){g[O]=w(g[O].join(","))}),g}function w(e){var g=e.split(","),o={},f,S;for(f=0;f"u"?"undefined":a(location))==="object"&&location.protocol==="http:"?"http:":"https:");x||(["cn-south","cn-south-2","cn-north","cn-east","cn-southwest","sg"].indexOf(g)>-1?x="{Region}.myqcloud.com":x="cos.{Region}.myqcloud.com",e.ForcePathStyle||(x="{Bucket}."+x)),x=x.replace(/\{\{AppId\}\}/gi,S).replace(/\{\{Bucket\}\}/gi,f).replace(/\{\{Region\}\}/gi,g).replace(/\{\{.*?\}\}/gi,""),x=x.replace(/\{AppId\}/gi,S).replace(/\{BucketName\}/gi,f).replace(/\{Bucket\}/gi,o).replace(/\{Region\}/gi,g).replace(/\{.*?\}/gi,""),/^[a-zA-Z]+:\/\//.test(x)||(x=_+"//"+x),x.slice(-1)==="/"&&(x=x.slice(0,-1));var Q=x;return e.ForcePathStyle&&(Q+="/"+o),Q+="/",O&&(Q+=t.camSafeUrlEncode(O).replace(/%2F/g,"/")),e.isLocation&&(Q=Q.replace(/^https?:\/\//,"")),Q}var le=function(g){if(!g.Bucket||!g.Region)return"";var o=g.UseAccelerate===void 0?this.options.UseAccelerate:g.UseAccelerate,f=g.Url||z({ForcePathStyle:this.options.ForcePathStyle,protocol:this.options.Protocol,domain:this.options.Domain,bucket:g.Bucket,region:o?"accelerate":g.Region}),S=f.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1");return S};function Ee(e,g){var o=t.clone(e.Headers),f="";t.each(o,function(Le,Te){(Le===""||["content-type","cache-control","expires"].indexOf(Te.toLowerCase())>-1)&&delete o[Te],Te.toLowerCase()==="host"&&(f=Le)});var S=e.ForceSignHost!==!1;!f&&e.SignHost&&S&&(o.Host=e.SignHost);var x=!1,O=function(Te,we){x||(x=!0,we&&we.XCosSecurityToken&&!we.SecurityToken&&(we=t.clone(we),we.SecurityToken=we.XCosSecurityToken,delete we.XCosSecurityToken),g&&g(Te,we))},_=this,Q=e.Bucket||"",be=e.Region||"",Ce=e.Key||"";_.options.ForcePathStyle&&Q&&(Ce=Q+"/"+Ce);var Oe="/"+Ce,ae={},Ne=e.Scope;if(!Ne){var at=e.Action||"",st=e.ResourceKey||e.Key||"";Ne=e.Scope||[{action:at,bucket:Q,region:be,prefix:st}]}var rt=t.md5(JSON.stringify(Ne));_._StsCache=_._StsCache||[],function(){var Le,Te;for(Le=_._StsCache.length-1;Le>=0;Le--){Te=_._StsCache[Le];var we=Math.round(t.getSkewTime(_.options.SystemClockOffset)/1e3)+30;if(Te.StartTime&&we=Te.ExpiredTime){_._StsCache.splice(Le,1);continue}if(!Te.ScopeLimit||Te.ScopeLimit&&Te.ScopeKey===rt){ae=Te;break}}}();var ct=function(){var Te="";ae.StartTime&&e.Expires?Te=ae.StartTime+";"+(ae.StartTime+e.Expires*1):ae.StartTime&&ae.ExpiredTime&&(Te=ae.StartTime+";"+ae.ExpiredTime);var we=t.getAuth({SecretId:ae.TmpSecretId,SecretKey:ae.TmpSecretKey,Method:e.Method,Pathname:Oe,Query:e.Query,Headers:o,Expires:e.Expires,UseRawKey:_.options.UseRawKey,SystemClockOffset:_.options.SystemClockOffset,KeyTime:Te,ForceSignHost:S}),qe={Authorization:we,SecurityToken:ae.SecurityToken||ae.XCosSecurityToken||"",Token:ae.Token||"",ClientIP:ae.ClientIP||"",ClientUA:ae.ClientUA||"",SignFrom:"client"};O(null,qe)},lt=function(Te){if(Te.Authorization){var we=!1,qe=Te.Authorization;if(qe)if(qe.indexOf(" ")>-1)we=!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)we=!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&&(we=!0)}catch(er){}if(!we)return t.error(new Error("getAuthorization callback params format error"))}else{if(!Te.TmpSecretId)return t.error(new Error('getAuthorization callback params missing "TmpSecretId"'));if(!Te.TmpSecretKey)return t.error(new Error('getAuthorization callback params missing "TmpSecretKey"'));if(!Te.SecurityToken&&!Te.XCosSecurityToken)return t.error(new Error('getAuthorization callback params missing "SecurityToken"'));if(!Te.ExpiredTime)return t.error(new Error('getAuthorization callback params missing "ExpiredTime"'));if(Te.ExpiredTime&&Te.ExpiredTime.toString().length!==10)return t.error(new Error('getAuthorization callback params "ExpiredTime" should be 10 digits'));if(Te.StartTime&&Te.StartTime.toString().length!==10)return t.error(new Error('getAuthorization callback params "StartTime" should be 10 StartTime'))}return!1};if(ae.ExpiredTime&&ae.ExpiredTime-t.getSkewTime(_.options.SystemClockOffset)/1e3>60)ct();else if(_.options.getAuthorization)_.options.getAuthorization.call(_,{Bucket:Q,Region:be,Method:e.Method,Key:Ce,Pathname:Oe,Query:e.Query,Headers:o,Scope:Ne,SystemClockOffset:_.options.SystemClockOffset,ForceSignHost:S},function(Le){typeof Le=="string"&&(Le={Authorization:Le});var Te=lt(Le);if(Te)return O(Te);Le.Authorization?O(null,Le):(ae=Le||{},ae.Scope=Ne,ae.ScopeKey=rt,_._StsCache.push(ae),ct())});else if(_.options.getSTS)_.options.getSTS.call(_,{Bucket:Q,Region:be},function(Le){ae=Le||{},ae.Scope=Ne,ae.ScopeKey=rt,ae.TmpSecretId||(ae.TmpSecretId=ae.SecretId),ae.TmpSecretKey||(ae.TmpSecretKey=ae.SecretKey);var Te=lt(ae);if(Te)return O(Te);_._StsCache.push(ae),ct()});else return function(){var Le=t.getAuth({SecretId:e.SecretId||_.options.SecretId,SecretKey:e.SecretKey||_.options.SecretKey,Method:e.Method,Pathname:Oe,Query:e.Query,Headers:o,Expires:e.Expires,UseRawKey:_.options.UseRawKey,SystemClockOffset:_.options.SystemClockOffset,ForceSignHost:S}),Te={Authorization:Le,SecurityToken:_.options.SecurityToken||_.options.XCosSecurityToken,SignFrom:"client"};return O(null,Te),Te}();return""}function je(e){var g=this,o=!1,f=!1,S=!1,x=e.headers&&(e.headers.date||e.headers.Date)||e.error&&e.error.ServerTime;try{var O=e.error.Code,_=e.error.Message;(O==="RequestTimeTooSkewed"||O==="AccessDenied"&&_==="Request has expired")&&(f=!0)}catch(be){}if(e)if(f&&x){var Q=Date.parse(x);this.options.CorrectClockSkew&&Math.abs(t.getSkewTime(this.options.SystemClockOffset)-Q)>=3e4&&(console.error("error: Local time is too skewed."),this.options.SystemClockOffset=Q-Date.now(),o=!0)}else Math.floor(e.statusCode/100)===5?o=!0:e.message==="CORS blocked or network error"&&(S=!0,o=g.options.AutoSwitchHost);return{canRetry:o,networkError:S}}function Ye(e){var g=e.requestUrl,o=e.clientCalcSign,f=e.networkError;if(!this.options.AutoSwitchHost||!g||!o||!f)return!1;var S=/^https?:\/\/[^\/]*\.cos\.[^\/]*\.myqcloud\.com(\/.*)?$/,x=/^https?:\/\/[^\/]*\.cos\.accelerate\.myqcloud\.com(\/.*)?$/,O=S.test(g)&&!x.test(g);return O}function de(e,g){var o=this;!e.headers&&(e.headers={}),!e.qs&&(e.qs={}),e.VersionId&&(e.qs.versionId=e.VersionId),e.qs=t.clearKey(e.qs),e.headers&&(e.headers=t.clearKey(e.headers)),e.qs&&(e.qs=t.clearKey(e.qs));var f=t.clone(e.qs);e.action&&(f[e.action]="");var S=e.url||e.Url,x=e.SignHost||le.call(this,{Bucket:e.Bucket,Region:e.Region,Url:S}),O=e.tracker,_=function Q(be){var Ce=o.options.SystemClockOffset;O&&O.setParams({signStartTime:new Date().getTime(),httpRetryTimes:be-1}),e.SwitchHost&&(x=x.replace(/myqcloud.com/,"tencentcos.cn")),Ee.call(o,{Bucket:e.Bucket||"",Region:e.Region||"",Method:e.method,Key:e.Key,Query:f,Headers:e.headers,SignHost:x,Action:e.Action,ResourceKey:e.ResourceKey,Scope:e.Scope,ForceSignHost:o.options.ForceSignHost,SwitchHost:e.SwitchHost},function(Oe,ae){if(Oe){g(Oe);return}O&&O.setParams({signEndTime:new Date().getTime(),httpStartTime:new Date().getTime()}),e.AuthData=ae,ut.call(o,e,function(Ne,at){O&&O.setParams({httpEndTime:new Date().getTime()});var st=!1,rt=!1;if(Ne){var ct=je.call(o,Ne);st=ct.canRetry||Ce!==o.options.SystemClockOffset,rt=ct.networkError}if(Ne&&be<2&&st){e.headers&&(delete e.headers.Authorization,delete e.headers.token,delete e.headers.clientIP,delete e.headers.clientUA,e.headers["x-cos-security-token"]&&delete e.headers["x-cos-security-token"],e.headers["x-ci-security-token"]&&delete e.headers["x-ci-security-token"]);var lt=Ye.call(o,{requestUrl:(Ne==null?void 0:Ne.url)||"",clientCalcSign:ae.SignFrom==="client",networkError:rt});e.SwitchHost=lt,Q(be+1)}else g(Ne,at)})})};_(1)}function ut(e,g){var o=this,f=e.TaskId;if(!(f&&!o._isRunningTask(f))){var S=e.Bucket,x=e.Region,O=e.Key,_=e.method||"GET",Q=e.Url||e.url,be=e.body,Ce=e.rawBody;o.options.UseAccelerate&&(x="accelerate"),Q=Q||z({ForcePathStyle:o.options.ForcePathStyle,protocol:o.options.Protocol,domain:o.options.Domain,bucket:S,region:x,object:O}),e.SwitchHost&&(Q=Q.replace(/myqcloud.com/,"tencentcos.cn"));var Oe=O?Q:"";e.action&&(Q=Q+"?"+(t.isIOS_QQ?"".concat(e.action,"="):e.action)),e.qsStr&&(Q.indexOf("?")>-1?Q=Q+"&"+e.qsStr:Q=Q+"?"+e.qsStr);var ae={method:_,url:Q,headers:e.headers,qs:e.qs,body:be},Ne="x-cos-security-token";if(t.isCIHost(Q)&&(Ne="x-ci-security-token"),ae.headers.Authorization=e.AuthData.Authorization,e.AuthData.Token&&(ae.headers.token=e.AuthData.Token),e.AuthData.ClientIP&&(ae.headers.clientIP=e.AuthData.ClientIP),e.AuthData.ClientUA&&(ae.headers.clientUA=e.AuthData.ClientUA),e.AuthData.SecurityToken&&(ae.headers[Ne]=e.AuthData.SecurityToken),ae.headers&&(ae.headers=t.clearKey(ae.headers)),ae=t.clearKey(ae),e.onProgress&&typeof e.onProgress=="function"){var at=be&&(be.size||be.length)||0;ae.onProgress=function(we){if(!(f&&!o._isRunningTask(f))){var qe=we?we.loaded:0;e.onProgress({loaded:qe,total:at})}}}e.onDownloadProgress&&(ae.onDownloadProgress=e.onDownloadProgress),e.DataType&&(ae.dataType=e.DataType),this.options.Timeout&&(ae.timeout=this.options.Timeout),o.options.ForcePathStyle&&(ae.pathStyle=o.options.ForcePathStyle),o.emit("before-send",ae);var st=ae.url.includes("accelerate."),rt=ae.qs?Object.keys(ae.qs).map(function(we){return"".concat(we,"=").concat(ae.qs[we])}).join("&"):"",ct=rt?ae.url+"?"+rt:ae.url;if(e.tracker){var lt;e.tracker.setParams({url:ct,httpMethod:ae.method,accelerate:st,httpSize:((lt=ae.body)===null||lt===void 0?void 0:lt.size)||0}),e.tracker.parent&&!e.tracker.parent.params.url&&e.tracker.parent.setParams({url:Oe,accelerate:st})}var Le=(o.options.Request||d)(ae,function(we){if(!(we&&we.error==="abort")){var qe={options:ae,error:we&&we.error,statusCode:we&&we.statusCode||0,statusMessage:we&&we.statusMessage||"",headers:we&&we.headers||{},body:we&&we.body};o.emit("after-receive",qe);var er=qe.error,Lt=qe.body,vt={statusCode:qe.statusCode,statusMessage:qe.statusMessage,headers:qe.headers},Dr,Rt=function(Yt,tr){if(f&&o.off("inner-kill-task",Te),!Dr){Dr=!0;var Ot={};vt&&vt.statusCode&&(Ot.statusCode=vt.statusCode),vt&&vt.headers&&(Ot.headers=vt.headers),Yt?(ae.url&&(Ot.url=ae.url),ae.method&&(Ot.method=ae.method),Yt=t.extend(Yt||{},Ot),g(Yt,null)):(tr=t.extend(tr||{},Ot),g(null,tr)),Le=null}};if(er)return Rt(t.error(er));var Wt=vt.statusCode,Ar=Math.floor(Wt/100)===2;if(Ce&&Ar)return Rt(null,{body:Lt});var Ut;try{Ut=Lt&&Lt.indexOf("<")>-1&&Lt.indexOf(">")>-1&&t.xml2json(Lt)||{}}catch(si){Ut={}}var Xt=Ut&&Ut.Error;Ar?Rt(null,Ut):Xt?Rt(t.error(new Error(Xt.Message),{code:Xt.Code,error:Xt})):Wt?Rt(t.error(new Error(vt.statusMessage),{code:""+Wt})):Wt&&Rt(t.error(new Error("statusCode error")))}}),Te=function we(qe){qe.TaskId===f&&(Le&&Le.abort&&Le.abort(),o.off("inner-kill-task",we))};f&&o.on("inner-kill-task",Te)}}var et={getService:R,putBucket:B,headBucket:b,getBucket:A,deleteBucket:k,putBucketAcl:U,getBucketAcl:N,putBucketCors:K,getBucketCors:M,deleteBucketCors:j,getBucketLocation:W,getBucketPolicy:X,putBucketPolicy:q,deleteBucketPolicy:L,putBucketTagging:D,getBucketTagging:E,deleteBucketTagging:F,putBucketLifecycle:u,getBucketLifecycle:s,deleteBucketLifecycle:h,putBucketVersioning:l,getBucketVersioning:v,putBucketReplication:C,getBucketReplication:P,deleteBucketReplication:T,putBucketWebsite:V,getBucketWebsite:$,deleteBucketWebsite:ee,putBucketReferer:ne,getBucketReferer:re,putBucketDomain:J,getBucketDomain:ce,deleteBucketDomain:oe,putBucketOrigin:fe,getBucketOrigin:Y,deleteBucketOrigin:Z,putBucketLogging:he,getBucketLogging:ve,putBucketInventory:ge,postBucketInventory:ye,getBucketInventory:me,listBucketInventory:De,deleteBucketInventory:ke,putBucketAccelerate:Se,getBucketAccelerate:xe,putBucketEncryption:Ue,getBucketEncryption:Fe,deleteBucketEncryption:ie,getObject:H,headObject:I,listObjectVersions:G,putObject:te,deleteObject:ue,getObjectAcl:se,putObjectAcl:Ae,optionsObject:Be,putObjectCopy:Pe,deleteMultipleObject:Ke,restoreObject:_e,putObjectTagging:Xe,getObjectTagging:nt,deleteObjectTagging:Qe,selectObjectContent:Re,appendObject:At,uploadPartCopy:Me,multipartInit:Ze,multipartUpload:ht,multipartComplete:gt,multipartList:Tt,multipartListPart:Dt,multipartAbort:ot,request:wt,getObjectUrl:c,getAuth:Gt};function pt(e,g,o){t.each(["Cors","Acl"],function(f){if(e.slice(-f.length)===f){var S=e.slice(0,-f.length)+f.toUpperCase(),x=t.apiWrapper(e,g),O=!1;o[S]=function(){!O&&console.warn("warning: cos."+S+" has been deprecated. Please Use cos."+e+" instead."),O=!0,x.apply(this,arguments)}}})}n.exports.init=function(e,g){g.transferToTaskMethod(et,"putObject"),t.each(et,function(o,f){e.prototype[f]=t.apiWrapper(f,o),pt(f,o,e.prototype)})}},"./src/cos.js":function(n,r,p){var a=p("./src/util.js"),d=p("./src/event.js"),t=p("./src/task.js"),R=p("./src/base.js"),B=p("./src/advance.js"),b=p("./package.json"),A={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,AutoSwitchHost:!0,CopySourceParser:null,DeepTracker:!1,TrackerDelay:5e3,CustomId:"",BeaconReporter:null,ClsReporter:null},k=function(N){if(this.options=a.extend(a.clone(A),N||{}),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.EnableReporter=this.options.BeaconReporter||this.options.ClsReporter,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")),a.isNode()&&(console.log("Tip: Next.js、Nuxt.js 等服务端渲染技术可正常使用JavaScript SDK,请忽略下方 nodejs 环境警告"),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")),this.options.ForcePathStyle)throw console.warn("cos-js-sdk-v5不再支持使用path-style,仅支持使用virtual-hosted-style,参考文档:https://cloud.tencent.com/document/product/436/96243"),new Error("ForcePathStyle is not supported");d.init(this),t.init(this)};R.init(k,t),B.init(k,t),k.util={md5:a.md5,xml2json:a.xml2json,json2xml:a.json2xml,encodeBase64:a.encodeBase64},k.getAuthorization=a.getAuth,k.version=b.version,n.exports=k},"./src/event.js":function(n,r){var p=function(t){var R={},B=function(A){return!R[A]&&(R[A]=[]),R[A]};t.on=function(b,A){b==="task-list-update"&&console.warn('warning: Event "'+b+'" has been deprecated. Please use "list-update" instead.'),B(b).push(A)},t.off=function(b,A){for(var k=B(b),U=k.length-1;U>=0;U--)A===k[U]&&k.splice(U,1)},t.emit=function(b,A){for(var k=B(b).map(function(N){return N}),U=0;U=0;W--){var q=R[W][2];(!q||q+t=0;q--){var X=R[q];X[0]===M&&X[1]===j&&R.splice(q,1)}R.unshift([M,j,Math.round(Date.now()/1e3)]),R.length>W&&R.splice(W),U()}},removeUploadId:function(M){k.call(this),delete N.using[M];for(var j=R.length-1;j>=0;j--)R[j][1]===M&&R.splice(j,1);U()}};n.exports=N},"./src/task.js":function(n,r,p){var a=p("./src/session.js"),d=p("./src/util.js"),t={},R=function(A,k){t[k]=A[k],A[k]=function(U,N){U.SkipTask?t[k].call(this,U,N):this._addTask(k,U,N)}},B=function(A){var k=[],U={},N=0,K=0,M=function(E){var F={id:E.id,Bucket:E.Bucket,Region:E.Region,Key:E.Key,FilePath:E.FilePath,state:E.state,loaded:E.loaded,size:E.size,speed:E.speed,percent:E.percent,hashPercent:E.hashPercent,error:E.error};return E.FilePath&&(F.FilePath=E.FilePath),E._custom&&(F._custom=E._custom),F},j=function(){var D,E=function(){D=0,A.emit("task-list-update",{list:d.map(k,M)}),A.emit("list-update",{list:d.map(k,M)})};return function(){D||(D=setTimeout(E))}}(),W=function(){if(!(k.length<=A.options.UploadQueueSize)){for(var E=0;EA.options.UploadQueueSize;){var F=k[E].state==="waiting"||k[E].state==="checking"||k[E].state==="uploading";!k[E]||!F?(U[k[E].id]&&delete U[k[E].id],k.splice(E,1),K--):E++}j()}},q=function D(){if(!(N>=A.options.FileParallelLimit)){for(;k[K]&&k[K].state!=="waiting";)K++;if(!(K>=k.length)){var E=k[K];K++,N++,E.state="checking",E.params.onTaskStart&&E.params.onTaskStart(M(E)),!E.params.UploadData&&(E.params.UploadData={});var F=d.formatParams(E.api,E.params);t[E.api].call(A,F,function(u,s){A._isRunningTask(E.id)&&((E.state==="checking"||E.state==="uploading")&&(E.state=u?"error":"success",u&&(E.error=u),N--,j(),D(),E.callback&&E.callback(u,s),E.state==="success"&&(E.params&&(delete E.params.UploadData,delete E.params.Body,delete E.params),delete E.callback)),W())}),j(),setTimeout(D)}}},X=function(E,F){var u=U[E];if(u){var s=u&&u.state==="waiting",h=u&&(u.state==="checking"||u.state==="uploading");if(F==="canceled"&&u.state!=="canceled"||F==="paused"&&s||F==="paused"&&h){if(F==="paused"&&u.params.Body&&typeof u.params.Body.pipe=="function"){console.error("stream not support pause");return}u.state=F,A.emit("inner-kill-task",{TaskId:E,toState:F});try{var l=u&&u.params&&u.params.UploadData.UploadId}catch(v){}F==="canceled"&&l&&a.removeUsing(l),j(),h&&(N--,q()),F==="canceled"&&(u.params&&(delete u.params.UploadData,delete u.params.Body,delete u.params),delete u.callback)}W()}};A._addTasks=function(D){d.each(D,function(E){A._addTask(E.api,E.params,E.callback,!0)}),j()};var L=!0;A._addTask=function(D,E,F,u){E=d.formatParams(D,E);var s=d.uuid();E.TaskId=s,E.onTaskReady&&E.onTaskReady(s),E.TaskReady&&(E.TaskReady(s),L&&console.warn('warning: Param "TaskReady" has been deprecated. Please use "onTaskReady" instead.'),L=!1);var h={params:E,callback:F,api:D,index:k.length,id:s,Bucket:E.Bucket,Region:E.Region,Key:E.Key,FilePath:E.FilePath||"",state:"waiting",loaded:0,size:0,speed:0,percent:0,hashPercent:0,error:null,_custom:E._custom},l=E.onHashProgress;E.onHashProgress=function(C){A._isRunningTask(h.id)&&(h.hashPercent=C.percent,l&&l(C),j())};var v=E.onProgress;return E.onProgress=function(C){A._isRunningTask(h.id)&&(h.state==="checking"&&(h.state="uploading"),h.loaded=C.loaded,h.speed=C.speed,h.percent=C.percent,v&&v(C),j())},d.getFileSize(D,E,function(C,P){if(C)return F(d.error(C));U[s]=h,k.push(h),h.size=P,!u&&j(),q(),W()}),s},A._isRunningTask=function(D){var E=U[D];return!!(E&&(E.state==="checking"||E.state==="uploading"))},A.getTaskList=function(){return d.map(k,M)},A.cancelTask=function(D){X(D,"canceled")},A.pauseTask=function(D){X(D,"paused")},A.restartTask=function(D){var E=U[D];E&&(E.state==="paused"||E.state==="error")&&(E.state="waiting",j(),K=Math.min(K,E.index),q())},A.isUploadRunning=function(){return N||K"u"?"undefined":t(navigator))==="object"){var F=navigator.connection||navigator.mozConnection||navigator.webkitConnection;return(F==null?void 0:F.type)||(F==null?void 0:F.effectiveType)||"unknown"}return"unknown"},getProtocol:function(){return(typeof location>"u"?"undefined":t(location))==="object"?location.protocol.replace(/:/,""):"unknown protocol"},getOsType:function(){if((typeof navigator>"u"?"undefined":t(navigator))!=="object")return"unknown os";var F=navigator.userAgent.toLowerCase(),u=/macintosh|mac os x/i.test(navigator.userAgent);return F.indexOf("win32")>=0||F.indexOf("wow32")>=0?"win32":F.indexOf("win64")>=0||F.indexOf("wow64")>=0?"win64":u?"mac":"unknown os"},isMobile:function(){var F=/(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":t(navigator))==="object"&&navigator.userAgent.match(F))},isAndroid:function(){var F=/(Android|Adr|Linux)/i;return!!((typeof navigator>"u"?"undefined":t(navigator))==="object"&&navigator.userAgent.match(F))},isIOS:function(){var F=/(iPhone|iPod|iPad|iOS)/i;return!!((typeof navigator>"u"?"undefined":t(navigator))==="object"&&navigator.userAgent.match(F))},isOtherMobile:function(){return U&&!isAndroid&&!isIOS},getUA:function(){if((typeof navigator>"u"?"undefined":t(navigator))!=="object")return"unknown device";var F=navigator.userAgent;return F}},U=k.isMobile(),N=k.isAndroid()?"android":k.isIOS?"ios":"other_mobile",K=k.getOsType(),M=U?N:K,j=k.getUA(),W=k.getProtocol(),q=function(F){return["putObject","sliceUploadFile","uploadFile","uploadFiles"].includes(F)?"UploadTask":F==="getObject"?"DownloadTask":["putObjectCopy","sliceCopyFile"].includes(F)?"CopyTask":F};function X(E){return E.replace(/([A-Z])/g,"_$1").toLowerCase()}function L(E){var F={},u=["sdkVersionName","sdkVersionCode","osName","networkType","requestName","requestResult","bucket","region","appid","accelerate","url","host","requestPath","userAgent","networkProtocol","httpMethod","httpSize","httpSpeed","httpTookTime","httpMd5","httpSign","httpFullTime","httpDomain","partNumber","httpRetryTimes","customId","traceId","realApi"],s=[].concat(u,["errorNode","errorCode","errorName","errorMessage","errorRequestId","errorHttpCode","errorServiceName","errorType","fullError"]),h=E.requestResult==="Success"?u:s;for(var l in E)if(h.includes(l)){var v=X(l);F[v]=E[l]}return F.request_name=E.realApi?q(E.realApi):E.requestName,F}var D=function(){function E(F){a(this,E);var u=F.parent,s=F.traceId,h=F.bucket,l=F.region,v=F.apiName,C=F.realApi,P=F.httpMethod,T=F.fileKey,V=F.fileSize,$=F.accelerate,ee=F.customId,ne=F.delay,re=F.deepTracker,J=F.Beacon,ce=F.clsReporter,oe=h&&h.substr(h.lastIndexOf("-")+1)||"";this.parent=u,this.deepTracker=re,this.delay=ne,ce&&!this.clsReporter&&(this.clsReporter=ce),this.params={sdkVersionName:"cos-js-sdk-v5",sdkVersionCode:R.version,osName:M,networkType:"",requestName:v||"",requestResult:"",realApi:C,bucket:h,region:l,accelerate:$,httpMethod:P,url:"",host:"",httpDomain:"",requestPath:T||"",userAgent:j,networkProtocol:W,errorType:"",errorCode:"",errorName:"",errorMessage:"",errorRequestId:"",errorHttpCode:0,errorServiceName:"",errorNode:"",httpTookTime:0,httpSize:V||0,httpMd5:0,httpSign:0,httpFullTime:0,httpSpeed:0,md5StartTime:0,md5EndTime:0,signStartTime:0,signEndTime:0,httpStartTime:0,httpEndTime:0,startTime:new Date().getTime(),endTime:0,traceId:s||k.getUid(),appid:oe,partNumber:0,httpRetryTimes:0,customId:ee||"",partTime:0},J&&(this.beacon=b(J,ne))}return d(E,[{key:"formatResult",value:function(u,s){var h,l,v,C,P,T,V=new Date().getTime(),$=k.getNetType(),ee=u?(u==null?void 0:u.code)||(u==null||(h=u.error)===null||h===void 0?void 0:h.code)||(u==null||(l=u.error)===null||l===void 0?void 0:l.Code):"",ne=u?(u==null?void 0:u.message)||(u==null||(v=u.error)===null||v===void 0?void 0:v.message)||(u==null||(C=u.error)===null||C===void 0?void 0:C.Message):"",re=ne,J=u?(u==null?void 0:u.resource)||(u==null||(P=u.error)===null||P===void 0?void 0:P.resource)||(u==null||(T=u.error)===null||T===void 0?void 0:T.Resource):"",ce=u?u==null?void 0:u.statusCode:s.statusCode,oe=u?(u==null?void 0:u.headers)&&(u==null?void 0:u.headers["x-cos-request-id"]):(s==null?void 0:s.headers)&&(s==null?void 0:s.headers["x-cos-request-id"]),fe=u?oe?"Server":"Client":"";this.params.requestName==="getObject"&&(this.params.httpSize=s?s.headers&&s.headers["content-length"]:0);var Y=this.params.realApi==="sliceUploadFile",Z=this.params.realApi==="sliceCopyFile";if(Y||Z){var he=this.params.httpSize/1024/this.params.partTime;Object.assign(this.params,{httpSpeed:he<0?0:he.toFixed(3)})}else{var ve=V-this.params.startTime,pe=this.params.httpEndTime-this.params.httpStartTime,ge=this.params.httpSize/1024/(pe/1e3),ye=this.params.md5EndTime-this.params.md5StartTime,me=this.params.signEndTime-this.params.signStartTime;this.parent&&(this.parent.addParamValue("httpTookTime",A(pe)),this.parent.addParamValue("httpFullTime",A(ve)),this.parent.addParamValue("httpMd5",A(ye)),this.parent.addParamValue("httpSign",A(me)),["multipartUpload","uploadPartCopy","putObjectCopy"].includes(this.params.requestName)&&this.parent.addParamValue("partTime",A(pe))),Object.assign(this.params,{httpFullTime:A(ve),httpMd5:A(ye),httpSign:A(me),httpTookTime:A(pe),httpSpeed:ge<0?0:ge.toFixed(3)})}if(Object.assign(this.params,{networkType:$,requestResult:u?"Failure":"Success",errorType:fe,errorCode:ee,errorHttpCode:ce,errorName:re,errorMessage:ne,errorServiceName:J,errorRequestId:oe}),u&&(!ee||!ne)&&(this.params.fullError=u?JSON.stringify(u):""),this.params.url){try{var De=/^http(s)?:\/\/(.*?)\//.exec(this.params.url);this.params.host=De[2]}catch(ke){this.params.host=this.params.url}this.params.httpDomain=this.params.host}}},{key:"report",value:function(u,s){if(!(!this.beacon&&!this.clsReporter)){this.formatResult(u,s);var h=L(this.params);console.log(h),this.beacon&&this.sendEventsToBeacon(h),this.clsReporter&&this.sendEventsToCLS(h)}}},{key:"setParams",value:function(u){Object.assign(this.params,u)}},{key:"addParamValue",value:function(u,s){this.params[u]=(+this.params[u]+ +s).toFixed(3)}},{key:"sendEventsToBeacon",value:function(u){var s=this.params.requestName==="sliceUploadFile"||this.params.realApi==="sliceUploadFile";if(!(s&&!this.deepTracker)){var h="qcloud_track_cos_sdk";this.delay===0?this.beacon&&this.beacon.onDirectUserAction(h,u):this.beacon&&this.beacon.onUserAction(h,u)}}},{key:"sendEventsToCLS",value:function(u){var s=this.delay===0;this.clsReporter.log(u,s)}},{key:"generateSubTracker",value:function(u){return Object.assign(u,{parent:this,deepTracker:this.deepTracker,traceId:this.params.traceId,bucket:this.params.bucket,region:this.params.region,accelerate:this.params.accelerate,fileKey:this.params.requestPath,customId:this.params.customId,delay:this.delay,clsReporter:this.clsReporter}),new E(u)}}]),E}();n.exports=D},"./src/util.js":function(n,r,p){(function(a){var d=p("./node_modules/@babel/runtime/helpers/typeof.js"),t=p("./lib/md5.js"),R=p("./lib/crypto.js"),B=p("./lib/xml2json.js"),b=p("./lib/json2xml.js"),A=p("./lib/base64.js"),k=p("./src/tracker.js");function U(ie){return encodeURIComponent(ie).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function N(ie,I){var G=[];for(var H in ie)ie.hasOwnProperty(H)&&G.push(I?U(H).toLowerCase():H);return G.sort(function(te,ue){return te=te.toLowerCase(),ue=ue.toLowerCase(),te===ue?0:te>ue?1:-1})}var K=function(I,G){var H,te,ue,se=[],Ae=N(I);for(H=0;H-1||M.indexOf(te)>-1)&&(G[H]=I[H])}return G},W=function(I){I=I||{};var G=I.SecretId,H=I.SecretKey,te=I.KeyTime,ue=(I.method||I.Method||"get").toLowerCase(),se=P(I.Query||I.params||{}),Ae=j(P(I.Headers||I.headers||{})),Be=I.Key||"",Pe;I.UseRawKey?Pe=I.Pathname||I.pathname||"/"+Be:(Pe=I.Pathname||I.pathname||Be,Pe.indexOf("/")!==0&&(Pe="/"+Pe));var Me=I.ForceSignHost!==!1;if(!Ae.Host&&!Ae.host&&I.Bucket&&I.Region&&Me&&(Ae.Host=I.Bucket+".cos."+I.Region+".myqcloud.com"),!G)throw new Error("missing param SecretId");if(!H)throw new Error("missing param SecretKey");var Ke=Math.round(ge(I.SystemClockOffset)/1e3)-1,_e=Ke,Xe=I.Expires||I.expires;Xe===void 0?_e+=900:_e+=Xe*1||0;var nt="sha1",Qe=G,Re=te||Ke+";"+_e,Ze=te||Ke+";"+_e,ht=N(Ae,!0).join(";").toLowerCase(),gt=N(se,!0).join(";").toLowerCase(),Tt=R.HmacSHA1(Ze,H).toString(),Dt=[ue,Pe,Fe.obj2str(se,!0),Fe.obj2str(Ae,!0),""].join("\n"),ot=["sha1",Re,R.SHA1(Dt).toString(),""].join("\n"),wt=R.HmacSHA1(ot,Tt).toString(),At=["q-sign-algorithm="+nt,"q-ak="+Qe,"q-sign-time="+Re,"q-key-time="+Ze,"q-header-list="+ht,"q-url-param-list="+gt,"q-signature="+wt].join("&");return At},q=function(I,G,H){var te=G/8,ue=I.slice(H,H+te);return new Uint8Array(ue).reverse(),new{8:Uint8Array,16:Uint16Array,32:Uint32Array}[G](ue)[0]},X=function(I,G,H,te){var ue=I.slice(G,H),se="";return new Uint8Array(ue).forEach(function(Ae){se+=String.fromCharCode(Ae)}),te&&(se=decodeURIComponent(escape(se))),se},L=function(I){for(var G={},H=X(I),te={records:[]};I.byteLength;){var ue=q(I,32,0),se=q(I,32,4),Ae=ue-se-16,Be=0,Pe;for(I=I.slice(12);BeparseInt(te[ue])?1:-1;return 0},I=function(H){if(!H)return!1;var te=(H.match(/Chrome\/([.\d]+)/)||[])[1],ue=(H.match(/QBCore\/([.\d]+)/)||[])[1],se=(H.match(/QQBrowser\/([.\d]+)/)||[])[1],Ae=te&&ie(te,"53.0.2785.116")<0&&ue&&ie(ue,"3.53.991.400")<0&&se&&ie(se,"9.0.2524.400")<=0||!1;return Ae};return I(typeof navigator<"u"&&navigator.userAgent)}(),h=function(I,G,H,te,ue){var se;if(I.slice?se=I.slice(G,H):I.mozSlice?se=I.mozSlice(G,H):I.webkitSlice&&(se=I.webkitSlice(G,H)),te&&s){var Ae=new FileReader;Ae.onload=function(Be){se=null,ue(new Blob([Ae.result]))},Ae.readAsArrayBuffer(se)}else ue(se)},l=function(I,G,H,te){H=H||E,I?typeof G=="string"?H(Fe.md5(G,!0)):Blob&&G instanceof Blob?Fe.getFileMd5(G,function(ue,se){H(se)},te):H():H()},v=1024*1024,C=function(I,G,H){var te=I.size,ue=0,se=t.getCtx(),Ae=function Be(Pe){if(Pe>=te){var Me=se.digest("hex");G(null,Me);return}var Ke=Math.min(te,Pe+v);Fe.fileSlice(I,Pe,Ke,!1,function(_e){u(_e,function(Xe){_e=null,se=se.update(Xe,!0),ue+=Xe.length,Xe=null,H&&H({loaded:ue,total:te,percent:Math.round(ue/te*1e4)/1e4}),Be(Pe+v)})})};Ae(0)};function P(ie){return J(ie,function(I){return d(I)==="object"&&I!==null?P(I):I})}function T(ie,I,G){return ie&&I in ie?ie[I]:G}function V(ie,I){return re(I,function(G,H){ie[H]=I[H]}),ie}function $(ie){return ie instanceof Array}function ee(ie,I){for(var G=!1,H=0;H-1,Be=!se||typeof se=="string"&&se.indexOf("{Region}")>-1;if(I.indexOf("Bucket")>-1||I==="deleteMultipleObject"||I==="multipartList"||I==="listObjectVersions"){if(Ae&&!H)return"Bucket";if(Be&&!te)return"Region"}else if(I.indexOf("Object")>-1||I.indexOf("multipart")>-1||I==="sliceUploadFile"||I==="abortUploadTask"||I==="uploadFile"){if(Ae&&!H)return"Bucket";if(Be&&!te)return"Region";if(!ue)return"Key"}return!1},Z=function(I,G){if(G=V({},G),I!=="getAuth"&&I!=="getV4Auth"&&I!=="getObjectUrl"){var H=G.Headers||{};if(G&&d(G)==="object"){(function(){for(var ue in G)G.hasOwnProperty(ue)&&ue.indexOf("x-cos-")>-1&&(H[ue]=G[ue])})();var te={"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"};Fe.each(te,function(ue,se){G[ue]!==void 0&&(H[se]=G[ue])}),G.Headers=F(H)}}return G},he=function(I,G){return function(H,te){var ue=this;typeof H=="function"&&(te=H,H={}),H=Z(I,H);var se;if(ue.options.EnableReporter)if(H.calledBySdk==="sliceUploadFile"||H.calledBySdk==="sliceCopyFile")se=H.tracker&&H.tracker.generateSubTracker({apiName:I});else if(["uploadFile","uploadFiles"].includes(I))se=null;else{var Ae=0;H.Body&&(Ae=typeof H.Body=="string"?H.Body.length:H.Body.size||H.Body.byteLength||0);var Be=ue.options.UseAccelerate||typeof ue.options.Domain=="string"&&ue.options.Domain.includes("accelerate.");se=new k({Beacon:ue.options.BeaconReporter,clsReporter:ue.options.ClsReporter,bucket:H.Bucket,region:H.Region,apiName:I,realApi:I,accelerate:Be,fileKey:H.Key,fileSize:Ae,deepTracker:ue.options.DeepTracker,customId:ue.options.CustomId,delay:ue.options.TrackerDelay})}H.tracker=se;var Pe=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},Me=function(Re,Ze){se&&se.report(Re,Ze),te&&te(Pe(Re),Pe(Ze))},Ke=function(){if(I!=="getService"&&I!=="abortUploadTask"){var Re=Y.call(ue,I,H);if(Re)return"missing param "+Re;if(H.Region){if(ue.options.CompatibilityMode){if(!/^([a-z\d-.]+)$/.test(H.Region))return"Region format error."}else{if(H.Region.indexOf("cos.")>-1)return'param Region should not be start with "cos."';if(!/^([a-z\d-]+)$/.test(H.Region))return"Region format error."}!ue.options.CompatibilityMode&&H.Region.indexOf("-")===-1&&H.Region!=="yfb"&&H.Region!=="default"&&H.Region!=="accelerate"&&console.warn("warning: param Region format error, find help here: https://cloud.tencent.com/document/product/436/6224")}if(H.Bucket){if(!/^([a-z\d-]+)-(\d+)$/.test(H.Bucket))if(H.AppId)H.Bucket=H.Bucket+"-"+H.AppId;else if(ue.options.AppId)H.Bucket=H.Bucket+"-"+ue.options.AppId;else return'Bucket should format as "test-1250000000".';H.AppId&&(console.warn('warning: AppId has been deprecated, Please put it at the end of parameter Bucket(E.g Bucket:"test-1250000000" ).'),delete H.AppId)}!ue.options.UseRawKey&&H.Key&&H.Key.substr(0,1)==="/"&&(H.Key=H.Key.substr(1))}},_e=Ke(),Xe=["getAuth","getObjectUrl"].includes(I);if(typeof Promise=="function"&&!Xe&&!te)return new Promise(function(Qe,Re){if(te=function(ht,gt){ht?Re(ht):Qe(gt)},_e)return Me(Fe.error(new Error(_e)));G.call(ue,H,Me)});if(_e)return Me(Fe.error(new Error(_e)));var nt=G.call(ue,H,Me);if(Xe)return nt}},ve=function(I,G){var H=this,te=0,ue=0,se=Date.now(),Ae,Be;function Pe(){if(Be=0,G&&typeof G=="function"){Ae=Date.now();var Me=Math.max(0,Math.round((ue-te)/((Ae-se)/1e3)*100)/100)||0,Ke;ue===0&&I===0?Ke=1:Ke=Math.floor(ue/I*100)/100||0,se=Ae,te=ue;try{G({loaded:ue,total:I,speed:Me,percent:Ke})}catch(_e){}}}return function(Me,Ke){if(Me&&(ue=Me.loaded,I=Me.total),Ke)clearTimeout(Be),Pe();else{if(Be)return;Be=setTimeout(Pe,H.options.ProgressInterval)}}},pe=function(I,G,H){var te;if(typeof G.Body=="string"?G.Body=new Blob([G.Body],{type:"text/plain"}):G.Body instanceof ArrayBuffer&&(G.Body=new Blob([G.Body])),G.Body&&(G.Body instanceof Blob||G.Body.toString()==="[object File]"||G.Body.toString()==="[object Blob]"))te=G.Body.size;else{H(Fe.error(new Error("params body format error, Only allow File|Blob|String.")));return}G.ContentLength=te,H(null,te)},ge=function(I){return Date.now()+(I||0)},ye=function(I,G){var H=I;return I.message=I.message||null,typeof G=="string"?(I.error=G,I.message=G):d(G)==="object"&&G!==null&&(V(I,G),(G.code||G.name)&&(I.code=G.code||G.name),G.message&&(I.message=G.message),G.stack&&(I.stack=G.stack)),typeof Object.defineProperty=="function"&&(Object.defineProperty(I,"name",{writable:!0,enumerable:!1}),Object.defineProperty(I,"message",{enumerable:!0})),I.name=G&&G.name||I.name||I.code||"Error",I.code||(I.code=I.name),I.error||(I.error=P(H)),I},me=function(){return(typeof globalThis>"u"?"undefined":d(globalThis))==="object"&&(globalThis.constructor.name==="DedicatedWorkerGlobalScope"||globalThis.FileReaderSync)},De=function(){return(typeof window>"u"?"undefined":d(window))!=="object"&&(typeof a>"u"?"undefined":d(a))==="object"&&!0&&!me()},ke=function(I){return/^https?:\/\/([^/]+\.)?ci\.[^/]+/.test(I)},Se=function(){if((typeof navigator>"u"?"undefined":d(navigator))!=="object")return!1;var ie=navigator.userAgent,I=!!ie.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);return I}(),xe=function(){return(typeof navigator>"u"?"undefined":d(navigator))!=="object"?!1:/\sQQ/i.test(navigator.userAgent)}(),Ue=function(I,G){var H=A.encode(I);return G&&(H=H.replaceAll("+","-").replaceAll("/","_").replaceAll("=","")),H},Fe={noop:E,formatParams:Z,apiWrapper:he,xml2json:B,json2xml:b,md5:t,clearKey:F,fileSlice:h,getBodyMd5:l,getFileMd5:C,b64:oe,extend:V,isArray:$,isInArray:ee,makeArray:ne,each:re,map:J,filter:ce,clone:P,attr:T,uuid:fe,camSafeUrlEncode:U,throttleOnProgress:ve,getFileSize:pe,getSkewTime:ge,error:ye,obj2str:K,getAuth:W,parseSelectPayload:L,getSourceParams:D,isBrowser:!0,isNode:De,isCIHost:ke,isIOS_QQ:Se&&xe,encodeBase64:Ue};n.exports=Fe}).call(this,p("./node_modules/process/browser.js"))}})})})(Kr);var yi=Kr.exports;const Vr=li(yi),mi="tencent",pr="daya-online-1303457149",kr=async m=>{const{bucketName:i,filename:n,postData:r}=m,p=mi;let a=i,d=n,t={};return a=pr,d="ktyq/"+n,t={key:"ktyq/"+r.key},di.post("/edu-app/open/getUploadSign",{data:{postData:t,pluginName:p,bucketName:a,filename:d},params:{pluginName:p}})},Ci=({file:m,action:i,data:n,onProgress:r,onFinish:p,onError:a})=>{new Vr({Domain:"https://oss.dayaedu.com",Protocol:"https",getAuthorization:async(t,R)=>{R({Authorization:n.signature})}}).uploadFile({Bucket:pr,Region:"ap-nanjing",Key:"ktyq/".concat(n.name),Body:n.file.file,SliceSize:1024*1024*500,onProgress:function(t){r({percent:Math.ceil((t.percent||0)*100)})}}).then(t=>{var R;((R=t.Location)==null?void 0:R.indexOf("http"))>=0?m.url=t.Location:m.url="https://"+t.Location,p()}).catch(t=>{console.log(t,"error"),a()})},Di=async(m,i)=>{{let n="",r=null;if(await new Vr({Domain:"https://oss.dayaedu.com",Protocol:"https",getAuthorization:async(a,d)=>{d({Authorization:i.signature})}}).uploadFile({Bucket:pr,Region:"ap-nanjing",Key:"ktyq/".concat(i.name),Body:i.file,SliceSize:1024*1024*500}).then(a=>{var d;((d=a.Location)==null?void 0:d.indexOf("http"))>=0?n=a.Location:n="https://"+a.Location}).catch(a=>{r=a}),n)return n;throw new Error(r)}};/*! * Cropper.js v1.6.2 * https://fengyuanchen.github.io/cropperjs * * Copyright 2015-present Chen Fengyuan * Released under the MIT license * * Date: 2024-04-21T07:43:05.335Z */function Sr(m,i){var n=Object.keys(m);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(m);i&&(r=r.filter(function(p){return Object.getOwnPropertyDescriptor(m,p).enumerable})),n.push.apply(n,r)}return n}function Gr(m){for(var i=1;im.length)&&(i=m.length);for(var n=0,r=new Array(i);n
',Ui=Number.isNaN||ft.isNaN;function Ie(m){return typeof m=="number"&&!Ui(m)}var _r=function(i){return i>0&&i<1/0};function rr(m){return typeof m>"u"}function Bt(m){return nr(m)==="object"&&m!==null}var _i=Object.prototype.hasOwnProperty;function It(m){if(!Bt(m))return!1;try{var i=m.constructor,n=i.prototype;return i&&n&&_i.call(n,"isPrototypeOf")}catch(r){return!1}}function $e(m){return typeof m=="function"}var ji=Array.prototype.slice;function ri(m){return Array.from?Array.from(m):ji.call(m)}function Ge(m,i){return m&&$e(i)&&(Array.isArray(m)||Ie(m.length)?ri(m).forEach(function(n,r){i.call(m,n,r,m)}):Bt(m)&&Object.keys(m).forEach(function(n){i.call(m,m[n],n,m)})),m}var ze=Object.assign||function(i){for(var n=arguments.length,r=new Array(n>1?n-1:0),p=1;p0&&r.forEach(function(a){Bt(a)&&Object.keys(a).forEach(function(d){i[d]=a[d]})}),i},qi=/\.\d*(?:0|9){12}\d*$/;function Pt(m){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return qi.test(m)?Math.round(m*i)/i:m}var Hi=/^width|height|left|top|marginLeft|marginTop$/;function mt(m,i){var n=m.style;Ge(i,function(r,p){Hi.test(p)&&Ie(r)&&(r="".concat(r,"px")),n[p]=r})}function zi(m,i){return m.classList?m.classList.contains(i):m.className.indexOf(i)>-1}function We(m,i){if(i){if(Ie(m.length)){Ge(m,function(r){We(r,i)});return}if(m.classList){m.classList.add(i);return}var n=m.className.trim();n?n.indexOf(i)<0&&(m.className="".concat(n," ").concat(i)):m.className=i}}function dt(m,i){if(i){if(Ie(m.length)){Ge(m,function(n){dt(n,i)});return}if(m.classList){m.classList.remove(i);return}m.className.indexOf(i)>=0&&(m.className=m.className.replace(i,""))}}function Nt(m,i,n){if(i){if(Ie(m.length)){Ge(m,function(r){Nt(r,i,n)});return}n?We(m,i):dt(m,i)}}var Ki=/([a-z\d])([A-Z])/g;function Cr(m){return m.replace(Ki,"$1-$2").toLowerCase()}function hr(m,i){return Bt(m[i])?m[i]:m.dataset?m.dataset[i]:m.getAttribute("data-".concat(Cr(i)))}function Vt(m,i,n){Bt(n)?m[i]=n:m.dataset?m.dataset[i]=n:m.setAttribute("data-".concat(Cr(i)),n)}function Vi(m,i){if(Bt(m[i]))try{delete m[i]}catch(n){m[i]=void 0}else if(m.dataset)try{delete m.dataset[i]}catch(n){m.dataset[i]=void 0}else m.removeAttribute("data-".concat(Cr(i)))}var ii=/\s\s*/,ni=function(){var m=!1;if(Zt){var i=!1,n=function(){},r=Object.defineProperty({},"once",{get:function(){return m=!0,i},set:function(a){i=a}});ft.addEventListener("test",n,r),ft.removeEventListener("test",n,r)}return m}();function it(m,i,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},p=n;i.trim().split(ii).forEach(function(a){if(!ni){var d=m.listeners;d&&d[a]&&d[a][n]&&(p=d[a][n],delete d[a][n],Object.keys(d[a]).length===0&&delete d[a],Object.keys(d).length===0&&delete m.listeners)}m.removeEventListener(a,p,r)})}function tt(m,i,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},p=n;i.trim().split(ii).forEach(function(a){if(r.once&&!ni){var d=m.listeners,t=d===void 0?{}:d;p=function(){delete t[a][n],m.removeEventListener(a,p,r);for(var B=arguments.length,b=new Array(B),A=0;AMath.abs(n)&&(n=k)})}),n}function $t(m,i){var n=m.pageX,r=m.pageY,p={endX:n,endY:r};return i?p:Gr({startX:n,startY:r},p)}function Xi(m){var i=0,n=0,r=0;return Ge(m,function(p){var a=p.startX,d=p.startY;i+=a,n+=d,r+=1}),i/=r,n/=r,{pageX:i,pageY:n}}function Ct(m){var i=m.aspectRatio,n=m.height,r=m.width,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",a=_r(r),d=_r(n);if(a&&d){var t=n*i;p==="contain"&&t>r||p==="cover"&&t90?{width:R,height:t}:{width:t,height:R}}function Qi(m,i,n,r){var p=i.aspectRatio,a=i.naturalWidth,d=i.naturalHeight,t=i.rotate,R=t===void 0?0:t,B=i.scaleX,b=B===void 0?1:B,A=i.scaleY,k=A===void 0?1:A,U=n.aspectRatio,N=n.naturalWidth,K=n.naturalHeight,M=r.fillColor,j=M===void 0?"transparent":M,W=r.imageSmoothingEnabled,q=W===void 0?!0:W,X=r.imageSmoothingQuality,L=X===void 0?"low":X,D=r.maxWidth,E=D===void 0?1/0:D,F=r.maxHeight,u=F===void 0?1/0:F,s=r.minWidth,h=s===void 0?0:s,l=r.minHeight,v=l===void 0?0:l,C=document.createElement("canvas"),P=C.getContext("2d"),T=Ct({aspectRatio:U,width:E,height:u}),V=Ct({aspectRatio:U,width:h,height:v},"cover"),$=Math.min(T.width,Math.max(V.width,N)),ee=Math.min(T.height,Math.max(V.height,K)),ne=Ct({aspectRatio:p,width:E,height:u}),re=Ct({aspectRatio:p,width:h,height:v},"cover"),J=Math.min(ne.width,Math.max(re.width,a)),ce=Math.min(ne.height,Math.max(re.height,d)),oe=[-J/2,-ce/2,J,ce];return C.width=Pt($),C.height=Pt(ee),P.fillStyle=j,P.fillRect(0,0,$,ee),P.save(),P.translate($/2,ee/2),P.rotate(R*Math.PI/180),P.scale(b,k),P.imageSmoothingEnabled=q,P.imageSmoothingQuality=L,P.drawImage.apply(P,[m].concat(Xr(oe.map(function(fe){return Math.floor(Pt(fe))})))),P.restore(),C}var ui=String.fromCharCode;function $i(m,i,n){var r="";n+=i;for(var p=i;p0;)n.push(ui.apply(null,ri(p.subarray(0,r)))),p=p.subarray(r);return"data:".concat(i,";base64,").concat(btoa(n.join("")))}function tn(m){var i=new DataView(m),n;try{var r,p,a;if(i.getUint8(0)===255&&i.getUint8(1)===216)for(var d=i.byteLength,t=2;t+1=8&&(a=B+A)}}}if(a){var k=i.getUint16(a,r),U,N;for(N=0;N=0?a:ei),height:Math.max(r.offsetHeight,d>=0?d:ti)};this.containerData=t,mt(p,{width:t.width,height:t.height}),We(i,Je),dt(p,Je)},initCanvas:function(){var i=this.containerData,n=this.imageData,r=this.options.viewMode,p=Math.abs(n.rotate)%180===90,a=p?n.naturalHeight:n.naturalWidth,d=p?n.naturalWidth:n.naturalHeight,t=a/d,R=i.width,B=i.height;i.height*t>i.width?r===3?R=i.height*t:B=i.width/t:r===3?B=i.width/t:R=i.height*t;var b={aspectRatio:t,naturalWidth:a,naturalHeight:d,width:R,height:B};this.canvasData=b,this.limited=r===1||r===2,this.limitCanvas(!0,!0),b.width=Math.min(Math.max(b.width,b.minWidth),b.maxWidth),b.height=Math.min(Math.max(b.height,b.minHeight),b.maxHeight),b.left=(i.width-b.width)/2,b.top=(i.height-b.height)/2,b.oldLeft=b.left,b.oldTop=b.top,this.initialCanvasData=ze({},b)},limitCanvas:function(i,n){var r=this.options,p=this.containerData,a=this.canvasData,d=this.cropBoxData,t=r.viewMode,R=a.aspectRatio,B=this.cropped&&d;if(i){var b=Number(r.minCanvasWidth)||0,A=Number(r.minCanvasHeight)||0;t>1?(b=Math.max(b,p.width),A=Math.max(A,p.height),t===3&&(A*R>b?b=A*R:A=b/R)):t>0&&(b?b=Math.max(b,B?d.width:0):A?A=Math.max(A,B?d.height:0):B&&(b=d.width,A=d.height,A*R>b?b=A*R:A=b/R));var k=Ct({aspectRatio:R,width:b,height:A});b=k.width,A=k.height,a.minWidth=b,a.minHeight=A,a.maxWidth=1/0,a.maxHeight=1/0}if(n)if(t>(B?0:1)){var U=p.width-a.width,N=p.height-a.height;a.minLeft=Math.min(0,U),a.minTop=Math.min(0,N),a.maxLeft=Math.max(0,U),a.maxTop=Math.max(0,N),B&&this.limited&&(a.minLeft=Math.min(d.left,d.left+(d.width-a.width)),a.minTop=Math.min(d.top,d.top+(d.height-a.height)),a.maxLeft=d.left,a.maxTop=d.top,t===2&&(a.width>=p.width&&(a.minLeft=Math.min(0,U),a.maxLeft=Math.max(0,U)),a.height>=p.height&&(a.minTop=Math.min(0,N),a.maxTop=Math.max(0,N))))}else a.minLeft=-a.width,a.minTop=-a.height,a.maxLeft=p.width,a.maxTop=p.height},renderCanvas:function(i,n){var r=this.canvasData,p=this.imageData;if(n){var a=Yi({width:p.naturalWidth*Math.abs(p.scaleX||1),height:p.naturalHeight*Math.abs(p.scaleY||1),degree:p.rotate||0}),d=a.width,t=a.height,R=r.width*(d/r.naturalWidth),B=r.height*(t/r.naturalHeight);r.left-=(R-r.width)/2,r.top-=(B-r.height)/2,r.width=R,r.height=B,r.aspectRatio=d/t,r.naturalWidth=d,r.naturalHeight=t,this.limitCanvas(!0,!1)}(r.width>r.maxWidth||r.widthr.maxHeight||r.heightn.width?a.height=a.width/r:a.width=a.height*r),this.cropBoxData=a,this.limitCropBox(!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.width=Math.max(a.minWidth,a.width*p),a.height=Math.max(a.minHeight,a.height*p),a.left=n.left+(n.width-a.width)/2,a.top=n.top+(n.height-a.height)/2,a.oldLeft=a.left,a.oldTop=a.top,this.initialCropBoxData=ze({},a)},limitCropBox:function(i,n){var r=this.options,p=this.containerData,a=this.canvasData,d=this.cropBoxData,t=this.limited,R=r.aspectRatio;if(i){var B=Number(r.minCropBoxWidth)||0,b=Number(r.minCropBoxHeight)||0,A=t?Math.min(p.width,a.width,a.width+a.left,p.width-a.left):p.width,k=t?Math.min(p.height,a.height,a.height+a.top,p.height-a.top):p.height;B=Math.min(B,p.width),b=Math.min(b,p.height),R&&(B&&b?b*R>B?b=B/R:B=b*R:B?b=B/R:b&&(B=b*R),k*R>A?k=A/R:A=k*R),d.minWidth=Math.min(B,A),d.minHeight=Math.min(b,k),d.maxWidth=A,d.maxHeight=k}n&&(t?(d.minLeft=Math.max(0,a.left),d.minTop=Math.max(0,a.top),d.maxLeft=Math.min(p.width,a.left+a.width)-d.width,d.maxTop=Math.min(p.height,a.top+a.height)-d.height):(d.minLeft=0,d.minTop=0,d.maxLeft=p.width-d.width,d.maxTop=p.height-d.height))},renderCropBox:function(){var i=this.options,n=this.containerData,r=this.cropBoxData;(r.width>r.maxWidth||r.widthr.maxHeight||r.height=n.width&&r.height>=n.height?Qr:yr),mt(this.cropBox,ze({width:r.width,height:r.height},zt({translateX:r.left,translateY:r.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Mt(this.element,sr,this.getData())}},on={initPreview:function(){var i=this.element,n=this.crossOrigin,r=this.options.preview,p=n?this.crossOriginUrl:this.url,a=i.alt||"The image to preview",d=document.createElement("img");if(n&&(d.crossOrigin=n),d.src=p,d.alt=a,this.viewBox.appendChild(d),this.viewBoxImage=d,!!r){var t=r;typeof r=="string"?t=i.ownerDocument.querySelectorAll(r):r.querySelector&&(t=[r]),this.previews=t,Ge(t,function(R){var B=document.createElement("img");Vt(R,Qt,{width:R.offsetWidth,height:R.offsetHeight,html:R.innerHTML}),n&&(B.crossOrigin=n),B.src=p,B.alt=a,B.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;"',R.innerHTML="",R.appendChild(B)})}},resetPreview:function(){Ge(this.previews,function(i){var n=hr(i,Qt);mt(i,{width:n.width,height:n.height}),i.innerHTML=n.html,Vi(i,Qt)})},preview:function(){var i=this.imageData,n=this.canvasData,r=this.cropBoxData,p=r.width,a=r.height,d=i.width,t=i.height,R=r.left-n.left-i.left,B=r.top-n.top-i.top;!this.cropped||this.disabled||(mt(this.viewBoxImage,ze({width:d,height:t},zt(ze({translateX:-R,translateY:-B},i)))),Ge(this.previews,function(b){var A=hr(b,Qt),k=A.width,U=A.height,N=k,K=U,M=1;p&&(M=k/p,K=a*M),a&&K>U&&(M=U/a,N=p*M,K=U),mt(b,{width:N,height:K}),mt(b.getElementsByTagName("img")[0],ze({width:d*M,height:t*M},zt(ze({translateX:-R*M,translateY:-B*M},i))))}))}},un={bind:function(){var i=this.element,n=this.options,r=this.cropper;$e(n.cropstart)&&tt(i,dr,n.cropstart),$e(n.cropmove)&&tt(i,lr,n.cropmove),$e(n.cropend)&&tt(i,cr,n.cropend),$e(n.crop)&&tt(i,sr,n.crop),$e(n.zoom)&&tt(i,fr,n.zoom),tt(r,Or,this.onCropStart=this.cropStart.bind(this)),n.zoomable&&n.zoomOnWheel&&tt(r,Mr,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),n.toggleDragModeOnDblclick&&tt(r,Rr,this.onDblclick=this.dblclick.bind(this)),tt(i.ownerDocument,Fr,this.onCropMove=this.cropMove.bind(this)),tt(i.ownerDocument,Ir,this.onCropEnd=this.cropEnd.bind(this)),n.responsive&&tt(window,Pr,this.onResize=this.resize.bind(this))},unbind:function(){var i=this.element,n=this.options,r=this.cropper;$e(n.cropstart)&&it(i,dr,n.cropstart),$e(n.cropmove)&&it(i,lr,n.cropmove),$e(n.cropend)&&it(i,cr,n.cropend),$e(n.crop)&&it(i,sr,n.crop),$e(n.zoom)&&it(i,fr,n.zoom),it(r,Or,this.onCropStart),n.zoomable&&n.zoomOnWheel&&it(r,Mr,this.onWheel,{passive:!1,capture:!0}),n.toggleDragModeOnDblclick&&it(r,Rr,this.onDblclick),it(i.ownerDocument,Fr,this.onCropMove),it(i.ownerDocument,Ir,this.onCropEnd),n.responsive&&it(window,Pr,this.onResize)}},an={resize:function(){if(!this.disabled){var i=this.options,n=this.container,r=this.containerData,p=n.offsetWidth/r.width,a=n.offsetHeight/r.height,d=Math.abs(p-1)>Math.abs(a-1)?p:a;if(d!==1){var t,R;i.restore&&(t=this.getCanvasData(),R=this.getCropBoxData()),this.render(),i.restore&&(this.setCanvasData(Ge(t,function(B,b){t[b]=B*d})),this.setCropBoxData(Ge(R,function(B,b){R[b]=B*d})))}}},dblclick:function(){this.disabled||this.options.dragMode===Zr||this.setDragMode(zi(this.dragBox,ur)?Jr:mr)},wheel:function(i){var n=this,r=Number(this.options.wheelZoomRatio)||.1,p=1;this.disabled||(i.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){n.wheeling=!1},50),i.deltaY?p=i.deltaY>0?1:-1:i.wheelDelta?p=-i.wheelDelta/120:i.detail&&(p=i.detail>0?1:-1),this.zoom(-p*r,i)))},cropStart:function(i){var n=i.buttons,r=i.button;if(!(this.disabled||(i.type==="mousedown"||i.type==="pointerdown"&&i.pointerType==="mouse")&&(Ie(n)&&n!==1||Ie(r)&&r!==0||i.ctrlKey))){var p=this.options,a=this.pointers,d;i.changedTouches?Ge(i.changedTouches,function(t){a[t.identifier]=$t(t)}):a[i.pointerId||0]=$t(i),Object.keys(a).length>1&&p.zoomable&&p.zoomOnTouch?d=$r:d=hr(i.target,Kt),Ii.test(d)&&Mt(this.element,dr,{originalEvent:i,action:d})!==!1&&(i.preventDefault(),this.action=d,this.cropping=!1,d===Yr&&(this.cropping=!0,We(this.dragBox,Jt)))}},cropMove:function(i){var n=this.action;if(!(this.disabled||!n)){var r=this.pointers;i.preventDefault(),Mt(this.element,lr,{originalEvent:i,action:n})!==!1&&(i.changedTouches?Ge(i.changedTouches,function(p){ze(r[p.identifier]||{},$t(p,!0))}):ze(r[i.pointerId||0]||{},$t(i,!0)),this.change(i))}},cropEnd:function(i){if(!this.disabled){var n=this.action,r=this.pointers;i.changedTouches?Ge(i.changedTouches,function(p){delete r[p.identifier]}):delete r[i.pointerId||0],n&&(i.preventDefault(),Object.keys(r).length||(this.action=""),this.cropping&&(this.cropping=!1,Nt(this.dragBox,Jt,this.cropped&&this.options.modal)),Mt(this.element,cr,{originalEvent:i,action:n}))}}},sn={change:function(i){var n=this.options,r=this.canvasData,p=this.containerData,a=this.cropBoxData,d=this.pointers,t=this.action,R=n.aspectRatio,B=a.left,b=a.top,A=a.width,k=a.height,U=B+A,N=b+k,K=0,M=0,j=p.width,W=p.height,q=!0,X;!R&&i.shiftKey&&(R=A&&k?A/k:1),this.limited&&(K=a.minLeft,M=a.minTop,j=K+Math.min(p.width,r.width,r.left+r.width),W=M+Math.min(p.height,r.height,r.top+r.height));var L=d[Object.keys(d)[0]],D={x:L.endX-L.startX,y:L.endY-L.startY},E=function(u){switch(u){case Et:U+D.x>j&&(D.x=j-U);break;case bt:B+D.xW&&(D.y=W-N);break}};switch(t){case yr:B+=D.x,b+=D.y;break;case Et:if(D.x>=0&&(U>=j||R&&(b<=M||N>=W))){q=!1;break}E(Et),A+=D.x,A<0&&(t=bt,A=-A,B-=A),R&&(k=A/R,b+=(a.height-k)/2);break;case yt:if(D.y<=0&&(b<=M||R&&(B<=K||U>=j))){q=!1;break}E(yt),k-=D.y,b+=D.y,k<0&&(t=Ft,k=-k,b-=k),R&&(A=k*R,B+=(a.width-A)/2);break;case bt:if(D.x<=0&&(B<=K||R&&(b<=M||N>=W))){q=!1;break}E(bt),A-=D.x,B+=D.x,A<0&&(t=Et,A=-A,B-=A),R&&(k=A/R,b+=(a.height-k)/2);break;case Ft:if(D.y>=0&&(N>=W||R&&(B<=K||U>=j))){q=!1;break}E(Ft),k+=D.y,k<0&&(t=yt,k=-k,b-=k),R&&(A=k*R,B+=(a.width-A)/2);break;case _t:if(R){if(D.y<=0&&(b<=M||U>=j)){q=!1;break}E(yt),k-=D.y,b+=D.y,A=k*R}else E(yt),E(Et),D.x>=0?UM&&(k-=D.y,b+=D.y):(k-=D.y,b+=D.y);A<0&&k<0?(t=Ht,k=-k,A=-A,b-=k,B-=A):A<0?(t=jt,A=-A,B-=A):k<0&&(t=qt,k=-k,b-=k);break;case jt:if(R){if(D.y<=0&&(b<=M||B<=K)){q=!1;break}E(yt),k-=D.y,b+=D.y,A=k*R,B+=a.width-A}else E(yt),E(bt),D.x<=0?B>K?(A-=D.x,B+=D.x):D.y<=0&&b<=M&&(q=!1):(A-=D.x,B+=D.x),D.y<=0?b>M&&(k-=D.y,b+=D.y):(k-=D.y,b+=D.y);A<0&&k<0?(t=qt,k=-k,A=-A,b-=k,B-=A):A<0?(t=_t,A=-A,B-=A):k<0&&(t=Ht,k=-k,b-=k);break;case Ht:if(R){if(D.x<=0&&(B<=K||N>=W)){q=!1;break}E(bt),A-=D.x,B+=D.x,k=A/R}else E(Ft),E(bt),D.x<=0?B>K?(A-=D.x,B+=D.x):D.y>=0&&N>=W&&(q=!1):(A-=D.x,B+=D.x),D.y>=0?N=0&&(U>=j||N>=W)){q=!1;break}E(Et),A+=D.x,k=A/R}else E(Ft),E(Et),D.x>=0?U=0&&N>=W&&(q=!1):A+=D.x,D.y>=0?N0?t=D.y>0?qt:_t:D.x<0&&(B-=A,t=D.y>0?Ht:jt),D.y<0&&(b-=k),this.cropped||(dt(this.cropBox,Je),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}q&&(a.width=A,a.height=k,a.left=B,a.top=b,this.action=t,this.renderCropBox()),Ge(d,function(F){F.startX=F.endX,F.startY=F.endY})}},cn={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&We(this.dragBox,Jt),dt(this.cropBox,Je),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=ze({},this.initialImageData),this.canvasData=ze({},this.initialCanvasData),this.cropBoxData=ze({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(ze(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),dt(this.dragBox,Jt),We(this.cropBox,Je)),this},replace:function(i){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&i&&(this.isImg&&(this.element.src=i),n?(this.url=i,this.image.src=i,this.ready&&(this.viewBoxImage.src=i,Ge(this.previews,function(r){r.getElementsByTagName("img")[0].src=i}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(i))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,dt(this.cropper,Tr)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,We(this.cropper,Tr)),this},destroy:function(){var i=this.element;return i[He]?(i[He]=void 0,this.isImg&&this.replaced&&(i.src=this.originalUrl),this.uncreate(),this):this},move:function(i){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:i,r=this.canvasData,p=r.left,a=r.top;return this.moveTo(rr(i)?i:p+Number(i),rr(n)?n:a+Number(n))},moveTo:function(i){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:i,r=this.canvasData,p=!1;return i=Number(i),n=Number(n),this.ready&&!this.disabled&&this.options.movable&&(Ie(i)&&(r.left=i,p=!0),Ie(n)&&(r.top=n,p=!0),p&&this.renderCanvas(!0)),this},zoom:function(i,n){var r=this.canvasData;return i=Number(i),i<0?i=1/(1-i):i=1+i,this.zoomTo(r.width*i/r.naturalWidth,null,n)},zoomTo:function(i,n,r){var p=this.options,a=this.canvasData,d=a.width,t=a.height,R=a.naturalWidth,B=a.naturalHeight;if(i=Number(i),i>=0&&this.ready&&!this.disabled&&p.zoomable){var b=R*i,A=B*i;if(Mt(this.element,fr,{ratio:i,oldRatio:d/R,originalEvent:r})===!1)return this;if(r){var k=this.pointers,U=oi(this.cropper),N=k&&Object.keys(k).length?Xi(k):{pageX:r.pageX,pageY:r.pageY};a.left-=(b-d)*((N.pageX-U.left-a.left)/d),a.top-=(A-t)*((N.pageY-U.top-a.top)/t)}else It(n)&&Ie(n.x)&&Ie(n.y)?(a.left-=(b-d)*((n.x-a.left)/d),a.top-=(A-t)*((n.y-a.top)/t)):(a.left-=(b-d)/2,a.top-=(A-t)/2);a.width=b,a.height=A,this.renderCanvas(!0)}return this},rotate:function(i){return this.rotateTo((this.imageData.rotate||0)+Number(i))},rotateTo:function(i){return i=Number(i),Ie(i)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=i%360,this.renderCanvas(!0,!0)),this},scaleX:function(i){var n=this.imageData.scaleY;return this.scale(i,Ie(n)?n:1)},scaleY:function(i){var n=this.imageData.scaleX;return this.scale(Ie(n)?n:1,i)},scale:function(i){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:i,r=this.imageData,p=!1;return i=Number(i),n=Number(n),this.ready&&!this.disabled&&this.options.scalable&&(Ie(i)&&(r.scaleX=i,p=!0),Ie(n)&&(r.scaleY=n,p=!0),p&&this.renderCanvas(!0,!0)),this},getData:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=this.options,r=this.imageData,p=this.canvasData,a=this.cropBoxData,d;if(this.ready&&this.cropped){d={x:a.left-p.left,y:a.top-p.top,width:a.width,height:a.height};var t=r.width/r.naturalWidth;if(Ge(d,function(b,A){d[A]=b/t}),i){var R=Math.round(d.y+d.height),B=Math.round(d.x+d.width);d.x=Math.round(d.x),d.y=Math.round(d.y),d.width=B-d.x,d.height=R-d.y}}else d={x:0,y:0,width:0,height:0};return n.rotatable&&(d.rotate=r.rotate||0),n.scalable&&(d.scaleX=r.scaleX||1,d.scaleY=r.scaleY||1),d},setData:function(i){var n=this.options,r=this.imageData,p=this.canvasData,a={};if(this.ready&&!this.disabled&&It(i)){var d=!1;n.rotatable&&Ie(i.rotate)&&i.rotate!==r.rotate&&(r.rotate=i.rotate,d=!0),n.scalable&&(Ie(i.scaleX)&&i.scaleX!==r.scaleX&&(r.scaleX=i.scaleX,d=!0),Ie(i.scaleY)&&i.scaleY!==r.scaleY&&(r.scaleY=i.scaleY,d=!0)),d&&this.renderCanvas(!0,!0);var t=r.width/r.naturalWidth;Ie(i.x)&&(a.left=i.x*t+p.left),Ie(i.y)&&(a.top=i.y*t+p.top),Ie(i.width)&&(a.width=i.width*t),Ie(i.height)&&(a.height=i.height*t),this.setCropBoxData(a)}return this},getContainerData:function(){return this.ready?ze({},this.containerData):{}},getImageData:function(){return this.sized?ze({},this.imageData):{}},getCanvasData:function(){var i=this.canvasData,n={};return this.ready&&Ge(["left","top","width","height","naturalWidth","naturalHeight"],function(r){n[r]=i[r]}),n},setCanvasData:function(i){var n=this.canvasData,r=n.aspectRatio;return this.ready&&!this.disabled&&It(i)&&(Ie(i.left)&&(n.left=i.left),Ie(i.top)&&(n.top=i.top),Ie(i.width)?(n.width=i.width,n.height=i.width/r):Ie(i.height)&&(n.height=i.height,n.width=i.height*r),this.renderCanvas(!0)),this},getCropBoxData:function(){var i=this.cropBoxData,n;return this.ready&&this.cropped&&(n={left:i.left,top:i.top,width:i.width,height:i.height}),n||{}},setCropBoxData:function(i){var n=this.cropBoxData,r=this.options.aspectRatio,p,a;return this.ready&&this.cropped&&!this.disabled&&It(i)&&(Ie(i.left)&&(n.left=i.left),Ie(i.top)&&(n.top=i.top),Ie(i.width)&&i.width!==n.width&&(p=!0,n.width=i.width),Ie(i.height)&&i.height!==n.height&&(a=!0,n.height=i.height),r&&(p?n.height=n.width/r:a&&(n.width=n.height*r)),this.renderCropBox()),this},getCroppedCanvas:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var n=this.canvasData,r=Qi(this.image,this.imageData,n,i);if(!this.cropped)return r;var p=this.getData(i.rounded),a=p.x,d=p.y,t=p.width,R=p.height,B=r.width/Math.floor(n.naturalWidth);B!==1&&(a*=B,d*=B,t*=B,R*=B);var b=t/R,A=Ct({aspectRatio:b,width:i.maxWidth||1/0,height:i.maxHeight||1/0}),k=Ct({aspectRatio:b,width:i.minWidth||0,height:i.minHeight||0},"cover"),U=Ct({aspectRatio:b,width:i.width||(B!==1?r.width:t),height:i.height||(B!==1?r.height:R)}),N=U.width,K=U.height;N=Math.min(A.width,Math.max(k.width,N)),K=Math.min(A.height,Math.max(k.height,K));var M=document.createElement("canvas"),j=M.getContext("2d");M.width=Pt(N),M.height=Pt(K),j.fillStyle=i.fillColor||"transparent",j.fillRect(0,0,N,K);var W=i.imageSmoothingEnabled,q=W===void 0?!0:W,X=i.imageSmoothingQuality;j.imageSmoothingEnabled=q,X&&(j.imageSmoothingQuality=X);var L=r.width,D=r.height,E=a,F=d,u,s,h,l,v,C;E<=-t||E>L?(E=0,u=0,h=0,v=0):E<=0?(h=-E,E=0,u=Math.min(L,t+E),v=u):E<=L&&(h=0,u=Math.min(t,L-E),v=u),u<=0||F<=-R||F>D?(F=0,s=0,l=0,C=0):F<=0?(l=-F,F=0,s=Math.min(D,R+F),C=s):F<=D&&(l=0,s=Math.min(R,D-F),C=s);var P=[E,F,u,s];if(v>0&&C>0){var T=N/t;P.push(h*T,l*T,v*T,C*T)}return j.drawImage.apply(j,[r].concat(Xr(P.map(function(V){return Math.floor(Pt(V))})))),M},setAspectRatio:function(i){var n=this.options;return!this.disabled&&!rr(i)&&(n.aspectRatio=Math.max(0,i)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(i){var n=this.options,r=this.dragBox,p=this.face;if(this.ready&&!this.disabled){var a=i===mr,d=n.movable&&i===Jr;i=a||d?i:Zr,n.dragMode=i,Vt(r,Kt,i),Nt(r,ur,a),Nt(r,ar,d),n.cropBoxMovable||(Vt(p,Kt,i),Nt(p,ur,a),Nt(p,ar,d))}return this}},ln=ft.Cropper,ai=function(){function m(i){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(xi(this,m),!i||!Mi.test(i.tagName))throw new Error("The first argument is required and must be an or element.");this.element=i,this.options=ze({},Ur,It(n)&&n),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 Ei(m,[{key:"init",value:function(){var n=this.element,r=n.tagName.toLowerCase(),p;if(!n[He]){if(n[He]=this,r==="img"){if(this.isImg=!0,p=n.getAttribute("src")||"",this.originalUrl=p,!p)return;p=n.src}else r==="canvas"&&window.HTMLCanvasElement&&(p=n.toDataURL());this.load(p)}}},{key:"load",value:function(n){var r=this;if(n){this.url=n,this.imageData={};var p=this.element,a=this.options;if(!a.rotatable&&!a.scalable&&(a.checkOrientation=!1),!a.checkOrientation||!window.ArrayBuffer){this.clone();return}if(Ni.test(n)){Pi.test(n)?this.read(Zi(n)):this.clone();return}var d=new XMLHttpRequest,t=this.clone.bind(this);this.reloading=!0,this.xhr=d,d.onabort=t,d.onerror=t,d.ontimeout=t,d.onprogress=function(){d.getResponseHeader("content-type")!==Lr&&d.abort()},d.onload=function(){r.read(d.response)},d.onloadend=function(){r.reloading=!1,r.xhr=null},a.checkCrossOrigin&&jr(n)&&p.crossOrigin&&(n=qr(n)),d.open("GET",n,!0),d.responseType="arraybuffer",d.withCredentials=p.crossOrigin==="use-credentials",d.send()}}},{key:"read",value:function(n){var r=this.options,p=this.imageData,a=tn(n),d=0,t=1,R=1;if(a>1){this.url=en(n,Lr);var B=rn(a);d=B.rotate,t=B.scaleX,R=B.scaleY}r.rotatable&&(p.rotate=d),r.scalable&&(p.scaleX=t,p.scaleY=R),this.clone()}},{key:"clone",value:function(){var n=this.element,r=this.url,p=n.crossOrigin,a=r;this.options.checkCrossOrigin&&jr(r)&&(p||(p="anonymous"),a=qr(r)),this.crossOrigin=p,this.crossOriginUrl=a;var d=document.createElement("img");p&&(d.crossOrigin=p),d.src=a||r,d.alt=n.alt||"The image to crop",this.image=d,d.onload=this.start.bind(this),d.onerror=this.stop.bind(this),We(d,wr),n.parentNode.insertBefore(d,n.nextSibling)}},{key:"start",value:function(){var n=this,r=this.image;r.onload=null,r.onerror=null,this.sizing=!0;var p=ft.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(ft.navigator.userAgent),a=function(B,b){ze(n.imageData,{naturalWidth:B,naturalHeight:b,aspectRatio:B/b}),n.initialImageData=ze({},n.imageData),n.sizing=!1,n.sized=!0,n.build()};if(r.naturalWidth&&!p){a(r.naturalWidth,r.naturalHeight);return}var d=document.createElement("img"),t=document.body||document.documentElement;this.sizingImage=d,d.onload=function(){a(d.width,d.height),p||t.removeChild(d)},d.src=r.src,p||(d.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;",t.appendChild(d))}},{key:"stop",value:function(){var n=this.image;n.onload=null,n.onerror=null,n.parentNode.removeChild(n),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var n=this.element,r=this.options,p=this.image,a=n.parentNode,d=document.createElement("div");d.innerHTML=Li;var t=d.querySelector(".".concat(He,"-container")),R=t.querySelector(".".concat(He,"-canvas")),B=t.querySelector(".".concat(He,"-drag-box")),b=t.querySelector(".".concat(He,"-crop-box")),A=b.querySelector(".".concat(He,"-face"));this.container=a,this.cropper=t,this.canvas=R,this.dragBox=B,this.cropBox=b,this.viewBox=t.querySelector(".".concat(He,"-view-box")),this.face=A,R.appendChild(p),We(n,Je),a.insertBefore(t,n.nextSibling),dt(p,wr),this.initPreview(),this.bind(),r.initialAspectRatio=Math.max(0,r.initialAspectRatio)||NaN,r.aspectRatio=Math.max(0,r.aspectRatio)||NaN,r.viewMode=Math.max(0,Math.min(3,Math.round(r.viewMode)))||0,We(b,Je),r.guides||We(b.getElementsByClassName("".concat(He,"-dashed")),Je),r.center||We(b.getElementsByClassName("".concat(He,"-center")),Je),r.background&&We(t,"".concat(He,"-bg")),r.highlight||We(A,wi),r.cropBoxMovable&&(We(A,ar),Vt(A,Kt,yr)),r.cropBoxResizable||(We(b.getElementsByClassName("".concat(He,"-line")),Je),We(b.getElementsByClassName("".concat(He,"-point")),Je)),this.render(),this.ready=!0,this.setDragMode(r.dragMode),r.autoCrop&&this.crop(),this.setData(r.data),$e(r.ready)&&tt(n,Nr,r.ready,{once:!0}),Mt(n,Nr)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var n=this.cropper.parentNode;n&&n.removeChild(this.cropper),dt(this.element,Je)}}},{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=ln,m}},{key:"setDefaults",value:function(n){ze(Ur,It(n)&&n)}}])}();ze(ai.prototype,nn,on,un,an,sn,cn);const dn=Hr({name:"copper-image",emits:["close","cropperNo","cropperOk"],setup(m,{emit:i,expose:n}){const r=zr({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}),p=kt(),a=B=>{const{options:b}=r;r.visible=!0,r.options=Object.assign({},b,B),hi(()=>{d()})},d=()=>{r.myCropper=new ai(p.value,{viewMode:1,dragMode:"move",aspectRatio:r.options.autoCropWidth/r.options.autoCropHeight,initialAspectRatio:1,autoCropArea:1,cropBoxMovable:!0,cropBoxResizable:!1,background:!0,movable:!0,modal:!0,preview:".before"})},t=B=>{switch(B){case"left":r.myCropper.rotate(90);break;case"right":r.myCropper.rotate(-90);break;case"zoomIn":r.myCropper.zoom(.1);break;case"zoomOut":r.myCropper.zoom(-.1);break}},R=()=>{r.confirmLoading=!0,r.myCropper.getCroppedCanvas({imageSmoothingQuality:"high"}).toBlob(B=>{console.log(B,"1212"),i("cropperOk",B),r.confirmLoading=!1})};return n({edit:a}),()=>Ve("div",null,[Ve(fi,{cols:2,xGap:24,style:{paddingTop:"12px"}},{default:()=>[Ve(xr,null,{default:()=>{var B,b;return[Ve("div",{style:"width: 100%; height: 300px"},[((B=r.options)==null?void 0:B.img)&&Ve("img",{ref:p,src:(b=r.options)==null?void 0:b.img,alt:""},null)]),Ve(Er,{justify:"center",style:{paddingTop:"12px"}},{default:()=>[Ve(St,{type:"primary",size:"small",onClick:()=>t("left")},{default:()=>[xt("逆时针旋转")]}),Ve(St,{type:"primary",size:"small",onClick:()=>t("right")},{default:()=>[xt("顺时针旋转")]}),Ve(St,{type:"primary",size:"small",onClick:()=>t("zoomIn")},{default:()=>[xt("放大")]}),Ve(St,{type:"primary",size:"small",onClick:()=>t("zoomOut")},{default:()=>[xt("缩小")]})]})]}}),Ve(xr,null,{default:()=>[Ve("span",{style:{fontSize:"15px",fontWeight:600,paddingBottom:"8px",display:"inline-block"}},[xt("预览图片")]),Ve("div",{class:"before",style:{width:r.options.autoCropWidth+"px",height:r.options.autoCropHeight+"px",overflow:"hidden"}},null)]})]}),Ve(Er,{justify:"end"},{default:()=>[Ve(St,{type:"default",onClick:()=>{r.confirmLoading=!1,i("close"),i("cropperNo")}},{default:()=>[xt("取消")]}),Ve(St,{type:"primary",loading:r.confirmLoading,onClick:R},{default:()=>[xt("确认")]})]})])}}),hn=Hr({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(m,{emit:i,expose:n,slots:r}){const p="https://".concat(m.bucketName,".ks3-cn-beijing.ksyuncs.com/"),a=pi(),d=kt(!1),t=kt(!1);kt();const R=kt(),B=zr([]),b=kt([]),A=()=>{if(m.fileList){const X=m.fileList.split("/");b.value=[{id:new Date().getTime().toString(),name:X[X.length-1],status:"finished",url:m.fileList}]}else if(Array.isArray(m.imageList)){const X=[];m.imageList.forEach(L=>{const D=L.split("/");X.push({id:Date.now().toString(),name:D[D.length-1],status:"finished",url:L})}),b.value=X}else b.value=[]};A(),br(()=>m.imageList,()=>{A()}),br(()=>m.fileList,()=>{console.log("list"),A()}),n({handleClearFile:()=>{var X;(X=R.value)==null||X.clear(),console.log("清空",R.value)}});const U=kt(),N=async X=>{const L=X.file;let D=!0;if(m.size&&(D=L.file.size/1024/1024{const F=Object.assign({},m.options,{img:E,name:L.file.name});d.value=!0,setTimeout(()=>{var u;(u=U.value)==null||u.edit(F),console.log(U.value,"cropper")},100)}),!1;try{t.value=!0,console.log(m.path,L.file);const E=L.file.name,F=E.slice(E.lastIndexOf(".")),u="".concat(m.path).concat(m.fileName||Date.now()+F),s={filename:u,bucketName:m.bucketName,postData:{filename:u,acl:"public-read",key:u,unknowValueField:[]}},{data:h}=await kr(s);B.push({id:L.id,tempFiileBuffer:L.file,policy:h.policy,signature:h.signature,acl:"public-read",key:u,KSSAccessKeyId:h.kssAccessKeyId,name:u})}catch(E){return t.value=!1,!1}return!0},K=async(X,L)=>{const D=new FileReader;D.addEventListener("load",()=>L(D.result)),D.readAsDataURL(X)},M=X=>{const L=B.find(D=>D.id==X.file.id);i("update:fileList",X.file.url),i("readFileInputEventAsArrayBuffer",L.tempFiileBuffer),d.value=!1,t.value=!1},j=async X=>{console.log("🚀 ~ options",X),i("update:fileList",""),i("remove"),t.value=!1},W=({file:X,action:L,onFinish:D,onError:E,onProgress:F})=>{const u=B.find(s=>s.id==X.id);u.file=X,Ci({file:X,action:L,data:u,onProgress:F,onFinish:D,onError:E})},q=async X=>{try{const L="".concat(m.path).concat(m.fileName||new Date().getTime()+".png"),D={filename:L,bucketName:m.bucketName,postData:{filename:L,acl:"public-read",key:L,unknowValueField:[]}},{data:E}=await kr(D),F={policy:E.policy,signature:E.signature,acl:"public-read",key:L,KSSAccessKeyId:E.kssAccessKeyId,name:L,file:X},u=await Di(p,F);console.log(u,"upload"),i("update:fileList",u),d.value=!1}catch(L){return!1}};return()=>Ve("div",null,[Ve(gi,{ref:R,action:p,customRequest:W,fileList:b.value,"onUpdate:fileList":X=>b.value=X,listType:m.listType,accept:m.accept,multiple:m.multiple,max:m.max,disabled:m.disabled,showFileList:m.showFileList,showPreviewButton:!0,onBeforeUpload:X=>N(X),onFinish:X=>M(X),onRemove:X=>j(X)},{default:()=>[m.showType==="default"&&m.listType==="image"&&Ve(St,{loading:t.value,type:"primary"},{default:()=>[m.text]}),m.showType==="custom"&&r.custom&&r.custom()]}),m.tips&&Ve("p",{style:"font-size: 13px; color: #666; padding-top: 4px;"},[m.tips]),Ve(vi,{show:d.value,"onUpdate:show":X=>d.value=X,preset:"dialog",showIcon:!1,class:["modalTitle background"],title:"上传图片",style:{width:"800px"}},{default:()=>[Ve(dn,{ref:U,onClose:()=>d.value=!1,onCropperOk:q},null)]})])}});export{ai as C,hn as U,Di as a,kr as g,Ci as o};