1 |
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.COS=t():e.COS=t()}(this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},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 n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},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=9)}([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},function(e,t,r){"use strict";(function(t){var n=r(0);function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var a=r(12),s=r(14),c=r(15),u=c.XMLParser,l=c.XMLBuilder,d=new u({ignoreDeclaration:!0,ignoreAttributes:!0,parseTagValue:!1}),p=new l,h=r(25),f=r(5);function g(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function m(e,t){var r=[];for(var n in e)e.hasOwnProperty(n)&&r.push(t?g(n).toLowerCase():n);return r.sort((function(e,t){return(e=e.toLowerCase())===(t=t.toLowerCase())?0:e>t?1:-1}))}var y,k=["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"],C=function(e,t,r){var n=t/8,o=e.slice(r,r+n);return new Uint8Array(o).reverse(),new{8:Uint8Array,16:Uint16Array,32:Uint32Array}[t](o)[0]},v=function(e,t,r,n){var o=e.slice(t,r),i="";return new Uint8Array(o).forEach((function(e){i+=String.fromCharCode(e)})),n&&(i=decodeURIComponent(escape(i))),i},b=function(){},S=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},x=function(e,t){var r,n=new FileReader;FileReader.prototype.readAsBinaryString?(r=FileReader.prototype.readAsBinaryString,n.onload=function(){t(this.result)}):FileReader.prototype.readAsArrayBuffer&&(r=function(e){var r="",n=new FileReader;n.onload=function(e){for(var o=new Uint8Array(n.result),i=o.byteLength,a=0;a<i;a++)r+=String.fromCharCode(o[a]);t(r)},n.readAsArrayBuffer(e)}),r.call(n,e)},T=(y=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],n=(e.match(/QQBrowser\/([.\d]+)/)||[])[1];return t&&y(t,"53.0.2785.116")<0&&r&&y(r,"3.53.991.400")<0&&n&&y(n,"9.0.2524.400")<=0||!1}("undefined"!=typeof navigator&&navigator.userAgent)),R=1048576;function B(e){return w(e,(function(e){return"object"===n(e)&&null!==e?B(e):e}))}function A(e,t){return E(t,(function(r,n){e[n]=t[n]})),e}function P(e){return e instanceof Array}function E(e,t){for(var r in e)e.hasOwnProperty(r)&&t(e[r],r)}function w(e,t){var r=P(e)?[]:{};for(var n in e)e.hasOwnProperty(n)&&(r[n]=t(e[n],n));return r}var O=function(e,t){var r=t.Bucket,n=t.Region,o=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&&!n)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&&!n)return"Region";if(!o)return"Key"}return!1},I=function(e,t){if(t=A({},t),"getAuth"!==e&&"getV4Auth"!==e&&"getObjectUrl"!==e){var r=t.Headers||{};if(t&&"object"===n(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","x-cos-callback":"Callback","x-cos-callback-var":"CallbackVar","x-cos-return-body":"ReturnBody"},(function(e,n){void 0!==t[e]&&(r[n]=t[e])})),t.Headers=S(r)}}return t},U=function(e){return Date.now()+(e||0)},N="object"===("undefined"==typeof navigator?"undefined":n(navigator))&&!!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),_="object"===("undefined"==typeof navigator?"undefined":n(navigator))&&/\sQQ/i.test(navigator.userAgent),D={noop:b,formatParams:I,apiWrapper:function(e,t){return function(r,n){var o,i=this;if("function"==typeof r&&(n=r,r={}),r=I(e,r),i.options.EnableReporter)if("sliceUploadFile"===r.calledBySdk||"sliceCopyFile"===r.calledBySdk)o=r.tracker&&r.tracker.generateSubTracker({apiName:e});else if(["uploadFile","uploadFiles"].includes(e))o=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.");o=new f({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=o;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){o&&o.report(e,t),n&&n(c(e),c(t))},l=function(){if("getService"!==e&&"abortUploadTask"!==e){var t=O.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&&r.Region}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&&delete r.AppId}!i.options.UseRawKey&&r.Key&&"/"===r.Key.substr(0,1)&&(r.Key=r.Key.substr(1))}}(),d=["getAuth","getObjectUrl"].includes(e);if("function"==typeof Promise&&!d&&!n)return new Promise((function(e,o){if(n=function(t,r){t?o(t):e(r)},l)return u(D.error(new Error(l)));t.call(i,r,u)}));if(l)return u(D.error(new Error(l)));var p=t.call(i,r,u);return d?p:void 0}},xml2json:function(e){return d.parse(e)},json2xml:function(e){return p.build(e)},md5:a,clearKey:S,fileSlice:function(e,t,r,n,o){var i;if(e.slice?i=e.slice(t,r):e.mozSlice?i=e.mozSlice(t,r):e.webkitSlice&&(i=e.webkitSlice(t,r)),n&&T){var a=new FileReader;a.onload=function(e){i=null,o(new Blob([a.result]))},a.readAsArrayBuffer(i)}else o(i)},getBodyMd5:function(e,t,r,n){r=r||b,e?"string"==typeof t?r(D.md5(t,!0)):Blob&&t instanceof Blob?D.getFileMd5(t,(function(e,t){r(t)}),n):r():r()},getFileMd5:function(e,t,r){var n=e.size,o=0,i=a.getCtx();!function a(s){if(s>=n){var c=i.digest("hex");t(null,c)}else{var u=Math.min(n,s+R);D.fileSlice(e,s,u,!1,(function(e){x(e,(function(t){e=null,i=i.update(t,!0),o+=t.length,t=null,r&&r({loaded:o,total:n,percent:Math.round(o/n*1e4)/1e4}),a(s+R)}))}))}}(0)},b64:function(e){var t,r,n,o="";for(t=0,r=e.length/2;t<r;t++)n=parseInt(e[2*t]+e[2*t+1],16),o+=String.fromCharCode(n);return btoa(o)},extend:A,isArray:P,isInArray:function(e,t){for(var r=!1,n=0;n<e.length;n++)if(t===e[n]){r=!0;break}return r},makeArray:function(e){return P(e)?e:[e]},each:E,map:w,filter:function(e,t){var r=P(e),n=r?[]:{};for(var o in e)e.hasOwnProperty(o)&&t(e[o],o)&&(r?n.push(e[o]):n[o]=e[o]);return n},clone:B,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:g,throttleOnProgress:function(e,t){var r,n,o=this,i=0,a=0,s=Date.now();function c(){if(n=0,t&&"function"==typeof t){r=Date.now();var o,c=Math.max(0,Math.round((a-i)/((r-s)/1e3)*100)/100)||0;o=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:o})}catch(e){}}}return function(t,r){if(t&&(a=t.loaded,e=t.total),r)clearTimeout(n),c();else{if(n)return;n=setTimeout(c,o.options.ProgressInterval)}}},getFileSize:function(e,t,r){var n;"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())?(n=t.Body.size,t.ContentLength=n,r(null,n)):r(D.error(new Error("params body format error, Only allow File|Blob|String.")))},getSkewTime:U,error:function(e,t){var r=e;return e.message=e.message||null,"string"==typeof t?(e.error=t,e.message=t):"object"===n(t)&&null!==t&&(A(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=B(r)),e},obj2str:function(e,t){var r,n,o,i=[],a=m(e);for(r=0;r<a.length;r++)o=void 0===e[n=a[r]]||null===e[n]?"":""+e[n],n=t?g(n).toLowerCase():g(n),o=g(o)||"",i.push(n+"="+o);return i.join("&")},getAuth:function(e){var t,r=(e=e||{}).SecretId,n=e.SecretKey,o=e.KeyTime,i=(e.method||e.Method||"get").toLowerCase(),a=B(e.Query||e.params||{}),c=function(e){var t={};for(var r in e){var n=r.toLowerCase();(n.indexOf("x-cos-")>-1||k.indexOf(n)>-1)&&(t[r]=e[r])}return t}(B(e.Headers||e.headers||{})),u=e.Key||"";e.UseRawKey?t=e.Pathname||e.pathname||"/"+u:0!==(t=e.Pathname||e.pathname||u).indexOf("/")&&(t="/"+t);var l=!1!==e.ForceSignHost;if(!c.Host&&!c.host&&e.Bucket&&e.Region&&l&&(c.Host=e.Bucket+".cos."+e.Region+".myqcloud.com"),!r)throw new Error("missing param SecretId");if(!n)throw new Error("missing param SecretKey");var d=Math.round(U(e.SystemClockOffset)/1e3)-1,p=d,h=e.Expires||e.expires;p+=void 0===h?900:1*h||0;var f=r,g=o||d+";"+p,y=o||d+";"+p,C=m(c,!0).join(";").toLowerCase(),v=m(a,!0).join(";").toLowerCase(),b=s.HmacSHA1(y,n).toString(),S=[i,t,D.obj2str(a,!0),D.obj2str(c,!0),""].join("\n"),x=["sha1",g,s.SHA1(S).toString(),""].join("\n");return["q-sign-algorithm=sha1","q-ak="+f,"q-sign-time="+g,"q-key-time="+y,"q-header-list="+C,"q-url-param-list="+v,"q-signature="+s.HmacSHA1(x,b).toString()].join("&")},parseSelectPayload:function(e){for(var t={},r=v(e),n={records:[]};e.byteLength;){var o,i=C(e,32,0),a=C(e,32,4),s=i-a-16,c=0;for(e=e.slice(12);c<a;){var u=C(e,8,c),l=v(e,c+1,c+1+u),d=C(e,16,c+u+2),p=v(e,c+u+4,c+u+4+d);t[l]=p,c+=u+4+d}if("Records"===t[":event-type"])o=v(e,c,c+s,!0),n.records.push(o);else if("Stats"===t[":event-type"])o=v(e,c,c+s,!0),n.stats=D.xml2json(o).Stats;else if("error"===t[":event-type"]){var h=t[":error-code"],f=t[":error-message"],g=new Error(f);g.message=f,g.name=g.code=h,n.error=g}else["Progress","Continuation","End"].includes(t[":event-type"]);e=e.slice(c+s+4)}return{payload:n.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":n(window))&&"object"===(void 0===t?"undefined":n(t))&&!("object"===("undefined"==typeof globalThis?"undefined":n(globalThis))&&("DedicatedWorkerGlobalScope"===globalThis.constructor.name||globalThis.FileReaderSync))},isCIHost:function(e){return/^https?:\/\/([^/]+\.)?ci\.[^/]+/.test(e)},isIOS_QQ:N&&_,encodeBase64:function(e,t){var r=h.encode(e);return t&&(r=r.replaceAll("+","-").replaceAll("/","_").replaceAll("=","")),r},decodeBase64:function(e){return e?h.decode(e):""},simplifyPath:function(e){var t,r=[],n=o(e.split("/"));try{for(n.s();!(t=n.n()).done;){var i=t.value;".."===i?r.length&&r.pop():i.length&&"."!==i&&r.push(i)}}catch(e){n.e(e)}finally{n.f()}return"/"+r.join("/")},readAsBinaryString:x,parseResBody:function(e){var t;if(e&&"string"==typeof e){var r=e.trim(),n=0===r.indexOf("<"),o=0===r.indexOf("{");if(n)t=D.xml2json(e)||{};else if(o)try{var i=e.replace(/\n/g," "),a=JSON.parse(i);t="[object Object]"===Object.prototype.toString.call(a)?a:e}catch(r){t=e}else t=e}else t=e||{};return t}};e.exports=D}).call(this,r(11))},function(e,t,r){"use strict";const n=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",o="["+n+"]["+(n+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040")+"]*",i=new RegExp("^"+o+"$");t.isExist=function(e){return void 0!==e},t.isEmptyObject=function(e){return 0===Object.keys(e).length},t.merge=function(e,t,r){if(t){const n=Object.keys(t),o=n.length;for(let i=0;i<o;i++)e[n[i]]="strict"===r?[t[n[i]]]:t[n[i]]}},t.getValue=function(e){return t.isExist(e)?e:""},t.isName=function(e){const t=i.exec(e);return!(null==t)},t.getAllMatches=function(e,t){const r=[];let n=t.exec(e);for(;n;){const o=[];o.startIndex=t.lastIndex-n[0].length;const i=n.length;for(let e=0;e<i;e++)o.push(n[e]);r.push(o),n=t.exec(e)}return r},t.nameRegexp=o},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}},function(e,t,r){"use strict";const n=r(2),o={allowBooleanAttributes:!1,unpairedTags:[]};function i(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function a(e,t){const r=t;for(;t<e.length;t++)if("?"!=e[t]&&" "!=e[t]);else{const n=e.substr(r,t-r);if(t>5&&"xml"===n)return f("InvalidXml","XML declaration allowed only at the start of the document.",m(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function s(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let r=1;for(t+=8;t<e.length;t++)if("<"===e[t])r++;else if(">"===e[t]&&(r--,0===r))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}t.validate=function(e,t){t=Object.assign({},o,t);const r=[];let c=!1,u=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let o=0;o<e.length;o++)if("<"===e[o]&&"?"===e[o+1]){if(o+=2,o=a(e,o),o.err)return o}else{if("<"!==e[o]){if(i(e[o]))continue;return f("InvalidChar","char '"+e[o]+"' is not expected.",m(e,o))}{let g=o;if(o++,"!"===e[o]){o=s(e,o);continue}{let y=!1;"/"===e[o]&&(y=!0,o++);let k="";for(;o<e.length&&">"!==e[o]&&" "!==e[o]&&"\t"!==e[o]&&"\n"!==e[o]&&"\r"!==e[o];o++)k+=e[o];if(k=k.trim(),"/"===k[k.length-1]&&(k=k.substring(0,k.length-1),o--),d=k,!n.isName(d)){let t;return t=0===k.trim().length?"Invalid space after '<'.":"Tag '"+k+"' is an invalid name.",f("InvalidTag",t,m(e,o))}const C=l(e,o);if(!1===C)return f("InvalidAttr","Attributes for '"+k+"' have open quote.",m(e,o));let v=C.value;if(o=C.index,"/"===v[v.length-1]){const r=o-v.length;v=v.substring(0,v.length-1);const n=p(v,t);if(!0!==n)return f(n.err.code,n.err.msg,m(e,r+n.err.line));c=!0}else if(y){if(!C.tagClosed)return f("InvalidTag","Closing tag '"+k+"' doesn't have proper closing.",m(e,o));if(v.trim().length>0)return f("InvalidTag","Closing tag '"+k+"' can't have attributes or invalid starting.",m(e,g));if(0===r.length)return f("InvalidTag","Closing tag '"+k+"' has not been opened.",m(e,g));{const t=r.pop();if(k!==t.tagName){let r=m(e,t.tagStartPos);return f("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+r.line+", col "+r.col+") instead of closing tag '"+k+"'.",m(e,g))}0==r.length&&(u=!0)}}else{const n=p(v,t);if(!0!==n)return f(n.err.code,n.err.msg,m(e,o-v.length+n.err.line));if(!0===u)return f("InvalidXml","Multiple possible root nodes found.",m(e,o));-1!==t.unpairedTags.indexOf(k)||r.push({tagName:k,tagStartPos:g}),c=!0}for(o++;o<e.length;o++)if("<"===e[o]){if("!"===e[o+1]){o++,o=s(e,o);continue}if("?"!==e[o+1])break;if(o=a(e,++o),o.err)return o}else if("&"===e[o]){const t=h(e,o);if(-1==t)return f("InvalidChar","char '&' is not expected.",m(e,o));o=t}else if(!0===u&&!i(e[o]))return f("InvalidXml","Extra text at the end",m(e,o));"<"===e[o]&&o--}}}var d;return c?1==r.length?f("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",m(e,r[0].tagStartPos)):!(r.length>0)||f("InvalidXml","Invalid '"+JSON.stringify(r.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):f("InvalidXml","Start tag expected.",1)};const c='"',u="'";function l(e,t){let r="",n="",o=!1;for(;t<e.length;t++){if(e[t]===c||e[t]===u)""===n?n=e[t]:n!==e[t]||(n="");else if(">"===e[t]&&""===n){o=!0;break}r+=e[t]}return""===n&&{value:r,index:t,tagClosed:o}}const d=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function p(e,t){const r=n.getAllMatches(e,d),o={};for(let e=0;e<r.length;e++){if(0===r[e][1].length)return f("InvalidAttr","Attribute '"+r[e][2]+"' has no space in starting.",y(r[e]));if(void 0!==r[e][3]&&void 0===r[e][4])return f("InvalidAttr","Attribute '"+r[e][2]+"' is without value.",y(r[e]));if(void 0===r[e][3]&&!t.allowBooleanAttributes)return f("InvalidAttr","boolean attribute '"+r[e][2]+"' is not allowed.",y(r[e]));const n=r[e][2];if(!g(n))return f("InvalidAttr","Attribute '"+n+"' is an invalid name.",y(r[e]));if(o.hasOwnProperty(n))return f("InvalidAttr","Attribute '"+n+"' is repeated.",y(r[e]));o[n]=1}return!0}function h(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function(e,t){let r=/\d/;for("x"===e[t]&&(t++,r=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(r))break}return-1}(e,++t);let r=0;for(;t<e.length;t++,r++)if(!(e[t].match(/\w/)&&r<20)){if(";"===e[t])break;return-1}return t}function f(e,t,r){return{err:{code:e,msg:t,line:r.line||r,col:r.col}}}function g(e){return n.isName(e)}function m(e,t){const r=e.substring(0,t).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function y(e){return e.startIndex+e[1].length}},function(e,t,r){var n=r(26),o=r(27),i=r(0),a=r(6),s=null,c=function(e){return!e||e<0?0:(e/1e3).toFixed(3)},u=function(){var e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()},l=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))},g=function(){return"object"!==("undefined"==typeof navigator?"undefined":i(navigator))?"unknown device":navigator.userAgent},m=function(){return!("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",k=p(),C=m?y:k,v=g(),b=d();function S(e){return e.replace(/([A-Z])/g,"_$1").toLowerCase()}var x=function(){"use strict";function e(t){n(this,e);var r=t.parent,o=t.traceId,i=t.bucket,c=t.region,l=t.apiName,d=t.realApi,p=t.httpMethod,h=t.fileKey,f=t.fileSize,g=t.accelerate,m=t.customId,y=t.delay,k=t.deepTracker,S=t.Beacon,x=t.clsReporter,T=i&&i.substr(i.lastIndexOf("-")+1)||"";this.parent=r,this.deepTracker=k,this.delay=y,x&&!this.clsReporter&&(this.clsReporter=x),this.params={sdkVersionName:"cos-js-sdk-v5",sdkVersionCode:a.version,osName:C,networkType:"",requestName:l||"",requestResult:"",realApi:d,bucket:i,region:c,accelerate:g,httpMethod:p,url:"",host:"",httpDomain:"",requestPath:h||"",userAgent:v,networkProtocol:b,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:o||u(),appid:T,partNumber:0,httpRetryTimes:0,customId:m||"",partTime:0},S&&(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}(S,y))}return o(e,[{key:"formatResult",value:function(e,t){var r,n,o,i,a,s,u=(new Date).getTime(),d=l(),p=e?(null==e?void 0:e.code)||(null==e||null===(r=e.error)||void 0===r?void 0:r.code)||(null==e||null===(n=e.error)||void 0===n?void 0:n.Code):"",h=e?(null==e?void 0:e.message)||(null==e||null===(o=e.error)||void 0===o?void 0:o.message)||(null==e||null===(i=e.error)||void 0===i?void 0:i.Message):"",f=h,g=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):"",m=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"]),k=e?y?"Server":"Client":"";"getObject"===this.params.requestName&&(this.params.httpSize=t?t.headers&&t.headers["content-length"]:0);var C="sliceUploadFile"===this.params.realApi,v="sliceCopyFile"===this.params.realApi;if(C||v){var b=this.params.httpSize/1024/this.params.partTime;Object.assign(this.params,{httpSpeed:b<0?0:b.toFixed(3)})}else{var S=u-this.params.startTime,x=this.params.httpEndTime-this.params.httpStartTime,T=this.params.httpSize/1024/(x/1e3),R=this.params.md5EndTime-this.params.md5StartTime,B=this.params.signEndTime-this.params.signStartTime;this.parent&&(this.parent.addParamValue("httpTookTime",c(x)),this.parent.addParamValue("httpFullTime",c(S)),this.parent.addParamValue("httpMd5",c(R)),this.parent.addParamValue("httpSign",c(B)),["multipartUpload","uploadPartCopy","putObjectCopy"].includes(this.params.requestName)&&this.parent.addParamValue("partTime",c(x))),Object.assign(this.params,{httpFullTime:c(S),httpMd5:c(R),httpSign:c(B),httpTookTime:c(x),httpSpeed:T<0?0:T.toFixed(3)})}if(Object.assign(this.params,{networkType:d,requestResult:e?"Failure":"Success",errorType:k,errorCode:p,errorHttpCode:m,errorName:f,errorMessage:h,errorServiceName:g,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(e){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={},n=["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"],o=[].concat(n,["errorNode","errorCode","errorName","errorMessage","errorRequestId","errorHttpCode","errorServiceName","errorType","fullError"]),i="Success"===e.requestResult?n:o;for(var a in e)i.includes(a)&&(r[S(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);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},function(e){e.exports=JSON.parse('{"name":"cos-js-sdk-v5","version":"1.8.6","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":{"fast-xml-parser":"^4.4.0"},"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"}}')},function(e,t){var r=function(e){var t={},r=function(e){return!t[e]&&(t[e]=[]),t[e]};e.on=function(e,t){r(e).push(t)},e.off=function(e,t){for(var n=r(e),o=n.length-1;o>=0;o--)t===n[o]&&n.splice(o,1)},e.emit=function(e,t){for(var n=r(e).map((function(e){return e})),o=0;o<n.length;o++)n[o](t)}};e.exports.init=r,e.exports.EventProxy=function(){r(this)}},function(e,t,r){var n,o,i=r(1),a="cos_sdk_upload_cache",s=function(){try{var e=JSON.parse(localStorage.getItem(a))}catch(e){}e||(e=[]),n=e},c=function(){try{n.length?localStorage.setItem(a,JSON.stringify(n)):localStorage.removeItem(a)}catch(e){}},u=function(){if(!n){s.call(this);for(var e=!1,t=Math.round(Date.now()/1e3),r=n.length-1;r>=0;r--){var o=n[r][2];(!o||o+2592e3<t)&&(n.splice(r,1),e=!0)}e&&c()}},l=function(){o||(o=setTimeout((function(){c(),o=null}),400))},d={using:{},setUsing:function(e){d.using[e]=!0},removeUsing:function(e){delete d.using[e]},getFileId:function(e,t,r,n){return e.name&&e.size&&e.lastModifiedDate&&t?i.md5([e.name,e.size,e.lastModifiedDate,t,r,n].join("::")):null},getCopyFileId:function(e,t,r,n,o){var a=t["content-length"],s=t.etag||"",c=t["last-modified"];return e&&r?i.md5([e,a,s,c,r,n,o].join("::")):null},getUploadIdList:function(e){if(!e)return null;u.call(this);for(var t=[],r=0;r<n.length;r++)n[r][0]===e&&t.push(n[r][1]);return t.length?t:null},saveUploadId:function(e,t,r){if(u.call(this),e){for(var o=n.length-1;o>=0;o--){var i=n[o];i[0]===e&&i[1]===t&&n.splice(o,1)}n.unshift([e,t,Math.round(Date.now()/1e3)]),n.length>r&&n.splice(r),l()}},removeUploadId:function(e){u.call(this),delete d.using[e];for(var t=n.length-1;t>=0;t--)n[t][1]===e&&n.splice(t,1);l()}};e.exports=d},function(e,t,r){var n=r(10);e.exports=n},function(e,t,r){"use strict";var n=r(1),o=r(7),i=r(30),a=r(31),s=r(33),c=r(6),u={AppId:"",SecretId:"",SecretKey:"",SecurityToken:"",StartTime:0,ExpiredTime:0,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,ObjectKeySimplifyCheck:!0,DeepTracker:!1,TrackerDelay:5e3,CustomId:"",BeaconReporter:null,ClsReporter:null},l=function(e){if(this.options=n.extend(n.clone(u),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,this.options.SecretId&&this.options.SecretId.indexOf(" "),this.options.SecretKey&&this.options.SecretKey.indexOf(" "),n.isNode(),this.options.ForcePathStyle)throw new Error("ForcePathStyle is not supported");o.init(this),i.init(this)};a.init(l,i),s.init(l,i),l.util={md5:n.md5,xml2json:n.xml2json,json2xml:n.json2xml,encodeBase64:n.encodeBase64},l.getAuthorization=n.getAuth,l.version=c.version,e.exports=l},function(e,t){var r,n,o=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{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var c,u=[],l=!1,d=-1;function p(){l&&c&&(l=!1,c.length?u=c.concat(u):d=-1,u.length&&h())}function h(){if(!l){var e=s(p);l=!0;for(var t=u.length;t;){for(c=u,u=[];++d<t;)c&&c[d].run();d=-1,t=u.length}c=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function g(){}o.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];u.push(new f(e,t)),1!==u.length||l||s(h)},f.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,r){(function(e){var t,n=r(0);!function(){"use strict";var o="object"===("undefined"==typeof window?"undefined":n(window)),i=o?window:{};i.JS_MD5_NO_WINDOW&&(o=!1),!o&&"object"===("undefined"==typeof self?"undefined":n(self))&&(i=self);var a,s=!i.JS_MD5_NO_COMMON_JS&&"object"===n(e)&&e.exports,c=r(13),u=!i.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,l="0123456789abcdef".split(""),d=[128,32768,8388608,-2147483648],p=[0,8,16,24],h=["hex","array","digest","buffer","arrayBuffer","base64"],f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),g=[];if(u){var m=new ArrayBuffer(68);a=new Uint8Array(m),g=new Uint32Array(m)}!i.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!u||!i.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===n(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer});var y=function(e){return function(t,r){return new k(!0).update(t,r)[e]()}};function k(e){if(e)g[0]=g[16]=g[1]=g[2]=g[3]=g[4]=g[5]=g[6]=g[7]=g[8]=g[9]=g[10]=g[11]=g[12]=g[13]=g[14]=g[15]=0,this.blocks=g,this.buffer8=a;else if(u){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}k.prototype.update=function(e,t){if(!this.finalized){for(var r,n,o=0,i=e.length,a=this.blocks,s=this.buffer8;o<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),u)for(n=this.start;o<i&&n<64;++o)r=e.charCodeAt(o),t||r<128?s[n++]=r:r<2048?(s[n++]=192|r>>6,s[n++]=128|63&r):r<55296||r>=57344?(s[n++]=224|r>>12,s[n++]=128|r>>6&63,s[n++]=128|63&r):(r=65536+((1023&r)<<10|1023&e.charCodeAt(++o)),s[n++]=240|r>>18,s[n++]=128|r>>12&63,s[n++]=128|r>>6&63,s[n++]=128|63&r);else for(n=this.start;o<i&&n<64;++o)r=e.charCodeAt(o),t||r<128?a[n>>2]|=r<<p[3&n++]:r<2048?(a[n>>2]|=(192|r>>6)<<p[3&n++],a[n>>2]|=(128|63&r)<<p[3&n++]):r<55296||r>=57344?(a[n>>2]|=(224|r>>12)<<p[3&n++],a[n>>2]|=(128|r>>6&63)<<p[3&n++],a[n>>2]|=(128|63&r)<<p[3&n++]):(r=65536+((1023&r)<<10|1023&e.charCodeAt(++o)),a[n>>2]|=(240|r>>18)<<p[3&n++],a[n>>2]|=(128|r>>12&63)<<p[3&n++],a[n>>2]|=(128|r>>6&63)<<p[3&n++],a[n>>2]|=(128|63&r)<<p[3&n++]);this.lastByteIndex=n,this.bytes+=n-this.start,n>=64?(this.start=n-64,this.hash(),this.hashed=!0):this.start=n}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this}},k.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()}},k.prototype.hash=function(){var e,t,r,n,o,i,a=this.blocks;this.first?t=((t=((e=((e=a[0]-680876937)<<7|e>>>25)-271733879|0)^(r=((r=(-271733879^(n=((n=(-1732584194^2004318071&e)+a[1]-117830708)<<12|n>>>20)+e|0)&(-271733879^e))+a[2]-1126478375)<<17|r>>>15)+n|0)&(n^e))+a[3]-1316259209)<<22|t>>>10)+r|0:(e=this.h0,t=this.h1,r=this.h2,t=((t+=((e=((e+=((n=this.h3)^t&(r^n))+a[0]-680876936)<<7|e>>>25)+t|0)^(r=((r+=(t^(n=((n+=(r^e&(t^r))+a[1]-389564586)<<12|n>>>20)+e|0)&(e^t))+a[2]+606105819)<<17|r>>>15)+n|0)&(n^e))+a[3]-1044525330)<<22|t>>>10)+r|0),t=((t+=((e=((e+=(n^t&(r^n))+a[4]-176418897)<<7|e>>>25)+t|0)^(r=((r+=(t^(n=((n+=(r^e&(t^r))+a[5]+1200080426)<<12|n>>>20)+e|0)&(e^t))+a[6]-1473231341)<<17|r>>>15)+n|0)&(n^e))+a[7]-45705983)<<22|t>>>10)+r|0,t=((t+=((e=((e+=(n^t&(r^n))+a[8]+1770035416)<<7|e>>>25)+t|0)^(r=((r+=(t^(n=((n+=(r^e&(t^r))+a[9]-1958414417)<<12|n>>>20)+e|0)&(e^t))+a[10]-42063)<<17|r>>>15)+n|0)&(n^e))+a[11]-1990404162)<<22|t>>>10)+r|0,t=((t+=((e=((e+=(n^t&(r^n))+a[12]+1804603682)<<7|e>>>25)+t|0)^(r=((r+=(t^(n=((n+=(r^e&(t^r))+a[13]-40341101)<<12|n>>>20)+e|0)&(e^t))+a[14]-1502002290)<<17|r>>>15)+n|0)&(n^e))+a[15]+1236535329)<<22|t>>>10)+r|0,t=((t+=((n=((n+=(t^r&((e=((e+=(r^n&(t^r))+a[1]-165796510)<<5|e>>>27)+t|0)^t))+a[6]-1069501632)<<9|n>>>23)+e|0)^e&((r=((r+=(e^t&(n^e))+a[11]+643717713)<<14|r>>>18)+n|0)^n))+a[0]-373897302)<<20|t>>>12)+r|0,t=((t+=((n=((n+=(t^r&((e=((e+=(r^n&(t^r))+a[5]-701558691)<<5|e>>>27)+t|0)^t))+a[10]+38016083)<<9|n>>>23)+e|0)^e&((r=((r+=(e^t&(n^e))+a[15]-660478335)<<14|r>>>18)+n|0)^n))+a[4]-405537848)<<20|t>>>12)+r|0,t=((t+=((n=((n+=(t^r&((e=((e+=(r^n&(t^r))+a[9]+568446438)<<5|e>>>27)+t|0)^t))+a[14]-1019803690)<<9|n>>>23)+e|0)^e&((r=((r+=(e^t&(n^e))+a[3]-187363961)<<14|r>>>18)+n|0)^n))+a[8]+1163531501)<<20|t>>>12)+r|0,t=((t+=((n=((n+=(t^r&((e=((e+=(r^n&(t^r))+a[13]-1444681467)<<5|e>>>27)+t|0)^t))+a[2]-51403784)<<9|n>>>23)+e|0)^e&((r=((r+=(e^t&(n^e))+a[7]+1735328473)<<14|r>>>18)+n|0)^n))+a[12]-1926607734)<<20|t>>>12)+r|0,t=((t+=((i=(n=((n+=((o=t^r)^(e=((e+=(o^n)+a[5]-378558)<<4|e>>>28)+t|0))+a[8]-2022574463)<<11|n>>>21)+e|0)^e)^(r=((r+=(i^t)+a[11]+1839030562)<<16|r>>>16)+n|0))+a[14]-35309556)<<23|t>>>9)+r|0,t=((t+=((i=(n=((n+=((o=t^r)^(e=((e+=(o^n)+a[1]-1530992060)<<4|e>>>28)+t|0))+a[4]+1272893353)<<11|n>>>21)+e|0)^e)^(r=((r+=(i^t)+a[7]-155497632)<<16|r>>>16)+n|0))+a[10]-1094730640)<<23|t>>>9)+r|0,t=((t+=((i=(n=((n+=((o=t^r)^(e=((e+=(o^n)+a[13]+681279174)<<4|e>>>28)+t|0))+a[0]-358537222)<<11|n>>>21)+e|0)^e)^(r=((r+=(i^t)+a[3]-722521979)<<16|r>>>16)+n|0))+a[6]+76029189)<<23|t>>>9)+r|0,t=((t+=((i=(n=((n+=((o=t^r)^(e=((e+=(o^n)+a[9]-640364487)<<4|e>>>28)+t|0))+a[12]-421815835)<<11|n>>>21)+e|0)^e)^(r=((r+=(i^t)+a[15]+530742520)<<16|r>>>16)+n|0))+a[2]-995338651)<<23|t>>>9)+r|0,t=((t+=((n=((n+=(t^((e=((e+=(r^(t|~n))+a[0]-198630844)<<6|e>>>26)+t|0)|~r))+a[7]+1126891415)<<10|n>>>22)+e|0)^((r=((r+=(e^(n|~t))+a[14]-1416354905)<<15|r>>>17)+n|0)|~e))+a[5]-57434055)<<21|t>>>11)+r|0,t=((t+=((n=((n+=(t^((e=((e+=(r^(t|~n))+a[12]+1700485571)<<6|e>>>26)+t|0)|~r))+a[3]-1894986606)<<10|n>>>22)+e|0)^((r=((r+=(e^(n|~t))+a[10]-1051523)<<15|r>>>17)+n|0)|~e))+a[1]-2054922799)<<21|t>>>11)+r|0,t=((t+=((n=((n+=(t^((e=((e+=(r^(t|~n))+a[8]+1873313359)<<6|e>>>26)+t|0)|~r))+a[15]-30611744)<<10|n>>>22)+e|0)^((r=((r+=(e^(n|~t))+a[6]-1560198380)<<15|r>>>17)+n|0)|~e))+a[13]+1309151649)<<21|t>>>11)+r|0,t=((t+=((n=((n+=(t^((e=((e+=(r^(t|~n))+a[4]-145523070)<<6|e>>>26)+t|0)|~r))+a[11]-1120210379)<<10|n>>>22)+e|0)^((r=((r+=(e^(n|~t))+a[2]+718787259)<<15|r>>>17)+n|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=n+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+n|0)},k.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,n=this.h3;return l[e>>4&15]+l[15&e]+l[e>>12&15]+l[e>>8&15]+l[e>>20&15]+l[e>>16&15]+l[e>>28&15]+l[e>>24&15]+l[t>>4&15]+l[15&t]+l[t>>12&15]+l[t>>8&15]+l[t>>20&15]+l[t>>16&15]+l[t>>28&15]+l[t>>24&15]+l[r>>4&15]+l[15&r]+l[r>>12&15]+l[r>>8&15]+l[r>>20&15]+l[r>>16&15]+l[r>>28&15]+l[r>>24&15]+l[n>>4&15]+l[15&n]+l[n>>12&15]+l[n>>8&15]+l[n>>20&15]+l[n>>16&15]+l[n>>28&15]+l[n>>24&15]},k.prototype.toString=k.prototype.hex,k.prototype.digest=function(e){if("hex"===e)return this.hex();this.finalize();var t=this.h0,r=this.h1,n=this.h2,o=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&n,n>>8&255,n>>16&255,n>>24&255,255&o,o>>8&255,o>>16&255,o>>24&255]},k.prototype.array=k.prototype.digest,k.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},k.prototype.buffer=k.prototype.arrayBuffer,k.prototype.base64=function(){for(var e,t,r,n="",o=this.array(),i=0;i<15;)e=o[i++],t=o[i++],r=o[i++],n+=f[e>>>2]+f[63&(e<<4|t>>>4)]+f[63&(t<<2|r>>>6)]+f[63&r];return e=o[i],n+=f[e>>>2]+f[e<<4&63]+"=="};var C=function(){var e=y("hex");e.getCtx=e.create=function(){return new k},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=C:(i.md5=C,c&&(void 0===(t=function(){return C}.call(C,r,C,e))||(e.exports=t)))}()}).call(this,r(3)(e))},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,r){(function(e){var t,n,o,i,a,s,c,u=r(0),l=l||function(e,t){var r={},n=r.lib={},o=function(){},i=n.Base={extend:function(e){o.prototype=this;var t=new o;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=n.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,n=this.sigBytes;if(e=e.sigBytes,this.clamp(),n%4)for(var o=0;o<e;o++)t[n+o>>>2]|=(r[o>>>2]>>>24-o%4*8&255)<<24-(n+o)%4*8;else if(65535<r.length)for(o=0;o<e;o+=4)t[n+o>>>2]=r[o>>>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=[],n=0;n<t;n+=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=[],n=0;n<e;n++){var o=t[n>>>2]>>>24-n%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new a.init(r,t/2)}},u=s.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var r=[],n=0;n<e;n++)r.push(String.fromCharCode(t[n>>>2]>>>24-n%4*8&255));return r.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new a.init(r,t)}},l=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},d=n.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r=this._data,n=r.words,o=r.sigBytes,i=this.blockSize,s=o/(4*i);if(t=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*i,o=e.min(4*t,o),t){for(var c=0;c<t;c+=i)this._doProcessBlock(n,c);c=n.splice(0,t),r.sigBytes-=o}return new a.init(c,o)},clone:function(){var e=i.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});n.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);n=(a=(t=l).lib).WordArray,o=a.Hasher,i=[],a=t.algo.SHA1=o.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],o=r[1],a=r[2],s=r[3],c=r[4],u=0;80>u;u++){if(16>u)i[u]=0|e[t+u];else{var l=i[u-3]^i[u-8]^i[u-14]^i[u-16];i[u]=l<<1|l>>>31}l=(n<<5|n>>>27)+c+i[u],l=20>u?l+(1518500249+(o&a|~o&s)):40>u?l+(1859775393+(o^a^s)):60>u?l+((o&a|o&s|a&s)-1894007588):l+((o^a^s)-899497514),c=s,s=a,a=o<<30|o>>>2,o=n,n=l}r[0]=r[0]+n|0,r[1]=r[1]+o|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,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}}),t.SHA1=o._createHelper(a),t.HmacSHA1=o._createHmacHelper(a),function(){var e=l,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 n=e.blockSize,o=4*n;r.sigBytes>o&&(r=e.finalize(r)),r.clamp();for(var i=this._oKey=r.clone(),a=this._iKey=r.clone(),s=i.words,c=a.words,u=0;u<n;u++)s[u]^=1549556828,c[u]^=909522486;i.sigBytes=a.sigBytes=o,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=l).lib.WordArray,s.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var o=[],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++)o.push(n.charAt(a>>>6*(3-s)&63));var c=n.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e){var t=e.length,r=this._map,n=r.charAt(64);if(n){var o=e.indexOf(n);-1!=o&&(t=o)}for(var i=[],a=0,s=0;s<t;s++)if(s%4){var u=r.indexOf(e.charAt(s-1))<<s%4*2,l=r.indexOf(e.charAt(s))>>>6-s%4*2;i[a>>>2]|=(u|l)<<24-a%4*8,a++}return c.create(i,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},"object"===u(e)?e.exports=l:window.CryptoJS=l}).call(this,r(3)(e))},function(e,t,r){"use strict";const n=r(4),o=r(16),i=r(23);e.exports={XMLParser:o,XMLValidator:n,XMLBuilder:i}},function(e,t,r){const{buildOptions:n}=r(17),o=r(18),{prettify:i}=r(22),a=r(4);e.exports=class{constructor(e){this.externalEntities={},this.options=n(e)}parse(e,t){if("string"==typeof e);else{if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(t){!0===t&&(t={});const r=a.validate(e,t);if(!0!==r)throw Error(`${r.err.msg}:${r.err.line}:${r.err.col}`)}const r=new o(this.options);r.addExternalEntities(this.externalEntities);const n=r.parseXml(e);return this.options.preserveOrder||void 0===n?n:i(n,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}}},function(e,t){const r={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,r){return e}};t.buildOptions=function(e){return Object.assign({},r,e)},t.defaultOptions=r},function(e,t,r){"use strict";const n=r(2),o=r(19),i=r(20),a=r(21);function s(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const n=t[r];this.lastEntities[n]={regex:new RegExp("&"+n+";","g"),val:e[n]}}}function c(e,t,r,n,o,i,a){if(void 0!==e&&(this.options.trimValues&&!n&&(e=e.trim()),e.length>0)){a||(e=this.replaceEntitiesValue(e));const n=this.options.tagValueProcessor(t,e,r,o,i);if(null==n)return e;if(typeof n!=typeof e||n!==e)return n;if(this.options.trimValues)return v(e,this.options.parseTagValue,this.options.numberParseOptions);return e.trim()===e?v(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function u(e){if(this.options.removeNSPrefix){const t=e.split(":"),r="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=r+t[1])}return e}const l=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function d(e,t,r){if(!this.options.ignoreAttributes&&"string"==typeof e){const r=n.getAllMatches(e,l),o=r.length,i={};for(let e=0;e<o;e++){const n=this.resolveNameSpace(r[e][1]);let o=r[e][4],a=this.options.attributeNamePrefix+n;if(n.length)if(this.options.transformAttributeName&&(a=this.options.transformAttributeName(a)),"__proto__"===a&&(a="#__proto__"),void 0!==o){this.options.trimValues&&(o=o.trim()),o=this.replaceEntitiesValue(o);const e=this.options.attributeValueProcessor(n,o,t);i[a]=null==e?o:typeof e!=typeof o||e!==o?e:v(o,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(i[a]=!0)}if(!Object.keys(i).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=i,e}return i}}const p=function(e){e=e.replace(/\r\n?/g,"\n");const t=new o("!xml");let r=t,n="",a="";for(let s=0;s<e.length;s++){if("<"===e[s])if("/"===e[s+1]){const t=y(e,">",s,"Closing Tag is not closed.");let o=e.substring(s+2,t).trim();if(this.options.removeNSPrefix){const e=o.indexOf(":");-1!==e&&(o=o.substr(e+1))}this.options.transformTagName&&(o=this.options.transformTagName(o)),r&&(n=this.saveTextToParentTag(n,r,a));const i=a.substring(a.lastIndexOf(".")+1);if(o&&-1!==this.options.unpairedTags.indexOf(o))throw new Error(`Unpaired tag can not be used as closing tag: </${o}>`);let c=0;i&&-1!==this.options.unpairedTags.indexOf(i)?(c=a.lastIndexOf(".",a.lastIndexOf(".")-1),this.tagsNodeStack.pop()):c=a.lastIndexOf("."),a=a.substring(0,c),r=this.tagsNodeStack.pop(),n="",s=t}else if("?"===e[s+1]){let t=k(e,s,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,a),this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags);else{const e=new o(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,a,t.tagName)),this.addChild(r,e,a)}s=t.closeIndex+1}else if("!--"===e.substr(s+1,3)){const t=y(e,"--\x3e",s+4,"Comment is not closed.");if(this.options.commentPropName){const o=e.substring(s+4,t-2);n=this.saveTextToParentTag(n,r,a),r.add(this.options.commentPropName,[{[this.options.textNodeName]:o}])}s=t}else if("!D"===e.substr(s+1,2)){const t=i(e,s);this.docTypeEntities=t.entities,s=t.i}else if("!["===e.substr(s+1,2)){const t=y(e,"]]>",s,"CDATA is not closed.")-2,o=e.substring(s+9,t);n=this.saveTextToParentTag(n,r,a);let i=this.parseTextData(o,r.tagname,a,!0,!1,!0,!0);null==i&&(i=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:o}]):r.add(this.options.textNodeName,i),s=t+2}else{let i=k(e,s,this.options.removeNSPrefix),c=i.tagName;const u=i.rawTagName;let l=i.tagExp,d=i.attrExpPresent,p=i.closeIndex;this.options.transformTagName&&(c=this.options.transformTagName(c)),r&&n&&"!xml"!==r.tagname&&(n=this.saveTextToParentTag(n,r,a,!1));const h=r;if(h&&-1!==this.options.unpairedTags.indexOf(h.tagname)&&(r=this.tagsNodeStack.pop(),a=a.substring(0,a.lastIndexOf("."))),c!==t.tagname&&(a+=a?"."+c:c),this.isItStopNode(this.options.stopNodes,a,c)){let t="";if(l.length>0&&l.lastIndexOf("/")===l.length-1)"/"===c[c.length-1]?(c=c.substr(0,c.length-1),a=a.substr(0,a.length-1),l=c):l=l.substr(0,l.length-1),s=i.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(c))s=i.closeIndex;else{const r=this.readStopNodeData(e,u,p+1);if(!r)throw new Error(`Unexpected end of ${u}`);s=r.i,t=r.tagContent}const n=new o(c);c!==l&&d&&(n[":@"]=this.buildAttributesMap(l,a,c)),t&&(t=this.parseTextData(t,c,a,!0,d,!0,!0)),a=a.substr(0,a.lastIndexOf(".")),n.add(this.options.textNodeName,t),this.addChild(r,n,a)}else{if(l.length>0&&l.lastIndexOf("/")===l.length-1){"/"===c[c.length-1]?(c=c.substr(0,c.length-1),a=a.substr(0,a.length-1),l=c):l=l.substr(0,l.length-1),this.options.transformTagName&&(c=this.options.transformTagName(c));const e=new o(c);c!==l&&d&&(e[":@"]=this.buildAttributesMap(l,a,c)),this.addChild(r,e,a),a=a.substr(0,a.lastIndexOf("."))}else{const e=new o(c);this.tagsNodeStack.push(r),c!==l&&d&&(e[":@"]=this.buildAttributesMap(l,a,c)),this.addChild(r,e,a),r=e}n="",s=p}}else n+=e[s]}return t.child};function h(e,t,r){const n=this.options.updateTag(t.tagname,r,t[":@"]);!1===n||("string"==typeof n?(t.tagname=n,e.addChild(t)):e.addChild(t))}const f=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const r=this.docTypeEntities[t];e=e.replace(r.regx,r.val)}for(let t in this.lastEntities){const r=this.lastEntities[t];e=e.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const r=this.htmlEntities[t];e=e.replace(r.regex,r.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function g(e,t,r,n){return e&&(void 0===n&&(n=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,r,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,n))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function m(e,t,r){const n="*."+r;for(const r in e){const o=e[r];if(n===o||t===o)return!0}return!1}function y(e,t,r,n){const o=e.indexOf(t,r);if(-1===o)throw new Error(n);return o+t.length-1}function k(e,t,r,n=">"){const o=function(e,t,r=">"){let n,o="";for(let i=t;i<e.length;i++){let t=e[i];if(n)t===n&&(n="");else if('"'===t||"'"===t)n=t;else if(t===r[0]){if(!r[1])return{data:o,index:i};if(e[i+1]===r[1])return{data:o,index:i}}else"\t"===t&&(t=" ");o+=t}}(e,t+1,n);if(!o)return;let i=o.data;const a=o.index,s=i.search(/\s/);let c=i,u=!0;-1!==s&&(c=i.substring(0,s),i=i.substring(s+1).trimStart());const l=c;if(r){const e=c.indexOf(":");-1!==e&&(c=c.substr(e+1),u=c!==o.data.substr(e+1))}return{tagName:c,tagExp:i,closeIndex:a,attrExpPresent:u,rawTagName:l}}function C(e,t,r){const n=r;let o=1;for(;r<e.length;r++)if("<"===e[r])if("/"===e[r+1]){const i=y(e,">",r,`${t} is not closed`);if(e.substring(r+2,i).trim()===t&&(o--,0===o))return{tagContent:e.substring(n,r),i:i};r=i}else if("?"===e[r+1]){r=y(e,"?>",r+1,"StopNode is not closed.")}else if("!--"===e.substr(r+1,3)){r=y(e,"--\x3e",r+3,"StopNode is not closed.")}else if("!["===e.substr(r+1,2)){r=y(e,"]]>",r,"StopNode is not closed.")-2}else{const n=k(e,r,">");if(n){(n&&n.tagName)===t&&"/"!==n.tagExp[n.tagExp.length-1]&&o++,r=n.closeIndex}}}function v(e,t,r){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&a(e,r)}return n.isExist(e)?e:""}e.exports=class{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,16))}},this.addExternalEntities=s,this.parseXml=p,this.parseTextData=c,this.resolveNameSpace=u,this.buildAttributesMap=d,this.isItStopNode=m,this.replaceEntitiesValue=f,this.readStopNodeData=C,this.saveTextToParentTag=g,this.addChild=h}}},function(e,t,r){"use strict";e.exports=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}},function(e,t,r){const n=r(2);function o(e,t){let r="";for(;t<e.length&&"'"!==e[t]&&'"'!==e[t];t++)r+=e[t];if(r=r.trim(),-1!==r.indexOf(" "))throw new Error("External entites are not supported");const n=e[t++];let o="";for(;t<e.length&&e[t]!==n;t++)o+=e[t];return[r,o,t]}function i(e,t){return"!"===e[t+1]&&"-"===e[t+2]&&"-"===e[t+3]}function a(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"N"===e[t+3]&&"T"===e[t+4]&&"I"===e[t+5]&&"T"===e[t+6]&&"Y"===e[t+7]}function s(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"L"===e[t+3]&&"E"===e[t+4]&&"M"===e[t+5]&&"E"===e[t+6]&&"N"===e[t+7]&&"T"===e[t+8]}function c(e,t){return"!"===e[t+1]&&"A"===e[t+2]&&"T"===e[t+3]&&"T"===e[t+4]&&"L"===e[t+5]&&"I"===e[t+6]&&"S"===e[t+7]&&"T"===e[t+8]}function u(e,t){return"!"===e[t+1]&&"N"===e[t+2]&&"O"===e[t+3]&&"T"===e[t+4]&&"A"===e[t+5]&&"T"===e[t+6]&&"I"===e[t+7]&&"O"===e[t+8]&&"N"===e[t+9]}function l(e){if(n.isName(e))return e;throw new Error(`Invalid entity name ${e}`)}e.exports=function(e,t){const r={};if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw new Error("Invalid Tag instead of DOCTYPE");{t+=9;let n=1,d=!1,p=!1,h="";for(;t<e.length;t++)if("<"!==e[t]||p)if(">"===e[t]){if(p?"-"===e[t-1]&&"-"===e[t-2]&&(p=!1,n--):n--,0===n)break}else"["===e[t]?d=!0:h+=e[t];else{if(d&&a(e,t))t+=7,[entityName,val,t]=o(e,t+1),-1===val.indexOf("&")&&(r[l(entityName)]={regx:RegExp(`&${entityName};`,"g"),val:val});else if(d&&s(e,t))t+=8;else if(d&&c(e,t))t+=8;else if(d&&u(e,t))t+=9;else{if(!i)throw new Error("Invalid DOCTYPE");p=!0}n++,h=""}if(0!==n)throw new Error("Unclosed DOCTYPE")}return{entities:r,i:t}}},function(e,t){const r=/^[-+]?0x[a-fA-F0-9]+$/,n=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const o={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};e.exports=function(e,t={}){if(t=Object.assign({},o,t),!e||"string"!=typeof e)return e;let i=e.trim();if(void 0!==t.skipLike&&t.skipLike.test(i))return e;if(t.hex&&r.test(i))return Number.parseInt(i,16);{const r=n.exec(i);if(r){const n=r[1],o=r[2];let a=function(e){if(e&&-1!==e.indexOf("."))return"."===(e=e.replace(/0+$/,""))?e="0":"."===e[0]?e="0"+e:"."===e[e.length-1]&&(e=e.substr(0,e.length-1)),e;return e}(r[3]);const s=r[4]||r[6];if(!t.leadingZeros&&o.length>0&&n&&"."!==i[2])return e;if(!t.leadingZeros&&o.length>0&&!n&&"."!==i[1])return e;{const r=Number(i),c=""+r;return-1!==c.search(/[eE]/)||s?t.eNotation?r:e:-1!==i.indexOf(".")?"0"===c&&""===a||c===a||n&&c==="-"+a?r:e:o?a===c||n+a===c?r:e:i===c||i===n+c?r:e}}return e}}},function(e,t,r){"use strict";function n(e,t,r){let s;const c={};for(let u=0;u<e.length;u++){const l=e[u],d=o(l);let p="";if(p=void 0===r?d:r+"."+d,d===t.textNodeName)void 0===s?s=l[d]:s+=""+l[d];else{if(void 0===d)continue;if(l[d]){let e=n(l[d],t,p);const r=a(e,t);l[":@"]?i(e,l[":@"],p,t):1!==Object.keys(e).length||void 0===e[t.textNodeName]||t.alwaysCreateTextNode?0===Object.keys(e).length&&(t.alwaysCreateTextNode?e[t.textNodeName]="":e=""):e=e[t.textNodeName],void 0!==c[d]&&c.hasOwnProperty(d)?(Array.isArray(c[d])||(c[d]=[c[d]]),c[d].push(e)):t.isArray(d,p,r)?c[d]=[e]:c[d]=e}}}return"string"==typeof s?s.length>0&&(c[t.textNodeName]=s):void 0!==s&&(c[t.textNodeName]=s),c}function o(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const r=t[e];if(":@"!==r)return r}}function i(e,t,r,n){if(t){const o=Object.keys(t),i=o.length;for(let a=0;a<i;a++){const i=o[a];n.isArray(i,r+"."+i,!0,!0)?e[i]=[t[i]]:e[i]=t[i]}}}function a(e,t){const{textNodeName:r}=t,n=Object.keys(e).length;return 0===n||!(1!==n||!e[r]&&"boolean"!=typeof e[r]&&0!==e[r])}t.prettify=function(e,t){return n(e,t)}},function(e,t,r){"use strict";const n=r(24),o={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function i(e){this.options=Object.assign({},o,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=c),this.processTextOrObjNode=a,this.options.format?(this.indentate=s,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function a(e,t,r){const n=this.j2x(e,r+1);return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,n.attrStr,r):this.buildObjectNode(n.val,t,n.attrStr,r)}function s(e){return this.options.indentBy.repeat(e)}function c(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}i.prototype.build=function(e){return this.options.preserveOrder?n(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0).val)},i.prototype.j2x=function(e,t){let r="",n="";for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o))if(void 0===e[o])this.isAttribute(o)&&(n+="");else if(null===e[o])this.isAttribute(o)?n+="":"?"===o[0]?n+=this.indentate(t)+"<"+o+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+o+"/"+this.tagEndChar;else if(e[o]instanceof Date)n+=this.buildTextValNode(e[o],o,"",t);else if("object"!=typeof e[o]){const i=this.isAttribute(o);if(i)r+=this.buildAttrPairStr(i,""+e[o]);else if(o===this.options.textNodeName){let t=this.options.tagValueProcessor(o,""+e[o]);n+=this.replaceEntitiesValue(t)}else n+=this.buildTextValNode(e[o],o,"",t)}else if(Array.isArray(e[o])){const r=e[o].length;let i="";for(let a=0;a<r;a++){const r=e[o][a];void 0===r||(null===r?"?"===o[0]?n+=this.indentate(t)+"<"+o+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+o+"/"+this.tagEndChar:"object"==typeof r?this.options.oneListGroup?i+=this.j2x(r,t+1).val:i+=this.processTextOrObjNode(r,o,t):i+=this.buildTextValNode(r,o,"",t))}this.options.oneListGroup&&(i=this.buildObjectNode(i,o,"",t)),n+=i}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName){const t=Object.keys(e[o]),n=t.length;for(let i=0;i<n;i++)r+=this.buildAttrPairStr(t[i],""+e[o][t[i]])}else n+=this.processTextOrObjNode(e[o],o,t);return{attrStr:r,val:n}},i.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},i.prototype.buildObjectNode=function(e,t,r,n){if(""===e)return"?"===t[0]?this.indentate(n)+"<"+t+r+"?"+this.tagEndChar:this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar;{let o="</"+t+this.tagEndChar,i="";return"?"===t[0]&&(i="?",o=""),!r&&""!==r||-1!==e.indexOf("<")?!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===i.length?this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(n)+"<"+t+r+i+this.tagEndChar+e+this.indentate(n)+o:this.indentate(n)+"<"+t+r+i+">"+e+o}},i.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${e}`,t},i.prototype.buildTextValNode=function(e,t,r,n){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(n)+"<"+t+r+"?"+this.tagEndChar;{let o=this.options.tagValueProcessor(t,e);return o=this.replaceEntitiesValue(o),""===o?this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar:this.indentate(n)+"<"+t+r+">"+o+"</"+t+this.tagEndChar}},i.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const r=this.options.entities[t];e=e.replace(r.regex,r.val)}return e},e.exports=i},function(e,t){function r(e,t,s,c){let u="",l=!1;for(let d=0;d<e.length;d++){const p=e[d],h=n(p);if(void 0===h)continue;let f="";if(f=0===s.length?h:`${s}.${h}`,h===t.textNodeName){let e=p[h];i(f,t)||(e=t.tagValueProcessor(h,e),e=a(e,t)),l&&(u+=c),u+=e,l=!1;continue}if(h===t.cdataPropName){l&&(u+=c),u+=`<![CDATA[${p[h][0][t.textNodeName]}]]>`,l=!1;continue}if(h===t.commentPropName){u+=c+`\x3c!--${p[h][0][t.textNodeName]}--\x3e`,l=!0;continue}if("?"===h[0]){const e=o(p[":@"],t),r="?xml"===h?"":c;let n=p[h][0][t.textNodeName];n=0!==n.length?" "+n:"",u+=r+`<${h}${n}${e}?>`,l=!0;continue}let g=c;""!==g&&(g+=t.indentBy);const m=c+`<${h}${o(p[":@"],t)}`,y=r(p[h],t,f,g);-1!==t.unpairedTags.indexOf(h)?t.suppressUnpairedNode?u+=m+">":u+=m+"/>":y&&0!==y.length||!t.suppressEmptyNode?y&&y.endsWith(">")?u+=m+`>${y}${c}</${h}>`:(u+=m+">",y&&""!==c&&(y.includes("/>")||y.includes("</"))?u+=c+t.indentBy+y+c:u+=y,u+=`</${h}>`):u+=m+"/>",l=!0}return u}function n(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const n=t[r];if(e.hasOwnProperty(n)&&":@"!==n)return n}}function o(e,t){let r="";if(e&&!t.ignoreAttributes)for(let n in e){if(!e.hasOwnProperty(n))continue;let o=t.attributeValueProcessor(n,e[n]);o=a(o,t),!0===o&&t.suppressBooleanAttributes?r+=` ${n.substr(t.attributeNamePrefix.length)}`:r+=` ${n.substr(t.attributeNamePrefix.length)}="${o}"`}return r}function i(e,t){let r=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(".")+1);for(let n in t.stopNodes)if(t.stopNodes[n]===e||t.stopNodes[n]==="*."+r)return!0;return!1}function a(e,t){if(e&&e.length>0&&t.processEntities)for(let r=0;r<t.entities.length;r++){const n=t.entities[r];e=e.replace(n.regex,n.val)}return e}e.exports=function(e,t){let n="";return t.format&&t.indentBy.length>0&&(n="\n"),r(e,t,"",n)}},function(e,t){var r=function(e){var t=(e=e||{}).Base64,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=function(e){for(var t={},r=0,n=e.length;r<n;r++)t[e.charAt(r)]=r;return t}(r),o=String.fromCharCode,i=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?o(192|t>>>6)+o(128|63&t):o(224|t>>>12&15)+o(128|t>>>6&63)+o(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return o(240|t>>>18&7)+o(128|t>>>12&63)+o(128|t>>>6&63)+o(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],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[r.charAt(n>>>18),r.charAt(n>>>12&63),t>=2?"=":r.charAt(n>>>6&63),t>=1?"=":r.charAt(63&n)].join("")},u=e.btoa?function(t){return e.btoa(t)}:function(e){return e.replace(/[\s\S]{1,3}/g,c)},l=function(e){return u(s(e))},d=function(e,t){return t?l(String(e)).replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,""):l(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 o(55296+(t>>>10))+o(56320+(1023&t));case 3:return o((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return o((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},f=function(e){return e.replace(p,h)},g=function(e){var t=e.length,r=t%4,i=(t>0?n[e.charAt(0)]<<18:0)|(t>1?n[e.charAt(1)]<<12:0)|(t>2?n[e.charAt(2)]<<6:0)|(t>3?n[e.charAt(3)]:0),a=[o(i>>>16),o(i>>>8&255),o(255&i)];return a.length-=[0,0,2,1][r],a.join("")},m=e.atob?function(t){return e.atob(t)}:function(e){return e.replace(/[\s\S]{1,4}/g,g)},y=function(e){return f(m(e))},k=function(e){return y(String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,""))};return{VERSION:"2.1.9",atob:m,btoa:u,fromBase64:k,toBase64:d,utob:s,encode:d,encodeURI:function(e){return d(e,!0)},btou:f,decode:k,noConflict:function(){var r=e.Base64;return e.Base64=t,r}}}();e.exports=r},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},function(e,t,r){var n=r(28);function o(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,n(o.key),o)}}e.exports=function(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(0).default,o=r(29);e.exports=function(e){var t=o(e,"string");return"symbol"===n(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(0).default;e.exports=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(8),o=r(1),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,u=0,l=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:o.map(a,l)}),e.emit("list-update",{list:o.map(a,l)})},function(){t||(t=setTimeout(r))}),p=function(){if(!(a.length<=e.options.UploadQueueSize)){for(var t=0;t<u&&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),u--)}d()}},h=function t(){if(!(c>=e.options.FileParallelLimit)){for(;a[u]&&"waiting"!==a[u].state;)u++;if(!(u>=a.length)){var r=a[u];u++,c++,r.state="checking",r.params.onTaskStart&&r.params.onTaskStart(l(r)),!r.params.UploadData&&(r.params.UploadData={});var n=o.formatParams(r.api,r.params);i[r.api].call(e,n,(function(n,o){e._isRunningTask(r.id)&&("checking"!==r.state&&"uploading"!==r.state||(r.state=n?"error":"success",n&&(r.error=n),c--,d(),t(),r.callback&&r.callback(n,o),"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 o=s[t];if(o){var i=o&&"waiting"===o.state,a=o&&("checking"===o.state||"uploading"===o.state);if("canceled"===r&&"canceled"!==o.state||"paused"===r&&i||"paused"===r&&a){o.state=r,e.emit("inner-kill-task",{TaskId:t,toState:r});try{var u=o&&o.params&&o.params.UploadData.UploadId}catch(e){}"canceled"===r&&u&&n.removeUsing(u),d(),a&&(c--,h()),"canceled"===r&&(o.params&&(delete o.params.UploadData,delete o.params.Body,delete o.params),delete o.callback)}p()}};e._addTasks=function(t){o.each(t,(function(t){e._addTask(t.api,t.params,t.callback,!0)})),d()};e._addTask=function(t,r,n,i){r=o.formatParams(t,r);var c=o.uuid();r.TaskId=c,r.onTaskReady&&r.onTaskReady(c),r.TaskReady&&(r.TaskReady(c),!1);var u={params:r,callback:n,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},l=r.onHashProgress;r.onHashProgress=function(t){e._isRunningTask(u.id)&&(u.hashPercent=t.percent,l&&l(t),d())};var f=r.onProgress;return r.onProgress=function(t){e._isRunningTask(u.id)&&("checking"===u.state&&(u.state="uploading"),u.loaded=t.loaded,u.speed=t.speed,u.percent=t.percent,f&&f(t),d())},o.getFileSize(t,r,(function(e,t){if(e)return n(o.error(e));s[c]=u,a.push(u),u.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 o.map(a,l)},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(),u=Math.min(u,t.index),h())},e.isUploadRunning=function(){return c||u<a.length}}},function(e,t,r){var n=r(0),o=r(32),i=r(1);function a(e,t,r){var n=i.clone(t.InventoryConfiguration);if(n.OptionalFields){var o=n.OptionalFields||[];n.OptionalFields={Field:o}}if(n.Destination&&n.Destination.COSBucketDestination&&n.Destination.COSBucketDestination.Encryption){var a=n.Destination.COSBucketDestination.Encryption;Object.keys(a).indexOf("SSECOS")>-1&&(a["SSE-COS"]=a.SSECOS,delete a.SSECOS)}var s=i.json2xml({InventoryConfiguration:n}),c=t.Headers;c["Content-Type"]="application/xml",c["Content-MD5"]=i.b64(i.md5(s));var u="PUT"===e?"name/cos:PutBucketInventory":"name/cos:PostBucketInventory";f.call(this,{Action:u,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"},n=(e&&e.AccessControlList||{}).Grant;n&&(n=i.isArray(n)?n:[n]);var o={READ:0,WRITE:0,FULL_CONTROL:0};return n&&n.length&&i.each(n,(function(n){var i=n.Grantee.URI&&n.Grantee.URI.endsWith("/groups/global/AllUsers");"qcs::cam::anyone:anyone"===n.Grantee.ID||i?o[n.Permission]=1:n.Grantee.ID!==e.Owner.ID&&t[r[n.Permission]].push('id="'+n.Grantee.ID+'"')})),o.FULL_CONTROL||o.WRITE&&o.READ?t.ACL="public-read-write":o.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,n=e.split(","),o={};for(t=0;t<n.length;)o[r=n[t].trim()]?n.splice(t,1):(o[r]=!0,n[t]=r,t++);return n.join(",")}function u(e){var t=e.region||"",r=e.bucket||"",o=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 u=e.protocol||(i.isBrowser&&"object"===("undefined"==typeof location?"undefined":n(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,o).replace(/\{\{Region\}\}/gi,t).replace(/\{\{.*?\}\}/gi,"")).replace(/\{AppId\}/gi,a).replace(/\{BucketName\}/gi,o).replace(/\{Bucket\}/gi,r).replace(/\{Region\}/gi,t).replace(/\{.*?\}/gi,""),/^[a-zA-Z]+:\/\
|