index-legacy-fc9e3c82-1720699367816.js 240 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. System.register(["./index-legacy-e0181e36-1720699367816.js"],(function(e,t){"use strict";var r,o,n,i,a,s,c,l,u,d,p,h,f,m,g,y,v;return{setters:[e=>{e.b7,r=e.b8,o=e.H,n=e.d,i=e.e,a=e.r,s=e.f,c=e.aA,l=e.aB,u=e.x,d=e.j,p=e.k,h=e.S,f=e.b,m=e.A,g=e.O,y=e.l,v=e.m}],execute:function(){var t=document.createElement("style");t.textContent='/*!\n * Cropper.js v1.6.2\n * https://fengyuanchen.github.io/cropperjs\n *\n * Copyright 2015-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2024-04-21T07:43:02.731Z\n */.cropper-container{direction:ltr;font-size:0;line-height:0;position:relative;-ms-touch-action:none;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.cropper-container img{backface-visibility:hidden;display:block;height:100%;image-orientation:0deg;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.cropper-wrap-box,.cropper-canvas,.cropper-drag-box,.cropper-crop-box,.cropper-modal{bottom:0;left:0;position:absolute;right:0;top:0}.cropper-wrap-box,.cropper-canvas{overflow:hidden}.cropper-drag-box{background-color:#fff;opacity:0}.cropper-modal{background-color:#000;opacity:.5}.cropper-view-box{display:block;height:100%;outline:1px solid #39f;outline-color:rgba(51,153,255,.75);overflow:hidden;width:100%}.cropper-dashed{border:0 dashed #eee;display:block;opacity:.5;position:absolute}.cropper-dashed.dashed-h{border-bottom-width:1px;border-top-width:1px;height:calc(100% / 3);left:0;top:calc(100% / 3);width:100%}.cropper-dashed.dashed-v{border-left-width:1px;border-right-width:1px;height:100%;left:calc(100% / 3);top:0;width:calc(100% / 3)}.cropper-center{display:block;height:0;left:50%;opacity:.75;position:absolute;top:50%;width:0}.cropper-center:before,.cropper-center:after{background-color:#eee;content:" ";display:block;position:absolute}.cropper-center:before{height:1px;left:-.15625vw;top:0;width:.36458333vw}.cropper-center:after{height:.36458333vw;left:0;top:-.15625vw;width:1px}.cropper-face,.cropper-line,.cropper-point{display:block;height:100%;opacity:.1;position:absolute;width:100%}.cropper-face{background-color:#fff;left:0;top:0}.cropper-line{background-color:#39f}.cropper-line.line-e{cursor:ew-resize;right:-.15625vw;top:0;width:.26041667vw}.cropper-line.line-n{cursor:ns-resize;height:.26041667vw;left:0;top:-.15625vw}.cropper-line.line-w{cursor:ew-resize;left:-.15625vw;top:0;width:.26041667vw}.cropper-line.line-s{bottom:-.15625vw;cursor:ns-resize;height:.26041667vw;left:0}.cropper-point{background-color:#39f;height:.26041667vw;opacity:.75;width:.26041667vw}.cropper-point.point-e{cursor:ew-resize;margin-top:-.15625vw;right:-.15625vw;top:50%}.cropper-point.point-n{cursor:ns-resize;left:50%;margin-left:-.15625vw;top:-.15625vw}.cropper-point.point-w{cursor:ew-resize;left:-.15625vw;margin-top:-.15625vw;top:50%}.cropper-point.point-s{bottom:-.15625vw;cursor:s-resize;left:50%;margin-left:-.15625vw}.cropper-point.point-ne{cursor:nesw-resize;right:-.15625vw;top:-.15625vw}.cropper-point.point-nw{cursor:nwse-resize;left:-.15625vw;top:-.15625vw}.cropper-point.point-sw{bottom:-.15625vw;cursor:nesw-resize;left:-.15625vw}.cropper-point.point-se{bottom:-.15625vw;cursor:nwse-resize;height:1.04166667vw;opacity:1;right:-.15625vw;width:1.04166667vw}@media (min-width: 768px){.cropper-point.point-se{height:.78125vw;width:.78125vw}}@media (min-width: 992px){.cropper-point.point-se{height:.52083333vw;width:.52083333vw}}@media (min-width: 1200px){.cropper-point.point-se{height:.26041667vw;opacity:.75;width:.26041667vw}}.cropper-point.point-se:before{background-color:#39f;bottom:-50%;content:" ";display:block;height:200%;opacity:0;position:absolute;right:-50%;width:200%}.cropper-invisible{opacity:0}.cropper-bg{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC)}.cropper-hide{display:block;height:0;position:absolute;width:0}.cropper-hidden{display:none!important}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-drag-box,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed}\n',document.head.appendChild(t);var b={exports:{}};!function(e,t){var r;r=function(){return function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/dist/",r(r.s="./index.js")}({"./index.js":
  2. /*!******************!*\
  3. !*** ./index.js ***!
  4. \******************/
  5. /*! no static exports found */function(e,t,r){var o=r(/*! ./src/cos */"./src/cos.js");e.exports=o},"./lib/base64.js":
  6. /*!***********************!*\
  7. !*** ./lib/base64.js ***!
  8. \***********************/
  9. /*! no static exports found */function(e,t){var r=function(e){var t=(e=e||{}).Base64,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=function(e){for(var t={},r=0,o=e.length;r<o;r++)t[e.charAt(r)]=r;return t}(r),n=String.fromCharCode,i=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?n(192|t>>>6)+n(128|63&t):n(224|t>>>12&15)+n(128|t>>>6&63)+n(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return n(240|t>>>18&7)+n(128|t>>>12&63)+n(128|t>>>6&63)+n(128|63&t)},a=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,s=function(e){return e.replace(a,i)},c=function(e){var t=[0,2,1][e.length%3],o=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[r.charAt(o>>>18),r.charAt(o>>>12&63),t>=2?"=":r.charAt(o>>>6&63),t>=1?"=":r.charAt(63&o)].join("")},l=e.btoa?function(t){return e.btoa(t)}:function(e){return e.replace(/[\s\S]{1,3}/g,c)},u=function(e){return l(s(e))},d=function(e,t){return t?u(String(e)).replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,""):u(String(e))},p=new RegExp(["[À-ß][€-¿]","[à-ï][€-¿]{2}","[ð-÷][€-¿]{3}"].join("|"),"g"),h=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return n(55296+(t>>>10))+n(56320+(1023&t));case 3:return n((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return n((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},f=function(e){return e.replace(p,h)},m=function(e){var t=e.length,r=t%4,i=(t>0?o[e.charAt(0)]<<18:0)|(t>1?o[e.charAt(1)]<<12:0)|(t>2?o[e.charAt(2)]<<6:0)|(t>3?o[e.charAt(3)]:0),a=[n(i>>>16),n(i>>>8&255),n(255&i)];return a.length-=[0,0,2,1][r],a.join("")},g=e.atob?function(t){return e.atob(t)}:function(e){return e.replace(/[\s\S]{1,4}/g,m)},y=function(e){return function(e){return f(g(e))}(String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,""))};return{VERSION:"2.1.9",atob:g,btoa:l,fromBase64:y,toBase64:d,utob:s,encode:d,encodeURI:function(e){return d(e,!0)},btou:f,decode:y,noConflict:function(){var r=e.Base64;return e.Base64=t,r}}}();e.exports=r},"./lib/crypto.js":
  10. /*!***********************!*\
  11. !*** ./lib/crypto.js ***!
  12. \***********************/
  13. /*! no static exports found */function(e,t,r){(function(e){var t,o,n,i,a,s,c,l=r(/*! @babel/runtime/helpers/typeof */"./node_modules/@babel/runtime/helpers/typeof.js"),u=u||function(e,t){var r={},o=r.lib={},n=function(){},i=o.Base={extend:function(e){n.prototype=this;var t=new n;return e&&t.mixIn(e),t.hasOwnProperty("init")||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},a=o.WordArray=i.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||c).stringify(this)},concat:function(e){var t=this.words,r=e.words,o=this.sigBytes;if(e=e.sigBytes,this.clamp(),o%4)for(var n=0;n<e;n++)t[o+n>>>2]|=(r[n>>>2]>>>24-n%4*8&255)<<24-(o+n)%4*8;else if(65535<r.length)for(n=0;n<e;n+=4)t[o+n>>>2]=r[n>>>2];else t.push.apply(t,r);return this.sigBytes+=e,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var r=[],o=0;o<t;o+=4)r.push(4294967296*e.random()|0);return new a.init(r,t)}}),s=r.enc={},c=s.Hex={stringify:function(e){var t=e.words;e=e.sigBytes;for(var r=[],o=0;o<e;o++){var n=t[o>>>2]>>>24-o%4*8&255;r.push((n>>>4).toString(16)),r.push((15&n).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,r=[],o=0;o<t;o+=2)r[o>>>3]|=parseInt(e.substr(o,2),16)<<24-o%8*4;return new a.init(r,t/2)}},l=s.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var r=[],o=0;o<e;o++)r.push(String.fromCharCode(t[o>>>2]>>>24-o%4*8&255));return r.join("")},parse:function(e){for(var t=e.length,r=[],o=0;o<t;o++)r[o>>>2]|=(255&e.charCodeAt(o))<<24-o%4*8;return new a.init(r,t)}},u=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(t){throw Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},d=o.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=u.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r=this._data,o=r.words,n=r.sigBytes,i=this.blockSize,s=n/(4*i);if(t=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*i,n=e.min(4*t,n),t){for(var c=0;c<t;c+=i)this._doProcessBlock(o,c);c=o.splice(0,t),r.sigBytes-=n}return new a.init(c,n)},clone:function(){var e=i.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});o.Hasher=d.extend({cfg:i.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new p.HMAC.init(e,r).finalize(t)}}});var p=r.algo={};return r}(Math);o=(a=(t=u).lib).WordArray,n=a.Hasher,i=[],a=t.algo.SHA1=n.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,o=r[0],n=r[1],a=r[2],s=r[3],c=r[4],l=0;80>l;l++){if(16>l)i[l]=0|e[t+l];else{var u=i[l-3]^i[l-8]^i[l-14]^i[l-16];i[l]=u<<1|u>>>31}u=(o<<5|o>>>27)+c+i[l],u=20>l?u+(1518500249+(n&a|~n&s)):40>l?u+(1859775393+(n^a^s)):60>l?u+((n&a|n&s|a&s)-1894007588):u+((n^a^s)-899497514),c=s,s=a,a=n<<30|n>>>2,n=o,o=u}r[0]=r[0]+o|0,r[1]=r[1]+n|0,r[2]=r[2]+a|0,r[3]=r[3]+s|0,r[4]=r[4]+c|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,o=8*e.sigBytes;return t[o>>>5]|=128<<24-o%32,t[14+(o+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(o+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e}}),t.SHA1=n._createHelper(a),t.HmacSHA1=n._createHmacHelper(a),function(){var e=u,t=e.enc.Utf8;e.algo.HMAC=e.lib.Base.extend({init:function(e,r){e=this._hasher=new e.init,"string"==typeof r&&(r=t.parse(r));var o=e.blockSize,n=4*o;r.sigBytes>n&&(r=e.finalize(r)),r.clamp();for(var i=this._oKey=r.clone(),a=this._iKey=r.clone(),s=i.words,c=a.words,l=0;l<o;l++)s[l]^=1549556828,c[l]^=909522486;i.sigBytes=a.sigBytes=n,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher;return e=t.finalize(e),t.reset(),t.finalize(this._oKey.clone().concat(e))}})}(),c=(s=u).lib.WordArray,s.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,o=this._map;e.clamp();for(var n=[],i=0;i<r;i+=3)for(var a=(t[i>>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,s=0;s<4&&i+.75*s<r;s++)n.push(o.charAt(a>>>6*(3-s)&63));var c=o.charAt(64);if(c)for(;n.length%4;)n.push(c);return n.join("")},parse:function(e){var t=e.length,r=this._map,o=r.charAt(64);if(o){var n=e.indexOf(o);-1!=n&&(t=n)}for(var i=[],a=0,s=0;s<t;s++)if(s%4){var l=r.indexOf(e.charAt(s-1))<<s%4*2,u=r.indexOf(e.charAt(s))>>>6-s%4*2;i[a>>>2]|=(l|u)<<24-a%4*8,a++}return c.create(i,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},"object"===l(e)?e.exports=u:window.CryptoJS=u}).call(this,r(/*! ./../node_modules/webpack/buildin/module.js */"./node_modules/webpack/buildin/module.js")(e))},"./lib/json2xml.js":
  14. /*!*************************!*\
  15. !*** ./lib/json2xml.js ***!
  16. \*************************/
  17. /*! no static exports found */function(e,t,r){var o=r(/*! @babel/runtime/helpers/typeof */"./node_modules/@babel/runtime/helpers/typeof.js"),n="a-zA-Z_À-ÖØ-öø-ÿͰ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿿、-퟿豈-﷏ﷰ-�",i=new RegExp("^([^"+n+"])|^((x|X)(m|M)(l|L))|([^"+n+"-.0-9·̀-ͯ‿⁀])","g"),a=/[^\x09\x0A\x0D\x20-\xFF\x85\xA0-\uD7FF\uE000-\uFDCF\uFDE0-\uFFFD]/gm,s=function(e){var t=[];if(e instanceof Object)for(var r in e)e.hasOwnProperty(r)&&t.push(r);return t},c=function(e,t){var r=function(e,r,o,n,a){var s=void 0!==t.indent?t.indent:"\t",c=t.prettyPrint?"\n"+new Array(n).join(s):"";t.removeIllegalNameCharacters&&(e=e.replace(i,"_"));var l=[c,"<",e,o||""];return r&&r.length>0?(l.push(">"),l.push(r),a&&l.push(c),l.push("</"),l.push(e),l.push(">")):l.push("/>"),l.join("")};return function e(n,i,c){var l=o(n);switch((Array.isArray?Array.isArray(n):n instanceof Array)?l="array":n instanceof Date&&(l="date"),l){case"array":var u=[];return n.map((function(t){u.push(e(t,0,c+1))})),t.prettyPrint&&u.push("\n"),u.join("");case"date":return n.toJSON?n.toJSON():n+"";case"object":var d=[];for(var p in n)if(n.hasOwnProperty(p))if(n[p]instanceof Array)for(var h=0;h<n[p].length;h++)n[p].hasOwnProperty(h)&&d.push(r(p,e(n[p][h],0,c+1),null,c+1,s(n[p][h]).length));else d.push(r(p,e(n[p],0,c+1),null,c+1));return t.prettyPrint&&d.length>0&&d.push("\n"),d.join("");case"function":return n();default:return t.escape?(""+n).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&apos;").replace(/"/g,"&quot;").replace(a,""):""+n}}(e,0,0)},l=function(e){var t=['<?xml version="1.0" encoding="UTF-8"'];return e&&t.push(' standalone="yes"'),t.push("?>"),t.join("")};e.exports=function(e,t){if(t||(t={xmlHeader:{standalone:!0},prettyPrint:!0,indent:" ",escape:!0}),"string"==typeof e)try{e=JSON.parse(e.toString())}catch(i){return!1}var r="",n="";return t&&("object"==o(t)?(t.xmlHeader&&(r=l(!!t.xmlHeader.standalone)),void 0!==t.docType&&(n="<!DOCTYPE "+t.docType+">")):r=l()),[r,(t=t||{}).prettyPrint&&n?"\n":"",n,c(e,t)].join("").replace(/\n{2,}/g,"\n").replace(/\s+$/g,"")}},"./lib/md5.js":
  18. /*!********************!*\
  19. !*** ./lib/md5.js ***!
  20. \********************/
  21. /*! no static exports found */function(e,t,r){(function(e){var t,o=r(/*! @babel/runtime/helpers/typeof */"./node_modules/@babel/runtime/helpers/typeof.js");!function(){var n="object"===("undefined"==typeof window?"undefined":o(window)),i=n?window:{};i.JS_MD5_NO_WINDOW&&(n=!1),!n&&"object"===("undefined"==typeof self?"undefined":o(self))&&(i=self);var a,s=!i.JS_MD5_NO_COMMON_JS&&"object"===o(e)&&e.exports,c=r(/*! !webpack amd options */"./node_modules/webpack/buildin/amd-options.js"),l=!i.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,u="0123456789abcdef".split(""),d=[128,32768,8388608,-2147483648],p=[0,8,16,24],h=["hex","array","digest","buffer","arrayBuffer","base64"],f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),m=[];if(l){var g=new ArrayBuffer(68);a=new Uint8Array(g),m=new Uint32Array(g)}!i.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!l||!i.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===o(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer});var y=function(e){return function(t,r){return new v(!0).update(t,r)[e]()}};function v(e){if(e)m[0]=m[16]=m[1]=m[2]=m[3]=m[4]=m[5]=m[6]=m[7]=m[8]=m[9]=m[10]=m[11]=m[12]=m[13]=m[14]=m[15]=0,this.blocks=m,this.buffer8=a;else if(l){var t=new ArrayBuffer(68);this.buffer8=new Uint8Array(t),this.blocks=new Uint32Array(t)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}v.prototype.update=function(e,t){if(!this.finalized){for(var r,o,n=0,i=e.length,a=this.blocks,s=this.buffer8;n<i;){if(this.hashed&&(this.hashed=!1,a[0]=a[16],a[16]=a[1]=a[2]=a[3]=a[4]=a[5]=a[6]=a[7]=a[8]=a[9]=a[10]=a[11]=a[12]=a[13]=a[14]=a[15]=0),l)for(o=this.start;n<i&&o<64;++n)r=e.charCodeAt(n),t||r<128?s[o++]=r:r<2048?(s[o++]=192|r>>6,s[o++]=128|63&r):r<55296||r>=57344?(s[o++]=224|r>>12,s[o++]=128|r>>6&63,s[o++]=128|63&r):(r=65536+((1023&r)<<10|1023&e.charCodeAt(++n)),s[o++]=240|r>>18,s[o++]=128|r>>12&63,s[o++]=128|r>>6&63,s[o++]=128|63&r);else for(o=this.start;n<i&&o<64;++n)r=e.charCodeAt(n),t||r<128?a[o>>2]|=r<<p[3&o++]:r<2048?(a[o>>2]|=(192|r>>6)<<p[3&o++],a[o>>2]|=(128|63&r)<<p[3&o++]):r<55296||r>=57344?(a[o>>2]|=(224|r>>12)<<p[3&o++],a[o>>2]|=(128|r>>6&63)<<p[3&o++],a[o>>2]|=(128|63&r)<<p[3&o++]):(r=65536+((1023&r)<<10|1023&e.charCodeAt(++n)),a[o>>2]|=(240|r>>18)<<p[3&o++],a[o>>2]|=(128|r>>12&63)<<p[3&o++],a[o>>2]|=(128|r>>6&63)<<p[3&o++],a[o>>2]|=(128|63&r)<<p[3&o++]);this.lastByteIndex=o,this.bytes+=o-this.start,o>=64?(this.start=o-64,this.hash(),this.hashed=!0):this.start=o}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},v.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[t>>2]|=d[3&t],t>=56&&(this.hashed||this.hash(),e[0]=e[16],e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.bytes<<3,e[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},v.prototype.hash=function(){var e,t,r,o,n,i,a=this.blocks;this.first?t=((t=((e=((e=a[0]-680876937)<<7|e>>>25)-271733879<<0)^(r=((r=(-271733879^(o=((o=(-1732584194^2004318071&e)+a[1]-117830708)<<12|o>>>20)+e<<0)&(-271733879^e))+a[2]-1126478375)<<17|r>>>15)+o<<0)&(o^e))+a[3]-1316259209)<<22|t>>>10)+r<<0:(e=this.h0,t=this.h1,r=this.h2,t=((t+=((e=((e+=((o=this.h3)^t&(r^o))+a[0]-680876936)<<7|e>>>25)+t<<0)^(r=((r+=(t^(o=((o+=(r^e&(t^r))+a[1]-389564586)<<12|o>>>20)+e<<0)&(e^t))+a[2]+606105819)<<17|r>>>15)+o<<0)&(o^e))+a[3]-1044525330)<<22|t>>>10)+r<<0),t=((t+=((e=((e+=(o^t&(r^o))+a[4]-176418897)<<7|e>>>25)+t<<0)^(r=((r+=(t^(o=((o+=(r^e&(t^r))+a[5]+1200080426)<<12|o>>>20)+e<<0)&(e^t))+a[6]-1473231341)<<17|r>>>15)+o<<0)&(o^e))+a[7]-45705983)<<22|t>>>10)+r<<0,t=((t+=((e=((e+=(o^t&(r^o))+a[8]+1770035416)<<7|e>>>25)+t<<0)^(r=((r+=(t^(o=((o+=(r^e&(t^r))+a[9]-1958414417)<<12|o>>>20)+e<<0)&(e^t))+a[10]-42063)<<17|r>>>15)+o<<0)&(o^e))+a[11]-1990404162)<<22|t>>>10)+r<<0,t=((t+=((e=((e+=(o^t&(r^o))+a[12]+1804603682)<<7|e>>>25)+t<<0)^(r=((r+=(t^(o=((o+=(r^e&(t^r))+a[13]-40341101)<<12|o>>>20)+e<<0)&(e^t))+a[14]-1502002290)<<17|r>>>15)+o<<0)&(o^e))+a[15]+1236535329)<<22|t>>>10)+r<<0,t=((t+=((o=((o+=(t^r&((e=((e+=(r^o&(t^r))+a[1]-165796510)<<5|e>>>27)+t<<0)^t))+a[6]-1069501632)<<9|o>>>23)+e<<0)^e&((r=((r+=(e^t&(o^e))+a[11]+643717713)<<14|r>>>18)+o<<0)^o))+a[0]-373897302)<<20|t>>>12)+r<<0,t=((t+=((o=((o+=(t^r&((e=((e+=(r^o&(t^r))+a[5]-701558691)<<5|e>>>27)+t<<0)^t))+a[10]+38016083)<<9|o>>>23)+e<<0)^e&((r=((r+=(e^t&(o^e))+a[15]-660478335)<<14|r>>>18)+o<<0)^o))+a[4]-405537848)<<20|t>>>12)+r<<0,t=((t+=((o=((o+=(t^r&((e=((e+=(r^o&(t^r))+a[9]+568446438)<<5|e>>>27)+t<<0)^t))+a[14]-1019803690)<<9|o>>>23)+e<<0)^e&((r=((r+=(e^t&(o^e))+a[3]-187363961)<<14|r>>>18)+o<<0)^o))+a[8]+1163531501)<<20|t>>>12)+r<<0,t=((t+=((o=((o+=(t^r&((e=((e+=(r^o&(t^r))+a[13]-1444681467)<<5|e>>>27)+t<<0)^t))+a[2]-51403784)<<9|o>>>23)+e<<0)^e&((r=((r+=(e^t&(o^e))+a[7]+1735328473)<<14|r>>>18)+o<<0)^o))+a[12]-1926607734)<<20|t>>>12)+r<<0,t=((t+=((i=(o=((o+=((n=t^r)^(e=((e+=(n^o)+a[5]-378558)<<4|e>>>28)+t<<0))+a[8]-2022574463)<<11|o>>>21)+e<<0)^e)^(r=((r+=(i^t)+a[11]+1839030562)<<16|r>>>16)+o<<0))+a[14]-35309556)<<23|t>>>9)+r<<0,t=((t+=((i=(o=((o+=((n=t^r)^(e=((e+=(n^o)+a[1]-1530992060)<<4|e>>>28)+t<<0))+a[4]+1272893353)<<11|o>>>21)+e<<0)^e)^(r=((r+=(i^t)+a[7]-155497632)<<16|r>>>16)+o<<0))+a[10]-1094730640)<<23|t>>>9)+r<<0,t=((t+=((i=(o=((o+=((n=t^r)^(e=((e+=(n^o)+a[13]+681279174)<<4|e>>>28)+t<<0))+a[0]-358537222)<<11|o>>>21)+e<<0)^e)^(r=((r+=(i^t)+a[3]-722521979)<<16|r>>>16)+o<<0))+a[6]+76029189)<<23|t>>>9)+r<<0,t=((t+=((i=(o=((o+=((n=t^r)^(e=((e+=(n^o)+a[9]-640364487)<<4|e>>>28)+t<<0))+a[12]-421815835)<<11|o>>>21)+e<<0)^e)^(r=((r+=(i^t)+a[15]+530742520)<<16|r>>>16)+o<<0))+a[2]-995338651)<<23|t>>>9)+r<<0,t=((t+=((o=((o+=(t^((e=((e+=(r^(t|~o))+a[0]-198630844)<<6|e>>>26)+t<<0)|~r))+a[7]+1126891415)<<10|o>>>22)+e<<0)^((r=((r+=(e^(o|~t))+a[14]-1416354905)<<15|r>>>17)+o<<0)|~e))+a[5]-57434055)<<21|t>>>11)+r<<0,t=((t+=((o=((o+=(t^((e=((e+=(r^(t|~o))+a[12]+1700485571)<<6|e>>>26)+t<<0)|~r))+a[3]-1894986606)<<10|o>>>22)+e<<0)^((r=((r+=(e^(o|~t))+a[10]-1051523)<<15|r>>>17)+o<<0)|~e))+a[1]-2054922799)<<21|t>>>11)+r<<0,t=((t+=((o=((o+=(t^((e=((e+=(r^(t|~o))+a[8]+1873313359)<<6|e>>>26)+t<<0)|~r))+a[15]-30611744)<<10|o>>>22)+e<<0)^((r=((r+=(e^(o|~t))+a[6]-1560198380)<<15|r>>>17)+o<<0)|~e))+a[13]+1309151649)<<21|t>>>11)+r<<0,t=((t+=((o=((o+=(t^((e=((e+=(r^(t|~o))+a[4]-145523070)<<6|e>>>26)+t<<0)|~r))+a[11]-1120210379)<<10|o>>>22)+e<<0)^((r=((r+=(e^(o|~t))+a[2]+718787259)<<15|r>>>17)+o<<0)|~e))+a[9]-343485551)<<21|t>>>11)+r<<0,this.first?(this.h0=e+1732584193<<0,this.h1=t-271733879<<0,this.h2=r-1732584194<<0,this.h3=o+271733878<<0,this.first=!1):(this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+r<<0,this.h3=this.h3+o<<0)},v.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,o=this.h3;return u[e>>4&15]+u[15&e]+u[e>>12&15]+u[e>>8&15]+u[e>>20&15]+u[e>>16&15]+u[e>>28&15]+u[e>>24&15]+u[t>>4&15]+u[15&t]+u[t>>12&15]+u[t>>8&15]+u[t>>20&15]+u[t>>16&15]+u[t>>28&15]+u[t>>24&15]+u[r>>4&15]+u[15&r]+u[r>>12&15]+u[r>>8&15]+u[r>>20&15]+u[r>>16&15]+u[r>>28&15]+u[r>>24&15]+u[o>>4&15]+u[15&o]+u[o>>12&15]+u[o>>8&15]+u[o>>20&15]+u[o>>16&15]+u[o>>28&15]+u[o>>24&15]},v.prototype.toString=v.prototype.hex,v.prototype.digest=function(e){if("hex"===e)return this.hex();this.finalize();var t=this.h0,r=this.h1,o=this.h2,n=this.h3;return[255&t,t>>8&255,t>>16&255,t>>24&255,255&r,r>>8&255,r>>16&255,r>>24&255,255&o,o>>8&255,o>>16&255,o>>24&255,255&n,n>>8&255,n>>16&255,n>>24&255]},v.prototype.array=v.prototype.digest,v.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(16),t=new Uint32Array(e);return t[0]=this.h0,t[1]=this.h1,t[2]=this.h2,t[3]=this.h3,e},v.prototype.buffer=v.prototype.arrayBuffer,v.prototype.base64=function(){for(var e,t,r,o="",n=this.array(),i=0;i<15;)e=n[i++],t=n[i++],r=n[i++],o+=f[e>>>2]+f[63&(e<<4|t>>>4)]+f[63&(t<<2|r>>>6)]+f[63&r];return e=n[i],o+=f[e>>>2]+f[e<<4&63]+"=="};var b=function(){var e=y("hex");e.getCtx=e.create=function(){return new v},e.update=function(t){return e.create().update(t)};for(var t=0;t<h.length;++t){var r=h[t];e[r]=y(r)}return e}();s?e.exports=b:(i.md5=b,c&&(void 0===(t=function(){return b}.call(b,r,b,e))||(e.exports=t)))}()}).call(this,r(/*! ./../node_modules/webpack/buildin/module.js */"./node_modules/webpack/buildin/module.js")(e))},"./lib/request.js":
  22. /*!************************!*\
  23. !*** ./lib/request.js ***!
  24. \************************/
  25. /*! no static exports found */function(e,t,r){var o=r(/*! @babel/runtime/helpers/typeof */"./node_modules/@babel/runtime/helpers/typeof.js"),n=function(e){switch(o(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}},i=function(e,t,r){var o={},n=t.getAllResponseHeaders();return n&&n.length>0&&n.trim().split("\n").forEach((function(e){if(e){var t=e.indexOf(":"),r=e.substr(0,t).trim().toLowerCase(),n=e.substr(t+1).trim();o[r]=n}})),{error:e,statusCode:t.status,statusMessage:t.statusText,headers:o,body:r}},a=function(e,t){return t||"text"!==t?e.response:e.responseText};e.exports=function(e,t){var r,s,c,l,u=(e.method||"GET").toUpperCase(),d=e.url;if(e.qs){var p=(r=e.qs,s=s||"&",c=c||"=",null===r&&(r=void 0),"object"===o(r)?Object.keys(r).map((function(e){var t=encodeURIComponent(n(e))+c;return Array.isArray(r[e])?r[e].map((function(e){return t+encodeURIComponent(n(e))})).join(s):t+encodeURIComponent(n(r[e]))})).filter(Boolean).join(s):l?encodeURIComponent(n(l))+c+encodeURIComponent(n(r)):"");p&&(d+=(-1===d.indexOf("?")?"?":"&")+p)}var h=new XMLHttpRequest;if(h.open(u,d,!0),h.responseType=e.dataType||"text",e.xhrFields)for(var f in e.xhrFields)h[f]=e.xhrFields[f];var m=e.headers;if(m)for(var g in m)m.hasOwnProperty(g)&&"content-length"!==g.toLowerCase()&&"user-agent"!==g.toLowerCase()&&"origin"!==g.toLowerCase()&&"host"!==g.toLowerCase()&&h.setRequestHeader(g,m[g]);return e.onProgress&&h.upload&&(h.upload.onprogress=e.onProgress),e.onDownloadProgress&&(h.onprogress=e.onDownloadProgress),e.timeout&&(h.timeout=e.timeout),h.ontimeout=function(e){var r=new Error("timeout");t(i(r,h))},h.onload=function(){t(i(null,h,a(h,e.dataType)))},h.onerror=function(r){var o=a(h,e.dataType);if(o)t(i(null,h,o));else{var n=h.statusText;n||0!==h.status||(n=new Error("CORS blocked or network error")),t(i(n,h,o))}},h.send(e.body||""),h}},"./lib/xml2json.js":
  26. /*!*************************!*\
  27. !*** ./lib/xml2json.js ***!
  28. \*************************/
  29. /*! no static exports found */function(e,t,r){var o=r(/*! @xmldom/xmldom */"./node_modules/@xmldom/xmldom/lib/index.js").DOMParser,n=function(){this.version="1.3.5";var e={mergeCDATA:!0,normalize:!0,stripElemPrefix:!0},t=new RegExp(/(?!xmlns)^.*:/);return this.grokType=function(e){return/^\s*$/.test(e)?null:/^(?:true|false)$/i.test(e)?"true"===e.toLowerCase():isFinite(e)?parseFloat(e):e},this.parseString=function(e,t){if(e){var r=this.stringToXML(e);return r.getElementsByTagName("parsererror").length?null:this.parseXML(r,t)}return null},this.parseXML=function(r,o){for(var i in o)e[i]=o[i];var a={},s=0,c="";if(r.childNodes.length)for(var l,u,d,p=0;p<r.childNodes.length;p++)4===(l=r.childNodes.item(p)).nodeType?e.mergeCDATA&&(c+=l.nodeValue):3===l.nodeType?c+=l.nodeValue:1===l.nodeType&&(0===s&&(a={}),u=e.stripElemPrefix?l.nodeName.replace(t,""):l.nodeName,d=n.parseXML(l),a.hasOwnProperty(u)?(a[u].constructor!==Array&&(a[u]=[a[u]]),a[u].push(d)):(a[u]=d,s++));return Object.keys(a).length||(a=c||""),a},this.xmlToString=function(e){try{return e.xml?e.xml:(new XMLSerializer).serializeToString(e)}catch(t){return null}},this.stringToXML=function(e){try{var t=null;return window.DOMParser?t=(new o).parseFromString(e,"text/xml"):((t=new ActiveXObject("Microsoft.XMLDOM")).async=!1,t.loadXML(e),t)}catch(r){return null}},this}.call({});e.exports=function(e){return n.parseString(e)}},"./node_modules/@babel/runtime/helpers/classCallCheck.js":
  30. /*!***************************************************************!*\
  31. !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
  32. \***************************************************************/
  33. /*! no static exports found */function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/createClass.js":
  34. /*!************************************************************!*\
  35. !*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
  36. \************************************************************/
  37. /*! no static exports found */function(e,t,r){var o=r(/*! ./toPropertyKey.js */"./node_modules/@babel/runtime/helpers/toPropertyKey.js");function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/toPrimitive.js":
  38. /*!************************************************************!*\
  39. !*** ./node_modules/@babel/runtime/helpers/toPrimitive.js ***!
  40. \************************************************************/
  41. /*! no static exports found */function(e,t,r){var o=r(/*! ./typeof.js */"./node_modules/@babel/runtime/helpers/typeof.js").default;e.exports=function(e,t){if("object"!==o(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/toPropertyKey.js":
  42. /*!**************************************************************!*\
  43. !*** ./node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
  44. \**************************************************************/
  45. /*! no static exports found */function(e,t,r){var o=r(/*! ./typeof.js */"./node_modules/@babel/runtime/helpers/typeof.js").default,n=r(/*! ./toPrimitive.js */"./node_modules/@babel/runtime/helpers/toPrimitive.js");e.exports=function(e){var t=n(e,"string");return"symbol"===o(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/typeof.js":
  46. /*!*******************************************************!*\
  47. !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
  48. \*******************************************************/
  49. /*! no static exports found */function(e,t){function r(t){return e.exports=r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,r(t)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@xmldom/xmldom/lib/conventions.js":
  50. /*!********************************************************!*\
  51. !*** ./node_modules/@xmldom/xmldom/lib/conventions.js ***!
  52. \********************************************************/
  53. /*! no static exports found */function(e,t,r){function o(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var n=o({HTML:"text/html",isHTML:function(e){return e===n.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),i=o({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===i.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});t.assign=function(e,t){if(null===e||"object"!=typeof e)throw new TypeError("target is not an object");for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},t.find=function(e,t,r){if(void 0===r&&(r=Array.prototype),e&&"function"==typeof r.find)return r.find.call(e,t);for(var o=0;o<e.length;o++)if(Object.prototype.hasOwnProperty.call(e,o)){var n=e[o];if(t.call(void 0,n,o,e))return n}},t.freeze=o,t.MIME_TYPE=n,t.NAMESPACE=i},"./node_modules/@xmldom/xmldom/lib/dom-parser.js":
  54. /*!*******************************************************!*\
  55. !*** ./node_modules/@xmldom/xmldom/lib/dom-parser.js ***!
  56. \*******************************************************/
  57. /*! no static exports found */function(e,t,r){var o=r(/*! ./conventions */"./node_modules/@xmldom/xmldom/lib/conventions.js"),n=r(/*! ./dom */"./node_modules/@xmldom/xmldom/lib/dom.js"),i=r(/*! ./entities */"./node_modules/@xmldom/xmldom/lib/entities.js"),a=r(/*! ./sax */"./node_modules/@xmldom/xmldom/lib/sax.js"),s=n.DOMImplementation,c=o.NAMESPACE,l=a.ParseError,u=a.XMLReader;function d(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function p(e){this.options=e||{locator:{}}}function h(){this.cdata=!1}function f(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function m(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function g(e,t,r){return"string"==typeof e?e.substr(t,r):e.length>=t+r||t?new java.lang.String(e,t,r)+"":e}function y(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}p.prototype.parseFromString=function(e,t){var r=this.options,o=new u,n=r.domBuilder||new h,a=r.errorHandler,s=r.locator,l=r.xmlns||{},p=/\/x?html?$/.test(t),f=p?i.HTML_ENTITIES:i.XML_ENTITIES;s&&n.setDocumentLocator(s),o.errorHandler=function(e,t,r){if(!e){if(t instanceof h)return t;e=t}var o={},n=e instanceof Function;function i(t){var i=e[t];!i&&n&&(i=2==e.length?function(r){e(t,r)}:e),o[t]=i&&function(e){i("[xmldom "+t+"]\t"+e+m(r))}||function(){}}return r=r||{},i("warning"),i("error"),i("fatalError"),o}(a,n,s),o.domBuilder=r.domBuilder||n,p&&(l[""]=c.HTML),l.xml=l.xml||c.XML;var g=r.normalizeLineEndings||d;return e&&"string"==typeof e?o.parse(g(e),l,f):o.errorHandler.error("invalid doc source"),n.doc},h.prototype={startDocument:function(){this.doc=(new s).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,r,o){var n=this.doc,i=n.createElementNS(e,r||t),a=o.length;y(this,i),this.currentElement=i,this.locator&&f(this.locator,i);for(var s=0;s<a;s++){e=o.getURI(s);var c=o.getValue(s),l=(r=o.getQName(s),n.createAttributeNS(e,r));this.locator&&f(o.getLocator(s),l),l.value=l.nodeValue=c,i.setAttributeNode(l)}},endElement:function(e,t,r){var o=this.currentElement;o.tagName,this.currentElement=o.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var r=this.doc.createProcessingInstruction(e,t);this.locator&&f(this.locator,r),y(this,r)},ignorableWhitespace:function(e,t,r){},characters:function(e,t,r){if(e=g.apply(this,arguments)){if(this.cdata)var o=this.doc.createCDATASection(e);else o=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(o):/^\s*$/.test(e)&&this.doc.appendChild(o),this.locator&&f(this.locator,o)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,r){e=g.apply(this,arguments);var o=this.doc.createComment(e);this.locator&&f(this.locator,o),y(this,o)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,r){var o=this.doc.implementation;if(o&&o.createDocumentType){var n=o.createDocumentType(e,t,r);this.locator&&f(this.locator,n),y(this,n),this.doc.doctype=n}},warning:function(e){console.warn("[xmldom warning]\t"+e,m(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,m(this.locator))},fatalError:function(e){throw new l(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){h.prototype[e]=function(){return null}})),t.__DOMHandler=h,t.normalizeLineEndings=d,t.DOMParser=p},"./node_modules/@xmldom/xmldom/lib/dom.js":
  58. /*!************************************************!*\
  59. !*** ./node_modules/@xmldom/xmldom/lib/dom.js ***!
  60. \************************************************/
  61. /*! no static exports found */function(e,t,r){var o=r(/*! ./conventions */"./node_modules/@xmldom/xmldom/lib/conventions.js"),n=o.find,i=o.NAMESPACE;function a(e){return""!==e}function s(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function c(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(a):[]}(e);return Object.keys(t.reduce(s,{}))}function l(e,t){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}function u(e,t){var r=e.prototype;if(!(r instanceof t)){function o(){}o.prototype=t.prototype,l(r,o=new o),e.prototype=r=o}r.constructor!=e&&("function"!=typeof e&&console.error("unknown Class:"+e),r.constructor=e)}var d={},p=d.ELEMENT_NODE=1,h=d.ATTRIBUTE_NODE=2,f=d.TEXT_NODE=3,m=d.CDATA_SECTION_NODE=4,g=d.ENTITY_REFERENCE_NODE=5,y=d.ENTITY_NODE=6,v=d.PROCESSING_INSTRUCTION_NODE=7,b=d.COMMENT_NODE=8,k=d.DOCUMENT_NODE=9,C=d.DOCUMENT_TYPE_NODE=10,w=d.DOCUMENT_FRAGMENT_NODE=11,x=d.NOTATION_NODE=12,S={},T={};S.INDEX_SIZE_ERR=(T[1]="Index size error",1),S.DOMSTRING_SIZE_ERR=(T[2]="DOMString size error",2);var R=S.HIERARCHY_REQUEST_ERR=(T[3]="Hierarchy request error",3);S.WRONG_DOCUMENT_ERR=(T[4]="Wrong document",4),S.INVALID_CHARACTER_ERR=(T[5]="Invalid character",5),S.NO_DATA_ALLOWED_ERR=(T[6]="No data allowed",6),S.NO_MODIFICATION_ALLOWED_ERR=(T[7]="No modification allowed",7);var A=S.NOT_FOUND_ERR=(T[8]="Not found",8);S.NOT_SUPPORTED_ERR=(T[9]="Not supported",9);var B=S.INUSE_ATTRIBUTE_ERR=(T[10]="Attribute in use",10);function E(e,t){if(t instanceof Error)var r=t;else r=this,Error.call(this,T[e]),this.message=T[e],Error.captureStackTrace&&Error.captureStackTrace(this,E);return r.code=e,t&&(this.message=this.message+": "+t),r}function D(){}function N(e,t){this._node=e,this._refresh=t,O(this)}function O(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var r=e._refresh(e._node);if(be(e,"length",r.length),!e.$$length||r.length<e.$$length)for(var o=r.length;o in e;o++)Object.prototype.hasOwnProperty.call(e,o)&&delete e[o];l(r,e),e._inc=t}}function I(){}function P(e,t){for(var r=e.length;r--;)if(e[r]===t)return r}function M(e,t,r,o){if(o?t[P(t,o)]=r:t[t.length++]=r,e){r.ownerElement=e;var n=e.ownerDocument;n&&(o&&z(n,e,o),function(e,t,r){e&&e._inc++;var o=r.namespaceURI;o===i.XMLNS&&(t._nsMap[r.prefix?r.localName:""]=r.value)}(n,e,r))}}function L(e,t,r){var o=P(t,r);if(!(o>=0))throw new E(A,new Error(e.tagName+"@"+r));for(var n=t.length-1;o<n;)t[o]=t[++o];if(t.length=n,e){var i=e.ownerDocument;i&&(z(i,e,r),r.ownerElement=null)}}function U(){}function _(){}function j(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function q(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(q(e,t))return!0}while(e=e.nextSibling)}function H(){this.ownerDocument=this}function z(e,t,r,o){e&&e._inc++,r.namespaceURI===i.XMLNS&&delete t._nsMap[r.prefix?r.localName:""]}function F(e,t,r){if(e&&e._inc){e._inc++;var o=t.childNodes;if(r)o[o.length++]=r;else{for(var n=t.firstChild,i=0;n;)o[i++]=n,n=n.nextSibling;o.length=i,delete o[o.length]}}}function K(e,t){var r=t.previousSibling,o=t.nextSibling;return r?r.nextSibling=o:e.firstChild=o,o?o.previousSibling=r:e.lastChild=r,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,F(e.ownerDocument,e),t}function V(e){return e&&e.nodeType===_.DOCUMENT_TYPE_NODE}function G(e){return e&&e.nodeType===_.ELEMENT_NODE}function W(e){return e&&e.nodeType===_.TEXT_NODE}function X(e,t){var r=e.childNodes||[];if(n(r,G)||V(t))return!1;var o=n(r,V);return!(t&&o&&r.indexOf(o)>r.indexOf(t))}function Y(e,t){var r=e.childNodes||[];if(n(r,(function(e){return G(e)&&e!==t})))return!1;var o=n(r,V);return!(t&&o&&r.indexOf(o)>r.indexOf(t))}function Q(e,t,r){if(!function(e){return e&&(e.nodeType===_.DOCUMENT_NODE||e.nodeType===_.DOCUMENT_FRAGMENT_NODE||e.nodeType===_.ELEMENT_NODE)}(e))throw new E(R,"Unexpected parent node type "+e.nodeType);if(r&&r.parentNode!==e)throw new E(A,"child not in parent");if(!function(e){return e&&(G(e)||W(e)||V(e)||e.nodeType===_.DOCUMENT_FRAGMENT_NODE||e.nodeType===_.COMMENT_NODE||e.nodeType===_.PROCESSING_INSTRUCTION_NODE)}(t)||V(t)&&e.nodeType!==_.DOCUMENT_NODE)throw new E(R,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}function $(e,t,r){var o=e.childNodes||[],i=t.childNodes||[];if(t.nodeType===_.DOCUMENT_FRAGMENT_NODE){var a=i.filter(G);if(a.length>1||n(i,W))throw new E(R,"More than one element or text in fragment");if(1===a.length&&!X(e,r))throw new E(R,"Element in fragment can not be inserted before doctype")}if(G(t)&&!X(e,r))throw new E(R,"Only one element can be added and only after doctype");if(V(t)){if(n(o,V))throw new E(R,"Only one doctype is allowed");var s=n(o,G);if(r&&o.indexOf(s)<o.indexOf(r))throw new E(R,"Doctype can only be inserted before an element");if(!r&&s)throw new E(R,"Doctype can not be appended since element is present")}}function J(e,t,r){var o=e.childNodes||[],i=t.childNodes||[];if(t.nodeType===_.DOCUMENT_FRAGMENT_NODE){var a=i.filter(G);if(a.length>1||n(i,W))throw new E(R,"More than one element or text in fragment");if(1===a.length&&!Y(e,r))throw new E(R,"Element in fragment can not be inserted before doctype")}if(G(t)&&!Y(e,r))throw new E(R,"Only one element can be added and only after doctype");if(V(t)){function c(e){return V(e)&&e!==r}if(n(o,c))throw new E(R,"Only one doctype is allowed");var s=n(o,G);if(r&&o.indexOf(s)<o.indexOf(r))throw new E(R,"Doctype can only be inserted before an element")}}function Z(e,t,r,o){Q(e,t,r),e.nodeType===_.DOCUMENT_NODE&&(o||$)(e,t,r);var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===w){var i=t.firstChild;if(null==i)return t;var a=t.lastChild}else i=a=t;var s=r?r.previousSibling:e.lastChild;i.previousSibling=s,a.nextSibling=r,s?s.nextSibling=i:e.firstChild=i,null==r?e.lastChild=a:r.previousSibling=a;do{i.parentNode=e}while(i!==a&&(i=i.nextSibling));return F(e.ownerDocument||e,e),t.nodeType==w&&(t.firstChild=t.lastChild=null),t}function ee(){this._nsMap={}}function te(){}function re(){}function oe(){}function ne(){}function ie(){}function ae(){}function se(){}function ce(){}function le(){}function ue(){}function de(){}function pe(){}function he(e,t){var r=[],o=9==this.nodeType&&this.documentElement||this,n=o.prefix,i=o.namespaceURI;if(i&&null==n&&null==(n=o.lookupPrefix(i)))var a=[{namespace:i,prefix:null}];return ge(this,r,e,t,a),r.join("")}function fe(e,t,r){var o=e.prefix||"",n=e.namespaceURI;if(!n)return!1;if("xml"===o&&n===i.XML||n===i.XMLNS)return!1;for(var a=r.length;a--;){var s=r[a];if(s.prefix===o)return s.namespace!==n}return!0}function me(e,t,r){e.push(" ",t,'="',r.replace(/[<>&"\t\n\r]/g,j),'"')}function ge(e,t,r,o,n){if(n||(n=[]),o){if(!(e=o(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case p:var a=e.attributes,s=a.length,c=e.firstChild,l=e.tagName,u=l;if(!(r=i.isHTML(e.namespaceURI)||r)&&!e.prefix&&e.namespaceURI){for(var d,y=0;y<a.length;y++)if("xmlns"===a.item(y).name){d=a.item(y).value;break}if(!d)for(var x=n.length-1;x>=0;x--)if(""===(S=n[x]).prefix&&S.namespace===e.namespaceURI){d=S.namespace;break}if(d!==e.namespaceURI)for(x=n.length-1;x>=0;x--){var S;if((S=n[x]).namespace===e.namespaceURI){S.prefix&&(u=S.prefix+":"+l);break}}}t.push("<",u);for(var T=0;T<s;T++)"xmlns"==(R=a.item(T)).prefix?n.push({prefix:R.localName,namespace:R.value}):"xmlns"==R.nodeName&&n.push({prefix:"",namespace:R.value});for(T=0;T<s;T++){var R,A,B;fe(R=a.item(T),0,n)&&(me(t,(A=R.prefix||"")?"xmlns:"+A:"xmlns",B=R.namespaceURI),n.push({prefix:A,namespace:B})),ge(R,t,r,o,n)}if(l===u&&fe(e,0,n)&&(me(t,(A=e.prefix||"")?"xmlns:"+A:"xmlns",B=e.namespaceURI),n.push({prefix:A,namespace:B})),c||r&&!/^(?:meta|link|img|br|hr|input)$/i.test(l)){if(t.push(">"),r&&/^script$/i.test(l))for(;c;)c.data?t.push(c.data):ge(c,t,r,o,n.slice()),c=c.nextSibling;else for(;c;)ge(c,t,r,o,n.slice()),c=c.nextSibling;t.push("</",u,">")}else t.push("/>");return;case k:case w:for(c=e.firstChild;c;)ge(c,t,r,o,n.slice()),c=c.nextSibling;return;case h:return me(t,e.name,e.value);case f:return t.push(e.data.replace(/[<&>]/g,j));case m:return t.push("<![CDATA[",e.data,"]]>");case b:return t.push("\x3c!--",e.data,"--\x3e");case C:var E=e.publicId,D=e.systemId;if(t.push("<!DOCTYPE ",e.name),E)t.push(" PUBLIC ",E),D&&"."!=D&&t.push(" ",D),t.push(">");else if(D&&"."!=D)t.push(" SYSTEM ",D,">");else{var N=e.internalSubset;N&&t.push(" [",N,"]"),t.push(">")}return;case v:return t.push("<?",e.target," ",e.data,"?>");case g:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function ye(e,t,r){var o;switch(t.nodeType){case p:(o=t.cloneNode(!1)).ownerDocument=e;case w:break;case h:r=!0}if(o||(o=t.cloneNode(!1)),o.ownerDocument=e,o.parentNode=null,r)for(var n=t.firstChild;n;)o.appendChild(ye(e,n,r)),n=n.nextSibling;return o}function ve(e,t,r){var o=new t.constructor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var i=t[n];"object"!=typeof i&&i!=o[n]&&(o[n]=i)}switch(t.childNodes&&(o.childNodes=new D),o.ownerDocument=e,o.nodeType){case p:var a=t.attributes,s=o.attributes=new I,c=a.length;s._ownerElement=o;for(var l=0;l<c;l++)o.setAttributeNode(ve(e,a.item(l),!0));break;case h:r=!0}if(r)for(var u=t.firstChild;u;)o.appendChild(ve(e,u,r)),u=u.nextSibling;return o}function be(e,t,r){e[t]=r}S.INVALID_STATE_ERR=(T[11]="Invalid state",11),S.SYNTAX_ERR=(T[12]="Syntax error",12),S.INVALID_MODIFICATION_ERR=(T[13]="Invalid modification",13),S.NAMESPACE_ERR=(T[14]="Invalid namespace",14),S.INVALID_ACCESS_ERR=(T[15]="Invalid access",15),E.prototype=Error.prototype,l(S,E),D.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var r=[],o=0;o<this.length;o++)ge(this[o],r,e,t);return r.join("")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},N.prototype.item=function(e){return O(this),this[e]||null},u(N,D),I.prototype={length:0,item:D.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var r=this[t];if(r.nodeName==e)return r}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new E(B);var r=this.getNamedItem(e.nodeName);return M(this._ownerElement,this,e,r),r},setNamedItemNS:function(e){var t,r=e.ownerElement;if(r&&r!=this._ownerElement)throw new E(B);return t=this.getNamedItemNS(e.namespaceURI,e.localName),M(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return L(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var r=this.getNamedItemNS(e,t);return L(this._ownerElement,this,r),r},getNamedItemNS:function(e,t){for(var r=this.length;r--;){var o=this[r];if(o.localName==t&&o.namespaceURI==e)return o}return null}},U.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,r){var o=new H;if(o.implementation=this,o.childNodes=new D,o.doctype=r||null,r&&o.appendChild(r),t){var n=o.createElementNS(e,t);o.appendChild(n)}return o},createDocumentType:function(e,t,r){var o=new ae;return o.name=e,o.nodeName=e,o.publicId=t||"",o.systemId=r||"",o}},_.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return Z(this,e,t)},replaceChild:function(e,t){Z(this,e,t,J),t&&this.removeChild(t)},removeChild:function(e){return K(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return ve(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==f&&e.nodeType==f?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var r=t._nsMap;if(r)for(var o in r)if(Object.prototype.hasOwnProperty.call(r,o)&&r[o]===e)return o;t=t.nodeType==h?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var r=t._nsMap;if(r&&Object.prototype.hasOwnProperty.call(r,e))return r[e];t=t.nodeType==h?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},l(d,_),l(d,_.prototype),H.prototype={nodeName:"#document",nodeType:k,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==w){for(var r=e.firstChild;r;){var o=r.nextSibling;this.insertBefore(r,t),r=o}return e}return Z(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===p&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),K(this,e)},replaceChild:function(e,t){Z(this,e,t,J),e.ownerDocument=this,t&&this.removeChild(t),G(e)&&(this.documentElement=e)},importNode:function(e,t){return ye(this,e,t)},getElementById:function(e){var t=null;return q(this.documentElement,(function(r){if(r.nodeType==p&&r.getAttribute("id")==e)return t=r,!0})),t},getElementsByClassName:function(e){var t=c(e);return new N(this,(function(r){var o=[];return t.length>0&&q(r.documentElement,(function(n){if(n!==r&&n.nodeType===p){var i=n.getAttribute("class");if(i){var a=e===i;if(!a){var s=c(i);a=t.every((l=s,function(e){return l&&-1!==l.indexOf(e)}))}a&&o.push(n)}}var l})),o}))},createElement:function(e){var t=new ee;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new D,(t.attributes=new I)._ownerElement=t,t},createDocumentFragment:function(){var e=new ue;return e.ownerDocument=this,e.childNodes=new D,e},createTextNode:function(e){var t=new oe;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new ne;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new ie;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var r=new de;return r.ownerDocument=this,r.tagName=r.nodeName=r.target=e,r.nodeValue=r.data=t,r},createAttribute:function(e){var t=new te;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new le;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var r=new ee,o=t.split(":"),n=r.attributes=new I;return r.childNodes=new D,r.ownerDocument=this,r.nodeName=t,r.tagName=t,r.namespaceURI=e,2==o.length?(r.prefix=o[0],r.localName=o[1]):r.localName=t,n._ownerElement=r,r},createAttributeNS:function(e,t){var r=new te,o=t.split(":");return r.ownerDocument=this,r.nodeName=t,r.name=t,r.namespaceURI=e,r.specified=!0,2==o.length?(r.prefix=o[0],r.localName=o[1]):r.localName=t,r}},u(H,_),ee.prototype={nodeType:p,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var r=this.ownerDocument.createAttribute(e);r.value=r.nodeValue=""+t,this.setAttributeNode(r)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===w?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,F(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);r&&this.removeAttributeNode(r)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);return r&&r.value||""},setAttributeNS:function(e,t,r){var o=this.ownerDocument.createAttributeNS(e,t);o.value=o.nodeValue=""+r,this.setAttributeNode(o)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new N(this,(function(t){var r=[];return q(t,(function(o){o===t||o.nodeType!=p||"*"!==e&&o.tagName!=e||r.push(o)})),r}))},getElementsByTagNameNS:function(e,t){return new N(this,(function(r){var o=[];return q(r,(function(n){n===r||n.nodeType!==p||"*"!==e&&n.namespaceURI!==e||"*"!==t&&n.localName!=t||o.push(n)})),o}))}},H.prototype.getElementsByTagName=ee.prototype.getElementsByTagName,H.prototype.getElementsByTagNameNS=ee.prototype.getElementsByTagNameNS,u(ee,_),te.prototype.nodeType=h,u(te,_),re.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(T[R])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,r){r=this.data.substring(0,e)+r+this.data.substring(e+t),this.nodeValue=this.data=r,this.length=r.length}},u(re,_),oe.prototype={nodeName:"#text",nodeType:f,splitText:function(e){var t=this.data,r=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var o=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(o,this.nextSibling),o}},u(oe,re),ne.prototype={nodeName:"#comment",nodeType:b},u(ne,re),ie.prototype={nodeName:"#cdata-section",nodeType:m},u(ie,re),ae.prototype.nodeType=C,u(ae,_),se.prototype.nodeType=x,u(se,_),ce.prototype.nodeType=y,u(ce,_),le.prototype.nodeType=g,u(le,_),ue.prototype.nodeName="#document-fragment",ue.prototype.nodeType=w,u(ue,_),de.prototype.nodeType=v,u(de,_),pe.prototype.serializeToString=function(e,t,r){return he.call(e,t,r)},_.prototype.toString=he;try{if(Object.defineProperty){function Ce(e){switch(e.nodeType){case p:case w:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(Ce(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(N.prototype,"length",{get:function(){return O(this),this.$$length}}),Object.defineProperty(_.prototype,"textContent",{get:function(){return Ce(this)},set:function(e){switch(this.nodeType){case p:case w:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),be=function(e,t,r){e["$$"+t]=r}}}catch(ke){}t.DocumentType=ae,t.DOMException=E,t.DOMImplementation=U,t.Element=ee,t.Node=_,t.NodeList=D,t.XMLSerializer=pe},"./node_modules/@xmldom/xmldom/lib/entities.js":
  62. /*!*****************************************************!*\
  63. !*** ./node_modules/@xmldom/xmldom/lib/entities.js ***!
  64. \*****************************************************/
  65. /*! no static exports found */function(e,t,r){var o=r(/*! ./conventions */"./node_modules/@xmldom/xmldom/lib/conventions.js").freeze;t.XML_ENTITIES=o({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),t.HTML_ENTITIES=o({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:"\t",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:"‌"}),t.entityMap=t.HTML_ENTITIES},"./node_modules/@xmldom/xmldom/lib/index.js":
  66. /*!**************************************************!*\
  67. !*** ./node_modules/@xmldom/xmldom/lib/index.js ***!
  68. \**************************************************/
  69. /*! no static exports found */function(e,t,r){var o=r(/*! ./dom */"./node_modules/@xmldom/xmldom/lib/dom.js");t.DOMImplementation=o.DOMImplementation,t.XMLSerializer=o.XMLSerializer,t.DOMParser=r(/*! ./dom-parser */"./node_modules/@xmldom/xmldom/lib/dom-parser.js").DOMParser},"./node_modules/@xmldom/xmldom/lib/sax.js":
  70. /*!************************************************!*\
  71. !*** ./node_modules/@xmldom/xmldom/lib/sax.js ***!
  72. \************************************************/
  73. /*! no static exports found */function(e,t,r){var o=r(/*! ./conventions */"./node_modules/@xmldom/xmldom/lib/conventions.js").NAMESPACE,n=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,i=new RegExp("[\\-\\.0-9"+n.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),a=new RegExp("^"+n.source+i.source+"*(?::"+n.source+i.source+"*)?$"),s=0,c=1,l=2,u=3,d=4,p=5,h=6,f=7;function m(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,m)}function g(){}function y(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function v(e,t,r,n,i,a){function m(e,t,o){r.attributeNames.hasOwnProperty(e)&&a.fatalError("Attribute "+e+" redefined"),r.addValue(e,t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,i),o)}for(var g,y=++t,v=s;;){var b=e.charAt(y);switch(b){case"=":if(v===c)g=e.slice(t,y),v=u;else{if(v!==l)throw new Error("attribute equal must after attrName");v=u}break;case"'":case'"':if(v===u||v===c){if(v===c&&(a.warning('attribute value must after "="'),g=e.slice(t,y)),t=y+1,!((y=e.indexOf(b,t))>0))throw new Error("attribute value no end '"+b+"' match");m(g,k=e.slice(t,y),t-1),v=p}else{if(v!=d)throw new Error('attribute value must after "="');m(g,k=e.slice(t,y),t),a.warning('attribute "'+g+'" missed start quot('+b+")!!"),t=y+1,v=p}break;case"/":switch(v){case s:r.setTagName(e.slice(t,y));case p:case h:case f:v=f,r.closed=!0;case d:case c:break;case l:r.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),v==s&&r.setTagName(e.slice(t,y)),y;case">":switch(v){case s:r.setTagName(e.slice(t,y));case p:case h:case f:break;case d:case c:"/"===(k=e.slice(t,y)).slice(-1)&&(r.closed=!0,k=k.slice(0,-1));case l:v===l&&(k=g),v==d?(a.warning('attribute "'+k+'" missed quot(")!'),m(g,k,t)):(o.isHTML(n[""])&&k.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+k+'" missed value!! "'+k+'" instead!!'),m(k,k,t));break;case u:throw new Error("attribute value missed!!")}return y;case"€":b=" ";default:if(b<=" ")switch(v){case s:r.setTagName(e.slice(t,y)),v=h;break;case c:g=e.slice(t,y),v=l;break;case d:var k=e.slice(t,y);a.warning('attribute "'+k+'" missed quot(")!!'),m(g,k,t);case p:v=h}else switch(v){case l:r.tagName,o.isHTML(n[""])&&g.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+g+'" missed value!! "'+g+'" instead2!!'),m(g,g,t),t=y,v=c;break;case p:a.warning('attribute space is required"'+g+'"!!');case h:v=c,t=y;break;case u:v=d,t=y;break;case f:throw new Error("elements closed character '/' and '>' must be connected to")}}y++}}function b(e,t,r){for(var n=e.tagName,i=null,a=e.length;a--;){var s=e[a],c=s.qName,l=s.value;if((h=c.indexOf(":"))>0)var u=s.prefix=c.slice(0,h),d=c.slice(h+1),p="xmlns"===u&&d;else d=c,u=null,p="xmlns"===c&&"";s.localName=d,!1!==p&&(null==i&&(i={},w(r,r={})),r[p]=i[p]=l,s.uri=o.XMLNS,t.startPrefixMapping(p,l))}for(a=e.length;a--;)(u=(s=e[a]).prefix)&&("xml"===u&&(s.uri=o.XML),"xmlns"!==u&&(s.uri=r[u||""]));var h;(h=n.indexOf(":"))>0?(u=e.prefix=n.slice(0,h),d=e.localName=n.slice(h+1)):(u=null,d=e.localName=n);var f=e.uri=r[u||""];if(t.startElement(f,d,n,e),!e.closed)return e.currentNSMap=r,e.localNSMap=i,!0;if(t.endElement(f,d,n),i)for(u in i)Object.prototype.hasOwnProperty.call(i,u)&&t.endPrefixMapping(u)}function k(e,t,r,o,n){if(/^(?:script|textarea)$/i.test(r)){var i=e.indexOf("</"+r+">",t),a=e.substring(t+1,i);if(/[&<]/.test(a))return/^script$/i.test(r)?(n.characters(a,0,a.length),i):(a=a.replace(/&#?\w+;/g,o),n.characters(a,0,a.length),i)}return t+1}function C(e,t,r,o){var n=o[r];return null==n&&((n=e.lastIndexOf("</"+r+">"))<t&&(n=e.lastIndexOf("</"+r)),o[r]=n),n<t}function w(e,t){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}function x(e,t,r,o){if("-"===e.charAt(t+2))return"-"===e.charAt(t+3)?(n=e.indexOf("--\x3e",t+4))>t?(r.comment(e,t+4,n-t-4),n+3):(o.error("Unclosed comment"),-1):-1;if("CDATA["==e.substr(t+3,6)){var n=e.indexOf("]]>",t+9);return r.startCDATA(),r.characters(e,t+9,n-t-9),r.endCDATA(),n+3}var i=function(e,t){var r,o=[],n=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(n.lastIndex=t,n.exec(e);r=n.exec(e);)if(o.push(r),r[1])return o}(e,t),a=i.length;if(a>1&&/!doctype/i.test(i[0][0])){var s=i[1][0],c=!1,l=!1;a>3&&(/^public$/i.test(i[2][0])?(c=i[3][0],l=a>4&&i[4][0]):/^system$/i.test(i[2][0])&&(l=i[3][0]));var u=i[a-1];return r.startDTD(s,c,l),r.endDTD(),u.index+u[0].length}return-1}function S(e,t,r){var o=e.indexOf("?>",t);if(o){var n=e.substring(t,o).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return n?(n[0].length,r.processingInstruction(n[1],n[2]),o+2):-1}return-1}function T(){this.attributeNames={}}m.prototype=new Error,m.prototype.name=m.name,g.prototype={parse:function(e,t,r){var n=this.domBuilder;n.startDocument(),w(t,t={}),function(e,t,r,n,i){function a(e){if(e>65535){var t=55296+((e-=65536)>>10),r=56320+(1023&e);return String.fromCharCode(t,r)}return String.fromCharCode(e)}function s(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(r,t)?r[t]:"#"===t.charAt(0)?a(parseInt(t.substr(1).replace("x","0x"))):(i.error("entity not found:"+e),e)}function c(t){if(t>w){var r=e.substring(w,t).replace(/&#?\w+;/g,s);h&&l(w),n.characters(r,0,t-w),w=t}}function l(t,r){for(;t>=d&&(r=p.exec(e));)u=r.index,d=u+r[0].length,h.lineNumber++;h.columnNumber=t-u+1}for(var u=0,d=0,p=/.*(?:\r\n?|\n)|.*$/g,h=n.locator,f=[{currentNSMap:t}],g={},w=0;;){try{var R=e.indexOf("<",w);if(R<0){if(!e.substr(w).match(/^\s*$/)){var A=n.doc,B=A.createTextNode(e.substr(w));A.appendChild(B),n.currentElement=B}return}switch(R>w&&c(R),e.charAt(R+1)){case"/":var E=e.indexOf(">",R+3),D=e.substring(R+2,E).replace(/[ \t\n\r]+$/g,""),N=f.pop();E<0?(D=e.substring(R+2).replace(/[\s<].*/,""),i.error("end tag name: "+D+" is not complete:"+N.tagName),E=R+1+D.length):D.match(/\s</)&&(D=D.replace(/[\s<].*/,""),i.error("end tag name: "+D+" maybe not complete"),E=R+1+D.length);var O=N.localNSMap,I=N.tagName==D;if(I||N.tagName&&N.tagName.toLowerCase()==D.toLowerCase()){if(n.endElement(N.uri,N.localName,D),O)for(var P in O)Object.prototype.hasOwnProperty.call(O,P)&&n.endPrefixMapping(P);I||i.fatalError("end tag name: "+D+" is not match the current start tagName:"+N.tagName)}else f.push(N);E++;break;case"?":h&&l(R),E=S(e,R,n);break;case"!":h&&l(R),E=x(e,R,n,i);break;default:h&&l(R);var M=new T,L=f[f.length-1].currentNSMap,U=(E=v(e,R,M,L,s,i),M.length);if(!M.closed&&C(e,E,M.tagName,g)&&(M.closed=!0,r.nbsp||i.warning("unclosed xml attribute")),h&&U){for(var _=y(h,{}),j=0;j<U;j++){var q=M[j];l(q.offset),q.locator=y(h,{})}n.locator=_,b(M,n,L)&&f.push(M),n.locator=h}else b(M,n,L)&&f.push(M);o.isHTML(M.uri)&&!M.closed?E=k(e,E,M.tagName,s,n):E++}}catch(H){if(H instanceof m)throw H;i.error("element parse error: "+H),E=-1}E>w?w=E:c(Math.max(R,w)+1)}}(e,t,r,n,this.errorHandler),n.endDocument()}},T.prototype={setTagName:function(e){if(!a.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,r){if(!a.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:r}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},t.XMLReader=g,t.ParseError=m},"./node_modules/process/browser.js":
  74. /*!*****************************************!*\
  75. !*** ./node_modules/process/browser.js ***!
  76. \*****************************************/
  77. /*! no static exports found */function(e,t){var r,o,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(e){o=a}}();var c,l=[],u=!1,d=-1;function p(){u&&c&&(u=!1,c.length?l=c.concat(l):d=-1,l.length&&h())}function h(){if(!u){var e=s(p);u=!0;for(var t=l.length;t;){for(c=l,l=[];++d<t;)c&&c[d].run();d=-1,t=l.length}c=null,u=!1,function(e){if(o===clearTimeout)return clearTimeout(e);if((o===a||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{return o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function m(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new f(e,t)),1!==l.length||u||s(h)},f.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=m,n.addListener=m,n.once=m,n.off=m,n.removeListener=m,n.removeAllListeners=m,n.emit=m,n.prependListener=m,n.prependOnceListener=m,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},"./node_modules/webpack/buildin/amd-options.js":
  78. /*!****************************************!*\
  79. !*** (webpack)/buildin/amd-options.js ***!
  80. \****************************************/
  81. /*! no static exports found */function(e,t){(function(t){e.exports=t}).call(this,{})},"./node_modules/webpack/buildin/module.js":
  82. /*!***********************************!*\
  83. !*** (webpack)/buildin/module.js ***!
  84. \***********************************/
  85. /*! no static exports found */function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},"./package.json":
  86. /*!**********************!*\
  87. !*** ./package.json ***!
  88. \**********************/
  89. /*! exports provided: name, version, description, main, types, scripts, repository, keywords, author, license, bugs, homepage, dependencies, devDependencies, default */function(e){e.exports=JSON.parse('{"name":"cos-js-sdk-v5","version":"1.7.1","description":"JavaScript SDK for [腾讯云对象存储](https://cloud.tencent.com/product/cos)","main":"dist/cos-js-sdk-v5.js","types":"index.d.ts","scripts":{"prettier":"prettier --write src demo/demo.js demo/CIDemos/*.js test/test.js server/sts.js lib/request.js index.d.ts","server":"node server/sts.js","dev":"cross-env NODE_ENV=development webpack -w --mode=development","build":"cross-env NODE_ENV=production webpack --mode=production","cos-auth.min.js":"uglifyjs ./demo/common/cos-auth.js -o ./demo/common/cos-auth.min.js -c -m","test":"jest --runInBand --coverage"},"repository":{"type":"git","url":"git+https://github.com/tencentyun/cos-js-sdk-v5.git"},"keywords":[],"author":"carsonxu","license":"ISC","bugs":{"url":"https://github.com/tencentyun/cos-js-sdk-v5/issues"},"homepage":"https://github.com/tencentyun/cos-js-sdk-v5#readme","dependencies":{"@xmldom/xmldom":"^0.8.6"},"devDependencies":{"@babel/core":"7.17.9","@babel/plugin-transform-runtime":"7.18.10","@babel/preset-env":"7.16.11","babel-loader":"8.2.5","body-parser":"^1.18.3","cross-env":"^5.2.0","express":"^4.16.4","jest":"^29.3.1","jest-environment-jsdom":"^29.3.1","prettier":"^3.0.1","qcloud-cos-sts":"^3.0.2","request":"^2.87.0","terser-webpack-plugin":"4.2.3","uglifyjs":"^2.4.11","webpack":"4.46.0","webpack-cli":"4.10.0"}}')},"./src/advance.js":
  90. /*!************************!*\
  91. !*** ./src/advance.js ***!
  92. \************************/
  93. /*! no static exports found */function(e,t,r){var o=r(/*! @babel/runtime/helpers/typeof */"./node_modules/@babel/runtime/helpers/typeof.js"),n=r(/*! ./session */"./src/session.js"),i=r(/*! ./async */"./src/async.js"),a=r(/*! ./event */"./src/event.js").EventProxy,s=r(/*! ./util */"./src/util.js"),c=r(/*! ./tracker */"./src/tracker.js");function l(e,t){var r=e.TaskId,o=e.Bucket,c=e.Region,l=e.Key,p=e.StorageClass,h=this,f={},m=e.FileSize,g=e.SliceSize,y=Math.ceil(m/g),v=0,b=s.throttleOnProgress.call(h,m,e.onHashProgress),k=function(t,r){var o=t.length;return 0===o?r(null,!0):o>y||o>1&&Math.max(t[0].Size,t[1].Size)!==g?r(null,!1):void function n(i){if(i<o){var a=t[i];!function(t,r){var o=g*(t-1),n=Math.min(o+g,m),i=n-o;f[t]?r(null,{PartNumber:t,ETag:f[t],Size:i}):s.fileSlice(e.Body,o,n,!1,(function(e){s.getFileMd5(e,(function(e,o){if(e)return r(s.error(e));var n='"'+o+'"';f[t]=n,b({loaded:v+=i,total:m}),r(null,{PartNumber:t,ETag:n,Size:i})}))}))}(a.PartNumber,(function(e,t){t&&t.ETag===a.ETag&&t.Size===a.Size?n(i+1):r(null,!1)}))}else r(null,!0)}(0)},C=new a;C.on("error",(function(e){if(h._isRunningTask(r))return t(e)})),C.on("upload_id_available",(function(e){var r={},o=[];s.each(e.PartList,(function(e){r[e.PartNumber]=e}));for(var n=1;n<=y;n++){var i=r[n];i?(i.PartNumber=n,i.Uploaded=!0):i={PartNumber:n,ETag:null,Uploaded:!1},o.push(i)}e.PartList=o,t(null,e)})),C.on("no_available_upload_id",(function(){if(h._isRunningTask(r)){var n=s.extend({Bucket:o,Region:c,Key:l,Query:s.clone(e.Query),StorageClass:p,Body:e.Body,calledBySdk:"sliceUploadFile",tracker:e.tracker},e),i=s.clone(e.Headers);delete i["x-cos-mime-limit"],n.Headers=i,h.multipartInit(n,(function(e,o){if(h._isRunningTask(r)){if(e)return C.emit("error",e);var n=o.UploadId;if(!n)return t(s.error(new Error("no such upload id")));C.emit("upload_id_available",{UploadId:n,PartList:[]})}}))}})),C.on("has_and_check_upload_id",(function(t){t=t.reverse(),i.eachLimit(t,1,(function(t,i){h._isRunningTask(r)&&(n.using[t]?i():d.call(h,{Bucket:o,Region:c,Key:l,UploadId:t,tracker:e.tracker},(function(e,o){if(h._isRunningTask(r)){if(e)return n.removeUsing(t),C.emit("error",e);var a=o.PartList;a.forEach((function(e){e.PartNumber*=1,e.Size*=1,e.ETag=e.ETag||""})),k(a,(function(e,o){if(h._isRunningTask(r))return e?C.emit("error",e):void(o?i({UploadId:t,PartList:a}):i())}))}})))}),(function(e){h._isRunningTask(r)&&(b(null,!0),e&&e.UploadId?C.emit("upload_id_available",e):C.emit("no_available_upload_id"))}))})),C.on("seek_local_avail_upload_id",(function(t){var i=n.getFileId(e.Body,e.ChunkSize,o,l),a=n.getUploadIdList.call(h,i);i&&a?function i(u){if(u>=a.length)C.emit("has_and_check_upload_id",t);else{var p=a[u];if(!s.isInArray(t,p))return n.removeUploadId.call(h,p),void i(u+1);n.using[p]?i(u+1):d.call(h,{Bucket:o,Region:c,Key:l,UploadId:p,tracker:e.tracker},(function(e,t){h._isRunningTask(r)&&(e?(n.removeUploadId.call(h,p),i(u+1)):C.emit("upload_id_available",{UploadId:p,PartList:t.PartList}))}))}}(0):C.emit("has_and_check_upload_id",t)})),C.on("get_remote_upload_id_list",(function(){u.call(h,{Bucket:o,Region:c,Key:l,tracker:e.tracker},(function(t,i){if(h._isRunningTask(r)){if(t)return C.emit("error",t);var a=s.filter(i.UploadList,(function(e){return e.Key===l&&(!p||e.StorageClass.toUpperCase()===p.toUpperCase())})).reverse().map((function(e){return e.UploadId||e.UploadID}));if(a.length)C.emit("seek_local_avail_upload_id",a);else{var c,u=n.getFileId(e.Body,e.ChunkSize,o,l);u&&(c=n.getUploadIdList.call(h,u))&&s.each(c,(function(e){n.removeUploadId.call(h,e)})),C.emit("no_available_upload_id")}}}))})),C.emit("get_remote_upload_id_list")}function u(e,t){var r=this,o=[],n={Bucket:e.Bucket,Region:e.Region,Prefix:e.Key,calledBySdk:e.calledBySdk||"sliceUploadFile",tracker:e.tracker};!function e(){r.multipartList(n,(function(r,i){if(r)return t(r);o.push.apply(o,i.Upload||[]),"true"===i.IsTruncated?(n.KeyMarker=i.NextKeyMarker,n.UploadIdMarker=i.NextUploadIdMarker,e()):t(null,{UploadList:o})}))}()}function d(e,t){var r=this,o=[],n={Bucket:e.Bucket,Region:e.Region,Key:e.Key,UploadId:e.UploadId,calledBySdk:"sliceUploadFile",tracker:e.tracker};!function e(){r.multipartListPart(n,(function(r,i){if(r)return t(r);o.push.apply(o,i.Part||[]),"true"===i.IsTruncated?(n.PartNumberMarker=i.NextPartNumberMarker,e()):t(null,{PartList:o})}))}()}function p(e,t){var r=this,o=e.TaskId,n=e.Bucket,a=e.Region,c=e.Key,l=e.UploadData,u=e.FileSize,d=e.SliceSize,p=Math.min(e.AsyncLimit||r.options.ChunkParallelLimit||1,256),f=e.Body,m=Math.ceil(u/d),g=0,y=e.ServerSideEncryption,v=e.Headers,b=s.filter(l.PartList,(function(e){return e.Uploaded&&(g+=e.PartNumber>=m&&u%d||d),!e.Uploaded})),k=e.onProgress;i.eachLimit(b,p,(function(t,i){if(r._isRunningTask(o)){var s=t.PartNumber,p=Math.min(u,t.PartNumber*d)-(t.PartNumber-1)*d,m=0;h.call(r,{TaskId:o,Bucket:n,Region:a,Key:c,SliceSize:d,FileSize:u,PartNumber:s,ServerSideEncryption:y,Body:f,UploadData:l,Headers:v,onProgress:function(e){g+=e.loaded-m,m=e.loaded,k({loaded:g,total:u})},tracker:e.tracker},(function(e,n){r._isRunningTask(o)&&(e||n.ETag||(e='get ETag error, please add "ETag" to CORS ExposeHeader setting.( 获取ETag失败,请在CORS ExposeHeader设置中添加ETag,请参考文档:https://cloud.tencent.com/document/product/436/13318 )'),e?g-=m:(g+=p-m,t.ETag=n.ETag),k({loaded:g,total:u}),i(e||null,n))}))}}),(function(e){if(r._isRunningTask(o))return e?t(e):void t(null,{UploadId:l.UploadId,SliceList:l.PartList})}))}function h(e,t){var r=this,o=e.TaskId,n=e.Bucket,a=e.Region,c=e.Key,l=e.FileSize,u=e.Body,d=1*e.PartNumber,p=e.SliceSize,h=e.ServerSideEncryption,f=e.UploadData,m=e.Headers||{},g=r.options.ChunkRetryTimes+1,y=p*(d-1),v=p,b=y+p;b>l&&(v=(b=l)-y);var k=["x-cos-traffic-limit","x-cos-mime-limit"],C={};s.each(m,(function(e,t){k.indexOf(t)>-1&&(C[t]=e)}));var w=f.PartList[d-1];i.retry(g,(function(t){r._isRunningTask(o)&&s.fileSlice(u,y,b,!0,(function(i){r.multipartUpload({TaskId:o,Bucket:n,Region:a,Key:c,ContentLength:v,PartNumber:d,UploadId:f.UploadId,ServerSideEncryption:h,Body:i,Headers:C,onProgress:e.onProgress,calledBySdk:"sliceUploadFile",tracker:e.tracker},(function(e,n){if(r._isRunningTask(o))return e?t(e):(w.Uploaded=!0,t(null,n))}))}))}),(function(e,n){if(r._isRunningTask(o))return t(e,n)}))}function f(e,t){var r=e.Bucket,o=e.Region,n=e.Key,a=e.UploadId,s=e.SliceList,c=this,l=this.options.ChunkRetryTimes+1,u=e.Headers,d=s.map((function(e){return{PartNumber:e.PartNumber,ETag:e.ETag}}));i.retry(l,(function(t){c.multipartComplete({Bucket:r,Region:o,Key:n,UploadId:a,Parts:d,Headers:u,calledBySdk:"sliceUploadFile",tracker:e.tracker},t)}),(function(e,r){t(e,r)}))}function m(e,t){var r=e.Bucket,o=e.Region,n=e.Key,a=e.AbortArray,s=e.AsyncLimit||1,c=this,l=0,u=new Array(a.length);i.eachLimit(a,s,(function(t,i){var a=l;if(n&&n!==t.Key)return u[a]={error:{KeyNotMatch:!0}},void i(null);var s=t.UploadId||t.UploadID;c.multipartAbort({Bucket:r,Region:o,Key:t.Key,Headers:e.Headers,UploadId:s},(function(e){var n={Bucket:r,Region:o,Key:t.Key,UploadId:s};u[a]={error:e,task:n},i(null)})),l++}),(function(e){if(e)return t(e);for(var r=[],o=[],n=0,i=u.length;n<i;n++){var a=u[n];a.task&&(a.error?o.push(a.task):r.push(a.task))}return t(null,{successList:r,errorList:o})}))}function g(e,t){var r=e.TaskId,o=e.Bucket,n=e.Region,a=e.Key,s=e.CopySource,c=e.UploadId,l=1*e.PartNumber,u=e.CopySourceRange,d=this.options.ChunkRetryTimes+1,p=this;i.retry(d,(function(t){p.uploadPartCopy({TaskId:r,Bucket:o,Region:n,Key:a,CopySource:s,UploadId:c,PartNumber:l,CopySourceRange:u,tracker:e.tracker,calledBySdk:e.calledBySdk},(function(e,r){t(e||null,r)}))}),(function(e,r){return t(e,r)}))}var y={sliceUploadFile:function(e,t){var r,o,i=this,c=new a,u=e.TaskId,d=e.Bucket,h=e.Region,m=e.Key,g=e.Body,y=e.ChunkSize||e.SliceSize||i.options.ChunkSize,v=e.AsyncLimit,b=e.StorageClass,k=e.ServerSideEncryption,C=e.onHashProgress,w=e.tracker;w&&w.setParams({chunkSize:y}),c.on("error",(function(r){if(i._isRunningTask(u))return r.UploadId=e.UploadData.UploadId||"",t(r)})),c.on("upload_complete",(function(r){var o=s.extend({UploadId:e.UploadData.UploadId||""},r);t(null,o)})),c.on("upload_slice_complete",(function(t){var a={};s.each(e.Headers,(function(e,t){var r=t.toLowerCase();0!==r.indexOf("x-cos-meta-")&&"pic-operations"!==r||(a[t]=e)})),f.call(i,{Bucket:d,Region:h,Key:m,UploadId:t.UploadId,SliceList:t.SliceList,Headers:a,tracker:w},(function(e,a){if(i._isRunningTask(u)){if(n.removeUsing(t.UploadId),e)return o(null,!0),c.emit("error",e);n.removeUploadId.call(i,t.UploadId),o({loaded:r,total:r},!0),c.emit("upload_complete",a)}}))})),c.on("get_upload_data_finish",(function(t){var a=n.getFileId(g,e.ChunkSize,d,m);a&&n.saveUploadId.call(i,a,t.UploadId,i.options.UploadIdCacheLimit),n.setUsing(t.UploadId),o(null,!0),p.call(i,{TaskId:u,Bucket:d,Region:h,Key:m,Body:g,FileSize:r,SliceSize:y,AsyncLimit:v,ServerSideEncryption:k,UploadData:t,Headers:e.Headers,onProgress:o,tracker:w},(function(e,t){if(i._isRunningTask(u))return e?(o(null,!0),c.emit("error",e)):void c.emit("upload_slice_complete",t)}))})),c.on("get_file_size_finish",(function(){if(o=s.throttleOnProgress.call(i,r,e.onProgress),e.UploadData.UploadId)c.emit("get_upload_data_finish",e.UploadData);else{var t=s.extend({TaskId:u,Bucket:d,Region:h,Key:m,Headers:e.Headers,StorageClass:b,Body:g,FileSize:r,SliceSize:y,onHashProgress:C,tracker:w},e);l.call(i,t,(function(t,r){if(i._isRunningTask(u)){if(t)return c.emit("error",t);e.UploadData.UploadId=r.UploadId,e.UploadData.PartList=r.PartList,c.emit("get_upload_data_finish",e.UploadData)}}))}})),r=e.ContentLength,delete e.ContentLength,!e.Headers&&(e.Headers={}),s.each(e.Headers,(function(t,r){"content-length"===r.toLowerCase()&&delete e.Headers[r]})),function(){for(var t=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],o=1048576,n=0;n<t.length&&!(r/(o=1024*t[n]*1024)<=i.options.MaxPartNumber);n++);e.ChunkSize=e.SliceSize=y=Math.max(y,o)}(),0===r?(e.Body="",e.ContentLength=0,e.SkipTask=!0,i.putObject(e,t)):c.emit("get_file_size_finish")},abortUploadTask:function(e,t){var r=e.Bucket,o=e.Region,n=e.Key,i=e.UploadId,c=e.Level||"task",l=e.AsyncLimit,d=this,p=new a;if(p.on("error",(function(e){return t(e)})),p.on("get_abort_array",(function(i){m.call(d,{Bucket:r,Region:o,Key:n,Headers:e.Headers,AsyncLimit:l,AbortArray:i},t)})),"bucket"===c)u.call(d,{Bucket:r,Region:o,calledBySdk:"abortUploadTask"},(function(e,r){if(e)return t(e);p.emit("get_abort_array",r.UploadList||[])}));else if("file"===c){if(!n)return t(s.error(new Error("abort_upload_task_no_key")));u.call(d,{Bucket:r,Region:o,Key:n,calledBySdk:"abortUploadTask"},(function(e,r){if(e)return t(e);p.emit("get_abort_array",r.UploadList||[])}))}else{if("task"!==c)return t(s.error(new Error("abort_unknown_level")));if(!i)return t(s.error(new Error("abort_upload_task_no_id")));if(!n)return t(s.error(new Error("abort_upload_task_no_key")));p.emit("get_abort_array",[{Key:n,UploadId:i}])}},uploadFile:function(e,t){var r=this,n=void 0===e.SliceSize?r.options.SliceSize:e.SliceSize,i=[],a=e.Body,l=a.size||a.length||0,u={TaskId:""};if(r.options.EnableReporter){var d=r.options.UseAccelerate||"string"==typeof r.options.Domain&&r.options.Domain.includes("accelerate."),p=l>n?"sliceUploadFile":"putObject";e.tracker=new c({Beacon:r.options.BeaconReporter,clsReporter:r.options.ClsReporter,bucket:e.Bucket,region:e.Region,apiName:"uploadFile",realApi:p,fileKey:e.Key,fileSize:l,accelerate:d,deepTracker:r.options.DeepTracker,customId:r.options.CustomId,delay:r.options.TrackerDelay})}s.each(e,(function(e,t){"object"!==o(e)&&"function"!=typeof e&&(u[t]=e)}));var h=e.onTaskReady;e.onTaskReady=function(e){u.TaskId=e,h&&h(e)};var f=l>n?"sliceUploadFile":"putObject",m=e.onFileFinish;i.push({api:f,params:e,callback:function(r,o){e.tracker&&e.tracker.report(r,o),m&&m(r,o,u),t&&t(r,o)}}),r._addTasks(i)},uploadFiles:function(e,t){var r=this,n=void 0===e.SliceSize?r.options.SliceSize:e.SliceSize,i=0,a=0,l=s.throttleOnProgress.call(r,a,e.onProgress),u=e.files.length,d=e.onFileFinish,p=Array(u),h=function(e,r,o){l(null,!0),d&&d(e,r,o),p[o.Index]={options:o,error:e,data:r},--u<=0&&t&&t(null,{files:p})},f=[];s.each(e.files,(function(e,t){!function(){var u=e.Body,d=u.size||u.length||0,p={Index:t,TaskId:""};if(!r.options.UseRawKey&&e.Key&&"/"===e.Key.substr(0,1)&&(e.Key=e.Key.substr(1)),i+=d,r.options.EnableReporter){var m=r.options.UseAccelerate||"string"==typeof r.options.Domain&&r.options.Domain.includes("accelerate."),g=d>n?"sliceUploadFile":"putObject";e.tracker=new c({Beacon:r.options.BeaconReporter,clsReporter:r.options.ClsReporter,bucket:e.Bucket,region:e.Region,apiName:"uploadFiles",realApi:g,fileKey:e.Key,fileSize:d,accelerate:m,deepTracker:r.options.DeepTracker,customId:r.options.CustomId,delay:r.options.TrackerDelay})}s.each(e,(function(e,t){"object"!==o(e)&&"function"!=typeof e&&(p[t]=e)}));var y=e.onTaskReady;e.onTaskReady=function(e){p.TaskId=e,y&&y(e)};var v=0,b=e.onProgress;e.onProgress=function(e){a=a-v+e.loaded,v=e.loaded,b&&b(e),l({loaded:a,total:i})};var k=d>n?"sliceUploadFile":"putObject",C=e.onFileFinish;f.push({api:k,params:e,callback:function(t,r){e.tracker&&e.tracker.report(t,r),C&&C(t,r),h&&h(t,r,p)}})}()})),r._addTasks(f)},sliceCopyFile:function(e,t){var r=new a,o=this,c=e.Bucket,l=e.Region,u=e.Key,p=e.CopySource,h=s.getSourceParams.call(this,p);if(h){var f=h.Bucket,m=h.Region,y=decodeURIComponent(h.Key),v=void 0===e.CopySliceSize?o.options.CopySliceSize:e.CopySliceSize;v=Math.max(0,v);var b,k,C=e.CopyChunkSize||this.options.CopyChunkSize,w=this.options.CopyChunkParallelLimit,x=this.options.ChunkRetryTimes+1,S=0,T=0,R={},A={},B={};r.on("copy_slice_complete",(function(r){s.each(e.Headers,(function(e,t){t.toLowerCase().indexOf("x-cos-meta-")}));var a=s.map(r.PartList,(function(e){return{PartNumber:e.PartNumber,ETag:e.ETag}}));i.retry(x,(function(t){o.multipartComplete({Bucket:c,Region:l,Key:u,UploadId:r.UploadId,Parts:a,tracker:e.tracker,calledBySdk:"sliceCopyFile"},t)}),(function(e,o){if(n.removeUsing(r.UploadId),e)return k(null,!0),t(e);n.removeUploadId(r.UploadId),k({loaded:b,total:b},!0),t(null,o)}))})),r.on("get_copy_data_finish",(function(a){var d=n.getCopyFileId(p,R,C,c,u);d&&n.saveUploadId(d,a.UploadId,o.options.UploadIdCacheLimit),n.setUsing(a.UploadId);var h=s.filter(a.PartList,(function(e){return e.Uploaded&&(T+=e.PartNumber>=S&&b%C||C),!e.Uploaded}));i.eachLimit(h,w,(function(t,r){var n=t.PartNumber,s=t.CopySourceRange,d=t.end-t.start;i.retry(x,(function(t){g.call(o,{Bucket:c,Region:l,Key:u,CopySource:p,UploadId:a.UploadId,PartNumber:n,CopySourceRange:s,tracker:e.tracker,calledBySdk:"sliceCopyFile"},t)}),(function(e,o){if(e)return r(e);k({loaded:T+=d,total:b}),t.ETag=o.ETag,r(e||null,o)}))}),(function(e){if(e)return n.removeUsing(a.UploadId),k(null,!0),t(e);r.emit("copy_slice_complete",a)}))})),r.on("get_chunk_size_finish",(function(){var i=function(){o.multipartInit({Bucket:c,Region:l,Key:u,Headers:B,tracker:e.tracker,calledBySdk:"sliceCopyFile"},(function(o,n){if(o)return t(o);e.UploadId=n.UploadId,r.emit("get_copy_data_finish",{UploadId:e.UploadId,PartList:e.PartList})}))},a=n.getCopyFileId(p,R,C,c,u),h=n.getUploadIdList(a);if(!a||!h)return i();!function t(a){if(a>=h.length)return i();var p=h[a];if(n.using[p])return t(a+1);d.call(o,{Bucket:c,Region:l,Key:u,UploadId:p,tracker:e.tracker,calledBySdk:"sliceCopyFile"},(function(o,i){if(o)n.removeUploadId(p),t(a+1);else{if(n.using[p])return t(a+1);var c={},l=0;s.each(i.PartList,(function(e){var t=parseInt(e.Size),r=l+t-1;c[e.PartNumber+"|"+l+"|"+r]=e.ETag,l+=t})),s.each(e.PartList,(function(e){var t=c[e.PartNumber+"|"+e.start+"|"+e.end];t&&(e.ETag=t,e.Uploaded=!0)})),r.emit("get_copy_data_finish",{UploadId:p,PartList:e.PartList})}}))}(0)})),r.on("get_file_size_finish",(function(){if(function(){for(var t=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],r=1048576,n=0;n<t.length&&!(b/(r=1024*t[n]*1024)<=o.options.MaxPartNumber);n++);e.ChunkSize=C=Math.max(C,r),S=Math.ceil(b/C);for(var i=[],a=1;a<=S;a++){var s=(a-1)*C,c=a*C<b?a*C-1:b-1,l={PartNumber:a,start:s,end:c,CopySourceRange:"bytes="+s+"-"+c};i.push(l)}e.PartList=i}(),(B="Replaced"===e.Headers["x-cos-metadata-directive"]?e.Headers:A)["x-cos-storage-class"]=e.Headers["x-cos-storage-class"]||A["x-cos-storage-class"],B=s.clearKey(B),"ARCHIVE"===A["x-cos-storage-class"]||"DEEP_ARCHIVE"===A["x-cos-storage-class"]){var n=A["x-cos-restore"];if(!n||'ongoing-request="true"'===n)return void t(s.error(new Error("Unrestored archive object is not allowed to be copied")))}delete B["x-cos-copy-source"],delete B["x-cos-metadata-directive"],delete B["x-cos-copy-source-If-Modified-Since"],delete B["x-cos-copy-source-If-Unmodified-Since"],delete B["x-cos-copy-source-If-Match"],delete B["x-cos-copy-source-If-None-Match"],r.emit("get_chunk_size_finish")})),o.headObject({Bucket:f,Region:m,Key:y,tracker:e.tracker,calledBySdk:"sliceCopyFile"},(function(n,i){if(n)n.statusCode&&404===n.statusCode?t(s.error(n,{ErrorStatus:y+" Not Exist"})):t(n);else if(void 0!==(b=e.FileSize=i.headers["content-length"])&&b)if(e.tracker&&e.tracker.setParams({httpSize:b}),k=s.throttleOnProgress.call(o,b,e.onProgress),b<=v)e.Headers["x-cos-metadata-directive"]||(e.Headers["x-cos-metadata-directive"]="Copy"),o.putObjectCopy(Object.assign(e,{calledBySdk:"sliceCopyFile"}),(function(e,r){if(e)return k(null,!0),t(e);k({loaded:b,total:b},!0),t(e,r)}));else{var a=i.headers;R=a,A={"Cache-Control":a["cache-control"],"Content-Disposition":a["content-disposition"],"Content-Encoding":a["content-encoding"],"Content-Type":a["content-type"],Expires:a.expires,"x-cos-storage-class":a["x-cos-storage-class"]},s.each(a,(function(e,t){var r="x-cos-meta-";0===t.indexOf(r)&&t.length>11&&(A[t]=e)})),r.emit("get_file_size_finish")}else t(s.error(new Error('get Content-Length error, please add "Content-Length" to CORS ExposeHeader setting.( 获取Content-Length失败,请在CORS ExposeHeader设置中添加Content-Length,请参考文档:https://cloud.tencent.com/document/product/436/13318 )')))}))}else t(s.error(new Error("CopySource format error")))}};e.exports.init=function(e,t){t.transferToTaskMethod(y,"sliceUploadFile"),s.each(y,(function(t,r){e.prototype[r]=s.apiWrapper(r,t)}))}},"./src/async.js":
  94. /*!**********************!*\
  95. !*** ./src/async.js ***!
  96. \**********************/
  97. /*! no static exports found */function(e,t){var r={eachLimit:function(e,t,r,o){if(o=o||function(){},!e.length||t<=0)return o();var n=0,i=0,a=0;!function s(){if(n>=e.length)return o();for(;a<t&&i<e.length;)a+=1,r(e[(i+=1)-1],(function(t){t?(o(t),o=function(){}):(a-=1,(n+=1)>=e.length?o():s())}))}()},retry:function(e,t,r){e<1?r():function o(n){t((function(t,i){t&&n<e?o(n+1):r(t,i)}))}(1)}};e.exports=r},"./src/base.js":
  98. /*!*********************!*\
  99. !*** ./src/base.js ***!
  100. \*********************/
  101. /*! no static exports found */function(e,t,r){var o=r(/*! @babel/runtime/helpers/typeof */"./node_modules/@babel/runtime/helpers/typeof.js"),n=r(/*! ../lib/request */"./lib/request.js"),i=r(/*! ./util */"./src/util.js");function a(e,t,r){var o=i.clone(t.InventoryConfiguration);if(o.OptionalFields){var n=o.OptionalFields||[];o.OptionalFields={Field:n}}if(o.Destination&&o.Destination.COSBucketDestination&&o.Destination.COSBucketDestination.Encryption){var a=o.Destination.COSBucketDestination.Encryption;Object.keys(a).indexOf("SSECOS")>-1&&(a["SSE-COS"]=a.SSECOS,delete a.SSECOS)}var s=i.json2xml({InventoryConfiguration:o}),c=t.Headers;c["Content-Type"]="application/xml",c["Content-MD5"]=i.b64(i.md5(s));var l="PUT"===e?"name/cos:PutBucketInventory":"name/cos:PostBucketInventory";f.call(this,{Action:l,method:e,Bucket:t.Bucket,Region:t.Region,body:s,action:"inventory",qs:{id:t.Id},headers:c,tracker:t.tracker},(function(e,t){return e&&204===e.statusCode?r(null,{statusCode:e.statusCode}):e?r(e):void r(null,{statusCode:t.statusCode,headers:t.headers})}))}function s(e){var t={GrantFullControl:[],GrantWrite:[],GrantRead:[],GrantReadAcp:[],GrantWriteAcp:[],ACL:""},r={FULL_CONTROL:"GrantFullControl",WRITE:"GrantWrite",READ:"GrantRead",READ_ACP:"GrantReadAcp",WRITE_ACP:"GrantWriteAcp"},o=(e&&e.AccessControlList||{}).Grant;o&&(o=i.isArray(o)?o:[o]);var n={READ:0,WRITE:0,FULL_CONTROL:0};return o&&o.length&&i.each(o,(function(o){"qcs::cam::anyone:anyone"===o.Grantee.ID||"http://cam.qcloud.com/groups/global/AllUsers"===o.Grantee.URI?n[o.Permission]=1:o.Grantee.ID!==e.Owner.ID&&t[r[o.Permission]].push('id="'+o.Grantee.ID+'"')})),n.FULL_CONTROL||n.WRITE&&n.READ?t.ACL="public-read-write":n.READ?t.ACL="public-read":t.ACL="private",i.each(r,(function(e){t[e]=c(t[e].join(","))})),t}function c(e){var t,r,o=e.split(","),n={};for(t=0;t<o.length;)n[r=o[t].trim()]?o.splice(t,1):(n[r]=!0,o[t]=r,t++);return o.join(",")}function l(e){var t=e.region||"",r=e.bucket||"",n=r.substr(0,r.lastIndexOf("-")),a=r.substr(r.lastIndexOf("-")+1),s=e.domain,c=e.object;"function"==typeof s&&(s=s({Bucket:r,Region:t})),["http","https"].includes(e.protocol)&&(e.protocol=e.protocol+":");var l=e.protocol||(i.isBrowser&&"object"===("undefined"==typeof location?"undefined":o(location))&&"http:"===location.protocol?"http:":"https:");s||(s=["cn-south","cn-south-2","cn-north","cn-east","cn-southwest","sg"].indexOf(t)>-1?"{Region}.myqcloud.com":"cos.{Region}.myqcloud.com",e.ForcePathStyle||(s="{Bucket}."+s)),s=(s=s.replace(/\{\{AppId\}\}/gi,a).replace(/\{\{Bucket\}\}/gi,n).replace(/\{\{Region\}\}/gi,t).replace(/\{\{.*?\}\}/gi,"")).replace(/\{AppId\}/gi,a).replace(/\{BucketName\}/gi,n).replace(/\{Bucket\}/gi,r).replace(/\{Region\}/gi,t).replace(/\{.*?\}/gi,""),/^[a-zA-Z]+:\/\//.test(s)||(s=l+"//"+s),"/"===s.slice(-1)&&(s=s.slice(0,-1));var u=s;return e.ForcePathStyle&&(u+="/"+r),u+="/",c&&(u+=i.camSafeUrlEncode(c).replace(/%2F/g,"/")),e.isLocation&&(u=u.replace(/^https?:\/\//,"")),u}var u=function(e){if(!e.Bucket||!e.Region)return"";var t=void 0===e.UseAccelerate?this.options.UseAccelerate:e.UseAccelerate;return(e.Url||l({ForcePathStyle:this.options.ForcePathStyle,protocol:this.options.Protocol,domain:this.options.Domain,bucket:e.Bucket,region:t?"accelerate":e.Region})).replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1")};function d(e,t){var r=i.clone(e.Headers),o="";i.each(r,(function(e,t){(""===e||["content-type","cache-control","expires"].indexOf(t.toLowerCase())>-1)&&delete r[t],"host"===t.toLowerCase()&&(o=e)}));var n=!1!==e.ForceSignHost;!o&&e.SignHost&&n&&(r.Host=e.SignHost);var a=!1,s=function(e,r){a||(a=!0,r&&r.XCosSecurityToken&&!r.SecurityToken&&((r=i.clone(r)).SecurityToken=r.XCosSecurityToken,delete r.XCosSecurityToken),t&&t(e,r))},c=this,l=e.Bucket||"",u=e.Region||"",d=e.Key||"";c.options.ForcePathStyle&&l&&(d=l+"/"+d);var p="/"+d,h={},f=e.Scope;if(!f){var m=e.Action||"",g=e.ResourceKey||e.Key||"";f=e.Scope||[{action:m,bucket:l,region:u,prefix:g}]}var y=i.md5(JSON.stringify(f));c._StsCache=c._StsCache||[],function(){var e,t;for(e=c._StsCache.length-1;e>=0;e--){t=c._StsCache[e];var r=Math.round(i.getSkewTime(c.options.SystemClockOffset)/1e3)+30;if(t.StartTime&&r<t.StartTime||r>=t.ExpiredTime)c._StsCache.splice(e,1);else if(!t.ScopeLimit||t.ScopeLimit&&t.ScopeKey===y){h=t;break}}}();var v,b=function(){var t="";h.StartTime&&e.Expires?t=h.StartTime+";"+(h.StartTime+1*e.Expires):h.StartTime&&h.ExpiredTime&&(t=h.StartTime+";"+h.ExpiredTime);var o={Authorization:i.getAuth({SecretId:h.TmpSecretId,SecretKey:h.TmpSecretKey,Method:e.Method,Pathname:p,Query:e.Query,Headers:r,Expires:e.Expires,UseRawKey:c.options.UseRawKey,SystemClockOffset:c.options.SystemClockOffset,KeyTime:t,ForceSignHost:n}),SecurityToken:h.SecurityToken||h.XCosSecurityToken||"",Token:h.Token||"",ClientIP:h.ClientIP||"",ClientUA:h.ClientUA||"",SignFrom:"client"};s(null,o)},k=function(e){if(e.Authorization){var t=!1,r=e.Authorization;if(r)if(r.indexOf(" ")>-1)t=!1;else if(r.indexOf("q-sign-algorithm=")>-1&&r.indexOf("q-ak=")>-1&&r.indexOf("q-sign-time=")>-1&&r.indexOf("q-key-time=")>-1&&r.indexOf("q-url-param-list=")>-1)t=!0;else try{(r=atob(r)).indexOf("a=")>-1&&r.indexOf("k=")>-1&&r.indexOf("t=")>-1&&r.indexOf("r=")>-1&&r.indexOf("b=")>-1&&(t=!0)}catch(o){}if(!t)return i.error(new Error("getAuthorization callback params format error"))}else{if(!e.TmpSecretId)return i.error(new Error('getAuthorization callback params missing "TmpSecretId"'));if(!e.TmpSecretKey)return i.error(new Error('getAuthorization callback params missing "TmpSecretKey"'));if(!e.SecurityToken&&!e.XCosSecurityToken)return i.error(new Error('getAuthorization callback params missing "SecurityToken"'));if(!e.ExpiredTime)return i.error(new Error('getAuthorization callback params missing "ExpiredTime"'));if(e.ExpiredTime&&10!==e.ExpiredTime.toString().length)return i.error(new Error('getAuthorization callback params "ExpiredTime" should be 10 digits'));if(e.StartTime&&10!==e.StartTime.toString().length)return i.error(new Error('getAuthorization callback params "StartTime" should be 10 StartTime'))}return!1};if(h.ExpiredTime&&h.ExpiredTime-i.getSkewTime(c.options.SystemClockOffset)/1e3>60)b();else if(c.options.getAuthorization)c.options.getAuthorization.call(c,{Bucket:l,Region:u,Method:e.Method,Key:d,Pathname:p,Query:e.Query,Headers:r,Scope:f,SystemClockOffset:c.options.SystemClockOffset,ForceSignHost:n},(function(e){"string"==typeof e&&(e={Authorization:e});var t=k(e);if(t)return s(t);e.Authorization?s(null,e):((h=e||{}).Scope=f,h.ScopeKey=y,c._StsCache.push(h),b())}));else{if(!c.options.getSTS)return v={Authorization:i.getAuth({SecretId:e.SecretId||c.options.SecretId,SecretKey:e.SecretKey||c.options.SecretKey,Method:e.Method,Pathname:p,Query:e.Query,Headers:r,Expires:e.Expires,UseRawKey:c.options.UseRawKey,SystemClockOffset:c.options.SystemClockOffset,ForceSignHost:n}),SecurityToken:c.options.SecurityToken||c.options.XCosSecurityToken,SignFrom:"client"},s(null,v),v;c.options.getSTS.call(c,{Bucket:l,Region:u},(function(e){(h=e||{}).Scope=f,h.ScopeKey=y,h.TmpSecretId||(h.TmpSecretId=h.SecretId),h.TmpSecretKey||(h.TmpSecretKey=h.SecretKey);var t=k(h);if(t)return s(t);c._StsCache.push(h),b()}))}return""}function p(e){var t=!1,r=!1,o=!1,n=e.headers&&(e.headers.date||e.headers.Date)||e.error&&e.error.ServerTime;try{var a=e.error.Code,s=e.error.Message;("RequestTimeTooSkewed"===a||"AccessDenied"===a&&"Request has expired"===s)&&(r=!0)}catch(l){}if(e)if(r&&n){var c=Date.parse(n);this.options.CorrectClockSkew&&Math.abs(i.getSkewTime(this.options.SystemClockOffset)-c)>=3e4&&(console.error("error: Local time is too skewed."),this.options.SystemClockOffset=c-Date.now(),t=!0)}else 5===Math.floor(e.statusCode/100)?t=!0:"CORS blocked or network error"===e.message&&(o=!0,t=this.options.AutoSwitchHost);return{canRetry:t,networkError:o}}function h(e){var t=e.requestUrl,r=e.clientCalcSign,o=e.networkError;return!!this.options.AutoSwitchHost&&!!t&&!!r&&!!o&&/^https?:\/\/[^\/]*\.cos\.[^\/]*\.myqcloud\.com(\/.*)?$/.test(t)&&!/^https?:\/\/[^\/]*\.cos\.accelerate\.myqcloud\.com(\/.*)?$/.test(t)}function f(e,t){var r=this;!e.headers&&(e.headers={}),!e.qs&&(e.qs={}),e.VersionId&&(e.qs.versionId=e.VersionId),e.qs=i.clearKey(e.qs),e.headers&&(e.headers=i.clearKey(e.headers)),e.qs&&(e.qs=i.clearKey(e.qs));var o=i.clone(e.qs);e.action&&(o[e.action]="");var n=e.url||e.Url,a=e.SignHost||u.call(this,{Bucket:e.Bucket,Region:e.Region,Url:n}),s=e.tracker;!function n(i){var c=r.options.SystemClockOffset;s&&s.setParams({signStartTime:(new Date).getTime(),httpRetryTimes:i-1}),e.SwitchHost&&(a=a.replace(/myqcloud.com/,"tencentcos.cn")),d.call(r,{Bucket:e.Bucket||"",Region:e.Region||"",Method:e.method,Key:e.Key,Query:o,Headers:e.headers,SignHost:a,Action:e.Action,ResourceKey:e.ResourceKey,Scope:e.Scope,ForceSignHost:r.options.ForceSignHost,SwitchHost:e.SwitchHost},(function(o,a){o?t(o):(s&&s.setParams({signEndTime:(new Date).getTime(),httpStartTime:(new Date).getTime()}),e.AuthData=a,m.call(r,e,(function(o,l){s&&s.setParams({httpEndTime:(new Date).getTime()});var u=!1,d=!1;if(o){var f=p.call(r,o);u=f.canRetry||c!==r.options.SystemClockOffset,d=f.networkError}if(o&&i<2&&u){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 m=h.call(r,{requestUrl:(null==o?void 0:o.url)||"",clientCalcSign:"client"===a.SignFrom,networkError:d});e.SwitchHost=m,n(i+1)}else t(o,l)})))}))}(1)}function m(e,t){var r=this,o=e.TaskId;if(!o||r._isRunningTask(o)){var a=e.Bucket,s=e.Region,c=e.Key,u=e.method||"GET",d=e.Url||e.url,p=e.body,h=e.rawBody;r.options.UseAccelerate&&(s="accelerate"),d=d||l({ForcePathStyle:r.options.ForcePathStyle,protocol:r.options.Protocol,domain:r.options.Domain,bucket:a,region:s,object:c}),e.SwitchHost&&(d=d.replace(/myqcloud.com/,"tencentcos.cn"));var f=c?d:"";e.action&&(d=d+"?"+(i.isIOS_QQ?"".concat(e.action,"="):e.action)),e.qsStr&&(d=d.indexOf("?")>-1?d+"&"+e.qsStr:d+"?"+e.qsStr);var m={method:u,url:d,headers:e.headers,qs:e.qs,body:p},g="x-cos-security-token";if(i.isCIHost(d)&&(g="x-ci-security-token"),m.headers.Authorization=e.AuthData.Authorization,e.AuthData.Token&&(m.headers.token=e.AuthData.Token),e.AuthData.ClientIP&&(m.headers.clientIP=e.AuthData.ClientIP),e.AuthData.ClientUA&&(m.headers.clientUA=e.AuthData.ClientUA),e.AuthData.SecurityToken&&(m.headers[g]=e.AuthData.SecurityToken),m.headers&&(m.headers=i.clearKey(m.headers)),m=i.clearKey(m),e.onProgress&&"function"==typeof e.onProgress){var y=p&&(p.size||p.length)||0;m.onProgress=function(t){if(!o||r._isRunningTask(o)){var n=t?t.loaded:0;e.onProgress({loaded:n,total:y})}}}e.onDownloadProgress&&(m.onDownloadProgress=e.onDownloadProgress),e.DataType&&(m.dataType=e.DataType),this.options.Timeout&&(m.timeout=this.options.Timeout),r.options.ForcePathStyle&&(m.pathStyle=r.options.ForcePathStyle),r.emit("before-send",m);var v,b=m.url.includes("accelerate."),k=m.qs?Object.keys(m.qs).map((function(e){return"".concat(e,"=").concat(m.qs[e])})).join("&"):"",C=k?m.url+"?"+k:m.url;e.tracker&&(e.tracker.setParams({url:C,httpMethod:m.method,accelerate:b,httpSize:(null===(v=m.body)||void 0===v?void 0:v.size)||0}),e.tracker.parent&&!e.tracker.parent.params.url&&e.tracker.parent.setParams({url:f,accelerate:b}));var w=(r.options.Request||n)(m,(function(e){if(!e||"abort"!==e.error){var n={options:m,error:e&&e.error,statusCode:e&&e.statusCode||0,statusMessage:e&&e.statusMessage||"",headers:e&&e.headers||{},body:e&&e.body};r.emit("after-receive",n);var a,s=n.error,c=n.body,l={statusCode:n.statusCode,statusMessage:n.statusMessage,headers:n.headers},u=function(e,n){if(o&&r.off("inner-kill-task",x),!a){a=!0;var s={};l&&l.statusCode&&(s.statusCode=l.statusCode),l&&l.headers&&(s.headers=l.headers),e?(m.url&&(s.url=m.url),m.method&&(s.method=m.method),e=i.extend(e||{},s),t(e,null)):(n=i.extend(n||{},s),t(null,n)),w=null}};if(s)return u(i.error(s));var d,p=l.statusCode,f=2===Math.floor(p/100);if(h&&f)return u(null,{body:c});try{d=c&&c.indexOf("<")>-1&&c.indexOf(">")>-1&&i.xml2json(c)||{}}catch(y){d={}}var g=d&&d.Error;f?u(null,d):g?u(i.error(new Error(g.Message),{code:g.Code,error:g})):p?u(i.error(new Error(l.statusMessage),{code:""+p})):p&&u(i.error(new Error("statusCode error")))}})),x=function e(t){t.TaskId===o&&(w&&w.abort&&w.abort(),r.off("inner-kill-task",e))};o&&r.on("inner-kill-task",x)}}var g={getService:function(e,t){"function"==typeof e&&(t=e,e={});var r=this.options.Protocol||(i.isBrowser&&"object"===("undefined"==typeof location?"undefined":o(location))&&"http:"===location.protocol?"http:":"https:"),n=this.options.ServiceDomain,a=e.AppId||this.options.appId,s=e.Region;n?(n=n.replace(/\{\{AppId\}\}/gi,a||"").replace(/\{\{Region\}\}/gi,s||"").replace(/\{\{.*?\}\}/gi,""),/^[a-zA-Z]+:\/\//.test(n)||(n=r+"//"+n),"/"===n.slice(-1)&&(n=n.slice(0,-1))):n=s?r+"//cos."+s+".myqcloud.com":r+"//service.cos.myqcloud.com";var c="",l=s?"cos."+s+".myqcloud.com":"service.cos.myqcloud.com";l===n.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1")&&(c=l),f.call(this,{Action:"name/cos:GetService",url:n,method:"GET",headers:e.Headers,SignHost:c,tracker:e.tracker},(function(e,r){if(e)return t(e);var o=r&&r.ListAllMyBucketsResult&&r.ListAllMyBucketsResult.Buckets&&r.ListAllMyBucketsResult.Buckets.Bucket||[];o=i.isArray(o)?o:[o];var n=r&&r.ListAllMyBucketsResult&&r.ListAllMyBucketsResult.Owner||{};t(null,{Buckets:o,Owner:n,statusCode:r.statusCode,headers:r.headers})}))},putBucket:function(e,t){var r=this,o="";if(e.BucketAZConfig){var n={BucketAZConfig:e.BucketAZConfig};o=i.json2xml({CreateBucketConfiguration:n})}f.call(this,{Action:"name/cos:PutBucket",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,body:o,tracker:e.tracker},(function(o,n){if(o)return t(o);var i=l({protocol:r.options.Protocol,domain:r.options.Domain,bucket:e.Bucket,region:e.Region,isLocation:!0});t(null,{Location:i,statusCode:n.statusCode,headers:n.headers})}))},headBucket:function(e,t){f.call(this,{Action:"name/cos:HeadBucket",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,method:"HEAD",tracker:e.tracker},t)},getBucket:function(e,t){var r={};r.prefix=e.Prefix||"",r.delimiter=e.Delimiter,r.marker=e.Marker,r["max-keys"]=e.MaxKeys,r["encoding-type"]=e.EncodingType,f.call(this,{Action:"name/cos:GetBucket",ResourceKey:r.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:r,tracker:e.tracker},(function(e,r){if(e)return t(e);var o=r.ListBucketResult||{},n=o.Contents||[],a=o.CommonPrefixes||[];n=i.isArray(n)?n:[n],a=i.isArray(a)?a:[a];var s=i.clone(o);i.extend(s,{Contents:n,CommonPrefixes:a,statusCode:r.statusCode,headers:r.headers}),t(null,s)}))},deleteBucket:function(e,t){f.call(this,{Action:"name/cos:DeleteBucket",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,method:"DELETE",tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},putBucketAcl:function(e,t){var r=e.Headers,o="";if(e.AccessControlPolicy){var n=i.clone(e.AccessControlPolicy||{}),a=n.Grants||n.Grant;a=i.isArray(a)?a:[a],delete n.Grant,delete n.Grants,n.AccessControlList={Grant:a},o=i.json2xml({AccessControlPolicy:n}),r["Content-Type"]="application/xml",r["Content-MD5"]=i.b64(i.md5(o))}i.each(r,(function(e,t){0===t.indexOf("x-cos-grant-")&&(r[t]=c(r[t]))})),f.call(this,{Action:"name/cos:PutBucketACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:r,action:"acl",body:o,tracker:e.tracker},(function(e,r){if(e)return t(e);t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketAcl:function(e,t){f.call(this,{Action:"name/cos:GetBucketACL",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"acl",tracker:e.tracker},(function(e,r){if(e)return t(e);var o=r.AccessControlPolicy||{},n=o.Owner||{},a=o.AccessControlList.Grant||[];a=i.isArray(a)?a:[a];var c=s(o);r.headers&&r.headers["x-cos-acl"]&&(c.ACL=r.headers["x-cos-acl"]),c=i.extend(c,{Owner:n,Grants:a,statusCode:r.statusCode,headers:r.headers}),t(null,c)}))},putBucketCors:function(e,t){var r=(e.CORSConfiguration||{}).CORSRules||e.CORSRules||[];r=i.clone(i.isArray(r)?r:[r]),i.each(r,(function(e){i.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],(function(t){var r=t+"s",o=e[r]||e[t]||[];delete e[r],e[t]=i.isArray(o)?o:[o]}))}));var o={CORSRule:r};e.ResponseVary&&(o.ResponseVary=e.ResponseVary);var n=i.json2xml({CORSConfiguration:o}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.b64(i.md5(n)),f.call(this,{Action:"name/cos:PutBucketCORS",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"cors",headers:a,tracker:e.tracker},(function(e,r){if(e)return t(e);t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketCors:function(e,t){f.call(this,{Action:"name/cos:GetBucketCORS",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"cors",tracker:e.tracker},(function(e,r){if(e)if(404===e.statusCode&&e.error&&"NoSuchCORSConfiguration"===e.error.Code){var o={CORSRules:[],statusCode:e.statusCode};e.headers&&(o.headers=e.headers),t(null,o)}else t(e);else{var n=r.CORSConfiguration||{},a=n.CORSRules||n.CORSRule||[];a=i.clone(i.isArray(a)?a:[a]);var s=n.ResponseVary;i.each(a,(function(e){i.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],(function(t){var r=t+"s",o=e[r]||e[t]||[];delete e[t],e[r]=i.isArray(o)?o:[o]}))})),t(null,{CORSRules:a,ResponseVary:s,statusCode:r.statusCode,headers:r.headers})}}))},deleteBucketCors:function(e,t){f.call(this,{Action:"name/cos:DeleteBucketCORS",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"cors",tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode||e.statusCode,headers:r.headers})}))},getBucketLocation:function(e,t){f.call(this,{Action:"name/cos:GetBucketLocation",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"location",tracker:e.tracker},t)},getBucketPolicy:function(e,t){f.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(e,r){if(e)return e.statusCode&&403===e.statusCode?t(i.error(e,{ErrorStatus:"Access Denied"})):e.statusCode&&405===e.statusCode?t(i.error(e,{ErrorStatus:"Method Not Allowed"})):e.statusCode&&404===e.statusCode?t(i.error(e,{ErrorStatus:"Policy Not Found"})):t(e);var o={};try{o=JSON.parse(r.body)}catch(n){}t(null,{Policy:o,statusCode:r.statusCode,headers:r.headers})}))},putBucketPolicy:function(e,t){var r=e.Policy;try{"string"==typeof r&&(r=JSON.parse(r))}catch(a){}if(!r||"string"==typeof r)return t(i.error(new Error("Policy format error")));var o=JSON.stringify(r);r.version||(r.version="2.0");var n=e.Headers;n["Content-Type"]="application/json",n["Content-MD5"]=i.b64(i.md5(o)),f.call(this,{Action:"name/cos:PutBucketPolicy",method:"PUT",Bucket:e.Bucket,Region:e.Region,action:"policy",body:o,headers:n,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},deleteBucketPolicy:function(e,t){f.call(this,{Action:"name/cos:DeleteBucketPolicy",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"policy",tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode||e.statusCode,headers:r.headers})}))},putBucketTagging:function(e,t){var r=e.Tagging||{},o=r.TagSet||r.Tags||e.Tags||[];o=i.clone(i.isArray(o)?o:[o]);var n=i.json2xml({Tagging:{TagSet:{Tag:o}}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.b64(i.md5(n)),f.call(this,{Action:"name/cos:PutBucketTagging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"tagging",headers:a,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketTagging:function(e,t){f.call(this,{Action:"name/cos:GetBucketTagging",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging",tracker:e.tracker},(function(e,r){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"NoSuchTagSet"!==e.error.Code)t(e);else{var o={Tags:[],statusCode:e.statusCode};e.headers&&(o.headers=e.headers),t(null,o)}else{var n=[];try{n=r.Tagging.TagSet.Tag||[]}catch(a){}n=i.clone(i.isArray(n)?n:[n]),t(null,{Tags:n,statusCode:r.statusCode,headers:r.headers})}}))},deleteBucketTagging:function(e,t){f.call(this,{Action:"name/cos:DeleteBucketTagging",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging",tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},putBucketLifecycle:function(e,t){var r=(e.LifecycleConfiguration||{}).Rules||e.Rules||[];r=i.clone(r);var o=i.json2xml({LifecycleConfiguration:{Rule:r}}),n=e.Headers;n["Content-Type"]="application/xml",n["Content-MD5"]=i.b64(i.md5(o)),f.call(this,{Action:"name/cos:PutBucketLifecycle",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,action:"lifecycle",headers:n,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketLifecycle:function(e,t){f.call(this,{Action:"name/cos:GetBucketLifecycle",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"lifecycle",tracker:e.tracker},(function(e,r){if(e)if(404===e.statusCode&&e.error&&"NoSuchLifecycleConfiguration"===e.error.Code){var o={Rules:[],statusCode:e.statusCode};e.headers&&(o.headers=e.headers),t(null,o)}else t(e);else{var n=[];try{n=r.LifecycleConfiguration.Rule||[]}catch(a){}n=i.clone(i.isArray(n)?n:[n]),t(null,{Rules:n,statusCode:r.statusCode,headers:r.headers})}}))},deleteBucketLifecycle:function(e,t){f.call(this,{Action:"name/cos:DeleteBucketLifecycle",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"lifecycle",tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},putBucketVersioning:function(e,t){if(e.VersioningConfiguration){var r=e.VersioningConfiguration||{},o=i.json2xml({VersioningConfiguration:r}),n=e.Headers;n["Content-Type"]="application/xml",n["Content-MD5"]=i.b64(i.md5(o)),f.call(this,{Action:"name/cos:PutBucketVersioning",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,action:"versioning",headers:n,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))}else t(i.error(new Error("missing param VersioningConfiguration")))},getBucketVersioning:function(e,t){f.call(this,{Action:"name/cos:GetBucketVersioning",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"versioning",tracker:e.tracker},(function(e,r){e||!r.VersioningConfiguration&&(r.VersioningConfiguration={}),t(e,r)}))},putBucketReplication:function(e,t){var r=i.clone(e.ReplicationConfiguration),o=i.json2xml({ReplicationConfiguration:r});o=(o=o.replace(/<(\/?)Rules>/gi,"<$1Rule>")).replace(/<(\/?)Tags>/gi,"<$1Tag>");var n=e.Headers;n["Content-Type"]="application/xml",n["Content-MD5"]=i.b64(i.md5(o)),f.call(this,{Action:"name/cos:PutBucketReplication",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,action:"replication",headers:n,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketReplication:function(e,t){f.call(this,{Action:"name/cos:GetBucketReplication",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"replication",tracker:e.tracker},(function(e,r){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"ReplicationConfigurationnotFoundError"!==e.error.Code)t(e);else{var o={ReplicationConfiguration:{Rules:[]},statusCode:e.statusCode};e.headers&&(o.headers=e.headers),t(null,o)}else!r.ReplicationConfiguration&&(r.ReplicationConfiguration={}),r.ReplicationConfiguration.Rule&&(r.ReplicationConfiguration.Rules=i.makeArray(r.ReplicationConfiguration.Rule),delete r.ReplicationConfiguration.Rule),t(e,r)}))},deleteBucketReplication:function(e,t){f.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"replication",tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},putBucketWebsite:function(e,t){if(e.WebsiteConfiguration){var r=i.clone(e.WebsiteConfiguration||{}),o=r.RoutingRules||r.RoutingRule||[];o=i.isArray(o)?o:[o],delete r.RoutingRule,delete r.RoutingRules,o.length&&(r.RoutingRules={RoutingRule:o});var n=i.json2xml({WebsiteConfiguration:r}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.b64(i.md5(n)),f.call(this,{Action:"name/cos:PutBucketWebsite",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"website",headers:a,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))}else t(i.error(new Error("missing param WebsiteConfiguration")))},getBucketWebsite:function(e,t){f.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(e,r){if(e)if(404===e.statusCode&&"NoSuchWebsiteConfiguration"===e.error.Code){var o={WebsiteConfiguration:{},statusCode:e.statusCode};e.headers&&(o.headers=e.headers),t(null,o)}else t(e);else{var n=r.WebsiteConfiguration||{};if(n.RoutingRules){var a=i.clone(n.RoutingRules.RoutingRule||[]);a=i.makeArray(a),n.RoutingRules=a}t(null,{WebsiteConfiguration:n,statusCode:r.statusCode,headers:r.headers})}}))},deleteBucketWebsite:function(e,t){f.call(this,{Action:"name/cos:DeleteBucketWebsite",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"website",tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},putBucketReferer:function(e,t){if(e.RefererConfiguration){var r=i.clone(e.RefererConfiguration||{}),o=r.DomainList||{},n=o.Domains||o.Domain||[];(n=i.isArray(n)?n:[n]).length&&(r.DomainList={Domain:n});var a=i.json2xml({RefererConfiguration:r}),s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=i.b64(i.md5(a)),f.call(this,{Action:"name/cos:PutBucketReferer",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:a,action:"referer",headers:s,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))}else t(i.error(new Error("missing param RefererConfiguration")))},getBucketReferer:function(e,t){f.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(e,r){if(e)if(404===e.statusCode&&"NoSuchRefererConfiguration"===e.error.Code){var o={WebsiteConfiguration:{},statusCode:e.statusCode};e.headers&&(o.headers=e.headers),t(null,o)}else t(e);else{var n=r.RefererConfiguration||{};if(n.DomainList){var a=i.makeArray(n.DomainList.Domain||[]);n.DomainList={Domains:a}}t(null,{RefererConfiguration:n,statusCode:r.statusCode,headers:r.headers})}}))},putBucketDomain:function(e,t){var r=(e.DomainConfiguration||{}).DomainRule||e.DomainRule||[];r=i.clone(r);var o=i.json2xml({DomainConfiguration:{DomainRule:r}}),n=e.Headers;n["Content-Type"]="application/xml",n["Content-MD5"]=i.b64(i.md5(o)),f.call(this,{Action:"name/cos:PutBucketDomain",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,action:"domain",headers:n,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketDomain:function(e,t){f.call(this,{Action:"name/cos:GetBucketDomain",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"domain",tracker:e.tracker},(function(e,r){if(e)return t(e);var o=[];try{o=r.DomainConfiguration.DomainRule||[]}catch(n){}o=i.clone(i.isArray(o)?o:[o]),t(null,{DomainRule:o,statusCode:r.statusCode,headers:r.headers})}))},deleteBucketDomain:function(e,t){f.call(this,{Action:"name/cos:DeleteBucketDomain",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"domain",tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},putBucketOrigin:function(e,t){var r=(e.OriginConfiguration||{}).OriginRule||e.OriginRule||[];r=i.clone(r);var o=i.json2xml({OriginConfiguration:{OriginRule:r}}),n=e.Headers;n["Content-Type"]="application/xml",n["Content-MD5"]=i.b64(i.md5(o)),f.call(this,{Action:"name/cos:PutBucketOrigin",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,action:"origin",headers:n,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketOrigin:function(e,t){f.call(this,{Action:"name/cos:GetBucketOrigin",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"origin",tracker:e.tracker},(function(e,r){if(e)return t(e);var o=[];try{o=r.OriginConfiguration.OriginRule||[]}catch(n){}o=i.clone(i.isArray(o)?o:[o]),t(null,{OriginRule:o,statusCode:r.statusCode,headers:r.headers})}))},deleteBucketOrigin:function(e,t){f.call(this,{Action:"name/cos:DeleteBucketOrigin",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"origin",tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},putBucketLogging:function(e,t){var r=i.json2xml({BucketLoggingStatus:e.BucketLoggingStatus||""}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=i.b64(i.md5(r)),f.call(this,{Action:"name/cos:PutBucketLogging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:r,action:"logging",headers:o,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketLogging:function(e,t){f.call(this,{Action:"name/cos:GetBucketLogging",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"logging",tracker:e.tracker},(function(e,r){if(e)return t(e);t(null,{BucketLoggingStatus:r.BucketLoggingStatus,statusCode:r.statusCode,headers:r.headers})}))},putBucketInventory:function(e,t){return a.call(this,"PUT",e,t)},postBucketInventory:function(e,t){return a.call(this,"POST",e,t)},getBucketInventory:function(e,t){f.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(e,r){if(e)return t(e);var o=r.InventoryConfiguration;if(o&&o.OptionalFields&&o.OptionalFields.Field){var n=o.OptionalFields.Field;i.isArray(n)||(n=[n]),o.OptionalFields=n}if(o.Destination&&o.Destination.COSBucketDestination&&o.Destination.COSBucketDestination.Encryption){var a=o.Destination.COSBucketDestination.Encryption;Object.keys(a).indexOf("SSE-COS")>-1&&(a.SSECOS=a["SSE-COS"],delete a["SSE-COS"])}t(null,{InventoryConfiguration:o,statusCode:r.statusCode,headers:r.headers})}))},listBucketInventory:function(e,t){f.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(e,r){if(e)return t(e);var o=r.ListInventoryConfigurationResult,n=o.InventoryConfiguration||[];n=i.isArray(n)?n:[n],delete o.InventoryConfiguration,i.each(n,(function(e){if(e&&e.OptionalFields&&e.OptionalFields.Field){var t=e.OptionalFields.Field;i.isArray(t)||(t=[t]),e.OptionalFields=t}if(e.Destination&&e.Destination.COSBucketDestination&&e.Destination.COSBucketDestination.Encryption){var r=e.Destination.COSBucketDestination.Encryption;Object.keys(r).indexOf("SSE-COS")>-1&&(r.SSECOS=r["SSE-COS"],delete r["SSE-COS"])}})),o.InventoryConfigurations=n,i.extend(o,{statusCode:r.statusCode,headers:r.headers}),t(null,o)}))},deleteBucketInventory:function(e,t){f.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(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},putBucketAccelerate:function(e,t){if(e.AccelerateConfiguration){var r={AccelerateConfiguration:e.AccelerateConfiguration||{}},o=i.json2xml(r),n={"Content-Type":"application/xml"};n["Content-MD5"]=i.b64(i.md5(o)),f.call(this,{Action:"name/cos:PutBucketAccelerate",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,action:"accelerate",headers:n,tracker:e.tracker},(function(e,r){if(e)return t(e);t(null,{statusCode:r.statusCode,headers:r.headers})}))}else t(i.error(new Error("missing param AccelerateConfiguration")))},getBucketAccelerate:function(e,t){f.call(this,{Action:"name/cos:GetBucketAccelerate",method:"GET",Bucket:e.Bucket,Region:e.Region,action:"accelerate",tracker:e.tracker},(function(e,r){e||!r.AccelerateConfiguration&&(r.AccelerateConfiguration={}),t(e,r)}))},putBucketEncryption:function(e,t){var r=e.ServerSideEncryptionConfiguration||{},o=r.Rule||r.Rules||[],n=i.json2xml({ServerSideEncryptionConfiguration:{Rule:o}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.b64(i.md5(n)),f.call(this,{Action:"name/cos:PutBucketEncryption",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"encryption",headers:a,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketEncryption:function(e,t){f.call(this,{Action:"name/cos:GetBucketEncryption",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"encryption",tracker:e.tracker},(function(e,r){if(e)if(404===e.statusCode&&"NoSuchEncryptionConfiguration"===e.code){var o={EncryptionConfiguration:{Rules:[]},statusCode:e.statusCode};e.headers&&(o.headers=e.headers),t(null,o)}else t(e);else{var n=i.makeArray(r.EncryptionConfiguration&&r.EncryptionConfiguration.Rule||[]);r.EncryptionConfiguration={Rules:n},t(e,r)}}))},deleteBucketEncryption:function(e,t){f.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"encryption",tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getObject:function(e,t){var r=e.Query||{},o=e.QueryString||"",n=i.throttleOnProgress.call(this,0,e.onProgress),a=e.tracker;a&&a.setParams({signStartTime:(new Date).getTime()}),r["response-content-type"]=e.ResponseContentType,r["response-content-language"]=e.ResponseContentLanguage,r["response-expires"]=e.ResponseExpires,r["response-cache-control"]=e.ResponseCacheControl,r["response-content-disposition"]=e.ResponseContentDisposition,r["response-content-encoding"]=e.ResponseContentEncoding,f.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:r,qsStr:o,rawBody:!0,onDownloadProgress:n,tracker:a},(function(r,o){if(n(null,!0),r){var a=r.statusCode;return e.Headers["If-Modified-Since"]&&a&&304===a?t(null,{NotModified:!0}):t(r)}t(null,{Body:o.body,ETag:i.attr(o.headers,"etag",""),statusCode:o.statusCode,headers:o.headers})}))},headObject:function(e,t){f.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(r,o){if(r){var n=r.statusCode;return e.Headers["If-Modified-Since"]&&n&&304===n?t(null,{NotModified:!0,statusCode:n}):t(r)}o.ETag=i.attr(o.headers,"etag",""),t(null,o)}))},listObjectVersions:function(e,t){var r={};r.prefix=e.Prefix||"",r.delimiter=e.Delimiter,r["key-marker"]=e.KeyMarker,r["version-id-marker"]=e.VersionIdMarker,r["max-keys"]=e.MaxKeys,r["encoding-type"]=e.EncodingType,f.call(this,{Action:"name/cos:GetBucketObjectVersions",ResourceKey:r.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:r,action:"versions",tracker:e.tracker},(function(e,r){if(e)return t(e);var o=r.ListVersionsResult||{},n=o.DeleteMarker||[];n=i.isArray(n)?n:[n];var a=o.Version||[];a=i.isArray(a)?a:[a];var s=i.clone(o);delete s.DeleteMarker,delete s.Version,i.extend(s,{DeleteMarkers:n,Versions:a,statusCode:r.statusCode,headers:r.headers}),t(null,s)}))},putObject:function(e,t){var r=this,o=e.ContentLength,n=i.throttleOnProgress.call(r,o,e.onProgress),a=e.Headers;a["Cache-Control"]||a["cache-control"]||(a["Cache-Control"]=""),a["Content-Type"]||a["content-type"]||(a["Content-Type"]=e.Body&&e.Body.type||"");var s=e.UploadAddMetaMd5||r.options.UploadAddMetaMd5||r.options.UploadCheckContentMd5,c=e.tracker;s&&c&&c.setParams({md5StartTime:(new Date).getTime()}),i.getBodyMd5(s,e.Body,(function(s){s&&(c&&c.setParams({md5EndTime:(new Date).getTime()}),r.options.UploadCheckContentMd5&&(a["Content-MD5"]=i.b64(s)),(e.UploadAddMetaMd5||r.options.UploadAddMetaMd5)&&(a["x-cos-meta-md5"]=s)),void 0!==e.ContentLength&&(a["Content-Length"]=e.ContentLength),n(null,!0),f.call(r,{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:n,tracker:c},(function(a,s){if(a)return n(null,!0),t(a);n({loaded:o,total:o},!0);var c=l({ForcePathStyle:r.options.ForcePathStyle,protocol:r.options.Protocol,domain:r.options.Domain,bucket:e.Bucket,region:r.options.UseAccelerate?"accelerate":e.Region,object:e.Key});c=c.substr(c.indexOf("://")+3),s.Location=c,s.ETag=i.attr(s.headers,"etag",""),t(null,s)}))}),e.onHashProgress)},deleteObject:function(e,t){f.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(e,r){if(e){var o=e.statusCode;return o&&404===o?t(null,{BucketNotFound:!0,statusCode:o}):t(e)}t(null,{statusCode:r.statusCode,headers:r.headers})}))},getObjectAcl:function(e,t){var r={};e.VersionId&&(r.versionId=e.VersionId),f.call(this,{Action:"name/cos:GetObjectACL",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:r,action:"acl",tracker:e.tracker},(function(e,r){if(e)return t(e);var o=r.AccessControlPolicy||{},n=o.Owner||{},a=o.AccessControlList&&o.AccessControlList.Grant||[];a=i.isArray(a)?a:[a];var c=s(o);delete c.GrantWrite,r.headers&&r.headers["x-cos-acl"]&&(c.ACL=r.headers["x-cos-acl"]),c=i.extend(c,{Owner:n,Grants:a,statusCode:r.statusCode,headers:r.headers}),t(null,c)}))},putObjectAcl:function(e,t){var r=e.Headers,o="";if(e.AccessControlPolicy){var n=i.clone(e.AccessControlPolicy||{}),a=n.Grants||n.Grant;a=i.isArray(a)?a:[a],delete n.Grant,delete n.Grants,n.AccessControlList={Grant:a},o=i.json2xml({AccessControlPolicy:n}),r["Content-Type"]="application/xml",r["Content-MD5"]=i.b64(i.md5(o))}i.each(r,(function(e,t){0===t.indexOf("x-cos-grant-")&&(r[t]=c(r[t]))})),f.call(this,{Action:"name/cos:PutObjectACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"acl",headers:r,body:o,tracker:e.tracker},(function(e,r){if(e)return t(e);t(null,{statusCode:r.statusCode,headers:r.headers})}))},optionsObject:function(e,t){var r=e.Headers;r.Origin=e.Origin,r["Access-Control-Request-Method"]=e.AccessControlRequestMethod,r["Access-Control-Request-Headers"]=e.AccessControlRequestHeaders,f.call(this,{Action:"name/cos:OptionsObject",method:"OPTIONS",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:r,tracker:e.tracker},(function(e,r){if(e)return e.statusCode&&403===e.statusCode?t(null,{OptionsForbidden:!0,statusCode:e.statusCode}):t(e);var o=r.headers||{};t(null,{AccessControlAllowOrigin:o["access-control-allow-origin"],AccessControlAllowMethods:o["access-control-allow-methods"],AccessControlAllowHeaders:o["access-control-allow-headers"],AccessControlExposeHeaders:o["access-control-expose-headers"],AccessControlMaxAge:o["access-control-max-age"],statusCode:r.statusCode,headers:r.headers})}))},putObjectCopy:function(e,t){var r=this,o=e.Headers;o["Cache-Control"]||o["cache-control"]||(o["Cache-Control"]="");var n=e.CopySource||"",a=i.getSourceParams.call(this,n);if(a){var s=a.Bucket,c=a.Region,u=decodeURIComponent(a.Key);f.call(this,{Scope:[{action:"name/cos:GetObject",bucket:s,region:c,prefix:u},{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(o,n){if(o)return t(o);var a=i.clone(n.CopyObjectResult||{}),s=l({ForcePathStyle:r.options.ForcePathStyle,protocol:r.options.Protocol,domain:r.options.Domain,bucket:e.Bucket,region:e.Region,object:e.Key,isLocation:!0});i.extend(a,{Location:s,statusCode:n.statusCode,headers:n.headers}),t(null,a)}))}else t(i.error(new Error("CopySource format error")))},deleteMultipleObject:function(e,t){var r=e.Objects||[],o=e.Quiet;r=i.isArray(r)?r:[r];var n=i.json2xml({Delete:{Object:r,Quiet:o||!1}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.b64(i.md5(n));var s=i.map(r,(function(t){return{action:"name/cos:DeleteObject",bucket:e.Bucket,region:e.Region,prefix:t.Key}}));f.call(this,{Scope:s,method:"POST",Bucket:e.Bucket,Region:e.Region,body:n,action:"delete",headers:a,tracker:e.tracker},(function(e,r){if(e)return t(e);var o=r.DeleteResult||{},n=o.Deleted||[],a=o.Error||[];n=i.isArray(n)?n:[n],a=i.isArray(a)?a:[a];var s=i.clone(o);i.extend(s,{Error:a,Deleted:n,statusCode:r.statusCode,headers:r.headers}),t(null,s)}))},restoreObject:function(e,t){var r=e.Headers;if(e.RestoreRequest){var o=e.RestoreRequest||{},n=i.json2xml({RestoreRequest:o});r["Content-Type"]="application/xml",r["Content-MD5"]=i.b64(i.md5(n)),f.call(this,{Action:"name/cos:RestoreObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,body:n,action:"restore",headers:r,tracker:e.tracker},t)}else t(i.error(new Error("missing param RestoreRequest")))},putObjectTagging:function(e,t){var r=e.Tagging||{},o=r.TagSet||r.Tags||e.Tags||[];o=i.clone(i.isArray(o)?o:[o]);var n=i.json2xml({Tagging:{TagSet:{Tag:o}}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.b64(i.md5(n)),f.call(this,{Action:"name/cos:PutObjectTagging",method:"PUT",Bucket:e.Bucket,Key:e.Key,Region:e.Region,body:n,action:"tagging",headers:a,VersionId:e.VersionId,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getObjectTagging:function(e,t){f.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(e,r){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"NoSuchTagSet"!==e.error.Code)t(e);else{var o={Tags:[],statusCode:e.statusCode};e.headers&&(o.headers=e.headers),t(null,o)}else{var n=[];try{n=r.Tagging.TagSet.Tag||[]}catch(a){}n=i.clone(i.isArray(n)?n:[n]),t(null,{Tags:n,statusCode:r.statusCode,headers:r.headers})}}))},deleteObjectTagging:function(e,t){f.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(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},selectObjectContent:function(e,t){if(!e.SelectType)return t(i.error(new Error("missing param SelectType")));var r=e.SelectRequest||{},o=i.json2xml({SelectRequest:r}),n=e.Headers;n["Content-Type"]="application/xml",n["Content-MD5"]=i.b64(i.md5(o)),f.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:o,DataType:"arraybuffer",rawBody:!0,tracker:e.tracker},(function(e,r){if(e&&204===e.statusCode)return t(null,{statusCode:e.statusCode});if(e)return t(e);var o=i.parseSelectPayload(r.body);t(null,{statusCode:r.statusCode,headers:r.headers,Body:o.body,Payload:o.payload})}))},appendObject:function(e,t){var r=e.Headers;r["Cache-Control"]||r["cache-control"]||(r["Cache-Control"]=""),r["Content-Type"]||r["content-type"]||(r["Content-Type"]=e.Body&&e.Body.type||""),f.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(e,r){if(e)return t(e);t(null,r)}))},uploadPartCopy:function(e,t){var r=e.CopySource||"",o=i.getSourceParams.call(this,r);if(o){var n=o.Bucket,a=o.Region,s=decodeURIComponent(o.Key);f.call(this,{Scope:[{action:"name/cos:GetObject",bucket:n,region:a,prefix:s},{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(e,r){if(e)return t(e);var o=i.clone(r.CopyPartResult||{});i.extend(o,{statusCode:r.statusCode,headers:r.headers}),t(null,o)}))}else t(i.error(new Error("CopySource format error")))},multipartInit:function(e,t){var r=this,o=e.Headers,n=e.tracker;o["Cache-Control"]||o["cache-control"]||(o["Cache-Control"]=""),o["Content-Type"]||o["content-type"]||(o["Content-Type"]=e.Body&&e.Body.type||"");var a=e.Body&&(e.UploadAddMetaMd5||r.options.UploadAddMetaMd5);a&&n&&n.setParams({md5StartTime:(new Date).getTime()}),i.getBodyMd5(a,e.Body,(function(o){o&&(e.Headers["x-cos-meta-md5"]=o),a&&n&&n.setParams({md5EndTime:(new Date).getTime()}),f.call(r,{Action:"name/cos:InitiateMultipartUpload",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"uploads",headers:e.Headers,qs:e.Query,tracker:n},(function(e,r){return e?(n&&n.parent&&n.parent.setParams({errorNode:"multipartInit"}),t(e)):(r=i.clone(r||{}))&&r.InitiateMultipartUploadResult?t(null,i.extend(r.InitiateMultipartUploadResult,{statusCode:r.statusCode,headers:r.headers})):void t(null,r)}))}),e.onHashProgress)},multipartUpload:function(e,t){var r=this;i.getFileSize("multipartUpload",e,(function(){var o=e.tracker,n=r.options.UploadCheckContentMd5;n&&o&&o.setParams({md5StartTime:(new Date).getTime()}),i.getBodyMd5(n,e.Body,(function(a){a&&(e.Headers["Content-MD5"]=i.b64(a)),n&&o&&o.setParams({md5EndTime:(new Date).getTime()}),o&&o.setParams({partNumber:e.PartNumber}),f.call(r,{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:o},(function(e,r){if(e)return o&&o.parent&&o.parent.setParams({errorNode:"multipartUpload"}),t(e);t(null,{ETag:i.attr(r.headers,"etag",""),statusCode:r.statusCode,headers:r.headers})}))}))}))},multipartComplete:function(e,t){for(var r=this,o=e.UploadId,n=e.Parts,a=e.tracker,s=0,c=n.length;s<c;s++)n[s].ETag&&0===n[s].ETag.indexOf('"')||(n[s].ETag='"'+n[s].ETag+'"');var u=i.json2xml({CompleteMultipartUpload:{Part:n}});u=u.replace(/\n\s*/g,"");var d=e.Headers;d["Content-Type"]="application/xml",d["Content-MD5"]=i.b64(i.md5(u)),f.call(this,{Action:"name/cos:CompleteMultipartUpload",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,qs:{uploadId:o},body:u,headers:d,tracker:a},(function(o,n){if(o)return a&&a.parent&&a.parent.setParams({errorNode:"multipartComplete"}),t(o);var s=l({ForcePathStyle:r.options.ForcePathStyle,protocol:r.options.Protocol,domain:r.options.Domain,bucket:e.Bucket,region:e.Region,object:e.Key,isLocation:!0}),c=n.CompleteMultipartUploadResult||{};c.ProcessResults&&c&&c.ProcessResults&&(c.UploadResult={OriginalInfo:{Key:c.Key,Location:s,ETag:c.ETag,ImageInfo:c.ImageInfo},ProcessResults:c.ProcessResults},delete c.ImageInfo,delete c.ProcessResults);var u=i.extend(c,{Location:s,statusCode:n.statusCode,headers:n.headers});t(null,u)}))},multipartList:function(e,t){var r={};r.delimiter=e.Delimiter,r["encoding-type"]=e.EncodingType,r.prefix=e.Prefix||"",r["max-uploads"]=e.MaxUploads,r["key-marker"]=e.KeyMarker,r["upload-id-marker"]=e.UploadIdMarker,r=i.clearKey(r);var o=e.tracker;o&&o.setParams({signStartTime:(new Date).getTime()}),f.call(this,{Action:"name/cos:ListMultipartUploads",ResourceKey:r.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:r,action:"uploads",tracker:o},(function(e,r){if(e)return o&&o.parent&&o.parent.setParams({errorNode:"multipartList"}),t(e);if(r&&r.ListMultipartUploadsResult){var n=r.ListMultipartUploadsResult.Upload||[];n=i.isArray(n)?n:[n],r.ListMultipartUploadsResult.Upload=n}var a=i.clone(r.ListMultipartUploadsResult||{});i.extend(a,{statusCode:r.statusCode,headers:r.headers}),t(null,a)}))},multipartListPart:function(e,t){var r={},o=e.tracker;r.uploadId=e.UploadId,r["encoding-type"]=e.EncodingType,r["max-parts"]=e.MaxParts,r["part-number-marker"]=e.PartNumberMarker,f.call(this,{Action:"name/cos:ListParts",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:r,tracker:o},(function(e,r){if(e)return o&&o.parent&&o.parent.setParams({errorNode:"multipartListPart"}),t(e);var n=r.ListPartsResult||{},a=n.Part||[];a=i.isArray(a)?a:[a],n.Part=a;var s=i.clone(n);i.extend(s,{statusCode:r.statusCode,headers:r.headers}),t(null,s)}))},multipartAbort:function(e,t){var r={};r.uploadId=e.UploadId,f.call(this,{Action:"name/cos:AbortMultipartUpload",method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:r,tracker:e.tracker},(function(e,r){if(e)return t(e);t(null,{statusCode:r.statusCode,headers:r.headers})}))},request:function(e,t){f.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(e,r){if(e)return t(e);r&&r.body&&(r.Body=r.body,delete r.body),t(e,r)}))},getObjectUrl:function(e,t){var r=this,o=void 0===e.UseAccelerate?r.options.UseAccelerate:e.UseAccelerate,n=l({ForcePathStyle:r.options.ForcePathStyle,protocol:e.Protocol||r.options.Protocol,domain:e.Domain||r.options.Domain,bucket:e.Bucket,region:o?"accelerate":e.Region,object:e.Key}),a="";e.Query&&(a+=i.obj2str(e.Query)),e.QueryString&&(a+=(a?"&":"")+e.QueryString);var s=n;if(void 0!==e.Sign&&!e.Sign)return a&&(s+="?"+a),t(null,{Url:s}),s;var c=u.call(this,{Bucket:e.Bucket,Region:e.Region,UseAccelerate:e.UseAccelerate,Url:n}),p=d.call(this,{Action:"PUT"===(e.Method||"").toUpperCase()?"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:c,ForceSignHost:!1!==e.ForceSignHost&&r.options.ForceSignHost},(function(e,r){if(t)if(e)t(e);else{var o=n;o+="?"+(r.Authorization.indexOf("q-signature")>-1?function(e){var t=e.match(/q-url-param-list.*?(?=&)/g)[0],r="q-url-param-list="+encodeURIComponent(t.replace(/q-url-param-list=/,"")).toLowerCase(),o=new RegExp(t,"g");return e.replace(o,r)}(r.Authorization):"sign="+encodeURIComponent(r.Authorization)),r.SecurityToken&&(o+="&x-cos-security-token="+r.SecurityToken),r.ClientIP&&(o+="&clientIP="+r.ClientIP),r.ClientUA&&(o+="&clientUA="+r.ClientUA),r.Token&&(o+="&token="+r.Token),a&&(o+="&"+a),setTimeout((function(){t(null,{Url:o})}))}}));return p?(s+="?"+p.Authorization+(p.SecurityToken?"&x-cos-security-token="+p.SecurityToken:""),a&&(s+="&"+a)):a&&(s+="?"+a),s},getAuth:function(e){return i.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:this.options.UseRawKey,SystemClockOffset:this.options.SystemClockOffset})}};e.exports.init=function(e,t){t.transferToTaskMethod(g,"putObject"),i.each(g,(function(t,r){e.prototype[r]=i.apiWrapper(r,t),function(e,t,r){i.each(["Cors","Acl"],(function(o){if(e.slice(-o.length)===o){var n=e.slice(0,-o.length)+o.toUpperCase(),a=i.apiWrapper(e,t),s=!1;r[n]=function(){!s&&console.warn("warning: cos."+n+" has been deprecated. Please Use cos."+e+" instead."),s=!0,a.apply(this,arguments)}}}))}(r,t,e.prototype)}))}},"./src/cos.js":
  102. /*!********************!*\
  103. !*** ./src/cos.js ***!
  104. \********************/
  105. /*! no static exports found */function(e,t,r){var o=r(/*! ./util */"./src/util.js"),n=r(/*! ./event */"./src/event.js"),i=r(/*! ./task */"./src/task.js"),a=r(/*! ./base */"./src/base.js"),s=r(/*! ./advance */"./src/advance.js"),c=r(/*! ../package.json */"./package.json"),l={AppId:"",SecretId:"",SecretKey:"",SecurityToken:"",ChunkRetryTimes:2,FileParallelLimit:3,ChunkParallelLimit:3,ChunkSize:1048576,SliceSize:1048576,CopyChunkParallelLimit:20,CopyChunkSize:10485760,CopySliceSize:10485760,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},u=function(e){if(this.options=o.extend(o.clone(l),e||{}),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(1048576,this.options.ChunkSize),this.options.CopyChunkParallelLimit=Math.max(1,this.options.CopyChunkParallelLimit),this.options.CopyChunkSize=Math.max(1048576,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")),o.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");n.init(this),i.init(this)};a.init(u,i),s.init(u,i),u.util={md5:o.md5,xml2json:o.xml2json,json2xml:o.json2xml,encodeBase64:o.encodeBase64},u.getAuthorization=o.getAuth,u.version=c.version,e.exports=u},"./src/event.js":
  106. /*!**********************!*\
  107. !*** ./src/event.js ***!
  108. \**********************/
  109. /*! no static exports found */function(e,t){var r=function(e){var t={},r=function(e){return!t[e]&&(t[e]=[]),t[e]};e.on=function(e,t){"task-list-update"===e&&console.warn('warning: Event "'+e+'" has been deprecated. Please use "list-update" instead.'),r(e).push(t)},e.off=function(e,t){for(var o=r(e),n=o.length-1;n>=0;n--)t===o[n]&&o.splice(n,1)},e.emit=function(e,t){for(var o=r(e).map((function(e){return e})),n=0;n<o.length;n++)o[n](t)}};e.exports.init=r,e.exports.EventProxy=function(){r(this)}},"./src/session.js":
  110. /*!************************!*\
  111. !*** ./src/session.js ***!
  112. \************************/
  113. /*! no static exports found */function(e,t,r){var o,n,i=r(/*! ./util */"./src/util.js"),a="cos_sdk_upload_cache",s=function(){try{var e=JSON.parse(localStorage.getItem(a))}catch(t){}e||(e=[]),o=e},c=function(){try{o.length?localStorage.setItem(a,JSON.stringify(o)):localStorage.removeItem(a)}catch(e){}},l=function(){if(!o){s.call(this);for(var e=!1,t=Math.round(Date.now()/1e3),r=o.length-1;r>=0;r--){var n=o[r][2];(!n||n+2592e3<t)&&(o.splice(r,1),e=!0)}e&&c()}},u=function(){n||(n=setTimeout((function(){c(),n=null}),400))},d={using:{},setUsing:function(e){d.using[e]=!0},removeUsing:function(e){delete d.using[e]},getFileId:function(e,t,r,o){return e.name&&e.size&&e.lastModifiedDate&&t?i.md5([e.name,e.size,e.lastModifiedDate,t,r,o].join("::")):null},getCopyFileId:function(e,t,r,o,n){var a=t["content-length"],s=t.etag||"",c=t["last-modified"];return e&&r?i.md5([e,a,s,c,r,o,n].join("::")):null},getUploadIdList:function(e){if(!e)return null;l.call(this);for(var t=[],r=0;r<o.length;r++)o[r][0]===e&&t.push(o[r][1]);return t.length?t:null},saveUploadId:function(e,t,r){if(l.call(this),e){for(var n=o.length-1;n>=0;n--){var i=o[n];i[0]===e&&i[1]===t&&o.splice(n,1)}o.unshift([e,t,Math.round(Date.now()/1e3)]),o.length>r&&o.splice(r),u()}},removeUploadId:function(e){l.call(this),delete d.using[e];for(var t=o.length-1;t>=0;t--)o[t][1]===e&&o.splice(t,1);u()}};e.exports=d},"./src/task.js":
  114. /*!*********************!*\
  115. !*** ./src/task.js ***!
  116. \*********************/
  117. /*! no static exports found */function(e,t,r){var o=r(/*! ./session */"./src/session.js"),n=r(/*! ./util */"./src/util.js"),i={};e.exports.transferToTaskMethod=function(e,t){i[t]=e[t],e[t]=function(e,r){e.SkipTask?i[t].call(this,e,r):this._addTask(t,e,r)}},e.exports.init=function(e){var t,r,a=[],s={},c=0,l=0,u=function(e){var t={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&&(t.FilePath=e.FilePath),e._custom&&(t._custom=e._custom),t},d=(r=function(){t=0,e.emit("task-list-update",{list:n.map(a,u)}),e.emit("list-update",{list:n.map(a,u)})},function(){t||(t=setTimeout(r))}),p=function(){if(!(a.length<=e.options.UploadQueueSize)){for(var t=0;t<l&&t<a.length&&a.length>e.options.UploadQueueSize;){var r="waiting"===a[t].state||"checking"===a[t].state||"uploading"===a[t].state;a[t]&&r?t++:(s[a[t].id]&&delete s[a[t].id],a.splice(t,1),l--)}d()}},h=function t(){if(!(c>=e.options.FileParallelLimit)){for(;a[l]&&"waiting"!==a[l].state;)l++;if(!(l>=a.length)){var r=a[l];l++,c++,r.state="checking",r.params.onTaskStart&&r.params.onTaskStart(u(r)),!r.params.UploadData&&(r.params.UploadData={});var o=n.formatParams(r.api,r.params);i[r.api].call(e,o,(function(o,n){e._isRunningTask(r.id)&&("checking"!==r.state&&"uploading"!==r.state||(r.state=o?"error":"success",o&&(r.error=o),c--,d(),t(),r.callback&&r.callback(o,n),"success"===r.state&&(r.params&&(delete r.params.UploadData,delete r.params.Body,delete r.params),delete r.callback)),p())})),d(),setTimeout(t)}}},f=function(t,r){var n=s[t];if(n){var i=n&&"waiting"===n.state,a=n&&("checking"===n.state||"uploading"===n.state);if("canceled"===r&&"canceled"!==n.state||"paused"===r&&i||"paused"===r&&a){if("paused"===r&&n.params.Body&&"function"==typeof n.params.Body.pipe)return void console.error("stream not support pause");n.state=r,e.emit("inner-kill-task",{TaskId:t,toState:r});try{var l=n&&n.params&&n.params.UploadData.UploadId}catch(u){}"canceled"===r&&l&&o.removeUsing(l),d(),a&&(c--,h()),"canceled"===r&&(n.params&&(delete n.params.UploadData,delete n.params.Body,delete n.params),delete n.callback)}p()}};e._addTasks=function(t){n.each(t,(function(t){e._addTask(t.api,t.params,t.callback,!0)})),d()};var m=!0;e._addTask=function(t,r,o,i){r=n.formatParams(t,r);var c=n.uuid();r.TaskId=c,r.onTaskReady&&r.onTaskReady(c),r.TaskReady&&(r.TaskReady(c),m&&console.warn('warning: Param "TaskReady" has been deprecated. Please use "onTaskReady" instead.'),m=!1);var l={params:r,callback:o,api:t,index:a.length,id:c,Bucket:r.Bucket,Region:r.Region,Key:r.Key,FilePath:r.FilePath||"",state:"waiting",loaded:0,size:0,speed:0,percent:0,hashPercent:0,error:null,_custom:r._custom},u=r.onHashProgress;r.onHashProgress=function(t){e._isRunningTask(l.id)&&(l.hashPercent=t.percent,u&&u(t),d())};var f=r.onProgress;return r.onProgress=function(t){e._isRunningTask(l.id)&&("checking"===l.state&&(l.state="uploading"),l.loaded=t.loaded,l.speed=t.speed,l.percent=t.percent,f&&f(t),d())},n.getFileSize(t,r,(function(e,t){if(e)return o(n.error(e));s[c]=l,a.push(l),l.size=t,!i&&d(),h(),p()})),c},e._isRunningTask=function(e){var t=s[e];return!(!t||"checking"!==t.state&&"uploading"!==t.state)},e.getTaskList=function(){return n.map(a,u)},e.cancelTask=function(e){f(e,"canceled")},e.pauseTask=function(e){f(e,"paused")},e.restartTask=function(e){var t=s[e];!t||"paused"!==t.state&&"error"!==t.state||(t.state="waiting",d(),l=Math.min(l,t.index),h())},e.isUploadRunning=function(){return c||l<a.length}}},"./src/tracker.js":
  118. /*!************************!*\
  119. !*** ./src/tracker.js ***!
  120. \************************/
  121. /*! no static exports found */function(e,t,r){var o=r(/*! @babel/runtime/helpers/classCallCheck */"./node_modules/@babel/runtime/helpers/classCallCheck.js"),n=r(/*! @babel/runtime/helpers/createClass */"./node_modules/@babel/runtime/helpers/createClass.js"),i=r(/*! @babel/runtime/helpers/typeof */"./node_modules/@babel/runtime/helpers/typeof.js"),a=r(/*! ../package.json */"./package.json"),s=null,c=function(e){return!e||e<0?0:(e/1e3).toFixed(3)},l=function(){var e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()},u=function(){if("object"===("undefined"==typeof navigator?"undefined":i(navigator))){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;return(null==e?void 0:e.type)||(null==e?void 0:e.effectiveType)||"unknown"}return"unknown"},d=function(){return"object"===("undefined"==typeof location?"undefined":i(location))?location.protocol.replace(/:/,""):"unknown protocol"},p=function(){if("object"!==("undefined"==typeof navigator?"undefined":i(navigator)))return"unknown os";var e=navigator.userAgent.toLowerCase(),t=/macintosh|mac os x/i.test(navigator.userAgent);return e.indexOf("win32")>=0||e.indexOf("wow32")>=0?"win32":e.indexOf("win64")>=0||e.indexOf("wow64")>=0?"win64":t?"mac":"unknown os"},h=function(){return!("object"!==("undefined"==typeof navigator?"undefined":i(navigator))||!navigator.userAgent.match(/(Android|Adr|Linux)/i))},f=function(){return!("object"!==("undefined"==typeof navigator?"undefined":i(navigator))||!navigator.userAgent.match(/(iPhone|iPod|iPad|iOS)/i))},m=function(){return"object"!==("undefined"==typeof navigator?"undefined":i(navigator))?"unknown device":navigator.userAgent},g=!("object"!==("undefined"==typeof navigator?"undefined":i(navigator))||!navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)),y=h()?"android":f?"ios":"other_mobile",v=p(),b=g?y:v,k=m(),C=d();function w(e){return e.replace(/([A-Z])/g,"_$1").toLowerCase()}var x=function(){function e(t){o(this,e);var r=t.parent,n=t.traceId,i=t.bucket,c=t.region,u=t.apiName,d=t.realApi,p=t.httpMethod,h=t.fileKey,f=t.fileSize,m=t.accelerate,g=t.customId,y=t.delay,v=t.deepTracker,w=t.Beacon,x=t.clsReporter,S=i&&i.substr(i.lastIndexOf("-")+1)||"";this.parent=r,this.deepTracker=v,this.delay=y,x&&!this.clsReporter&&(this.clsReporter=x),this.params={sdkVersionName:"cos-js-sdk-v5",sdkVersionCode:a.version,osName:b,networkType:"",requestName:u||"",requestResult:"",realApi:d,bucket:i,region:c,accelerate:m,httpMethod:p,url:"",host:"",httpDomain:"",requestPath:h||"",userAgent:k,networkProtocol:C,errorType:"",errorCode:"",errorName:"",errorMessage:"",errorRequestId:"",errorHttpCode:0,errorServiceName:"",errorNode:"",httpTookTime:0,httpSize:f||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:n||l(),appid:S,partNumber:0,httpRetryTimes:0,customId:g||"",partTime:0},w&&(this.beacon=function(e,t){if(!s){if("function"!=typeof e)throw new Error("Beacon not found");s=new e({appkey:"0WEB05PY6MHRGK0U",versionCode:a.version,channelID:"js_sdk",openid:"openid",unionid:"unid",strictMode:!1,delay:t,sessionDuration:6e4})}return s}(w,y))}return n(e,[{key:"formatResult",value:function(e,t){var r,o,n,i,a,s,l=(new Date).getTime(),d=u(),p=e?(null==e?void 0:e.code)||(null==e||null===(r=e.error)||void 0===r?void 0:r.code)||(null==e||null===(o=e.error)||void 0===o?void 0:o.Code):"",h=e?(null==e?void 0:e.message)||(null==e||null===(n=e.error)||void 0===n?void 0:n.message)||(null==e||null===(i=e.error)||void 0===i?void 0:i.Message):"",f=h,m=e?(null==e?void 0:e.resource)||(null==e||null===(a=e.error)||void 0===a?void 0:a.resource)||(null==e||null===(s=e.error)||void 0===s?void 0:s.Resource):"",g=e?null==e?void 0:e.statusCode:t.statusCode,y=e?(null==e?void 0:e.headers)&&(null==e?void 0:e.headers["x-cos-request-id"]):(null==t?void 0:t.headers)&&(null==t?void 0:t.headers["x-cos-request-id"]),v=e?y?"Server":"Client":"";"getObject"===this.params.requestName&&(this.params.httpSize=t?t.headers&&t.headers["content-length"]:0);var b="sliceUploadFile"===this.params.realApi,k="sliceCopyFile"===this.params.realApi;if(b||k){var C=this.params.httpSize/1024/this.params.partTime;Object.assign(this.params,{httpSpeed:C<0?0:C.toFixed(3)})}else{var w=l-this.params.startTime,x=this.params.httpEndTime-this.params.httpStartTime,S=this.params.httpSize/1024/(x/1e3),T=this.params.md5EndTime-this.params.md5StartTime,R=this.params.signEndTime-this.params.signStartTime;this.parent&&(this.parent.addParamValue("httpTookTime",c(x)),this.parent.addParamValue("httpFullTime",c(w)),this.parent.addParamValue("httpMd5",c(T)),this.parent.addParamValue("httpSign",c(R)),["multipartUpload","uploadPartCopy","putObjectCopy"].includes(this.params.requestName)&&this.parent.addParamValue("partTime",c(x))),Object.assign(this.params,{httpFullTime:c(w),httpMd5:c(T),httpSign:c(R),httpTookTime:c(x),httpSpeed:S<0?0:S.toFixed(3)})}if(Object.assign(this.params,{networkType:d,requestResult:e?"Failure":"Success",errorType:v,errorCode:p,errorHttpCode:g,errorName:f,errorMessage:h,errorServiceName:m,errorRequestId:y}),!e||p&&h||(this.params.fullError=e?JSON.stringify(e):""),this.params.url){try{var A=/^http(s)?:\/\/(.*?)\//.exec(this.params.url);this.params.host=A[2]}catch(B){this.params.host=this.params.url}this.params.httpDomain=this.params.host}}},{key:"report",value:function(e,t){if(this.beacon||this.clsReporter){this.formatResult(e,t);var r=function(e){var t,r={},o=["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"],n=[].concat(o,["errorNode","errorCode","errorName","errorMessage","errorRequestId","errorHttpCode","errorServiceName","errorType","fullError"]),i="Success"===e.requestResult?o:n;for(var a in e)i.includes(a)&&(r[w(a)]=e[a]);return r.request_name=e.realApi?(t=e.realApi,["putObject","sliceUploadFile","uploadFile","uploadFiles"].includes(t)?"UploadTask":"getObject"===t?"DownloadTask":["putObjectCopy","sliceCopyFile"].includes(t)?"CopyTask":t):e.requestName,r}(this.params);console.log(r),this.beacon&&this.sendEventsToBeacon(r),this.clsReporter&&this.sendEventsToCLS(r)}}},{key:"setParams",value:function(e){Object.assign(this.params,e)}},{key:"addParamValue",value:function(e,t){this.params[e]=(+this.params[e]+ +t).toFixed(3)}},{key:"sendEventsToBeacon",value:function(e){if("sliceUploadFile"!==this.params.requestName&&"sliceUploadFile"!==this.params.realApi||this.deepTracker){var t="qcloud_track_cos_sdk";0===this.delay?this.beacon&&this.beacon.onDirectUserAction(t,e):this.beacon&&this.beacon.onUserAction(t,e)}}},{key:"sendEventsToCLS",value:function(e){var t=!(0!==this.delay);this.clsReporter.log(e,t)}},{key:"generateSubTracker",value:function(t){return Object.assign(t,{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(t)}}]),e}();e.exports=x},"./src/util.js":
  122. /*!*********************!*\
  123. !*** ./src/util.js ***!
  124. \*********************/
  125. /*! no static exports found */function(e,t,r){(function(t){var o=r(/*! @babel/runtime/helpers/typeof */"./node_modules/@babel/runtime/helpers/typeof.js"),n=r(/*! ../lib/md5 */"./lib/md5.js"),i=r(/*! ../lib/crypto */"./lib/crypto.js"),a=r(/*! ../lib/xml2json */"./lib/xml2json.js"),s=r(/*! ../lib/json2xml */"./lib/json2xml.js"),c=r(/*! ../lib/base64 */"./lib/base64.js"),l=r(/*! ./tracker */"./src/tracker.js");function u(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function d(e,t){var r=[];for(var o in e)e.hasOwnProperty(o)&&r.push(t?u(o).toLowerCase():o);return r.sort((function(e,t){return(e=e.toLowerCase())===(t=t.toLowerCase())?0:e>t?1:-1}))}var p,h=["cache-control","content-disposition","content-encoding","content-length","content-md5","expect","expires","host","if-match","if-modified-since","if-none-match","if-unmodified-since","origin","range","transfer-encoding","pic-operations"],f=function(e,t,r){var o=t/8,n=e.slice(r,r+o);return new Uint8Array(n).reverse(),new{8:Uint8Array,16:Uint16Array,32:Uint32Array}[t](n)[0]},m=function(e,t,r,o){var n=e.slice(t,r),i="";return new Uint8Array(n).forEach((function(e){i+=String.fromCharCode(e)})),o&&(i=decodeURIComponent(escape(i))),i},g=function(){},y=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&void 0!==e[r]&&null!==e[r]&&(t[r]=e[r]);return t},v=(p=function(e,t){e=e.split("."),t=t.split(".");for(var r=0;r<t.length;r++)if(e[r]!==t[r])return parseInt(e[r])>parseInt(t[r])?1:-1;return 0},function(e){if(!e)return!1;var t=(e.match(/Chrome\/([.\d]+)/)||[])[1],r=(e.match(/QBCore\/([.\d]+)/)||[])[1],o=(e.match(/QQBrowser\/([.\d]+)/)||[])[1];return t&&p(t,"53.0.2785.116")<0&&r&&p(r,"3.53.991.400")<0&&o&&p(o,"9.0.2524.400")<=0||!1}("undefined"!=typeof navigator&&navigator.userAgent)),b=1048576;function k(e){return S(e,(function(e){return"object"===o(e)&&null!==e?k(e):e}))}function C(e,t){return x(t,(function(r,o){e[o]=t[o]})),e}function w(e){return e instanceof Array}function x(e,t){for(var r in e)e.hasOwnProperty(r)&&t(e[r],r)}function S(e,t){var r=w(e)?[]:{};for(var o in e)e.hasOwnProperty(o)&&(r[o]=t(e[o],o));return r}var T=function(e,t){var r=t.Bucket,o=t.Region,n=t.Key,i=this.options.Domain,a=!i||"string"==typeof i&&i.indexOf("{Bucket}")>-1,s=!i||"string"==typeof i&&i.indexOf("{Region}")>-1;if(e.indexOf("Bucket")>-1||"deleteMultipleObject"===e||"multipartList"===e||"listObjectVersions"===e){if(a&&!r)return"Bucket";if(s&&!o)return"Region"}else if(e.indexOf("Object")>-1||e.indexOf("multipart")>-1||"sliceUploadFile"===e||"abortUploadTask"===e||"uploadFile"===e){if(a&&!r)return"Bucket";if(s&&!o)return"Region";if(!n)return"Key"}return!1},R=function(e,t){if(t=C({},t),"getAuth"!==e&&"getV4Auth"!==e&&"getObjectUrl"!==e){var r=t.Headers||{};t&&"object"===o(t)&&(function(){for(var e in t)t.hasOwnProperty(e)&&e.indexOf("x-cos-")>-1&&(r[e]=t[e])}(),D.each({"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"},(function(e,o){void 0!==t[e]&&(r[o]=t[e])})),t.Headers=y(r))}return t},A=function(e){return Date.now()+(e||0)},B="object"===("undefined"==typeof navigator?"undefined":o(navigator))&&!!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),E="object"===("undefined"==typeof navigator?"undefined":o(navigator))&&/\sQQ/i.test(navigator.userAgent),D={noop:g,formatParams:R,apiWrapper:function(e,t){return function(r,o){var n,i=this;if("function"==typeof r&&(o=r,r={}),r=R(e,r),i.options.EnableReporter)if("sliceUploadFile"===r.calledBySdk||"sliceCopyFile"===r.calledBySdk)n=r.tracker&&r.tracker.generateSubTracker({apiName:e});else if(["uploadFile","uploadFiles"].includes(e))n=null;else{var a=0;r.Body&&(a="string"==typeof r.Body?r.Body.length:r.Body.size||r.Body.byteLength||0);var s=i.options.UseAccelerate||"string"==typeof i.options.Domain&&i.options.Domain.includes("accelerate.");n=new l({Beacon:i.options.BeaconReporter,clsReporter:i.options.ClsReporter,bucket:r.Bucket,region:r.Region,apiName:e,realApi:e,accelerate:s,fileKey:r.Key,fileSize:a,deepTracker:i.options.DeepTracker,customId:i.options.CustomId,delay:i.options.TrackerDelay})}r.tracker=n;var c=function(e){return e&&e.headers&&(e.headers["x-cos-request-id"]&&(e.RequestId=e.headers["x-cos-request-id"]),e.headers["x-ci-request-id"]&&(e.RequestId=e.headers["x-ci-request-id"]),e.headers["x-cos-version-id"]&&(e.VersionId=e.headers["x-cos-version-id"]),e.headers["x-cos-delete-marker"]&&(e.DeleteMarker=e.headers["x-cos-delete-marker"])),e},u=function(e,t){n&&n.report(e,t),o&&o(c(e),c(t))},d=function(){if("getService"!==e&&"abortUploadTask"!==e){var t=T.call(i,e,r);if(t)return"missing param "+t;if(r.Region){if(i.options.CompatibilityMode){if(!/^([a-z\d-.]+)$/.test(r.Region))return"Region format error."}else{if(r.Region.indexOf("cos.")>-1)return'param Region should not be start with "cos."';if(!/^([a-z\d-]+)$/.test(r.Region))return"Region format error."}i.options.CompatibilityMode||-1!==r.Region.indexOf("-")||"yfb"===r.Region||"default"===r.Region||"accelerate"===r.Region||console.warn("warning: param Region format error, find help here: https://cloud.tencent.com/document/product/436/6224")}if(r.Bucket){if(!/^([a-z\d-]+)-(\d+)$/.test(r.Bucket))if(r.AppId)r.Bucket=r.Bucket+"-"+r.AppId;else{if(!i.options.AppId)return'Bucket should format as "test-1250000000".';r.Bucket=r.Bucket+"-"+i.options.AppId}r.AppId&&(console.warn('warning: AppId has been deprecated, Please put it at the end of parameter Bucket(E.g Bucket:"test-1250000000" ).'),delete r.AppId)}!i.options.UseRawKey&&r.Key&&"/"===r.Key.substr(0,1)&&(r.Key=r.Key.substr(1))}}(),p=["getAuth","getObjectUrl"].includes(e);if("function"==typeof Promise&&!p&&!o)return new Promise((function(e,n){if(o=function(t,r){t?n(t):e(r)},d)return u(D.error(new Error(d)));t.call(i,r,u)}));if(d)return u(D.error(new Error(d)));var h=t.call(i,r,u);return p?h:void 0}},xml2json:a,json2xml:s,md5:n,clearKey:y,fileSlice:function(e,t,r,o,n){var i;if(e.slice?i=e.slice(t,r):e.mozSlice?i=e.mozSlice(t,r):e.webkitSlice&&(i=e.webkitSlice(t,r)),o&&v){var a=new FileReader;a.onload=function(e){i=null,n(new Blob([a.result]))},a.readAsArrayBuffer(i)}else n(i)},getBodyMd5:function(e,t,r,o){r=r||g,e?"string"==typeof t?r(D.md5(t,!0)):Blob&&t instanceof Blob?D.getFileMd5(t,(function(e,t){r(t)}),o):r():r()},getFileMd5:function(e,t,r){var o=e.size,i=0,a=n.getCtx();!function n(s){if(s>=o){var c=a.digest("hex");t(null,c)}else{var l=Math.min(o,s+b);D.fileSlice(e,s,l,!1,(function(e){!function(e,t){var r,o=new FileReader;FileReader.prototype.readAsBinaryString?(r=FileReader.prototype.readAsBinaryString,o.onload=function(){t(this.result)}):FileReader.prototype.readAsArrayBuffer?r=function(e){var r="",o=new FileReader;o.onload=function(e){for(var n=new Uint8Array(o.result),i=n.byteLength,a=0;a<i;a++)r+=String.fromCharCode(n[a]);t(r)},o.readAsArrayBuffer(e)}:console.error("FileReader not support readAsBinaryString"),r.call(o,e)}(e,(function(t){e=null,a=a.update(t,!0),i+=t.length,t=null,r&&r({loaded:i,total:o,percent:Math.round(i/o*1e4)/1e4}),n(s+b)}))}))}}(0)},b64:function(e){var t,r,o,n="";for(t=0,r=e.length/2;t<r;t++)o=parseInt(e[2*t]+e[2*t+1],16),n+=String.fromCharCode(o);return btoa(n)},extend:C,isArray:w,isInArray:function(e,t){for(var r=!1,o=0;o<e.length;o++)if(t===e[o]){r=!0;break}return r},makeArray:function(e){return w(e)?e:[e]},each:x,map:S,filter:function(e,t){var r=w(e),o=r?[]:{};for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)&&(r?o.push(e[n]):o[n]=e[n]);return o},clone:k,attr:function(e,t,r){return e&&t in e?e[t]:r},uuid:function(){var e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()},camSafeUrlEncode:u,throttleOnProgress:function(e,t){var r,o,n=this,i=0,a=0,s=Date.now();function c(){if(o=0,t&&"function"==typeof t){r=Date.now();var n,c=Math.max(0,Math.round((a-i)/((r-s)/1e3)*100)/100)||0;n=0===a&&0===e?1:Math.floor(a/e*100)/100||0,s=r,i=a;try{t({loaded:a,total:e,speed:c,percent:n})}catch(l){}}}return function(t,r){if(t&&(a=t.loaded,e=t.total),r)clearTimeout(o),c();else{if(o)return;o=setTimeout(c,n.options.ProgressInterval)}}},getFileSize:function(e,t,r){var o;"string"==typeof t.Body?t.Body=new Blob([t.Body],{type:"text/plain"}):t.Body instanceof ArrayBuffer&&(t.Body=new Blob([t.Body])),t.Body&&(t.Body instanceof Blob||"[object File]"===t.Body.toString()||"[object Blob]"===t.Body.toString())?(o=t.Body.size,t.ContentLength=o,r(null,o)):r(D.error(new Error("params body format error, Only allow File|Blob|String.")))},getSkewTime:A,error:function(e,t){var r=e;return e.message=e.message||null,"string"==typeof t?(e.error=t,e.message=t):"object"===o(t)&&null!==t&&(C(e,t),(t.code||t.name)&&(e.code=t.code||t.name),t.message&&(e.message=t.message),t.stack&&(e.stack=t.stack)),"function"==typeof Object.defineProperty&&(Object.defineProperty(e,"name",{writable:!0,enumerable:!1}),Object.defineProperty(e,"message",{enumerable:!0})),e.name=t&&t.name||e.name||e.code||"Error",e.code||(e.code=e.name),e.error||(e.error=k(r)),e},obj2str:function(e,t){var r,o,n,i=[],a=d(e);for(r=0;r<a.length;r++)n=void 0===e[o=a[r]]||null===e[o]?"":""+e[o],o=t?u(o).toLowerCase():u(o),n=u(n)||"",i.push(o+"="+n);return i.join("&")},getAuth:function(e){var t,r=(e=e||{}).SecretId,o=e.SecretKey,n=e.KeyTime,a=(e.method||e.Method||"get").toLowerCase(),s=k(e.Query||e.params||{}),c=function(e){var t={};for(var r in e){var o=r.toLowerCase();(o.indexOf("x-cos-")>-1||h.indexOf(o)>-1)&&(t[r]=e[r])}return t}(k(e.Headers||e.headers||{})),l=e.Key||"";e.UseRawKey?t=e.Pathname||e.pathname||"/"+l:0!==(t=e.Pathname||e.pathname||l).indexOf("/")&&(t="/"+t);var u=!1!==e.ForceSignHost;if(!c.Host&&!c.host&&e.Bucket&&e.Region&&u&&(c.Host=e.Bucket+".cos."+e.Region+".myqcloud.com"),!r)throw new Error("missing param SecretId");if(!o)throw new Error("missing param SecretKey");var p=Math.round(A(e.SystemClockOffset)/1e3)-1,f=p,m=e.Expires||e.expires;f+=void 0===m?900:1*m||0;var g=r,y=n||p+";"+f,v=n||p+";"+f,b=d(c,!0).join(";").toLowerCase(),C=d(s,!0).join(";").toLowerCase(),w=i.HmacSHA1(v,o).toString(),x=[a,t,D.obj2str(s,!0),D.obj2str(c,!0),""].join("\n"),S=["sha1",y,i.SHA1(x).toString(),""].join("\n");return["q-sign-algorithm=sha1","q-ak="+g,"q-sign-time="+y,"q-key-time="+v,"q-header-list="+b,"q-url-param-list="+C,"q-signature="+i.HmacSHA1(S,w).toString()].join("&")},parseSelectPayload:function(e){for(var t={},r=m(e),o={records:[]};e.byteLength;){var n,i=f(e,32,0),a=f(e,32,4),s=i-a-16,c=0;for(e=e.slice(12);c<a;){var l=f(e,8,c),u=m(e,c+1,c+1+l),d=f(e,16,c+l+2),p=m(e,c+l+4,c+l+4+d);t[u]=p,c+=l+4+d}if("Records"===t[":event-type"])n=m(e,c,c+s,!0),o.records.push(n);else if("Stats"===t[":event-type"])n=m(e,c,c+s,!0),o.stats=D.xml2json(n).Stats;else if("error"===t[":event-type"]){var h=t[":error-code"],g=t[":error-message"],y=new Error(g);y.message=g,y.name=y.code=h,o.error=y}e=e.slice(c+s+4)}return{payload:o.records.join(""),body:r}},getSourceParams:function(e){var t=this.options.CopySourceParser;if(t)return t(e);var r=e.match(/^([^.]+-\d+)\.cos(v6|-cdc|-cdz|-internal)?\.([^.]+)\.((myqcloud\.com)|(tencentcos\.cn))\/(.+)$/);return r?{Bucket:r[1],Region:r[3],Key:r[7]}:null},isBrowser:!0,isNode:function(){return"object"!==("undefined"==typeof window?"undefined":o(window))&&"object"===(void 0===t?"undefined":o(t))&&!("object"===("undefined"==typeof globalThis?"undefined":o(globalThis))&&("DedicatedWorkerGlobalScope"===globalThis.constructor.name||globalThis.FileReaderSync))},isCIHost:function(e){return/^https?:\/\/([^/]+\.)?ci\.[^/]+/.test(e)},isIOS_QQ:B&&E,encodeBase64:function(e,t){var r=c.encode(e);return t&&(r=r.replaceAll("+","-").replaceAll("/","_").replaceAll("=","")),r}};e.exports=D}).call(this,r(/*! ./../node_modules/process/browser.js */"./node_modules/process/browser.js"))}})},e.exports=r()}(b);const k=r(b.exports),C="daya-online-1303457149",w=e("g",(async e=>{const{bucketName:t,filename:r,postData:n}=e,i="tencent";let a=t,s=r,c={};return a=C,s="ktyq/"+r,c={key:"ktyq/"+n.key},o.post("/edu-app/open/getUploadSign",{data:{postData:c,pluginName:i,bucketName:a,filename:s},params:{pluginName:i}})})),x=e("o",(({file:e,action:t,data:r,onProgress:o,onFinish:n,onError:i})=>{new k({Domain:"https://oss.dayaedu.com",Protocol:"https",getAuthorization:async(e,t)=>{t({Authorization:r.signature})}}).uploadFile({Bucket:C,Region:"ap-nanjing",Key:`ktyq/${r.name}`,Body:r.file.file,SliceSize:524288e3,onProgress:function(e){o({percent:Math.ceil(100*(e.percent||0))})}}).then((t=>{t.Location?.indexOf("http")>=0?e.url=t.Location:e.url="https://"+t.Location,n()})).catch((e=>{console.log(e,"error"),i()}))})),S=e("a",(async(e,t)=>{{let e="",r=null;const o=new k({Domain:"https://oss.dayaedu.com",Protocol:"https",getAuthorization:async(e,r)=>{r({Authorization:t.signature})}});if(await o.uploadFile({Bucket:C,Region:"ap-nanjing",Key:`ktyq/${t.name}`,Body:t.file,SliceSize:524288e3}).then((t=>{e=t.Location?.indexOf("http")>=0?t.Location:"https://"+t.Location})).catch((e=>{r=e})),e)return e;throw new Error(r)}}));
  126. /*!
  127. * Cropper.js v1.6.2
  128. * https://fengyuanchen.github.io/cropperjs
  129. *
  130. * Copyright 2015-present Chen Fengyuan
  131. * Released under the MIT license
  132. *
  133. * Date: 2024-04-21T07:43:05.335Z
  134. */
  135. function T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function R(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?T(Object(r),!0).forEach((function(t){var o,n,i;o=e,n=t,i=r[t],(n=A(n))in o?Object.defineProperty(o,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[n]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function A(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function B(e){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B(e)}function E(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,A(o.key),o)}}function D(e){return function(e){if(Array.isArray(e))return N(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return N(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?N(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}var O="undefined"!=typeof window&&void 0!==window.document,I=O?window:{},P=!(!O||!I.document.documentElement)&&"ontouchstart"in I.document.documentElement,M=!!O&&"PointerEvent"in I,L="cropper",U="all",_="crop",j="move",q="zoom",H="e",z="w",F="s",K="n",V="ne",G="nw",W="se",X="sw",Y="".concat(L,"-crop"),Q="".concat(L,"-disabled"),$="".concat(L,"-hidden"),J="".concat(L,"-hide"),Z="".concat(L,"-invisible"),ee="".concat(L,"-modal"),te="".concat(L,"-move"),re="".concat(L,"Action"),oe="".concat(L,"Preview"),ne="crop",ie="move",ae="none",se="crop",ce="cropend",le="cropmove",ue="cropstart",de="dblclick",pe=M?"pointerdown":P?"touchstart":"mousedown",he=M?"pointermove":P?"touchmove":"mousemove",fe=M?"pointerup pointercancel":P?"touchend touchcancel":"mouseup",me="ready",ge="resize",ye="wheel",ve="zoom",be="image/jpeg",ke=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,Ce=/^data:/,we=/^data:image\/jpeg;base64,/,xe=/^img|canvas$/i,Se={viewMode:0,dragMode:ne,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:200,minContainerHeight:100,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},Te=Number.isNaN||I.isNaN;function Re(e){return"number"==typeof e&&!Te(e)}var Ae=function(e){return e>0&&e<1/0};function Be(e){return void 0===e}function Ee(e){return"object"===B(e)&&null!==e}var De=Object.prototype.hasOwnProperty;function Ne(e){if(!Ee(e))return!1;try{var t=e.constructor,r=t.prototype;return t&&r&&De.call(r,"isPrototypeOf")}catch(o){return!1}}function Oe(e){return"function"==typeof e}var Ie=Array.prototype.slice;function Pe(e){return Array.from?Array.from(e):Ie.call(e)}function Me(e,t){return e&&Oe(t)&&(Array.isArray(e)||Re(e.length)?Pe(e).forEach((function(r,o){t.call(e,r,o,e)})):Ee(e)&&Object.keys(e).forEach((function(r){t.call(e,e[r],r,e)}))),e}var Le=Object.assign||function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];return Ee(e)&&r.length>0&&r.forEach((function(t){Ee(t)&&Object.keys(t).forEach((function(r){e[r]=t[r]}))})),e},Ue=/\.\d*(?:0|9){12}\d*$/;function _e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return Ue.test(e)?Math.round(e*t)/t:e}var je=/^width|height|left|top|marginLeft|marginTop$/;function qe(e,t){var r=e.style;Me(t,(function(e,t){je.test(t)&&Re(e)&&(e="".concat(e,"px")),r[t]=e}))}function He(e,t){if(t)if(Re(e.length))Me(e,(function(e){He(e,t)}));else if(e.classList)e.classList.add(t);else{var r=e.className.trim();r?r.indexOf(t)<0&&(e.className="".concat(r," ").concat(t)):e.className=t}}function ze(e,t){t&&(Re(e.length)?Me(e,(function(e){ze(e,t)})):e.classList?e.classList.remove(t):e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,"")))}function Fe(e,t,r){t&&(Re(e.length)?Me(e,(function(e){Fe(e,t,r)})):r?He(e,t):ze(e,t))}var Ke=/([a-z\d])([A-Z])/g;function Ve(e){return e.replace(Ke,"$1-$2").toLowerCase()}function Ge(e,t){return Ee(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(Ve(t)))}function We(e,t,r){Ee(r)?e[t]=r:e.dataset?e.dataset[t]=r:e.setAttribute("data-".concat(Ve(t)),r)}var Xe=/\s\s*/,Ye=function(){var e=!1;if(O){var t=!1,r=function(){},o=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(e){t=e}});I.addEventListener("test",r,o),I.removeEventListener("test",r,o)}return e}();function Qe(e,t,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=r;t.trim().split(Xe).forEach((function(t){if(!Ye){var i=e.listeners;i&&i[t]&&i[t][r]&&(n=i[t][r],delete i[t][r],0===Object.keys(i[t]).length&&delete i[t],0===Object.keys(i).length&&delete e.listeners)}e.removeEventListener(t,n,o)}))}function $e(e,t,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=r;t.trim().split(Xe).forEach((function(t){if(o.once&&!Ye){var i=e.listeners,a=void 0===i?{}:i;n=function(){delete a[t][r],e.removeEventListener(t,n,o);for(var i=arguments.length,s=new Array(i),c=0;c<i;c++)s[c]=arguments[c];r.apply(e,s)},a[t]||(a[t]={}),a[t][r]&&e.removeEventListener(t,a[t][r],o),a[t][r]=n,e.listeners=a}e.addEventListener(t,n,o)}))}function Je(e,t,r){var o;return Oe(Event)&&Oe(CustomEvent)?o=new CustomEvent(t,{detail:r,bubbles:!0,cancelable:!0}):(o=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,r),e.dispatchEvent(o)}function Ze(e){var t=e.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}var et=I.location,tt=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function rt(e){var t=e.match(tt);return null!==t&&(t[1]!==et.protocol||t[2]!==et.hostname||t[3]!==et.port)}function ot(e){var t="timestamp=".concat((new Date).getTime());return e+(-1===e.indexOf("?")?"?":"&")+t}function nt(e){var t=e.rotate,r=e.scaleX,o=e.scaleY,n=e.translateX,i=e.translateY,a=[];Re(n)&&0!==n&&a.push("translateX(".concat(n,"px)")),Re(i)&&0!==i&&a.push("translateY(".concat(i,"px)")),Re(t)&&0!==t&&a.push("rotate(".concat(t,"deg)")),Re(r)&&1!==r&&a.push("scaleX(".concat(r,")")),Re(o)&&1!==o&&a.push("scaleY(".concat(o,")"));var s=a.length?a.join(" "):"none";return{WebkitTransform:s,msTransform:s,transform:s}}function it(e,t){var r=e.pageX,o=e.pageY,n={endX:r,endY:o};return t?n:R({startX:r,startY:o},n)}function at(e){var t=e.aspectRatio,r=e.height,o=e.width,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"contain",i=Ae(o),a=Ae(r);if(i&&a){var s=r*t;"contain"===n&&s>o||"cover"===n&&s<o?r=o/t:o=r*t}else i?r=o/t:a&&(o=r*t);return{width:o,height:r}}var st=String.fromCharCode,ct=/^data:.*,/;function lt(e){var t,r=new DataView(e);try{var o,n,i;if(255===r.getUint8(0)&&216===r.getUint8(1))for(var a=r.byteLength,s=2;s+1<a;){if(255===r.getUint8(s)&&225===r.getUint8(s+1)){n=s;break}s+=1}if(n){var c=n+10;if("Exif"===function(e,t,r){var o="";r+=t;for(var n=t;n<r;n+=1)o+=st(e.getUint8(n));return o}(r,n+4,4)){var l=r.getUint16(c);if(((o=18761===l)||19789===l)&&42===r.getUint16(c+2,o)){var u=r.getUint32(c+4,o);u>=8&&(i=c+u)}}}if(i){var d,p,h=r.getUint16(i,o);for(p=0;p<h;p+=1)if(d=i+12*p+2,274===r.getUint16(d,o)){d+=8,t=r.getUint16(d,o),r.setUint16(d,1,o);break}}}catch(f){t=1}return t}var ut={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var e=this.element,t=this.options,r=this.container,o=this.cropper,n=Number(t.minContainerWidth),i=Number(t.minContainerHeight);He(o,$),ze(e,$);var a={width:Math.max(r.offsetWidth,n>=0?n:200),height:Math.max(r.offsetHeight,i>=0?i:100)};this.containerData=a,qe(o,{width:a.width,height:a.height}),He(e,$),ze(o,$)},initCanvas:function(){var e=this.containerData,t=this.imageData,r=this.options.viewMode,o=Math.abs(t.rotate)%180==90,n=o?t.naturalHeight:t.naturalWidth,i=o?t.naturalWidth:t.naturalHeight,a=n/i,s=e.width,c=e.height;e.height*a>e.width?3===r?s=e.height*a:c=e.width/a:3===r?c=e.width/a:s=e.height*a;var l={aspectRatio:a,naturalWidth:n,naturalHeight:i,width:s,height:c};this.canvasData=l,this.limited=1===r||2===r,this.limitCanvas(!0,!0),l.width=Math.min(Math.max(l.width,l.minWidth),l.maxWidth),l.height=Math.min(Math.max(l.height,l.minHeight),l.maxHeight),l.left=(e.width-l.width)/2,l.top=(e.height-l.height)/2,l.oldLeft=l.left,l.oldTop=l.top,this.initialCanvasData=Le({},l)},limitCanvas:function(e,t){var r=this.options,o=this.containerData,n=this.canvasData,i=this.cropBoxData,a=r.viewMode,s=n.aspectRatio,c=this.cropped&&i;if(e){var l=Number(r.minCanvasWidth)||0,u=Number(r.minCanvasHeight)||0;a>1?(l=Math.max(l,o.width),u=Math.max(u,o.height),3===a&&(u*s>l?l=u*s:u=l/s)):a>0&&(l?l=Math.max(l,c?i.width:0):u?u=Math.max(u,c?i.height:0):c&&(l=i.width,(u=i.height)*s>l?l=u*s:u=l/s));var d=at({aspectRatio:s,width:l,height:u});l=d.width,u=d.height,n.minWidth=l,n.minHeight=u,n.maxWidth=1/0,n.maxHeight=1/0}if(t)if(a>(c?0:1)){var p=o.width-n.width,h=o.height-n.height;n.minLeft=Math.min(0,p),n.minTop=Math.min(0,h),n.maxLeft=Math.max(0,p),n.maxTop=Math.max(0,h),c&&this.limited&&(n.minLeft=Math.min(i.left,i.left+(i.width-n.width)),n.minTop=Math.min(i.top,i.top+(i.height-n.height)),n.maxLeft=i.left,n.maxTop=i.top,2===a&&(n.width>=o.width&&(n.minLeft=Math.min(0,p),n.maxLeft=Math.max(0,p)),n.height>=o.height&&(n.minTop=Math.min(0,h),n.maxTop=Math.max(0,h))))}else n.minLeft=-n.width,n.minTop=-n.height,n.maxLeft=o.width,n.maxTop=o.height},renderCanvas:function(e,t){var r=this.canvasData,o=this.imageData;if(t){var n=function(e){var t=e.width,r=e.height,o=e.degree;if(90==(o=Math.abs(o)%180))return{width:r,height:t};var n=o%90*Math.PI/180,i=Math.sin(n),a=Math.cos(n),s=t*a+r*i,c=t*i+r*a;return o>90?{width:c,height:s}:{width:s,height:c}}({width:o.naturalWidth*Math.abs(o.scaleX||1),height:o.naturalHeight*Math.abs(o.scaleY||1),degree:o.rotate||0}),i=n.width,a=n.height,s=r.width*(i/r.naturalWidth),c=r.height*(a/r.naturalHeight);r.left-=(s-r.width)/2,r.top-=(c-r.height)/2,r.width=s,r.height=c,r.aspectRatio=i/a,r.naturalWidth=i,r.naturalHeight=a,this.limitCanvas(!0,!1)}(r.width>r.maxWidth||r.width<r.minWidth)&&(r.left=r.oldLeft),(r.height>r.maxHeight||r.height<r.minHeight)&&(r.top=r.oldTop),r.width=Math.min(Math.max(r.width,r.minWidth),r.maxWidth),r.height=Math.min(Math.max(r.height,r.minHeight),r.maxHeight),this.limitCanvas(!1,!0),r.left=Math.min(Math.max(r.left,r.minLeft),r.maxLeft),r.top=Math.min(Math.max(r.top,r.minTop),r.maxTop),r.oldLeft=r.left,r.oldTop=r.top,qe(this.canvas,Le({width:r.width,height:r.height},nt({translateX:r.left,translateY:r.top}))),this.renderImage(e),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(e){var t=this.canvasData,r=this.imageData,o=r.naturalWidth*(t.width/t.naturalWidth),n=r.naturalHeight*(t.height/t.naturalHeight);Le(r,{width:o,height:n,left:(t.width-o)/2,top:(t.height-n)/2}),qe(this.image,Le({width:r.width,height:r.height},nt(Le({translateX:r.left,translateY:r.top},r)))),e&&this.output()},initCropBox:function(){var e=this.options,t=this.canvasData,r=e.aspectRatio||e.initialAspectRatio,o=Number(e.autoCropArea)||.8,n={width:t.width,height:t.height};r&&(t.height*r>t.width?n.height=n.width/r:n.width=n.height*r),this.cropBoxData=n,this.limitCropBox(!0,!0),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),n.width=Math.max(n.minWidth,n.width*o),n.height=Math.max(n.minHeight,n.height*o),n.left=t.left+(t.width-n.width)/2,n.top=t.top+(t.height-n.height)/2,n.oldLeft=n.left,n.oldTop=n.top,this.initialCropBoxData=Le({},n)},limitCropBox:function(e,t){var r=this.options,o=this.containerData,n=this.canvasData,i=this.cropBoxData,a=this.limited,s=r.aspectRatio;if(e){var c=Number(r.minCropBoxWidth)||0,l=Number(r.minCropBoxHeight)||0,u=a?Math.min(o.width,n.width,n.width+n.left,o.width-n.left):o.width,d=a?Math.min(o.height,n.height,n.height+n.top,o.height-n.top):o.height;c=Math.min(c,o.width),l=Math.min(l,o.height),s&&(c&&l?l*s>c?l=c/s:c=l*s:c?l=c/s:l&&(c=l*s),d*s>u?d=u/s:u=d*s),i.minWidth=Math.min(c,u),i.minHeight=Math.min(l,d),i.maxWidth=u,i.maxHeight=d}t&&(a?(i.minLeft=Math.max(0,n.left),i.minTop=Math.max(0,n.top),i.maxLeft=Math.min(o.width,n.left+n.width)-i.width,i.maxTop=Math.min(o.height,n.top+n.height)-i.height):(i.minLeft=0,i.minTop=0,i.maxLeft=o.width-i.width,i.maxTop=o.height-i.height))},renderCropBox:function(){var e=this.options,t=this.containerData,r=this.cropBoxData;(r.width>r.maxWidth||r.width<r.minWidth)&&(r.left=r.oldLeft),(r.height>r.maxHeight||r.height<r.minHeight)&&(r.top=r.oldTop),r.width=Math.min(Math.max(r.width,r.minWidth),r.maxWidth),r.height=Math.min(Math.max(r.height,r.minHeight),r.maxHeight),this.limitCropBox(!1,!0),r.left=Math.min(Math.max(r.left,r.minLeft),r.maxLeft),r.top=Math.min(Math.max(r.top,r.minTop),r.maxTop),r.oldLeft=r.left,r.oldTop=r.top,e.movable&&e.cropBoxMovable&&We(this.face,re,r.width>=t.width&&r.height>=t.height?j:U),qe(this.cropBox,Le({width:r.width,height:r.height},nt({translateX:r.left,translateY:r.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Je(this.element,se,this.getData())}},dt={initPreview:function(){var e=this.element,t=this.crossOrigin,r=this.options.preview,o=t?this.crossOriginUrl:this.url,n=e.alt||"The image to preview",i=document.createElement("img");if(t&&(i.crossOrigin=t),i.src=o,i.alt=n,this.viewBox.appendChild(i),this.viewBoxImage=i,r){var a=r;"string"==typeof r?a=e.ownerDocument.querySelectorAll(r):r.querySelector&&(a=[r]),this.previews=a,Me(a,(function(e){var r=document.createElement("img");We(e,oe,{width:e.offsetWidth,height:e.offsetHeight,html:e.innerHTML}),t&&(r.crossOrigin=t),r.src=o,r.alt=n,r.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;"',e.innerHTML="",e.appendChild(r)}))}},resetPreview:function(){Me(this.previews,(function(e){var t=Ge(e,oe);qe(e,{width:t.width,height:t.height}),e.innerHTML=t.html,function(e,t){if(Ee(e[t]))try{delete e[t]}catch(r){e[t]=void 0}else if(e.dataset)try{delete e.dataset[t]}catch(r){e.dataset[t]=void 0}else e.removeAttribute("data-".concat(Ve(t)))}(e,oe)}))},preview:function(){var e=this.imageData,t=this.canvasData,r=this.cropBoxData,o=r.width,n=r.height,i=e.width,a=e.height,s=r.left-t.left-e.left,c=r.top-t.top-e.top;this.cropped&&!this.disabled&&(qe(this.viewBoxImage,Le({width:i,height:a},nt(Le({translateX:-s,translateY:-c},e)))),Me(this.previews,(function(t){var r=Ge(t,oe),l=r.width,u=r.height,d=l,p=u,h=1;o&&(p=n*(h=l/o)),n&&p>u&&(d=o*(h=u/n),p=u),qe(t,{width:d,height:p}),qe(t.getElementsByTagName("img")[0],Le({width:i*h,height:a*h},nt(Le({translateX:-s*h,translateY:-c*h},e))))})))}},pt={bind:function(){var e=this.element,t=this.options,r=this.cropper;Oe(t.cropstart)&&$e(e,ue,t.cropstart),Oe(t.cropmove)&&$e(e,le,t.cropmove),Oe(t.cropend)&&$e(e,ce,t.cropend),Oe(t.crop)&&$e(e,se,t.crop),Oe(t.zoom)&&$e(e,ve,t.zoom),$e(r,pe,this.onCropStart=this.cropStart.bind(this)),t.zoomable&&t.zoomOnWheel&&$e(r,ye,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),t.toggleDragModeOnDblclick&&$e(r,de,this.onDblclick=this.dblclick.bind(this)),$e(e.ownerDocument,he,this.onCropMove=this.cropMove.bind(this)),$e(e.ownerDocument,fe,this.onCropEnd=this.cropEnd.bind(this)),t.responsive&&$e(window,ge,this.onResize=this.resize.bind(this))},unbind:function(){var e=this.element,t=this.options,r=this.cropper;Oe(t.cropstart)&&Qe(e,ue,t.cropstart),Oe(t.cropmove)&&Qe(e,le,t.cropmove),Oe(t.cropend)&&Qe(e,ce,t.cropend),Oe(t.crop)&&Qe(e,se,t.crop),Oe(t.zoom)&&Qe(e,ve,t.zoom),Qe(r,pe,this.onCropStart),t.zoomable&&t.zoomOnWheel&&Qe(r,ye,this.onWheel,{passive:!1,capture:!0}),t.toggleDragModeOnDblclick&&Qe(r,de,this.onDblclick),Qe(e.ownerDocument,he,this.onCropMove),Qe(e.ownerDocument,fe,this.onCropEnd),t.responsive&&Qe(window,ge,this.onResize)}},ht={resize:function(){if(!this.disabled){var e,t,r=this.options,o=this.container,n=this.containerData,i=o.offsetWidth/n.width,a=o.offsetHeight/n.height,s=Math.abs(i-1)>Math.abs(a-1)?i:a;1!==s&&(r.restore&&(e=this.getCanvasData(),t=this.getCropBoxData()),this.render(),r.restore&&(this.setCanvasData(Me(e,(function(t,r){e[r]=t*s}))),this.setCropBoxData(Me(t,(function(e,r){t[r]=e*s})))))}},dblclick:function(){var e,t;this.disabled||this.options.dragMode===ae||this.setDragMode((e=this.dragBox,t=Y,(e.classList?e.classList.contains(t):e.className.indexOf(t)>-1)?ie:ne))},wheel:function(e){var t=this,r=Number(this.options.wheelZoomRatio)||.1,o=1;this.disabled||(e.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout((function(){t.wheeling=!1}),50),e.deltaY?o=e.deltaY>0?1:-1:e.wheelDelta?o=-e.wheelDelta/120:e.detail&&(o=e.detail>0?1:-1),this.zoom(-o*r,e)))},cropStart:function(e){var t=e.buttons,r=e.button;if(!(this.disabled||("mousedown"===e.type||"pointerdown"===e.type&&"mouse"===e.pointerType)&&(Re(t)&&1!==t||Re(r)&&0!==r||e.ctrlKey))){var o,n=this.options,i=this.pointers;e.changedTouches?Me(e.changedTouches,(function(e){i[e.identifier]=it(e)})):i[e.pointerId||0]=it(e),o=Object.keys(i).length>1&&n.zoomable&&n.zoomOnTouch?q:Ge(e.target,re),ke.test(o)&&!1!==Je(this.element,ue,{originalEvent:e,action:o})&&(e.preventDefault(),this.action=o,this.cropping=!1,o===_&&(this.cropping=!0,He(this.dragBox,ee)))}},cropMove:function(e){var t=this.action;if(!this.disabled&&t){var r=this.pointers;e.preventDefault(),!1!==Je(this.element,le,{originalEvent:e,action:t})&&(e.changedTouches?Me(e.changedTouches,(function(e){Le(r[e.identifier]||{},it(e,!0))})):Le(r[e.pointerId||0]||{},it(e,!0)),this.change(e))}},cropEnd:function(e){if(!this.disabled){var t=this.action,r=this.pointers;e.changedTouches?Me(e.changedTouches,(function(e){delete r[e.identifier]})):delete r[e.pointerId||0],t&&(e.preventDefault(),Object.keys(r).length||(this.action=""),this.cropping&&(this.cropping=!1,Fe(this.dragBox,ee,this.cropped&&this.options.modal)),Je(this.element,ce,{originalEvent:e,action:t}))}}},ft={change:function(e){var t,r=this.options,o=this.canvasData,n=this.containerData,i=this.cropBoxData,a=this.pointers,s=this.action,c=r.aspectRatio,l=i.left,u=i.top,d=i.width,p=i.height,h=l+d,f=u+p,m=0,g=0,y=n.width,v=n.height,b=!0;!c&&e.shiftKey&&(c=d&&p?d/p:1),this.limited&&(m=i.minLeft,g=i.minTop,y=m+Math.min(n.width,o.width,o.left+o.width),v=g+Math.min(n.height,o.height,o.top+o.height));var k=a[Object.keys(a)[0]],C={x:k.endX-k.startX,y:k.endY-k.startY},w=function(e){switch(e){case H:h+C.x>y&&(C.x=y-h);break;case z:l+C.x<m&&(C.x=m-l);break;case K:u+C.y<g&&(C.y=g-u);break;case F:f+C.y>v&&(C.y=v-f)}};switch(s){case U:l+=C.x,u+=C.y;break;case H:if(C.x>=0&&(h>=y||c&&(u<=g||f>=v))){b=!1;break}w(H),(d+=C.x)<0&&(s=z,l-=d=-d),c&&(p=d/c,u+=(i.height-p)/2);break;case K:if(C.y<=0&&(u<=g||c&&(l<=m||h>=y))){b=!1;break}w(K),p-=C.y,u+=C.y,p<0&&(s=F,u-=p=-p),c&&(d=p*c,l+=(i.width-d)/2);break;case z:if(C.x<=0&&(l<=m||c&&(u<=g||f>=v))){b=!1;break}w(z),d-=C.x,l+=C.x,d<0&&(s=H,l-=d=-d),c&&(p=d/c,u+=(i.height-p)/2);break;case F:if(C.y>=0&&(f>=v||c&&(l<=m||h>=y))){b=!1;break}w(F),(p+=C.y)<0&&(s=K,u-=p=-p),c&&(d=p*c,l+=(i.width-d)/2);break;case V:if(c){if(C.y<=0&&(u<=g||h>=y)){b=!1;break}w(K),p-=C.y,u+=C.y,d=p*c}else w(K),w(H),C.x>=0?h<y?d+=C.x:C.y<=0&&u<=g&&(b=!1):d+=C.x,C.y<=0?u>g&&(p-=C.y,u+=C.y):(p-=C.y,u+=C.y);d<0&&p<0?(s=X,u-=p=-p,l-=d=-d):d<0?(s=G,l-=d=-d):p<0&&(s=W,u-=p=-p);break;case G:if(c){if(C.y<=0&&(u<=g||l<=m)){b=!1;break}w(K),p-=C.y,u+=C.y,d=p*c,l+=i.width-d}else w(K),w(z),C.x<=0?l>m?(d-=C.x,l+=C.x):C.y<=0&&u<=g&&(b=!1):(d-=C.x,l+=C.x),C.y<=0?u>g&&(p-=C.y,u+=C.y):(p-=C.y,u+=C.y);d<0&&p<0?(s=W,u-=p=-p,l-=d=-d):d<0?(s=V,l-=d=-d):p<0&&(s=X,u-=p=-p);break;case X:if(c){if(C.x<=0&&(l<=m||f>=v)){b=!1;break}w(z),d-=C.x,l+=C.x,p=d/c}else w(F),w(z),C.x<=0?l>m?(d-=C.x,l+=C.x):C.y>=0&&f>=v&&(b=!1):(d-=C.x,l+=C.x),C.y>=0?f<v&&(p+=C.y):p+=C.y;d<0&&p<0?(s=V,u-=p=-p,l-=d=-d):d<0?(s=W,l-=d=-d):p<0&&(s=G,u-=p=-p);break;case W:if(c){if(C.x>=0&&(h>=y||f>=v)){b=!1;break}w(H),p=(d+=C.x)/c}else w(F),w(H),C.x>=0?h<y?d+=C.x:C.y>=0&&f>=v&&(b=!1):d+=C.x,C.y>=0?f<v&&(p+=C.y):p+=C.y;d<0&&p<0?(s=G,u-=p=-p,l-=d=-d):d<0?(s=X,l-=d=-d):p<0&&(s=V,u-=p=-p);break;case j:this.move(C.x,C.y),b=!1;break;case q:this.zoom(function(e){var t=R({},e),r=0;return Me(e,(function(e,o){delete t[o],Me(t,(function(t){var o=Math.abs(e.startX-t.startX),n=Math.abs(e.startY-t.startY),i=Math.abs(e.endX-t.endX),a=Math.abs(e.endY-t.endY),s=Math.sqrt(o*o+n*n),c=(Math.sqrt(i*i+a*a)-s)/s;Math.abs(c)>Math.abs(r)&&(r=c)}))})),r}(a),e),b=!1;break;case _:if(!C.x||!C.y){b=!1;break}t=Ze(this.cropper),l=k.startX-t.left,u=k.startY-t.top,d=i.minWidth,p=i.minHeight,C.x>0?s=C.y>0?W:V:C.x<0&&(l-=d,s=C.y>0?X:G),C.y<0&&(u-=p),this.cropped||(ze(this.cropBox,$),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}b&&(i.width=d,i.height=p,i.left=l,i.top=u,this.action=s,this.renderCropBox()),Me(a,(function(e){e.startX=e.endX,e.startY=e.endY}))}},mt={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&He(this.dragBox,ee),ze(this.cropBox,$),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=Le({},this.initialImageData),this.canvasData=Le({},this.initialCanvasData),this.cropBoxData=Le({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(Le(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),ze(this.dragBox,ee),He(this.cropBox,$)),this},replace:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&e&&(this.isImg&&(this.element.src=e),t?(this.url=e,this.image.src=e,this.ready&&(this.viewBoxImage.src=e,Me(this.previews,(function(t){t.getElementsByTagName("img")[0].src=e})))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(e))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,ze(this.cropper,Q)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,He(this.cropper,Q)),this},destroy:function(){var e=this.element;return e[L]?(e[L]=void 0,this.isImg&&this.replaced&&(e.src=this.originalUrl),this.uncreate(),this):this},move:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=this.canvasData,o=r.left,n=r.top;return this.moveTo(Be(e)?e:o+Number(e),Be(t)?t:n+Number(t))},moveTo:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=this.canvasData,o=!1;return e=Number(e),t=Number(t),this.ready&&!this.disabled&&this.options.movable&&(Re(e)&&(r.left=e,o=!0),Re(t)&&(r.top=t,o=!0),o&&this.renderCanvas(!0)),this},zoom:function(e,t){var r=this.canvasData;return e=(e=Number(e))<0?1/(1-e):1+e,this.zoomTo(r.width*e/r.naturalWidth,null,t)},zoomTo:function(e,t,r){var o=this.options,n=this.canvasData,i=n.width,a=n.height,s=n.naturalWidth,c=n.naturalHeight;if((e=Number(e))>=0&&this.ready&&!this.disabled&&o.zoomable){var l=s*e,u=c*e;if(!1===Je(this.element,ve,{ratio:e,oldRatio:i/s,originalEvent:r}))return this;if(r){var d=this.pointers,p=Ze(this.cropper),h=d&&Object.keys(d).length?function(e){var t=0,r=0,o=0;return Me(e,(function(e){var n=e.startX,i=e.startY;t+=n,r+=i,o+=1})),{pageX:t/=o,pageY:r/=o}}(d):{pageX:r.pageX,pageY:r.pageY};n.left-=(l-i)*((h.pageX-p.left-n.left)/i),n.top-=(u-a)*((h.pageY-p.top-n.top)/a)}else Ne(t)&&Re(t.x)&&Re(t.y)?(n.left-=(l-i)*((t.x-n.left)/i),n.top-=(u-a)*((t.y-n.top)/a)):(n.left-=(l-i)/2,n.top-=(u-a)/2);n.width=l,n.height=u,this.renderCanvas(!0)}return this},rotate:function(e){return this.rotateTo((this.imageData.rotate||0)+Number(e))},rotateTo:function(e){return Re(e=Number(e))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=e%360,this.renderCanvas(!0,!0)),this},scaleX:function(e){var t=this.imageData.scaleY;return this.scale(e,Re(t)?t:1)},scaleY:function(e){var t=this.imageData.scaleX;return this.scale(Re(t)?t:1,e)},scale:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=this.imageData,o=!1;return e=Number(e),t=Number(t),this.ready&&!this.disabled&&this.options.scalable&&(Re(e)&&(r.scaleX=e,o=!0),Re(t)&&(r.scaleY=t,o=!0),o&&this.renderCanvas(!0,!0)),this},getData:function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=this.options,o=this.imageData,n=this.canvasData,i=this.cropBoxData;if(this.ready&&this.cropped){e={x:i.left-n.left,y:i.top-n.top,width:i.width,height:i.height};var a=o.width/o.naturalWidth;if(Me(e,(function(t,r){e[r]=t/a})),t){var s=Math.round(e.y+e.height),c=Math.round(e.x+e.width);e.x=Math.round(e.x),e.y=Math.round(e.y),e.width=c-e.x,e.height=s-e.y}}else e={x:0,y:0,width:0,height:0};return r.rotatable&&(e.rotate=o.rotate||0),r.scalable&&(e.scaleX=o.scaleX||1,e.scaleY=o.scaleY||1),e},setData:function(e){var t=this.options,r=this.imageData,o=this.canvasData,n={};if(this.ready&&!this.disabled&&Ne(e)){var i=!1;t.rotatable&&Re(e.rotate)&&e.rotate!==r.rotate&&(r.rotate=e.rotate,i=!0),t.scalable&&(Re(e.scaleX)&&e.scaleX!==r.scaleX&&(r.scaleX=e.scaleX,i=!0),Re(e.scaleY)&&e.scaleY!==r.scaleY&&(r.scaleY=e.scaleY,i=!0)),i&&this.renderCanvas(!0,!0);var a=r.width/r.naturalWidth;Re(e.x)&&(n.left=e.x*a+o.left),Re(e.y)&&(n.top=e.y*a+o.top),Re(e.width)&&(n.width=e.width*a),Re(e.height)&&(n.height=e.height*a),this.setCropBoxData(n)}return this},getContainerData:function(){return this.ready?Le({},this.containerData):{}},getImageData:function(){return this.sized?Le({},this.imageData):{}},getCanvasData:function(){var e=this.canvasData,t={};return this.ready&&Me(["left","top","width","height","naturalWidth","naturalHeight"],(function(r){t[r]=e[r]})),t},setCanvasData:function(e){var t=this.canvasData,r=t.aspectRatio;return this.ready&&!this.disabled&&Ne(e)&&(Re(e.left)&&(t.left=e.left),Re(e.top)&&(t.top=e.top),Re(e.width)?(t.width=e.width,t.height=e.width/r):Re(e.height)&&(t.height=e.height,t.width=e.height*r),this.renderCanvas(!0)),this},getCropBoxData:function(){var e,t=this.cropBoxData;return this.ready&&this.cropped&&(e={left:t.left,top:t.top,width:t.width,height:t.height}),e||{}},setCropBoxData:function(e){var t,r,o=this.cropBoxData,n=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&Ne(e)&&(Re(e.left)&&(o.left=e.left),Re(e.top)&&(o.top=e.top),Re(e.width)&&e.width!==o.width&&(t=!0,o.width=e.width),Re(e.height)&&e.height!==o.height&&(r=!0,o.height=e.height),n&&(t?o.height=o.width/n:r&&(o.width=o.height*n)),this.renderCropBox()),this},getCroppedCanvas:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var t=this.canvasData,r=function(e,t,r,o){var n=t.aspectRatio,i=t.naturalWidth,a=t.naturalHeight,s=t.rotate,c=void 0===s?0:s,l=t.scaleX,u=void 0===l?1:l,d=t.scaleY,p=void 0===d?1:d,h=r.aspectRatio,f=r.naturalWidth,m=r.naturalHeight,g=o.fillColor,y=void 0===g?"transparent":g,v=o.imageSmoothingEnabled,b=void 0===v||v,k=o.imageSmoothingQuality,C=void 0===k?"low":k,w=o.maxWidth,x=void 0===w?1/0:w,S=o.maxHeight,T=void 0===S?1/0:S,R=o.minWidth,A=void 0===R?0:R,B=o.minHeight,E=void 0===B?0:B,N=document.createElement("canvas"),O=N.getContext("2d"),I=at({aspectRatio:h,width:x,height:T}),P=at({aspectRatio:h,width:A,height:E},"cover"),M=Math.min(I.width,Math.max(P.width,f)),L=Math.min(I.height,Math.max(P.height,m)),U=at({aspectRatio:n,width:x,height:T}),_=at({aspectRatio:n,width:A,height:E},"cover"),j=Math.min(U.width,Math.max(_.width,i)),q=Math.min(U.height,Math.max(_.height,a)),H=[-j/2,-q/2,j,q];return N.width=_e(M),N.height=_e(L),O.fillStyle=y,O.fillRect(0,0,M,L),O.save(),O.translate(M/2,L/2),O.rotate(c*Math.PI/180),O.scale(u,p),O.imageSmoothingEnabled=b,O.imageSmoothingQuality=C,O.drawImage.apply(O,[e].concat(D(H.map((function(e){return Math.floor(_e(e))}))))),O.restore(),N}(this.image,this.imageData,t,e);if(!this.cropped)return r;var o=this.getData(e.rounded),n=o.x,i=o.y,a=o.width,s=o.height,c=r.width/Math.floor(t.naturalWidth);1!==c&&(n*=c,i*=c,a*=c,s*=c);var l=a/s,u=at({aspectRatio:l,width:e.maxWidth||1/0,height:e.maxHeight||1/0}),d=at({aspectRatio:l,width:e.minWidth||0,height:e.minHeight||0},"cover"),p=at({aspectRatio:l,width:e.width||(1!==c?r.width:a),height:e.height||(1!==c?r.height:s)}),h=p.width,f=p.height;h=Math.min(u.width,Math.max(d.width,h)),f=Math.min(u.height,Math.max(d.height,f));var m=document.createElement("canvas"),g=m.getContext("2d");m.width=_e(h),m.height=_e(f),g.fillStyle=e.fillColor||"transparent",g.fillRect(0,0,h,f);var y=e.imageSmoothingEnabled,v=void 0===y||y,b=e.imageSmoothingQuality;g.imageSmoothingEnabled=v,b&&(g.imageSmoothingQuality=b);var k,C,w,x,S,T,R=r.width,A=r.height,B=n,E=i;B<=-a||B>R?(B=0,k=0,w=0,S=0):B<=0?(w=-B,B=0,S=k=Math.min(R,a+B)):B<=R&&(w=0,S=k=Math.min(a,R-B)),k<=0||E<=-s||E>A?(E=0,C=0,x=0,T=0):E<=0?(x=-E,E=0,T=C=Math.min(A,s+E)):E<=A&&(x=0,T=C=Math.min(s,A-E));var N=[B,E,k,C];if(S>0&&T>0){var O=h/a;N.push(w*O,x*O,S*O,T*O)}return g.drawImage.apply(g,[r].concat(D(N.map((function(e){return Math.floor(_e(e))}))))),m},setAspectRatio:function(e){var t=this.options;return this.disabled||Be(e)||(t.aspectRatio=Math.max(0,e)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(e){var t=this.options,r=this.dragBox,o=this.face;if(this.ready&&!this.disabled){var n=e===ne,i=t.movable&&e===ie;e=n||i?e:ae,t.dragMode=e,We(r,re,e),Fe(r,Y,n),Fe(r,te,i),t.cropBoxMovable||(We(o,re,e),Fe(o,Y,n),Fe(o,te,i))}return this}},gt=I.Cropper,yt=e("C",function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t||!xe.test(t.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=t,this.options=Le({},Se,Ne(r)&&r),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 t=e,r=[{key:"init",value:function(){var e,t=this.element,r=t.tagName.toLowerCase();if(!t[L]){if(t[L]=this,"img"===r){if(this.isImg=!0,e=t.getAttribute("src")||"",this.originalUrl=e,!e)return;e=t.src}else"canvas"===r&&window.HTMLCanvasElement&&(e=t.toDataURL());this.load(e)}}},{key:"load",value:function(e){var t=this;if(e){this.url=e,this.imageData={};var r=this.element,o=this.options;if(o.rotatable||o.scalable||(o.checkOrientation=!1),o.checkOrientation&&window.ArrayBuffer)if(Ce.test(e))we.test(e)?this.read((n=e.replace(ct,""),i=atob(n),a=new ArrayBuffer(i.length),Me(s=new Uint8Array(a),(function(e,t){s[t]=i.charCodeAt(t)})),a)):this.clone();else{var n,i,a,s,c=new XMLHttpRequest,l=this.clone.bind(this);this.reloading=!0,this.xhr=c,c.onabort=l,c.onerror=l,c.ontimeout=l,c.onprogress=function(){c.getResponseHeader("content-type")!==be&&c.abort()},c.onload=function(){t.read(c.response)},c.onloadend=function(){t.reloading=!1,t.xhr=null},o.checkCrossOrigin&&rt(e)&&r.crossOrigin&&(e=ot(e)),c.open("GET",e,!0),c.responseType="arraybuffer",c.withCredentials="use-credentials"===r.crossOrigin,c.send()}else this.clone()}}},{key:"read",value:function(e){var t=this.options,r=this.imageData,o=lt(e),n=0,i=1,a=1;if(o>1){this.url=function(e,t){for(var r=[],o=new Uint8Array(e);o.length>0;)r.push(st.apply(null,Pe(o.subarray(0,8192)))),o=o.subarray(8192);return"data:".concat(t,";base64,").concat(btoa(r.join("")))}(e,be);var s=function(e){var t=0,r=1,o=1;switch(e){case 2:r=-1;break;case 3:t=-180;break;case 4:o=-1;break;case 5:t=90,o=-1;break;case 6:t=90;break;case 7:t=90,r=-1;break;case 8:t=-90}return{rotate:t,scaleX:r,scaleY:o}}(o);n=s.rotate,i=s.scaleX,a=s.scaleY}t.rotatable&&(r.rotate=n),t.scalable&&(r.scaleX=i,r.scaleY=a),this.clone()}},{key:"clone",value:function(){var e=this.element,t=this.url,r=e.crossOrigin,o=t;this.options.checkCrossOrigin&&rt(t)&&(r||(r="anonymous"),o=ot(t)),this.crossOrigin=r,this.crossOriginUrl=o;var n=document.createElement("img");r&&(n.crossOrigin=r),n.src=o||t,n.alt=e.alt||"The image to crop",this.image=n,n.onload=this.start.bind(this),n.onerror=this.stop.bind(this),He(n,J),e.parentNode.insertBefore(n,e.nextSibling)}},{key:"start",value:function(){var e=this,t=this.image;t.onload=null,t.onerror=null,this.sizing=!0;var r=I.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(I.navigator.userAgent),o=function(t,r){Le(e.imageData,{naturalWidth:t,naturalHeight:r,aspectRatio:t/r}),e.initialImageData=Le({},e.imageData),e.sizing=!1,e.sized=!0,e.build()};if(!t.naturalWidth||r){var n=document.createElement("img"),i=document.body||document.documentElement;this.sizingImage=n,n.onload=function(){o(n.width,n.height),r||i.removeChild(n)},n.src=t.src,r||(n.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;",i.appendChild(n))}else o(t.naturalWidth,t.naturalHeight)}},{key:"stop",value:function(){var e=this.image;e.onload=null,e.onerror=null,e.parentNode.removeChild(e),this.image=null}},{key:"build",value:function(){if(this.sized&&!this.ready){var e=this.element,t=this.options,r=this.image,o=e.parentNode,n=document.createElement("div");n.innerHTML='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>';var i=n.querySelector(".".concat(L,"-container")),a=i.querySelector(".".concat(L,"-canvas")),s=i.querySelector(".".concat(L,"-drag-box")),c=i.querySelector(".".concat(L,"-crop-box")),l=c.querySelector(".".concat(L,"-face"));this.container=o,this.cropper=i,this.canvas=a,this.dragBox=s,this.cropBox=c,this.viewBox=i.querySelector(".".concat(L,"-view-box")),this.face=l,a.appendChild(r),He(e,$),o.insertBefore(i,e.nextSibling),ze(r,J),this.initPreview(),this.bind(),t.initialAspectRatio=Math.max(0,t.initialAspectRatio)||NaN,t.aspectRatio=Math.max(0,t.aspectRatio)||NaN,t.viewMode=Math.max(0,Math.min(3,Math.round(t.viewMode)))||0,He(c,$),t.guides||He(c.getElementsByClassName("".concat(L,"-dashed")),$),t.center||He(c.getElementsByClassName("".concat(L,"-center")),$),t.background&&He(i,"".concat(L,"-bg")),t.highlight||He(l,Z),t.cropBoxMovable&&(He(l,te),We(l,re,U)),t.cropBoxResizable||(He(c.getElementsByClassName("".concat(L,"-line")),$),He(c.getElementsByClassName("".concat(L,"-point")),$)),this.render(),this.ready=!0,this.setDragMode(t.dragMode),t.autoCrop&&this.crop(),this.setData(t.data),Oe(t.ready)&&$e(e,me,t.ready,{once:!0}),Je(e,me)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var e=this.cropper.parentNode;e&&e.removeChild(this.cropper),ze(this.element,$)}}},{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()}}],o=[{key:"noConflict",value:function(){return window.Cropper=gt,e}},{key:"setDefaults",value:function(e){Le(Se,Ne(e)&&e)}}],r&&E(t.prototype,r),o&&E(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,o}());Le(yt.prototype,ut,dt,pt,ht,ft,mt);const vt=n({name:"copper-image",emits:["close","cropperNo","cropperOk"],setup(e,{emit:t,expose:r}){const o=i({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}),n=a(),f=()=>{o.myCropper=new yt(n.value,{viewMode:1,dragMode:"move",aspectRatio:o.options.autoCropWidth/o.options.autoCropHeight,initialAspectRatio:1,autoCropArea:1,cropBoxMovable:!0,cropBoxResizable:!1,background:!0,movable:!0,modal:!0,preview:".before"})},m=e=>{switch(e){case"left":o.myCropper.rotate(90);break;case"right":o.myCropper.rotate(-90);break;case"zoomIn":o.myCropper.zoom(.1);break;case"zoomOut":o.myCropper.zoom(-.1)}},g=()=>{o.confirmLoading=!0,o.myCropper.getCroppedCanvas({imageSmoothingQuality:"high"}).toBlob((e=>{console.log(e,"1212"),t("cropperOk",e),o.confirmLoading=!1}))};return r({edit:e=>{const{options:t}=o;o.visible=!0,o.options=Object.assign({},t,e),h((()=>{f()}))}}),()=>s("div",null,[s(c,{cols:2,xGap:24,style:{paddingTop:"12px"}},{default:()=>[s(l,null,{default:()=>[s("div",{style:"width: 100%; height: 300px"},[o.options?.img&&s("img",{ref:n,src:o.options?.img,alt:""},null)]),s(u,{justify:"center",style:{paddingTop:"12px"}},{default:()=>[s(d,{type:"primary",size:"small",onClick:()=>m("left")},{default:()=>[p("逆时针旋转")]}),s(d,{type:"primary",size:"small",onClick:()=>m("right")},{default:()=>[p("顺时针旋转")]}),s(d,{type:"primary",size:"small",onClick:()=>m("zoomIn")},{default:()=>[p("放大")]}),s(d,{type:"primary",size:"small",onClick:()=>m("zoomOut")},{default:()=>[p("缩小")]})]})]}),s(l,null,{default:()=>[s("span",{style:{fontSize:"15px",fontWeight:600,paddingBottom:"8px",display:"inline-block"}},[p("预览图片")]),s("div",{class:"before",style:{width:o.options.autoCropWidth+"px",height:o.options.autoCropHeight+"px",overflow:"hidden"}},null)]})]}),s(u,{justify:"end"},{default:()=>[s(d,{type:"default",onClick:()=>{o.confirmLoading=!1,t("close"),t("cropperNo")}},{default:()=>[p("取消")]}),s(d,{type:"primary",loading:o.confirmLoading,onClick:g},{default:()=>[p("确认")]})]})])}});e("U",n({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(e,{emit:t,expose:r,slots:o}){const n=`https://${e.bucketName}.ks3-cn-beijing.ksyuncs.com/`,c=f(),l=a(!1),u=a(!1);a();const p=a(),h=i([]),b=a([]),k=()=>{if(e.fileList){const t=e.fileList.split("/");b.value=[{id:(new Date).getTime().toString(),name:t[t.length-1],status:"finished",url:e.fileList}]}else if(Array.isArray(e.imageList)){const t=[];e.imageList.forEach((e=>{const r=e.split("/");t.push({id:Date.now().toString(),name:r[r.length-1],status:"finished",url:e})})),b.value=t}else b.value=[]};k(),m((()=>e.imageList),(()=>{k()})),m((()=>e.fileList),(()=>{k()})),r({handleClearFile:()=>{p.value?.clear(),console.log("清空",p.value)}});const C=a(),T=async(e,t)=>{const r=new FileReader;r.addEventListener("load",(()=>t(r.result))),r.readAsDataURL(e)},R=({file:e,action:t,onFinish:r,onError:o,onProgress:n})=>{const i=h.find((t=>t.id==e.id));i.file=e,x({file:e,action:t,data:i,onProgress:n,onFinish:r,onError:o})},A=async r=>{try{const o=`${e.path}${e.fileName||(new Date).getTime()+".png"}`,i={filename:o,bucketName:e.bucketName,postData:{filename:o,acl:"public-read",key:o,unknowValueField:[]}},{data:a}=await w(i),s={policy:a.policy,signature:a.signature,acl:"public-read",key:o,KSSAccessKeyId:a.kssAccessKeyId,name:o,file:r},c=await S(n,s);console.log(c,"upload"),t("update:fileList",c),l.value=!1}catch{return!1}};return()=>s("div",null,[s(g,{ref:p,action:n,customRequest:R,fileList:b.value,"onUpdate:fileList":e=>b.value=e,listType:e.listType,accept:e.accept,multiple:e.multiple,max:e.max,disabled:e.disabled,showFileList:e.showFileList,showPreviewButton:!0,onBeforeUpload:t=>(async t=>{const r=t.file;let o=!0;if(e.size&&(o=r.file.size/1024/1024<e.size,!o))return c.error(`文件大小不能超过${e.size}M`),!1;if(!o)return o;if(e.cropper)return T(r.file,(t=>{const o=Object.assign({},e.options,{img:t,name:r.file.name});l.value=!0,setTimeout((()=>{C.value?.edit(o),console.log(C.value,"cropper")}),100)})),!1;try{u.value=!0,console.log(e.path,r.file);const t=r.file.name,o=t.slice(t.lastIndexOf(".")),n=`${e.path}${e.fileName||Date.now()+o}`,i={filename:n,bucketName:e.bucketName,postData:{filename:n,acl:"public-read",key:n,unknowValueField:[]}},{data:a}=await w(i);h.push({id:r.id,tempFiileBuffer:r.file,policy:a.policy,signature:a.signature,acl:"public-read",key:n,KSSAccessKeyId:a.kssAccessKeyId,name:n})}catch{return u.value=!1,!1}return!0})(t),onFinish:e=>(e=>{const r=h.find((t=>t.id==e.file.id));t("update:fileList",e.file.url),t("readFileInputEventAsArrayBuffer",r.tempFiileBuffer),l.value=!1,u.value=!1})(e),onRemove:e=>(async e=>{console.log("🚀 ~ options",e),t("update:fileList",""),t("remove"),u.value=!1})(e)},{default:()=>["default"===e.showType&&"image"===e.listType&&s(d,{loading:u.value,type:"primary"},{default:()=>[e.text]}),"custom"===e.showType&&o.custom&&o.custom()]}),e.tips&&s("p",{style:"font-size: 13px; color: #666; padding-top: 4px;"},[e.tips]),s(y,{maskClosable:v,show:l.value,"onUpdate:show":e=>l.value=e,preset:"dialog",showIcon:!1,class:["modalTitle background"],title:"上传图片",style:{width:"800px"}},{default:()=>[s(vt,{ref:C,onClose:()=>l.value=!1,onCropperOk:A},null)]})])}}))}}}));