@atomm-developer/generator-sdk 1.0.11 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).GeneratorSDK=t()}(this,function(){"use strict";var e,t=Object.defineProperty,r=(e,r,n)=>((e,r,n)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n)(e,"symbol"!=typeof r?r+"":r,n);function n(e,t){return function(){return e.apply(t,arguments)}}const{toString:i}=Object.prototype,{getPrototypeOf:o}=Object,{iterator:s,toStringTag:a}=Symbol,l=(e=>t=>{const r=i.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),c=e=>(e=e.toLowerCase(),t=>l(t)===e),u=e=>t=>typeof t===e,{isArray:p}=Array,d=u("undefined");function m(e){return null!==e&&!d(e)&&null!==e.constructor&&!d(e.constructor)&&y(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const f=c("ArrayBuffer");const h=u("string"),y=u("function"),g=u("number"),b=e=>null!==e&&"object"==typeof e,v=e=>{if("object"!==l(e))return!1;const t=o(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||a in e||s in e)},x=c("Date"),w=c("File"),S=c("Blob"),N=c("FileList");const j="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},E=void 0!==j.FormData?j.FormData:void 0,C=c("URLSearchParams"),[k,T,R,O]=["ReadableStream","Request","Response","Headers"].map(c);function P(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,i;if("object"!=typeof e&&(e=[e]),p(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{if(m(e))return;const i=r?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let s;for(n=0;n<o;n++)s=i[n],t.call(null,e[s],s,e)}}function _(e,t){if(m(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n,i=r.length;for(;i-- >0;)if(n=r[i],t===n.toLowerCase())return n;return null}const A="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,I=e=>!d(e)&&e!==A;const M=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&o(Uint8Array)),D=c("HTMLFormElement"),z=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),B=c("RegExp"),L=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};P(r,(r,i)=>{let o;!1!==(o=t(r,i,e))&&(n[i]=o||r)}),Object.defineProperties(e,n)};const q=c("AsyncFunction"),U=(H="function"==typeof setImmediate,F=y(A.postMessage),H?setImmediate:F?($=`axios@${Math.random()}`,V=[],A.addEventListener("message",({source:e,data:t})=>{e===A&&t===$&&V.length&&V.shift()()},!1),e=>{V.push(e),A.postMessage($,"*")}):e=>setTimeout(e));var H,F,$,V;const G="undefined"!=typeof queueMicrotask?queueMicrotask.bind(A):"undefined"!=typeof process&&process.nextTick||U,W={isArray:p,isArrayBuffer:f,isBuffer:m,isFormData:e=>{let t;return e&&(E&&e instanceof E||y(e.append)&&("formdata"===(t=l(e))||"object"===t&&y(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&f(e.buffer),t},isString:h,isNumber:g,isBoolean:e=>!0===e||!1===e,isObject:b,isPlainObject:v,isEmptyObject:e=>{if(!b(e)||m(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},isReadableStream:k,isRequest:T,isResponse:R,isHeaders:O,isUndefined:d,isDate:x,isFile:w,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:S,isRegExp:B,isFunction:y,isStream:e=>b(e)&&y(e.pipe),isURLSearchParams:C,isTypedArray:M,isFileList:N,forEach:P,merge:function e(){const{caseless:t,skipUndefined:r}=I(this)&&this||{},n={},i=(i,o)=>{if("__proto__"===o||"constructor"===o||"prototype"===o)return;const s=t&&_(n,o)||o;v(n[s])&&v(i)?n[s]=e(n[s],i):v(i)?n[s]=e({},i):p(i)?n[s]=i.slice():r&&d(i)||(n[s]=i)};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&P(arguments[o],i);return n},extend:(e,t,r,{allOwnKeys:i}={})=>(P(t,(t,i)=>{r&&y(t)?Object.defineProperty(e,i,{value:n(t,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let i,s,a;const l={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)a=i[s],n&&!n(a,e,t)||l[a]||(t[a]=e[a],l[a]=!0);e=!1!==r&&o(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:l,kindOfTest:c,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(p(e))return e;let t=e.length;if(!g(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[s]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:D,hasOwnProperty:z,hasOwnProp:z,reduceDescriptors:L,freezeMethods:e=>{L(e,(t,r)=>{if(y(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];y(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))})},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach(e=>{r[e]=!0})};return p(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:_,global:A,isContextDefined:I,isSpecCompliantForm:function(e){return!!(e&&y(e.append)&&"FormData"===e[a]&&e[s])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(b(e)){if(t.indexOf(e)>=0)return;if(m(e))return e;if(!("toJSON"in e)){t[n]=e;const i=p(e)?[]:{};return P(e,(e,t)=>{const o=r(e,n+1);!d(o)&&(i[t]=o)}),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:q,isThenable:e=>e&&(b(e)||y(e))&&y(e.then)&&y(e.catch),setImmediate:U,asap:G,isIterable:e=>null!=e&&y(e[s])};let K=class e extends Error{static from(t,r,n,i,o,s){const a=new e(t.message,r||t.code,n,i,o);return a.cause=t,a.name=t.name,null!=t.status&&null==a.status&&(a.status=t.status),s&&Object.assign(a,s),a}constructor(e,t,r,n,i){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:W.toJSONObject(this.config),code:this.code,status:this.status}}};K.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",K.ERR_BAD_OPTION="ERR_BAD_OPTION",K.ECONNABORTED="ECONNABORTED",K.ETIMEDOUT="ETIMEDOUT",K.ERR_NETWORK="ERR_NETWORK",K.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",K.ERR_DEPRECATED="ERR_DEPRECATED",K.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",K.ERR_BAD_REQUEST="ERR_BAD_REQUEST",K.ERR_CANCELED="ERR_CANCELED",K.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",K.ERR_INVALID_URL="ERR_INVALID_URL";function X(e){return W.isPlainObject(e)||W.isArray(e)}function Q(e){return W.endsWith(e,"[]")?e.slice(0,-2):e}function Y(e,t,r){return e?e.concat(t).map(function(e,t){return e=Q(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}const J=W.toFlatObject(W,{},null,function(e){return/^is[A-Z]/.test(e)});function Z(e,t,r){if(!W.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=W.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!W.isUndefined(t[e])})).metaTokens,i=r.visitor||c,o=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&W.isSpecCompliantForm(t);if(!W.isFunction(i))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(W.isDate(e))return e.toISOString();if(W.isBoolean(e))return e.toString();if(!a&&W.isBlob(e))throw new K("Blob is not supported. Use a Buffer instead.");return W.isArrayBuffer(e)||W.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,r,i){let a=e;if(W.isReactNative(t)&&W.isReactNativeBlob(e))return t.append(Y(i,r,o),l(e)),!1;if(e&&!i&&"object"==typeof e)if(W.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(W.isArray(e)&&function(e){return W.isArray(e)&&!e.some(X)}(e)||(W.isFileList(e)||W.endsWith(r,"[]"))&&(a=W.toArray(e)))return r=Q(r),a.forEach(function(e,n){!W.isUndefined(e)&&null!==e&&t.append(!0===s?Y([r],n,o):null===s?r:r+"[]",l(e))}),!1;return!!X(e)||(t.append(Y(i,r,o),l(e)),!1)}const u=[],p=Object.assign(J,{defaultVisitor:c,convertValue:l,isVisitable:X});if(!W.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!W.isUndefined(r)){if(-1!==u.indexOf(r))throw Error("Circular reference detected in "+n.join("."));u.push(r),W.forEach(r,function(r,o){!0===(!(W.isUndefined(r)||null===r)&&i.call(t,r,W.isString(o)?o.trim():o,n,p))&&e(r,n?n.concat(o):[o])}),u.pop()}}(e),t}function ee(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function te(e,t){this._pairs=[],e&&Z(e,this,t)}const re=te.prototype;function ne(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ie(e,t,r){if(!t)return e;const n=r&&r.encode||ne,i=W.isFunction(r)?{serialize:r}:r,o=i&&i.serialize;let s;if(s=o?o(t,i):W.isURLSearchParams(t)?t.toString():new te(t,i).toString(n),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}re.append=function(e,t){this._pairs.push([e,t])},re.toString=function(e){const t=e?function(t){return e.call(this,t,ee)}:ee;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class oe{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){W.forEach(this.handlers,function(t){null!==t&&e(t)})}}const se={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},ae={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:te,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},le="undefined"!=typeof window&&"undefined"!=typeof document,ce="object"==typeof navigator&&navigator||void 0,ue=le&&(!ce||["ReactNative","NativeScript","NS"].indexOf(ce.product)<0),pe="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,de=le&&window.location.href||"http://localhost",me={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:le,hasStandardBrowserEnv:ue,hasStandardBrowserWebWorkerEnv:pe,navigator:ce,origin:de},Symbol.toStringTag,{value:"Module"})),...ae};function fe(e){function t(e,r,n,i){let o=e[i++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),a=i>=e.length;if(o=!o&&W.isArray(n)?n.length:o,a)return W.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r,!s;n[o]&&W.isObject(n[o])||(n[o]=[]);return t(e,r,n[o],i)&&W.isArray(n[o])&&(n[o]=function(e){const t={},r=Object.keys(e);let n;const i=r.length;let o;for(n=0;n<i;n++)o=r[n],t[o]=e[o];return t}(n[o])),!s}if(W.isFormData(e)&&W.isFunction(e.entries)){const r={};return W.forEachEntry(e,(e,n)=>{t(function(e){return W.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),n,r,0)}),r}return null}const he={transitional:se,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,i=W.isObject(e);i&&W.isHTMLForm(e)&&(e=new FormData(e));if(W.isFormData(e))return n?JSON.stringify(fe(e)):e;if(W.isArrayBuffer(e)||W.isBuffer(e)||W.isStream(e)||W.isFile(e)||W.isBlob(e)||W.isReadableStream(e))return e;if(W.isArrayBufferView(e))return e.buffer;if(W.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Z(e,new me.classes.URLSearchParams,{visitor:function(e,t,r,n){return me.isNode&&W.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((o=W.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Z(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||n?(t.setContentType("application/json",!1),function(e,t,r){if(W.isString(e))try{return(t||JSON.parse)(e),W.trim(e)}catch(n){if("SyntaxError"!==n.name)throw n}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||he.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(W.isResponse(e)||W.isReadableStream(e))return e;if(e&&W.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e,this.parseReviver)}catch(i){if(r){if("SyntaxError"===i.name)throw K.from(i,K.ERR_BAD_RESPONSE,this,null,this.response);throw i}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:me.classes.FormData,Blob:me.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};W.forEach(["delete","get","head","post","put","patch"],e=>{he.headers[e]={}});const ye=W.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ge=Symbol("internals");function be(e){return e&&String(e).trim().toLowerCase()}function ve(e){return!1===e||null==e?e:W.isArray(e)?e.map(ve):String(e)}function xe(e,t,r,n,i){return W.isFunction(n)?n.call(this,t,r):(i&&(t=r),W.isString(t)?W.isString(n)?-1!==t.indexOf(n):W.isRegExp(n)?n.test(t):void 0:void 0)}let we=class{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function i(e,t,r){const i=be(t);if(!i)throw new Error("header name must be a non-empty string");const o=W.findKey(n,i);(!o||void 0===n[o]||!0===r||void 0===r&&!1!==n[o])&&(n[o||t]=ve(e))}const o=(e,t)=>W.forEach(e,(e,r)=>i(e,r,t));if(W.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(W.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((e=>{const t={};let r,n,i;return e&&e.split("\n").forEach(function(e){i=e.indexOf(":"),r=e.substring(0,i).trim().toLowerCase(),n=e.substring(i+1).trim(),!r||t[r]&&ye[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t})(e),t);else if(W.isObject(e)&&W.isIterable(e)){let r,n,i={};for(const t of e){if(!W.isArray(t))throw TypeError("Object iterator must return a key-value pair");i[n=t[0]]=(r=i[n])?W.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}o(i,t)}else null!=e&&i(t,e,r);return this}get(e,t){if(e=be(e)){const r=W.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(W.isFunction(t))return t.call(this,e,r);if(W.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=be(e)){const r=W.findKey(this,e);return!(!r||void 0===this[r]||t&&!xe(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function i(e){if(e=be(e)){const i=W.findKey(r,e);!i||t&&!xe(0,r[i],i,t)||(delete r[i],n=!0)}}return W.isArray(e)?e.forEach(i):i(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const i=t[r];e&&!xe(0,this[i],i,e,!0)||(delete this[i],n=!0)}return n}normalize(e){const t=this,r={};return W.forEach(this,(n,i)=>{const o=W.findKey(r,i);if(o)return t[o]=ve(n),void delete t[i];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}(i):String(i).trim();s!==i&&delete t[i],t[s]=ve(n),r[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return W.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&W.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){const t=(this[ge]=this[ge]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=be(e);t[n]||(!function(e,t){const r=W.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:!0})})}(r,e),t[n]=!0)}return W.isArray(e)?e.forEach(n):n(e),this}};function Se(e,t){const r=this||he,n=t||r,i=we.from(n.headers);let o=n.data;return W.forEach(e,function(e){o=e.call(r,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function Ne(e){return!(!e||!e.__CANCEL__)}we.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),W.reduceDescriptors(we.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),W.freezeMethods(we);let je=class extends K{constructor(e,t,r){super(null==e?"canceled":e,K.ERR_CANCELED,t,r),this.name="CanceledError",this.__CANCEL__=!0}};function Ee(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new K("Request failed with status code "+r.status,[K.ERR_BAD_REQUEST,K.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}const Ce=(e,t,r=3)=>{let n=0;const i=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i,o=0,s=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=n[s];i||(i=l),r[o]=a,n[o]=l;let u=s,p=0;for(;u!==o;)p+=r[u++],u%=e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-i<t)return;const d=c&&l-c;return d?Math.round(1e3*p/d):void 0}}(50,250);return function(e,t){let r,n,i=0,o=1e3/t;const s=(t,o=Date.now())=>{i=o,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-i;a>=o?s(e,t):(r=e,n||(n=setTimeout(()=>{n=null,s(r)},o-a)))},()=>r&&s(r)]}(r=>{const o=r.loaded,s=r.lengthComputable?r.total:void 0,a=o-n,l=i(a);n=o;e({loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&o<=s?(s-o)/l:void 0,event:r,lengthComputable:null!=s,[t?"download":"upload"]:!0})},r)},ke=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Te=e=>(...t)=>W.asap(()=>e(...t)),Re=me.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,me.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(me.origin),me.navigator&&/(msie|trident)/i.test(me.navigator.userAgent)):()=>!0,Oe=me.hasStandardBrowserEnv?{write(e,t,r,n,i,o,s){if("undefined"==typeof document)return;const a=[`${e}=${encodeURIComponent(t)}`];W.isNumber(r)&&a.push(`expires=${new Date(r).toUTCString()}`),W.isString(n)&&a.push(`path=${n}`),W.isString(i)&&a.push(`domain=${i}`),!0===o&&a.push("secure"),W.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function Pe(e,t,r){let n=!("string"==typeof(i=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(i));var i;return e&&(n||0==r)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const _e=e=>e instanceof we?{...e}:e;function Ae(e,t){t=t||{};const r={};function n(e,t,r,n){return W.isPlainObject(e)&&W.isPlainObject(t)?W.merge.call({caseless:n},e,t):W.isPlainObject(t)?W.merge({},t):W.isArray(t)?t.slice():t}function i(e,t,r,i){return W.isUndefined(t)?W.isUndefined(e)?void 0:n(void 0,e,0,i):n(e,t,0,i)}function o(e,t){if(!W.isUndefined(t))return n(void 0,t)}function s(e,t){return W.isUndefined(t)?W.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,i,o){return o in t?n(r,i):o in e?n(void 0,r):void 0}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t,r)=>i(_e(e),_e(t),0,!0)};return W.forEach(Object.keys({...e,...t}),function(n){if("__proto__"===n||"constructor"===n||"prototype"===n)return;const o=W.hasOwnProp(l,n)?l[n]:i,s=o(e[n],t[n],n);W.isUndefined(s)&&o!==a||(r[n]=s)}),r}const Ie=e=>{const t=Ae({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=t;if(t.headers=s=we.from(s),t.url=ie(Pe(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),W.isFormData(r))if(me.hasStandardBrowserEnv||me.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(W.isFunction(r.getHeaders)){const e=r.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,r])=>{t.includes(e.toLowerCase())&&s.set(e,r)})}if(me.hasStandardBrowserEnv&&(n&&W.isFunction(n)&&(n=n(t)),n||!1!==n&&Re(t.url))){const e=i&&o&&Oe.read(o);e&&s.set(i,e)}return t},Me="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){const n=Ie(e);let i=n.data;const o=we.from(n.headers).normalize();let s,a,l,c,u,{responseType:p,onUploadProgress:d,onDownloadProgress:m}=n;function f(){c&&c(),u&&u(),n.cancelToken&&n.cancelToken.unsubscribe(s),n.signal&&n.signal.removeEventListener("abort",s)}let h=new XMLHttpRequest;function y(){if(!h)return;const n=we.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());Ee(function(e){t(e),f()},function(e){r(e),f()},{data:p&&"text"!==p&&"json"!==p?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:n,config:e,request:h}),h=null}h.open(n.method.toUpperCase(),n.url,!0),h.timeout=n.timeout,"onloadend"in h?h.onloadend=y:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(y)},h.onabort=function(){h&&(r(new K("Request aborted",K.ECONNABORTED,e,h)),h=null)},h.onerror=function(t){const n=t&&t.message?t.message:"Network Error",i=new K(n,K.ERR_NETWORK,e,h);i.event=t||null,r(i),h=null},h.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const i=n.transitional||se;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new K(t,i.clarifyTimeoutError?K.ETIMEDOUT:K.ECONNABORTED,e,h)),h=null},void 0===i&&o.setContentType(null),"setRequestHeader"in h&&W.forEach(o.toJSON(),function(e,t){h.setRequestHeader(t,e)}),W.isUndefined(n.withCredentials)||(h.withCredentials=!!n.withCredentials),p&&"json"!==p&&(h.responseType=n.responseType),m&&([l,u]=Ce(m,!0),h.addEventListener("progress",l)),d&&h.upload&&([a,c]=Ce(d),h.upload.addEventListener("progress",a),h.upload.addEventListener("loadend",c)),(n.cancelToken||n.signal)&&(s=t=>{h&&(r(!t||t.type?new je(null,e,h):t),h.abort(),h=null)},n.cancelToken&&n.cancelToken.subscribe(s),n.signal&&(n.signal.aborted?s():n.signal.addEventListener("abort",s)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);g&&-1===me.protocols.indexOf(g)?r(new K("Unsupported protocol "+g+":",K.ERR_BAD_REQUEST,e)):h.send(i||null)})},De=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const i=function(e){if(!r){r=!0,s();const t=e instanceof Error?e:this.reason;n.abort(t instanceof K?t:new je(t instanceof Error?t.message:t))}};let o=t&&setTimeout(()=>{o=null,i(new K(`timeout of ${t}ms exceeded`,K.ETIMEDOUT))},t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)}),e=null)};e.forEach(e=>e.addEventListener("abort",i));const{signal:a}=n;return a.unsubscribe=()=>W.asap(s),a}},ze=function*(e,t){let r=e.byteLength;if(r<t)return void(yield e);let n,i=0;for(;i<r;)n=i+t,yield e.slice(i,n),i=n},Be=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},Le=(e,t,r,n)=>{const i=async function*(e,t){for await(const r of Be(e))yield*ze(r,t)}(e,t);let o,s=0,a=e=>{o||(o=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await i.next();if(t)return a(),void e.close();let o=n.byteLength;if(r){let e=s+=o;r(e)}e.enqueue(new Uint8Array(n))}catch(t){throw a(t),t}},cancel:e=>(a(e),i.return())},{highWaterMark:2})},{isFunction:qe}=W,Ue=(({Request:e,Response:t})=>({Request:e,Response:t}))(W.global),{ReadableStream:He,TextEncoder:Fe}=W.global,$e=(e,...t)=>{try{return!!e(...t)}catch(r){return!1}},Ve=e=>{e=W.merge.call({skipUndefined:!0},Ue,e);const{fetch:t,Request:r,Response:n}=e,i=t?qe(t):"function"==typeof fetch,o=qe(r),s=qe(n);if(!i)return!1;const a=i&&qe(He),l=i&&("function"==typeof Fe?(e=>t=>e.encode(t))(new Fe):async e=>new Uint8Array(await new r(e).arrayBuffer())),c=o&&a&&$e(()=>{let e=!1;const t=new r(me.origin,{body:new He,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),u=s&&a&&$e(()=>W.isReadableStream(new n("").body)),p={stream:u&&(e=>e.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!p[e]&&(p[e]=(t,r)=>{let n=t&&t[e];if(n)return n.call(t);throw new K(`Response type '${e}' is not supported`,K.ERR_NOT_SUPPORT,r)})});const d=async(e,t)=>{const n=W.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(W.isBlob(e))return e.size;if(W.isSpecCompliantForm(e)){const t=new r(me.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return W.isArrayBufferView(e)||W.isArrayBuffer(e)?e.byteLength:(W.isURLSearchParams(e)&&(e+=""),W.isString(e)?(await l(e)).byteLength:void 0)})(t):n};return async e=>{let{url:i,method:s,data:a,signal:l,cancelToken:m,timeout:f,onDownloadProgress:h,onUploadProgress:y,responseType:g,headers:b,withCredentials:v="same-origin",fetchOptions:x}=Ie(e),w=t||fetch;g=g?(g+"").toLowerCase():"text";let S=De([l,m&&m.toAbortSignal()],f),N=null;const j=S&&S.unsubscribe&&(()=>{S.unsubscribe()});let E;try{if(y&&c&&"get"!==s&&"head"!==s&&0!==(E=await d(b,a))){let e,t=new r(i,{method:"POST",body:a,duplex:"half"});if(W.isFormData(a)&&(e=t.headers.get("content-type"))&&b.setContentType(e),t.body){const[e,r]=ke(E,Ce(Te(y)));a=Le(t.body,65536,e,r)}}W.isString(v)||(v=v?"include":"omit");const t=o&&"credentials"in r.prototype,l={...x,signal:S,method:s.toUpperCase(),headers:b.normalize().toJSON(),body:a,duplex:"half",credentials:t?v:void 0};N=o&&new r(i,l);let m=await(o?w(N,x):w(i,l));const f=u&&("stream"===g||"response"===g);if(u&&(h||f&&j)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=m[t]});const t=W.toFiniteNumber(m.headers.get("content-length")),[r,i]=h&&ke(t,Ce(Te(h),!0))||[];m=new n(Le(m.body,65536,r,()=>{i&&i(),j&&j()}),e)}g=g||"text";let C=await p[W.findKey(p,g)||"text"](m,e);return!f&&j&&j(),await new Promise((t,r)=>{Ee(t,r,{data:C,headers:we.from(m.headers),status:m.status,statusText:m.statusText,config:e,request:N})})}catch(C){if(j&&j(),C&&"TypeError"===C.name&&/Load failed|fetch/i.test(C.message))throw Object.assign(new K("Network Error",K.ERR_NETWORK,e,N,C&&C.response),{cause:C.cause||C});throw K.from(C,C&&C.code,e,N,C&&C.response)}}},Ge=new Map,We=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:i}=t,o=[n,i,r];let s,a,l=o.length,c=Ge;for(;l--;)s=o[l],a=c.get(s),void 0===a&&c.set(s,a=l?new Map:Ve(t)),c=a;return a};We();const Ke={http:null,xhr:Me,fetch:{get:We}};W.forEach(Ke,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(r){}Object.defineProperty(e,"adapterName",{value:t})}});const Xe=e=>`- ${e}`,Qe=e=>W.isFunction(e)||null===e||!1===e;const Ye={getAdapter:function(e,t){e=W.isArray(e)?e:[e];const{length:r}=e;let n,i;const o={};for(let s=0;s<r;s++){let r;if(n=e[s],i=n,!Qe(n)&&(i=Ke[(r=String(n)).toLowerCase()],void 0===i))throw new K(`Unknown adapter '${r}'`);if(i&&(W.isFunction(i)||(i=i.get(t))))break;o[r||"#"+s]=i}if(!i){const e=Object.entries(o).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=r?e.length>1?"since :\n"+e.map(Xe).join("\n"):" "+Xe(e[0]):"as no adapter specified";throw new K("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return i},adapters:Ke};function Je(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new je(null,e)}function Ze(e){Je(e),e.headers=we.from(e.headers),e.data=Se.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Ye.getAdapter(e.adapter||he.adapter,e)(e).then(function(t){return Je(e),t.data=Se.call(e,e.transformResponse,t),t.headers=we.from(t.headers),t},function(t){return Ne(t)||(Je(e),t&&t.response&&(t.response.data=Se.call(e,e.transformResponse,t.response),t.response.headers=we.from(t.response.headers))),Promise.reject(t)})}const et="1.13.6",tt={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{tt[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const rt={};tt.transitional=function(e,t,r){return(n,i,o)=>{if(!1===e)throw new K(function(e,t){return"[Axios v"+et+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}(i," has been removed"+(t?" in "+t:"")),K.ERR_DEPRECATED);return t&&!rt[i]&&(rt[i]=!0),!e||e(n,i,o)}},tt.spelling=function(e){return(e,t)=>!0};const nt={assertOptions:function(e,t,r){if("object"!=typeof e)throw new K("options must be an object",K.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const o=n[i],s=t[o];if(s){const t=e[o],r=void 0===t||s(t,o,e);if(!0!==r)throw new K("option "+o+" must be "+r,K.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new K("Unknown option "+o,K.ERR_BAD_OPTION)}},validators:tt},it=nt.validators;let ot=class{constructor(e){this.defaults=e||{},this.interceptors={request:new oe,response:new oe}}async request(e,t){try{return await this._request(e,t)}catch(r){if(r instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{r.stack?t&&!String(r.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(r.stack+="\n"+t):r.stack=t}catch(n){}}throw r}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ae(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:i}=t;void 0!==r&&nt.assertOptions(r,{silentJSONParsing:it.transitional(it.boolean),forcedJSONParsing:it.transitional(it.boolean),clarifyTimeoutError:it.transitional(it.boolean),legacyInterceptorReqResOrdering:it.transitional(it.boolean)},!1),null!=n&&(W.isFunction(n)?t.paramsSerializer={serialize:n}:nt.assertOptions(n,{encode:it.function,serialize:it.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),nt.assertOptions(t,{baseUrl:it.spelling("baseURL"),withXsrfToken:it.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&W.merge(i.common,i[t.method]);i&&W.forEach(["delete","get","head","post","put","patch","common"],e=>{delete i[e]}),t.headers=we.concat(o,i);const s=[];let a=!0;this.interceptors.request.forEach(function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;a=a&&e.synchronous;const r=t.transitional||se;r&&r.legacyInterceptorReqResOrdering?s.unshift(e.fulfilled,e.rejected):s.push(e.fulfilled,e.rejected)});const l=[];let c;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let u,p=0;if(!a){const e=[Ze.bind(this),void 0];for(e.unshift(...s),e.push(...l),u=e.length,c=Promise.resolve(t);p<u;)c=c.then(e[p++],e[p++]);return c}u=s.length;let d=t;for(;p<u;){const e=s[p++],t=s[p++];try{d=e(d)}catch(m){t.call(this,m);break}}try{c=Ze.call(this,d)}catch(m){return Promise.reject(m)}for(p=0,u=l.length;p<u;)c=c.then(l[p++],l[p++]);return c}getUri(e){return ie(Pe((e=Ae(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};W.forEach(["delete","get","head","options"],function(e){ot.prototype[e]=function(t,r){return this.request(Ae(r||{},{method:e,url:t,data:(r||{}).data}))}}),W.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,i){return this.request(Ae(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}ot.prototype[e]=t(),ot.prototype[e+"Form"]=t(!0)});const st={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(st).forEach(([e,t])=>{st[t]=e});const at=function e(t){const r=new ot(t),i=n(ot.prototype.request,r);return W.extend(i,ot.prototype,r,{allOwnKeys:!0}),W.extend(i,r,null,{allOwnKeys:!0}),i.create=function(r){return e(Ae(t,r))},i}(he);at.Axios=ot,at.CanceledError=je,at.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const r=this;this.promise.then(e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t;const n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e,n,i){r.reason||(r.reason=new je(e,n,i),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}},at.isCancel=Ne,at.VERSION=et,at.toFormData=Z,at.AxiosError=K,at.Cancel=at.CanceledError,at.all=function(e){return Promise.all(e)},at.spread=function(e){return function(t){return e.apply(null,t)}},at.isAxiosError=function(e){return W.isObject(e)&&!0===e.isAxiosError},at.mergeConfig=Ae,at.AxiosHeaders=we,at.formToJSON=e=>fe(W.isHTMLForm(e)?new FormData(e):e),at.getAdapter=Ye.getAdapter,at.HttpStatusCode=st,at.default=at;const{Axios:lt,AxiosError:ct,CanceledError:ut,isCancel:pt,CancelToken:dt,VERSION:mt,all:ft,Cancel:ht,isAxiosError:yt,spread:gt,toFormData:bt,AxiosHeaders:vt,HttpStatusCode:xt,formToJSON:wt,getAdapter:St,mergeConfig:Nt}=at,jt={prod:"https://api.xtool.com",pre:"https://api-pre.xtool.com",test:"https://api-test.xtool.com",test_us:"https://api-test.xtool.com",dev:"https://api-dev.makeblock.com"},Et="xtool-aimake-generator",Ct=e=>jt[e]??jt.prod,kt=e=>`__atomm_sdk_token__${e}`,Tt=(e,t)=>{try{document.cookie=[`${kt(e)}=${encodeURIComponent(t)}`,"Domain=; Path=/; SameSite=Lax","Max-Age=1296000"].join("; ")}catch{}},Rt=e=>{try{const t=kt(e),r=document.cookie.split("; ").find(e=>e.startsWith(`${t}=`));return r?decodeURIComponent(r.slice(t.length+1)):""}catch{return""}},Ot=e=>{try{document.cookie=[`${kt(e)}=`,"Domain=; Path=/; SameSite=Lax","Expires=Thu, 01 Jan 1970 00:00:00 GMT","Max-Age=0"].join("; ")}catch{}};class Pt extends Error{constructor(e,t){super(t),this.code=e,this.name="SdkError"}}const _t=(e,t,r)=>{const n=Ct(t),i=at.create({baseURL:n,timeout:6e4,headers:{"Content-Type":"application/json;charset=UTF-8"}});return i.interceptors.request.use(t=>{t.headers.lang=(()=>{try{return localStorage.getItem("LANG_KEY")||"en"}catch{return"en"}})();const r=Rt(e);return r&&(t.headers.uToken=r),t},e=>Promise.reject(e)),i.interceptors.response.use(t=>{if(n="blob"===t.config.responseType,i=t.headers["content-type"]??"",n&&i.includes("application/octet-stream"))return t;var n,i;const o=t.data;if(0===o.code)return o.data;20101===o.code&&(Ot(e),null==r||r(e));const s=o.msg||o.message||"Request failed";return Promise.reject(new Pt(o.code,s))},e=>{var t;const r=(null==(t=null==e?void 0:e.response)?void 0:t.data)||{},n=r.msg||r.message||(null==e?void 0:e.message)||"Network error",i=r.code??-1;return Promise.reject(new Pt(i,n))}),i};var At="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function It(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mt,Dt,zt={exports:{}},Bt={},Lt={},qt={exports:{}};function Ut(){if(Dt)return Lt;Dt=1;var e=Lt&&Lt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Lt,"__esModule",{value:!0});const t=e((Mt||(Mt=1,r=function(){function e(){for(var e=0,t={};e<arguments.length;e++){var r=arguments[e];for(var n in r)t[n]=r[n]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function r(n){function i(){}function o(t,r,o){if("undefined"!=typeof document){"number"==typeof(o=e({path:"/"},i.defaults,o)).expires&&(o.expires=new Date(1*new Date+864e5*o.expires)),o.expires=o.expires?o.expires.toUTCString():"";try{var s=JSON.stringify(r);/^[\{\[]/.test(s)&&(r=s)}catch(c){}r=n.write?n.write(r,t):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var a="";for(var l in o)o[l]&&(a+="; "+l,!0!==o[l]&&(a+="="+o[l].split(";")[0]));return document.cookie=t+"="+r+a}}function s(e,r){if("undefined"!=typeof document){for(var i={},o=document.cookie?document.cookie.split("; "):[],s=0;s<o.length;s++){var a=o[s].split("="),l=a.slice(1).join("=");r||'"'!==l.charAt(0)||(l=l.slice(1,-1));try{var c=t(a[0]);if(l=(n.read||n)(l,c)||t(l),r)try{l=JSON.parse(l)}catch(u){}if(i[c]=l,e===c)break}catch(u){}}return e?i[e]:i}}return i.set=o,i.get=function(e){return s(e,!1)},i.getJSON=function(e){return s(e,!0)},i.remove=function(t,r){o(t,"",e(r,{expires:-1}))},i.defaults={},i.withConverter=r,i}(function(){})},qt.exports=r()),qt.exports));var r;class n{static get(e){if(0===localStorage.length)return null;if(!e){const e=Object.keys(localStorage),t={};return e.forEach(e=>{t[e]=this.get(e)}),t}{const r=localStorage.getItem(e);if(null!==r)try{return JSON.parse(r)}catch(t){return r}}return null}static getJSON(e){return this.get(e)}static set(e,t){localStorage.setItem(e,JSON.stringify(t))}static remove(e){e?localStorage.removeItem(e):localStorage.clear()}}n.defaults={};class i{static get storage(){return"cookie"===this.strategy?this.cookie:this.local}static config(e){e&&(this.storage.defaults=e)}static get(e){return e?this.storage.get(e):this.storage.getJSON(e)}static set(e,t,r){this.storage.set(e,t,r)}static remove(e,t){this.storage.remove(e,t)}}return Lt.default=i,i.strategy="localstorage",i.cookie=t.default,i.local=n,Lt}var Ht,Ft={exports:{}};function $t(){if(Ht)return Ft.exports;Ht=1;var e,t="object"==typeof Reflect?Reflect:null,r=t&&"function"==typeof t.apply?t.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};e=t&&"function"==typeof t.ownKeys?t.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var n=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}Ft.exports=i,Ft.exports.once=function(e,t){return new Promise(function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}f(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&f(e,"error",t,r)}(e,i,{once:!0})})},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var o=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function a(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function l(e,t,r,n){var i,o,l;if(s(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),l=o[t]),void 0===l)l=o[t]=r,++e._eventsCount;else if("function"==typeof l?l=o[t]=n?[r,l]:[l,r]:n?l.unshift(r):l.push(r),(i=a(e))>0&&l.length>i&&!l.warned){l.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=l.length,console&&console.warn}return e}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=c.bind(n);return i.listener=r,n.wrapFn=i,i}function p(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):m(i,i.length)}function d(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function m(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function f(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function i(o){n.once&&e.removeEventListener(t,i),r(o)})}}return Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||n(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||n(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return a(this)},i.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)r(l,this,t);else{var c=l.length,u=m(l,c);for(n=0;n<c;++n)r(u[n],this,t)}return!0},i.prototype.addListener=function(e,t){return l(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return l(this,e,t,!0)},i.prototype.once=function(e,t){return s(t),this.on(e,u(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,u(this,e,t)),this},i.prototype.removeListener=function(e,t){var r,n,i,o,a;if(s(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},i.prototype.listeners=function(e){return p(this,e,!0)},i.prototype.rawListeners=function(e){return p(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},i.prototype.listenerCount=d,i.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]},Ft.exports}var Vt,Gt={};var Wt,Kt={exports:{}},Xt=Kt.exports;function Qt(){return Wt||(Wt=1,e=Kt,t=Kt.exports,function(r,n){var i,o="user-agent",s="",a="function",l="object",c="string",u="undefined",p="browser",d="cpu",m="device",f="engine",h="os",y="result",g="name",b="type",v="vendor",x="version",w="architecture",S="major",N="model",j="console",E="mobile",C="tablet",k="smarttv",T="wearable",R="xr",O="embedded",P="inapp",_="brands",A="formFactors",I="fullVersionList",M="platform",D="platformVersion",z="bitness",B="sec-ch-ua",L=B+"-full-version-list",q=B+"-arch",U=B+"-"+z,H=B+"-form-factors",F=B+"-"+E,$=B+"-"+N,V=B+"-"+M,G=V+"-version",W=[_,I,E,N,M,D,w,A,z],K="Amazon",X="Apple",Q="ASUS",Y="BlackBerry",J="Google",Z="Huawei",ee="Lenovo",te="Honor",re="LG",ne="Microsoft",ie="Motorola",oe="Nvidia",se="OnePlus",ae="OPPO",le="Samsung",ce="Sharp",ue="Sony",pe="Xiaomi",de="Zebra",me="Chrome",fe="Chromium",he="Chromecast",ye="Edge",ge="Firefox",be="Opera",ve="Facebook",xe="Sogou",we="Mobile ",Se=" Browser",Ne="Windows",je=typeof r!==u,Ee=je&&r.navigator?r.navigator:n,Ce=Ee&&Ee.userAgentData?Ee.userAgentData:n,ke=function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t},Te=function(e,t){if(typeof e===l&&e.length>0){for(var r in e)if(_e(t)==_e(e[r]))return!0;return!1}return!!Oe(e)&&_e(t)==_e(e)},Re=function(e,t){for(var r in e)return/^(browser|cpu|device|engine|os)$/.test(r)||!!t&&Re(e[r])},Oe=function(e){return typeof e===c},Pe=function(e){if(!e)return n;for(var t=[],r=Me(/\\?\"/g,e).split(","),i=0;i<r.length;i++)if(r[i].indexOf(";")>-1){var o=ze(r[i]).split(";v=");t[i]={brand:o[0],version:o[1]}}else t[i]=ze(r[i]);return t},_e=function(e){return Oe(e)?e.toLowerCase():e},Ae=function(e){return Oe(e)?Me(/[^\d\.]/g,e).split(".")[0]:n},Ie=function(e){for(var t in e)if(e.hasOwnProperty(t)){var r=e[t];typeof r==l&&2==r.length?this[r[0]]=r[1]:this[r]=n}return this},Me=function(e,t){return Oe(t)?t.replace(e,s):t},De=function(e){return Me(/\\?\"/g,e)},ze=function(e,t){return e=Me(/^\s\s*/,String(e)),typeof t===u?e:e.substring(0,t)},Be=function(e,t){if(e&&t)for(var r,i,o,s,c,u,p=0;p<t.length&&!c;){var d=t[p],m=t[p+1];for(r=i=0;r<d.length&&!c&&d[r];)if(c=d[r++].exec(e))for(o=0;o<m.length;o++)u=c[++i],typeof(s=m[o])===l&&s.length>0?2===s.length?typeof s[1]==a?this[s[0]]=s[1].call(this,u):this[s[0]]=s[1]:s.length>=3&&(typeof s[1]!==a||s[1].exec&&s[1].test?3==s.length?this[s[0]]=u?u.replace(s[1],s[2]):n:4==s.length?this[s[0]]=u?s[3].call(this,u.replace(s[1],s[2])):n:s.length>4&&(this[s[0]]=u?s[3].apply(this,[u.replace(s[1],s[2])].concat(s.slice(4))):n):s.length>3?this[s[0]]=u?s[1].apply(this,s.slice(2)):n:this[s[0]]=u?s[1].call(this,u,s[2]):n):this[s]=u||n;p+=2}},Le=function(e,t){for(var r in t)if(typeof t[r]===l&&t[r].length>0){for(var i=0;i<t[r].length;i++)if(Te(t[r][i],e))return"?"===r?n:r}else if(Te(t[r],e))return"?"===r?n:r;return t.hasOwnProperty("*")?t["*"]:e},qe={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2",8.1:"6.3",10:["6.4","10.0"],NT:""},Ue={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":n},He={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},Fe={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[x,[g,we+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[x,[g,ye+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[x,[g,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[g,x],[/opios[\/ ]+([\w\.]+)/i],[x,[g,be+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[x,[g,be+" GX"]],[/\bopr\/([\w\.]+)/i],[x,[g,be]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[x,[g,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[x,[g,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(atlas|flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:hi|lg |ovi|qute)browser|palemoon)\/v?([-\w\.]+)/i,/(brave)(?: chrome)?\/([\d\.]+)/i,/(aloha|heytap|ovi|115|surf|qwant)browser\/([\d\.]+)/i,/(qwant)(?:ios|mobile)\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[g,x],[/quark(?:pc)?\/([-\w\.]+)/i],[x,[g,"Quark"]],[/\bddg\/([\w\.]+)/i],[x,[g,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[x,[g,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[x,[g,"WeChat"]],[/konqueror\/([\w\.]+)/i],[x,[g,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[x,[g,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[x,[g,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[x,[g,"Smart "+ee+Se]],[/(av(?:ast|g|ira))\/([\w\.]+)/i],[[g,/(.+)/,"$1 Secure"+Se],x],[/norton\/([\w\.]+)/i],[x,[g,"Norton Private"+Se]],[/\bfocus\/([\w\.]+)/i],[x,[g,ge+" Focus"]],[/ mms\/([\w\.]+)$/i],[x,[g,be+" Neon"]],[/ opt\/([\w\.]+)$/i],[x,[g,be+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[x,[g,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[x,[g,"Dolphin"]],[/coast\/([\w\.]+)/i],[x,[g,be+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[x,[g,"MIUI"+Se]],[/fxios\/([\w\.-]+)/i],[x,[g,we+ge]],[/\bqihoobrowser\/?([\w\.]*)/i],[x,[g,"360"]],[/\b(qq)\/([\w\.]+)/i],[[g,/(.+)/,"$1Browser"],x],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[g,/(.+)/,"$1"+Se],x],[/samsungbrowser\/([\w\.]+)/i],[x,[g,le+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[x,[g,xe+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[g,xe+" Mobile"],x],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[g,x],[/(lbbrowser|luakit|rekonq|steam(?= (clie|tenf|gameo)))/i],[g],[/ome\/([\w\.]+).+(iron(?= saf)|360(?=[es]e$))/i],[x,g],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[g,ve],x,[b,P]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(bing)(?:web|sapphire)\/([\w\.]+)/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[g,x,[b,P]],[/\bgsa\/([\w\.]+) .*safari\//i],[x,[g,"GSA"],[b,P]],[/(?:musical_ly|trill)(?:.+app_?version\/|_)([\w\.]+)/i],[x,[g,"TikTok"],[b,P]],[/\[(linkedin)app\]/i],[g,[b,P]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[g,/(.+)/,"Zalo"],x,[b,P]],[/(chromium)[\/ ]([-\w\.]+)/i],[g,x],[/ome-(lighthouse)$/i],[g,[b,"fetcher"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[x,[g,me+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[x,[g,ye+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[g,me+" WebView"],x],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[x,[g,"Android"+Se]],[/chrome\/([\w\.]+) mobile/i],[x,[g,we+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[g,x],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[x,[g,we+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[g,we+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[x,g],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[g,[x,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[g,x],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[g,we+ge],x],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[g,"Netscape"],x],[/(wolvic|librewolf)\/([\w\.]+)/i],[g,x],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[x,[g,ge+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+(?= .+rv\:.+gecko\/\d+)|[0-4][\w\.]+(?!.+compatible))/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[g,[x,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[g,[x,/[^\d\.]+./,s]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[w,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[w,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[w,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[w,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[w,"arm"]],[/ sun4\w[;\)]/i],[[w,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,/((ppc|powerpc)(64)?)( mac|;|\))/i,/(?:osf1|[freopnt]{3,4}bsd) (alpha)/i],[[w,/ower/,s,_e]],[/mc680.0/i],[[w,"68k"]],[/winnt.+\[axp/i],[[w,"alpha"]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[N,[v,le],[b,C]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[N,[v,le],[b,E]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[N,[v,X],[b,E]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[N,[v,X],[b,C]],[/(macintosh);/i],[N,[v,X]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[N,[v,ce],[b,E]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[N,[v,te],[b,C]],[/honor([-\w ]+)[;\)]/i],[N,[v,te],[b,E]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[N,[v,Z],[b,C]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[N,[v,Z],[b,E]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[N,/_/g," "],[v,pe],[b,C]],[/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/oid[^\)]+; (redmi[\-_ ]?(?:note|k)?[\w_ ]+|m?[12]\d[01]\d\w{3,6}|poco[\w ]+|(shark )?\w{3}-[ah]0|qin ?[1-3](s\+|ultra| pro)?)( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note|max|cc)?[_ ]?(?:\d{0,2}\w?)[_ ]?(?:plus|se|lite|pro)?( 5g|lte)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[N,/_/g," "],[v,pe],[b,E]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-l]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[N,[v,se],[b,E]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[N,[v,ae],[b,E]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[N,[v,Le,{OnePlus:["203","304","403","404","413","415"],"*":ae}],[b,C]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[N,[v,"BLU"],[b,E]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[N,[v,"Vivo"],[b,E]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[N,[v,"Realme"],[b,E]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[N,[v,ee],[b,C]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[N,[v,ee],[b,E]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[N,[v,ie],[b,E]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[N,[v,ie],[b,C]],[/\b(?:lg)?([vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[N,[v,re],[b,C]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[N,[v,re],[b,E]],[/(nokia) (t[12][01])/i],[v,N,[b,C]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[N,/_/g," "],[b,E],[v,"Nokia"]],[/(pixel (c|tablet))\b/i],[N,[v,J],[b,C]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[N,[v,J],[b,E]],[/(google) (pixelbook( go)?)/i],[v,N],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[N,[v,ue],[b,E]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[N,"Xperia Tablet"],[v,ue],[b,C]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[N,[v,K],[b,C]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[N,/(.+)/g,"Fire Phone $1"],[v,K],[b,E]],[/(playbook);[-\w\),; ]+(rim)/i],[N,v,[b,C]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[N,[v,Y],[b,E]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[N,[v,Q],[b,C]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[N,[v,Q],[b,E]],[/(nexus 9)/i],[N,[v,"HTC"],[b,C]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[v,[N,/_/g," "],[b,E]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[N,[v,"TCL"],[b,C]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[N,[v,"TCL"],[b,E]],[/(itel) ((\w+))/i],[[v,_e],N,[b,Le,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[N,[v,"Acer"],[b,C]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[N,[v,"Meizu"],[b,E]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[N,[v,"Ulefone"],[b,E]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[N,[v,"Energizer"],[b,E]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[N,[v,"Cat"],[b,E]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[N,[v,"Smartfren"],[b,E]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[N,[v,"Nothing"],[b,E]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[N,[v,"Archos"],[b,C]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[N,[v,"Archos"],[b,E]],[/; (n159v)/i],[N,[v,"HMD"],[b,E]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[v,N,[b,C]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl|wiko)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i,/(hisense) ([ehv][\w ]+)\)/i,/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i],[v,N,[b,E]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[v,N,[b,C]],[/(surface duo)/i],[N,[v,ne],[b,C]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[N,[v,"Fairphone"],[b,E]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[N,[v,oe],[b,C]],[/(sprint) (\w+)/i],[v,N,[b,E]],[/(kin\.[onetw]{3})/i],[[N,/\./g," "],[v,ne],[b,E]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[N,[v,de],[b,C]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[N,[v,de],[b,E]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[v,[b,k]],[/hbbtv.+maple;(\d+)/i],[[N,/^/,"SmartTV"],[v,le],[b,k]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[v,N,[b,k]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[v,re],[b,k]],[/(apple) ?tv/i],[v,[N,X+" TV"],[b,k]],[/crkey.*devicetype\/chromecast/i],[[N,he+" Third Generation"],[v,J],[b,k]],[/crkey.*devicetype\/([^/]*)/i],[[N,/^/,"Chromecast "],[v,J],[b,k]],[/fuchsia.*crkey/i],[[N,he+" Nest Hub"],[v,J],[b,k]],[/crkey/i],[[N,he],[v,J],[b,k]],[/(portaltv)/i],[N,[v,ve],[b,k]],[/droid.+aft(\w+)( bui|\))/i],[N,[v,K],[b,k]],[/(shield \w+ tv)/i],[N,[v,oe],[b,k]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[N,[v,ce],[b,k]],[/(bravia[\w ]+)( bui|\))/i],[N,[v,ue],[b,k]],[/(mi(tv|box)-?\w+) bui/i],[N,[v,pe],[b,k]],[/Hbbtv.*(technisat) (.*);/i],[v,N,[b,k]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[v,/.+\/(\w+)/,"$1",Le,{LG:"lge"}],[N,ze],[b,k]],[/(playstation \w+)/i],[N,[v,ue],[b,j]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[N,[v,ne],[b,j]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i,/(valve).+(steam deck)/i,/droid.+; ((shield|rgcube|gr0006))( bui|\))/i],[[v,Le,{Nvidia:"Shield",Anbernic:"RGCUBE",Logitech:"GR0006"}],N,[b,j]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[N,[v,le],[b,T]],[/((pebble))app/i,/(asus|google|lg|oppo|xiaomi) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[v,N,[b,T]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[N,[v,ae],[b,T]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[N,[v,X],[b,T]],[/(opwwe\d{3})/i],[N,[v,se],[b,T]],[/(moto 360)/i],[N,[v,ie],[b,T]],[/(smartwatch 3)/i],[N,[v,ue],[b,T]],[/(g watch r)/i],[N,[v,re],[b,T]],[/droid.+; (wt63?0{2,3})\)/i],[N,[v,de],[b,T]],[/droid.+; (glass) \d/i],[N,[v,J],[b,R]],[/(pico) ([\w ]+) os\d/i],[v,N,[b,R]],[/(quest( \d| pro)?s?).+vr/i],[N,[v,ve],[b,R]],[/mobile vr; rv.+firefox/i],[[b,R]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[v,[b,O]],[/(aeobc)\b/i],[N,[v,K],[b,O]],[/(homepod).+mac os/i],[N,[v,X],[b,O]],[/windows iot/i],[[b,O]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[N,[b,k]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[b,k]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[N,[b,Le,{mobile:"Mobile",xr:"VR","*":C}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[b,C]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[b,E]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[N,[v,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[x,[g,ye+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[g,x],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[x,[g,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links|dillo)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[g,x],[/ladybird\//i],[[g,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[x,g]],os:[[/(windows nt) (6\.[23]); arm/i],[[g,/N/,"R"],[x,Le,qe]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[g,x],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[x,/(;|\))/g,"",Le,qe],[g,Ne]],[/(windows ce)\/?([\d\.]*)/i],[g,x],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv|ios(?=.+ip(?:ad|hone)|.+apple ?tv)|ip(?:ad|hone)(?: |.+i(?:pad)?)os|apple ?tv.+ios)[\/ ]([\w\.]+)/i,/\btvos ?([\w\.]+)/i,/cfnetwork\/.+darwin/i],[[x,/_/g,"."],[g,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[g,"macOS"],[x,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[x,[g,he+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[x,[g,he+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[x,[g,he+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[x,[g,he+" Linux"]],[/crkey\/([\d\.]+)/i],[x,[g,he]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[x,g],[/(ubuntu) ([\w\.]+) like android/i],[[g,/(.+)/,"$1 Touch"],x],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[g,x],[/\(bb(10);/i],[x,[g,Y]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[x,[g,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile[;\w ]*|tablet|tv|[^\)]*(?:viera|lg(?:l25|-d300)|alcatel ?o.+|y300-f1)); rv:([\w\.]+)\).+gecko\//i],[x,[g,ge+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[x,[g,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[x,Le,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[g,"webOS"]],[/watch(?: ?os[,\/ ]|\d,\d\/)([\d\.]+)/i],[x,[g,"watchOS"]],[/cros [\w]+(?:\)| ([\w\.]+)\b)/i],[x,[g,"Chrome OS"]],[/kepler ([\w\.]+); (aft|aeo)/i],[x,[g,"Vega OS"]],[/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[g,x],[/(sunos) ?([\d\.]*)/i],[[g,"Solaris"],x],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[g,x]]},$e=(Ie.call((i={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}}).init,[[p,[g,x,S,b]],[d,[w]],[m,[b,N,v]],[f,[g,x]],[h,[g,x]]]),Ie.call(i.isIgnore,[[p,[x,S]],[f,[x]],[h,[x]]]),Ie.call(i.isIgnoreRgx,[[p,/ ?browser$/i],[h,/ ?os$/i]]),Ie.call(i.toString,[[p,[g,x]],[d,[w]],[m,[v,N]],[f,[g,x]],[h,[g,x]]]),i),Ve=function(e,t){var r=$e.init[t],n=$e.isIgnore[t]||0,i=$e.isIgnoreRgx[t]||0,o=$e.toString[t]||0;function a(){Ie.call(this,r)}return a.prototype.getItem=function(){return e},a.prototype.withClientHints=function(){return Ce?Ce.getHighEntropyValues(W).then(function(t){return e.setCH(new Ge(t,!1)).parseCH().get()}):e.parseCH().get()},a.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=y&&(a.prototype.is=function(e){var t=!1;for(var r in this)if(this.hasOwnProperty(r)&&!Te(n,r)&&_e(i?Me(i,this[r]):this[r])==_e(i?Me(i,e):e)){if(t=!0,e!=u)break}else if(e==u&&t){t=!t;break}return t},a.prototype.toString=function(){var e=s;for(var t in o)typeof this[o[t]]!==u&&(e+=(e?" ":s)+this[o[t]]);return e||u}),a.prototype.then=function(e){var t=this,r=function(){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e])};r.prototype={is:a.prototype.is,toString:a.prototype.toString,withClientHints:a.prototype.withClientHints,withFeatureCheck:a.prototype.withFeatureCheck};var n=new r;return e(n),n},new a};function Ge(e,t){if(e=e||{},Ie.call(this,W),t)Ie.call(this,[[_,Pe(e[B])],[I,Pe(e[L])],[E,/\?1/.test(e[F])],[N,De(e[$])],[M,De(e[V])],[D,De(e[G])],[w,De(e[q])],[A,Pe(e[H])],[z,De(e[U])]]);else for(var r in e)this.hasOwnProperty(r)&&typeof e[r]!==u&&(this[r]=e[r])}function We(e,t,r,n){return Ie.call(this,[["itemType",e],["ua",t],["uaCH",n],["rgxMap",r],["data",Ve(this,e)]]),this}function Ke(e,t,r){if(typeof e===l?(Re(e,!0)?(typeof t===l&&(r=t),t=e):(r=e,t=n),e=n):typeof e!==c||Re(t,!0)||(r=t,t=n),r)if(typeof r.append===a){var i={};r.forEach(function(e,t){i[String(t).toLowerCase()]=e}),r=i}else{var u={};for(var g in r)r.hasOwnProperty(g)&&(u[String(g).toLowerCase()]=r[g]);r=u}if(!(this instanceof Ke))return new Ke(e,t,r).getResult();var b=typeof e===c?e:r&&r[o]?r[o]:Ee&&Ee.userAgent?Ee.userAgent:s,v=new Ge(r,!0),x=t?function(e,t){var r={},n=t;if(!Re(t))for(var i in n={},t)for(var o in t[i])n[o]=t[i][o].concat(n[o]?n[o]:[]);for(var s in e)r[s]=n[s]&&n[s].length%2==0?n[s].concat(e[s]):e[s];return r}(Fe,t):Fe,w=function(e){return e==y?function(){return new We(e,b,x,v).set("ua",b).set(p,this.getBrowser()).set(d,this.getCPU()).set(m,this.getDevice()).set(f,this.getEngine()).set(h,this.getOS()).get()}:function(){return new We(e,b,x[e],v).parseUA().get()}};return Ie.call(this,[["getBrowser",w(p)],["getCPU",w(d)],["getDevice",w(m)],["getEngine",w(f)],["getOS",w(h)],["getResult",w(y)],["getUA",function(){return b}],["setUA",function(e){return Oe(e)&&(b=ze(e,500)),this}]]).setUA(b),this}We.prototype.get=function(e){return e?this.data.hasOwnProperty(e)?this.data[e]:n:this.data},We.prototype.set=function(e,t){return this.data[e]=t,this},We.prototype.setCH=function(e){return this.uaCH=e,this},We.prototype.detectFeature=function(){if(Ee&&Ee.userAgent==this.ua)switch(this.itemType){case p:Ee.brave&&typeof Ee.brave.isBrave==a&&this.set(g,"Brave");break;case m:!this.get(b)&&Ce&&Ce[E]&&this.set(b,E),"Macintosh"==this.get(N)&&Ee&&typeof Ee.standalone!==u&&Ee.maxTouchPoints&&Ee.maxTouchPoints>2&&this.set(N,"iPad").set(b,C);break;case h:!this.get(g)&&Ce&&Ce[M]&&this.set(g,Ce[M]);break;case y:var e=this.data,t=function(t){return e[t].getItem().detectFeature().get()};this.set(p,t(p)).set(d,t(d)).set(m,t(m)).set(f,t(f)).set(h,t(h))}return this},We.prototype.parseUA=function(){switch(this.itemType!=y&&Be.call(this.data,this.ua,this.rgxMap),this.itemType){case p:this.set(S,Ae(this.get(x)));break;case h:if("iOS"==this.get(g)&&"18.6"==this.get(x)){var e=/\) Version\/([\d\.]+)/.exec(this.ua);e&&parseInt(e[1].substring(0,2),10)>=26&&this.set(x,e[1])}}return this},We.prototype.parseCH=function(){var e=this.uaCH,t=this.rgxMap;switch(this.itemType){case p:case f:var r,i=e[I]||e[_];if(i)for(var o=0;o<i.length;o++){var s=i[o].brand||i[o],a=i[o].version;this.itemType==p&&!/not.a.brand/i.test(s)&&(!r||/Chrom/.test(r)&&s!=fe||r==ye&&/WebView2/.test(s))&&(s=Le(s,He),(r=this.get(g))&&!/Chrom/.test(r)&&/Chrom/.test(s)||this.set(g,s).set(x,a).set(S,Ae(a)),r=s),this.itemType==f&&s==fe&&this.set(x,a)}break;case d:var l=e[w];l&&(l&&"64"==e[z]&&(l+="64"),Be.call(this.data,l+";",t));break;case m:if(e[E]&&this.set(b,E),e[N]&&(this.set(N,e[N]),!this.get(b)||!this.get(v))){var c={};Be.call(c,"droid 9; "+e[N]+")",t),!this.get(b)&&c.type&&this.set(b,c.type),!this.get(v)&&c.vendor&&this.set(v,c.vendor)}if(e[A]){var u;if("string"!=typeof e[A])for(var j=0;!u&&j<e[A].length;)u=Le(e[A][j++],Ue);else u=Le(e[A],Ue);this.set(b,u)}break;case h:var C=e[M];if(C){var k=e[D];C==Ne&&(k=parseInt(Ae(k),10)>=13?"11":"10"),this.set(g,C).set(x,k)}this.get(g)==Ne&&"Xbox"==e[N]&&this.set(g,"Xbox").set(x,n);break;case y:var T=this.data,R=function(t){return T[t].getItem().setCH(e).parseCH().get()};this.set(p,R(p)).set(d,R(d)).set(m,R(m)).set(f,R(f)).set(h,R(h))}return this},Ke.VERSION="2.0.9",Ke.BROWSER=ke([g,x,S,b]),Ke.CPU=ke([w]),Ke.DEVICE=ke([N,v,b,j,E,k,C,T,O]),Ke.ENGINE=Ke.OS=ke([g,x]),e.exports&&(t=e.exports=Ke),t.UAParser=Ke;var Xe=je&&(r.jQuery||r.Zepto);if(Xe&&!Xe.ua){var Qe=new Ke;Xe.ua=Qe.getResult(),Xe.ua.get=function(){return Qe.getUA()},Xe.ua.set=function(e){Qe.setUA(e);var t=Qe.getResult();for(var r in t)Xe.ua[r]=t[r]}}}("object"==typeof window?window:Xt)),Kt.exports;var e,t}var Yt,Jt={},Zt={};var er,tr,rr={};function nr(){return tr||(tr=1,e=Jt,g=Jt&&Jt.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),b=Jt&&Jt.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||g(t,e,r)},Object.defineProperty(e,"__esModule",{value:!0}),b((Yt||(Yt=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.SYSTEM_TYPE=Zt.XTOOL_PLATFORM=Zt.MAKEBLOCK_PLATFORM=Zt.AREA=Zt.DOMAIN_SPACE=Zt.MESSAGE_TYPE=Zt.CLIENT_ENV=Zt.PAGE_MODE=void 0,(r=t||(Zt.PAGE_MODE=t={})).PAGE="page",r.WIN="win",r.FULL_WIN="full-win",(i=n||(Zt.CLIENT_ENV=n={})).DEV="dev",i.TEST_US="test_us",i.TEST="test",i.PRE="pre",i.PROD="prod",i.LOCAL="local",(s=o||(Zt.MESSAGE_TYPE=o={})).LOGIN="login",s.LOGOUT="logout",s.REGISTER="register",s.FINDPWD="findpwd",s.SWITCH_HSOT="switchHost",(l=a||(Zt.DOMAIN_SPACE=a={})).MAKEBLOCK="makeblock",l.XTOOL="xtool",(u=c||(Zt.AREA=c={})).EU="eu",u.CN="cn",u.US="us",(d=p||(Zt.MAKEBLOCK_PLATFORM=p={})).MBLOCK_5="mblock_5",d.MBLOCK_WEB="mblock_web",d.MBLOCK_PC="mblock_pc",d.MBLOCK_MOBILE="mblock_mobile",d.ONE_BOX="one_box",d.STEAM_PLATFORM_STU="steam_platform_stu",d.STEAM_PLATFORM_TEACHER="steam_platform_teacher",d.COMMUNITY="community",d.EXT_BUILDER="ext_builder",d.MAKEX="makex",d.MAKE_D2V="makeblock_d2v",(f=m||(Zt.XTOOL_PLATFORM=m={})).XCS="xcs",f.PROJECTS="projects",f.DESIGN_FIND="design_find",f.ATOMM="atomm",f.SUPPORT="support",f.X_ART="xart",f.SMB="smb",f.CUSTOM_THINGS="custom_things",f.PASSPORT="passport",f.FOCUSAUR="focusaur",f.XCS_CMS="xcs_cms",f.MARKETING="marketing",f.MATERIALS_LAB="materials_lab",f.STUDIO="studio",f.BRAND_WEBSITE="brand_website",f.PRM="prm",(y=h||(Zt.SYSTEM_TYPE=h={})).PC="pc",y.PAD="pad",y.MOBILE="mobile",y.APP="app",y.OS="os"),Zt),e),b((er||(er=1,Object.defineProperty(rr,"__esModule",{value:!0}),rr.LANG_KEY=rr.TOKEN_KEY=rr.MESSAGE_ORIGIN_NAME=rr.POST_MESSAGE_SOURCE=void 0,rr.POST_MESSAGE_SOURCE="makeblock-passport",rr.MESSAGE_ORIGIN_NAME="passport-client",rr.TOKEN_KEY="utoken",rr.LANG_KEY="IntlLang"),rr),e)),Jt;var e,t,r,n,i,o,s,a,l,c,u,p,d,m,f,h,y,g,b}var ir,or={},sr={};function ar(){return ir||(ir=1,function(e){var t=sr&&sr.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.openLoginModal=e.closeLoginModal=void 0;const r=nr(),n={position:"fixed",top:0,right:0,bottom:0,left:0,zIndex:19999,backgroundColor:"rgba(57, 57, 57, 0.15)",display:"flex",justifyContent:"center",alignItems:"center"},i={width:"100vw",height:"100vh",borderRadius:"0"},o={position:"absolute",top:"0.3rem",right:"0.4rem",zIndex:"100",cursor:"pointer",fontSize:"20px",width:"24px",height:"24px",display:"flex",justifyContent:"center",alignItems:"center","-webkit-app-region":"no-drag"},s="passport-modal-container",a="passport-advertisement-container",l="passport-advertisement-content",c="passport-modal-content-wrap",u="passport-modal-content-scroll",p="passport-modal-content",d="passport-modal-close-btn",m="passport-modal-iframe",f="passport-modal-loading";let h=null;e.closeLoginModal=e=>{const t=document.querySelector(`#${s}`);t&&t.remove&&(t.remove(),window.postMessage({action:"close-passport-modal",reason:e}),h&&(window.removeEventListener("message",h),h=null))};const y=e=>{const t=e.data,{action:r,from:n}=t;if("hide-modal-close"===r&&["xtool-passport-web"].some(e=>e===n)){const e=document.querySelector(`#${d}`);e&&(e.style.display="none")}};e.openLoginModal=(g,b,v)=>{const x=g,{advertisement:w,advertisementPosition:S,height:N,loading:j,adaptWindow:E,loadingImage:C}=v,k=b===r.PAGE_MODE.FULL_WIN,T=b===r.PAGE_MODE.WIN,R=E&&!k;let O=document.querySelector("#passport-prefetch-iframe");O&&O.remove(),T&&(h&&window.removeEventListener("message",h),h=(e=>t=>{const r=t.data,{action:n,payload:i}=r;if("win-height-change"===n){const t=document.querySelector(`#${p}`),r=document.querySelector(`#${f}`),n=document.querySelector(`#${m}`),o=document.querySelector(`#${l}`);if(t){const r=i>520?i:520;t.style.height=`${r}px`,n.style.height=`${r}px`,e||(o.style.height=`${r}px`)}r&&(n.style.visibility="visible",r.remove())}})(N),window.addEventListener("message",h),window.removeEventListener("message",y),window.addEventListener("message",y));if(document.querySelector(`#${s}`))return;const P=document.querySelector("body"),_=`<div id="${s}" >\n \n <style>\n @media (max-width: 576px) {\n #passport-modal-content-wrap {\n position: fixed !important;\n left:0 !important;\n top:0 !important;\n width: 100% !important;\n height: 100% !important;\n max-height: 100% !important;\n border-radius: 0px !important;\n }\n }\n </style>\n \n <div id="${a}">\n <div id="${l}"></div>\n <div id="${c}"> \n <span id="${d}">×</span>\n <div id="${u}">\n <div id="${p}" >\n <iframe id="${m}" src="${x}" scrolling="no" frameborder="0"></iframe>\n ${j?"string"==typeof C?`<img id="${f}" src="${C}" style="width: 15%;" />`:C instanceof HTMLElement?(C.style.position="absolute",C.style.top="0",C.style.left="0",C.style.width="100%",C.style.height="100%",C.id=f,C.outerHTML):`<img id="${f}" src="https://storage-us.atomm.com/resource/static/passport/passport-client-common-loading.gif" style="width: 15%;" />`:""} \n </div>\n </div>\n </div>\n </div>\n </div>`,A=document.createElement("div");A.innerHTML+=_,null==P||P.append(A);const I=document.querySelector(`#${s}`),M=document.querySelector(`#${a}`),D=document.querySelector(`#${l}`),z=document.querySelector(`#${c}`),B=document.querySelector(`#${u}`),L=document.querySelector(`#${p}`),q=document.querySelector(`#${m}`),U=document.querySelector(`#${d}`),H=document.querySelector(`#${f}`);H&&(q.style.visibility="hidden",H.style.visibility="visible",(e=>t(void 0,void 0,void 0,function*(){return new Promise(t=>{window.addEventListener("message",e=>{const r=e.data,{action:n}=r;"passport-on-mounted"===n&&t(!0)}),e.onload=function(){t(!0)}})}))(q).then(()=>{q.style.visibility="visible",null==H||H.remove()})),w&&(w.style.height="100%",null==D||D.appendChild(w));U.onclick=()=>{(0,e.closeLoginModal)("click-close-btn")};const F=(e,t)=>{if(e)for(const r in t)e.style[r]=t[r]};F(I,n),F(M,(e=>({display:"flex",borderRadius:"20px",overflow:e?"unset":"hidden",alignItems:"center",position:"relative"}))(k)),F(D,((e,t,r)=>({height:`${t||600}px`,backgroundColor:"white",order:e?1:0,maxHeight:r?"calc(100vh - 20px)":"unset"}))("right"===S,N,R)),F(z,Object.assign({},((e,t,r)=>({height:r?`${r}px`:"auto",width:"400px",maxHeight:t?"calc(100vh - 20px)":"unset",boxSizing:"border-box",zIndex:2e4,borderRadius:e?"unset":"20px",overflow:"hidden auto",backgroundColor:"white"}))(!!w,R,N),k?i:{})),F(B,((e,t)=>({height:t?"100%":"auto",overflow:"hidden"}))(0,k)),F(L,((e,t)=>({height:t?"100%":`${e||600}px`,position:"relative"}))(N,k)),F(U,o),F(q,((e,t)=>({boxSizing:"border-box",width:"100%",userSelect:"none",height:t?"100%":`${e||600}px`}))(N,k)),C instanceof HTMLElement||F(H,(e=>({position:"absolute",left:"50%",top:"50%",transform:"translate(-50%,-50%)",display:e?"block":"none"}))(j))}}(sr)),sr}var lr,cr,ur={};function pr(){return cr||(cr=1,e=or,t=or&&or.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=or&&or.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)},Object.defineProperty(e,"__esModule",{value:!0}),r(ar(),e),r((lr||(lr=1,Object.defineProperty(ur,"__esModule",{value:!0}),ur.systemLang=void 0,ur.systemLang=()=>{const{language:e,languages:t}=navigator;return e||(Array.isArray(t)&&t.length>0?t[0]:null)}),ur),e)),or;var e,t,r}var dr,mr,fr,hr={};
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).GeneratorSDK=t()}(this,function(){"use strict";var e,t=Object.defineProperty,r=(e,r,n)=>((e,r,n)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n)(e,"symbol"!=typeof r?r+"":r,n);function n(e,t){return function(){return e.apply(t,arguments)}}const{toString:i}=Object.prototype,{getPrototypeOf:o}=Object,{iterator:s,toStringTag:a}=Symbol,l=(e=>t=>{const r=i.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),c=e=>(e=e.toLowerCase(),t=>l(t)===e),u=e=>t=>typeof t===e,{isArray:p}=Array,d=u("undefined");function m(e){return null!==e&&!d(e)&&null!==e.constructor&&!d(e.constructor)&&y(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const f=c("ArrayBuffer");const h=u("string"),y=u("function"),g=u("number"),b=e=>null!==e&&"object"==typeof e,v=e=>{if("object"!==l(e))return!1;const t=o(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||a in e||s in e)},x=c("Date"),w=c("File"),S=c("Blob"),N=c("FileList");const j="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},E=void 0!==j.FormData?j.FormData:void 0,C=c("URLSearchParams"),[k,T,R,O]=["ReadableStream","Request","Response","Headers"].map(c);function P(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,i;if("object"!=typeof e&&(e=[e]),p(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{if(m(e))return;const i=r?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let s;for(n=0;n<o;n++)s=i[n],t.call(null,e[s],s,e)}}function _(e,t){if(m(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n,i=r.length;for(;i-- >0;)if(n=r[i],t===n.toLowerCase())return n;return null}const A="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,I=e=>!d(e)&&e!==A;const M=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&o(Uint8Array)),D=c("HTMLFormElement"),z=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),B=c("RegExp"),L=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};P(r,(r,i)=>{let o;!1!==(o=t(r,i,e))&&(n[i]=o||r)}),Object.defineProperties(e,n)};const q=c("AsyncFunction"),U=(H="function"==typeof setImmediate,F=y(A.postMessage),H?setImmediate:F?($=`axios@${Math.random()}`,V=[],A.addEventListener("message",({source:e,data:t})=>{e===A&&t===$&&V.length&&V.shift()()},!1),e=>{V.push(e),A.postMessage($,"*")}):e=>setTimeout(e));var H,F,$,V;const G="undefined"!=typeof queueMicrotask?queueMicrotask.bind(A):"undefined"!=typeof process&&process.nextTick||U,W={isArray:p,isArrayBuffer:f,isBuffer:m,isFormData:e=>{let t;return e&&(E&&e instanceof E||y(e.append)&&("formdata"===(t=l(e))||"object"===t&&y(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&f(e.buffer),t},isString:h,isNumber:g,isBoolean:e=>!0===e||!1===e,isObject:b,isPlainObject:v,isEmptyObject:e=>{if(!b(e)||m(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},isReadableStream:k,isRequest:T,isResponse:R,isHeaders:O,isUndefined:d,isDate:x,isFile:w,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:S,isRegExp:B,isFunction:y,isStream:e=>b(e)&&y(e.pipe),isURLSearchParams:C,isTypedArray:M,isFileList:N,forEach:P,merge:function e(){const{caseless:t,skipUndefined:r}=I(this)&&this||{},n={},i=(i,o)=>{if("__proto__"===o||"constructor"===o||"prototype"===o)return;const s=t&&_(n,o)||o;v(n[s])&&v(i)?n[s]=e(n[s],i):v(i)?n[s]=e({},i):p(i)?n[s]=i.slice():r&&d(i)||(n[s]=i)};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&P(arguments[o],i);return n},extend:(e,t,r,{allOwnKeys:i}={})=>(P(t,(t,i)=>{r&&y(t)?Object.defineProperty(e,i,{value:n(t,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let i,s,a;const l={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)a=i[s],n&&!n(a,e,t)||l[a]||(t[a]=e[a],l[a]=!0);e=!1!==r&&o(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:l,kindOfTest:c,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(p(e))return e;let t=e.length;if(!g(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[s]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:D,hasOwnProperty:z,hasOwnProp:z,reduceDescriptors:L,freezeMethods:e=>{L(e,(t,r)=>{if(y(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];y(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))})},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach(e=>{r[e]=!0})};return p(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:_,global:A,isContextDefined:I,isSpecCompliantForm:function(e){return!!(e&&y(e.append)&&"FormData"===e[a]&&e[s])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(b(e)){if(t.indexOf(e)>=0)return;if(m(e))return e;if(!("toJSON"in e)){t[n]=e;const i=p(e)?[]:{};return P(e,(e,t)=>{const o=r(e,n+1);!d(o)&&(i[t]=o)}),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:q,isThenable:e=>e&&(b(e)||y(e))&&y(e.then)&&y(e.catch),setImmediate:U,asap:G,isIterable:e=>null!=e&&y(e[s])};let K=class e extends Error{static from(t,r,n,i,o,s){const a=new e(t.message,r||t.code,n,i,o);return a.cause=t,a.name=t.name,null!=t.status&&null==a.status&&(a.status=t.status),s&&Object.assign(a,s),a}constructor(e,t,r,n,i){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:W.toJSONObject(this.config),code:this.code,status:this.status}}};K.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",K.ERR_BAD_OPTION="ERR_BAD_OPTION",K.ECONNABORTED="ECONNABORTED",K.ETIMEDOUT="ETIMEDOUT",K.ERR_NETWORK="ERR_NETWORK",K.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",K.ERR_DEPRECATED="ERR_DEPRECATED",K.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",K.ERR_BAD_REQUEST="ERR_BAD_REQUEST",K.ERR_CANCELED="ERR_CANCELED",K.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",K.ERR_INVALID_URL="ERR_INVALID_URL";function X(e){return W.isPlainObject(e)||W.isArray(e)}function Q(e){return W.endsWith(e,"[]")?e.slice(0,-2):e}function Y(e,t,r){return e?e.concat(t).map(function(e,t){return e=Q(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}const J=W.toFlatObject(W,{},null,function(e){return/^is[A-Z]/.test(e)});function Z(e,t,r){if(!W.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=W.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!W.isUndefined(t[e])})).metaTokens,i=r.visitor||c,o=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&W.isSpecCompliantForm(t);if(!W.isFunction(i))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(W.isDate(e))return e.toISOString();if(W.isBoolean(e))return e.toString();if(!a&&W.isBlob(e))throw new K("Blob is not supported. Use a Buffer instead.");return W.isArrayBuffer(e)||W.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,r,i){let a=e;if(W.isReactNative(t)&&W.isReactNativeBlob(e))return t.append(Y(i,r,o),l(e)),!1;if(e&&!i&&"object"==typeof e)if(W.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(W.isArray(e)&&function(e){return W.isArray(e)&&!e.some(X)}(e)||(W.isFileList(e)||W.endsWith(r,"[]"))&&(a=W.toArray(e)))return r=Q(r),a.forEach(function(e,n){!W.isUndefined(e)&&null!==e&&t.append(!0===s?Y([r],n,o):null===s?r:r+"[]",l(e))}),!1;return!!X(e)||(t.append(Y(i,r,o),l(e)),!1)}const u=[],p=Object.assign(J,{defaultVisitor:c,convertValue:l,isVisitable:X});if(!W.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!W.isUndefined(r)){if(-1!==u.indexOf(r))throw Error("Circular reference detected in "+n.join("."));u.push(r),W.forEach(r,function(r,o){!0===(!(W.isUndefined(r)||null===r)&&i.call(t,r,W.isString(o)?o.trim():o,n,p))&&e(r,n?n.concat(o):[o])}),u.pop()}}(e),t}function ee(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function te(e,t){this._pairs=[],e&&Z(e,this,t)}const re=te.prototype;function ne(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ie(e,t,r){if(!t)return e;const n=r&&r.encode||ne,i=W.isFunction(r)?{serialize:r}:r,o=i&&i.serialize;let s;if(s=o?o(t,i):W.isURLSearchParams(t)?t.toString():new te(t,i).toString(n),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}re.append=function(e,t){this._pairs.push([e,t])},re.toString=function(e){const t=e?function(t){return e.call(this,t,ee)}:ee;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class oe{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){W.forEach(this.handlers,function(t){null!==t&&e(t)})}}const se={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},ae={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:te,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},le="undefined"!=typeof window&&"undefined"!=typeof document,ce="object"==typeof navigator&&navigator||void 0,ue=le&&(!ce||["ReactNative","NativeScript","NS"].indexOf(ce.product)<0),pe="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,de=le&&window.location.href||"http://localhost",me={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:le,hasStandardBrowserEnv:ue,hasStandardBrowserWebWorkerEnv:pe,navigator:ce,origin:de},Symbol.toStringTag,{value:"Module"})),...ae};function fe(e){function t(e,r,n,i){let o=e[i++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),a=i>=e.length;if(o=!o&&W.isArray(n)?n.length:o,a)return W.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r,!s;n[o]&&W.isObject(n[o])||(n[o]=[]);return t(e,r,n[o],i)&&W.isArray(n[o])&&(n[o]=function(e){const t={},r=Object.keys(e);let n;const i=r.length;let o;for(n=0;n<i;n++)o=r[n],t[o]=e[o];return t}(n[o])),!s}if(W.isFormData(e)&&W.isFunction(e.entries)){const r={};return W.forEachEntry(e,(e,n)=>{t(function(e){return W.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),n,r,0)}),r}return null}const he={transitional:se,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,i=W.isObject(e);i&&W.isHTMLForm(e)&&(e=new FormData(e));if(W.isFormData(e))return n?JSON.stringify(fe(e)):e;if(W.isArrayBuffer(e)||W.isBuffer(e)||W.isStream(e)||W.isFile(e)||W.isBlob(e)||W.isReadableStream(e))return e;if(W.isArrayBufferView(e))return e.buffer;if(W.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Z(e,new me.classes.URLSearchParams,{visitor:function(e,t,r,n){return me.isNode&&W.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((o=W.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Z(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||n?(t.setContentType("application/json",!1),function(e,t,r){if(W.isString(e))try{return(t||JSON.parse)(e),W.trim(e)}catch(n){if("SyntaxError"!==n.name)throw n}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||he.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(W.isResponse(e)||W.isReadableStream(e))return e;if(e&&W.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e,this.parseReviver)}catch(i){if(r){if("SyntaxError"===i.name)throw K.from(i,K.ERR_BAD_RESPONSE,this,null,this.response);throw i}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:me.classes.FormData,Blob:me.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};W.forEach(["delete","get","head","post","put","patch"],e=>{he.headers[e]={}});const ye=W.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ge=Symbol("internals");function be(e){return e&&String(e).trim().toLowerCase()}function ve(e){return!1===e||null==e?e:W.isArray(e)?e.map(ve):String(e)}function xe(e,t,r,n,i){return W.isFunction(n)?n.call(this,t,r):(i&&(t=r),W.isString(t)?W.isString(n)?-1!==t.indexOf(n):W.isRegExp(n)?n.test(t):void 0:void 0)}let we=class{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function i(e,t,r){const i=be(t);if(!i)throw new Error("header name must be a non-empty string");const o=W.findKey(n,i);(!o||void 0===n[o]||!0===r||void 0===r&&!1!==n[o])&&(n[o||t]=ve(e))}const o=(e,t)=>W.forEach(e,(e,r)=>i(e,r,t));if(W.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(W.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((e=>{const t={};let r,n,i;return e&&e.split("\n").forEach(function(e){i=e.indexOf(":"),r=e.substring(0,i).trim().toLowerCase(),n=e.substring(i+1).trim(),!r||t[r]&&ye[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t})(e),t);else if(W.isObject(e)&&W.isIterable(e)){let r,n,i={};for(const t of e){if(!W.isArray(t))throw TypeError("Object iterator must return a key-value pair");i[n=t[0]]=(r=i[n])?W.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}o(i,t)}else null!=e&&i(t,e,r);return this}get(e,t){if(e=be(e)){const r=W.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(W.isFunction(t))return t.call(this,e,r);if(W.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=be(e)){const r=W.findKey(this,e);return!(!r||void 0===this[r]||t&&!xe(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function i(e){if(e=be(e)){const i=W.findKey(r,e);!i||t&&!xe(0,r[i],i,t)||(delete r[i],n=!0)}}return W.isArray(e)?e.forEach(i):i(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const i=t[r];e&&!xe(0,this[i],i,e,!0)||(delete this[i],n=!0)}return n}normalize(e){const t=this,r={};return W.forEach(this,(n,i)=>{const o=W.findKey(r,i);if(o)return t[o]=ve(n),void delete t[i];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}(i):String(i).trim();s!==i&&delete t[i],t[s]=ve(n),r[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return W.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&W.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){const t=(this[ge]=this[ge]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=be(e);t[n]||(!function(e,t){const r=W.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:!0})})}(r,e),t[n]=!0)}return W.isArray(e)?e.forEach(n):n(e),this}};function Se(e,t){const r=this||he,n=t||r,i=we.from(n.headers);let o=n.data;return W.forEach(e,function(e){o=e.call(r,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function Ne(e){return!(!e||!e.__CANCEL__)}we.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),W.reduceDescriptors(we.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),W.freezeMethods(we);let je=class extends K{constructor(e,t,r){super(null==e?"canceled":e,K.ERR_CANCELED,t,r),this.name="CanceledError",this.__CANCEL__=!0}};function Ee(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new K("Request failed with status code "+r.status,[K.ERR_BAD_REQUEST,K.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}const Ce=(e,t,r=3)=>{let n=0;const i=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i,o=0,s=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=n[s];i||(i=l),r[o]=a,n[o]=l;let u=s,p=0;for(;u!==o;)p+=r[u++],u%=e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-i<t)return;const d=c&&l-c;return d?Math.round(1e3*p/d):void 0}}(50,250);return function(e,t){let r,n,i=0,o=1e3/t;const s=(t,o=Date.now())=>{i=o,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-i;a>=o?s(e,t):(r=e,n||(n=setTimeout(()=>{n=null,s(r)},o-a)))},()=>r&&s(r)]}(r=>{const o=r.loaded,s=r.lengthComputable?r.total:void 0,a=o-n,l=i(a);n=o;e({loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&o<=s?(s-o)/l:void 0,event:r,lengthComputable:null!=s,[t?"download":"upload"]:!0})},r)},ke=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Te=e=>(...t)=>W.asap(()=>e(...t)),Re=me.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,me.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(me.origin),me.navigator&&/(msie|trident)/i.test(me.navigator.userAgent)):()=>!0,Oe=me.hasStandardBrowserEnv?{write(e,t,r,n,i,o,s){if("undefined"==typeof document)return;const a=[`${e}=${encodeURIComponent(t)}`];W.isNumber(r)&&a.push(`expires=${new Date(r).toUTCString()}`),W.isString(n)&&a.push(`path=${n}`),W.isString(i)&&a.push(`domain=${i}`),!0===o&&a.push("secure"),W.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function Pe(e,t,r){let n=!("string"==typeof(i=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(i));var i;return e&&(n||0==r)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const _e=e=>e instanceof we?{...e}:e;function Ae(e,t){t=t||{};const r={};function n(e,t,r,n){return W.isPlainObject(e)&&W.isPlainObject(t)?W.merge.call({caseless:n},e,t):W.isPlainObject(t)?W.merge({},t):W.isArray(t)?t.slice():t}function i(e,t,r,i){return W.isUndefined(t)?W.isUndefined(e)?void 0:n(void 0,e,0,i):n(e,t,0,i)}function o(e,t){if(!W.isUndefined(t))return n(void 0,t)}function s(e,t){return W.isUndefined(t)?W.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,i,o){return o in t?n(r,i):o in e?n(void 0,r):void 0}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t,r)=>i(_e(e),_e(t),0,!0)};return W.forEach(Object.keys({...e,...t}),function(n){if("__proto__"===n||"constructor"===n||"prototype"===n)return;const o=W.hasOwnProp(l,n)?l[n]:i,s=o(e[n],t[n],n);W.isUndefined(s)&&o!==a||(r[n]=s)}),r}const Ie=e=>{const t=Ae({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=t;if(t.headers=s=we.from(s),t.url=ie(Pe(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),W.isFormData(r))if(me.hasStandardBrowserEnv||me.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(W.isFunction(r.getHeaders)){const e=r.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,r])=>{t.includes(e.toLowerCase())&&s.set(e,r)})}if(me.hasStandardBrowserEnv&&(n&&W.isFunction(n)&&(n=n(t)),n||!1!==n&&Re(t.url))){const e=i&&o&&Oe.read(o);e&&s.set(i,e)}return t},Me="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){const n=Ie(e);let i=n.data;const o=we.from(n.headers).normalize();let s,a,l,c,u,{responseType:p,onUploadProgress:d,onDownloadProgress:m}=n;function f(){c&&c(),u&&u(),n.cancelToken&&n.cancelToken.unsubscribe(s),n.signal&&n.signal.removeEventListener("abort",s)}let h=new XMLHttpRequest;function y(){if(!h)return;const n=we.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());Ee(function(e){t(e),f()},function(e){r(e),f()},{data:p&&"text"!==p&&"json"!==p?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:n,config:e,request:h}),h=null}h.open(n.method.toUpperCase(),n.url,!0),h.timeout=n.timeout,"onloadend"in h?h.onloadend=y:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(y)},h.onabort=function(){h&&(r(new K("Request aborted",K.ECONNABORTED,e,h)),h=null)},h.onerror=function(t){const n=t&&t.message?t.message:"Network Error",i=new K(n,K.ERR_NETWORK,e,h);i.event=t||null,r(i),h=null},h.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const i=n.transitional||se;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new K(t,i.clarifyTimeoutError?K.ETIMEDOUT:K.ECONNABORTED,e,h)),h=null},void 0===i&&o.setContentType(null),"setRequestHeader"in h&&W.forEach(o.toJSON(),function(e,t){h.setRequestHeader(t,e)}),W.isUndefined(n.withCredentials)||(h.withCredentials=!!n.withCredentials),p&&"json"!==p&&(h.responseType=n.responseType),m&&([l,u]=Ce(m,!0),h.addEventListener("progress",l)),d&&h.upload&&([a,c]=Ce(d),h.upload.addEventListener("progress",a),h.upload.addEventListener("loadend",c)),(n.cancelToken||n.signal)&&(s=t=>{h&&(r(!t||t.type?new je(null,e,h):t),h.abort(),h=null)},n.cancelToken&&n.cancelToken.subscribe(s),n.signal&&(n.signal.aborted?s():n.signal.addEventListener("abort",s)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);g&&-1===me.protocols.indexOf(g)?r(new K("Unsupported protocol "+g+":",K.ERR_BAD_REQUEST,e)):h.send(i||null)})},De=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const i=function(e){if(!r){r=!0,s();const t=e instanceof Error?e:this.reason;n.abort(t instanceof K?t:new je(t instanceof Error?t.message:t))}};let o=t&&setTimeout(()=>{o=null,i(new K(`timeout of ${t}ms exceeded`,K.ETIMEDOUT))},t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)}),e=null)};e.forEach(e=>e.addEventListener("abort",i));const{signal:a}=n;return a.unsubscribe=()=>W.asap(s),a}},ze=function*(e,t){let r=e.byteLength;if(r<t)return void(yield e);let n,i=0;for(;i<r;)n=i+t,yield e.slice(i,n),i=n},Be=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},Le=(e,t,r,n)=>{const i=async function*(e,t){for await(const r of Be(e))yield*ze(r,t)}(e,t);let o,s=0,a=e=>{o||(o=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await i.next();if(t)return a(),void e.close();let o=n.byteLength;if(r){let e=s+=o;r(e)}e.enqueue(new Uint8Array(n))}catch(t){throw a(t),t}},cancel:e=>(a(e),i.return())},{highWaterMark:2})},{isFunction:qe}=W,Ue=(({Request:e,Response:t})=>({Request:e,Response:t}))(W.global),{ReadableStream:He,TextEncoder:Fe}=W.global,$e=(e,...t)=>{try{return!!e(...t)}catch(r){return!1}},Ve=e=>{e=W.merge.call({skipUndefined:!0},Ue,e);const{fetch:t,Request:r,Response:n}=e,i=t?qe(t):"function"==typeof fetch,o=qe(r),s=qe(n);if(!i)return!1;const a=i&&qe(He),l=i&&("function"==typeof Fe?(e=>t=>e.encode(t))(new Fe):async e=>new Uint8Array(await new r(e).arrayBuffer())),c=o&&a&&$e(()=>{let e=!1;const t=new r(me.origin,{body:new He,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),u=s&&a&&$e(()=>W.isReadableStream(new n("").body)),p={stream:u&&(e=>e.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!p[e]&&(p[e]=(t,r)=>{let n=t&&t[e];if(n)return n.call(t);throw new K(`Response type '${e}' is not supported`,K.ERR_NOT_SUPPORT,r)})});const d=async(e,t)=>{const n=W.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(W.isBlob(e))return e.size;if(W.isSpecCompliantForm(e)){const t=new r(me.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return W.isArrayBufferView(e)||W.isArrayBuffer(e)?e.byteLength:(W.isURLSearchParams(e)&&(e+=""),W.isString(e)?(await l(e)).byteLength:void 0)})(t):n};return async e=>{let{url:i,method:s,data:a,signal:l,cancelToken:m,timeout:f,onDownloadProgress:h,onUploadProgress:y,responseType:g,headers:b,withCredentials:v="same-origin",fetchOptions:x}=Ie(e),w=t||fetch;g=g?(g+"").toLowerCase():"text";let S=De([l,m&&m.toAbortSignal()],f),N=null;const j=S&&S.unsubscribe&&(()=>{S.unsubscribe()});let E;try{if(y&&c&&"get"!==s&&"head"!==s&&0!==(E=await d(b,a))){let e,t=new r(i,{method:"POST",body:a,duplex:"half"});if(W.isFormData(a)&&(e=t.headers.get("content-type"))&&b.setContentType(e),t.body){const[e,r]=ke(E,Ce(Te(y)));a=Le(t.body,65536,e,r)}}W.isString(v)||(v=v?"include":"omit");const t=o&&"credentials"in r.prototype,l={...x,signal:S,method:s.toUpperCase(),headers:b.normalize().toJSON(),body:a,duplex:"half",credentials:t?v:void 0};N=o&&new r(i,l);let m=await(o?w(N,x):w(i,l));const f=u&&("stream"===g||"response"===g);if(u&&(h||f&&j)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=m[t]});const t=W.toFiniteNumber(m.headers.get("content-length")),[r,i]=h&&ke(t,Ce(Te(h),!0))||[];m=new n(Le(m.body,65536,r,()=>{i&&i(),j&&j()}),e)}g=g||"text";let C=await p[W.findKey(p,g)||"text"](m,e);return!f&&j&&j(),await new Promise((t,r)=>{Ee(t,r,{data:C,headers:we.from(m.headers),status:m.status,statusText:m.statusText,config:e,request:N})})}catch(C){if(j&&j(),C&&"TypeError"===C.name&&/Load failed|fetch/i.test(C.message))throw Object.assign(new K("Network Error",K.ERR_NETWORK,e,N,C&&C.response),{cause:C.cause||C});throw K.from(C,C&&C.code,e,N,C&&C.response)}}},Ge=new Map,We=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:i}=t,o=[n,i,r];let s,a,l=o.length,c=Ge;for(;l--;)s=o[l],a=c.get(s),void 0===a&&c.set(s,a=l?new Map:Ve(t)),c=a;return a};We();const Ke={http:null,xhr:Me,fetch:{get:We}};W.forEach(Ke,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(r){}Object.defineProperty(e,"adapterName",{value:t})}});const Xe=e=>`- ${e}`,Qe=e=>W.isFunction(e)||null===e||!1===e;const Ye={getAdapter:function(e,t){e=W.isArray(e)?e:[e];const{length:r}=e;let n,i;const o={};for(let s=0;s<r;s++){let r;if(n=e[s],i=n,!Qe(n)&&(i=Ke[(r=String(n)).toLowerCase()],void 0===i))throw new K(`Unknown adapter '${r}'`);if(i&&(W.isFunction(i)||(i=i.get(t))))break;o[r||"#"+s]=i}if(!i){const e=Object.entries(o).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=r?e.length>1?"since :\n"+e.map(Xe).join("\n"):" "+Xe(e[0]):"as no adapter specified";throw new K("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return i},adapters:Ke};function Je(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new je(null,e)}function Ze(e){Je(e),e.headers=we.from(e.headers),e.data=Se.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Ye.getAdapter(e.adapter||he.adapter,e)(e).then(function(t){return Je(e),t.data=Se.call(e,e.transformResponse,t),t.headers=we.from(t.headers),t},function(t){return Ne(t)||(Je(e),t&&t.response&&(t.response.data=Se.call(e,e.transformResponse,t.response),t.response.headers=we.from(t.response.headers))),Promise.reject(t)})}const et="1.13.6",tt={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{tt[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const rt={};tt.transitional=function(e,t,r){return(n,i,o)=>{if(!1===e)throw new K(function(e,t){return"[Axios v"+et+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}(i," has been removed"+(t?" in "+t:"")),K.ERR_DEPRECATED);return t&&!rt[i]&&(rt[i]=!0),!e||e(n,i,o)}},tt.spelling=function(e){return(e,t)=>!0};const nt={assertOptions:function(e,t,r){if("object"!=typeof e)throw new K("options must be an object",K.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const o=n[i],s=t[o];if(s){const t=e[o],r=void 0===t||s(t,o,e);if(!0!==r)throw new K("option "+o+" must be "+r,K.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new K("Unknown option "+o,K.ERR_BAD_OPTION)}},validators:tt},it=nt.validators;let ot=class{constructor(e){this.defaults=e||{},this.interceptors={request:new oe,response:new oe}}async request(e,t){try{return await this._request(e,t)}catch(r){if(r instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{r.stack?t&&!String(r.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(r.stack+="\n"+t):r.stack=t}catch(n){}}throw r}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ae(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:i}=t;void 0!==r&&nt.assertOptions(r,{silentJSONParsing:it.transitional(it.boolean),forcedJSONParsing:it.transitional(it.boolean),clarifyTimeoutError:it.transitional(it.boolean),legacyInterceptorReqResOrdering:it.transitional(it.boolean)},!1),null!=n&&(W.isFunction(n)?t.paramsSerializer={serialize:n}:nt.assertOptions(n,{encode:it.function,serialize:it.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),nt.assertOptions(t,{baseUrl:it.spelling("baseURL"),withXsrfToken:it.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&W.merge(i.common,i[t.method]);i&&W.forEach(["delete","get","head","post","put","patch","common"],e=>{delete i[e]}),t.headers=we.concat(o,i);const s=[];let a=!0;this.interceptors.request.forEach(function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;a=a&&e.synchronous;const r=t.transitional||se;r&&r.legacyInterceptorReqResOrdering?s.unshift(e.fulfilled,e.rejected):s.push(e.fulfilled,e.rejected)});const l=[];let c;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let u,p=0;if(!a){const e=[Ze.bind(this),void 0];for(e.unshift(...s),e.push(...l),u=e.length,c=Promise.resolve(t);p<u;)c=c.then(e[p++],e[p++]);return c}u=s.length;let d=t;for(;p<u;){const e=s[p++],t=s[p++];try{d=e(d)}catch(m){t.call(this,m);break}}try{c=Ze.call(this,d)}catch(m){return Promise.reject(m)}for(p=0,u=l.length;p<u;)c=c.then(l[p++],l[p++]);return c}getUri(e){return ie(Pe((e=Ae(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};W.forEach(["delete","get","head","options"],function(e){ot.prototype[e]=function(t,r){return this.request(Ae(r||{},{method:e,url:t,data:(r||{}).data}))}}),W.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,i){return this.request(Ae(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}ot.prototype[e]=t(),ot.prototype[e+"Form"]=t(!0)});const st={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(st).forEach(([e,t])=>{st[t]=e});const at=function e(t){const r=new ot(t),i=n(ot.prototype.request,r);return W.extend(i,ot.prototype,r,{allOwnKeys:!0}),W.extend(i,r,null,{allOwnKeys:!0}),i.create=function(r){return e(Ae(t,r))},i}(he);at.Axios=ot,at.CanceledError=je,at.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const r=this;this.promise.then(e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t;const n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e,n,i){r.reason||(r.reason=new je(e,n,i),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}},at.isCancel=Ne,at.VERSION=et,at.toFormData=Z,at.AxiosError=K,at.Cancel=at.CanceledError,at.all=function(e){return Promise.all(e)},at.spread=function(e){return function(t){return e.apply(null,t)}},at.isAxiosError=function(e){return W.isObject(e)&&!0===e.isAxiosError},at.mergeConfig=Ae,at.AxiosHeaders=we,at.formToJSON=e=>fe(W.isHTMLForm(e)?new FormData(e):e),at.getAdapter=Ye.getAdapter,at.HttpStatusCode=st,at.default=at;const{Axios:lt,AxiosError:ct,CanceledError:ut,isCancel:pt,CancelToken:dt,VERSION:mt,all:ft,Cancel:ht,isAxiosError:yt,spread:gt,toFormData:bt,AxiosHeaders:vt,HttpStatusCode:xt,formToJSON:wt,getAdapter:St,mergeConfig:Nt}=at,jt={prod:"https://api.xtool.com",pre:"https://api-pre.xtool.com",test:"https://api-test.xtool.com",test_us:"https://api-test.xtool.com",dev:"https://api-dev.makeblock.com"},Et="xtool-aimake-generator",Ct=e=>jt[e]??jt.prod,kt=e=>`__atomm_sdk_token__${e}`,Tt=(e,t)=>{try{document.cookie=[`${kt(e)}=${encodeURIComponent(t)}`,"Domain=.atomm.com; Path=/; SameSite=Lax","Max-Age=1296000"].join("; ")}catch{}},Rt=e=>{try{const e=document.cookie.split(";").map(e=>e.trim()).filter(Boolean).find(e=>e.startsWith("utoken="));return e?decodeURIComponent(e.slice(7)):""}catch{return""}},Ot=e=>{try{document.cookie=[`${kt(e)}=`,"Domain=.atomm.com; Path=/; SameSite=Lax","Expires=Thu, 01 Jan 1970 00:00:00 GMT","Max-Age=0"].join("; ")}catch{}};class Pt extends Error{constructor(e,t){super(t),this.code=e,this.name="SdkError"}}const _t=(e,t,r)=>{const n=Ct(t),i=at.create({baseURL:n,timeout:6e4,headers:{"Content-Type":"application/json;charset=UTF-8"}});return i.interceptors.request.use(e=>{e.headers.lang=(()=>{try{return localStorage.getItem("LANG_KEY")||"en"}catch{return"en"}})();const t=Rt();return t&&(e.headers.uToken=t),e},e=>Promise.reject(e)),i.interceptors.response.use(t=>{if(n="blob"===t.config.responseType,i=t.headers["content-type"]??"",n&&i.includes("application/octet-stream"))return t;var n,i;const o=t.data;if(0===o.code)return o.data;20101===o.code&&(Ot(e),null==r||r(e));const s=o.msg||o.message||"Request failed";return Promise.reject(new Pt(o.code,s))},e=>{var t;const r=(null==(t=null==e?void 0:e.response)?void 0:t.data)||{},n=r.msg||r.message||(null==e?void 0:e.message)||"Network error",i=r.code??-1;return Promise.reject(new Pt(i,n))}),i};var At="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function It(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mt,Dt,zt={exports:{}},Bt={},Lt={},qt={exports:{}};function Ut(){if(Dt)return Lt;Dt=1;var e=Lt&&Lt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Lt,"__esModule",{value:!0});const t=e((Mt||(Mt=1,r=function(){function e(){for(var e=0,t={};e<arguments.length;e++){var r=arguments[e];for(var n in r)t[n]=r[n]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function r(n){function i(){}function o(t,r,o){if("undefined"!=typeof document){"number"==typeof(o=e({path:"/"},i.defaults,o)).expires&&(o.expires=new Date(1*new Date+864e5*o.expires)),o.expires=o.expires?o.expires.toUTCString():"";try{var s=JSON.stringify(r);/^[\{\[]/.test(s)&&(r=s)}catch(c){}r=n.write?n.write(r,t):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var a="";for(var l in o)o[l]&&(a+="; "+l,!0!==o[l]&&(a+="="+o[l].split(";")[0]));return document.cookie=t+"="+r+a}}function s(e,r){if("undefined"!=typeof document){for(var i={},o=document.cookie?document.cookie.split("; "):[],s=0;s<o.length;s++){var a=o[s].split("="),l=a.slice(1).join("=");r||'"'!==l.charAt(0)||(l=l.slice(1,-1));try{var c=t(a[0]);if(l=(n.read||n)(l,c)||t(l),r)try{l=JSON.parse(l)}catch(u){}if(i[c]=l,e===c)break}catch(u){}}return e?i[e]:i}}return i.set=o,i.get=function(e){return s(e,!1)},i.getJSON=function(e){return s(e,!0)},i.remove=function(t,r){o(t,"",e(r,{expires:-1}))},i.defaults={},i.withConverter=r,i}(function(){})},qt.exports=r()),qt.exports));var r;class n{static get(e){if(0===localStorage.length)return null;if(!e){const e=Object.keys(localStorage),t={};return e.forEach(e=>{t[e]=this.get(e)}),t}{const r=localStorage.getItem(e);if(null!==r)try{return JSON.parse(r)}catch(t){return r}}return null}static getJSON(e){return this.get(e)}static set(e,t){localStorage.setItem(e,JSON.stringify(t))}static remove(e){e?localStorage.removeItem(e):localStorage.clear()}}n.defaults={};class i{static get storage(){return"cookie"===this.strategy?this.cookie:this.local}static config(e){e&&(this.storage.defaults=e)}static get(e){return e?this.storage.get(e):this.storage.getJSON(e)}static set(e,t,r){this.storage.set(e,t,r)}static remove(e,t){this.storage.remove(e,t)}}return Lt.default=i,i.strategy="localstorage",i.cookie=t.default,i.local=n,Lt}var Ht,Ft={exports:{}};function $t(){if(Ht)return Ft.exports;Ht=1;var e,t="object"==typeof Reflect?Reflect:null,r=t&&"function"==typeof t.apply?t.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};e=t&&"function"==typeof t.ownKeys?t.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var n=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}Ft.exports=i,Ft.exports.once=function(e,t){return new Promise(function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}f(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&f(e,"error",t,r)}(e,i,{once:!0})})},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var o=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function a(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function l(e,t,r,n){var i,o,l;if(s(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),l=o[t]),void 0===l)l=o[t]=r,++e._eventsCount;else if("function"==typeof l?l=o[t]=n?[r,l]:[l,r]:n?l.unshift(r):l.push(r),(i=a(e))>0&&l.length>i&&!l.warned){l.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=l.length,console&&console.warn}return e}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=c.bind(n);return i.listener=r,n.wrapFn=i,i}function p(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):m(i,i.length)}function d(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function m(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function f(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function i(o){n.once&&e.removeEventListener(t,i),r(o)})}}return Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||n(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||n(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return a(this)},i.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)r(l,this,t);else{var c=l.length,u=m(l,c);for(n=0;n<c;++n)r(u[n],this,t)}return!0},i.prototype.addListener=function(e,t){return l(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return l(this,e,t,!0)},i.prototype.once=function(e,t){return s(t),this.on(e,u(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,u(this,e,t)),this},i.prototype.removeListener=function(e,t){var r,n,i,o,a;if(s(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},i.prototype.listeners=function(e){return p(this,e,!0)},i.prototype.rawListeners=function(e){return p(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},i.prototype.listenerCount=d,i.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]},Ft.exports}var Vt,Gt={};var Wt,Kt={exports:{}},Xt=Kt.exports;function Qt(){return Wt||(Wt=1,e=Kt,t=Kt.exports,function(r,n){var i,o="user-agent",s="",a="function",l="object",c="string",u="undefined",p="browser",d="cpu",m="device",f="engine",h="os",y="result",g="name",b="type",v="vendor",x="version",w="architecture",S="major",N="model",j="console",E="mobile",C="tablet",k="smarttv",T="wearable",R="xr",O="embedded",P="inapp",_="brands",A="formFactors",I="fullVersionList",M="platform",D="platformVersion",z="bitness",B="sec-ch-ua",L=B+"-full-version-list",q=B+"-arch",U=B+"-"+z,H=B+"-form-factors",F=B+"-"+E,$=B+"-"+N,V=B+"-"+M,G=V+"-version",W=[_,I,E,N,M,D,w,A,z],K="Amazon",X="Apple",Q="ASUS",Y="BlackBerry",J="Google",Z="Huawei",ee="Lenovo",te="Honor",re="LG",ne="Microsoft",ie="Motorola",oe="Nvidia",se="OnePlus",ae="OPPO",le="Samsung",ce="Sharp",ue="Sony",pe="Xiaomi",de="Zebra",me="Chrome",fe="Chromium",he="Chromecast",ye="Edge",ge="Firefox",be="Opera",ve="Facebook",xe="Sogou",we="Mobile ",Se=" Browser",Ne="Windows",je=typeof r!==u,Ee=je&&r.navigator?r.navigator:n,Ce=Ee&&Ee.userAgentData?Ee.userAgentData:n,ke=function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t},Te=function(e,t){if(typeof e===l&&e.length>0){for(var r in e)if(_e(t)==_e(e[r]))return!0;return!1}return!!Oe(e)&&_e(t)==_e(e)},Re=function(e,t){for(var r in e)return/^(browser|cpu|device|engine|os)$/.test(r)||!!t&&Re(e[r])},Oe=function(e){return typeof e===c},Pe=function(e){if(!e)return n;for(var t=[],r=Me(/\\?\"/g,e).split(","),i=0;i<r.length;i++)if(r[i].indexOf(";")>-1){var o=ze(r[i]).split(";v=");t[i]={brand:o[0],version:o[1]}}else t[i]=ze(r[i]);return t},_e=function(e){return Oe(e)?e.toLowerCase():e},Ae=function(e){return Oe(e)?Me(/[^\d\.]/g,e).split(".")[0]:n},Ie=function(e){for(var t in e)if(e.hasOwnProperty(t)){var r=e[t];typeof r==l&&2==r.length?this[r[0]]=r[1]:this[r]=n}return this},Me=function(e,t){return Oe(t)?t.replace(e,s):t},De=function(e){return Me(/\\?\"/g,e)},ze=function(e,t){return e=Me(/^\s\s*/,String(e)),typeof t===u?e:e.substring(0,t)},Be=function(e,t){if(e&&t)for(var r,i,o,s,c,u,p=0;p<t.length&&!c;){var d=t[p],m=t[p+1];for(r=i=0;r<d.length&&!c&&d[r];)if(c=d[r++].exec(e))for(o=0;o<m.length;o++)u=c[++i],typeof(s=m[o])===l&&s.length>0?2===s.length?typeof s[1]==a?this[s[0]]=s[1].call(this,u):this[s[0]]=s[1]:s.length>=3&&(typeof s[1]!==a||s[1].exec&&s[1].test?3==s.length?this[s[0]]=u?u.replace(s[1],s[2]):n:4==s.length?this[s[0]]=u?s[3].call(this,u.replace(s[1],s[2])):n:s.length>4&&(this[s[0]]=u?s[3].apply(this,[u.replace(s[1],s[2])].concat(s.slice(4))):n):s.length>3?this[s[0]]=u?s[1].apply(this,s.slice(2)):n:this[s[0]]=u?s[1].call(this,u,s[2]):n):this[s]=u||n;p+=2}},Le=function(e,t){for(var r in t)if(typeof t[r]===l&&t[r].length>0){for(var i=0;i<t[r].length;i++)if(Te(t[r][i],e))return"?"===r?n:r}else if(Te(t[r],e))return"?"===r?n:r;return t.hasOwnProperty("*")?t["*"]:e},qe={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2",8.1:"6.3",10:["6.4","10.0"],NT:""},Ue={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":n},He={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},Fe={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[x,[g,we+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[x,[g,ye+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[x,[g,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[g,x],[/opios[\/ ]+([\w\.]+)/i],[x,[g,be+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[x,[g,be+" GX"]],[/\bopr\/([\w\.]+)/i],[x,[g,be]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[x,[g,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[x,[g,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(atlas|flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:hi|lg |ovi|qute)browser|palemoon)\/v?([-\w\.]+)/i,/(brave)(?: chrome)?\/([\d\.]+)/i,/(aloha|heytap|ovi|115|surf|qwant)browser\/([\d\.]+)/i,/(qwant)(?:ios|mobile)\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[g,x],[/quark(?:pc)?\/([-\w\.]+)/i],[x,[g,"Quark"]],[/\bddg\/([\w\.]+)/i],[x,[g,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[x,[g,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[x,[g,"WeChat"]],[/konqueror\/([\w\.]+)/i],[x,[g,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[x,[g,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[x,[g,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[x,[g,"Smart "+ee+Se]],[/(av(?:ast|g|ira))\/([\w\.]+)/i],[[g,/(.+)/,"$1 Secure"+Se],x],[/norton\/([\w\.]+)/i],[x,[g,"Norton Private"+Se]],[/\bfocus\/([\w\.]+)/i],[x,[g,ge+" Focus"]],[/ mms\/([\w\.]+)$/i],[x,[g,be+" Neon"]],[/ opt\/([\w\.]+)$/i],[x,[g,be+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[x,[g,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[x,[g,"Dolphin"]],[/coast\/([\w\.]+)/i],[x,[g,be+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[x,[g,"MIUI"+Se]],[/fxios\/([\w\.-]+)/i],[x,[g,we+ge]],[/\bqihoobrowser\/?([\w\.]*)/i],[x,[g,"360"]],[/\b(qq)\/([\w\.]+)/i],[[g,/(.+)/,"$1Browser"],x],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[g,/(.+)/,"$1"+Se],x],[/samsungbrowser\/([\w\.]+)/i],[x,[g,le+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[x,[g,xe+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[g,xe+" Mobile"],x],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[g,x],[/(lbbrowser|luakit|rekonq|steam(?= (clie|tenf|gameo)))/i],[g],[/ome\/([\w\.]+).+(iron(?= saf)|360(?=[es]e$))/i],[x,g],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[g,ve],x,[b,P]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(bing)(?:web|sapphire)\/([\w\.]+)/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[g,x,[b,P]],[/\bgsa\/([\w\.]+) .*safari\//i],[x,[g,"GSA"],[b,P]],[/(?:musical_ly|trill)(?:.+app_?version\/|_)([\w\.]+)/i],[x,[g,"TikTok"],[b,P]],[/\[(linkedin)app\]/i],[g,[b,P]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[g,/(.+)/,"Zalo"],x,[b,P]],[/(chromium)[\/ ]([-\w\.]+)/i],[g,x],[/ome-(lighthouse)$/i],[g,[b,"fetcher"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[x,[g,me+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[x,[g,ye+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[g,me+" WebView"],x],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[x,[g,"Android"+Se]],[/chrome\/([\w\.]+) mobile/i],[x,[g,we+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[g,x],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[x,[g,we+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[g,we+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[x,g],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[g,[x,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[g,x],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[g,we+ge],x],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[g,"Netscape"],x],[/(wolvic|librewolf)\/([\w\.]+)/i],[g,x],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[x,[g,ge+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+(?= .+rv\:.+gecko\/\d+)|[0-4][\w\.]+(?!.+compatible))/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[g,[x,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[g,[x,/[^\d\.]+./,s]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[w,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[w,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[w,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[w,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[w,"arm"]],[/ sun4\w[;\)]/i],[[w,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,/((ppc|powerpc)(64)?)( mac|;|\))/i,/(?:osf1|[freopnt]{3,4}bsd) (alpha)/i],[[w,/ower/,s,_e]],[/mc680.0/i],[[w,"68k"]],[/winnt.+\[axp/i],[[w,"alpha"]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[N,[v,le],[b,C]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[N,[v,le],[b,E]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[N,[v,X],[b,E]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[N,[v,X],[b,C]],[/(macintosh);/i],[N,[v,X]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[N,[v,ce],[b,E]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[N,[v,te],[b,C]],[/honor([-\w ]+)[;\)]/i],[N,[v,te],[b,E]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[N,[v,Z],[b,C]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[N,[v,Z],[b,E]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[N,/_/g," "],[v,pe],[b,C]],[/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/oid[^\)]+; (redmi[\-_ ]?(?:note|k)?[\w_ ]+|m?[12]\d[01]\d\w{3,6}|poco[\w ]+|(shark )?\w{3}-[ah]0|qin ?[1-3](s\+|ultra| pro)?)( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note|max|cc)?[_ ]?(?:\d{0,2}\w?)[_ ]?(?:plus|se|lite|pro)?( 5g|lte)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[N,/_/g," "],[v,pe],[b,E]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-l]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[N,[v,se],[b,E]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[N,[v,ae],[b,E]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[N,[v,Le,{OnePlus:["203","304","403","404","413","415"],"*":ae}],[b,C]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[N,[v,"BLU"],[b,E]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[N,[v,"Vivo"],[b,E]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[N,[v,"Realme"],[b,E]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[N,[v,ee],[b,C]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[N,[v,ee],[b,E]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[N,[v,ie],[b,E]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[N,[v,ie],[b,C]],[/\b(?:lg)?([vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[N,[v,re],[b,C]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[N,[v,re],[b,E]],[/(nokia) (t[12][01])/i],[v,N,[b,C]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[N,/_/g," "],[b,E],[v,"Nokia"]],[/(pixel (c|tablet))\b/i],[N,[v,J],[b,C]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[N,[v,J],[b,E]],[/(google) (pixelbook( go)?)/i],[v,N],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[N,[v,ue],[b,E]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[N,"Xperia Tablet"],[v,ue],[b,C]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[N,[v,K],[b,C]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[N,/(.+)/g,"Fire Phone $1"],[v,K],[b,E]],[/(playbook);[-\w\),; ]+(rim)/i],[N,v,[b,C]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[N,[v,Y],[b,E]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[N,[v,Q],[b,C]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[N,[v,Q],[b,E]],[/(nexus 9)/i],[N,[v,"HTC"],[b,C]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[v,[N,/_/g," "],[b,E]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[N,[v,"TCL"],[b,C]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[N,[v,"TCL"],[b,E]],[/(itel) ((\w+))/i],[[v,_e],N,[b,Le,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[N,[v,"Acer"],[b,C]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[N,[v,"Meizu"],[b,E]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[N,[v,"Ulefone"],[b,E]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[N,[v,"Energizer"],[b,E]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[N,[v,"Cat"],[b,E]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[N,[v,"Smartfren"],[b,E]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[N,[v,"Nothing"],[b,E]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[N,[v,"Archos"],[b,C]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[N,[v,"Archos"],[b,E]],[/; (n159v)/i],[N,[v,"HMD"],[b,E]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[v,N,[b,C]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl|wiko)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i,/(hisense) ([ehv][\w ]+)\)/i,/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i],[v,N,[b,E]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[v,N,[b,C]],[/(surface duo)/i],[N,[v,ne],[b,C]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[N,[v,"Fairphone"],[b,E]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[N,[v,oe],[b,C]],[/(sprint) (\w+)/i],[v,N,[b,E]],[/(kin\.[onetw]{3})/i],[[N,/\./g," "],[v,ne],[b,E]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[N,[v,de],[b,C]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[N,[v,de],[b,E]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[v,[b,k]],[/hbbtv.+maple;(\d+)/i],[[N,/^/,"SmartTV"],[v,le],[b,k]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[v,N,[b,k]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[v,re],[b,k]],[/(apple) ?tv/i],[v,[N,X+" TV"],[b,k]],[/crkey.*devicetype\/chromecast/i],[[N,he+" Third Generation"],[v,J],[b,k]],[/crkey.*devicetype\/([^/]*)/i],[[N,/^/,"Chromecast "],[v,J],[b,k]],[/fuchsia.*crkey/i],[[N,he+" Nest Hub"],[v,J],[b,k]],[/crkey/i],[[N,he],[v,J],[b,k]],[/(portaltv)/i],[N,[v,ve],[b,k]],[/droid.+aft(\w+)( bui|\))/i],[N,[v,K],[b,k]],[/(shield \w+ tv)/i],[N,[v,oe],[b,k]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[N,[v,ce],[b,k]],[/(bravia[\w ]+)( bui|\))/i],[N,[v,ue],[b,k]],[/(mi(tv|box)-?\w+) bui/i],[N,[v,pe],[b,k]],[/Hbbtv.*(technisat) (.*);/i],[v,N,[b,k]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[v,/.+\/(\w+)/,"$1",Le,{LG:"lge"}],[N,ze],[b,k]],[/(playstation \w+)/i],[N,[v,ue],[b,j]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[N,[v,ne],[b,j]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i,/(valve).+(steam deck)/i,/droid.+; ((shield|rgcube|gr0006))( bui|\))/i],[[v,Le,{Nvidia:"Shield",Anbernic:"RGCUBE",Logitech:"GR0006"}],N,[b,j]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[N,[v,le],[b,T]],[/((pebble))app/i,/(asus|google|lg|oppo|xiaomi) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[v,N,[b,T]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[N,[v,ae],[b,T]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[N,[v,X],[b,T]],[/(opwwe\d{3})/i],[N,[v,se],[b,T]],[/(moto 360)/i],[N,[v,ie],[b,T]],[/(smartwatch 3)/i],[N,[v,ue],[b,T]],[/(g watch r)/i],[N,[v,re],[b,T]],[/droid.+; (wt63?0{2,3})\)/i],[N,[v,de],[b,T]],[/droid.+; (glass) \d/i],[N,[v,J],[b,R]],[/(pico) ([\w ]+) os\d/i],[v,N,[b,R]],[/(quest( \d| pro)?s?).+vr/i],[N,[v,ve],[b,R]],[/mobile vr; rv.+firefox/i],[[b,R]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[v,[b,O]],[/(aeobc)\b/i],[N,[v,K],[b,O]],[/(homepod).+mac os/i],[N,[v,X],[b,O]],[/windows iot/i],[[b,O]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[N,[b,k]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[b,k]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[N,[b,Le,{mobile:"Mobile",xr:"VR","*":C}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[b,C]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[b,E]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[N,[v,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[x,[g,ye+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[g,x],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[x,[g,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links|dillo)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[g,x],[/ladybird\//i],[[g,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[x,g]],os:[[/(windows nt) (6\.[23]); arm/i],[[g,/N/,"R"],[x,Le,qe]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[g,x],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[x,/(;|\))/g,"",Le,qe],[g,Ne]],[/(windows ce)\/?([\d\.]*)/i],[g,x],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv|ios(?=.+ip(?:ad|hone)|.+apple ?tv)|ip(?:ad|hone)(?: |.+i(?:pad)?)os|apple ?tv.+ios)[\/ ]([\w\.]+)/i,/\btvos ?([\w\.]+)/i,/cfnetwork\/.+darwin/i],[[x,/_/g,"."],[g,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[g,"macOS"],[x,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[x,[g,he+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[x,[g,he+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[x,[g,he+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[x,[g,he+" Linux"]],[/crkey\/([\d\.]+)/i],[x,[g,he]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[x,g],[/(ubuntu) ([\w\.]+) like android/i],[[g,/(.+)/,"$1 Touch"],x],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[g,x],[/\(bb(10);/i],[x,[g,Y]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[x,[g,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile[;\w ]*|tablet|tv|[^\)]*(?:viera|lg(?:l25|-d300)|alcatel ?o.+|y300-f1)); rv:([\w\.]+)\).+gecko\//i],[x,[g,ge+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[x,[g,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[x,Le,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[g,"webOS"]],[/watch(?: ?os[,\/ ]|\d,\d\/)([\d\.]+)/i],[x,[g,"watchOS"]],[/cros [\w]+(?:\)| ([\w\.]+)\b)/i],[x,[g,"Chrome OS"]],[/kepler ([\w\.]+); (aft|aeo)/i],[x,[g,"Vega OS"]],[/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[g,x],[/(sunos) ?([\d\.]*)/i],[[g,"Solaris"],x],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[g,x]]},$e=(Ie.call((i={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}}).init,[[p,[g,x,S,b]],[d,[w]],[m,[b,N,v]],[f,[g,x]],[h,[g,x]]]),Ie.call(i.isIgnore,[[p,[x,S]],[f,[x]],[h,[x]]]),Ie.call(i.isIgnoreRgx,[[p,/ ?browser$/i],[h,/ ?os$/i]]),Ie.call(i.toString,[[p,[g,x]],[d,[w]],[m,[v,N]],[f,[g,x]],[h,[g,x]]]),i),Ve=function(e,t){var r=$e.init[t],n=$e.isIgnore[t]||0,i=$e.isIgnoreRgx[t]||0,o=$e.toString[t]||0;function a(){Ie.call(this,r)}return a.prototype.getItem=function(){return e},a.prototype.withClientHints=function(){return Ce?Ce.getHighEntropyValues(W).then(function(t){return e.setCH(new Ge(t,!1)).parseCH().get()}):e.parseCH().get()},a.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=y&&(a.prototype.is=function(e){var t=!1;for(var r in this)if(this.hasOwnProperty(r)&&!Te(n,r)&&_e(i?Me(i,this[r]):this[r])==_e(i?Me(i,e):e)){if(t=!0,e!=u)break}else if(e==u&&t){t=!t;break}return t},a.prototype.toString=function(){var e=s;for(var t in o)typeof this[o[t]]!==u&&(e+=(e?" ":s)+this[o[t]]);return e||u}),a.prototype.then=function(e){var t=this,r=function(){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e])};r.prototype={is:a.prototype.is,toString:a.prototype.toString,withClientHints:a.prototype.withClientHints,withFeatureCheck:a.prototype.withFeatureCheck};var n=new r;return e(n),n},new a};function Ge(e,t){if(e=e||{},Ie.call(this,W),t)Ie.call(this,[[_,Pe(e[B])],[I,Pe(e[L])],[E,/\?1/.test(e[F])],[N,De(e[$])],[M,De(e[V])],[D,De(e[G])],[w,De(e[q])],[A,Pe(e[H])],[z,De(e[U])]]);else for(var r in e)this.hasOwnProperty(r)&&typeof e[r]!==u&&(this[r]=e[r])}function We(e,t,r,n){return Ie.call(this,[["itemType",e],["ua",t],["uaCH",n],["rgxMap",r],["data",Ve(this,e)]]),this}function Ke(e,t,r){if(typeof e===l?(Re(e,!0)?(typeof t===l&&(r=t),t=e):(r=e,t=n),e=n):typeof e!==c||Re(t,!0)||(r=t,t=n),r)if(typeof r.append===a){var i={};r.forEach(function(e,t){i[String(t).toLowerCase()]=e}),r=i}else{var u={};for(var g in r)r.hasOwnProperty(g)&&(u[String(g).toLowerCase()]=r[g]);r=u}if(!(this instanceof Ke))return new Ke(e,t,r).getResult();var b=typeof e===c?e:r&&r[o]?r[o]:Ee&&Ee.userAgent?Ee.userAgent:s,v=new Ge(r,!0),x=t?function(e,t){var r={},n=t;if(!Re(t))for(var i in n={},t)for(var o in t[i])n[o]=t[i][o].concat(n[o]?n[o]:[]);for(var s in e)r[s]=n[s]&&n[s].length%2==0?n[s].concat(e[s]):e[s];return r}(Fe,t):Fe,w=function(e){return e==y?function(){return new We(e,b,x,v).set("ua",b).set(p,this.getBrowser()).set(d,this.getCPU()).set(m,this.getDevice()).set(f,this.getEngine()).set(h,this.getOS()).get()}:function(){return new We(e,b,x[e],v).parseUA().get()}};return Ie.call(this,[["getBrowser",w(p)],["getCPU",w(d)],["getDevice",w(m)],["getEngine",w(f)],["getOS",w(h)],["getResult",w(y)],["getUA",function(){return b}],["setUA",function(e){return Oe(e)&&(b=ze(e,500)),this}]]).setUA(b),this}We.prototype.get=function(e){return e?this.data.hasOwnProperty(e)?this.data[e]:n:this.data},We.prototype.set=function(e,t){return this.data[e]=t,this},We.prototype.setCH=function(e){return this.uaCH=e,this},We.prototype.detectFeature=function(){if(Ee&&Ee.userAgent==this.ua)switch(this.itemType){case p:Ee.brave&&typeof Ee.brave.isBrave==a&&this.set(g,"Brave");break;case m:!this.get(b)&&Ce&&Ce[E]&&this.set(b,E),"Macintosh"==this.get(N)&&Ee&&typeof Ee.standalone!==u&&Ee.maxTouchPoints&&Ee.maxTouchPoints>2&&this.set(N,"iPad").set(b,C);break;case h:!this.get(g)&&Ce&&Ce[M]&&this.set(g,Ce[M]);break;case y:var e=this.data,t=function(t){return e[t].getItem().detectFeature().get()};this.set(p,t(p)).set(d,t(d)).set(m,t(m)).set(f,t(f)).set(h,t(h))}return this},We.prototype.parseUA=function(){switch(this.itemType!=y&&Be.call(this.data,this.ua,this.rgxMap),this.itemType){case p:this.set(S,Ae(this.get(x)));break;case h:if("iOS"==this.get(g)&&"18.6"==this.get(x)){var e=/\) Version\/([\d\.]+)/.exec(this.ua);e&&parseInt(e[1].substring(0,2),10)>=26&&this.set(x,e[1])}}return this},We.prototype.parseCH=function(){var e=this.uaCH,t=this.rgxMap;switch(this.itemType){case p:case f:var r,i=e[I]||e[_];if(i)for(var o=0;o<i.length;o++){var s=i[o].brand||i[o],a=i[o].version;this.itemType==p&&!/not.a.brand/i.test(s)&&(!r||/Chrom/.test(r)&&s!=fe||r==ye&&/WebView2/.test(s))&&(s=Le(s,He),(r=this.get(g))&&!/Chrom/.test(r)&&/Chrom/.test(s)||this.set(g,s).set(x,a).set(S,Ae(a)),r=s),this.itemType==f&&s==fe&&this.set(x,a)}break;case d:var l=e[w];l&&(l&&"64"==e[z]&&(l+="64"),Be.call(this.data,l+";",t));break;case m:if(e[E]&&this.set(b,E),e[N]&&(this.set(N,e[N]),!this.get(b)||!this.get(v))){var c={};Be.call(c,"droid 9; "+e[N]+")",t),!this.get(b)&&c.type&&this.set(b,c.type),!this.get(v)&&c.vendor&&this.set(v,c.vendor)}if(e[A]){var u;if("string"!=typeof e[A])for(var j=0;!u&&j<e[A].length;)u=Le(e[A][j++],Ue);else u=Le(e[A],Ue);this.set(b,u)}break;case h:var C=e[M];if(C){var k=e[D];C==Ne&&(k=parseInt(Ae(k),10)>=13?"11":"10"),this.set(g,C).set(x,k)}this.get(g)==Ne&&"Xbox"==e[N]&&this.set(g,"Xbox").set(x,n);break;case y:var T=this.data,R=function(t){return T[t].getItem().setCH(e).parseCH().get()};this.set(p,R(p)).set(d,R(d)).set(m,R(m)).set(f,R(f)).set(h,R(h))}return this},Ke.VERSION="2.0.9",Ke.BROWSER=ke([g,x,S,b]),Ke.CPU=ke([w]),Ke.DEVICE=ke([N,v,b,j,E,k,C,T,O]),Ke.ENGINE=Ke.OS=ke([g,x]),e.exports&&(t=e.exports=Ke),t.UAParser=Ke;var Xe=je&&(r.jQuery||r.Zepto);if(Xe&&!Xe.ua){var Qe=new Ke;Xe.ua=Qe.getResult(),Xe.ua.get=function(){return Qe.getUA()},Xe.ua.set=function(e){Qe.setUA(e);var t=Qe.getResult();for(var r in t)Xe.ua[r]=t[r]}}}("object"==typeof window?window:Xt)),Kt.exports;var e,t}var Yt,Jt={},Zt={};var er,tr,rr={};function nr(){return tr||(tr=1,e=Jt,g=Jt&&Jt.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),b=Jt&&Jt.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||g(t,e,r)},Object.defineProperty(e,"__esModule",{value:!0}),b((Yt||(Yt=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.SYSTEM_TYPE=Zt.XTOOL_PLATFORM=Zt.MAKEBLOCK_PLATFORM=Zt.AREA=Zt.DOMAIN_SPACE=Zt.MESSAGE_TYPE=Zt.CLIENT_ENV=Zt.PAGE_MODE=void 0,(r=t||(Zt.PAGE_MODE=t={})).PAGE="page",r.WIN="win",r.FULL_WIN="full-win",(i=n||(Zt.CLIENT_ENV=n={})).DEV="dev",i.TEST_US="test_us",i.TEST="test",i.PRE="pre",i.PROD="prod",i.LOCAL="local",(s=o||(Zt.MESSAGE_TYPE=o={})).LOGIN="login",s.LOGOUT="logout",s.REGISTER="register",s.FINDPWD="findpwd",s.SWITCH_HSOT="switchHost",(l=a||(Zt.DOMAIN_SPACE=a={})).MAKEBLOCK="makeblock",l.XTOOL="xtool",(u=c||(Zt.AREA=c={})).EU="eu",u.CN="cn",u.US="us",(d=p||(Zt.MAKEBLOCK_PLATFORM=p={})).MBLOCK_5="mblock_5",d.MBLOCK_WEB="mblock_web",d.MBLOCK_PC="mblock_pc",d.MBLOCK_MOBILE="mblock_mobile",d.ONE_BOX="one_box",d.STEAM_PLATFORM_STU="steam_platform_stu",d.STEAM_PLATFORM_TEACHER="steam_platform_teacher",d.COMMUNITY="community",d.EXT_BUILDER="ext_builder",d.MAKEX="makex",d.MAKE_D2V="makeblock_d2v",(f=m||(Zt.XTOOL_PLATFORM=m={})).XCS="xcs",f.PROJECTS="projects",f.DESIGN_FIND="design_find",f.ATOMM="atomm",f.SUPPORT="support",f.X_ART="xart",f.SMB="smb",f.CUSTOM_THINGS="custom_things",f.PASSPORT="passport",f.FOCUSAUR="focusaur",f.XCS_CMS="xcs_cms",f.MARKETING="marketing",f.MATERIALS_LAB="materials_lab",f.STUDIO="studio",f.BRAND_WEBSITE="brand_website",f.PRM="prm",(y=h||(Zt.SYSTEM_TYPE=h={})).PC="pc",y.PAD="pad",y.MOBILE="mobile",y.APP="app",y.OS="os"),Zt),e),b((er||(er=1,Object.defineProperty(rr,"__esModule",{value:!0}),rr.LANG_KEY=rr.TOKEN_KEY=rr.MESSAGE_ORIGIN_NAME=rr.POST_MESSAGE_SOURCE=void 0,rr.POST_MESSAGE_SOURCE="makeblock-passport",rr.MESSAGE_ORIGIN_NAME="passport-client",rr.TOKEN_KEY="utoken",rr.LANG_KEY="IntlLang"),rr),e)),Jt;var e,t,r,n,i,o,s,a,l,c,u,p,d,m,f,h,y,g,b}var ir,or={},sr={};function ar(){return ir||(ir=1,function(e){var t=sr&&sr.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.openLoginModal=e.closeLoginModal=void 0;const r=nr(),n={position:"fixed",top:0,right:0,bottom:0,left:0,zIndex:19999,backgroundColor:"rgba(57, 57, 57, 0.15)",display:"flex",justifyContent:"center",alignItems:"center"},i={width:"100vw",height:"100vh",borderRadius:"0"},o={position:"absolute",top:"0.3rem",right:"0.4rem",zIndex:"100",cursor:"pointer",fontSize:"20px",width:"24px",height:"24px",display:"flex",justifyContent:"center",alignItems:"center","-webkit-app-region":"no-drag"},s="passport-modal-container",a="passport-advertisement-container",l="passport-advertisement-content",c="passport-modal-content-wrap",u="passport-modal-content-scroll",p="passport-modal-content",d="passport-modal-close-btn",m="passport-modal-iframe",f="passport-modal-loading";let h=null;e.closeLoginModal=e=>{const t=document.querySelector(`#${s}`);t&&t.remove&&(t.remove(),window.postMessage({action:"close-passport-modal",reason:e}),h&&(window.removeEventListener("message",h),h=null))};const y=e=>{const t=e.data,{action:r,from:n}=t;if("hide-modal-close"===r&&["xtool-passport-web"].some(e=>e===n)){const e=document.querySelector(`#${d}`);e&&(e.style.display="none")}};e.openLoginModal=(g,b,v)=>{const x=g,{advertisement:w,advertisementPosition:S,height:N,loading:j,adaptWindow:E,loadingImage:C}=v,k=b===r.PAGE_MODE.FULL_WIN,T=b===r.PAGE_MODE.WIN,R=E&&!k;let O=document.querySelector("#passport-prefetch-iframe");O&&O.remove(),T&&(h&&window.removeEventListener("message",h),h=(e=>t=>{const r=t.data,{action:n,payload:i}=r;if("win-height-change"===n){const t=document.querySelector(`#${p}`),r=document.querySelector(`#${f}`),n=document.querySelector(`#${m}`),o=document.querySelector(`#${l}`);if(t){const r=i>520?i:520;t.style.height=`${r}px`,n.style.height=`${r}px`,e||(o.style.height=`${r}px`)}r&&(n.style.visibility="visible",r.remove())}})(N),window.addEventListener("message",h),window.removeEventListener("message",y),window.addEventListener("message",y));if(document.querySelector(`#${s}`))return;const P=document.querySelector("body"),_=`<div id="${s}" >\n \n <style>\n @media (max-width: 576px) {\n #passport-modal-content-wrap {\n position: fixed !important;\n left:0 !important;\n top:0 !important;\n width: 100% !important;\n height: 100% !important;\n max-height: 100% !important;\n border-radius: 0px !important;\n }\n }\n </style>\n \n <div id="${a}">\n <div id="${l}"></div>\n <div id="${c}"> \n <span id="${d}">×</span>\n <div id="${u}">\n <div id="${p}" >\n <iframe id="${m}" src="${x}" scrolling="no" frameborder="0"></iframe>\n ${j?"string"==typeof C?`<img id="${f}" src="${C}" style="width: 15%;" />`:C instanceof HTMLElement?(C.style.position="absolute",C.style.top="0",C.style.left="0",C.style.width="100%",C.style.height="100%",C.id=f,C.outerHTML):`<img id="${f}" src="https://storage-us.atomm.com/resource/static/passport/passport-client-common-loading.gif" style="width: 15%;" />`:""} \n </div>\n </div>\n </div>\n </div>\n </div>`,A=document.createElement("div");A.innerHTML+=_,null==P||P.append(A);const I=document.querySelector(`#${s}`),M=document.querySelector(`#${a}`),D=document.querySelector(`#${l}`),z=document.querySelector(`#${c}`),B=document.querySelector(`#${u}`),L=document.querySelector(`#${p}`),q=document.querySelector(`#${m}`),U=document.querySelector(`#${d}`),H=document.querySelector(`#${f}`);H&&(q.style.visibility="hidden",H.style.visibility="visible",(e=>t(void 0,void 0,void 0,function*(){return new Promise(t=>{window.addEventListener("message",e=>{const r=e.data,{action:n}=r;"passport-on-mounted"===n&&t(!0)}),e.onload=function(){t(!0)}})}))(q).then(()=>{q.style.visibility="visible",null==H||H.remove()})),w&&(w.style.height="100%",null==D||D.appendChild(w));U.onclick=()=>{(0,e.closeLoginModal)("click-close-btn")};const F=(e,t)=>{if(e)for(const r in t)e.style[r]=t[r]};F(I,n),F(M,(e=>({display:"flex",borderRadius:"20px",overflow:e?"unset":"hidden",alignItems:"center",position:"relative"}))(k)),F(D,((e,t,r)=>({height:`${t||600}px`,backgroundColor:"white",order:e?1:0,maxHeight:r?"calc(100vh - 20px)":"unset"}))("right"===S,N,R)),F(z,Object.assign({},((e,t,r)=>({height:r?`${r}px`:"auto",width:"400px",maxHeight:t?"calc(100vh - 20px)":"unset",boxSizing:"border-box",zIndex:2e4,borderRadius:e?"unset":"20px",overflow:"hidden auto",backgroundColor:"white"}))(!!w,R,N),k?i:{})),F(B,((e,t)=>({height:t?"100%":"auto",overflow:"hidden"}))(0,k)),F(L,((e,t)=>({height:t?"100%":`${e||600}px`,position:"relative"}))(N,k)),F(U,o),F(q,((e,t)=>({boxSizing:"border-box",width:"100%",userSelect:"none",height:t?"100%":`${e||600}px`}))(N,k)),C instanceof HTMLElement||F(H,(e=>({position:"absolute",left:"50%",top:"50%",transform:"translate(-50%,-50%)",display:e?"block":"none"}))(j))}}(sr)),sr}var lr,cr,ur={};function pr(){return cr||(cr=1,e=or,t=or&&or.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=or&&or.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)},Object.defineProperty(e,"__esModule",{value:!0}),r(ar(),e),r((lr||(lr=1,Object.defineProperty(ur,"__esModule",{value:!0}),ur.systemLang=void 0,ur.systemLang=()=>{const{language:e,languages:t}=navigator;return e||(Array.isArray(t)&&t.length>0?t[0]:null)}),ur),e)),or;var e,t,r}var dr,mr,fr,hr={};
2
2
  /*! Axios v1.13.6 Copyright (c) 2026 Matt Zabriskie and contributors */function yr(){if(mr)return dr;function e(e,t){return function(){return e.apply(t,arguments)}}mr=1;const{toString:t}=Object.prototype,{getPrototypeOf:r}=Object,{iterator:n,toStringTag:i}=Symbol,o=(e=>r=>{const n=t.call(r);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),s=e=>(e=e.toLowerCase(),t=>o(t)===e),a=e=>t=>typeof t===e,{isArray:l}=Array,c=a("undefined");function u(e){return null!==e&&!c(e)&&null!==e.constructor&&!c(e.constructor)&&m(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const p=s("ArrayBuffer");const d=a("string"),m=a("function"),f=a("number"),h=e=>null!==e&&"object"==typeof e,y=e=>{if("object"!==o(e))return!1;const t=r(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||i in e||n in e)},g=s("Date"),b=s("File"),v=s("Blob"),x=s("FileList");const w="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==At?At:{},S=void 0!==w.FormData?w.FormData:void 0,N=s("URLSearchParams"),[j,E,C,k]=["ReadableStream","Request","Response","Headers"].map(s);function T(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,i;if("object"!=typeof e&&(e=[e]),l(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{if(u(e))return;const i=r?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let s;for(n=0;n<o;n++)s=i[n],t.call(null,e[s],s,e)}}function R(e,t){if(u(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n,i=r.length;for(;i-- >0;)if(n=r[i],t===n.toLowerCase())return n;return null}const O="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:At,P=e=>!c(e)&&e!==O;const _=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&r(Uint8Array)),A=s("HTMLFormElement"),I=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),M=s("RegExp"),D=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};T(r,(r,i)=>{let o;!1!==(o=t(r,i,e))&&(n[i]=o||r)}),Object.defineProperties(e,n)};const z=s("AsyncFunction"),B=((e,t)=>e?setImmediate:t?((e,t)=>(O.addEventListener("message",({source:r,data:n})=>{r===O&&n===e&&t.length&&t.shift()()},!1),r=>{t.push(r),O.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))("function"==typeof setImmediate,m(O.postMessage)),L="undefined"!=typeof queueMicrotask?queueMicrotask.bind(O):"undefined"!=typeof process&&process.nextTick||B;var q={isArray:l,isArrayBuffer:p,isBuffer:u,isFormData:e=>{let t;return e&&(S&&e instanceof S||m(e.append)&&("formdata"===(t=o(e))||"object"===t&&m(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&p(e.buffer),t},isString:d,isNumber:f,isBoolean:e=>!0===e||!1===e,isObject:h,isPlainObject:y,isEmptyObject:e=>{if(!h(e)||u(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},isReadableStream:j,isRequest:E,isResponse:C,isHeaders:k,isUndefined:c,isDate:g,isFile:b,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:v,isRegExp:M,isFunction:m,isStream:e=>h(e)&&m(e.pipe),isURLSearchParams:N,isTypedArray:_,isFileList:x,forEach:T,merge:function e(){const{caseless:t,skipUndefined:r}=P(this)&&this||{},n={},i=(i,o)=>{if("__proto__"===o||"constructor"===o||"prototype"===o)return;const s=t&&R(n,o)||o;y(n[s])&&y(i)?n[s]=e(n[s],i):y(i)?n[s]=e({},i):l(i)?n[s]=i.slice():r&&c(i)||(n[s]=i)};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&T(arguments[o],i);return n},extend:(t,r,n,{allOwnKeys:i}={})=>(T(r,(r,i)=>{n&&m(r)?Object.defineProperty(t,i,{value:e(r,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,i,{value:r,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),t),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,n,i)=>{let o,s,a;const l={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],i&&!i(a,e,t)||l[a]||(t[a]=e[a],l[a]=!0);e=!1!==n&&r(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:o,kindOfTest:s,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(l(e))return e;let t=e.length;if(!f(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[n]).call(e);let i;for(;(i=r.next())&&!i.done;){const r=i.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:A,hasOwnProperty:I,hasOwnProp:I,reduceDescriptors:D,freezeMethods:e=>{D(e,(t,r)=>{if(m(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];m(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))})},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach(e=>{r[e]=!0})};return l(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:R,global:O,isContextDefined:P,isSpecCompliantForm:function(e){return!!(e&&m(e.append)&&"FormData"===e[i]&&e[n])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(h(e)){if(t.indexOf(e)>=0)return;if(u(e))return e;if(!("toJSON"in e)){t[n]=e;const i=l(e)?[]:{};return T(e,(e,t)=>{const o=r(e,n+1);!c(o)&&(i[t]=o)}),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:z,isThenable:e=>e&&(h(e)||m(e))&&m(e.then)&&m(e.catch),setImmediate:B,asap:L,isIterable:e=>null!=e&&m(e[n])};class U extends Error{static from(e,t,r,n,i,o){const s=new U(e.message,t||e.code,r,n,i);return s.cause=e,s.name=e.name,null!=e.status&&null==s.status&&(s.status=e.status),o&&Object.assign(s,o),s}constructor(e,t,r,n,i){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:q.toJSONObject(this.config),code:this.code,status:this.status}}}U.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",U.ERR_BAD_OPTION="ERR_BAD_OPTION",U.ECONNABORTED="ECONNABORTED",U.ETIMEDOUT="ETIMEDOUT",U.ERR_NETWORK="ERR_NETWORK",U.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",U.ERR_DEPRECATED="ERR_DEPRECATED",U.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",U.ERR_BAD_REQUEST="ERR_BAD_REQUEST",U.ERR_CANCELED="ERR_CANCELED",U.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",U.ERR_INVALID_URL="ERR_INVALID_URL";var H=U;function F(e){return q.isPlainObject(e)||q.isArray(e)}function $(e){return q.endsWith(e,"[]")?e.slice(0,-2):e}function V(e,t,r){return e?e.concat(t).map(function(e,t){return e=$(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}const G=q.toFlatObject(q,{},null,function(e){return/^is[A-Z]/.test(e)});function W(e,t,r){if(!q.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=q.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!q.isUndefined(t[e])})).metaTokens,i=r.visitor||c,o=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&q.isSpecCompliantForm(t);if(!q.isFunction(i))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(q.isDate(e))return e.toISOString();if(q.isBoolean(e))return e.toString();if(!a&&q.isBlob(e))throw new H("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(e)||q.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,r,i){let a=e;if(q.isReactNative(t)&&q.isReactNativeBlob(e))return t.append(V(i,r,o),l(e)),!1;if(e&&!i&&"object"==typeof e)if(q.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(q.isArray(e)&&function(e){return q.isArray(e)&&!e.some(F)}(e)||(q.isFileList(e)||q.endsWith(r,"[]"))&&(a=q.toArray(e)))return r=$(r),a.forEach(function(e,n){!q.isUndefined(e)&&null!==e&&t.append(!0===s?V([r],n,o):null===s?r:r+"[]",l(e))}),!1;return!!F(e)||(t.append(V(i,r,o),l(e)),!1)}const u=[],p=Object.assign(G,{defaultVisitor:c,convertValue:l,isVisitable:F});if(!q.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!q.isUndefined(r)){if(-1!==u.indexOf(r))throw Error("Circular reference detected in "+n.join("."));u.push(r),q.forEach(r,function(r,o){!0===(!(q.isUndefined(r)||null===r)&&i.call(t,r,q.isString(o)?o.trim():o,n,p))&&e(r,n?n.concat(o):[o])}),u.pop()}}(e),t}function K(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function X(e,t){this._pairs=[],e&&W(e,this,t)}const Q=X.prototype;function Y(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function J(e,t,r){if(!t)return e;const n=r&&r.encode||Y,i=q.isFunction(r)?{serialize:r}:r,o=i&&i.serialize;let s;if(s=o?o(t,i):q.isURLSearchParams(t)?t.toString():new X(t,i).toString(n),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}Q.append=function(e,t){this._pairs.push([e,t])},Q.toString=function(e){const t=e?function(t){return e.call(this,t,K)}:K;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var Z=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){q.forEach(this.handlers,function(t){null!==t&&e(t)})}},ee={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},te={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:X,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const re="undefined"!=typeof window&&"undefined"!=typeof document,ne="object"==typeof navigator&&navigator||void 0,ie=re&&(!ne||["ReactNative","NativeScript","NS"].indexOf(ne.product)<0),oe="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,se=re&&window.location.href||"http://localhost";var ae={...Object.freeze({__proto__:null,hasBrowserEnv:re,hasStandardBrowserWebWorkerEnv:oe,hasStandardBrowserEnv:ie,navigator:ne,origin:se}),...te};function le(e){function t(e,r,n,i){let o=e[i++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),a=i>=e.length;if(o=!o&&q.isArray(n)?n.length:o,a)return q.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r,!s;n[o]&&q.isObject(n[o])||(n[o]=[]);return t(e,r,n[o],i)&&q.isArray(n[o])&&(n[o]=function(e){const t={},r=Object.keys(e);let n;const i=r.length;let o;for(n=0;n<i;n++)o=r[n],t[o]=e[o];return t}(n[o])),!s}if(q.isFormData(e)&&q.isFunction(e.entries)){const r={};return q.forEachEntry(e,(e,n)=>{t(function(e){return q.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),n,r,0)}),r}return null}const ce={transitional:ee,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,i=q.isObject(e);i&&q.isHTMLForm(e)&&(e=new FormData(e));if(q.isFormData(e))return n?JSON.stringify(le(e)):e;if(q.isArrayBuffer(e)||q.isBuffer(e)||q.isStream(e)||q.isFile(e)||q.isBlob(e)||q.isReadableStream(e))return e;if(q.isArrayBufferView(e))return e.buffer;if(q.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return W(e,new ae.classes.URLSearchParams,{visitor:function(e,t,r,n){return ae.isNode&&q.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((o=q.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return W(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||n?(t.setContentType("application/json",!1),function(e,t,r){if(q.isString(e))try{return(t||JSON.parse)(e),q.trim(e)}catch(n){if("SyntaxError"!==n.name)throw n}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ce.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(q.isResponse(e)||q.isReadableStream(e))return e;if(e&&q.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e,this.parseReviver)}catch(i){if(r){if("SyntaxError"===i.name)throw H.from(i,H.ERR_BAD_RESPONSE,this,null,this.response);throw i}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ae.classes.FormData,Blob:ae.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch"],e=>{ce.headers[e]={}});var ue=ce;const pe=q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const de=Symbol("internals");function me(e){return e&&String(e).trim().toLowerCase()}function fe(e){return!1===e||null==e?e:q.isArray(e)?e.map(fe):String(e)}function he(e,t,r,n,i){return q.isFunction(n)?n.call(this,t,r):(i&&(t=r),q.isString(t)?q.isString(n)?-1!==t.indexOf(n):q.isRegExp(n)?n.test(t):void 0:void 0)}class ye{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function i(e,t,r){const i=me(t);if(!i)throw new Error("header name must be a non-empty string");const o=q.findKey(n,i);(!o||void 0===n[o]||!0===r||void 0===r&&!1!==n[o])&&(n[o||t]=fe(e))}const o=(e,t)=>q.forEach(e,(e,r)=>i(e,r,t));if(q.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(q.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((e=>{const t={};let r,n,i;return e&&e.split("\n").forEach(function(e){i=e.indexOf(":"),r=e.substring(0,i).trim().toLowerCase(),n=e.substring(i+1).trim(),!r||t[r]&&pe[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t})(e),t);else if(q.isObject(e)&&q.isIterable(e)){let r,n,i={};for(const t of e){if(!q.isArray(t))throw TypeError("Object iterator must return a key-value pair");i[n=t[0]]=(r=i[n])?q.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}o(i,t)}else null!=e&&i(t,e,r);return this}get(e,t){if(e=me(e)){const r=q.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(q.isFunction(t))return t.call(this,e,r);if(q.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=me(e)){const r=q.findKey(this,e);return!(!r||void 0===this[r]||t&&!he(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function i(e){if(e=me(e)){const i=q.findKey(r,e);!i||t&&!he(0,r[i],i,t)||(delete r[i],n=!0)}}return q.isArray(e)?e.forEach(i):i(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const i=t[r];e&&!he(0,this[i],i,e,!0)||(delete this[i],n=!0)}return n}normalize(e){const t=this,r={};return q.forEach(this,(n,i)=>{const o=q.findKey(r,i);if(o)return t[o]=fe(n),void delete t[i];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}(i):String(i).trim();s!==i&&delete t[i],t[s]=fe(n),r[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return q.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&q.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){const t=(this[de]=this[de]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=me(e);t[n]||(!function(e,t){const r=q.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:!0})})}(r,e),t[n]=!0)}return q.isArray(e)?e.forEach(n):n(e),this}}ye.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),q.reduceDescriptors(ye.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),q.freezeMethods(ye);var ge=ye;function be(e,t){const r=this||ue,n=t||r,i=ge.from(n.headers);let o=n.data;return q.forEach(e,function(e){o=e.call(r,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function ve(e){return!(!e||!e.__CANCEL__)}var xe=class extends H{constructor(e,t,r){super(null==e?"canceled":e,H.ERR_CANCELED,t,r),this.name="CanceledError",this.__CANCEL__=!0}};function we(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new H("Request failed with status code "+r.status,[H.ERR_BAD_REQUEST,H.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}const Se=(e,t,r=3)=>{let n=0;const i=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i,o=0,s=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=n[s];i||(i=l),r[o]=a,n[o]=l;let u=s,p=0;for(;u!==o;)p+=r[u++],u%=e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-i<t)return;const d=c&&l-c;return d?Math.round(1e3*p/d):void 0}}(50,250);return function(e,t){let r,n,i=0,o=1e3/t;const s=(t,o=Date.now())=>{i=o,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-i;a>=o?s(e,t):(r=e,n||(n=setTimeout(()=>{n=null,s(r)},o-a)))},()=>r&&s(r)]}(r=>{const o=r.loaded,s=r.lengthComputable?r.total:void 0,a=o-n,l=i(a);n=o;e({loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&o<=s?(s-o)/l:void 0,event:r,lengthComputable:null!=s,[t?"download":"upload"]:!0})},r)},Ne=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},je=e=>(...t)=>q.asap(()=>e(...t));var Ee=ae.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,ae.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(ae.origin),ae.navigator&&/(msie|trident)/i.test(ae.navigator.userAgent)):()=>!0,Ce=ae.hasStandardBrowserEnv?{write(e,t,r,n,i,o,s){if("undefined"==typeof document)return;const a=[`${e}=${encodeURIComponent(t)}`];q.isNumber(r)&&a.push(`expires=${new Date(r).toUTCString()}`),q.isString(n)&&a.push(`path=${n}`),q.isString(i)&&a.push(`domain=${i}`),!0===o&&a.push("secure"),q.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function ke(e,t,r){let n=!("string"==typeof(i=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(i));var i;return e&&(n||0==r)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Te=e=>e instanceof ge?{...e}:e;function Re(e,t){t=t||{};const r={};function n(e,t,r,n){return q.isPlainObject(e)&&q.isPlainObject(t)?q.merge.call({caseless:n},e,t):q.isPlainObject(t)?q.merge({},t):q.isArray(t)?t.slice():t}function i(e,t,r,i){return q.isUndefined(t)?q.isUndefined(e)?void 0:n(void 0,e,0,i):n(e,t,0,i)}function o(e,t){if(!q.isUndefined(t))return n(void 0,t)}function s(e,t){return q.isUndefined(t)?q.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,i,o){return o in t?n(r,i):o in e?n(void 0,r):void 0}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t,r)=>i(Te(e),Te(t),0,!0)};return q.forEach(Object.keys({...e,...t}),function(n){if("__proto__"===n||"constructor"===n||"prototype"===n)return;const o=q.hasOwnProp(l,n)?l[n]:i,s=o(e[n],t[n],n);q.isUndefined(s)&&o!==a||(r[n]=s)}),r}var Oe=e=>{const t=Re({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=t;if(t.headers=s=ge.from(s),t.url=J(ke(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),q.isFormData(r))if(ae.hasStandardBrowserEnv||ae.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(q.isFunction(r.getHeaders)){const e=r.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,r])=>{t.includes(e.toLowerCase())&&s.set(e,r)})}if(ae.hasStandardBrowserEnv&&(n&&q.isFunction(n)&&(n=n(t)),n||!1!==n&&Ee(t.url))){const e=i&&o&&Ce.read(o);e&&s.set(i,e)}return t};var Pe="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){const n=Oe(e);let i=n.data;const o=ge.from(n.headers).normalize();let s,a,l,c,u,{responseType:p,onUploadProgress:d,onDownloadProgress:m}=n;function f(){c&&c(),u&&u(),n.cancelToken&&n.cancelToken.unsubscribe(s),n.signal&&n.signal.removeEventListener("abort",s)}let h=new XMLHttpRequest;function y(){if(!h)return;const n=ge.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());we(function(e){t(e),f()},function(e){r(e),f()},{data:p&&"text"!==p&&"json"!==p?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:n,config:e,request:h}),h=null}h.open(n.method.toUpperCase(),n.url,!0),h.timeout=n.timeout,"onloadend"in h?h.onloadend=y:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(y)},h.onabort=function(){h&&(r(new H("Request aborted",H.ECONNABORTED,e,h)),h=null)},h.onerror=function(t){const n=t&&t.message?t.message:"Network Error",i=new H(n,H.ERR_NETWORK,e,h);i.event=t||null,r(i),h=null},h.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const i=n.transitional||ee;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new H(t,i.clarifyTimeoutError?H.ETIMEDOUT:H.ECONNABORTED,e,h)),h=null},void 0===i&&o.setContentType(null),"setRequestHeader"in h&&q.forEach(o.toJSON(),function(e,t){h.setRequestHeader(t,e)}),q.isUndefined(n.withCredentials)||(h.withCredentials=!!n.withCredentials),p&&"json"!==p&&(h.responseType=n.responseType),m&&([l,u]=Se(m,!0),h.addEventListener("progress",l)),d&&h.upload&&([a,c]=Se(d),h.upload.addEventListener("progress",a),h.upload.addEventListener("loadend",c)),(n.cancelToken||n.signal)&&(s=t=>{h&&(r(!t||t.type?new xe(null,e,h):t),h.abort(),h=null)},n.cancelToken&&n.cancelToken.subscribe(s),n.signal&&(n.signal.aborted?s():n.signal.addEventListener("abort",s)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);g&&-1===ae.protocols.indexOf(g)?r(new H("Unsupported protocol "+g+":",H.ERR_BAD_REQUEST,e)):h.send(i||null)})};var _e=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const i=function(e){if(!r){r=!0,s();const t=e instanceof Error?e:this.reason;n.abort(t instanceof H?t:new xe(t instanceof Error?t.message:t))}};let o=t&&setTimeout(()=>{o=null,i(new H(`timeout of ${t}ms exceeded`,H.ETIMEDOUT))},t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)}),e=null)};e.forEach(e=>e.addEventListener("abort",i));const{signal:a}=n;return a.unsubscribe=()=>q.asap(s),a}};const Ae=function*(e,t){let r=e.byteLength;if(r<t)return void(yield e);let n,i=0;for(;i<r;)n=i+t,yield e.slice(i,n),i=n},Ie=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},Me=(e,t,r,n)=>{const i=async function*(e,t){for await(const r of Ie(e))yield*Ae(r,t)}(e,t);let o,s=0,a=e=>{o||(o=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await i.next();if(t)return a(),void e.close();let o=n.byteLength;if(r){let e=s+=o;r(e)}e.enqueue(new Uint8Array(n))}catch(t){throw a(t),t}},cancel:e=>(a(e),i.return())},{highWaterMark:2})},{isFunction:De}=q,ze=(({Request:e,Response:t})=>({Request:e,Response:t}))(q.global),{ReadableStream:Be,TextEncoder:Le}=q.global,qe=(e,...t)=>{try{return!!e(...t)}catch(r){return!1}},Ue=e=>{e=q.merge.call({skipUndefined:!0},ze,e);const{fetch:t,Request:r,Response:n}=e,i=t?De(t):"function"==typeof fetch,o=De(r),s=De(n);if(!i)return!1;const a=i&&De(Be),l=i&&("function"==typeof Le?(e=>t=>e.encode(t))(new Le):async e=>new Uint8Array(await new r(e).arrayBuffer())),c=o&&a&&qe(()=>{let e=!1;const t=new r(ae.origin,{body:new Be,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),u=s&&a&&qe(()=>q.isReadableStream(new n("").body)),p={stream:u&&(e=>e.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!p[e]&&(p[e]=(t,r)=>{let n=t&&t[e];if(n)return n.call(t);throw new H(`Response type '${e}' is not supported`,H.ERR_NOT_SUPPORT,r)})});const d=async(e,t)=>{const n=q.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(q.isBlob(e))return e.size;if(q.isSpecCompliantForm(e)){const t=new r(ae.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return q.isArrayBufferView(e)||q.isArrayBuffer(e)?e.byteLength:(q.isURLSearchParams(e)&&(e+=""),q.isString(e)?(await l(e)).byteLength:void 0)})(t):n};return async e=>{let{url:i,method:s,data:a,signal:l,cancelToken:m,timeout:f,onDownloadProgress:h,onUploadProgress:y,responseType:g,headers:b,withCredentials:v="same-origin",fetchOptions:x}=Oe(e),w=t||fetch;g=g?(g+"").toLowerCase():"text";let S=_e([l,m&&m.toAbortSignal()],f),N=null;const j=S&&S.unsubscribe&&(()=>{S.unsubscribe()});let E;try{if(y&&c&&"get"!==s&&"head"!==s&&0!==(E=await d(b,a))){let e,t=new r(i,{method:"POST",body:a,duplex:"half"});if(q.isFormData(a)&&(e=t.headers.get("content-type"))&&b.setContentType(e),t.body){const[e,r]=Ne(E,Se(je(y)));a=Me(t.body,65536,e,r)}}q.isString(v)||(v=v?"include":"omit");const t=o&&"credentials"in r.prototype,l={...x,signal:S,method:s.toUpperCase(),headers:b.normalize().toJSON(),body:a,duplex:"half",credentials:t?v:void 0};N=o&&new r(i,l);let m=await(o?w(N,x):w(i,l));const f=u&&("stream"===g||"response"===g);if(u&&(h||f&&j)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=m[t]});const t=q.toFiniteNumber(m.headers.get("content-length")),[r,i]=h&&Ne(t,Se(je(h),!0))||[];m=new n(Me(m.body,65536,r,()=>{i&&i(),j&&j()}),e)}g=g||"text";let C=await p[q.findKey(p,g)||"text"](m,e);return!f&&j&&j(),await new Promise((t,r)=>{we(t,r,{data:C,headers:ge.from(m.headers),status:m.status,statusText:m.statusText,config:e,request:N})})}catch(C){if(j&&j(),C&&"TypeError"===C.name&&/Load failed|fetch/i.test(C.message))throw Object.assign(new H("Network Error",H.ERR_NETWORK,e,N,C&&C.response),{cause:C.cause||C});throw H.from(C,C&&C.code,e,N,C&&C.response)}}},He=new Map,Fe=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:i}=t,o=[n,i,r];let s,a,l=o.length,c=He;for(;l--;)s=o[l],a=c.get(s),void 0===a&&c.set(s,a=l?new Map:Ue(t)),c=a;return a};Fe();const $e={http:null,xhr:Pe,fetch:{get:Fe}};q.forEach($e,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(r){}Object.defineProperty(e,"adapterName",{value:t})}});const Ve=e=>`- ${e}`,Ge=e=>q.isFunction(e)||null===e||!1===e;var We={getAdapter:function(e,t){e=q.isArray(e)?e:[e];const{length:r}=e;let n,i;const o={};for(let s=0;s<r;s++){let r;if(n=e[s],i=n,!Ge(n)&&(i=$e[(r=String(n)).toLowerCase()],void 0===i))throw new H(`Unknown adapter '${r}'`);if(i&&(q.isFunction(i)||(i=i.get(t))))break;o[r||"#"+s]=i}if(!i){const e=Object.entries(o).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=r?e.length>1?"since :\n"+e.map(Ve).join("\n"):" "+Ve(e[0]):"as no adapter specified";throw new H("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return i},adapters:$e};function Ke(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new xe(null,e)}function Xe(e){Ke(e),e.headers=ge.from(e.headers),e.data=be.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return We.getAdapter(e.adapter||ue.adapter,e)(e).then(function(t){return Ke(e),t.data=be.call(e,e.transformResponse,t),t.headers=ge.from(t.headers),t},function(t){return ve(t)||(Ke(e),t&&t.response&&(t.response.data=be.call(e,e.transformResponse,t.response),t.response.headers=ge.from(t.response.headers))),Promise.reject(t)})}const Qe="1.13.6",Ye={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ye[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Je={};Ye.transitional=function(e,t,r){return(n,i,o)=>{if(!1===e)throw new H(function(e,t){return"[Axios v"+Qe+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}(i," has been removed"+(t?" in "+t:"")),H.ERR_DEPRECATED);return t&&!Je[i]&&(Je[i]=!0),!e||e(n,i,o)}},Ye.spelling=function(e){return(e,t)=>!0};var Ze={assertOptions:function(e,t,r){if("object"!=typeof e)throw new H("options must be an object",H.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const o=n[i],s=t[o];if(s){const t=e[o],r=void 0===t||s(t,o,e);if(!0!==r)throw new H("option "+o+" must be "+r,H.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new H("Unknown option "+o,H.ERR_BAD_OPTION)}},validators:Ye};const et=Ze.validators;class tt{constructor(e){this.defaults=e||{},this.interceptors={request:new Z,response:new Z}}async request(e,t){try{return await this._request(e,t)}catch(r){if(r instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{r.stack?t&&!String(r.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(r.stack+="\n"+t):r.stack=t}catch(n){}}throw r}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Re(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:i}=t;void 0!==r&&Ze.assertOptions(r,{silentJSONParsing:et.transitional(et.boolean),forcedJSONParsing:et.transitional(et.boolean),clarifyTimeoutError:et.transitional(et.boolean),legacyInterceptorReqResOrdering:et.transitional(et.boolean)},!1),null!=n&&(q.isFunction(n)?t.paramsSerializer={serialize:n}:Ze.assertOptions(n,{encode:et.function,serialize:et.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Ze.assertOptions(t,{baseUrl:et.spelling("baseURL"),withXsrfToken:et.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&q.merge(i.common,i[t.method]);i&&q.forEach(["delete","get","head","post","put","patch","common"],e=>{delete i[e]}),t.headers=ge.concat(o,i);const s=[];let a=!0;this.interceptors.request.forEach(function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;a=a&&e.synchronous;const r=t.transitional||ee;r&&r.legacyInterceptorReqResOrdering?s.unshift(e.fulfilled,e.rejected):s.push(e.fulfilled,e.rejected)});const l=[];let c;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let u,p=0;if(!a){const e=[Xe.bind(this),void 0];for(e.unshift(...s),e.push(...l),u=e.length,c=Promise.resolve(t);p<u;)c=c.then(e[p++],e[p++]);return c}u=s.length;let d=t;for(;p<u;){const e=s[p++],t=s[p++];try{d=e(d)}catch(m){t.call(this,m);break}}try{c=Xe.call(this,d)}catch(m){return Promise.reject(m)}for(p=0,u=l.length;p<u;)c=c.then(l[p++],l[p++]);return c}getUri(e){return J(ke((e=Re(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}q.forEach(["delete","get","head","options"],function(e){tt.prototype[e]=function(t,r){return this.request(Re(r||{},{method:e,url:t,data:(r||{}).data}))}}),q.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,i){return this.request(Re(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}tt.prototype[e]=t(),tt.prototype[e+"Form"]=t(!0)});var rt=tt;class nt{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const r=this;this.promise.then(e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t;const n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e,n,i){r.reason||(r.reason=new xe(e,n,i),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new nt(function(t){e=t}),cancel:e}}}var it=nt;const ot={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ot).forEach(([e,t])=>{ot[t]=e});var st=ot;const at=function t(r){const n=new rt(r),i=e(rt.prototype.request,n);return q.extend(i,rt.prototype,n,{allOwnKeys:!0}),q.extend(i,n,null,{allOwnKeys:!0}),i.create=function(e){return t(Re(r,e))},i}(ue);return at.Axios=rt,at.CanceledError=xe,at.CancelToken=it,at.isCancel=ve,at.VERSION=Qe,at.toFormData=W,at.AxiosError=H,at.Cancel=at.CanceledError,at.all=function(e){return Promise.all(e)},at.spread=function(e){return function(t){return e.apply(null,t)}},at.isAxiosError=function(e){return q.isObject(e)&&!0===e.isAxiosError},at.mergeConfig=Re,at.AxiosHeaders=ge,at.formToJSON=e=>le(q.isHTMLForm(e)?new FormData(e):e),at.getAdapter=We.getAdapter,at.HttpStatusCode=st,at.default=at,dr=at}var gr,br,vr,xr={};function wr(){if(gr)return xr;gr=1;var e=xr&&xr.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(xr,"__esModule",{value:!0}),xr.CroSiteClient=void 0;const t=nr(),r={local:{xtool:{us:{},cn:{}},makeblock:{us:{},cn:{}}},dev:{xtool:{us:{},cn:{}},makeblock:{us:{},cn:{}}},test_us:{xtool:{us:{passport:"https://passport-api-test.xtool.com",customthing:"https://passport-api-test.customthings.com",designFind:"https://passport-api-test.designfind.com",atomm:"https://passport-api-test.atomm.com"},cn:{}},makeblock:{us:{},cn:{}}},test:{xtool:{us:{passport:"https://passport-api-test.xtool.com",customthing:"https://passport-api-test.customthings.com",designFind:"https://passport-api-test.designfind.com",atomm:"https://passport-api-test.atomm.com"},cn:{}},makeblock:{us:{},cn:{}}},pre:{xtool:{us:{passport:"https://passport-api-pre.xtool.com",customthing:"https://passport-api-pre.customthings.com",designFind:"https://passport-api-pre.designfind.com",atomm:"https://passport-api-pre.atomm.com"},cn:{}},makeblock:{us:{},cn:{}}},prod:{xtool:{us:{passport:"https://passport-api.xtool.com",customthing:"https://passport-api.customthings.com",atomm:"https://passport-api.atomm.com"},cn:{passport:"https://passport-api.makextool.com",customthing:"https://passport-api.customthings.cn",atomm:"https://passport-api.atomm.com.cn"}},makeblock:{us:{},cn:{}}}},n="/v1/cookie/add-cookies";return xr.CroSiteClient=class{constructor(e){this._area=t.AREA.US,this._env=t.CLIENT_ENV.PROD,this._domainSpace=t.DOMAIN_SPACE.XTOOL;const{env:r,domainSpace:n,area:i}=e;r&&(this.env=r),n&&(this.domainSpace=n),i&&(this.area=i)}set area(e){this._area=e}get area(){return this._area}set env(e){this._env=e}get env(){return this._env}set domainSpace(e){this._domainSpace=e}get domainSpace(){return this._domainSpace}get domain(){var e,t;return null===(t=null===(e=r[this.env])||void 0===e?void 0:e[this.domainSpace])||void 0===t?void 0:t[this.area]}getSubHost(e){return new URL(e).hostname.split(".").slice(1).join(".")}setCookie(e){return fetch(e,{method:"GET",credentials:"include"}).then(()=>!0).catch(()=>!0)}setCrosSiteCookie(t){return e(this,void 0,void 0,function*(){const e=this.domain||{},r=[];for(const n in e){const i=e[n];r.push(this.setCookie(`${i}/v1/cookie/set-cookies?utoken=${t}&domain=${this.getSubHost(i)}`))}return Promise.all(r)})}setThirdPartyCookie(t,r){return e(this,void 0,void 0,function*(){if(!r)return;let e=yield this.preFetchThirdPartyCookie();const i=this.domain,o=[];for(const t in i){const r=i[t];r.includes(`.${this.getSubHost(location.origin)}`)||e.includes(`${r}${n}`)||o.push(`${r}${n}`)}let s=t;for(let t=o.length-1;t>=0;t--)s=`${o[t]}?utoken=${r}&domain=${this.getSubHost(o[t])}&target=${encodeURIComponent(s)}`;window.location.href=s})}preFetchThirdPartyCookie(){return e(this,void 0,void 0,function*(){const t=[],r=this.domain;let i=[];for(const e in r){const t=r[e];i.push(`${t}${n}`)}return yield Promise.all(i.map(r=>e(this,void 0,void 0,function*(){try{return yield fetch(r),!0}catch(e){return t.push(r),!1}}))),t})}},xr}function Sr(){if(br)return Bt;br=1;var e,t,r,n=Bt&&Bt.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=Bt&&Bt.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=Bt&&Bt.__importStar||function(){var e=function(t){return(e=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t})(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(null!=t)for(var o=e(t),s=0;s<o.length;s++)"default"!==o[s]&&n(r,t,o[s]);return i(r,t),r}}(),s=Bt&&Bt.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})},a=Bt&&Bt.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},l=Bt&&Bt.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},c=Bt&&Bt.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},u=Bt&&Bt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.MRequest=void 0;const p=u(Ut()),d=$t(),m=o((Vt||(Vt=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.QUERY=Gt.googleClientId=void 0,Gt.googleClientId="741723023720-rvn5ckm07n0k2m2iits9t9fike24b0d8.apps.googleusercontent.com",Gt.QUERY={PLATFORM:"p",REDIRECT:"r",MODE:"md",SHOW_SWITCH_HOST:"sh",SHOW_SOCIAL_LOGIN:"sl",SHOW_SWITCH_LOGIN_REGISTER:"lr",ONLY_PHONE_LOGIN:"op",USE_LOCALSTORAGE:"uls",USE_RELOGIN:"rl",HIDE_LOGO:"hl",LOGO:"lo",BUSINESS_LOGO:"blo",TEXT_LOGO:"tlo",SUB_TEXT_LOGO:"stlo",COPYRIGHT:"cr",ORG_CODE:"oc",TOKEN:"ut",CLEAR_TOKEN:"cut",COOKIES_SAME_SITE:"sameSite",COOKIES_SECURE:"secure",APP_VERSION:"av",SYSTEM:"s",ORIGIN:"o",CUSTOM_IMAGE:"img"},Gt.default={dev:{xtool:{us:{page:"https://dev-web.makeblock.com/xtool-passport/index.html#/",coopPage:"https://dev-web-cf.makeblock.com/xtool-passport/index.html#/",prefetch:"https://dev-web.makeblock.com/xtool-passport/prefetch.html",api:"https://xtool-passport-api-dev.makeblock.com/v1"},eu:{page:"https://dev-web.makeblock.com/xtool-passport/index.html#/",coopPage:"https://dev-web-cf.makeblock.com/xtool-passport/index.html#/",prefetch:"https://dev-web.makeblock.com/xtool-passport/prefetch.html",api:"https://xtool-passport-api-dev.makeblock.com/v1"},cn:{page:"https://dev-web.makeblock.com/xtool-passport/index.html#/",coopPage:"https://dev-web-cf.makeblock.com/xtool-passport/index.html#/",prefetch:"https://dev-web.makeblock.com/xtool-passport/prefetch.html",api:"https://xtool-passport-api-dev.makeblock.com/v1"}},makeblock:{us:{page:"https://dev-web.makeblock.com/passport/index.html#/",api:"https://passport-api-dev.makeblock.com/v1"},eu:{page:"https://dev-web.makeblock.com/passport/index.html#/",api:"https://passport-api-dev.makeblock.com/v1"},cn:{page:"https://dev-web.makeblock.com/passport/index.html#/",api:"https://passport-api-dev.makeblock.com/v1"}}},test:{xtool:{us:{page:"https://test-web.xtool.com/xtool-passport/index.html#/",coopPage:"https://test-web-cf.atomm.com/xtool-passport/index.html#/",prefetch:"https://test-web.xtool.com/xtool-passport/prefetch.html",api:"https://passport-api-test.xtool.com/v1"},eu:{page:"https://test-web.mblock.cc/xtool-passport/index.html#/",coopPage:"https://test-web-cf.atomm.com/xtool-passport/index.html#/",prefetch:"https://test-web.mblock.cc/xtool-passport/prefetch.html",api:"https://passport-api-test.mblock.cc/v1"},cn:{page:"https://test-web.makeblock.com/xtool-passport/index.html#/",coopPage:"https://test-web-cf.makeblock.com/xtool-passport/index.html#/",prefetch:"https://test-web.makeblock.com/xtool-passport/prefetch.html",api:"https://xtool-passport-api-test.makeblock.com/v1"}},makeblock:{us:{page:"https://test-web.makeblock.com/passport/index.html#/",api:"https://passport-api-test.mblock.cc/v1"},eu:{page:"https://test-web.mblock.cc/passport/index.html#/",api:"https://passport-api-test.mblock.cc/v1"},cn:{page:"https://test-web.makeblock.com/passport/index.html#/",api:"https://passport-api-test.makeblock.com/v1"}}},test_us:{xtool:{us:{page:"https://test-web.xtool.com/xtool-passport/index.html#/",coopPage:"https://test-web-cf.atomm.com/xtool-passport/index.html#/",prefetch:"https://test-web.xtool.com/xtool-passport/prefetch.html",api:"https://passport-api-test.xtool.com/v1"},eu:{page:"https://test-web.mblock.cc/xtool-passport/index.html#/",coopPage:"https://test-web-cf.atomm.com/xtool-passport/index.html#/",prefetch:"https://test-web.mblock.cc/xtool-passport/prefetch.html",api:"https://passport-api-test.mblock.cc/v1"},cn:{page:"https://test-web.makeblock.com/xtool-passport/index.html#/",coopPage:"https://test-web-cf.makeblock.com/xtool-passport/index.html#/",prefetch:"https://test-web.makeblock.com/xtool-passport/prefetch.html",api:"https://xtool-passport-api-test.makeblock.com/v1"}},makeblock:{us:{page:"https://test-web.makeblock.com/passport/index.html#/",api:"https://passport-api-test.mblock.cc/v1"},eu:{page:"https://test-web.mblock.cc/passport/index.html#/",api:"https://passport-api-test.mblock.cc/v1"},cn:{page:"https://test-web.makeblock.com/passport/index.html#/",api:"https://passport-api-test.makeblock.com/v1"}}},pre:{xtool:{us:{page:"https://pre-web.xtool.com/xtool-passport/index.html#/",coopPage:"https://pre-web-cf.atomm.com/xtool-passport/index.html#/",prefetch:"https://pre-web.xtool.com/xtool-passport/prefetch.html",api:"https://passport-api-pre.xtool.com/v1"},eu:{page:"https://pre-web.xtool.com/xtool-passport/index.html#/",coopPage:"https://pre-web-cf.atomm.com/xtool-passport/index.html#/",prefetch:"https://pre-web.xtool.com/xtool-passport/prefetch.html",api:"https://passport-api-pre.xtool.com/v1"},cn:{page:"https://pre-web.xtool.com/xtool-passport/index.html#/",coopPage:"https://pre-web-cf.atomm.com/xtool-passport/index.html#/",prefetch:"https://pre-web.xtool.com/xtool-passport/prefetch.html",api:"https://passport-api-pre.xtool.com/v1"}},makeblock:{}},prod:{xtool:{us:{page:"https://passport.xtool.com/#/",coopPage:"https://passport.atomm.com/index.html/#/",prefetch:"https://passport.xtool.com/prefetch.html",api:"https://passport-api.xtool.com/v1"},eu:{page:"https://passport.xtool.com/#/",coopPage:"https://passport.atomm.com/index.html/#/",prefetch:"https://passport.xtool.com/prefetch.html",api:"https://passport-api.xtool.com/v1"},cn:{page:"https://passport.makextool.com/#/",coopPage:"https://passport.atomm.com/index.html/#/",prefetch:"https://passport.makextool.com/prefetch.html",api:"https://passport-api.makextool.com/v1"}},makeblock:{us:{page:"https://passport.mblock.cc/#/",api:"https://passport-api.mblock.cc/v1"},eu:{page:"https://passport.mblock.cc/#/",api:"https://passport-api.mblock.cc/v1"},cn:{page:"https://passport.makeblock.com/#/",api:"https://passport-api.makeblock.com/v1"}}}}),Gt)),f=Qt(),h=nr(),y=pr(),g=o(function(){if(fr)return hr;fr=1;var e=hr&&hr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hr,"__esModule",{value:!0}),hr.mr=void 0;const t=e(yr());class r{constructor(){this.axios=t.default.create({timeout:3e4,transformRequest:[e=>JSON.stringify(e)],transformResponse:[e=>JSON.parse(e)]}),this.interceptors()}interceptors(){this.axios.interceptors.request.use(e=>(e.headers["Content-Type"]="application/json;charset=UTF-8",Promise.resolve(e)),e=>Promise.reject(e)),this.axios.interceptors.response.use(e=>{const{status:t,data:r}=e;return 200===t&&0===r.code?Promise.resolve(r.data):Promise.reject(r)},e=>Promise.reject(e))}apis(e){const t=this,r=Object.keys(e),n={};return r.forEach(r=>{const i=e[r].split(" ");let[o,s="GET"]=i;s=s.toLowerCase(),Object.defineProperty(n,r,{value(...e){const r=s.toUpperCase();if("GET"===r)return t.axios.get(o,...e);if("POST"===r)return t.axios.post(o,...e);if("PUT"===r)return t.axios.put(o,...e);if("PATCH"===r)return t.axios.patch(o,...e);if("DELETE"===r)return t.axios.delete(o,...e);const n=Object.assign({url:o,method:s},e);return t.axios(n)}})}),n}}return hr.default=r,hr.mr=new r,hr}()),b=wr();class v extends d.EventEmitter{constructor(n){var i;super(),this.thirdPartryCookie=!1,this._oneTap={enabled:!1},this._coop=!1,this._business=!1,this._disableSafari=!1,this._adaptWindow=!1,this._preFetch=!1,this._loading=!1,this._height=0,this._area=h.AREA.CN,this._domainSpace=h.DOMAIN_SPACE.MAKEBLOCK,this._advertisement=null,this._loadingImage=null,this._advertisementPosition=null,e.set(this,{}),this._env=h.CLIENT_ENV.PROD,this._platform="",t.set(this,""),this._redirect=location.href,this._mode=h.PAGE_MODE.PAGE,this._showSwitchHost=!0,this._showSwitchLoginRegister=!0,this._showSocialLogin=!0,this._onlyPhoneLogin=!1,this._useLocalstorage=!1,this._useReLogin=!1,this._businessLogo="",this._logo="",this._textLogo="",this._subTextLogo="",this._hideLogo=!1,this._copyright="",this._orgCode="",this._appVersion="",this._system="",this._origin="",this._customImage="",this._entryPage="login",r.set(this,null),this.tokenChange=e=>{this.emit("tokenChange",e)},this.langChange=e=>{this.emit("langChange",e)};const{search:o,hash:a}=location,l=new URLSearchParams(o||a);l.get("uls")||(p.default.strategy="cookie",p.default.config({sameSite:"None",secure:!0,domain:this.getCookieDomain(),expires:525600})),"1"===l.get("rl")&&(this.token="");const{domainSpace:u,platform:d,system:f,mode:y,businessLogo:g,appVersion:b,area:v,origin:x,customImage:w,redirect:S,entryPage:N,lang:j,advertisement:E,loadingImage:C,advertisementPosition:k,height:T,loading:R,preFetch:O,adaptWindow:P,disableSafari:_,oneTap:A,business:I,coop:M}=n;if(this.domainSpace=u,this.platform=d,this.mode=y,g&&(this.businessLogo=g),"boolean"==typeof I&&(this.business=I),"boolean"==typeof M&&(this.coop=M),"number"==typeof T&&(this.height=T),A&&(this.oneTap=A),"boolean"==typeof _&&(this.disableSafari=_),"boolean"==typeof P&&(this.adaptWindow=P),"boolean"==typeof R&&(this.loading=R),"boolean"==typeof O&&(this.preFetch=O),k&&(this.advertisementPosition=k),E&&(this.advertisement=E),C&&(this.loadingImage=C),f&&(this.system=f),f&&(this.system=f),b&&(this.appVersion=b),v&&(this.area=v),x&&(this.origin=x),w&&(this.customImage=w),void 0!==S&&(this.redirect=S),N&&(this.entryPage=N),j&&(this.lang=j),null===(i=this.oneTap)||void 0===i?void 0:i.enabled){const e=this.oneTap,{enabled:t,manual:r=!1}=e,n=c(e,["enabled","manual"]);let i=document.createElement("script");i.src="https://accounts.google.com/gsi/client",i.async=!0,document.body.appendChild(i),i.onload=()=>{google.accounts.id.initialize(Object.assign(Object.assign({},n),{client_id:m.googleClientId,callback:e=>s(this,void 0,void 0,function*(){var t;let r=yield fetch(`${this.domain.api}/oauth/google/onetab`,{method:"post",headers:{"Content-Type":"application/json","x-app-code":this.platform,"x-app-platform":this.system,"x-app-version":this.appVersion,lang:this.lang},body:JSON.stringify({idToken:e.credential,cid:m.googleClientId})}).then(e=>e.json()),n=null===(t=r.data)||void 0===t?void 0:t.utoken;n&&(this.token=n,yield this.setCrosSiteCookie(n),this.emit("oneTap",r))})})),r||this.token||google.accounts.id.prompt()}}this.domainSpace===h.DOMAIN_SPACE.XTOOL&&this.preFetch&&setTimeout(()=>{if(this.isCrosSite(this.baseUrl,location.href)){if(!this.domain.prefetch)return;let e=document.createElement("div");e.id="passport-prefetch-iframe",e.innerHTML=` <iframe src="${this.domain.prefetch}" frameborder="0"></iframe>`,e.style.display="none",e.style.transform="translateZ(0)",e.style.position="fixed",document.body.appendChild(e)}else this.preFetchSource()}),this.listenerThirdPartryCookie()}oneTapPrompt(){google.accounts.id.prompt()}setCrosSiteCookie(e){return new b.CroSiteClient({env:this.env,domainSpace:this.domainSpace,area:this.area}).setCrosSiteCookie(e)}setThirdPartyCookie(e,t){new b.CroSiteClient({env:this.env,domainSpace:this.domainSpace,area:this.area}).setThirdPartyCookie(e,t)}preFetchSource(){return s(this,void 0,void 0,function*(){var e,t,r;try{const{data:n}=yield fetch(`${this.domain.api}/preload/resources`).then(e=>e.json());if(!n)return;null===(e=n["dns-prefetch"])||void 0===e||e.forEach(e=>{const t=document.createElement("link");t.rel="dns-prefetch",t.href=e,document.body.appendChild(t)}),null===(t=n.preconnect)||void 0===t||t.forEach(e=>{const t=document.createElement("link");t.rel="preconnect",t.crossOrigin="",t.href=e,document.body.appendChild(t)}),null===(r=n.prefetch)||void 0===r||r.forEach(e=>{const t=document.createElement("link");t.rel="preload",e.includes(".js")?t.as="script":e.includes(".css")&&(t.as="style"),t.href=e,document.body.appendChild(t)})}catch(n){}})}listenerThirdPartryCookie(){window.addEventListener("message",e=>{const{type:t,content:r}=e.data;"check-third-party-cookie"===t&&(this.thirdPartryCookie=r)})}get oneTap(){return this._oneTap}set oneTap(e){this._oneTap=e}get coop(){return this._coop}set coop(e){this._coop=e}get business(){return this._business}set business(e){this._business=e}get disableSafari(){return this._disableSafari}set disableSafari(e){this._disableSafari=e}get adaptWindow(){return this._adaptWindow}set adaptWindow(e){this._adaptWindow=e}get preFetch(){return this._preFetch}set preFetch(e){this._preFetch=e}get loading(){return this._loading}set loading(e){this._loading=e}get height(){return this._height}set height(e){this._height=e}get area(){return this._area}set area(e){this._area=e}set domainSpace(e){this._domainSpace=e}get domainSpace(){return this._domainSpace}set advertisement(e){this._advertisement=e}get advertisement(){return this._advertisement}set loadingImage(e){this._loadingImage=e}get loadingImage(){return this._loadingImage}set advertisementPosition(e){this._advertisementPosition=e}get advertisementPosition(){return this._advertisementPosition}get storage(){return p.default}get domain(){return m.default[this._env][this._domainSpace][this._area]}set cookieConfig(t){p.default.config(t),a(this,e,t,"f")}set env(e){this._env=e}get env(){return this._env}set platform(e){this._platform=e}get platform(){return this._platform}get lang(){return p.default.get(h.LANG_KEY)||l(this,t,"f")||(0,y.systemLang)()||"en"}set lang(e){const r=l(this,t,"f"),n=this.lang;p.default.set(h.LANG_KEY,e),a(this,t,e,"f"),r===n&&n===e&&r===e||this.langChange(e)}set redirect(e){this._redirect=e}set mode(e){this._mode=e}set showSwitchHost(e){this._showSwitchHost=e}set showSwitchLoginRegister(e){this._showSwitchLoginRegister=e}set showSocialLogin(e){this._showSocialLogin=e}set onlyPhoneLogin(e){this._onlyPhoneLogin=e}set useLocalstorage(e){this._useLocalstorage=e}set useReLogin(e){this._useReLogin=e}set businessLogo(e){this._businessLogo=e}set logo(e){this._logo=e}set textLogo(e){this._textLogo=e}set subTextLogo(e){this._subTextLogo=e}set hideLogo(e){this._hideLogo=e}set copyright(e){this._copyright=e}set orgCode(e){this._orgCode=e}set appVersion(e){const t=this.appVersion;this._appVersion=e,this.appVersion!==t&&this.appVersionChange(this.appVersion)}get appVersion(){return this._appVersion}set system(e){this._system=e}get system(){return this._system}set origin(e){this._origin=e}get origin(){return this._origin||this.platform}set customImage(e){this._customImage=e}get customImage(){return this._customImage}get baseUrl(){return`${this.coop?this.domain.coopPage:this.domain.page}${this.lang}`}queryString(){const t=new URLSearchParams,{sameSite:r,secure:n}=l(this,e,"f");return this._platform&&t.append(m.QUERY.PLATFORM,this._platform),this._redirect&&t.append(m.QUERY.REDIRECT,this._redirect),[h.PAGE_MODE.WIN,h.PAGE_MODE.FULL_WIN].some(e=>e===this._mode)&&t.append(m.QUERY.MODE,this._mode),!1===this._showSwitchHost&&t.append(m.QUERY.SHOW_SWITCH_HOST,"false"),!1===this._showSwitchLoginRegister&&t.append(m.QUERY.SHOW_SWITCH_LOGIN_REGISTER,"0"),!1===this._showSocialLogin&&t.append(m.QUERY.SHOW_SOCIAL_LOGIN,"0"),!0===this._onlyPhoneLogin&&t.append(m.QUERY.ONLY_PHONE_LOGIN,"1"),!0===this._useLocalstorage&&t.append(m.QUERY.USE_LOCALSTORAGE,"1"),!0===this._useReLogin&&t.append(m.QUERY.REDIRECT,"1"),this._business&&this._businessLogo&&t.append(m.QUERY.BUSINESS_LOGO,this._businessLogo),this._logo&&t.append(m.QUERY.LOGO,this._logo),this._textLogo&&t.append(m.QUERY.TEXT_LOGO,this._textLogo),this._subTextLogo&&t.append(m.QUERY.SUB_TEXT_LOGO,this._textLogo),!0===this._hideLogo&&t.append(m.QUERY.HIDE_LOGO,"1"),this._copyright&&t.append(m.QUERY.COPYRIGHT,this._copyright),this._orgCode&&t.append(m.QUERY.ORG_CODE,this._orgCode),this._appVersion&&t.append(m.QUERY.APP_VERSION,this._appVersion),this._system&&t.append(m.QUERY.SYSTEM,this._system),this._origin&&t.append(m.QUERY.ORIGIN,this._origin),this._customImage&&t.append(m.QUERY.CUSTOM_IMAGE,this._customImage),r&&t.append(m.QUERY.COOKIES_SAME_SITE,r),void 0!==n&&t.append(m.QUERY.COOKIES_SECURE,`${n}`),t.toString()}get url(){return this.getEntryUrl()}get entryPage(){return this._entryPage}set entryPage(e){this._entryPage=e}getEntryPath(e=this.entryPage){return"register"===e?"register":this.business?"login-business":"login"}getEntryUrl(e=this.entryPage){return`${this.baseUrl}/${this.getEntryPath(e)}?${this.queryString()}`}get stuLoginUrl(){return`${this.baseUrl}/login/stu?${this.queryString()}`}get profile(){return`${this.baseUrl}/profile?ut=${this.token}`}getUrl(e){const t=new f.UAParser(navigator.userAgent).getBrowser();if(this.isCrosSite(this.baseUrl,location.href)&&"Safari"===t.name){let t=`${this.baseUrl}/${e}?${this.queryString()}`;return`${this.baseUrl}/authcb?ut=${this.token}&r=${encodeURIComponent(t)}`}return`${this.baseUrl}/${e}?${this.queryString()}`}isCrosSite(e,t){const r=e=>new URL(e).hostname.split(".").slice(1).join(".");return r(e)!==r(t)}get token(){return this.storage.get(h.TOKEN_KEY)||l(this,r,"f")}set token(e){const t=l(this,r,"f"),n=this.token;e?p.default.set(h.TOKEN_KEY,e):p.default.remove(h.TOKEN_KEY),a(this,r,e,"f"),t===n&&n===e&&t===e||this.tokenChange(e)}getMessageClientState(){return{domainSpace:this.domainSpace,platform:this.platform,system:this.system,token:this.token||"",lang:this.lang,area:this.area,env:this.env}}onStateListener(e){this.on("tokenChange",t=>{e({type:"token",value:t})}),this.on("langChange",t=>{e({type:"lang",value:t})})}appVersionChange(e){this.emit("appVersionChange",e)}set close(e){this._close=e}set switchHost(e){this._switchHost=e}listenMessage(){const e=e=>{const{source:r,payload:n}=e.data;if(r===h.POST_MESSAGE_SOURCE){const{type:e}=n;if(e===h.MESSAGE_TYPE.LOGIN||e===h.MESSAGE_TYPE.REGISTER||e===h.MESSAGE_TYPE.FINDPWD){const{token:e}=n;e&&(this.token=e);let r=e=>{this.thirdPartryCookie&&this.domainSpace===h.DOMAIN_SPACE.XTOOL&&!this.disableSafari?this.setThirdPartyCookie(e||location.href,this.token):e?window.location.href=e:window.location.reload()};"function"==typeof this._close&&(this._close(n,r),t())}e===h.MESSAGE_TYPE.SWITCH_HSOT&&"function"==typeof this._switchHost&&this._switchHost(n.data)}},t=()=>{this._close=void 0,window.removeEventListener("message",e)};return window.addEventListener("message",e),t}logout(){this.isInIframe&&window.parent.postMessage({action:`${this._domainSpace}-${h.MESSAGE_TYPE.LOGOUT}`,from:h.MESSAGE_ORIGIN_NAME,platform:this.platform},"*");const e=this.token;if(!e)return;this.token=null;const t=`${this.domain.api}/user/logout`;return g.mr.axios.post(t,{},{headers:{utoken:e}})}userInfo(){const e=this.token;if(!e)return;const t=`${this.domain.api}/user/basic`;return g.mr.axios.get(t,{headers:{utoken:e}})}isValidIP(e){if(/^(\d{1,3}\.){3}\d{1,3}$/.test(e)){return e.split(".").every(e=>{const t=parseInt(e,10);return t>=0&&t<=255})}return e.includes(":")}getRootDomain(e=document.location.hostname){if(this.isValidIP(e))return e;const t=e.split(".");return 1===t.length?e:t.slice(1).join(".")}getCookieDomain(e=document.location.hostname){if(this.isValidIP(e))return e;const t=e.split(".");return`.${1===t.length?e:t.slice(1).join(".")}`}openLoginModal(e,t=this.entryPage){this.close=(t,r)=>{(0,y.closeLoginModal)(),e&&e(t,r)},this.listenMessage(),(0,y.openLoginModal)(this.getEntryUrl(t),this._mode,{advertisement:this.advertisement,advertisementPosition:this.advertisementPosition,height:this.height,loading:this.loading,adaptWindow:this.adaptWindow,loadingImage:this.loadingImage})}get isInIframe(){return window.self!==window.parent}openModal(e,t=this.entryPage){if(this.isInIframe){let r;const n=(new Date).getTime(),i=`${this._domainSpace}-${h.MESSAGE_TYPE.LOGIN}`,o=e=>{const t=e.data;(null==t?void 0:t.action)===`${i}-${n}`&&(r=Boolean(null==t?void 0:t.notOpenModal))};window.addEventListener("message",o),window.parent.postMessage({action:i,key:n,from:h.MESSAGE_ORIGIN_NAME,platform:this.platform},"*");const s=5;let a,l=0;const c=()=>{if(l++,void 0!==r||l>s){if(window.removeEventListener("message",o),r)return;return this.openLoginModal(e,t),void clearTimeout(a)}a=setTimeout(c,10)};return void c()}this.openLoginModal(e,t)}checkAuthByProfile(){return new Promise(e=>{const t=new URLSearchParams,r=this.token||`${(new Date).getTime()}`;t.append(m.QUERY.TOKEN,r);const n=`${this.baseUrl}/profile/settings?${t.toString()}&${this.queryString()}`,i="check-auth-by-profile",o=()=>{const e=document.querySelector(`#${i}`);e&&(null==e||e.remove())};o();const s=t=>{const n=t.data,{action:i,ut:a="",userInfo:l={},msg:c}=n;i===`profile-settings-ut-cb-${r}`&&(e({ut:a,userInfo:l,msg:c}),o(),window.removeEventListener("message",s),clearTimeout(u))};window.addEventListener("message",s);const a=document.querySelector("body"),l=`\n <div style="position: fixed; z-index: -1; width: 0; height: 0;">\n <iframe id="checkAuthByProfile-iframe" src="${n}" frameborder="0"></iframe>\n </div>\n `,c=document.createElement("div");c.id=i,c.innerHTML+=l,null==a||a.append(c);let u,p=0;const d=()=>{if(p++,p>60)return e({ut:"",userInfo:{},msg:"Receive messages timeout"}),o(),window.removeEventListener("message",s),void clearTimeout(u);u=setTimeout(d,1e3)};d()})}}return e=new WeakMap,t=new WeakMap,r=new WeakMap,g.mr.axios.interceptors.request.use(e=>{const{url:t,params:r={}}=e;if(t){let n=t.match(/(:[^{:&/|_}]*)/g);Array.isArray(n)&&n.length>0&&n.forEach(n=>{const i=n.replace(":","");i.length>=1&&i in r&&(e.url=t.replace(n,r[i]),delete e.params[i])})}return Promise.resolve(e)},e=>Promise.reject(e)),Bt.MRequest=g.default,Bt.default=v,Bt}var Nr=(vr||(vr=1,function(e){const t=Sr(),r=nr(),n=wr(),i=t.default||t;e.exports=i,e.exports.default=i,e.exports.PassportClient=i,Object.defineProperty(e.exports,"__esModule",{value:!0}),Object.assign(e.exports,t,r,n)}(zt)),zt.exports);const jr=It(Nr);class Er{constructor(){r(this,"listeners",new Map)}on(e,t){this.listeners.has(e)||this.listeners.set(e,new Set);return this.listeners.get(e).add(t),()=>this.off(e,t)}off(e,t){var r;null==(r=this.listeners.get(e))||r.delete(t)}emit(e,t){var r;null==(r=this.listeners.get(e))||r.forEach(e=>{try{e(t)}catch(r){}})}clear(){this.listeners.clear()}}const Cr={prod:{env:Nr.CLIENT_ENV.PROD,area:Nr.AREA.US},pre:{env:Nr.CLIENT_ENV.PRE,area:Nr.AREA.US},test:{env:Nr.CLIENT_ENV.TEST_US,area:Nr.AREA.US},dev:{env:Nr.CLIENT_ENV.DEV,area:Nr.AREA.CN}};class kr{constructor(e,t,n){r(this,"appKey"),r(this,"passportClient"),r(this,"http"),r(this,"emitter",new Er),r(this,"_status",{isLogin:!1,userInfo:null}),this.appKey=e,this.http=n;const i=Cr[t]??Cr.prod;this.passportClient=new jr({domainSpace:Nr.DOMAIN_SPACE.XTOOL,platform:Nr.XTOOL_PLATFORM.ATOMM,mode:Nr.PAGE_MODE.WIN,area:Nr.AREA.US,...i}),this.passportClient.env=i.env,this._restoreFromStorage()}getStatus(){return{...this._status}}getToken(){return Rt(this.appKey)}async syncToken(e){const t=e.trim();if(!t)throw new Error("Token is required");try{Tt(this.appKey,t),this.passportClient.token=t;const e=await this._fetchUserInfo(t);return this._setLoginStatus(e),this.getStatus()}catch(r){throw this._clearLoginStatus(),r}}login(){return new Promise((e,t)=>{try{this.passportClient.openModal(async({token:r})=>{try{if(!r)return void t(new Error("Login failed: token is empty"));Tt(this.appKey,r),this.passportClient.token=r;const n=await this._fetchUserInfo(r);this._setLoginStatus(n),e(n)}catch(n){Ot(this.appKey),t(n)}})}catch(r){t(r)}})}async logout(){try{await this.passportClient.logout()}catch{}this._clearLoginStatus()}onChange(e){return this.emitter.on("change",e)}async _restoreFromStorage(){const e=Rt(this.appKey);if(e)try{this.passportClient.token=e;const t=await this._fetchUserInfo(e);this._setLoginStatus(t)}catch{Ot(this.appKey)}}async _fetchUserInfo(e){this.passportClient.token=e;const[t,r]=await Promise.all([this.passportClient.userInfo(),this._fetchUserRoles()]),n=(null==t?void 0:t.data)??t;if(!(null==n?void 0:n.uid))throw new Error("Invalid user info: missing uid");const i=r.some(e=>"community_admin"===e.code);return{uid:n.uid,uuid:n.uuid??String(n.uid),userName:n.userName??"",headpic:n.headpic??"",email:n.email??"",phoneNumber:n.phoneNumber??"",phoneZone:n.phoneZone??"",gender:n.gender??0,signature:n.signature??"",createTime:n.createTime??0,roleList:r,isCommunityAdmin:i}}async _fetchUserRoles(){try{const e=await this.http.request({method:"GET",url:"/efficacy/v1/roles",params:{d:"xtool"}});return Array.isArray(e)?e:[]}catch(e){return[]}}_setLoginStatus(e){this._status={isLogin:!0,userInfo:e},this.emitter.emit("change",this.getStatus())}_clearLoginStatus(){Ot(this.appKey),this._status={isLogin:!1,userInfo:null},this.emitter.emit("change",this.getStatus())}}const Tr=[];for(let qs=0;qs<256;++qs)Tr.push((qs+256).toString(16).slice(1));let Rr;const Or=new Uint8Array(16);const Pr={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function _r(e,t,r){var n;if(Pr.randomUUID&&!e)return Pr.randomUUID();const i=(e=e||{}).random??(null==(n=e.rng)?void 0:n.call(e))??function(){if(!Rr){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Rr=crypto.getRandomValues.bind(crypto)}return Rr(Or)}();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=15&i[6]|64,i[8]=63&i[8]|128,function(e,t=0){return(Tr[e[t+0]]+Tr[e[t+1]]+Tr[e[t+2]]+Tr[e[t+3]]+"-"+Tr[e[t+4]]+Tr[e[t+5]]+"-"+Tr[e[t+6]]+Tr[e[t+7]]+"-"+Tr[e[t+8]]+Tr[e[t+9]]+"-"+Tr[e[t+10]]+Tr[e[t+11]]+Tr[e[t+12]]+Tr[e[t+13]]+Tr[e[t+14]]+Tr[e[t+15]]).toLowerCase()}(i)}class Ar{constructor(e,t,n){r(this,"http"),r(this,"module"),r(this,"credits"),r(this,"emitter",new Er),r(this,"_isEnabled",!1),r(this,"_freeRemaining",0),r(this,"_freeTotal",0),r(this,"_creditsPerUse",0),r(this,"_freePeriodEnd",0),r(this,"_loaded",!1),this.module=`generator_${e}`,this.http=t,this.credits=n}async getUsage(){const[e]=await Promise.all([this.http.request({method:"GET",url:"/ai/v5/artimind/free_trial/count",params:{module:this.module}}),this.credits.getBalance()]);return this._isEnabled=e.is_enabled,this._freeRemaining=e.remaining_count,this._freeTotal=e.total_count,this._creditsPerUse=e.need_credits,this._loaded=!0,this._buildUsageInfo()}getCachedUsage(){return this._loaded?this._buildUsageInfo():null}check(){return this._isInFreePeriod()?{canProceed:!0,reason:"free_period"}:this._freeRemaining>0?{canProceed:!0,reason:"free_count"}:this.credits.getCachedBalance()>=this._creditsPerUse&&this._creditsPerUse>0?{canProceed:!0,reason:"credits"}:{canProceed:!1,reason:"insufficient"}}async consume(e){if(this._isInFreePeriod())return{freeRemaining:this._freeRemaining,isCredit:!1};const t={module:this.module,external_id:(null==e?void 0:e.externalId)??_r()},r=await this.http.request({method:"POST",url:"/ai/v5/artimind/free_trial",data:t});return this._freeRemaining=r.remaining_count,r.is_credit&&await this.credits.getBalance(),this._freePeriodEnd=Date.now()+3e4,this.emitter.emit("change",this._buildUsageInfo()),{freeRemaining:r.remaining_count,isCredit:r.is_credit}}async refreshCredits(){await this.credits.getBalance(),this._loaded&&this.emitter.emit("change",this._buildUsageInfo())}onChange(e){return this.emitter.on("change",e)}_isInFreePeriod(){return Date.now()<this._freePeriodEnd}_buildUsageInfo(){const e=Date.now(),t=e<this._freePeriodEnd,r=t?Math.ceil((this._freePeriodEnd-e)/1e3):0;return{isEnabled:this._isEnabled,freeRemaining:this._freeRemaining,freeTotal:this._freeTotal,creditsPerUse:this._creditsPerUse,creditsBalance:this.credits.getCachedBalance(),inFreePeriod:t,freePeriodRemaining:r}}}var Ir,Mr,Dr,zr;(Mr=Ir||(Ir={})).HTTP="http",Mr.HTTPS="https",(zr=Dr||(Dr={})).MD5="md5",zr.CRC32="crc32",zr.CRC32C="crc32c",zr.SHA1="sha1",zr.SHA256="sha256";const Br="__smithy_context";class Lr{constructor(e){r(this,"method"),r(this,"protocol"),r(this,"hostname"),r(this,"port"),r(this,"path"),r(this,"query"),r(this,"headers"),r(this,"username"),r(this,"password"),r(this,"fragment"),r(this,"body"),this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new Lr({...e,headers:{...e.headers}});var r;return t.query&&(t.query=(r=t.query,Object.keys(r).reduce((e,t)=>{const n=r[t];return{...e,[t]:Array.isArray(n)?[...n]:n}},{}))),t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers}clone(){return Lr.clone(this)}}class qr{constructor(e){r(this,"statusCode"),r(this,"reason"),r(this,"headers"),r(this,"body"),this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}const Ur={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0},Hr=e=>({applyToStack:t=>{t.add(function(e){return t=>async r=>{var n,i,o,s;const{request:a}=r;if(!1!==e.expectContinueHeader&&Lr.isInstance(a)&&a.body&&"node"===e.runtime&&"FetchHttpHandler"!==(null==(i=null==(n=e.requestHandler)?void 0:n.constructor)?void 0:i.name)){let t=!0;if("number"==typeof e.expectContinueHeader)try{t=(Number(null==(o=a.headers)?void 0:o["content-length"])??(null==(s=e.bodyLengthChecker)?void 0:s.call(e,a.body))??1/0)>=e.expectContinueHeader}catch(l){}else t=!!e.expectContinueHeader;t&&(a.headers.Expect="100-continue")}return t({...r,request:a})}}(e),Ur)}}),Fr="WHEN_SUPPORTED",$r="WHEN_REQUIRED",Vr=Fr,Gr="WHEN_SUPPORTED",Wr="WHEN_REQUIRED",Kr=Fr;var Xr,Qr,Yr,Jr;(Qr=Xr||(Xr={})).MD5="MD5",Qr.CRC32="CRC32",Qr.CRC32C="CRC32C",Qr.CRC64NVME="CRC64NVME",Qr.SHA1="SHA1",Qr.SHA256="SHA256",(Jr=Yr||(Yr={})).HEADER="header",Jr.TRAILER="trailer";const Zr=Xr.CRC32;function en(e,t,r){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=r}const tn=e=>{var t,r;return qr.isInstance(e)?(null==(t=e.headers)?void 0:t.date)??(null==(r=e.headers)?void 0:r.Date):void 0},rn=e=>new Date(Date.now()+e),nn=(e,t)=>{const r=Date.parse(e);return((e,t)=>Math.abs(rn(t).getTime()-e)>=3e5)(r,t)?r-Date.now():t},on=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},sn=async e=>{var t,r,n;const i=on("context",e.context),o=on("config",e.config),s=null==(n=null==(r=null==(t=i.endpointV2)?void 0:t.properties)?void 0:r.authSchemes)?void 0:n[0],a=on("signer",o.signer);return{config:o,signer:await a(s),signingRegion:null==e?void 0:e.signingRegion,signingRegionSet:null==e?void 0:e.signingRegionSet,signingName:null==e?void 0:e.signingName}};class an{async sign(e,t,r){var n;if(!Lr.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await sn(r),{config:o,signer:s}=i;let{signingRegion:a,signingName:l}=i;const c=r.context;if(null==(n=null==c?void 0:c.authSchemes)?void 0:n.length){const[e,t]=c.authSchemes;"sigv4a"===(null==e?void 0:e.name)&&"sigv4"===(null==t?void 0:t.name)&&(a=(null==t?void 0:t.signingRegion)??a,l=(null==t?void 0:t.signingName)??l)}return await s.sign(e,{signingDate:rn(o.systemClockOffset),signingRegion:a,signingService:l})}errorHandler(e){return t=>{const r=t.ServerTime??tn(t.$response);if(r){const n=on("config",e.config),i=n.systemClockOffset;n.systemClockOffset=nn(r,n.systemClockOffset);n.systemClockOffset!==i&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const r=tn(e);if(r){const e=on("config",t.config);e.systemClockOffset=nn(r,e.systemClockOffset)}}}class ln extends an{async sign(e,t,r){var n;if(!Lr.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:i,signer:o,signingRegion:s,signingRegionSet:a,signingName:l}=await sn(r),c=(await(null==(n=i.sigv4aSigningRegionSet)?void 0:n.call(i))??a??[s]).join(",");return await o.sign(e,{signingDate:rn(i.systemClockOffset),signingRegion:c,signingService:l})}}const cn=e=>e[Br]||(e[Br]={}),un=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};const pn=(e,t)=>(r,n)=>async i=>{var o;const s=((e,t)=>{if(!t||0===t.length)return e;const r=[];for(const n of t)for(const t of e)t.schemeId.split("#")[1]===n&&r.push(t);for(const n of e)r.find(({schemeId:e})=>e===n.schemeId)||r.push(n);return r})(e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,n,i.input)),e.authSchemePreference?await e.authSchemePreference():[]),a=function(e){const t=new Map;for(const r of e)t.set(r.schemeId,r);return t}(e.httpAuthSchemes),l=cn(n),c=[];for(const r of s){const i=a.get(r.schemeId);if(!i){c.push(`HttpAuthScheme \`${r.schemeId}\` was not enabled for this service.`);continue}const s=i.identityProvider(await t.identityProviderConfigProvider(e));if(!s){c.push(`HttpAuthScheme \`${r.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:u={},signingProperties:p={}}=(null==(o=r.propertiesExtractor)?void 0:o.call(r,e,n))||{};r.identityProperties=Object.assign(r.identityProperties||{},u),r.signingProperties=Object.assign(r.signingProperties||{},p),l.selectedHttpAuthScheme={httpAuthOption:r,identity:await s(r.identityProperties),signer:i.signer};break}if(!l.selectedHttpAuthScheme)throw new Error(c.join("\n"));return r(i)},dn={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},mn=e=>e=>{throw e},fn=(e,t)=>{},hn={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},yn=e=>({applyToStack:e=>{e.addRelativeTo((e,t)=>async r=>{if(!Lr.isInstance(r.request))return e(r);const n=cn(t).selectedHttpAuthScheme;if(!n)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:i={}},identity:o,signer:s}=n,a=await e({...r,request:await s.sign(r.request,o,i)}).catch((s.errorHandler||mn)(i));return(s.successHandler||fn)(a.response,i),a},hn)}}),gn=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},bn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",vn=Object.entries(bn).reduce((e,[t,r])=>(e[r]=Number(t),e),{}),xn=bn.split(""),wn=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;const r=new ArrayBuffer(t),n=new DataView(r);for(let i=0;i<e.length;i+=4){let t=0,r=0;for(let n=i,a=i+3;n<=a;n++)if("="!==e[n]){if(!(e[n]in vn))throw new TypeError(`Invalid character ${e[n]} in base64 string.`);t|=vn[e[n]]<<6*(a-n),r+=6}else t>>=6;const o=i/4*3;t>>=r%8;const s=Math.floor(r/8);for(let e=0;e<s;e++){const r=8*(s-e-1);n.setUint8(o+e,(t&255<<r)>>r)}}return new Uint8Array(r)},Sn=e=>(new TextEncoder).encode(e),Nn=e=>"string"==typeof e?Sn(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),jn=e=>{if("string"==typeof e)return e;if("object"!=typeof e||"number"!=typeof e.byteOffset||"number"!=typeof e.byteLength)throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};function En(e){let t;t="string"==typeof e?Sn(e):e;const r="object"==typeof t&&"number"==typeof t.length,n="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!r&&!n)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let o=0;o<t.length;o+=3){let e=0,r=0;for(let i=o,s=Math.min(o+3,t.length);i<s;i++)e|=t[i]<<8*(s-i-1),r+=8;const n=Math.ceil(r/6);e<<=6*n-r;for(let t=1;t<=n;t++){const r=6*(n-t);i+=xn[(e&63<<r)>>r]}i+="==".slice(0,4-n)}return i}class Cn extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return"base64"===t?Cn.mutate(wn(e)):Cn.mutate(Sn(e));throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,Cn.prototype),e}transformToString(e="utf-8"){return"base64"===e?En(this):jn(this)}}const kn="function"==typeof ReadableStream?ReadableStream:function(){};class Tn extends kn{}const Rn=e=>{var t;return"function"==typeof ReadableStream&&((null==(t=null==e?void 0:e.constructor)?void 0:t.name)===ReadableStream.name||e instanceof ReadableStream)},On=({expectedChecksum:e,checksum:t,source:r,checksumSourceLocation:n,base64Encoder:i})=>{var o;if(!Rn(r))throw new Error(`@smithy/util-stream: unsupported source type ${(null==(o=null==r?void 0:r.constructor)?void 0:o.name)??r} in ChecksumStream.`);const s=i??En;if("function"!=typeof TransformStream)throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");const a=new TransformStream({start(){},async transform(e,r){t.update(e),r.enqueue(e)},async flush(r){const i=await t.digest(),o=s(i);if(e!==o){const t=new Error(`Checksum mismatch: expected "${e}" but received "${o}" in response header "${n}".`);r.error(t)}else r.terminate()}});r.pipeThrough(a);const l=a.readable;return Object.setPrototypeOf(l,Tn.prototype),l};class Pn{constructor(e){r(this,"allocByteArray"),r(this,"byteLength",0),r(this,"byteArrays",[]),this.allocByteArray=e}push(e){this.byteArrays.push(e),this.byteLength+=e.byteLength}flush(){if(1===this.byteArrays.length){const e=this.byteArrays[0];return this.reset(),e}const e=this.allocByteArray(this.byteLength);let t=0;for(let r=0;r<this.byteArrays.length;++r){const n=this.byteArrays[r];e.set(n,t),t+=n.byteLength}return this.reset(),e}reset(){this.byteArrays=[],this.byteLength=0}}const _n=function(e,t,r){const n=e.getReader();let i=!1,o=0;const s=["",new Pn(e=>new Uint8Array(e))];let a=-1;const l=async e=>{const{value:c,done:u}=await n.read(),p=c;if(u){if(-1!==a){const t=An(s,a);In(t)>0&&e.enqueue(t)}e.close()}else{const n=function(e,t=!0){if(t&&"undefined"!=typeof Buffer&&e instanceof Buffer)return 2;if(e instanceof Uint8Array)return 1;if("string"==typeof e)return 0;return-1}(p,!1);if(a!==n&&(a>=0&&e.enqueue(An(s,a)),a=n),-1===a)return void e.enqueue(p);const c=In(p);o+=c;const u=In(s[a]);if(c>=t&&0===u)e.enqueue(p);else{const n=function(e,t,r){switch(t){case 0:return e[0]+=r,In(e[0]);case 1:case 2:return e[t].push(r),In(e[t])}}(s,a,p);!i&&o>2*t&&(i=!0,null==r||r.warn(`@smithy/util-stream - stream chunk size ${c} is below threshold of ${t}, automatically buffering.`)),n>=t?e.enqueue(An(s,a)):await l(e)}}};return new ReadableStream({pull:l})};function An(e,t){switch(t){case 0:const r=e[0];return e[0]="",r;case 1:case 2:return e[t].flush()}throw new Error(`@smithy/util-stream - invalid index ${t} given to flush()`)}function In(e){return(null==e?void 0:e.byteLength)??(null==e?void 0:e.length)??0}const Mn=(e,t)=>{const{base64Encoder:r,bodyLengthChecker:n,checksumAlgorithmFn:i,checksumLocationName:o,streamHasher:s}=t,a=void 0!==r&&void 0!==n&&void 0!==i&&void 0!==o&&void 0!==s,l=a?s(i,e):void 0,c=e.getReader();return new ReadableStream({async pull(e){const{value:t,done:i}=await c.read();if(i){if(e.enqueue("0\r\n"),a){const t=r(await l);e.enqueue(`${o}:${t}\r\n`),e.enqueue("\r\n")}e.close()}else e.enqueue(`${(n(t)||0).toString(16)}\r\n${t}\r\n`)}})};const Dn=e=>encodeURIComponent(e).replace(/[!'()*]/g,zn),zn=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function Bn(e,t){return new Request(e,t)}function Ln(e=0){return new Promise((t,r)=>{e&&setTimeout(()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",r(t)},e)})}const qn={supported:void 0};class Un{constructor(e){r(this,"config"),r(this,"configProvider"),"function"==typeof e?this.configProvider=e().then(e=>e||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===qn.supported&&(qn.supported=Boolean("undefined"!=typeof Request&&"keepalive"in Bn("https://[::1]")))}static create(e){return"function"==typeof(null==e?void 0:e.handle)?e:new Un(e)}destroy(){}async handle(e,{abortSignal:t,requestTimeout:r}={}){var n;this.config||(this.config=await this.configProvider);const i=r??this.config.requestTimeout,o=!0===this.config.keepAlive,s=this.config.credentials;if(null==t?void 0:t.aborted){const e=Hn(t);return Promise.reject(e)}let a=e.path;const l=function(e){const t=[];for(let r of Object.keys(e).sort()){const n=e[r];if(r=Dn(r),Array.isArray(n))for(let e=0,i=n.length;e<i;e++)t.push(`${r}=${Dn(n[e])}`);else{let e=r;(n||"string"==typeof n)&&(e+=`=${Dn(n)}`),t.push(e)}}return t.join("&")}(e.query||{});l&&(a+=`?${l}`),e.fragment&&(a+=`#${e.fragment}`);let c="";if(null!=e.username||null!=e.password){c=`${e.username??""}:${e.password??""}@`}const{port:u,method:p}=e,d=`${e.protocol}//${c}${e.hostname}${u?`:${u}`:""}${a}`,m="GET"===p||"HEAD"===p?void 0:e.body,f={body:m,headers:new Headers(e.headers),method:p,credentials:s};(null==(n=this.config)?void 0:n.cache)&&(f.cache=this.config.cache),m&&(f.duplex="half"),"undefined"!=typeof AbortController&&(f.signal=t),qn.supported&&(f.keepalive=o),"function"==typeof this.config.requestInit&&Object.assign(f,this.config.requestInit(e));let h=()=>{};const y=Bn(d,f),g=[fetch(y).then(e=>{const t=e.headers,r={};for(const n of t.entries())r[n[0]]=n[1];return null!=e.body?{response:new qr({headers:r,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then(t=>({response:new qr({headers:r,reason:e.statusText,statusCode:e.status,body:t})}))}),Ln(i)];return t&&g.push(new Promise((e,r)=>{const n=()=>{const e=Hn(t);r(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",n,{once:!0}),h=()=>e.removeEventListener("abort",n)}else t.onabort=n})),Promise.race(g).finally(h)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then(r=>(r[e]=t,r))}httpHandlerConfigs(){return this.config??{}}}function Hn(e){const t=e&&"object"==typeof e&&"reason"in e?e.reason:void 0;if(t){if(t instanceof Error){const e=new Error("Request aborted");return e.name="AbortError",e.cause=t,e}const e=new Error(String(t));return e.name="AbortError",e}const r=new Error("Request aborted");return r.name="AbortError",r}const Fn=async e=>{var t;return"function"==typeof Blob&&e instanceof Blob||"Blob"===(null==(t=e.constructor)?void 0:t.name)?void 0!==Blob.prototype.arrayBuffer?new Uint8Array(await e.arrayBuffer()):async function(e){const t=await function(e){return new Promise((t,r)=>{const n=new FileReader;n.onloadend=()=>{if(2!==n.readyState)return r(new Error("Reader aborted too early"));const e=n.result??"",i=e.indexOf(","),o=i>-1?i+1:e.length;t(e.substring(o))},n.onabort=()=>r(new Error("Read aborted")),n.onerror=()=>r(n.error),n.readAsDataURL(e)})}(e),r=wn(t);return new Uint8Array(r)}(e):async function(e){const t=[],r=e.getReader();let n=!1,i=0;for(;!n;){const{done:e,value:o}=await r.read();o&&(t.push(o),i+=o.length),n=e}const o=new Uint8Array(i);let s=0;for(const a of t)o.set(a,s),s+=a.length;return o}(e)};const $n={},Vn={};for(let qs=0;qs<256;qs++){let e=qs.toString(16).toLowerCase();1===e.length&&(e=`0${e}`),$n[qs]=e,Vn[e]=qs}function Gn(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let r=0;r<e.length;r+=2){const n=e.slice(r,r+2).toLowerCase();if(!(n in Vn))throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`);t[r/2]=Vn[n]}return t}function Wn(e){let t="";for(let r=0;r<e.byteLength;r++)t+=$n[e[r]];return t}const Kn="The stream has already been transformed.",Xn=e=>{var t,r;if(!Qn(e)&&!Rn(e)){const n=(null==(r=null==(t=null==e?void 0:e.__proto__)?void 0:t.constructor)?void 0:r.name)||e;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${n}`)}let n=!1;const i=async()=>{if(n)throw new Error(Kn);return n=!0,await Fn(e)};return Object.assign(e,{transformToByteArray:i,transformToString:async e=>{const t=await i();if("base64"===e)return En(t);if("hex"===e)return Wn(t);if(void 0===e||"utf8"===e||"utf-8"===e)return jn(t);if("function"==typeof TextDecoder)return new TextDecoder(e).decode(t);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(n)throw new Error(Kn);if(n=!0,Qn(e))return(e=>{if("function"!=typeof e.stream)throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return e.stream()})(e);if(Rn(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},Qn=e=>"function"==typeof Blob&&e instanceof Blob;const Yn=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return Cn.mutate(e);if(!e)return Cn.mutate(new Uint8Array);const r=t.streamCollector(e);return Cn.mutate(await r)};function Jn(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}const Zn=e=>"function"==typeof e?e():e,ei=(e,t,r,n,i)=>({name:t,namespace:e,traits:r,input:n,output:i}),ti=(e,t)=>(t.find(([t])=>t.match(e))||[void 0,void 0])[1];const ri=e=>{if("string"==typeof e)return ri(new URL(e));const{hostname:t,pathname:r,port:n,protocol:i,search:o}=e;let s;return o&&(s=function(e){const t={};if(e=e.replace(/^\?/,""))for(const r of e.split("&")){let[e,n=null]=r.split("=");e=decodeURIComponent(e),n&&(n=decodeURIComponent(n)),e in t?Array.isArray(t[e])?t[e].push(n):t[e]=[t[e],n]:t[e]=n}return t}(o)),{hostname:t,port:n?parseInt(n):void 0,protocol:i,path:r,query:s}},ni=e=>(t,r)=>async n=>{const{operationSchema:i}=cn(r),[,o,s,a,l,c]=i??[],u=r.endpointV2?async()=>(e=>{if("object"==typeof e){if("url"in e){const t=ri(e.url);if(e.headers){t.headers={};for(const[r,n]of Object.entries(e.headers))t.headers[r.toLowerCase()]=n.join(", ")}return t}return e}return ri(e)})(r.endpointV2):e.endpoint,p=await e.protocol.serializeRequest(ei(o,s,a,l,c),n.input,{...e,...r,endpoint:u});return t({...n,request:p})},ii={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},oi={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function si(e){return{applyToStack:t=>{t.add(ni(e),oi),t.add((e=>(t,r)=>async n=>{var i,o,s,a;const{response:l}=await t(n),{operationSchema:c}=cn(r),[,u,p,d,m,f]=c??[];try{return{response:l,output:await e.protocol.deserializeResponse(ei(u,p,d,m,f),{...e,...r},l)}}catch(h){if(Object.defineProperty(h,"$response",{value:l,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in h)){const e="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{h.message+="\n "+e}catch(y){r.logger&&"NoOpLogger"!==(null==(o=null==(i=r.logger)?void 0:i.constructor)?void 0:o.name)&&(null==(a=null==(s=r.logger)?void 0:s.warn)||a.call(s,e))}void 0!==h.$responseBodyText&&h.$response&&(h.$response.body=h.$responseBodyText);try{if(qr.isInstance(l)){const{headers:e={}}=l,t=Object.entries(e);h.$metadata={httpStatusCode:l.statusCode,requestId:ti(/^x-[\w-]+-request-?id$/,t),extendedRequestId:ti(/^x-[\w-]+-id-2$/,t),cfId:ti(/^x-[\w-]+-cf-id$/,t)}}}catch(y){}}throw h}})(e),ii),e.protocol.setSerdeContext(e)}}}const ai=[];function li(e){if("object"==typeof e)return e;if(ai[e|=0])return ai[e];const t={};let r=0;for(const n of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])1==(e>>r++&1)&&(t[n]=1);return ai[e]=t}const ci=Symbol.for("@smithy/nor-struct-it"),ui=Symbol.for("@smithy/ns"),pi=[],di={},mi=class e{constructor(t,n){r(this,"ref"),r(this,"memberName"),r(this,"symbol",e.symbol),r(this,"name"),r(this,"schema"),r(this,"_isMemberSchema"),r(this,"traits"),r(this,"memberTraits"),r(this,"normalizedTraits"),this.ref=t,this.memberName=n;const i=[];let o=t,s=t;for(this._isMemberSchema=!1;yi(o);)i.push(o[1]),o=o[0],s=Zn(o),this._isMemberSchema=!0;if(i.length>0){this.memberTraits={};for(let e=i.length-1;e>=0;--e){const t=i[e];Object.assign(this.memberTraits,li(t))}}else this.memberTraits=0;if(s instanceof e){const e=this.memberTraits;return Object.assign(this,s),this.memberTraits=Object.assign({},e,s.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,void(this.memberName=n??s.memberName)}if(this.schema=Zn(s),gi(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(s),this.traits=0),this._isMemberSchema&&!n)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](e){const t=this.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===this.symbol}return t}static of(t){const r="function"==typeof t||"object"==typeof t&&null!==t;if("number"==typeof t){if(pi[t])return pi[t]}else if("string"==typeof t){if(di[t])return di[t]}else if(r&&t[ui])return t[ui];const n=Zn(t);if(n instanceof e)return n;if(yi(n)){const[r,i]=n;if(r instanceof e)return Object.assign(r.getMergedTraits(),li(i)),r;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(t,null,2)}.`)}const i=new e(n);return r?t[ui]=i:"string"==typeof n?di[n]=i:"number"==typeof n?pi[n]=i:i}getSchema(){const e=this.schema;return Array.isArray(e)&&0===e[0]?e[4]:e}getName(e=!1){const{name:t}=this;return!e&&t&&t.includes("#")?t.split("#")[1]:t||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){const e=this.getSchema();return"number"==typeof e?e>=64&&e<128:1===e[0]}isMapSchema(){const e=this.getSchema();return"number"==typeof e?e>=128&&e<=255:2===e[0]}isStructSchema(){const e=this.getSchema();if("object"!=typeof e)return!1;const t=e[0];return 3===t||-3===t||4===t}isUnionSchema(){const e=this.getSchema();return"object"==typeof e&&4===e[0]}isBlobSchema(){const e=this.getSchema();return 21===e||42===e}isTimestampSchema(){const e=this.getSchema();return"number"==typeof e&&e>=4&&e<=7}isUnitSchema(){return"unit"===this.getSchema()}isDocumentSchema(){return 15===this.getSchema()}isStringSchema(){return 0===this.getSchema()}isBooleanSchema(){return 2===this.getSchema()}isNumericSchema(){return 1===this.getSchema()}isBigIntegerSchema(){return 17===this.getSchema()}isBigDecimalSchema(){return 19===this.getSchema()}isStreaming(){const{streaming:e}=this.getMergedTraits();return!!e||42===this.getSchema()}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return li(this.memberTraits)}getOwnTraits(){return li(this.traits)}getKeySchema(){const[e,t]=[this.isDocumentSchema(),this.isMapSchema()];if(!e&&!t)throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);const r=this.getSchema();return hi([e?15:r[4]??0,0],"key")}getValueSchema(){const e=this.getSchema(),[t,r,n]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],i="number"==typeof e?63&e:e&&"object"==typeof e&&(r||n)?e[3+e[0]]:t?15:void 0;if(null!=i)return hi([i,0],r?"value":"member");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(e){const t=this.getSchema();if(this.isStructSchema()&&t[4].includes(e)){const r=t[4].indexOf(e),n=t[5][r];return hi(yi(n)?n:[n,0],e)}if(this.isDocumentSchema())return hi([15,0],e);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no member=${e}.`)}getMemberSchemas(){const e={};try{for(const[t,r]of this.structIterator())e[t]=r}catch(t){}return e}getEventStreamMember(){if(this.isStructSchema())for(const[e,t]of this.structIterator())if(t.isStreaming()&&t.isStructSchema())return e;return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");const e=this.getSchema(),t=e[4].length;let r=e[ci];if(r&&t===r.length)yield*r;else{r=Array(t);for(let n=0;n<t;++n){const t=e[4][n],i=hi([e[5][n],0],t);yield r[n]=[t,i]}e[ci]=r}}};r(mi,"symbol",Symbol.for("@smithy/nor"));let fi=mi;function hi(e,t){if(e instanceof fi)return Object.assign(e,{memberName:t,_isMemberSchema:!0});return new fi(e,t)}const yi=e=>Array.isArray(e)&&2===e.length,gi=e=>Array.isArray(e)&&e.length>=5,bi=class e{constructor(e,t=new Map,n=new Map){r(this,"namespace"),r(this,"schemas"),r(this,"exceptions"),this.namespace=e,this.schemas=t,this.exceptions=n}static for(t){return e.registries.has(t)||e.registries.set(t,new e(t)),e.registries.get(t)}copyFrom(e){const{schemas:t,exceptions:r}=this;for(const[n,i]of e.schemas)t.has(n)||t.set(n,i);for(const[n,i]of e.exceptions)r.has(n)||r.set(n,i)}register(t,r){const n=this.normalizeShapeId(t);for(const i of[this,e.for(n.split("#")[0])])i.schemas.set(n,r)}getSchema(e){const t=this.normalizeShapeId(e);if(!this.schemas.has(t))throw new Error(`@smithy/core/schema - schema not found for ${t}`);return this.schemas.get(t)}registerError(t,r){const n=t,i=n[1];for(const o of[this,e.for(i)])o.schemas.set(i+"#"+n[2],n),o.exceptions.set(n,r)}getErrorCtor(t){const r=t;if(this.exceptions.has(r))return this.exceptions.get(r);return e.for(r[1]).exceptions.get(r)}getBaseException(){for(const e of this.exceptions.keys())if(Array.isArray(e)){const[,t,r]=e,n=t+"#"+r;if(n.startsWith("smithy.ts.sdk.synthetic.")&&n.endsWith("ServiceException"))return e}}find(e){return[...this.schemas.values()].find(e)}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(e){return e.includes("#")?e:this.namespace+"#"+e}};r(bi,"registries",new Map);let vi=bi;const xi=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wi=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Si(e){const t=e.getUTCFullYear(),r=e.getUTCMonth(),n=e.getUTCDay(),i=e.getUTCDate(),o=e.getUTCHours(),s=e.getUTCMinutes(),a=e.getUTCSeconds();return`${xi[n]}, ${i<10?`0${i}`:`${i}`} ${wi[r]} ${t} ${o<10?`0${o}`:`${o}`}:${s<10?`0${s}`:`${s}`}:${a<10?`0${a}`:`${a}`} GMT`}const Ni="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ji=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0")),Ei=()=>{if(Ni)return Ni();const e=new Uint8Array(16);return crypto.getRandomValues(e),e[6]=15&e[6]|64,e[8]=63&e[8]|128,ji[e[0]]+ji[e[1]]+ji[e[2]]+ji[e[3]]+"-"+ji[e[4]]+ji[e[5]]+"-"+ji[e[6]]+ji[e[7]]+"-"+ji[e[8]]+ji[e[9]]+"-"+ji[e[10]]+ji[e[11]]+ji[e[12]]+ji[e[13]]+ji[e[14]]+ji[e[15]]},Ci=function(e){return Object.assign(new String(e),{deserializeJSON:()=>JSON.parse(String(e)),toString:()=>String(e),toJSON:()=>String(e)})};function ki(e){return(e.includes(",")||e.includes('"'))&&(e=`"${e.replace(/"/g,'\\"')}"`),e}Ci.from=e=>e&&"object"==typeof e&&(e instanceof Ci||"deserializeJSON"in e)?e:"string"==typeof e||Object.getPrototypeOf(e)===String.prototype?Ci(String(e)):Ci(JSON.stringify(e)),Ci.fromObject=Ci.from;const Ti="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",Ri="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",Oi="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",Pi="(\\d?\\d)",_i="(\\d{4})",Ai=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),Ii=new RegExp(`^${Ti}, ${Pi} ${Ri} ${_i} ${Oi} GMT$`),Mi=new RegExp(`^${Ti}, ${Pi}-${Ri}-(\\d\\d) ${Oi} GMT$`),Di=new RegExp(`^${Ti} ${Ri} ( [1-9]|\\d\\d) ${Oi} ${_i}$`),zi=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Bi(e,t,r){const n=Number(e);if(n<t||n>r)throw new Error(`Value ${n} out of range [${t}, ${r}]`)}function Li(e,t,r){if(!Number.isInteger(r))throw new Error("Invalid number of delimiters ("+r+") for splitEvery.");const n=e.split(t),i=[];let o="";for(let s=0;s<n.length;s++)""===o?o=n[s]:o+=t+n[s],(s+1)%r===0&&(i.push(o),o="");return""!==o&&i.push(o),i}const qi=e=>{const t=e.length,r=[];let n,i=!1,o=0;for(let s=0;s<t;++s){const t=e[s];switch(t){case'"':"\\"!==n&&(i=!i);break;case",":i||(r.push(e.slice(o,s)),o=s+1)}n=t}return r.push(e.slice(o)),r.map(e=>{const t=(e=e.trim()).length;return t<2?e:('"'===e[0]&&'"'===e[t-1]&&(e=e.slice(1,t-1)),e.replace(/\\"/g,'"'))})},Ui=/^-?\d*(\.\d+)?$/;class Hi{constructor(e,t){if(r(this,"string"),r(this,"type"),this.string=e,this.type=t,!Ui.test(e))throw new Error('@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".')}toString(){return this.string}static[Symbol.hasInstance](e){if(!e||"object"!=typeof e)return!1;const t=e;return Hi.prototype.isPrototypeOf(e)||"bigDecimal"===t.type&&Ui.test(t.string)}}class Fi{constructor(){r(this,"serdeContext")}setSerdeContext(e){this.serdeContext=e}}class $i extends Fi{constructor(e){super(),r(this,"options"),r(this,"compositeErrorRegistry"),this.options=e,this.compositeErrorRegistry=vi.for(e.defaultNamespace);for(const t of e.errorTypeRegistries??[])this.compositeErrorRegistry.copyFrom(t)}getRequestType(){return Lr}getResponseType(){return qr}setSerdeContext(e){this.serdeContext=e,this.serializer.setSerdeContext(e),this.deserializer.setSerdeContext(e),this.getPayloadCodec()&&this.getPayloadCodec().setSerdeContext(e)}updateServiceEndpoint(e,t){if("url"in t){e.protocol=t.url.protocol,e.hostname=t.url.hostname,e.port=t.url.port?Number(t.url.port):void 0,e.path=t.url.pathname,e.fragment=t.url.hash||void 0,e.username=t.url.username||void 0,e.password=t.url.password||void 0,e.query||(e.query={});for(const[r,n]of t.url.searchParams.entries())e.query[r]=n;if(t.headers)for(const[r,n]of Object.entries(t.headers))e.headers[r]=n.join(", ");return e}if(e.protocol=t.protocol,e.hostname=t.hostname,e.port=t.port?Number(t.port):void 0,e.path=t.path,e.query={...t.query},t.headers)for(const[r,n]of Object.entries(t.headers))e.headers[r]=n;return e}setHostPrefix(e,t,r){var n,i;if(null==(n=this.serdeContext)?void 0:n.disableHostPrefix)return;const o=fi.of(t.input),s=li(t.traits??{});if(s.endpoint){let t=null==(i=s.endpoint)?void 0:i[0];if("string"==typeof t){const n=[...o.structIterator()].filter(([,e])=>e.getMergedTraits().hostLabel);for(const[e]of n){const n=r[e];if("string"!=typeof n)throw new Error(`@smithy/core/schema - ${e} in input must be a string as hostLabel.`);t=t.replace(`{${e}}`,n)}e.hostname=t+e.hostname}}}deserializeMetadata(e){return{httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}}async serializeEventStream({eventStream:e,requestSchema:t,initialRequest:r}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:e,requestSchema:t,initialRequest:r})}async deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:r}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:r})}async loadEventStreamCapability(){const{EventStreamSerde:e}=await Promise.resolve().then(()=>iP);return new e({marshaller:this.getEventStreamMarshaller(),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType()})}getDefaultContentType(){throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(e,t,r,n,i){return[]}getEventStreamMarshaller(){const e=this.serdeContext;if(!e.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return e.eventStreamMarshaller}}class Vi extends $i{async serializeRequest(e,t,r){const n={...t??{}},i=this.serializer,o={},s={},a=await r.endpoint(),l=fi.of(null==e?void 0:e.input),c=[],u=[];let p,d=!1;const m=new Lr({protocol:"",hostname:"",port:void 0,path:"",fragment:void 0,query:o,headers:s,body:void 0});if(a){this.updateServiceEndpoint(m,a),this.setHostPrefix(m,e,n);const t=li(e.traits);if(t.http){m.method=t.http[0];const[e,r]=t.http[1].split("?");"/"==m.path?m.path=e:m.path+=e;const n=new URLSearchParams(r??"");Object.assign(o,Object.fromEntries(n))}}for(const[f,h]of l.structIterator()){const e=h.getMergedTraits()??{},t=n[f];if(null!=t||h.isIdempotencyToken())if(e.httpPayload){if(h.isStreaming()){h.isStructSchema()?n[f]&&(p=await this.serializeEventStream({eventStream:n[f],requestSchema:l})):p=t}else i.write(h,t),p=i.flush();delete n[f]}else if(e.httpLabel){i.write(h,t);const e=i.flush();m.path.includes(`{${f}+}`)?m.path=m.path.replace(`{${f}+}`,e.split("/").map(Jn).join("/")):m.path.includes(`{${f}}`)&&(m.path=m.path.replace(`{${f}}`,Jn(e))),delete n[f]}else if(e.httpHeader)i.write(h,t),s[e.httpHeader.toLowerCase()]=String(i.flush()),delete n[f];else if("string"==typeof e.httpPrefixHeaders){for(const[r,n]of Object.entries(t)){const t=e.httpPrefixHeaders+r;i.write([h.getValueSchema(),{httpHeader:t}],n),s[t.toLowerCase()]=i.flush()}delete n[f]}else e.httpQuery||e.httpQueryParams?(this.serializeQuery(h,t,o),delete n[f]):(d=!0,c.push(f),u.push(h));else if(e.httpLabel&&(m.path.includes(`{${f}+}`)||m.path.includes(`{${f}}`)))throw new Error(`No value provided for input HTTP label: ${f}.`)}if(d&&n){const[e,t]=(l.getName(!0)??"#Unknown").split("#"),r=l.getSchema()[6],o=[3,e,t,l.getMergedTraits(),c,u,void 0];r?o[6]=r:o.pop(),i.write(o,n),p=i.flush()}return m.headers=s,m.query=o,m.body=p,m}serializeQuery(e,t,r){const n=this.serializer,i=e.getMergedTraits();if(i.httpQueryParams){for(const[o,s]of Object.entries(t))if(!(o in r)){const t=e.getValueSchema();Object.assign(t.getMergedTraits(),{...i,httpQuery:o,httpQueryParams:void 0}),this.serializeQuery(t,s,r)}}else if(e.isListSchema()){const o=!!e.getMergedTraits().sparse,s=[];for(const r of t){n.write([e.getValueSchema(),i],r);const t=n.flush();(o||void 0!==t)&&s.push(t)}r[i.httpQuery]=s}else n.write([e,i],t),r[i.httpQuery]=n.flush()}async deserializeResponse(e,t,r){const n=this.deserializer,i=fi.of(e.output),o={};if(r.statusCode>=300){const i=await Yn(r.body,t);throw i.byteLength>0&&Object.assign(o,await n.read(15,i)),await this.handleError(e,t,r,o,this.deserializeMetadata(r)),new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.")}for(const a in r.headers){const e=r.headers[a];delete r.headers[a],r.headers[a.toLowerCase()]=e}const s=await this.deserializeHttpMessage(i,t,r,o);if(s.length){const e=await Yn(r.body,t);if(e.byteLength>0){const t=await n.read(i,e);for(const e of s)null!=t[e]&&(o[e]=t[e])}}else s.discardResponseBody&&await Yn(r.body,t);return o.$metadata=this.deserializeMetadata(r),o}async deserializeHttpMessage(e,t,r,n,i){let o;o=n instanceof Set?i:n;let s=!0;const a=this.deserializer,l=fi.of(e),c=[];for(const[u,p]of l.structIterator()){const e=p.getMemberTraits();if(e.httpPayload){s=!1;if(p.isStreaming()){const e=p.isStructSchema();o[u]=e?await this.deserializeEventStream({response:r,responseSchema:l}):Xn(r.body)}else if(r.body){const e=await Yn(r.body,t);e.byteLength>0&&(o[u]=await a.read(p,e))}}else if(e.httpHeader){const t=String(e.httpHeader).toLowerCase(),n=r.headers[t];if(null!=n)if(p.isListSchema()){const e=p.getValueSchema();let r;e.getMergedTraits().httpHeader=t,r=e.isTimestampSchema()&&4===e.getSchema()?Li(n,",",2):qi(n);const i=[];for(const t of r)i.push(await a.read(e,t.trim()));o[u]=i}else o[u]=await a.read(p,n)}else if(void 0!==e.httpPrefixHeaders){o[u]={};for(const[t,n]of Object.entries(r.headers))if(t.startsWith(e.httpPrefixHeaders)){const r=p.getValueSchema();r.getMergedTraits().httpHeader=t,o[u][t.slice(e.httpPrefixHeaders.length)]=await a.read(r,n)}}else e.httpResponseCode?o[u]=r.statusCode:c.push(u)}return c.discardResponseBody=s,c}}function Gi(e,t){if(t.timestampFormat.useTrait&&e.isTimestampSchema()&&(5===e.getSchema()||6===e.getSchema()||7===e.getSchema()))return e.getSchema();const{httpLabel:r,httpPrefixHeaders:n,httpHeader:i,httpQuery:o}=e.getMergedTraits();return(t.httpBindings?"string"==typeof n||Boolean(i)?6:Boolean(o)||Boolean(r)?5:void 0:void 0)??t.timestampFormat.default}class Wi extends Fi{constructor(e){super(),r(this,"settings"),this.settings=e}read(e,t){var r;const n=fi.of(e);if(n.isListSchema())return qi(t).map(e=>this.read(n.getValueSchema(),e));if(n.isBlobSchema())return((null==(r=this.serdeContext)?void 0:r.base64Decoder)??wn)(t);if(n.isTimestampSchema()){switch(Gi(n,this.settings)){case 5:return(e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC3339 timestamps must be strings");const t=Ai.exec(e);if(!t)throw new TypeError(`Invalid RFC3339 timestamp format ${e}`);const[,r,n,i,o,s,a,,l,c]=t;Bi(n,1,12),Bi(i,1,31),Bi(o,0,23),Bi(s,0,59),Bi(a,0,60);const u=new Date(Date.UTC(Number(r),Number(n)-1,Number(i),Number(o),Number(s),Number(a),Number(l)?Math.round(1e3*parseFloat(`0.${l}`)):0));if(u.setUTCFullYear(Number(r)),"Z"!=c.toUpperCase()){const[,e,t,r]=/([+-])(\d\d):(\d\d)/.exec(c)||[void 0,"+",0,0],n="-"===e?1:-1;u.setTime(u.getTime()+n*(60*Number(t)*60*1e3+60*Number(r)*1e3))}return u})(t);case 6:return(e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC7231 timestamps must be strings.");let t,r,n,i,o,s,a,l;if((l=Ii.exec(e))?[,t,r,n,i,o,s,a]=l:(l=Mi.exec(e))?([,t,r,n,i,o,s,a]=l,n=(Number(n)+1900).toString()):(l=Di.exec(e))&&([,r,t,i,o,s,a,n]=l),n&&s){const e=Date.UTC(Number(n),zi.indexOf(r),Number(t),Number(i),Number(o),Number(s),a?Math.round(1e3*parseFloat(`0.${a}`)):0);Bi(t,1,31),Bi(i,0,23),Bi(o,0,59),Bi(s,0,60);const l=new Date(e);return l.setUTCFullYear(Number(n)),l}throw new TypeError(`Invalid RFC7231 date-time value ${e}.`)})(t);case 7:return(e=>{if(null==e)return;let t=NaN;if("number"==typeof e)t=e;else if("string"==typeof e){if(!/^-?\d*\.?\d+$/.test(e))throw new TypeError("parseEpochTimestamp - numeric string invalid.");t=Number.parseFloat(e)}else"object"==typeof e&&1===e.tag&&(t=e.value);if(isNaN(t)||Math.abs(t)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(1e3*t))})(t);default:return new Date(t)}}if(n.isStringSchema()){const e=n.getMergedTraits().mediaType;let r=t;if(e){n.getMergedTraits().httpHeader&&(r=this.base64ToUtf8(r));return("application/json"===e||e.endsWith("+json"))&&(r=Ci.from(r)),r}}return n.isNumericSchema()?Number(t):n.isBigIntegerSchema()?BigInt(t):n.isBigDecimalSchema()?new Hi(t,"bigDecimal"):n.isBooleanSchema()?"true"===String(t).toLowerCase():t}base64ToUtf8(e){var t,r;return((null==(t=this.serdeContext)?void 0:t.utf8Encoder)??jn)(((null==(r=this.serdeContext)?void 0:r.base64Decoder)??wn)(e))}}class Ki extends Fi{constructor(e,t){super(),r(this,"codecDeserializer"),r(this,"stringDeserializer"),this.codecDeserializer=e,this.stringDeserializer=new Wi(t)}setSerdeContext(e){this.stringDeserializer.setSerdeContext(e),this.codecDeserializer.setSerdeContext(e),this.serdeContext=e}read(e,t){var r,n;const i=fi.of(e),o=i.getMergedTraits(),s=(null==(r=this.serdeContext)?void 0:r.utf8Encoder)??jn;if(o.httpHeader||o.httpResponseCode)return this.stringDeserializer.read(i,s(t));if(o.httpPayload){if(i.isBlobSchema()){const e=(null==(n=this.serdeContext)?void 0:n.utf8Decoder)??Sn;return"string"==typeof t?e(t):t}if(i.isStringSchema())return"byteLength"in t?s(t):t}return this.codecDeserializer.read(i,t)}}class Xi extends Fi{constructor(e){super(),r(this,"settings"),r(this,"stringBuffer",""),this.settings=e}write(e,t){var r,n;const i=fi.of(e);switch(typeof t){case"object":if(null===t)return void(this.stringBuffer="null");if(i.isTimestampSchema()){if(!(t instanceof Date))throw new Error(`@smithy/core/protocols - received non-Date value ${t} when schema expected Date in ${i.getName(!0)}`);switch(Gi(i,this.settings)){case 5:this.stringBuffer=t.toISOString().replace(".000Z","Z");break;case 6:this.stringBuffer=Si(t);break;default:this.stringBuffer=String(t.getTime()/1e3)}return}if(i.isBlobSchema()&&"byteLength"in t)return void(this.stringBuffer=((null==(r=this.serdeContext)?void 0:r.base64Encoder)??En)(t));if(i.isListSchema()&&Array.isArray(t)){let e="";for(const r of t){this.write([i.getValueSchema(),i.getMergedTraits()],r);const t=this.flush();""!==e&&(e+=", "),e+=i.getValueSchema().isTimestampSchema()?t:ki(t)}return void(this.stringBuffer=e)}this.stringBuffer=JSON.stringify(t,null,2);break;case"string":const e=i.getMergedTraits().mediaType;let o=t;if(e){if(("application/json"===e||e.endsWith("+json"))&&(o=Ci.from(o)),i.getMergedTraits().httpHeader)return void(this.stringBuffer=((null==(n=this.serdeContext)?void 0:n.base64Encoder)??En)(o.toString()))}this.stringBuffer=t;break;default:i.isIdempotencyToken()?this.stringBuffer=Ei():this.stringBuffer=String(t)}}flush(){const e=this.stringBuffer;return this.stringBuffer="",e}}class Qi{constructor(e,t,n=new Xi(t)){r(this,"codecSerializer"),r(this,"stringSerializer"),r(this,"buffer"),this.codecSerializer=e,this.stringSerializer=n}setSerdeContext(e){this.codecSerializer.setSerdeContext(e),this.stringSerializer.setSerdeContext(e)}write(e,t){const r=fi.of(e),n=r.getMergedTraits();return n.httpHeader||n.httpLabel||n.httpQuery?(this.stringSerializer.write(r,t),void(this.buffer=this.stringSerializer.flush())):this.codecSerializer.write(r,t)}flush(){if(void 0!==this.buffer){const e=this.buffer;return this.buffer=void 0,e}return this.codecSerializer.flush()}}class Yi{constructor(e){r(this,"authSchemes",new Map);for(const[t,r]of Object.entries(e))void 0!==r&&this.authSchemes.set(t,r)}getIdentityProvider(e){return this.authSchemes.get(e)}}const Ji=(Zi=3e5,function(e){return eo(e)&&e.expiration.getTime()-Date.now()<Zi});var Zi;const eo=e=>void 0!==e.expiration,to=(e,t,r)=>{let n,i,o,s=!1;return async t=>(o&&!(null==t?void 0:t.forceRefresh)||(n=await(async()=>{i||(i=e());try{n=await i,o=!0,s=!1}finally{i=void 0}return n})()),n)},ro="X-Amz-Date",no="X-Amz-Signature",io="X-Amz-Security-Token",oo="authorization",so=ro.toLowerCase(),ao=[oo,so,"date"],lo=no.toLowerCase(),co="x-amz-content-sha256",uo=io.toLowerCase(),po={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},mo=/^proxy-/,fo=/^sec-/,ho="AWS4-HMAC-SHA256",yo="AWS4-HMAC-SHA256-PAYLOAD",go="aws4_request",bo={},vo=[],xo=(e,t,r)=>`${e}/${t}/${r}/${go}`,wo=(e,t,r)=>{const n=new e(t);return n.update(Nn(r)),n.digest()},So=({headers:e},t,r)=>{const n={};for(const i of Object.keys(e).sort()){if(null==e[i])continue;const o=i.toLowerCase();(o in po||(null==t?void 0:t.has(o))||mo.test(o)||fo.test(o))&&(!r||r&&!r.has(o))||(n[o]=e[i].trim().replace(/\s+/g," "))}return n},No=e=>"function"==typeof ArrayBuffer&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(e),jo=async({headers:e,body:t},r)=>{for(const n of Object.keys(e))if(n.toLowerCase()===co)return e[n];if(null==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||No(t)){const e=new r;return e.update(Nn(t)),Wn(await e.digest())}return"UNSIGNED-PAYLOAD"};class Eo{format(e){const t=[];for(const i of Object.keys(e)){const r=Sn(i);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[i]))}const r=new Uint8Array(t.reduce((e,t)=>e+t.byteLength,0));let n=0;for(const i of t)r.set(i,n),n+=i.byteLength;return r}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,e.value,!1),new Uint8Array(r.buffer);case"long":const n=new Uint8Array(9);return n[0]=5,n.set(e.value.bytes,1),n;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const o=new Uint8Array(i.buffer);return o.set(e.value,3),o;case"string":const s=Sn(e.value),a=new DataView(new ArrayBuffer(3+s.byteLength));a.setUint8(0,7),a.setUint16(1,s.byteLength,!1);const l=new Uint8Array(a.buffer);return l.set(s,3),l;case"timestamp":const c=new Uint8Array(9);return c[0]=8,c.set(Ro.fromNumber(e.value.valueOf()).bytes,1),c;case"uuid":if(!To.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const u=new Uint8Array(17);return u[0]=9,u.set(Gn(e.value.replace(/\-/g,"")),1),u}}}var Co,ko;(ko=Co||(Co={}))[ko.boolTrue=0]="boolTrue",ko[ko.boolFalse=1]="boolFalse",ko[ko.byte=2]="byte",ko[ko.short=3]="short",ko[ko.integer=4]="integer",ko[ko.long=5]="long",ko[ko.byteArray=6]="byteArray",ko[ko.string=7]="string",ko[ko.timestamp=8]="timestamp",ko[ko.uuid=9]="uuid";const To=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;let Ro=class e{constructor(e){if(r(this,"bytes"),this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>0x8000000000000000||t<-0x8000000000000000)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const r=new Uint8Array(8);for(let e=7,n=Math.abs(Math.round(t));e>-1&&n>0;e--,n/=256)r[e]=n;return t<0&&Oo(r),new e(r)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&Oo(e),parseInt(Wn(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}};function Oo(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const Po=e=>{e=Lr.clone(e);for(const t of Object.keys(e.headers))ao.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},_o=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class Ao{constructor({applyChecksum:e,credentials:t,region:n,service:i,sha256:o,uriEscapePath:s=!0}){r(this,"service"),r(this,"regionProvider"),r(this,"credentialProvider"),r(this,"sha256"),r(this,"uriEscapePath"),r(this,"applyChecksum"),this.service=i,this.sha256=o,this.uriEscapePath=s,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=un(n),this.credentialProvider=un(t)}createCanonicalRequest(e,t,r){const n=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${(({query:e={}})=>{const t=[],r={};for(const n of Object.keys(e)){if(n.toLowerCase()===lo)continue;const i=Dn(n);t.push(i);const o=e[n];"string"==typeof o?r[i]=`${i}=${Dn(o)}`:Array.isArray(o)&&(r[i]=o.slice(0).reduce((e,t)=>e.concat([`${i}=${Dn(t)}`]),[]).sort().join("&"))}return t.sort().map(e=>r[e]).filter(e=>e).join("&")})(e)}\n${n.map(e=>`${e}:${t[e]}`).join("\n")}\n\n${n.join(";")}\n${r}`}async createStringToSign(e,t,r,n){const i=new this.sha256;i.update(Nn(r));return`${n}\n${e}\n${t}\n${Wn(await i.digest())}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const n of e.split("/"))0!==(null==n?void 0:n.length)&&"."!==n&&(".."===n?t.pop():t.push(n));const r=`${(null==e?void 0:e.startsWith("/"))?"/":""}${t.join("/")}${t.length>0&&(null==e?void 0:e.endsWith("/"))?"/":""}`;return Dn(r).replace(/%2F/g,"/")}return e}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}formatDate(e){const t=(r=e,_o(r).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");var r;return{longDate:t,shortDate:t.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}class Io extends Ao{constructor({applyChecksum:e,credentials:t,region:n,service:i,sha256:o,uriEscapePath:s=!0}){super({applyChecksum:e,credentials:t,region:n,service:i,sha256:o,uriEscapePath:s}),r(this,"headerFormatter",new Eo)}async presign(e,t={}){const{signingDate:r=new Date,expiresIn:n=3600,unsignableHeaders:i,unhoistableHeaders:o,signableHeaders:s,hoistableHeaders:a,signingRegion:l,signingService:c}=t,u=await this.credentialProvider();this.validateResolvedCredentials(u);const p=l??await this.regionProvider(),{longDate:d,shortDate:m}=this.formatDate(r);if(n>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const f=xo(m,p,c??this.service),h=((e,t={})=>{var r,n;const{headers:i,query:o={}}=Lr.clone(e);for(const s of Object.keys(i)){const e=s.toLowerCase();("x-amz-"===e.slice(0,6)&&!(null==(r=t.unhoistableHeaders)?void 0:r.has(e))||(null==(n=t.hoistableHeaders)?void 0:n.has(e)))&&(o[s]=i[s],delete i[s])}return{...e,headers:i,query:o}})(Po(e),{unhoistableHeaders:o,hoistableHeaders:a});u.sessionToken&&(h.query[io]=u.sessionToken),h.query["X-Amz-Algorithm"]=ho,h.query["X-Amz-Credential"]=`${u.accessKeyId}/${f}`,h.query[ro]=d,h.query["X-Amz-Expires"]=n.toString(10);const y=So(h,i,s);return h.query["X-Amz-SignedHeaders"]=this.getCanonicalHeaderList(y),h.query[no]=await this.getSignature(d,f,this.getSigningKey(u,p,m,c),this.createCanonicalRequest(h,y,await jo(e,this.sha256))),h}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:r=new Date,priorSignature:n,signingRegion:i,signingService:o}){const s=i??await this.regionProvider(),{shortDate:a,longDate:l}=this.formatDate(r),c=xo(a,s,o??this.service),u=await jo({headers:{},body:t},this.sha256),p=new this.sha256;p.update(e);const d=Wn(await p.digest()),m=[yo,l,c,n,d,u].join("\n");return this.signString(m,{signingDate:r,signingRegion:s,signingService:o})}async signMessage(e,{signingDate:t=new Date,signingRegion:r,signingService:n}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:r,signingService:n,priorSignature:e.priorSignature}).then(t=>({message:e.message,signature:t}))}async signString(e,{signingDate:t=new Date,signingRegion:r,signingService:n}={}){const i=await this.credentialProvider();this.validateResolvedCredentials(i);const o=r??await this.regionProvider(),{shortDate:s}=this.formatDate(t),a=new this.sha256(await this.getSigningKey(i,o,s,n));return a.update(Nn(e)),Wn(await a.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:r,unsignableHeaders:n,signingRegion:i,signingService:o}={}){const s=await this.credentialProvider();this.validateResolvedCredentials(s);const a=i??await this.regionProvider(),l=Po(e),{longDate:c,shortDate:u}=this.formatDate(t),p=xo(u,a,o??this.service);l.headers[so]=c,s.sessionToken&&(l.headers[uo]=s.sessionToken);const d=await jo(l,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const r of Object.keys(t))if(e===r.toLowerCase())return!0;return!1})(co,l.headers)&&this.applyChecksum&&(l.headers[co]=d);const m=So(l,n,r),f=await this.getSignature(c,p,this.getSigningKey(s,a,u,o),this.createCanonicalRequest(l,m,d));return l.headers[oo]=`${ho} Credential=${s.accessKeyId}/${p}, SignedHeaders=${this.getCanonicalHeaderList(m)}, Signature=${f}`,l}async getSignature(e,t,r,n){const i=await this.createStringToSign(e,t,n,ho),o=new this.sha256(await r);return o.update(Nn(i)),Wn(await o.digest())}getSigningKey(e,t,r,n){return(async(e,t,r,n,i)=>{const o=`${r}:${n}:${i}:${Wn(await wo(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(o in bo)return bo[o];for(vo.push(o);vo.length>50;)delete bo[vo.shift()];let s=`AWS4${t.secretAccessKey}`;for(const a of[r,n,i,go])s=await wo(e,s,a);return bo[o]=s})(this.sha256,e,r,t,n||this.service)}}const Mo=e=>{let t,r=e.credentials,n=!!e.credentials;Object.defineProperty(e,"credentials",{set(i){i&&i!==r&&i!==t&&(n=!0),r=i;const o=function(e,{credentials:t,credentialDefaultProvider:r}){let n;n=t?(null==t?void 0:t.memoized)?t:((e,t,r)=>{if(void 0===e)return;const n="function"!=typeof e?async()=>Promise.resolve(e):e;let i,o,s,a=!1;const l=async e=>{o||(o=n(e));try{i=await o,s=!0,a=!1}finally{o=void 0}return i};return void 0===t?async e=>(s&&!(null==e?void 0:e.forceRefresh)||(i=await l(e)),i):async e=>(s&&!(null==e?void 0:e.forceRefresh)||(i=await l(e)),a?i:r(i)?t(i)?(await l(e),i):i:(a=!0,i))})(t,Ji,eo):r?gn(r(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")};return n.memoized=!0,n}(e,{credentials:r,credentialDefaultProvider:e.credentialDefaultProvider}),s=function(e,t){if(t.configBound)return t;const r=async r=>t({...r,callerClientConfig:e});return r.memoized=t.memoized,r.configBound=!0,r}(e,o);if(n&&!s.attributed){const e="object"==typeof r&&null!==r;t=async t=>{const r=await s(t);return!e||r.$source&&0!==Object.keys(r.$source).length?r:function(e,t,r){return e.$source||(e.$source={}),e.$source[t]=r,e}(r,"CREDENTIALS_CODE","e")},t.memoized=s.memoized,t.configBound=s.configBound,t.attributed=!0}else t=s},get:()=>t,enumerable:!0,configurable:!0}),e.credentials=r;const{signingEscapePath:i=!0,systemClockOffset:o=e.systemClockOffset||0,sha256:s}=e;let a;a=e.signer?gn(e.signer):e.regionInfoProvider?()=>gn(e.region)().then(async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t]).then(([t,r])=>{const{signingRegion:n,signingService:o}=t;e.signingRegion=e.signingRegion||n||r,e.signingName=e.signingName||o||e.serviceId;const a={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:s,uriEscapePath:i};return new(e.signerConstructor||Io)(a)}):async t=>{const r=(t=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await gn(e.region)(),properties:{}},t)).signingRegion,n=t.signingName;e.signingRegion=e.signingRegion||r,e.signingName=e.signingName||n||e.serviceId;const o={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:s,uriEscapePath:i};return new(e.signerConstructor||Io)(o)};return Object.assign(e,{systemClockOffset:o,signingEscapePath:i,signer:a})};const Do="function"==typeof TextEncoder?new TextEncoder:null,zo=e=>{if("string"==typeof e){if(Do)return Do.encode(e).byteLength;let t=e.length;for(let r=t-1;r>=0;r--){const n=e.charCodeAt(r);n>127&&n<=2047?t++:n>2047&&n<=65535&&(t+=2),n>=56320&&n<=57343&&r--}return t}if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;throw new Error(`Body Length computation failed for ${e}`)},Bo=(e,t)=>{const r=[];if(e&&r.push(e),t)for(const n of t)r.push(n);return r},Lo=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,qo=()=>{let e=[],t=[],r=!1;const n=new Set,i=r=>{var n;return e.forEach(e=>{r.add(e.middleware,{...e})}),t.forEach(e=>{r.addRelativeTo(e.middleware,{...e})}),null==(n=r.identifyOnResolve)||n.call(r,a.identifyOnResolve()),r},o=e=>{const t=[];return e.before.forEach(e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...o(e))}),t.push(e),e.after.reverse().forEach(e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...o(e))}),t},s=(r=!1)=>{const n=[],i=[],s={};e.forEach(e=>{const t={...e,before:[],after:[]};for(const r of Bo(t.name,t.aliases))s[r]=t;n.push(t)}),t.forEach(e=>{const t={...e,before:[],after:[]};for(const r of Bo(t.name,t.aliases))s[r]=t;i.push(t)}),i.forEach(e=>{if(e.toMiddleware){const t=s[e.toMiddleware];if(void 0===t){if(r)return;throw new Error(`${e.toMiddleware} is not found when adding ${Lo(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}});var a;return(a=n,a.sort((e,t)=>Uo[t.step]-Uo[e.step]||Ho[t.priority||"normal"]-Ho[e.priority||"normal"])).map(o).reduce((e,t)=>(e.push(...t),e),[])},a={add:(t,r={})=>{const{name:i,override:o,aliases:s}=r,a={step:"initialize",priority:"normal",middleware:t,...r},l=Bo(i,s);if(l.length>0){if(l.some(e=>n.has(e))){if(!o)throw new Error(`Duplicate middleware name '${Lo(i,s)}'`);for(const t of l){const r=e.findIndex(e=>{var r;return e.name===t||(null==(r=e.aliases)?void 0:r.some(e=>e===t))});if(-1===r)continue;const n=e[r];if(n.step!==a.step||a.priority!==n.priority)throw new Error(`"${Lo(n.name,n.aliases)}" middleware with ${n.priority} priority in ${n.step} step cannot be overridden by "${Lo(i,s)}" middleware with ${a.priority} priority in ${a.step} step.`);e.splice(r,1)}}for(const e of l)n.add(e)}e.push(a)},addRelativeTo:(e,r)=>{const{name:i,override:o,aliases:s}=r,a={middleware:e,...r},l=Bo(i,s);if(l.length>0){if(l.some(e=>n.has(e))){if(!o)throw new Error(`Duplicate middleware name '${Lo(i,s)}'`);for(const e of l){const r=t.findIndex(t=>{var r;return t.name===e||(null==(r=t.aliases)?void 0:r.some(t=>t===e))});if(-1===r)continue;const n=t[r];if(n.toMiddleware!==a.toMiddleware||n.relation!==a.relation)throw new Error(`"${Lo(n.name,n.aliases)}" middleware ${n.relation} "${n.toMiddleware}" middleware cannot be overridden by "${Lo(i,s)}" middleware ${a.relation} "${a.toMiddleware}" middleware.`);t.splice(r,1)}}for(const e of l)n.add(e)}t.push(a)},clone:()=>i(qo()),use:e=>{e.applyToStack(a)},remove:r=>"string"==typeof r?(r=>{let i=!1;const o=e=>{const t=Bo(e.name,e.aliases);if(t.includes(r)){i=!0;for(const e of t)n.delete(e);return!1}return!0};return e=e.filter(o),t=t.filter(o),i})(r):(r=>{let i=!1;const o=e=>{if(e.middleware===r){i=!0;for(const t of Bo(e.name,e.aliases))n.delete(t);return!1}return!0};return e=e.filter(o),t=t.filter(o),i})(r),removeByTag:r=>{let i=!1;const o=e=>{const{tags:t,name:o,aliases:s}=e;if(t&&t.includes(r)){const e=Bo(o,s);for(const t of e)n.delete(t);return i=!0,!1}return!0};return e=e.filter(o),t=t.filter(o),i},concat:e=>{var t;const n=i(qo());return n.use(e),n.identifyOnResolve(r||n.identifyOnResolve()||((null==(t=e.identifyOnResolve)?void 0:t.call(e))??!1)),n},applyToStack:i,identify:()=>s(!0).map(e=>{const t=e.step??e.relation+" "+e.toMiddleware;return Lo(e.name,e.aliases)+" - "+t}),identifyOnResolve:e=>("boolean"==typeof e&&(r=e),r),resolve:(e,t)=>{for(const r of s().map(e=>e.middleware).reverse())e=r(e,t);return e}};return a},Uo={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Ho={high:3,normal:2,low:1};class Fo{constructor(e){r(this,"config"),r(this,"middlewareStack",qo()),r(this,"initConfig"),r(this,"handlers"),this.config=e;const{protocol:t,protocolSettings:n}=e;n&&"function"==typeof t&&(e.protocol=new t(n))}send(e,t,r){const n="function"!=typeof t?t:void 0,i="function"==typeof t?t:r;let o;if(void 0===n&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);const t=this.handlers;t.has(e.constructor)?o=t.get(e.constructor):(o=e.resolveMiddleware(this.middlewareStack,this.config,n),t.set(e.constructor,o))}else delete this.handlers,o=e.resolveMiddleware(this.middlewareStack,this.config,n);if(!i)return o(e).then(e=>e.output);o(e).then(e=>i(null,e.output),e=>i(e)).catch(()=>{})}destroy(){var e,t,r;null==(r=null==(t=null==(e=this.config)?void 0:e.requestHandler)?void 0:t.destroy)||r.call(t),delete this.handlers}}const $o="***SensitiveInformation***";function Vo(e,t){if(null==t)return t;const r=fi.of(e);if(r.getMergedTraits().sensitive)return $o;if(r.isListSchema()){if(!!r.getValueSchema().getMergedTraits().sensitive)return $o}else if(r.isMapSchema()){if(!!r.getKeySchema().getMergedTraits().sensitive||!!r.getValueSchema().getMergedTraits().sensitive)return $o}else if(r.isStructSchema()&&"object"==typeof t){const e=t,n={};for(const[t,i]of r.structIterator())null!=e[t]&&(n[t]=Vo(i,e[t]));return n}return t}class Go{constructor(){r(this,"middlewareStack",qo()),r(this,"schema")}static classBuilder(){return new Wo}resolveMiddlewareWithContext(e,t,r,{middlewareFn:n,clientName:i,commandName:o,inputFilterSensitiveLog:s,outputFilterSensitiveLog:a,smithyContext:l,additionalContext:c,CommandCtor:u}){for(const h of n.bind(this)(u,e,t,r))this.middlewareStack.use(h);const p=e.concat(this.middlewareStack),{logger:d}=t,m={logger:d,clientName:i,commandName:o,inputFilterSensitiveLog:s,outputFilterSensitiveLog:a,[Br]:{commandInstance:this,...l},...c},{requestHandler:f}=t;return p.resolve(e=>f.handle(e.request,r||{}),m)}}class Wo{constructor(){r(this,"_init",()=>{}),r(this,"_ep",{}),r(this,"_middlewareFn",()=>[]),r(this,"_commandName",""),r(this,"_clientName",""),r(this,"_additionalContext",{}),r(this,"_smithyContext",{}),r(this,"_inputFilterSensitiveLog"),r(this,"_outputFilterSensitiveLog"),r(this,"_serializer",null),r(this,"_deserializer",null),r(this,"_operationSchema")}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,r={}){return this._smithyContext={service:e,operation:t,...r},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=e=>e,t=e=>e){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}sc(e){return this._operationSchema=e,this._smithyContext.operationSchema=e,this}build(){const e=this;let t;return t=class extends Go{constructor(...[t]){super(),r(this,"input"),r(this,"serialize",e._serializer),r(this,"deserialize",e._deserializer),this.input=t??{},e._init(this),this.schema=e._operationSchema}static getEndpointParameterInstructions(){return e._ep}resolveMiddleware(r,n,i){const o=e._operationSchema,s=(null==o?void 0:o[4])??(null==o?void 0:o.input),a=(null==o?void 0:o[5])??(null==o?void 0:o.output);return this.resolveMiddlewareWithContext(r,n,i,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog??(o?Vo.bind(null,s):e=>e),outputFilterSensitiveLog:e._outputFilterSensitiveLog??(o?Vo.bind(null,a):e=>e),smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}class Ko extends Error{constructor(e){super(e.message),r(this,"$fault"),r(this,"$response"),r(this,"$retryable"),r(this,"$metadata"),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;const t=e;return Ko.prototype.isPrototypeOf(t)||Boolean(t.$fault)&&Boolean(t.$metadata)&&("client"===t.$fault||"server"===t.$fault)}static[Symbol.hasInstance](e){if(!e)return!1;const t=e;return this===Ko?Ko.isInstance(e):!!Ko.isInstance(e)&&(t.name&&this.name?this.prototype.isPrototypeOf(e)||t.name===this.name:this.prototype.isPrototypeOf(e))}}const Xo=(e,t={})=>{Object.entries(t).filter(([,e])=>void 0!==e).forEach(([t,r])=>{null!=e[t]&&""!==e[t]||(e[t]=r)});const r=e.message||e.Message||"UnknownError";return e.message=r,delete e.Message,e},Qo=e=>{switch(e){case"standard":case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},Yo=Object.values(Dr),Jo=e=>Object.assign((e=>{const t=[];for(const r in Dr){const n=Dr[r];void 0!==e[n]&&t.push({algorithmId:()=>n,checksumConstructor:()=>e[n]})}for(const[r,n]of Object.entries(e.checksumAlgorithms??{}))t.push({algorithmId:()=>r,checksumConstructor:()=>n});return{addChecksumAlgorithm(r){e.checksumAlgorithms=e.checksumAlgorithms??{};const n=r.algorithmId(),i=r.checksumConstructor();Yo.includes(n)?e.checksumAlgorithms[n.toUpperCase()]=i:e.checksumAlgorithms[n]=i,t.push(r)},checksumAlgorithms:()=>t}})(e),(e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy:()=>e.retryStrategy}))(e)),Zo=e=>Object.assign((e=>{const t={};return e.checksumAlgorithms().forEach(e=>{const r=e.algorithmId();Yo.includes(r)&&(t[r]=e.checksumConstructor())}),t})(e),(e=>{const t={};return t.retryStrategy=e.retryStrategy(),t})(e)),es=e=>{const t="#text";for(const r in e)e.hasOwnProperty(r)&&void 0!==e[r][t]?e[r]=e[r][t]:"object"==typeof e[r]&&null!==e[r]&&(e[r]=es(e[r]));return e};class ts{trace(){}debug(){}info(){}warn(){}error(){}}class rs{constructor(e=!1){r(this,"queryCompat"),this.queryCompat=e}resolveRestContentType(e,t){const r=t.getMemberSchemas(),n=Object.values(r).find(e=>!!e.getMergedTraits().httpPayload);if(n){const t=n.getMergedTraits().mediaType;return t||(n.isStringSchema()?"text/plain":n.isBlobSchema()?"application/octet-stream":e)}if(!t.isUnitSchema()){if(Object.values(r).find(e=>{const{httpQuery:t,httpQueryParams:r,httpHeader:n,httpLabel:i,httpPrefixHeaders:o}=e.getMergedTraits();return!t&&!r&&!n&&!i&&void 0===o}))return e}}async getErrorSchemaOrThrowBaseException(e,t,r,n,i,o){let s=t,a=e;e.includes("#")&&([s,a]=e.split("#"));const l={$metadata:i,$fault:r.statusCode<500?"client":"server"},c=vi.for(s);try{return{errorSchema:(null==o?void 0:o(c,a))??c.getSchema(e),errorMetadata:l}}catch(u){n.message=n.message??n.Message??"UnknownError";const e=vi.for("smithy.ts.sdk.synthetic."+s),t=e.getBaseException();if(t){const r=e.getErrorCtor(t)??Error;throw this.decorateServiceException(Object.assign(new r({name:a}),l),n)}throw this.decorateServiceException(Object.assign(new Error(a),l),n)}}decorateServiceException(e,t={}){var r,n,i,o;if(this.queryCompat){const s=e.Message??t.Message,a=Xo(e,t);s&&(a.message=s),a.Error={...a.Error,Type:null==(r=a.Error)?void 0:r.Type,Code:null==(n=a.Error)?void 0:n.Code,Message:(null==(i=a.Error)?void 0:i.message)??(null==(o=a.Error)?void 0:o.Message)??s};const l=a.$metadata.requestId;return l&&(a.RequestId=l),a}return Xo(e,t)}setQueryCompatError(e,t){var r;const n=null==(r=t.headers)?void 0:r["x-amzn-query-error"];if(void 0!==e&&null!=n){const[t,r]=n.split(";"),i=Object.entries(e),o={Code:t,Type:r};Object.assign(e,o);for(const[e,n]of i)o["message"===e?"Message":e]=n;delete o.__type,e.Error=o}}queryCompatOutput(e,t){e.Error&&(t.Error=e.Error),e.Type&&(t.Type=e.Type),e.Code&&(t.Code=e.Code)}findQueryCompatibleError(e,t){try{return e.getSchema(t)}catch(r){return e.find(e=>{var r;return(null==(r=fi.of(e).getMergedTraits().awsQueryError)?void 0:r[0])===t})}}}class ns{constructor(){r(this,"serdeContext")}setSerdeContext(e){this.serdeContext=e}}class is{constructor(e,t){r(this,"from"),r(this,"to"),r(this,"keys"),this.from=e,this.to=t,this.keys=new Set(Object.keys(this.from).filter(e=>"__type"!==e))}mark(e){this.keys.delete(e)}hasUnknown(){return 1===this.keys.size&&0===Object.keys(this.to).length}writeUnknown(){if(this.hasUnknown()){const e=this.keys.values().next().value,t=this.from[e];this.to.$unknown=[e,t]}}}const os=/[&<>"]/g,ss={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function as(e){return e.replace(os,e=>ss[e])}const ls=/[&"'<>\r\n\u0085\u2028]/g,cs={"&":"&amp;",'"':"&quot;","'":"&apos;","<":"&lt;",">":"&gt;","\r":"&#x0D;","\n":"&#x0A;","…":"&#x85;","\u2028":"&#x2028;"};class us{constructor(e){r(this,"value"),this.value=e}toString(){return(""+this.value).replace(ls,e=>cs[e])}}class ps{constructor(e,t=[]){r(this,"name"),r(this,"children"),r(this,"attributes",{}),this.name=e,this.children=t}static of(e,t,r){const n=new ps(e);return void 0!==t&&n.addChildNode(new us(t)),void 0!==r&&n.withName(r),n}withName(e){return this.name=e,this}addAttribute(e,t){return this.attributes[e]=t,this}addChildNode(e){return this.children.push(e),this}removeAttribute(e){return delete this.attributes[e],this}n(e){return this.name=e,this}c(e){return this.children.push(e),this}a(e,t){return null!=t&&(this.attributes[e]=t),this}cc(e,t,r=t){if(null!=e[t]){const n=ps.of(t,e[t]).withName(r);this.c(n)}}l(e,t,r,n){if(null!=e[t]){n().map(e=>{e.withName(r),this.c(e)})}}lc(e,t,r,n){if(null!=e[t]){const e=n(),t=new ps(r);e.map(e=>{t.c(e)}),this.c(t)}}toString(){const e=Boolean(this.children.length);let t=`<${this.name}`;const r=this.attributes;for(const n of Object.keys(r)){const e=r[n];null!=e&&(t+=` ${n}="${as(""+e)}"`)}return t+(e?`>${this.children.map(e=>e.toString()).join("")}</${this.name}>`:"/>")}}let ds;class ms extends ns{constructor(e){super(),r(this,"settings"),r(this,"stringDeserializer"),this.settings=e,this.stringDeserializer=new Wi(e)}setSerdeContext(e){this.serdeContext=e,this.stringDeserializer.setSerdeContext(e)}read(e,t,r){var n;const i=fi.of(e),o=i.getMemberSchemas();if(i.isStructSchema()&&i.isMemberSchema()&&!!Object.values(o).find(e=>!!e.getMemberTraits().eventPayload)){const e={},r=Object.keys(o)[0];return o[r].isBlobSchema()?e[r]=t:e[r]=this.read(o[r],t),e}const s=((null==(n=this.serdeContext)?void 0:n.utf8Encoder)??jn)(t),a=this.parseXml(s);return this.readSchema(e,r?a[r]:a)}readSchema(e,t){const r=fi.of(e);if(r.isUnitSchema())return;const n=r.getMergedTraits();if(r.isListSchema()&&!Array.isArray(t))return this.readSchema(r,[t]);if(null==t)return t;if("object"==typeof t){const e=!!n.xmlFlattened;if(r.isListSchema()){const n=r.getValueSchema(),i=[],o=n.getMergedTraits().xmlName??"member",s=e?t:(t[0]??t)[o];if(null==s)return i;const a=Array.isArray(s)?s:[s];for(const e of a)i.push(this.readSchema(n,e));return i}const i={};if(r.isMapSchema()){const n=r.getKeySchema(),o=r.getValueSchema();let s;s=e?Array.isArray(t)?t:[t]:Array.isArray(t.entry)?t.entry:[t.entry];const a=n.getMergedTraits().xmlName??"key",l=o.getMergedTraits().xmlName??"value";for(const e of s){const t=e[a],r=e[l];i[t]=this.readSchema(o,r)}return i}if(r.isStructSchema()){const e=r.isUnionSchema();let n;e&&(n=new is(t,i));for(const[o,s]of r.structIterator()){const r=s.getMergedTraits(),a=r.httpPayload?r.xmlName??s.getName():s.getMemberTraits().xmlName??o;e&&n.mark(a),null!=t[a]&&(i[o]=this.readSchema(s,t[a]))}return e&&n.writeUnknown(),i}if(r.isDocumentSchema())return t;throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${r.getName(!0)}`)}return r.isListSchema()?[]:r.isMapSchema()||r.isStructSchema()?{}:this.stringDeserializer.read(r,t)}parseXml(e){if(e.length){let r;try{r=function(e){ds||(ds=new DOMParser);const t=ds.parseFromString(e,"application/xml");if(t.getElementsByTagName("parsererror").length>0)throw new Error("DOMParser XML parsing error.");const r=e=>{var t;if(e.nodeType===Node.TEXT_NODE&&(null==(t=e.textContent)?void 0:t.trim()))return e.textContent;if(e.nodeType===Node.ELEMENT_NODE){const t=e;if(0===t.attributes.length&&0===t.childNodes.length)return"";const n={},i=Array.from(t.attributes);for(const e of i)n[`${e.name}`]=e.value;const o=Array.from(t.childNodes);for(const e of o){const s=r(e);if(null!=s){const t=e.nodeName;if(1===o.length&&0===i.length&&"#text"===t)return s;n[t]?Array.isArray(n[t])?n[t].push(s):n[t]=[n[t],s]:n[t]=s}else if(1===o.length&&0===i.length)return t.textContent}return n}return null};return{[t.documentElement.nodeName]:r(t.documentElement)}}(e)}catch(t){throw t&&"object"==typeof t&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}const n="#text",i=Object.keys(r)[0],o=r[i];return o[n]&&(o[i]=o[n],delete o[n]),es(o)}return{}}}class fs extends ns{constructor(e){super(),r(this,"settings"),r(this,"stringBuffer"),r(this,"byteBuffer"),r(this,"buffer"),this.settings=e}write(e,t){var r;const n=fi.of(e);if(n.isStringSchema()&&"string"==typeof t)this.stringBuffer=t;else if(n.isBlobSchema())this.byteBuffer="byteLength"in t?t:((null==(r=this.serdeContext)?void 0:r.base64Decoder)??wn)(t);else{this.buffer=this.writeStruct(n,t,void 0);const e=n.getMergedTraits();e.httpPayload&&!e.xmlName&&this.buffer.withName(n.getName())}}flush(){var e;if(void 0!==this.byteBuffer){const e=this.byteBuffer;return delete this.byteBuffer,e}if(void 0!==this.stringBuffer){const e=this.stringBuffer;return delete this.stringBuffer,e}const t=this.buffer;return this.settings.xmlNamespace&&((null==(e=null==t?void 0:t.attributes)?void 0:e.xmlns)||t.addAttribute("xmlns",this.settings.xmlNamespace)),delete this.buffer,t.toString()}writeStruct(e,t,r){const n=e.getMergedTraits(),i=e.isMemberSchema()&&!n.httpPayload?e.getMemberTraits().xmlName??e.getMemberName():n.xmlName??e.getName();if(!i||!e.isStructSchema())throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${e.getName(!0)}.`);const o=ps.of(i),[s,a]=this.getXmlnsAttribute(e,r);for(const[c,u]of e.structIterator()){const e=t[c];if(null!=e||u.isIdempotencyToken()){if(u.getMergedTraits().xmlAttribute){o.addAttribute(u.getMergedTraits().xmlName??c,this.writeSimple(u,e));continue}if(u.isListSchema())this.writeList(u,e,o,a);else if(u.isMapSchema())this.writeMap(u,e,o,a);else if(u.isStructSchema())o.addChildNode(this.writeStruct(u,e,a));else{const t=ps.of(u.getMergedTraits().xmlName??u.getMemberName());this.writeSimpleInto(u,e,t,a),o.addChildNode(t)}}}const{$unknown:l}=t;if(l&&e.isUnionSchema()&&Array.isArray(l)&&1===Object.keys(t).length){const[e,r]=l,n=ps.of(e);if("string"!=typeof r){if(!(t instanceof ps||t instanceof us))throw new Error("@aws-sdk - $unknown union member in XML requires value of type string, @aws-sdk/xml-builder::XmlNode or XmlText.");o.addChildNode(t)}this.writeSimpleInto(0,r,n,a),o.addChildNode(n)}return a&&o.addAttribute(s,a),o}writeList(e,t,r,n){if(!e.isMemberSchema())throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${e.getName(!0)}`);const i=e.getMergedTraits(),o=e.getValueSchema(),s=o.getMergedTraits(),a=!!s.sparse,l=!!i.xmlFlattened,[c,u]=this.getXmlnsAttribute(e,n),p=(t,r)=>{if(o.isListSchema())this.writeList(o,Array.isArray(r)?r:[r],t,u);else if(o.isMapSchema())this.writeMap(o,r,t,u);else if(o.isStructSchema()){const n=this.writeStruct(o,r,u);t.addChildNode(n.withName(l?i.xmlName??e.getMemberName():s.xmlName??"member"))}else{const n=ps.of(l?i.xmlName??e.getMemberName():s.xmlName??"member");this.writeSimpleInto(o,r,n,u),t.addChildNode(n)}};if(l)for(const d of t)(a||null!=d)&&p(r,d);else{const n=ps.of(i.xmlName??e.getMemberName());u&&n.addAttribute(c,u);for(const e of t)(a||null!=e)&&p(n,e);r.addChildNode(n)}}writeMap(e,t,r,n,i=!1){if(!e.isMemberSchema())throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${e.getName(!0)}`);const o=e.getMergedTraits(),s=e.getKeySchema(),a=s.getMergedTraits().xmlName??"key",l=e.getValueSchema(),c=l.getMergedTraits(),u=c.xmlName??"value",p=!!c.sparse,d=!!o.xmlFlattened,[m,f]=this.getXmlnsAttribute(e,n),h=(e,t,r)=>{const n=ps.of(a,t),[i,o]=this.getXmlnsAttribute(s,f);o&&n.addAttribute(i,o),e.addChildNode(n);let c=ps.of(u);l.isListSchema()?this.writeList(l,r,c,f):l.isMapSchema()?this.writeMap(l,r,c,f,!0):l.isStructSchema()?c=this.writeStruct(l,r,f):this.writeSimpleInto(l,r,c,f),e.addChildNode(c)};if(d){for(const[y,g]of Object.entries(t))if(p||null!=g){const t=ps.of(o.xmlName??e.getMemberName());h(t,y,g),r.addChildNode(t)}}else{let n;i||(n=ps.of(o.xmlName??e.getMemberName()),f&&n.addAttribute(m,f),r.addChildNode(n));for(const[e,o]of Object.entries(t))if(p||null!=o){const t=ps.of("entry");h(t,e,o),(i?r:n).addChildNode(t)}}}writeSimple(e,t){var r;if(null===t)throw new Error("@aws-sdk/core/protocols - (XML serializer) cannot write null value.");const n=fi.of(e);let i=null;if(t&&"object"==typeof t)if(n.isBlobSchema())i=((null==(r=this.serdeContext)?void 0:r.base64Encoder)??En)(t);else{if(!(n.isTimestampSchema()&&t instanceof Date)){if(n.isBigDecimalSchema()&&t)return t instanceof Hi?t.string:String(t);throw n.isMapSchema()||n.isListSchema()?new Error("@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead."):new Error(`@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${n.getName(!0)}`)}switch(Gi(n,this.settings)){case 5:i=t.toISOString().replace(".000Z","Z");break;case 6:default:i=Si(t);break;case 7:i=String(t.getTime()/1e3)}}if((n.isBooleanSchema()||n.isNumericSchema()||n.isBigIntegerSchema()||n.isBigDecimalSchema())&&(i=String(t)),n.isStringSchema()&&(i=void 0===t&&n.isIdempotencyToken()?Ei():String(t)),null===i)throw new Error(`Unhandled schema-value pair ${n.getName(!0)}=${t}`);return i}writeSimpleInto(e,t,r,n){const i=this.writeSimple(e,t),o=fi.of(e),s=new us(i),[a,l]=this.getXmlnsAttribute(o,n);l&&r.addAttribute(a,l),r.addChildNode(s)}getXmlnsAttribute(e,t){const r=e.getMergedTraits(),[n,i]=r.xmlNamespace??[];return i&&i!==t?[n?`xmlns:${n}`:"xmlns",i]:[void 0,void 0]}}class hs extends ns{constructor(e){super(),r(this,"settings"),this.settings=e}createSerializer(){const e=new fs(this.settings);return e.setSerdeContext(this.serdeContext),e}createDeserializer(){const e=new ms(this.settings);return e.setSerdeContext(this.serdeContext),e}}class ys extends Vi{constructor(e){super(e),r(this,"codec"),r(this,"serializer"),r(this,"deserializer"),r(this,"mixin",new rs);const t={timestampFormat:{useTrait:!0,default:5},httpBindings:!0,xmlNamespace:e.xmlNamespace,serviceNamespace:e.defaultNamespace};this.codec=new hs(t),this.serializer=new Qi(this.codec.createSerializer(),t),this.deserializer=new Ki(this.codec.createDeserializer(),t)}getPayloadCodec(){return this.codec}getShapeId(){return"aws.protocols#restXml"}async serializeRequest(e,t,r){const n=await super.serializeRequest(e,t,r),i=fi.of(e.input);if(!n.headers["content-type"]){const e=this.mixin.resolveRestContentType(this.getDefaultContentType(),i);e&&(n.headers["content-type"]=e)}return"string"!=typeof n.body||n.headers["content-type"]!==this.getDefaultContentType()||n.body.startsWith("<?xml ")||this.hasUnstructuredPayloadBinding(i)||(n.body='<?xml version="1.0" encoding="UTF-8"?>'+n.body),n}async deserializeResponse(e,t,r){return super.deserializeResponse(e,t,r)}async handleError(e,t,r,n,i){var o,s,a;const l=((e,t)=>{var r;return void 0!==(null==(r=null==t?void 0:t.Error)?void 0:r.Code)?t.Error.Code:void 0!==(null==t?void 0:t.Code)?t.Code:404==e.statusCode?"NotFound":void 0})(r,n)??"Unknown";if(n.Error&&"object"==typeof n.Error)for(const h of Object.keys(n.Error))n[h]=n.Error[h],"message"===h.toLowerCase()&&(n.message=n.Error[h]);n.RequestId&&!i.requestId&&(i.requestId=n.RequestId);const{errorSchema:c,errorMetadata:u}=await this.mixin.getErrorSchemaOrThrowBaseException(l,this.options.defaultNamespace,r,n,i),p=fi.of(c),d=(null==(o=n.Error)?void 0:o.message)??(null==(s=n.Error)?void 0:s.Message)??n.message??n.Message??"Unknown",m=new(vi.for(c[1]).getErrorCtor(c)??Error)(d);await this.deserializeHttpMessage(c,t,r,n);const f={};for(const[h,y]of p.structIterator()){const e=y.getMergedTraits().xmlName??h,t=(null==(a=n.Error)?void 0:a[e])??n[e];f[h]=this.codec.createDeserializer().readSchema(y,t)}throw this.mixin.decorateServiceException(Object.assign(m,u,{$fault:p.getMergedTraits().error,message:d},f),n)}getDefaultContentType(){return"application/xml"}hasUnstructuredPayloadBinding(e){for(const[,t]of e.structIterator())if(t.getMergedTraits().httpPayload)return!(t.isStructSchema()||t.isMapSchema()||t.isListSchema());return!1}}const gs=e=>e===Xr.MD5?"content-md5":`x-amz-checksum-${e.toLowerCase()}`,bs=e=>void 0!==e&&"string"!=typeof e&&!ArrayBuffer.isView(e)&&!No(e);function vs(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})}function xs(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(l){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(l){a=[6,l],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function ws(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ss(e){return this instanceof Ss?(this.v=e,this):new Ss(e)}function Ns(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",function(e){return function(t){return Promise.resolve(t).then(e,c)}}),n[Symbol.asyncIterator]=function(){return this},n;function s(e,t){i[e]&&(n[e]=function(t){return new Promise(function(r,n){o.push([e,t,r,n])>1||a(e,t)})},t&&(n[e]=t(n[e])))}function a(e,t){try{(r=i[e](t)).value instanceof Ss?Promise.resolve(r.value.v).then(l,c):u(o[0][2],r)}catch(n){u(o[0][3],n)}var r}function l(e){a("next",e)}function c(e){a("throw",e)}function u(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function js(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:Ss(e[n](t)),done:!1}:i?i(t):t}:i}}function Es(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=ws(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,i){(function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)})(n,i,(t=e[r](t)).done,t.value)})}}}"function"==typeof SuppressedError&&SuppressedError;const Cs=e=>(new TextEncoder).encode(e);var ks="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:Cs;function Ts(e){return e instanceof Uint8Array?e:"string"==typeof e?ks(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function Rs(e){return"string"==typeof e?0===e.length:0===e.byteLength}function Os(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}function Ps(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),r=0;r<e.length;)t[r]=e[r],r+=1;return t}return Uint32Array.from(e)}var _s=function(){function e(){this.crc32c=new As}return e.prototype.update=function(e){Rs(e)||this.crc32c.update(Ts(e))},e.prototype.digest=function(){return vs(this,void 0,void 0,function(){return xs(this,function(e){return[2,Os(this.crc32c.digest())]})})},e.prototype.reset=function(){this.crc32c=new As},e}(),As=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,r;try{for(var n=ws(e),i=n.next();!i.done;i=n.next()){var o=i.value;this.checksum=this.checksum>>>8^Is[255&(this.checksum^o)]}}catch(s){t={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}(),Is=Ps([0,4067132163,3778769143,324072436,3348797215,904991772,648144872,3570033899,2329499855,2024987596,1809983544,2575936315,1296289744,3207089363,2893594407,1578318884,274646895,3795141740,4049975192,51262619,3619967088,632279923,922689671,3298075524,2592579488,1760304291,2075979607,2312596564,1562183871,2943781820,3156637768,1313733451,549293790,3537243613,3246849577,871202090,3878099393,357341890,102525238,4101499445,2858735121,1477399826,1264559846,3107202533,1845379342,2677391885,2361733625,2125378298,820201905,3263744690,3520608582,598981189,4151959214,85089709,373468761,3827903834,3124367742,1213305469,1526817161,2842354314,2107672161,2412447074,2627466902,1861252501,1098587580,3004210879,2688576843,1378610760,2262928035,1955203488,1742404180,2511436119,3416409459,969524848,714683780,3639785095,205050476,4266873199,3976438427,526918040,1361435347,2739821008,2954799652,1114974503,2529119692,1691668175,2005155131,2247081528,3690758684,697762079,986182379,3366744552,476452099,3993867776,4250756596,255256311,1640403810,2477592673,2164122517,1922457750,2791048317,1412925310,1197962378,3037525897,3944729517,427051182,170179418,4165941337,746937522,3740196785,3451792453,1070968646,1905808397,2213795598,2426610938,1657317369,3053634322,1147748369,1463399397,2773627110,4215344322,153784257,444234805,3893493558,1021025245,3467647198,3722505002,797665321,2197175160,1889384571,1674398607,2443626636,1164749927,3070701412,2757221520,1446797203,137323447,4198817972,3910406976,461344835,3484808360,1037989803,781091935,3705997148,2460548119,1623424788,1939049696,2180517859,1429367560,2807687179,3020495871,1180866812,410100952,3927582683,4182430767,186734380,3756733383,763408580,1053836080,3434856499,2722870694,1344288421,1131464017,2971354706,1708204729,2545590714,2229949006,1988219213,680717673,3673779818,3383336350,1002577565,4010310262,493091189,238226049,4233660802,2987750089,1082061258,1395524158,2705686845,1972364758,2279892693,2494862625,1725896226,952904198,3399985413,3656866545,731699698,4283874585,222117402,510512622,3959836397,3280807620,837199303,582374963,3504198960,68661723,4135334616,3844915500,390545967,1230274059,3141532936,2825850620,1510247935,2395924756,2091215383,1878366691,2644384480,3553878443,565732008,854102364,3229815391,340358836,3861050807,4117890627,119113024,1493875044,2875275879,3090270611,1247431312,2660249211,1828433272,2141937292,2378227087,3811616794,291187481,34330861,4032846830,615137029,3603020806,3314634738,939183345,1776939221,2609017814,2295496738,2058945313,2926798794,1545135305,1330124605,3173225534,4084100981,17165430,307568514,3762199681,888469610,3332340585,3587147933,665062302,2042050490,2346497209,2559330125,1793573966,3190661285,1279665062,1595330642,2910671697]);let Ms,Ds,zs,Bs,Ls,Us,Hs,Fs,$s;const Vs=()=>{Ms||(Ms=(()=>{const e=new Array(8);for(let t=0;t<8;t++){const r=new Array(512);for(let e=0;e<256;e++){let n=BigInt(e);for(let e=0;e<8*(t+1);e++)1n&n?n=n>>1n^0x9a6c9329ac4bc9b5n:n>>=1n;r[2*e]=Number(n>>32n&0xffffffffn),r[2*e+1]=Number(0xffffffffn&n)}e[t]=new Uint32Array(r)}return e})(),[Ds,zs,Bs,Ls,Us,Hs,Fs,$s]=Ms)};class Gs{constructor(){r(this,"c1",0),r(this,"c2",0),Vs(),this.reset()}update(e){const t=e.length;let r=0,n=this.c1,i=this.c2;for(;r+8<=t;){const t=(255&(i^e[r++]))<<1,o=(255&(i>>>8^e[r++]))<<1,s=(255&(i>>>16^e[r++]))<<1,a=(255&(i>>>24^e[r++]))<<1,l=(255&(n^e[r++]))<<1,c=(255&(n>>>8^e[r++]))<<1,u=(255&(n>>>16^e[r++]))<<1,p=(255&(n>>>24^e[r++]))<<1;n=$s[t]^Fs[o]^Hs[s]^Us[a]^Ls[l]^Bs[c]^zs[u]^Ds[p],i=$s[t+1]^Fs[o+1]^Hs[s+1]^Us[a+1]^Ls[l+1]^Bs[c+1]^zs[u+1]^Ds[p+1]}for(;r<t;){const t=(255&(i^e[r]))<<1;i=(i>>>8|(255&n)<<24)>>>0,n=n>>>8^Ds[t],i^=Ds[t+1],r++}this.c1=n,this.c2=i}async digest(){const e=4294967295^this.c1,t=4294967295^this.c2;return new Uint8Array([e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t])}reset(){this.c1=4294967295,this.c2=4294967295}}var Ws=function(){function e(){this.crc32=new Ks}return e.prototype.update=function(e){Rs(e)||this.crc32.update(Ts(e))},e.prototype.digest=function(){return vs(this,void 0,void 0,function(){return xs(this,function(e){return[2,Os(this.crc32.digest())]})})},e.prototype.reset=function(){this.crc32=new Ks},e}(),Ks=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,r;try{for(var n=ws(e),i=n.next();!i.done;i=n.next()){var o=i.value;this.checksum=this.checksum>>>8^Xs[255&(this.checksum^o)]}}catch(s){t={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}(),Xs=Ps([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);const Qs=[Xr.CRC32,Xr.CRC32C,Xr.CRC64NVME,Xr.SHA1,Xr.SHA256],Ys=[Xr.SHA256,Xr.SHA1,Xr.CRC32,Xr.CRC32C,Xr.CRC64NVME],Js=(e,t)=>{const{checksumAlgorithms:r={}}=t;switch(e){case Xr.MD5:return(null==r?void 0:r.MD5)??t.md5;case Xr.CRC32:return(null==r?void 0:r.CRC32)??Ws;case Xr.CRC32C:return(null==r?void 0:r.CRC32C)??_s;case Xr.CRC64NVME:return(null==r?void 0:r.CRC64NVME)??Gs;case Xr.SHA1:return(null==r?void 0:r.SHA1)??t.sha1;case Xr.SHA256:return(null==r?void 0:r.SHA256)??t.sha256;default:if(null==r?void 0:r[e])return r[e];throw new Error(`The checksum algorithm "${e}" is not supported by the client. Select one of ${Qs}, or provide an implementation to the client constructor checksums field.`)}},Zs=(e,t)=>{const r=new e;return r.update(Nn(t||"")),r.digest()},ea={name:"flexibleChecksumsMiddleware",step:"build",tags:["BODY_CHECKSUM"],override:!0},ta=(e,t)=>(r,n)=>async i=>{if(!Lr.isInstance(i.request))return r(i);if(((e,t)=>{const r=e.toLowerCase();for(const n of Object.keys(t))if(n.toLowerCase().startsWith(r))return!0;return!1})("x-amz-checksum-",i.request.headers))return r(i);const{request:o,input:s}=i,{body:a,headers:l}=o,{base64Encoder:c,streamHasher:u}=e,{requestChecksumRequired:p,requestAlgorithmMember:d}=t,m=await e.requestChecksumCalculation(),f=null==d?void 0:d.name,h=null==d?void 0:d.httpHeader;f&&!s[f]&&(m===Fr||p)&&(s[f]=Zr,h&&(l[h]=Zr));const y=((e,{requestChecksumRequired:t,requestAlgorithmMember:r,requestChecksumCalculation:n})=>{if(!r)return n===Fr||t?Zr:void 0;if(!e[r])return;return e[r]})(s,{requestChecksumRequired:p,requestAlgorithmMember:null==d?void 0:d.name,requestChecksumCalculation:m});let g=a,b=l;if(y){switch(y){case Xr.CRC32:en(n,"FLEXIBLE_CHECKSUMS_REQ_CRC32","U");break;case Xr.CRC32C:en(n,"FLEXIBLE_CHECKSUMS_REQ_CRC32C","V");break;case Xr.CRC64NVME:en(n,"FLEXIBLE_CHECKSUMS_REQ_CRC64","W");break;case Xr.SHA1:en(n,"FLEXIBLE_CHECKSUMS_REQ_SHA1","X");break;case Xr.SHA256:en(n,"FLEXIBLE_CHECKSUMS_REQ_SHA256","Y")}const t=gs(y),r=Js(y,e);if(bs(a)){const{getAwsChunkedEncodingStream:i,bodyLengthChecker:o}=e;g=i("number"==typeof e.requestStreamBufferSize&&e.requestStreamBufferSize>=8192?_n(a,e.requestStreamBufferSize,n.logger):a,{base64Encoder:c,bodyLengthChecker:o,checksumLocationName:t,checksumAlgorithmFn:r,streamHasher:u}),b={...l,"content-encoding":l["content-encoding"]?`${l["content-encoding"]},aws-chunked`:"aws-chunked","transfer-encoding":"chunked","x-amz-decoded-content-length":l["content-length"],"x-amz-content-sha256":"STREAMING-UNSIGNED-PAYLOAD-TRAILER","x-amz-trailer":t},delete b["content-length"]}else if(!((e,t)=>{const r=e.toLowerCase();for(const n of Object.keys(t))if(r===n.toLowerCase())return!0;return!1})(t,l)){const e=await Zs(r,a);b={...l,[t]:c(e)}}}try{return await r({...i,request:{...o,headers:b,body:g}})}catch(v){if(v instanceof Error&&"InvalidChunkSizeError"===v.name)try{v.message.endsWith(".")||(v.message+="."),v.message+=" Set [requestStreamBufferSize=number e.g. 65_536] in client constructor to instruct AWS SDK to buffer your input stream."}catch(x){}throw v}},ra={name:"flexibleChecksumsInputMiddleware",toMiddleware:"serializerMiddleware",relation:"before",tags:["BODY_CHECKSUM"],override:!0},na=(e=[])=>{const t=[];let r=Ys.length;for(const n of e){const e=Ys.indexOf(n);-1!==e?t[e]=n:t[r++]=n}return t.filter(Boolean)},ia=async(e,{checksumAlgorithmFn:t,base64Encoder:r})=>r(await Zs(t,e)),oa={name:"flexibleChecksumsResponseMiddleware",toMiddleware:"deserializerMiddleware",relation:"after",tags:["BODY_CHECKSUM"],override:!0},sa=(e,t)=>(r,n)=>async i=>{if(!Lr.isInstance(i.request))return r(i);const o=i.input,s=await r(i),a=s.response,{requestValidationModeMember:l,responseAlgorithms:c}=t;if(l&&"ENABLED"===o[l]){const{clientName:t,commandName:r}=n,i=Object.keys(e.checksumAlgorithms??{}).filter(e=>{const t=gs(e);return void 0!==a.headers[t]}),o=na([...c??[],...i]);if("S3Client"===t&&"GetObjectCommand"===r&&o.every(e=>{const t=gs(e),r=a.headers[t];return!r||(e=>{const t=e.lastIndexOf("-");if(-1!==t){const r=e.slice(t+1);if(!r.startsWith("0")){const e=parseInt(r,10);if(!isNaN(e)&&e>=1&&e<=1e4)return!0}}return!1})(r)}))return s;await(async(e,{config:t,responseAlgorithms:r,logger:n})=>{const i=na(r),{body:o,headers:s}=e;for(const l of i){const r=gs(l),i=s[r];if(i){let s;try{s=Js(l,t)}catch(a){if(l===Xr.CRC64NVME){null==n||n.warn(`Skipping ${Xr.CRC64NVME} checksum validation: ${a.message}`);continue}throw a}const{base64Encoder:c}=t;if(bs(o))return void(e.body=On({expectedChecksum:i,checksumSourceLocation:r,checksum:new s,source:o,base64Encoder:c}));const u=await ia(o,{checksumAlgorithmFn:s,base64Encoder:c});if(u===i)break;throw new Error(`Checksum mismatch: expected "${u}" but received "${i}" in response header "${r}".`)}}})(a,{config:e,responseAlgorithms:o,logger:n.logger})}return s},aa=(e,t)=>({applyToStack:r=>{r.add(ta(e,t),ea),r.addRelativeTo(((e,t)=>(r,n)=>async i=>{const o=i.input,{requestValidationModeMember:s}=t,a=await e.requestChecksumCalculation(),l=await e.responseChecksumValidation();switch(a){case $r:en(n,"FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED","a");break;case Fr:en(n,"FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED","Z")}switch(l){case Wr:en(n,"FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED","c");break;case Gr:en(n,"FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED","b")}return s&&!o[s]&&l===Gr&&(o[s]="ENABLED"),r(i)})(e,t),ra),r.addRelativeTo(sa(e,t),oa)}});const la={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},ca=e=>({applyToStack:t=>{t.add((e=>t=>async r=>{if(!Lr.isInstance(r.request))return t(r);const{request:n}=r,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!n.headers[":authority"])delete n.headers.host,n.headers[":authority"]=n.hostname+(n.port?":"+n.port:"");else if(!n.headers.host){let e=n.hostname;null!=n.port&&(e+=`:${n.port}`),n.headers.host=e}return t(r)})(e),la)}}),ua={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},pa={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"};const da={step:"finalizeRequest",tags:["CHECK_CONTENT_LENGTH_HEADER"],name:"getCheckContentLengthHeaderPlugin",override:!0},ma=e=>({applyToStack:e=>{e.add((e,t)=>async r=>{var n;const{request:i}=r;if(Lr.isInstance(i)&&!("content-length"in i.headers)&&!("x-amz-decoded-content-length"in i.headers)){const e="Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.";"function"!=typeof(null==(n=null==t?void 0:t.logger)?void 0:n.warn)||t.logger instanceof ts||t.logger.warn(e)}return e({...r})},da)}}),fa={tags:["REGION_REDIRECT","S3"],name:"regionRedirectEndpointMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};const ha={step:"initialize",tags:["REGION_REDIRECT","S3"],name:"regionRedirectMiddleware",override:!0},ya=e=>({applyToStack:t=>{var r;t.add(function(e){return(t,r)=>async n=>{var i,o,s,a;try{return await t(n)}catch(l){if(e.followRegionRedirects){const u=null==(i=null==l?void 0:l.$metadata)?void 0:i.httpStatusCode,p="HeadBucketCommand"===r.commandName,d=null==(s=null==(o=null==l?void 0:l.$response)?void 0:o.headers)?void 0:s["x-amz-bucket-region"];if(d&&(301===u||400===u&&("IllegalLocationConstraintException"===(null==l?void 0:l.name)||p))){try{const t=d;null==(a=r.logger)||a.debug(`Redirecting from ${await e.region()} to ${t}`),r.__s3RegionRedirect=t}catch(c){throw new Error("Region redirect failed: "+c)}return t(n)}}throw l}}}(e),ha),t.addRelativeTo((r=e,(e,t)=>async n=>{const i=await r.region(),o=r.region;let s=()=>{};t.__s3RegionRedirect&&(Object.defineProperty(r,"region",{writable:!1,value:async()=>t.__s3RegionRedirect}),s=()=>Object.defineProperty(r,"region",{writable:!0,value:o}));try{const o=await e(n);if(t.__s3RegionRedirect&&(s(),i!==await r.region()))throw new Error("Region was not restored following S3 region redirect.");return o}catch(a){throw s(),a}}),fa)}}),ga=class e{constructor(e={}){r(this,"data"),r(this,"lastPurgeTime",Date.now()),this.data=e}get(e){const t=this.data[e];if(t)return t}set(e,t){return this.data[e]=t,t}delete(e){delete this.data[e]}async purgeExpired(){const t=Date.now();if(!(this.lastPurgeTime+e.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS>t))for(const e in this.data){const r=this.data[e];if(!r.isRefreshing){const n=await r.identity;n.expiration&&n.expiration.getTime()<t&&delete this.data[e]}}}};r(ga,"EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS",3e4);let ba=ga;class va{constructor(e,t=!1,n=Date.now()){r(this,"_identity"),r(this,"isRefreshing"),r(this,"accessed"),this._identity=e,this.isRefreshing=t,this.accessed=n}get identity(){return this.accessed=Date.now(),this._identity}}const xa=class e{constructor(e,t=new ba){r(this,"createSessionFn"),r(this,"cache"),this.createSessionFn=e,this.cache=t}async getS3ExpressIdentity(t,r){const n=r.Bucket,{cache:i}=this,o=i.get(n);return o?o.identity.then(t=>{var r,s;if(((null==(r=t.expiration)?void 0:r.getTime())??0)<Date.now())return i.set(n,new va(this.getIdentity(n))).identity;return((null==(s=t.expiration)?void 0:s.getTime())??0)<Date.now()+e.REFRESH_WINDOW_MS&&!o.isRefreshing&&(o.isRefreshing=!0,this.getIdentity(n).then(e=>{i.set(n,new va(Promise.resolve(e)))})),t}):i.set(n,new va(this.getIdentity(n))).identity}async getIdentity(e){var t,r;await this.cache.purgeExpired().catch(e=>{});const n=await this.createSessionFn(e);if(!(null==(t=n.Credentials)?void 0:t.AccessKeyId)||!(null==(r=n.Credentials)?void 0:r.SecretAccessKey))throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey.");return{accessKeyId:n.Credentials.AccessKeyId,secretAccessKey:n.Credentials.SecretAccessKey,sessionToken:n.Credentials.SessionToken,expiration:n.Credentials.Expiration?new Date(n.Credentials.Expiration):void 0}}};r(xa,"REFRESH_WINDOW_MS",6e4);let wa=xa;const Sa="X-Amz-S3session-Token",Na=Sa.toLowerCase();class ja extends Io{async signWithCredentials(e,t,r){const n=Ea(t);e.headers[Na]=t.sessionToken;return Ca(this,n),this.signRequest(e,r??{})}async presignWithCredentials(e,t,r){const n=Ea(t);delete e.headers[Na],e.headers[Sa]=t.sessionToken,e.query=e.query??{},e.query[Sa]=t.sessionToken;return Ca(this,n),this.presign(e,r)}}function Ea(e){return{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,expiration:e.expiration}}function Ca(e,t){const r=setTimeout(()=>{throw new Error("SignatureV4S3Express credential override was created but not called.")},10),n=e.credentialProvider;e.credentialProvider=()=>(clearTimeout(r),e.credentialProvider=n,Promise.resolve(t))}const ka={name:"s3ExpressMiddleware",step:"build",tags:["S3","S3_EXPRESS"],override:!0},Ta=e=>({applyToStack:t=>{t.add((e=>(t,r)=>async n=>{var i,o,s,a,l;if(r.endpointV2){const t=r.endpointV2,c="sigv4-s3express"===(null==(s=null==(o=null==(i=t.properties)?void 0:i.authSchemes)?void 0:o[0])?void 0:s.name);if(("S3Express"===(null==(a=t.properties)?void 0:a.backend)||"Directory"===(null==(l=t.properties)?void 0:l.bucketType))&&(en(r,"S3_EXPRESS_BUCKET","J"),r.isS3ExpressBucket=!0),c){const t=n.input.Bucket;if(t){const i=await e.s3ExpressIdentityProvider.getS3ExpressIdentity(await e.credentials(),{Bucket:t});r.s3ExpressIdentity=i,Lr.isInstance(n.request)&&i.sessionToken&&(n.request.headers[Na]=i.sessionToken)}}}return t(n)})(e),ka)}}),Ra=e=>e=>{throw e},Oa=(e,t)=>{},Pa=e=>(t,r)=>async n=>{if(!Lr.isInstance(n.request))return t(n);const i=cn(r).selectedHttpAuthScheme;if(!i)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:o={}},identity:s,signer:a}=i;let l;l=r.s3ExpressIdentity?await(async(e,t,r,n)=>{const i=await n.signWithCredentials(r,e,{});if(i.headers["X-Amz-Security-Token"]||i.headers["x-amz-security-token"])throw new Error("X-Amz-Security-Token must not be set for s3-express requests.");return i})(r.s3ExpressIdentity,0,n.request,await e.signer()):await a.sign(n.request,s,o);const c=await t({...n,request:l}).catch((a.errorHandler||Ra)(o));return(a.successHandler||Oa)(c.response,o),c},_a={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},Aa=e=>(t,r)=>async n=>{const i=await t(n),{response:o}=i;if(!qr.isInstance(o))return i;const{statusCode:s,body:a}=o;if(s<200||s>=300)return i;if(!("function"==typeof(null==a?void 0:a.stream)||"function"==typeof(null==a?void 0:a.pipe)||"function"==typeof(null==a?void 0:a.tee)))return i;let l=a,c=a;!a||"object"!=typeof a||a instanceof Uint8Array||([l,c]=await async function(e){return"function"==typeof e.stream&&(e=e.stream()),e.tee()}(a)),o.body=c;const u=await Ia(l,{streamCollector:async e=>async function(e,t){let r=0;const n=[],i=e.getReader();let o=!1;for(;!o;){const{done:e,value:s}=await i.read();if(s&&(n.push(s),r+=(null==s?void 0:s.byteLength)??0),r>=t)break;o=e}i.releaseLock();const s=new Uint8Array(Math.min(t,r));let a=0;for(const l of n){if(l.byteLength>s.byteLength-a){s.set(l.subarray(0,s.byteLength-a),a);break}s.set(l,a),a+=l.length}return s}(e,3e3)});"function"==typeof(null==l?void 0:l.destroy)&&l.destroy();const p=e.utf8Encoder(u.subarray(u.length-16));if(0===u.length&&_a[r.commandName]){const e=new Error("S3 aborted request");throw e.name="InternalError",e}return p&&p.endsWith("</Error>")&&(o.statusCode=400),i},Ia=(e=new Uint8Array,t)=>e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array),Ma={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},Da=e=>({applyToStack:t=>{t.addRelativeTo(Aa(e),Ma)}});const za={name:"bucketEndpointMiddleware",override:!0,relation:"after",toMiddleware:"endpointV2Middleware"};const Ba={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},La=e=>({applyToStack:t=>{t.add(function({bucketEndpoint:e}){return t=>async r=>{const{input:{Bucket:n}}=r;if(!e&&"string"==typeof n&&!("string"==typeof(i=n)&&0===i.indexOf("arn:")&&i.split(":").length>=6)&&n.indexOf("/")>=0){const e=new Error(`Bucket name shouldn't contain '/', received '${n}'`);throw e.name="InvalidBucketName",e}var i;return t({...r})}}(e),Ba),t.addRelativeTo(function(e){return(t,r)=>async n=>{var i,o,s,a;if(e.bucketEndpoint){const e=r.endpointV2;if(e){const t=n.input.Bucket;if("string"==typeof t)try{const n=new URL(t);r.endpointV2={...e,url:n}}catch(l){const e=`@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${t} could not be parsed as URL.`;throw"NoOpLogger"===(null==(o=null==(i=r.logger)?void 0:i.constructor)?void 0:o.name)||null==(a=null==(s=r.logger)?void 0:s.warn)||a.call(s,e),l}}}return t(n)}}(e),za)}});const qa=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),Ua=e=>qa.test(e)||e.startsWith("[")&&e.endsWith("]"),Ha=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),Fa=(e,t=!1)=>{if(!t)return Ha.test(e);const r=e.split(".");for(const n of r)if(!Fa(n))return!1;return!0},$a={},Va="endpoints";function Ga(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${Ga(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(Ga).join(", ")})`:JSON.stringify(e,null,2)}class Wa extends Error{constructor(e){super(e),this.name="EndpointError"}}const Ka=(e,t)=>(e=>{const t=e.split("."),r=[];for(const n of t){const t=n.indexOf("[");if(-1!==t){if(n.indexOf("]")!==n.length-1)throw new Wa(`Path: '${e}' does not end with ']'`);const i=n.slice(t+1,-1);if(Number.isNaN(parseInt(i)))throw new Wa(`Invalid array index: '${i}' in path: '${e}'`);0!==t&&r.push(n.slice(0,t)),r.push(i)}else r.push(n)}return r})(t).reduce((r,n)=>{if("object"!=typeof r)throw new Wa(`Index '${n}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(r)?r[parseInt(n)]:r[n]},e),Xa={[Ir.HTTP]:80,[Ir.HTTPS]:443},Qa={booleanEquals:(e,t)=>e===t,getAttr:Ka,isSet:e=>null!=e,isValidHostLabel:Fa,not:e=>!e,parseURL:e=>{const t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){const{hostname:t,port:r,protocol:n="",path:i="",query:o={}}=e,s=new URL(`${n}//${t}${r?`:${r}`:""}${i}`);return s.search=Object.entries(o).map(([e,t])=>`${e}=${t}`).join("&"),s}return new URL(e)}catch(t){return null}})();if(!t)return null;const r=t.href,{host:n,hostname:i,pathname:o,protocol:s,search:a}=t;if(a)return null;const l=s.slice(0,-1);if(!Object.values(Ir).includes(l))return null;const c=Ua(i);return{scheme:l,authority:`${n}${r.includes(`${n}:${Xa[l]}`)||"string"==typeof e&&e.includes(`${n}:${Xa[l]}`)?`:${Xa[l]}`:""}`,path:o,normalizedPath:o.endsWith("/")?o:`${o}/`,isIp:c}},stringEquals:(e,t)=>e===t,substring:(e,t,r,n)=>t>=r||e.length<r||/[^\u0000-\u007f]/.test(e)?null:n?e.substring(e.length-r,e.length-t):e.substring(t,r),uriEncode:e=>encodeURIComponent(e).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)},Ya=(e,t)=>{const r=[],n={...t.endpointParams,...t.referenceRecord};let i=0;for(;i<e.length;){const t=e.indexOf("{",i);if(-1===t){r.push(e.slice(i));break}r.push(e.slice(i,t));const o=e.indexOf("}",t);if(-1===o){r.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[o+1]&&(r.push(e.slice(t+1,o)),i=o+2);const s=e.substring(t+1,o);if(s.includes("#")){const[e,t]=s.split("#");r.push(Ka(n[e],t))}else r.push(n[s]);i=o+1}return r.join("")},Ja=(e,t,r)=>{if("string"==typeof e)return Ya(e,r);if(e.fn)return el.callFunction(e,r);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,r);throw new Wa(`'${t}': ${String(e)} is not a string, function or reference.`)},Za=({fn:e,argv:t},r)=>{const n=t.map(e=>["boolean","number"].includes(typeof e)?e:el.evaluateExpression(e,"arg",r)),i=e.split(".");return i[0]in $a&&null!=i[1]?$a[i[0]][i[1]](...n):Qa[e](...n)},el={evaluateExpression:Ja,callFunction:Za},tl=({assign:e,...t},r)=>{var n,i;if(e&&e in r.referenceRecord)throw new Wa(`'${e}' is already defined in Reference Record.`);const o=Za(t,r);return null==(i=null==(n=r.logger)?void 0:n.debug)||i.call(n,`${Va} evaluateCondition: ${Ga(t)} = ${Ga(o)}`),{result:""===o||!!o,...null!=e&&{toAssign:{name:e,value:o}}}},rl=(e=[],t)=>{var r,n;const i={};for(const o of e){const{result:e,toAssign:s}=tl(o,{...t,referenceRecord:{...t.referenceRecord,...i}});if(!e)return{result:e};s&&(i[s.name]=s.value,null==(n=null==(r=t.logger)?void 0:r.debug)||n.call(r,`${Va} assign: ${s.name} := ${Ga(s.value)}`))}return{result:!0,referenceRecord:i}},nl=(e,t)=>Object.entries(e).reduce((e,[r,n])=>({...e,[r]:n.map(e=>{const n=Ja(e,"Header value entry",t);if("string"!=typeof n)throw new Wa(`Header '${r}' value '${n}' is not a string`);return n})}),{}),il=(e,t)=>Object.entries(e).reduce((e,[r,n])=>({...e,[r]:sl.getEndpointProperty(n,t)}),{}),ol=(e,t)=>{if(Array.isArray(e))return e.map(e=>ol(e,t));switch(typeof e){case"string":return Ya(e,t);case"object":if(null===e)throw new Wa(`Unexpected endpoint property: ${e}`);return sl.getEndpointProperties(e,t);case"boolean":return e;default:throw new Wa("Unexpected endpoint property type: "+typeof e)}},sl={getEndpointProperty:ol,getEndpointProperties:il},al=(e,t)=>{const r=Ja(e,"Endpoint URL",t);if("string"==typeof r)try{return new URL(r)}catch(n){throw n}throw new Wa("Endpoint URL must be a string, got "+typeof r)},ll=(e,t)=>{var r,n;const{conditions:i,endpoint:o}=e,{result:s,referenceRecord:a}=rl(i,t);if(!s)return;const l={...t,referenceRecord:{...t.referenceRecord,...a}},{url:c,properties:u,headers:p}=o;return null==(n=null==(r=t.logger)?void 0:r.debug)||n.call(r,`${Va} Resolving endpoint from template: ${Ga(o)}`),{...null!=p&&{headers:nl(p,l)},...null!=u&&{properties:il(u,l)},url:al(c,l)}},cl=(e,t)=>{const{conditions:r,error:n}=e,{result:i,referenceRecord:o}=rl(r,t);if(i)throw new Wa(Ja(n,"Error",{...t,referenceRecord:{...t.referenceRecord,...o}}))},ul=(e,t)=>{for(const r of e)if("endpoint"===r.type){const e=ll(r,t);if(e)return e}else if("error"===r.type)cl(r,t);else{if("tree"!==r.type)throw new Wa(`Unknown endpoint rule: ${r}`);{const e=pl.evaluateTreeRule(r,t);if(e)return e}}throw new Wa("Rules evaluation failed")},pl={evaluateRules:ul,evaluateTreeRule:(e,t)=>{const{conditions:r,rules:n}=e,{result:i,referenceRecord:o}=rl(r,t);if(i)return pl.evaluateRules(n,{...t,referenceRecord:{...t.referenceRecord,...o}})}},dl=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!dl(t))return!1;return!0}return!!Fa(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!Ua(e)))};let ml={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}]};const fl={isVirtualHostableS3Bucket:dl,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[r,n,i,o,s,...a]=t;if("arn"!==r||""===n||""===i||""===a.join(":"))return null;return{partition:n,service:i,region:o,accountId:s,resourceId:a.map(e=>e.split("/")).flat()}},partition:e=>{const{partitions:t}=ml;for(const n of t){const{regions:t,outputs:r}=n;for(const[n,i]of Object.entries(t))if(n===e)return{...r,...i}}for(const n of t){const{regionRegex:t,outputs:r}=n;if(new RegExp(t).test(e))return{...r}}const r=t.find(e=>"aws"===e.id);if(!r)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...r.outputs}}};var hl,yl;$a.aws=fl,(yl=hl||(hl={})).STANDARD="standard",yl.ADAPTIVE="adaptive";const gl=hl.STANDARD,bl=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],vl=["TimeoutError","RequestTimeout","RequestTimeoutException"],xl=[500,502,503,504],wl=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Sl=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],Nl=e=>{var t,r;return 429===(null==(t=e.$metadata)?void 0:t.httpStatusCode)||bl.includes(e.name)||1==(null==(r=e.$retryable)?void 0:r.throttling)},jl=(e,t=0)=>{var r;return(e=>void 0!==(null==e?void 0:e.$retryable))(e)||(e=>{var t;return null==(t=e.$metadata)?void 0:t.clockSkewCorrected})(e)||vl.includes(e.name)||wl.includes((null==e?void 0:e.code)||"")||Sl.includes((null==e?void 0:e.code)||"")||xl.includes((null==(r=e.$metadata)?void 0:r.httpStatusCode)||0)||(e=>!!(e&&e instanceof TypeError)&&new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]).has(e.message))(e)||void 0!==e.cause&&t<=10&&jl(e.cause,t+1)},El=class e{constructor(e){r(this,"beta"),r(this,"minCapacity"),r(this,"minFillRate"),r(this,"scaleConstant"),r(this,"smooth"),r(this,"currentCapacity",0),r(this,"enabled",!1),r(this,"lastMaxRate",0),r(this,"measuredTxRate",0),r(this,"requestCount",0),r(this,"fillRate"),r(this,"lastThrottleTime"),r(this,"lastTimestamp",0),r(this,"lastTxRateBucket"),r(this,"maxCapacity"),r(this,"timeWindow",0),this.beta=(null==e?void 0:e.beta)??.7,this.minCapacity=(null==e?void 0:e.minCapacity)??1,this.minFillRate=(null==e?void 0:e.minFillRate)??.5,this.scaleConstant=(null==e?void 0:e.scaleConstant)??.4,this.smooth=(null==e?void 0:e.smooth)??.8;const t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(t){if(this.enabled){if(this.refillTokenBucket(),t>this.currentCapacity){const r=(t-this.currentCapacity)/this.fillRate*1e3;await new Promise(t=>e.setTimeoutFn(t,r))}this.currentCapacity=this.currentCapacity-t}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp)return void(this.lastTimestamp=e);const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),Nl(e)){const e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const r=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(r)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){const e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}};r(El,"setTimeoutFn",setTimeout);let Cl=El;const kl=({retryDelay:e,retryCount:t,retryCost:r})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(2e4,e),getRetryCost:()=>r});class Tl{constructor(e){r(this,"maxAttempts"),r(this,"mode",hl.STANDARD),r(this,"capacity",500),r(this,"retryBackoffStrategy",(()=>{let e=100;return{computeNextBackoffDelay:t=>Math.floor(Math.min(2e4,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})()),r(this,"maxAttemptsProvider"),this.maxAttempts=e,this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return kl({retryDelay:100,retryCount:0})}async refreshRetryTokenForRetry(e,t){const r=await this.getMaxAttempts();if(this.shouldRetry(e,t,r)){const r=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===r?500:100);const n=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),i=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,n):n,o=this.getCapacityCost(r);return this.capacity-=o,kl({retryDelay:i,retryCount:e.getRetryCount()+1,retryCost:o})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(500,this.capacity+(e.getRetryCost()??1))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return 3}}shouldRetry(e,t,r){return e.getRetryCount()+1<r&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?10:5}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class Rl{constructor(e,t){r(this,"maxAttemptsProvider"),r(this,"rateLimiter"),r(this,"standardRetryStrategy"),r(this,"mode",hl.ADAPTIVE),this.maxAttemptsProvider=e;const{rateLimiter:n}=t??{};this.rateLimiter=n??new Cl,this.standardRetryStrategy=new Tl(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}const Ol=/\d{12}\.ddb/;const Pl="user-agent",_l="x-amz-user-agent",Al=/[^!$%&'*+\-.^_`|~\w]/g,Il=/[^!$%&'*+\-.^_`|~\w#]/g;const Ml=e=>(t,r)=>async n=>{var i,o,s,a;const{request:l}=n;if(!Lr.isInstance(l))return t(n);const{headers:c}=l,u=(null==(i=null==r?void 0:r.userAgent)?void 0:i.map(Dl))||[],p=(await e.defaultUserAgentProvider()).map(Dl);await async function(e,t,r){var n,i,o,s,a;const l=r.request;if("rpc-v2-cbor"===(null==(n=null==l?void 0:l.headers)?void 0:n["smithy-protocol"])&&en(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const r=await t.retryStrategy();if("string"==typeof r.mode)switch(r.mode){case hl.ADAPTIVE:en(e,"RETRY_MODE_ADAPTIVE","F");break;case hl.STANDARD:en(e,"RETRY_MODE_STANDARD","E")}}if("function"==typeof t.accountIdEndpointMode){const r=e.endpointV2;switch(String(null==(i=null==r?void 0:r.url)?void 0:i.hostname).match(Ol)&&en(e,"ACCOUNT_ID_ENDPOINT","O"),await(null==(o=t.accountIdEndpointMode)?void 0:o.call(t))){case"disabled":en(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":en(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":en(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const c=null==(a=null==(s=e.__smithy_context)?void 0:s.selectedHttpAuthScheme)?void 0:a.identity;if(null==c?void 0:c.$source){const t=c;t.accountId&&en(e,"RESOLVED_ACCOUNT_ID","T");for(const[r,n]of Object.entries(t.$source??{}))en(e,r,n)}}(r,e,n);const d=r;p.push(`m/${function(e){let t="";for(const r in e){const n=e[r];if(!(t.length+n.length+1<=1024))break;t.length?t+=","+n:t+=n}return t}(Object.assign({},null==(o=r.__smithy_context)?void 0:o.features,null==(s=d.__aws_sdk_context)?void 0:s.features))}`);const m=(null==(a=null==e?void 0:e.customUserAgent)?void 0:a.map(Dl))||[],f=await e.userAgentAppId();f&&p.push(Dl(["app",`${f}`]));const h=[].concat([...p,...u,...m]).join(" "),y=[...p.filter(e=>e.startsWith("aws-sdk-")),...m].join(" ");return"browser"!==e.runtime?(y&&(c[_l]=c[_l]?`${c[Pl]} ${y}`:y),c[Pl]=h):c[_l]=h,t({...n,request:l})},Dl=e=>{var t;const r=e[0].split("/").map(e=>e.replace(Al,"-")).join("/"),n=null==(t=e[1])?void 0:t.replace(Il,"-"),i=r.indexOf("/"),o=r.substring(0,i);let s=r.substring(i+1);return"api"===o&&(s=s.toLowerCase()),[o,s,n].filter(e=>e&&e.length>0).reduce((e,t,r)=>{switch(r){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}},"")},zl={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Bl=new Set,Ll=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),ql=e=>{const{region:t,useFipsEndpoint:r}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{const e=(e=>Ll(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e)("function"==typeof t?await t():t);return((e,t=Fa)=>{if(Bl.has(e)||t(e))Bl.add(e);else if("*"!==e)throw new Error(`Region not accepted: region="${e}" is not a valid hostname component.`)})(e),e},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!Ll(e)||("function"!=typeof r?Promise.resolve(!!r):r())}})},Ul="content-length";const Hl={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Fl=e=>({applyToStack:t=>{var r;t.add((r=e.bodyLengthChecker,e=>async t=>{const n=t.request;if(Lr.isInstance(n)){const{body:e,headers:t}=n;if(e&&-1===Object.keys(t).map(e=>e.toLowerCase()).indexOf(Ul))try{const t=r(e);n.headers={...n.headers,[Ul]:String(t)}}catch(i){}}return e({...t,request:n})}),Hl)}}),$l=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Vl=/(\d+\.){3}\d+/,Gl=/\.\./,Wl=e=>$l.test(e)&&!Vl.test(e)&&!Gl.test(e),Kl=e=>{const[t,r,n,,,i]=e.split(":"),o="arn"===t&&e.split(":").length>=6,s=Boolean(o&&r&&n&&i);if(o&&!s)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return s},Xl=(e,t,r,n=!1)=>{const i=async()=>{let i;if(n){const n=r.clientContextParams;i=(null==n?void 0:n[e])??r[e]??r[t]}else i=r[e]??r[t];return"function"==typeof i?i():i};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof r.credentials?await r.credentials():r.credentials;return(null==e?void 0:e.credentialScope)??(null==e?void 0:e.CredentialScope)}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof r.credentials?await r.credentials():r.credentials;return(null==e?void 0:e.accountId)??(null==e?void 0:e.AccountId)}:"endpoint"===e||"endpoint"===t?async()=>{if(!1===r.isCustomEndpoint)return;const e=await i();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:r,port:n,path:i}=e;return`${t}//${r}${n?":"+n:""}${i}`}}return e}:i},Ql=async e=>{},Yl=e=>{if("object"==typeof e){if("url"in e){const t=ri(e.url);if(e.headers){t.headers={};for(const[r,n]of Object.entries(e.headers))t.headers[r.toLowerCase()]=n.join(", ")}return t}return e}return ri(e)},Jl=async(e,t,r)=>{var n;const i={},o=(null==(n=null==t?void 0:t.getEndpointParameterInstructions)?void 0:n.call(t))||{};for(const[s,a]of Object.entries(o))switch(a.type){case"staticContextParams":i[s]=a.value;break;case"contextParams":i[s]=e[a.name];break;case"clientContextParams":case"builtInParams":i[s]=await Xl(a.name,s,r,"builtInParams"!==a.type)();break;case"operationContextParams":i[s]=a.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(a))}return 0===Object.keys(o).length&&Object.assign(i,r),"s3"===String(r.serviceId).toLowerCase()&&await(async e=>{const t=(null==e?void 0:e.Bucket)||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Kl(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!Wl(t)||-1!==t.indexOf(".")&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e})(i),i},Zl=({config:e,instructions:t})=>(r,n)=>async i=>{var o,s,a;e.isCustomEndpoint&&function(e,t,r){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=r}(n,"ENDPOINT_OVERRIDE","N");const l=await(async(e,t,r,n)=>{if(!r.isCustomEndpoint){let e;e=r.serviceConfiguredEndpoint?await r.serviceConfiguredEndpoint():await Ql(r.serviceId),e&&(r.endpoint=()=>Promise.resolve(Yl(e)),r.isCustomEndpoint=!0)}const i=await Jl(e,t,r);if("function"!=typeof r.endpointProvider)throw new Error("config.endpointProvider is not set.");const o=r.endpointProvider(i,n);if(r.isCustomEndpoint&&r.endpoint){const e=await r.endpoint();if(null==e?void 0:e.headers){o.headers??(o.headers={});for(const[t,r]of Object.entries(e.headers))o.headers[t]=Array.isArray(r)?r:[r]}}return o})(i.input,{getEndpointParameterInstructions:()=>t},{...e},n);n.endpointV2=l,n.authSchemes=null==(o=l.properties)?void 0:o.authSchemes;const c=null==(s=n.authSchemes)?void 0:s[0];if(c){n.signing_region=c.signingRegion,n.signing_service=c.signingName;const e=cn(n),t=null==(a=null==e?void 0:e.selectedHttpAuthScheme)?void 0:a.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:c.signingRegion,signingRegion:c.signingRegion,signing_service:c.signingName,signingName:c.signingName,signingRegionSet:c.signingRegionSet},c.properties))}return r({...i})},ec={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:"serializerMiddleware"},tc=(e,t)=>({applyToStack:r=>{r.addRelativeTo(Zl({config:e,instructions:t}),ec)}}),rc=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):"string"==typeof e?new Error(e):new Error(`AWS SDK error wrapper for ${e}`),nc=e=>{const{retryStrategy:t,retryMode:r}=e,n=un(e.maxAttempts??3);let i=t?Promise.resolve(t):void 0;return Object.assign(e,{maxAttempts:n,retryStrategy:()=>i??(i=(async()=>await un(r)()===hl.ADAPTIVE?new Rl(n):new Tl(n))())})},ic=e=>(null==e?void 0:e.body)instanceof ReadableStream,oc=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,sc=e=>{const t={error:e,errorType:ac(e)},r=uc(e.$response);return r&&(t.retryAfterHint=r),t},ac=e=>Nl(e)?"THROTTLING":jl(e)?"TRANSIENT":(e=>{var t;if(void 0!==(null==(t=e.$metadata)?void 0:t.httpStatusCode)){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!jl(e)}return!1})(e)?"SERVER_ERROR":"CLIENT_ERROR",lc={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},cc=e=>({applyToStack:t=>{t.add((e=>(t,r)=>async n=>{var i;let o=await e.retryStrategy();const s=await e.maxAttempts();if(!oc(o))return(null==o?void 0:o.mode)&&(r.userAgent=[...r.userAgent||[],["cfg/retry-mode",o.mode]]),o.retry(t,n);{let e=await o.acquireInitialRetryToken(r.partition_id),c=new Error,u=0,p=0;const{request:d}=n,m=Lr.isInstance(d);for(m&&(d.headers["amz-sdk-invocation-id"]=Ei());;)try{m&&(d.headers["amz-sdk-request"]=`attempt=${u+1}; max=${s}`);const{response:r,output:i}=await t(n);return o.recordSuccess(e),i.$metadata.attempts=u+1,i.$metadata.totalRetryDelay=p,{response:r,output:i}}catch(a){const t=sc(a);if(c=rc(a),m&&ic(d))throw null==(i=r.logger instanceof ts?console:r.logger)||i.warn("An error was encountered in a non-retryable streaming request."),c;try{e=await o.refreshRetryTokenForRetry(e,t)}catch(l){throw c.$metadata||(c.$metadata={}),c.$metadata.attempts=u+1,c.$metadata.totalRetryDelay=p,c}u=e.getRetryCount();const n=e.getRetryDelay();p+=n,await new Promise(e=>setTimeout(e,n))}}})(e),lc)}}),uc=e=>{if(!qr.isInstance(e))return;const t=Object.keys(e.headers).find(e=>"retry-after"===e.toLowerCase());if(!t)return;const r=e.headers[t],n=Number(r);if(!Number.isNaN(n))return new Date(1e3*n);return new Date(r)};class pc{constructor(e){r(this,"sigv4aSigner"),r(this,"sigv4Signer"),r(this,"signerOptions"),this.sigv4Signer=new ja(e),this.signerOptions=e}static sigv4aDependency(){return"none"}async sign(e,t={}){return"*"===t.signingRegion?this.getSigv4aSigner().sign(e,t):this.sigv4Signer.sign(e,t)}async signWithCredentials(e,t,r={}){if("*"===r.signingRegion)throw this.getSigv4aSigner(),new Error('signWithCredentials with signingRegion \'*\' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt');return this.sigv4Signer.signWithCredentials(e,t,r)}async presign(e,t={}){if("*"===t.signingRegion)throw this.getSigv4aSigner(),new Error('presign with signingRegion \'*\' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt');return this.sigv4Signer.presign(e,t)}async presignWithCredentials(e,t,r={}){if("*"===r.signingRegion)throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(e,t,r)}getSigv4aSigner(){if(!this.sigv4aSigner)throw"node"===this.signerOptions.runtime?new Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt"):new Error("JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a");return this.sigv4aSigner}}const dc="required",mc="type",fc="rules",hc="conditions",yc="fn",gc="argv",bc="ref",vc="assign",xc="url",wc="properties",Sc="backend",Nc="authSchemes",jc="disableDoubleEncoding",Ec="signingName",Cc="signingRegion",kc="headers",Tc="signingRegionSet",Rc=!0,Oc="isSet",Pc="booleanEquals",_c="error",Ac="aws.partition",Ic="stringEquals",Mc="getAttr",Dc="name",zc="substring",Bc="bucketSuffix",Lc="parseURL",qc="endpoint",Uc="tree",Hc="aws.isVirtualHostableS3Bucket",Fc="{url#scheme}://{Bucket}.{url#authority}{url#path}",$c="not",Vc="accessPointSuffix",Gc="{url#scheme}://{url#authority}{url#path}",Wc="hardwareType",Kc="regionPrefix",Xc="bucketAliasSuffix",Qc="outpostId",Yc="isValidHostLabel",Jc="sigv4a",Zc="s3-outposts",eu="s3",tu="{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",ru="https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",nu="https://{Bucket}.s3.{partitionResult#dnsSuffix}",iu="aws.parseArn",ou="bucketArn",su="arnType",au="s3-object-lambda",lu="accesspoint",cu="accessPointName",uu="{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",pu="mrapPartition",du="outpostType",mu="arnPrefix",fu="{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",hu="https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",yu="https://s3.{partitionResult#dnsSuffix}",gu={[dc]:!1,[mc]:"string"},bu={[dc]:!0,default:!1,[mc]:"boolean"},vu={[dc]:!1,[mc]:"boolean"},xu={[yc]:Pc,[gc]:[{[bc]:"Accelerate"},!0]},wu={[yc]:Pc,[gc]:[{[bc]:"UseFIPS"},!0]},Su={[yc]:Pc,[gc]:[{[bc]:"UseDualStack"},!0]},Nu={[yc]:Oc,[gc]:[{[bc]:"Endpoint"}]},ju={[yc]:Ac,[gc]:[{[bc]:"Region"}],[vc]:"partitionResult"},Eu={[yc]:Ic,[gc]:[{[yc]:Mc,[gc]:[{[bc]:"partitionResult"},Dc]},"aws-cn"]},Cu={[yc]:Oc,[gc]:[{[bc]:"Bucket"}]},ku={[bc]:"Bucket"},Tu={[hc]:[xu],[_c]:"S3Express does not support S3 Accelerate.",[mc]:_c},Ru={[hc]:[Nu,{[yc]:Lc,[gc]:[{[bc]:"Endpoint"}],[vc]:"url"}],[fc]:[{[hc]:[{[yc]:Oc,[gc]:[{[bc]:"DisableS3ExpressSessionAuth"}]},{[yc]:Pc,[gc]:[{[bc]:"DisableS3ExpressSessionAuth"},!0]}],[fc]:[{[hc]:[{[yc]:Pc,[gc]:[{[yc]:Mc,[gc]:[{[bc]:"url"},"isIp"]},!0]}],[fc]:[{[hc]:[{[yc]:"uriEncode",[gc]:[ku],[vc]:"uri_encoded_bucket"}],[fc]:[{[qc]:{[xc]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",[wc]:{[Sc]:"S3Express",[Nc]:[{[jc]:!0,[Dc]:"sigv4",[Ec]:"s3express",[Cc]:"{Region}"}]},[kc]:{}},[mc]:qc}],[mc]:Uc}],[mc]:Uc},{[hc]:[{[yc]:Hc,[gc]:[ku,!1]}],[fc]:[{[qc]:{[xc]:Fc,[wc]:{[Sc]:"S3Express",[Nc]:[{[jc]:!0,[Dc]:"sigv4",[Ec]:"s3express",[Cc]:"{Region}"}]},[kc]:{}},[mc]:qc}],[mc]:Uc},{[_c]:"S3Express bucket name is not a valid virtual hostable name.",[mc]:_c}],[mc]:Uc},{[hc]:[{[yc]:Pc,[gc]:[{[yc]:Mc,[gc]:[{[bc]:"url"},"isIp"]},!0]}],[fc]:[{[hc]:[{[yc]:"uriEncode",[gc]:[ku],[vc]:"uri_encoded_bucket"}],[fc]:[{[qc]:{[xc]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",[wc]:{[Sc]:"S3Express",[Nc]:[{[jc]:!0,[Dc]:"sigv4-s3express",[Ec]:"s3express",[Cc]:"{Region}"}]},[kc]:{}},[mc]:qc}],[mc]:Uc}],[mc]:Uc},{[hc]:[{[yc]:Hc,[gc]:[ku,!1]}],[fc]:[{[qc]:{[xc]:Fc,[wc]:{[Sc]:"S3Express",[Nc]:[{[jc]:!0,[Dc]:"sigv4-s3express",[Ec]:"s3express",[Cc]:"{Region}"}]},[kc]:{}},[mc]:qc}],[mc]:Uc},{[_c]:"S3Express bucket name is not a valid virtual hostable name.",[mc]:_c}],[mc]:Uc},Ou={[yc]:Lc,[gc]:[{[bc]:"Endpoint"}],[vc]:"url"},Pu={[yc]:Pc,[gc]:[{[yc]:Mc,[gc]:[{[bc]:"url"},"isIp"]},!0]},_u={[bc]:"url"},Au={[yc]:"uriEncode",[gc]:[ku],[vc]:"uri_encoded_bucket"},Iu={[Sc]:"S3Express",[Nc]:[{[jc]:!0,[Dc]:"sigv4",[Ec]:"s3express",[Cc]:"{Region}"}]},Mu={},Du={[yc]:Hc,[gc]:[ku,!1]},zu={[_c]:"S3Express bucket name is not a valid virtual hostable name.",[mc]:_c},Bu={[yc]:Oc,[gc]:[{[bc]:"UseS3ExpressControlEndpoint"}]},Lu={[yc]:Pc,[gc]:[{[bc]:"UseS3ExpressControlEndpoint"},!0]},qu={[yc]:$c,[gc]:[Nu]},Uu={[yc]:Pc,[gc]:[{[bc]:"UseDualStack"},!1]},Hu={[yc]:Pc,[gc]:[{[bc]:"UseFIPS"},!1]},Fu={[_c]:"Unrecognized S3Express bucket name format.",[mc]:_c},$u={[yc]:$c,[gc]:[Cu]},Vu={[bc]:Wc},Gu={[hc]:[qu],[_c]:"Expected a endpoint to be specified but no endpoint was found",[mc]:_c},Wu={[Nc]:[{[jc]:!0,[Dc]:Jc,[Ec]:Zc,[Tc]:["*"]},{[jc]:!0,[Dc]:"sigv4",[Ec]:Zc,[Cc]:"{Region}"}]},Ku={[yc]:Pc,[gc]:[{[bc]:"ForcePathStyle"},!1]},Xu={[bc]:"ForcePathStyle"},Qu={[yc]:Pc,[gc]:[{[bc]:"Accelerate"},!1]},Yu={[yc]:Ic,[gc]:[{[bc]:"Region"},"aws-global"]},Ju={[Nc]:[{[jc]:!0,[Dc]:"sigv4",[Ec]:eu,[Cc]:"us-east-1"}]},Zu={[yc]:$c,[gc]:[Yu]},ep={[yc]:Pc,[gc]:[{[bc]:"UseGlobalEndpoint"},!0]},tp={[xc]:"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[wc]:{[Nc]:[{[jc]:!0,[Dc]:"sigv4",[Ec]:eu,[Cc]:"{Region}"}]},[kc]:{}},rp={[Nc]:[{[jc]:!0,[Dc]:"sigv4",[Ec]:eu,[Cc]:"{Region}"}]},np={[yc]:Pc,[gc]:[{[bc]:"UseGlobalEndpoint"},!1]},ip={[xc]:"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",[wc]:rp,[kc]:{}},op={[xc]:"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",[wc]:rp,[kc]:{}},sp={[xc]:"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[wc]:rp,[kc]:{}},ap={[yc]:Pc,[gc]:[{[yc]:Mc,[gc]:[_u,"isIp"]},!1]},lp={[xc]:tu,[wc]:rp,[kc]:{}},cp={[xc]:Fc,[wc]:rp,[kc]:{}},up={[qc]:cp,[mc]:qc},pp={[xc]:ru,[wc]:rp,[kc]:{}},dp={[xc]:"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",[wc]:rp,[kc]:{}},mp={[_c]:"Invalid region: region was not a valid DNS name.",[mc]:_c},fp={[bc]:ou},hp={[bc]:su},yp={[yc]:Mc,[gc]:[fp,"service"]},gp={[bc]:cu},bp={[hc]:[Su],[_c]:"S3 Object Lambda does not support Dual-stack",[mc]:_c},vp={[hc]:[xu],[_c]:"S3 Object Lambda does not support S3 Accelerate",[mc]:_c},xp={[hc]:[{[yc]:Oc,[gc]:[{[bc]:"DisableAccessPoints"}]},{[yc]:Pc,[gc]:[{[bc]:"DisableAccessPoints"},!0]}],[_c]:"Access points are not supported for this operation",[mc]:_c},wp={[hc]:[{[yc]:Oc,[gc]:[{[bc]:"UseArnRegion"}]},{[yc]:Pc,[gc]:[{[bc]:"UseArnRegion"},!1]},{[yc]:$c,[gc]:[{[yc]:Ic,[gc]:[{[yc]:Mc,[gc]:[fp,"region"]},"{Region}"]}]}],[_c]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",[mc]:_c},Sp={[yc]:Mc,[gc]:[{[bc]:"bucketPartition"},Dc]},Np={[yc]:Mc,[gc]:[fp,"accountId"]},jp={[Nc]:[{[jc]:!0,[Dc]:"sigv4",[Ec]:au,[Cc]:"{bucketArn#region}"}]},Ep={[_c]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",[mc]:_c},Cp={[_c]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",[mc]:_c},kp={[_c]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",[mc]:_c},Tp={[_c]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",[mc]:_c},Rp={[_c]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",[mc]:_c},Op={[_c]:"Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided",[mc]:_c},Pp={[Nc]:[{[jc]:!0,[Dc]:"sigv4",[Ec]:eu,[Cc]:"{bucketArn#region}"}]},_p={[Nc]:[{[jc]:!0,[Dc]:Jc,[Ec]:Zc,[Tc]:["*"]},{[jc]:!0,[Dc]:"sigv4",[Ec]:Zc,[Cc]:"{bucketArn#region}"}]},Ap={[yc]:iu,[gc]:[ku]},Ip={[xc]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[wc]:rp,[kc]:{}},Mp={[xc]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[wc]:rp,[kc]:{}},Dp={[xc]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[wc]:rp,[kc]:{}},zp={[xc]:fu,[wc]:rp,[kc]:{}},Bp={[xc]:"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[wc]:rp,[kc]:{}},Lp={[bc]:"UseObjectLambdaEndpoint"},qp={[Nc]:[{[jc]:!0,[Dc]:"sigv4",[Ec]:au,[Cc]:"{Region}"}]},Up={[xc]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[wc]:rp,[kc]:{}},Hp={[xc]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}",[wc]:rp,[kc]:{}},Fp={[xc]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[wc]:rp,[kc]:{}},$p={[xc]:Gc,[wc]:rp,[kc]:{}},Vp={[xc]:"https://s3.{Region}.{partitionResult#dnsSuffix}",[wc]:rp,[kc]:{}},Gp=[{[bc]:"Region"}],Wp=[{[bc]:"Endpoint"}],Kp=[ku],Xp=[xu],Qp=[Nu,Ou],Yp=[{[yc]:Oc,[gc]:[{[bc]:"DisableS3ExpressSessionAuth"}]},{[yc]:Pc,[gc]:[{[bc]:"DisableS3ExpressSessionAuth"},!0]}],Jp=[Au],Zp=[Du],ed=[ju],td=[wu,Su],rd=[wu,Uu],nd=[Hu,Su],id=[Hu,Uu],od=[{[yc]:zc,[gc]:[ku,6,14,!0],[vc]:"s3expressAvailabilityZoneId"},{[yc]:zc,[gc]:[ku,14,16,!0],[vc]:"s3expressAvailabilityZoneDelim"},{[yc]:Ic,[gc]:[{[bc]:"s3expressAvailabilityZoneDelim"},"--"]}],sd=[{[hc]:[wu,Su],[qc]:{[xc]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[wc]:Iu,[kc]:{}},[mc]:qc},{[hc]:rd,[qc]:{[xc]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[wc]:Iu,[kc]:{}},[mc]:qc},{[hc]:nd,[qc]:{[xc]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[wc]:Iu,[kc]:{}},[mc]:qc},{[hc]:id,[qc]:{[xc]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[wc]:Iu,[kc]:{}},[mc]:qc}],ad=[{[yc]:zc,[gc]:[ku,6,15,!0],[vc]:"s3expressAvailabilityZoneId"},{[yc]:zc,[gc]:[ku,15,17,!0],[vc]:"s3expressAvailabilityZoneDelim"},{[yc]:Ic,[gc]:[{[bc]:"s3expressAvailabilityZoneDelim"},"--"]}],ld=[{[yc]:zc,[gc]:[ku,6,19,!0],[vc]:"s3expressAvailabilityZoneId"},{[yc]:zc,[gc]:[ku,19,21,!0],[vc]:"s3expressAvailabilityZoneDelim"},{[yc]:Ic,[gc]:[{[bc]:"s3expressAvailabilityZoneDelim"},"--"]}],cd=[{[yc]:zc,[gc]:[ku,6,20,!0],[vc]:"s3expressAvailabilityZoneId"},{[yc]:zc,[gc]:[ku,20,22,!0],[vc]:"s3expressAvailabilityZoneDelim"},{[yc]:Ic,[gc]:[{[bc]:"s3expressAvailabilityZoneDelim"},"--"]}],ud=[{[yc]:zc,[gc]:[ku,6,26,!0],[vc]:"s3expressAvailabilityZoneId"},{[yc]:zc,[gc]:[ku,26,28,!0],[vc]:"s3expressAvailabilityZoneDelim"},{[yc]:Ic,[gc]:[{[bc]:"s3expressAvailabilityZoneDelim"},"--"]}],pd=[{[hc]:[wu,Su],[qc]:{[xc]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[wc]:{[Sc]:"S3Express",[Nc]:[{[jc]:!0,[Dc]:"sigv4-s3express",[Ec]:"s3express",[Cc]:"{Region}"}]},[kc]:{}},[mc]:qc},{[hc]:rd,[qc]:{[xc]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[wc]:{[Sc]:"S3Express",[Nc]:[{[jc]:!0,[Dc]:"sigv4-s3express",[Ec]:"s3express",[Cc]:"{Region}"}]},[kc]:{}},[mc]:qc},{[hc]:nd,[qc]:{[xc]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[wc]:{[Sc]:"S3Express",[Nc]:[{[jc]:!0,[Dc]:"sigv4-s3express",[Ec]:"s3express",[Cc]:"{Region}"}]},[kc]:{}},[mc]:qc},{[hc]:id,[qc]:{[xc]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[wc]:{[Sc]:"S3Express",[Nc]:[{[jc]:!0,[Dc]:"sigv4-s3express",[Ec]:"s3express",[Cc]:"{Region}"}]},[kc]:{}},[mc]:qc}],dd=[ku,0,7,!0],md=[{[yc]:zc,[gc]:[ku,7,15,!0],[vc]:"s3expressAvailabilityZoneId"},{[yc]:zc,[gc]:[ku,15,17,!0],[vc]:"s3expressAvailabilityZoneDelim"},{[yc]:Ic,[gc]:[{[bc]:"s3expressAvailabilityZoneDelim"},"--"]}],fd=[{[yc]:zc,[gc]:[ku,7,16,!0],[vc]:"s3expressAvailabilityZoneId"},{[yc]:zc,[gc]:[ku,16,18,!0],[vc]:"s3expressAvailabilityZoneDelim"},{[yc]:Ic,[gc]:[{[bc]:"s3expressAvailabilityZoneDelim"},"--"]}],hd=[{[yc]:zc,[gc]:[ku,7,20,!0],[vc]:"s3expressAvailabilityZoneId"},{[yc]:zc,[gc]:[ku,20,22,!0],[vc]:"s3expressAvailabilityZoneDelim"},{[yc]:Ic,[gc]:[{[bc]:"s3expressAvailabilityZoneDelim"},"--"]}],yd=[{[yc]:zc,[gc]:[ku,7,21,!0],[vc]:"s3expressAvailabilityZoneId"},{[yc]:zc,[gc]:[ku,21,23,!0],[vc]:"s3expressAvailabilityZoneDelim"},{[yc]:Ic,[gc]:[{[bc]:"s3expressAvailabilityZoneDelim"},"--"]}],gd=[{[yc]:zc,[gc]:[ku,7,27,!0],[vc]:"s3expressAvailabilityZoneId"},{[yc]:zc,[gc]:[ku,27,29,!0],[vc]:"s3expressAvailabilityZoneDelim"},{[yc]:Ic,[gc]:[{[bc]:"s3expressAvailabilityZoneDelim"},"--"]}],bd=[Cu],vd=[{[yc]:Yc,[gc]:[{[bc]:Qc},!1]}],xd=[{[yc]:Ic,[gc]:[{[bc]:Kc},"beta"]}],wd=[{[yc]:Yc,[gc]:[{[bc]:"Region"},!1]}],Sd=[{[yc]:Ic,[gc]:[{[bc]:"Region"},"us-east-1"]}],Nd=[{[yc]:Ic,[gc]:[hp,lu]}],jd=[{[yc]:Mc,[gc]:[fp,"resourceId[1]"],[vc]:cu},{[yc]:$c,[gc]:[{[yc]:Ic,[gc]:[gp,""]}]}],Ed=[fp,"resourceId[1]"],Cd=[Su],kd=[{[yc]:$c,[gc]:[{[yc]:Ic,[gc]:[{[yc]:Mc,[gc]:[fp,"region"]},""]}]}],Td=[{[yc]:$c,[gc]:[{[yc]:Oc,[gc]:[{[yc]:Mc,[gc]:[fp,"resourceId[2]"]}]}]}],Rd=[fp,"resourceId[2]"],Od=[{[yc]:Ac,[gc]:[{[yc]:Mc,[gc]:[fp,"region"]}],[vc]:"bucketPartition"}],Pd=[{[yc]:Ic,[gc]:[Sp,{[yc]:Mc,[gc]:[{[bc]:"partitionResult"},Dc]}]}],_d=[{[yc]:Yc,[gc]:[{[yc]:Mc,[gc]:[fp,"region"]},!0]}],Ad=[{[yc]:Yc,[gc]:[Np,!1]}],Id=[{[yc]:Yc,[gc]:[gp,!1]}],Md=[wu],Dd=[{[yc]:Yc,[gc]:[{[bc]:"Region"},!0]}],zd={parameters:{Bucket:gu,Region:gu,UseFIPS:bu,UseDualStack:bu,Endpoint:gu,ForcePathStyle:bu,Accelerate:bu,UseGlobalEndpoint:bu,UseObjectLambdaEndpoint:vu,Key:gu,Prefix:gu,CopySource:gu,DisableAccessPoints:vu,DisableMultiRegionAccessPoints:bu,UseArnRegion:vu,UseS3ExpressControlEndpoint:vu,DisableS3ExpressSessionAuth:vu},[fc]:[{[hc]:[{[yc]:Oc,[gc]:Gp}],[fc]:[{[hc]:[xu,wu],error:"Accelerate cannot be used with FIPS",[mc]:_c},{[hc]:[Su,Nu],error:"Cannot set dual-stack in combination with a custom endpoint.",[mc]:_c},{[hc]:[Nu,wu],error:"A custom endpoint cannot be combined with FIPS",[mc]:_c},{[hc]:[Nu,xu],error:"A custom endpoint cannot be combined with S3 Accelerate",[mc]:_c},{[hc]:[wu,ju,Eu],error:"Partition does not support FIPS",[mc]:_c},{[hc]:[Cu,{[yc]:zc,[gc]:[ku,0,6,Rc],[vc]:Bc},{[yc]:Ic,[gc]:[{[bc]:Bc},"--x-s3"]}],[fc]:[Tu,Ru,{[hc]:[Bu,Lu],[fc]:[{[hc]:ed,[fc]:[{[hc]:[Au,qu],[fc]:[{[hc]:td,endpoint:{[xc]:"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[wc]:Iu,[kc]:Mu},[mc]:qc},{[hc]:rd,endpoint:{[xc]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[wc]:Iu,[kc]:Mu},[mc]:qc},{[hc]:nd,endpoint:{[xc]:"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[wc]:Iu,[kc]:Mu},[mc]:qc},{[hc]:id,endpoint:{[xc]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[wc]:Iu,[kc]:Mu},[mc]:qc}],[mc]:Uc}],[mc]:Uc}],[mc]:Uc},{[hc]:Zp,[fc]:[{[hc]:ed,[fc]:[{[hc]:Yp,[fc]:[{[hc]:od,[fc]:sd,[mc]:Uc},{[hc]:ad,[fc]:sd,[mc]:Uc},{[hc]:ld,[fc]:sd,[mc]:Uc},{[hc]:cd,[fc]:sd,[mc]:Uc},{[hc]:ud,[fc]:sd,[mc]:Uc},Fu],[mc]:Uc},{[hc]:od,[fc]:pd,[mc]:Uc},{[hc]:ad,[fc]:pd,[mc]:Uc},{[hc]:ld,[fc]:pd,[mc]:Uc},{[hc]:cd,[fc]:pd,[mc]:Uc},{[hc]:ud,[fc]:pd,[mc]:Uc},Fu],[mc]:Uc}],[mc]:Uc},zu],[mc]:Uc},{[hc]:[Cu,{[yc]:zc,[gc]:dd,[vc]:Vc},{[yc]:Ic,[gc]:[{[bc]:Vc},"--xa-s3"]}],[fc]:[Tu,Ru,{[hc]:Zp,[fc]:[{[hc]:ed,[fc]:[{[hc]:Yp,[fc]:[{[hc]:md,[fc]:sd,[mc]:Uc},{[hc]:fd,[fc]:sd,[mc]:Uc},{[hc]:hd,[fc]:sd,[mc]:Uc},{[hc]:yd,[fc]:sd,[mc]:Uc},{[hc]:gd,[fc]:sd,[mc]:Uc},Fu],[mc]:Uc},{[hc]:md,[fc]:pd,[mc]:Uc},{[hc]:fd,[fc]:pd,[mc]:Uc},{[hc]:hd,[fc]:pd,[mc]:Uc},{[hc]:yd,[fc]:pd,[mc]:Uc},{[hc]:gd,[fc]:pd,[mc]:Uc},Fu],[mc]:Uc}],[mc]:Uc},zu],[mc]:Uc},{[hc]:[$u,Bu,Lu],[fc]:[{[hc]:ed,[fc]:[{[hc]:Qp,endpoint:{[xc]:Gc,[wc]:Iu,[kc]:Mu},[mc]:qc},{[hc]:td,endpoint:{[xc]:"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[wc]:Iu,[kc]:Mu},[mc]:qc},{[hc]:rd,endpoint:{[xc]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}",[wc]:Iu,[kc]:Mu},[mc]:qc},{[hc]:nd,endpoint:{[xc]:"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}",[wc]:Iu,[kc]:Mu},[mc]:qc},{[hc]:id,endpoint:{[xc]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}",[wc]:Iu,[kc]:Mu},[mc]:qc}],[mc]:Uc}],[mc]:Uc},{[hc]:[Cu,{[yc]:zc,[gc]:[ku,49,50,Rc],[vc]:Wc},{[yc]:zc,[gc]:[ku,8,12,Rc],[vc]:Kc},{[yc]:zc,[gc]:dd,[vc]:Xc},{[yc]:zc,[gc]:[ku,32,49,Rc],[vc]:Qc},{[yc]:Ac,[gc]:Gp,[vc]:"regionPartition"},{[yc]:Ic,[gc]:[{[bc]:Xc},"--op-s3"]}],[fc]:[{[hc]:vd,[fc]:[{[hc]:Zp,[fc]:[{[hc]:[{[yc]:Ic,[gc]:[Vu,"e"]}],[fc]:[{[hc]:xd,[fc]:[Gu,{[hc]:Qp,endpoint:{[xc]:"https://{Bucket}.ec2.{url#authority}",[wc]:Wu,[kc]:Mu},[mc]:qc}],[mc]:Uc},{endpoint:{[xc]:"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[wc]:Wu,[kc]:Mu},[mc]:qc}],[mc]:Uc},{[hc]:[{[yc]:Ic,[gc]:[Vu,"o"]}],[fc]:[{[hc]:xd,[fc]:[Gu,{[hc]:Qp,endpoint:{[xc]:"https://{Bucket}.op-{outpostId}.{url#authority}",[wc]:Wu,[kc]:Mu},[mc]:qc}],[mc]:Uc},{endpoint:{[xc]:"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[wc]:Wu,[kc]:Mu},[mc]:qc}],[mc]:Uc},{error:'Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"',[mc]:_c}],[mc]:Uc},{error:"Invalid Outposts Bucket alias - it must be a valid bucket name.",[mc]:_c}],[mc]:Uc},{error:"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.",[mc]:_c}],[mc]:Uc},{[hc]:bd,[fc]:[{[hc]:[Nu,{[yc]:$c,[gc]:[{[yc]:Oc,[gc]:[{[yc]:Lc,[gc]:Wp}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",[mc]:_c},{[hc]:[Ku,Du],[fc]:[{[hc]:ed,[fc]:[{[hc]:wd,[fc]:[{[hc]:[xu,Eu],error:"S3 Accelerate cannot be used in this region",[mc]:_c},{[hc]:[Su,wu,Qu,qu,Yu],endpoint:{[xc]:"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[wc]:Ju,[kc]:Mu},[mc]:qc},{[hc]:[Su,wu,Qu,qu,Zu,ep],[fc]:[{endpoint:tp,[mc]:qc}],[mc]:Uc},{[hc]:[Su,wu,Qu,qu,Zu,np],endpoint:tp,[mc]:qc},{[hc]:[Uu,wu,Qu,qu,Yu],endpoint:{[xc]:"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",[wc]:Ju,[kc]:Mu},[mc]:qc},{[hc]:[Uu,wu,Qu,qu,Zu,ep],[fc]:[{endpoint:ip,[mc]:qc}],[mc]:Uc},{[hc]:[Uu,wu,Qu,qu,Zu,np],endpoint:ip,[mc]:qc},{[hc]:[Su,Hu,xu,qu,Yu],endpoint:{[xc]:"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",[wc]:Ju,[kc]:Mu},[mc]:qc},{[hc]:[Su,Hu,xu,qu,Zu,ep],[fc]:[{endpoint:op,[mc]:qc}],[mc]:Uc},{[hc]:[Su,Hu,xu,qu,Zu,np],endpoint:op,[mc]:qc},{[hc]:[Su,Hu,Qu,qu,Yu],endpoint:{[xc]:"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[wc]:Ju,[kc]:Mu},[mc]:qc},{[hc]:[Su,Hu,Qu,qu,Zu,ep],[fc]:[{endpoint:sp,[mc]:qc}],[mc]:Uc},{[hc]:[Su,Hu,Qu,qu,Zu,np],endpoint:sp,[mc]:qc},{[hc]:[Uu,Hu,Qu,Nu,Ou,Pu,Yu],endpoint:{[xc]:tu,[wc]:Ju,[kc]:Mu},[mc]:qc},{[hc]:[Uu,Hu,Qu,Nu,Ou,ap,Yu],endpoint:{[xc]:Fc,[wc]:Ju,[kc]:Mu},[mc]:qc},{[hc]:[Uu,Hu,Qu,Nu,Ou,Pu,Zu,ep],[fc]:[{[hc]:Sd,endpoint:lp,[mc]:qc},{endpoint:lp,[mc]:qc}],[mc]:Uc},{[hc]:[Uu,Hu,Qu,Nu,Ou,ap,Zu,ep],[fc]:[{[hc]:Sd,endpoint:cp,[mc]:qc},up],[mc]:Uc},{[hc]:[Uu,Hu,Qu,Nu,Ou,Pu,Zu,np],endpoint:lp,[mc]:qc},{[hc]:[Uu,Hu,Qu,Nu,Ou,ap,Zu,np],endpoint:cp,[mc]:qc},{[hc]:[Uu,Hu,xu,qu,Yu],endpoint:{[xc]:ru,[wc]:Ju,[kc]:Mu},[mc]:qc},{[hc]:[Uu,Hu,xu,qu,Zu,ep],[fc]:[{[hc]:Sd,endpoint:pp,[mc]:qc},{endpoint:pp,[mc]:qc}],[mc]:Uc},{[hc]:[Uu,Hu,xu,qu,Zu,np],endpoint:pp,[mc]:qc},{[hc]:[Uu,Hu,Qu,qu,Yu],endpoint:{[xc]:nu,[wc]:Ju,[kc]:Mu},[mc]:qc},{[hc]:[Uu,Hu,Qu,qu,Zu,ep],[fc]:[{[hc]:Sd,endpoint:{[xc]:nu,[wc]:rp,[kc]:Mu},[mc]:qc},{endpoint:dp,[mc]:qc}],[mc]:Uc},{[hc]:[Uu,Hu,Qu,qu,Zu,np],endpoint:dp,[mc]:qc}],[mc]:Uc},mp],[mc]:Uc}],[mc]:Uc},{[hc]:[Nu,Ou,{[yc]:Ic,[gc]:[{[yc]:Mc,[gc]:[_u,"scheme"]},"http"]},{[yc]:Hc,[gc]:[ku,Rc]},Ku,Hu,Uu,Qu],[fc]:[{[hc]:ed,[fc]:[{[hc]:wd,[fc]:[up],[mc]:Uc},mp],[mc]:Uc}],[mc]:Uc},{[hc]:[Ku,{[yc]:iu,[gc]:Kp,[vc]:ou}],[fc]:[{[hc]:[{[yc]:Mc,[gc]:[fp,"resourceId[0]"],[vc]:su},{[yc]:$c,[gc]:[{[yc]:Ic,[gc]:[hp,""]}]}],[fc]:[{[hc]:[{[yc]:Ic,[gc]:[yp,au]}],[fc]:[{[hc]:Nd,[fc]:[{[hc]:jd,[fc]:[bp,vp,{[hc]:kd,[fc]:[xp,{[hc]:Td,[fc]:[wp,{[hc]:Od,[fc]:[{[hc]:ed,[fc]:[{[hc]:Pd,[fc]:[{[hc]:_d,[fc]:[{[hc]:[{[yc]:Ic,[gc]:[Np,""]}],error:"Invalid ARN: Missing account id",[mc]:_c},{[hc]:Ad,[fc]:[{[hc]:Id,[fc]:[{[hc]:Qp,endpoint:{[xc]:uu,[wc]:jp,[kc]:Mu},[mc]:qc},{[hc]:Md,endpoint:{[xc]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[wc]:jp,[kc]:Mu},[mc]:qc},{endpoint:{[xc]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",[wc]:jp,[kc]:Mu},[mc]:qc}],[mc]:Uc},Ep],[mc]:Uc},Cp],[mc]:Uc},kp],[mc]:Uc},Tp],[mc]:Uc}],[mc]:Uc}],[mc]:Uc},Rp],[mc]:Uc},{error:"Invalid ARN: bucket ARN is missing a region",[mc]:_c}],[mc]:Uc},Op],[mc]:Uc},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",[mc]:_c}],[mc]:Uc},{[hc]:Nd,[fc]:[{[hc]:jd,[fc]:[{[hc]:kd,[fc]:[{[hc]:Nd,[fc]:[{[hc]:kd,[fc]:[xp,{[hc]:Td,[fc]:[wp,{[hc]:Od,[fc]:[{[hc]:ed,[fc]:[{[hc]:[{[yc]:Ic,[gc]:[Sp,"{partitionResult#name}"]}],[fc]:[{[hc]:_d,[fc]:[{[hc]:[{[yc]:Ic,[gc]:[yp,eu]}],[fc]:[{[hc]:Ad,[fc]:[{[hc]:Id,[fc]:[{[hc]:Xp,error:"Access Points do not support S3 Accelerate",[mc]:_c},{[hc]:td,endpoint:{[xc]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[wc]:Pp,[kc]:Mu},[mc]:qc},{[hc]:rd,endpoint:{[xc]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[wc]:Pp,[kc]:Mu},[mc]:qc},{[hc]:nd,endpoint:{[xc]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[wc]:Pp,[kc]:Mu},[mc]:qc},{[hc]:[Hu,Uu,Nu,Ou],endpoint:{[xc]:uu,[wc]:Pp,[kc]:Mu},[mc]:qc},{[hc]:id,endpoint:{[xc]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",[wc]:Pp,[kc]:Mu},[mc]:qc}],[mc]:Uc},Ep],[mc]:Uc},Cp],[mc]:Uc},{error:"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}",[mc]:_c}],[mc]:Uc},kp],[mc]:Uc},Tp],[mc]:Uc}],[mc]:Uc}],[mc]:Uc},Rp],[mc]:Uc}],[mc]:Uc}],[mc]:Uc},{[hc]:[{[yc]:Yc,[gc]:[gp,Rc]}],[fc]:[{[hc]:Cd,error:"S3 MRAP does not support dual-stack",[mc]:_c},{[hc]:Md,error:"S3 MRAP does not support FIPS",[mc]:_c},{[hc]:Xp,error:"S3 MRAP does not support S3 Accelerate",[mc]:_c},{[hc]:[{[yc]:Pc,[gc]:[{[bc]:"DisableMultiRegionAccessPoints"},Rc]}],error:"Invalid configuration: Multi-Region Access Point ARNs are disabled.",[mc]:_c},{[hc]:[{[yc]:Ac,[gc]:Gp,[vc]:pu}],[fc]:[{[hc]:[{[yc]:Ic,[gc]:[{[yc]:Mc,[gc]:[{[bc]:pu},Dc]},{[yc]:Mc,[gc]:[fp,"partition"]}]}],[fc]:[{endpoint:{[xc]:"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}",[wc]:{[Nc]:[{[jc]:Rc,name:Jc,[Ec]:eu,[Tc]:["*"]}]},[kc]:Mu},[mc]:qc}],[mc]:Uc},{error:"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`",[mc]:_c}],[mc]:Uc}],[mc]:Uc},{error:"Invalid Access Point Name",[mc]:_c}],[mc]:Uc},Op],[mc]:Uc},{[hc]:[{[yc]:Ic,[gc]:[yp,Zc]}],[fc]:[{[hc]:Cd,error:"S3 Outposts does not support Dual-stack",[mc]:_c},{[hc]:Md,error:"S3 Outposts does not support FIPS",[mc]:_c},{[hc]:Xp,error:"S3 Outposts does not support S3 Accelerate",[mc]:_c},{[hc]:[{[yc]:Oc,[gc]:[{[yc]:Mc,[gc]:[fp,"resourceId[4]"]}]}],error:"Invalid Arn: Outpost Access Point ARN contains sub resources",[mc]:_c},{[hc]:[{[yc]:Mc,[gc]:Ed,[vc]:Qc}],[fc]:[{[hc]:vd,[fc]:[wp,{[hc]:Od,[fc]:[{[hc]:ed,[fc]:[{[hc]:Pd,[fc]:[{[hc]:_d,[fc]:[{[hc]:Ad,[fc]:[{[hc]:[{[yc]:Mc,[gc]:Rd,[vc]:du}],[fc]:[{[hc]:[{[yc]:Mc,[gc]:[fp,"resourceId[3]"],[vc]:cu}],[fc]:[{[hc]:[{[yc]:Ic,[gc]:[{[bc]:du},lu]}],[fc]:[{[hc]:Qp,endpoint:{[xc]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}",[wc]:_p,[kc]:Mu},[mc]:qc},{endpoint:{[xc]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",[wc]:_p,[kc]:Mu},[mc]:qc}],[mc]:Uc},{error:"Expected an outpost type `accesspoint`, found {outpostType}",[mc]:_c}],[mc]:Uc},{error:"Invalid ARN: expected an access point name",[mc]:_c}],[mc]:Uc},{error:"Invalid ARN: Expected a 4-component resource",[mc]:_c}],[mc]:Uc},Cp],[mc]:Uc},kp],[mc]:Uc},Tp],[mc]:Uc}],[mc]:Uc}],[mc]:Uc},{error:"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`",[mc]:_c}],[mc]:Uc},{error:"Invalid ARN: The Outpost Id was not set",[mc]:_c}],[mc]:Uc},{error:"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})",[mc]:_c}],[mc]:Uc},{error:"Invalid ARN: No ARN type specified",[mc]:_c}],[mc]:Uc},{[hc]:[{[yc]:zc,[gc]:[ku,0,4,!1],[vc]:mu},{[yc]:Ic,[gc]:[{[bc]:mu},"arn:"]},{[yc]:$c,[gc]:[{[yc]:Oc,[gc]:[Ap]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",[mc]:_c},{[hc]:[{[yc]:Pc,[gc]:[Xu,Rc]},Ap],error:"Path-style addressing cannot be used with ARN buckets",[mc]:_c},{[hc]:Jp,[fc]:[{[hc]:ed,[fc]:[{[hc]:[Qu],[fc]:[{[hc]:[Su,qu,wu,Yu],endpoint:{[xc]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[wc]:Ju,[kc]:Mu},[mc]:qc},{[hc]:[Su,qu,wu,Zu,ep],[fc]:[{endpoint:Ip,[mc]:qc}],[mc]:Uc},{[hc]:[Su,qu,wu,Zu,np],endpoint:Ip,[mc]:qc},{[hc]:[Uu,qu,wu,Yu],endpoint:{[xc]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[wc]:Ju,[kc]:Mu},[mc]:qc},{[hc]:[Uu,qu,wu,Zu,ep],[fc]:[{endpoint:Mp,[mc]:qc}],[mc]:Uc},{[hc]:[Uu,qu,wu,Zu,np],endpoint:Mp,[mc]:qc},{[hc]:[Su,qu,Hu,Yu],endpoint:{[xc]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[wc]:Ju,[kc]:Mu},[mc]:qc},{[hc]:[Su,qu,Hu,Zu,ep],[fc]:[{endpoint:Dp,[mc]:qc}],[mc]:Uc},{[hc]:[Su,qu,Hu,Zu,np],endpoint:Dp,[mc]:qc},{[hc]:[Uu,Nu,Ou,Hu,Yu],endpoint:{[xc]:fu,[wc]:Ju,[kc]:Mu},[mc]:qc},{[hc]:[Uu,Nu,Ou,Hu,Zu,ep],[fc]:[{[hc]:Sd,endpoint:zp,[mc]:qc},{endpoint:zp,[mc]:qc}],[mc]:Uc},{[hc]:[Uu,Nu,Ou,Hu,Zu,np],endpoint:zp,[mc]:qc},{[hc]:[Uu,qu,Hu,Yu],endpoint:{[xc]:hu,[wc]:Ju,[kc]:Mu},[mc]:qc},{[hc]:[Uu,qu,Hu,Zu,ep],[fc]:[{[hc]:Sd,endpoint:{[xc]:hu,[wc]:rp,[kc]:Mu},[mc]:qc},{endpoint:Bp,[mc]:qc}],[mc]:Uc},{[hc]:[Uu,qu,Hu,Zu,np],endpoint:Bp,[mc]:qc}],[mc]:Uc},{error:"Path-style addressing cannot be used with S3 Accelerate",[mc]:_c}],[mc]:Uc}],[mc]:Uc}],[mc]:Uc},{[hc]:[{[yc]:Oc,[gc]:[Lp]},{[yc]:Pc,[gc]:[Lp,Rc]}],[fc]:[{[hc]:ed,[fc]:[{[hc]:Dd,[fc]:[bp,vp,{[hc]:Qp,endpoint:{[xc]:Gc,[wc]:qp,[kc]:Mu},[mc]:qc},{[hc]:Md,endpoint:{[xc]:"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",[wc]:qp,[kc]:Mu},[mc]:qc},{endpoint:{[xc]:"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",[wc]:qp,[kc]:Mu},[mc]:qc}],[mc]:Uc},mp],[mc]:Uc}],[mc]:Uc},{[hc]:[$u],[fc]:[{[hc]:ed,[fc]:[{[hc]:Dd,[fc]:[{[hc]:[wu,Su,qu,Yu],endpoint:{[xc]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[wc]:Ju,[kc]:Mu},[mc]:qc},{[hc]:[wu,Su,qu,Zu,ep],[fc]:[{endpoint:Up,[mc]:qc}],[mc]:Uc},{[hc]:[wu,Su,qu,Zu,np],endpoint:Up,[mc]:qc},{[hc]:[wu,Uu,qu,Yu],endpoint:{[xc]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",[wc]:Ju,[kc]:Mu},[mc]:qc},{[hc]:[wu,Uu,qu,Zu,ep],[fc]:[{endpoint:Hp,[mc]:qc}],[mc]:Uc},{[hc]:[wu,Uu,qu,Zu,np],endpoint:Hp,[mc]:qc},{[hc]:[Hu,Su,qu,Yu],endpoint:{[xc]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[wc]:Ju,[kc]:Mu},[mc]:qc},{[hc]:[Hu,Su,qu,Zu,ep],[fc]:[{endpoint:Fp,[mc]:qc}],[mc]:Uc},{[hc]:[Hu,Su,qu,Zu,np],endpoint:Fp,[mc]:qc},{[hc]:[Hu,Uu,Nu,Ou,Yu],endpoint:{[xc]:Gc,[wc]:Ju,[kc]:Mu},[mc]:qc},{[hc]:[Hu,Uu,Nu,Ou,Zu,ep],[fc]:[{[hc]:Sd,endpoint:$p,[mc]:qc},{endpoint:$p,[mc]:qc}],[mc]:Uc},{[hc]:[Hu,Uu,Nu,Ou,Zu,np],endpoint:$p,[mc]:qc},{[hc]:[Hu,Uu,qu,Yu],endpoint:{[xc]:yu,[wc]:Ju,[kc]:Mu},[mc]:qc},{[hc]:[Hu,Uu,qu,Zu,ep],[fc]:[{[hc]:Sd,endpoint:{[xc]:yu,[wc]:rp,[kc]:Mu},[mc]:qc},{endpoint:Vp,[mc]:qc}],[mc]:Uc},{[hc]:[Hu,Uu,qu,Zu,np],endpoint:Vp,[mc]:qc}],[mc]:Uc},mp],[mc]:Uc}],[mc]:Uc}],[mc]:Uc},{error:"A region must be set when sending requests to S3.",[mc]:_c}]},Bd=new class{constructor({size:e,params:t}){r(this,"capacity"),r(this,"data",new Map),r(this,"parameters",[]),this.capacity=e??50,t&&(this.parameters=t)}get(e,t){const r=this.hash(e);if(!1===r)return t();if(!this.data.has(r)){if(this.data.size>this.capacity+10){const e=this.data.keys();let t=0;for(;;){const{value:r,done:n}=e.next();if(this.data.delete(r),n||++t>10)break}}this.data.set(r,t())}return this.data.get(r)}size(){return this.data.size}hash(e){let t="";const{parameters:r}=this;if(0===r.length)return!1;for(const n of r){const r=String(e[n]??"");if(r.includes("|;"))return!1;t+=r+"|;"}return t}}({size:50,params:["Accelerate","Bucket","DisableAccessPoints","DisableMultiRegionAccessPoints","DisableS3ExpressSessionAuth","Endpoint","ForcePathStyle","Region","UseArnRegion","UseDualStack","UseFIPS","UseGlobalEndpoint","UseObjectLambdaEndpoint","UseS3ExpressControlEndpoint"]}),Ld=(e,t={})=>Bd.get(e,()=>((e,t)=>{var r,n,i,o;const{endpointParams:s,logger:a}=t,{parameters:l,rules:c}=e;null==(n=null==(r=t.logger)?void 0:r.debug)||n.call(r,`${Va} Initial EndpointParams: ${Ga(s)}`);const u=Object.entries(l).filter(([,e])=>null!=e.default).map(([e,t])=>[e,t.default]);if(u.length>0)for(const[m,f]of u)s[m]=s[m]??f;const p=Object.entries(l).filter(([,e])=>e.required).map(([e])=>e);for(const m of p)if(null==s[m])throw new Wa(`Missing required parameter: '${m}'`);const d=ul(c,{endpointParams:s,logger:a,referenceRecord:{}});return null==(o=null==(i=t.logger)?void 0:i.debug)||o.call(i,`${Va} Resolved endpoint: ${Ga(d)}`),d})(zd,{endpointParams:e,logger:t.logger}));$a.aws=fl;const qd=(Ud=async(e,t,r)=>({operation:cn(t).operation,region:await un(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),async(e,t,r)=>{var n,i,o;if(!r)throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");const s=await Ud(e,t,r),a=null==(o=null==(i=null==(n=cn(t))?void 0:n.commandInstance)?void 0:i.constructor)?void 0:o.getEndpointParameterInstructions;if(!a)throw new Error(`getEndpointParameterInstructions() is not defined on '${t.commandName}'`);const l=await Jl(r,{getEndpointParameterInstructions:a},e);return Object.assign(s,l)});var Ud;function Hd(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function Fd(e){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}const $d=(Vd=Ld,Gd=e=>{const t=[];return e.operation,t.push(Hd(e)),t.push(Fd(e)),t},Wd={"aws.auth#sigv4":Hd,"aws.auth#sigv4a":Fd},e=>{var t;const r=null==(t=Vd(e).properties)?void 0:t.authSchemes;if(!r)return Gd(e);const n=[];for(const i of r){const{name:t,properties:o={},...s}=i,a=t.toLowerCase();let l;if("sigv4a"===a){l="aws.auth#sigv4a";const e=r.find(e=>{const t=e.name.toLowerCase();return"sigv4a"!==t&&t.startsWith("sigv4")});if("none"===pc.sigv4aDependency()&&e)continue}else{if(!a.startsWith("sigv4"))throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${a}'`);l="aws.auth#sigv4"}const c=Wd[l];if(!c)throw new Error(`Could not find HttpAuthOption create function for '${l}'`);const u=c(e);u.schemeId=l,u.signingProperties={...u.signingProperties||{},...s,...o},n.push(u)}return n});var Vd,Gd,Wd;const Kd=e=>{const t=(e=>(e.sigv4aSigningRegionSet=gn(e.sigv4aSigningRegionSet),e))(Mo(e));return Object.assign(t,{authSchemePreference:un(e.authSchemePreference??[])})},Xd={ForcePathStyle:{type:"clientContextParams",name:"forcePathStyle"},UseArnRegion:{type:"clientContextParams",name:"useArnRegion"},DisableMultiRegionAccessPoints:{type:"clientContextParams",name:"disableMultiregionAccessPoints"},Accelerate:{type:"clientContextParams",name:"useAccelerateEndpoint"},DisableS3ExpressSessionAuth:{type:"clientContextParams",name:"disableS3ExpressSessionAuth"},UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};class Qd extends Ko{constructor(e){super(e),Object.setPrototypeOf(this,Qd.prototype)}}class Yd extends Qd{constructor(e){super({name:"NoSuchUpload",$fault:"client",...e}),r(this,"name","NoSuchUpload"),r(this,"$fault","client"),Object.setPrototypeOf(this,Yd.prototype)}}class Jd extends Qd{constructor(e){super({name:"AccessDenied",$fault:"client",...e}),r(this,"name","AccessDenied"),r(this,"$fault","client"),Object.setPrototypeOf(this,Jd.prototype)}}class Zd extends Qd{constructor(e){super({name:"ObjectNotInActiveTierError",$fault:"client",...e}),r(this,"name","ObjectNotInActiveTierError"),r(this,"$fault","client"),Object.setPrototypeOf(this,Zd.prototype)}}class em extends Qd{constructor(e){super({name:"BucketAlreadyExists",$fault:"client",...e}),r(this,"name","BucketAlreadyExists"),r(this,"$fault","client"),Object.setPrototypeOf(this,em.prototype)}}class tm extends Qd{constructor(e){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...e}),r(this,"name","BucketAlreadyOwnedByYou"),r(this,"$fault","client"),Object.setPrototypeOf(this,tm.prototype)}}class rm extends Qd{constructor(e){super({name:"NoSuchBucket",$fault:"client",...e}),r(this,"name","NoSuchBucket"),r(this,"$fault","client"),Object.setPrototypeOf(this,rm.prototype)}}class nm extends Qd{constructor(e){super({name:"InvalidObjectState",$fault:"client",...e}),r(this,"name","InvalidObjectState"),r(this,"$fault","client"),r(this,"StorageClass"),r(this,"AccessTier"),Object.setPrototypeOf(this,nm.prototype),this.StorageClass=e.StorageClass,this.AccessTier=e.AccessTier}}class im extends Qd{constructor(e){super({name:"NoSuchKey",$fault:"client",...e}),r(this,"name","NoSuchKey"),r(this,"$fault","client"),Object.setPrototypeOf(this,im.prototype)}}class om extends Qd{constructor(e){super({name:"NotFound",$fault:"client",...e}),r(this,"name","NotFound"),r(this,"$fault","client"),Object.setPrototypeOf(this,om.prototype)}}class sm extends Qd{constructor(e){super({name:"EncryptionTypeMismatch",$fault:"client",...e}),r(this,"name","EncryptionTypeMismatch"),r(this,"$fault","client"),Object.setPrototypeOf(this,sm.prototype)}}class am extends Qd{constructor(e){super({name:"InvalidRequest",$fault:"client",...e}),r(this,"name","InvalidRequest"),r(this,"$fault","client"),Object.setPrototypeOf(this,am.prototype)}}class lm extends Qd{constructor(e){super({name:"InvalidWriteOffset",$fault:"client",...e}),r(this,"name","InvalidWriteOffset"),r(this,"$fault","client"),Object.setPrototypeOf(this,lm.prototype)}}class cm extends Qd{constructor(e){super({name:"TooManyParts",$fault:"client",...e}),r(this,"name","TooManyParts"),r(this,"$fault","client"),Object.setPrototypeOf(this,cm.prototype)}}class um extends Qd{constructor(e){super({name:"IdempotencyParameterMismatch",$fault:"client",...e}),r(this,"name","IdempotencyParameterMismatch"),r(this,"$fault","client"),Object.setPrototypeOf(this,um.prototype)}}class pm extends Qd{constructor(e){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...e}),r(this,"name","ObjectAlreadyInActiveTierError"),r(this,"$fault","client"),Object.setPrototypeOf(this,pm.prototype)}}const dm="AccessKeyId",mm="Bucket",fm="BucketKeyEnabled",hm="Body",ym="ChecksumAlgorithm",gm="CacheControl",bm="ChecksumCRC32",vm="ChecksumCRC32C",xm="ChecksumCRC64NVME",wm="Cache-Control",Sm="Content-Disposition",Nm="ContentDisposition",jm="Content-Encoding",Em="ContentEncoding",Cm="ContentLanguage",km="Content-Language",Tm="Content-Length",Rm="ContentLength",Om="Content-MD5",Pm="ContentMD5",_m="CompleteMultipartUpload",Am="ChecksumSHA1",Im="ChecksumSHA256",Mm="ChecksumType",Dm="Content-Type",zm="ContentType",Bm="Credentials",Lm="Expiration",qm="ExpectedBucketOwner",Um="ETag",Hm="Expires",Fm="GrantFullControl",$m="GrantRead",Vm="GrantReadACP",Gm="GrantWriteACP",Wm="IfMatch",Km="If-Match",Xm="IfNoneMatch",Qm="If-None-Match",Ym="Key",Jm="Metadata",Zm="ObjectLockLegalHoldStatus",ef="ObjectLockMode",tf="ObjectLockRetainUntilDate",rf="PartNumber",nf="RequestCharged",of="RequestPayer",sf="SecretAccessKey",af="StorageClass",lf="ServerSideEncryption",cf="SSECustomerAlgorithm",uf="SSECustomerKey",pf="SSECustomerKeyMD5",df="SSEKMSEncryptionContext",mf="SSEKMSKeyId",ff="SessionToken",hf="Tagging",yf="UploadId",gf="VersionId",bf="WebsiteRedirectLocation",vf="client",xf="error",wf="http",Sf="httpChecksum",Nf="httpError",jf="httpHeader",Ef="httpPayload",Cf="httpPrefixHeaders",kf="httpQuery",Tf="smithy.ts.sdk.synthetic.com.amazonaws.s3",Rf="streaming",Of="uploadId",Pf="xmlFlattened",_f="xmlName",Af="x-amz-acl",If="x-amz-checksum-algorithm",Mf="x-amz-checksum-crc32",Df="x-amz-checksum-crc32c",zf="x-amz-checksum-crc64nvme",Bf="x-amz-checksum-sha1",Lf="x-amz-checksum-sha256",qf="x-amz-checksum-type",Uf="x-amz-expiration",Hf="x-amz-expected-bucket-owner",Ff="x-amz-grant-full-control",$f="x-amz-grant-read",Vf="x-amz-grant-read-acp",Gf="x-amz-grant-write-acp",Wf="x-amz-meta-",Kf="x-amz-object-lock-legal-hold",Xf="x-amz-object-lock-mode",Qf="x-amz-object-lock-retain-until-date",Yf="x-amz-request-charged",Jf="x-amz-request-payer",Zf="x-amz-storage-class",eh="x-amz-sdk-checksum-algorithm",th="x-amz-server-side-encryption",rh="x-amz-server-side-encryption-aws-kms-key-id",nh="x-amz-server-side-encryption-bucket-key-enabled",ih="x-amz-server-side-encryption-context",oh="x-amz-server-side-encryption-customer-algorithm",sh="x-amz-server-side-encryption-customer-key",ah="x-amz-server-side-encryption-customer-key-MD5",lh="x-amz-tagging",ch="x-amz-version-id",uh="x-amz-website-redirect-location",ph="com.amazonaws.s3",dh=vi.for(Tf);var mh=[-3,Tf,"S3ServiceException",0,[],[]];dh.registerError(mh,Qd);const fh=vi.for(ph);var hh=[-3,ph,"AccessDenied",{[xf]:vf,[Nf]:403},[],[]];fh.registerError(hh,Jd);var yh=[-3,ph,"BucketAlreadyExists",{[xf]:vf,[Nf]:409},[],[]];fh.registerError(yh,em);var gh=[-3,ph,"BucketAlreadyOwnedByYou",{[xf]:vf,[Nf]:409},[],[]];fh.registerError(gh,tm);var bh=[-3,ph,"EncryptionTypeMismatch",{[xf]:vf,[Nf]:400},[],[]];fh.registerError(bh,sm);var vh=[-3,ph,"IdempotencyParameterMismatch",{[xf]:vf,[Nf]:400},[],[]];fh.registerError(vh,um);var xh=[-3,ph,"InvalidObjectState",{[xf]:vf,[Nf]:403},[af,"AccessTier"],[0,0]];fh.registerError(xh,nm);var wh=[-3,ph,"InvalidRequest",{[xf]:vf,[Nf]:400},[],[]];fh.registerError(wh,am);var Sh=[-3,ph,"InvalidWriteOffset",{[xf]:vf,[Nf]:400},[],[]];fh.registerError(Sh,lm);var Nh=[-3,ph,"NoSuchBucket",{[xf]:vf,[Nf]:404},[],[]];fh.registerError(Nh,rm);var jh=[-3,ph,"NoSuchKey",{[xf]:vf,[Nf]:404},[],[]];fh.registerError(jh,im);var Eh=[-3,ph,"NoSuchUpload",{[xf]:vf,[Nf]:404},[],[]];fh.registerError(Eh,Yd);var Ch=[-3,ph,"NotFound",{[xf]:vf},[],[]];fh.registerError(Ch,om);var kh=[-3,ph,"ObjectAlreadyInActiveTierError",{[xf]:vf,[Nf]:403},[],[]];fh.registerError(kh,pm);var Th=[-3,ph,"ObjectNotInActiveTierError",{[xf]:vf,[Nf]:403},[],[]];fh.registerError(Th,Zd);var Rh=[-3,ph,"TooManyParts",{[xf]:vf,[Nf]:400},[],[]];fh.registerError(Rh,cm);const Oh=[dh,fh];var Ph=[0,ph,"SessionCredentialValue",8,0],_h=[0,ph,uf,8,0],Ah=[0,ph,df,8,0],Ih=[0,ph,mf,8,0],Mh=[0,ph,"StreamingBlob",{[Rf]:1},42],Dh=[3,ph,"AbortMultipartUploadOutput",0,[nf],[[0,{[jf]:Yf}]]],zh=[3,ph,"AbortMultipartUploadRequest",0,[mm,Ym,yf,of,qm,"IfMatchInitiatedTime"],[[0,1],[0,1],[0,{[kf]:Of}],[0,{[jf]:Jf}],[0,{[jf]:Hf}],[6,{[jf]:"x-amz-if-match-initiated-time"}]],3],Bh=[3,ph,"CompletedMultipartUpload",0,["Parts"],[[()=>Yh,{[Pf]:1,[_f]:"Part"}]]],Lh=[3,ph,"CompletedPart",0,[Um,bm,vm,xm,Am,Im,rf],[0,0,0,0,0,0,1]],qh=[3,ph,"CompleteMultipartUploadOutput",{[_f]:"CompleteMultipartUploadResult"},["Location",mm,Ym,Lm,Um,bm,vm,xm,Am,Im,Mm,lf,gf,mf,fm,nf],[0,0,0,[0,{[jf]:Uf}],0,0,0,0,0,0,0,[0,{[jf]:th}],[0,{[jf]:ch}],[()=>Ih,{[jf]:rh}],[2,{[jf]:nh}],[0,{[jf]:Yf}]]],Uh=[3,ph,"CompleteMultipartUploadRequest",0,[mm,Ym,yf,"MultipartUpload",bm,vm,xm,Am,Im,Mm,"MpuObjectSize",of,qm,Wm,Xm,cf,uf,pf],[[0,1],[0,1],[0,{[kf]:Of}],[()=>Bh,{[Ef]:1,[_f]:_m}],[0,{[jf]:Mf}],[0,{[jf]:Df}],[0,{[jf]:zf}],[0,{[jf]:Bf}],[0,{[jf]:Lf}],[0,{[jf]:qf}],[1,{[jf]:"x-amz-mp-object-size"}],[0,{[jf]:Jf}],[0,{[jf]:Hf}],[0,{[jf]:Km}],[0,{[jf]:Qm}],[0,{[jf]:oh}],[()=>_h,{[jf]:sh}],[0,{[jf]:ah}]],3],Hh=[3,ph,"CreateMultipartUploadOutput",{[_f]:"InitiateMultipartUploadResult"},["AbortDate","AbortRuleId",mm,Ym,yf,lf,cf,pf,mf,df,fm,nf,ym,Mm],[[4,{[jf]:"x-amz-abort-date"}],[0,{[jf]:"x-amz-abort-rule-id"}],[0,{[_f]:mm}],0,0,[0,{[jf]:th}],[0,{[jf]:oh}],[0,{[jf]:ah}],[()=>Ih,{[jf]:rh}],[()=>Ah,{[jf]:ih}],[2,{[jf]:nh}],[0,{[jf]:Yf}],[0,{[jf]:If}],[0,{[jf]:qf}]]],Fh=[3,ph,"CreateMultipartUploadRequest",0,[mm,Ym,"ACL",gm,Nm,Em,Cm,zm,Hm,Fm,$m,Vm,Gm,Jm,lf,af,bf,cf,uf,pf,mf,df,fm,of,hf,ef,tf,Zm,qm,ym,Mm],[[0,1],[0,1],[0,{[jf]:Af}],[0,{[jf]:wm}],[0,{[jf]:Sm}],[0,{[jf]:jm}],[0,{[jf]:km}],[0,{[jf]:Dm}],[4,{[jf]:Hm}],[0,{[jf]:Ff}],[0,{[jf]:$f}],[0,{[jf]:Vf}],[0,{[jf]:Gf}],[128,{[Cf]:Wf}],[0,{[jf]:th}],[0,{[jf]:Zf}],[0,{[jf]:uh}],[0,{[jf]:oh}],[()=>_h,{[jf]:sh}],[0,{[jf]:ah}],[()=>Ih,{[jf]:rh}],[()=>Ah,{[jf]:ih}],[2,{[jf]:nh}],[0,{[jf]:Jf}],[0,{[jf]:lh}],[0,{[jf]:Xf}],[5,{[jf]:Qf}],[0,{[jf]:Kf}],[0,{[jf]:Hf}],[0,{[jf]:If}],[0,{[jf]:qf}]],2],$h=[3,ph,"CreateSessionOutput",{[_f]:"CreateSessionResult"},[Bm,lf,mf,df,fm],[[()=>Kh,{[_f]:Bm}],[0,{[jf]:th}],[()=>Ih,{[jf]:rh}],[()=>Ah,{[jf]:ih}],[2,{[jf]:nh}]],1],Vh=[3,ph,"CreateSessionRequest",0,[mm,"SessionMode",lf,mf,df,fm],[[0,1],[0,{[jf]:"x-amz-create-session-mode"}],[0,{[jf]:th}],[()=>Ih,{[jf]:rh}],[()=>Ah,{[jf]:ih}],[2,{[jf]:nh}]],1],Gh=[3,ph,"PutObjectOutput",0,[Lm,Um,bm,vm,xm,Am,Im,Mm,lf,gf,cf,pf,mf,df,fm,"Size",nf],[[0,{[jf]:Uf}],[0,{[jf]:Um}],[0,{[jf]:Mf}],[0,{[jf]:Df}],[0,{[jf]:zf}],[0,{[jf]:Bf}],[0,{[jf]:Lf}],[0,{[jf]:qf}],[0,{[jf]:th}],[0,{[jf]:ch}],[0,{[jf]:oh}],[0,{[jf]:ah}],[()=>Ih,{[jf]:rh}],[()=>Ah,{[jf]:ih}],[2,{[jf]:nh}],[1,{[jf]:"x-amz-object-size"}],[0,{[jf]:Yf}]]],Wh=[3,ph,"PutObjectRequest",0,[mm,Ym,"ACL",hm,gm,Nm,Em,Cm,Rm,Pm,zm,ym,bm,vm,xm,Am,Im,Hm,Wm,Xm,Fm,$m,Vm,Gm,"WriteOffsetBytes",Jm,lf,af,bf,cf,uf,pf,mf,df,fm,of,hf,ef,tf,Zm,qm],[[0,1],[0,1],[0,{[jf]:Af}],[()=>Mh,16],[0,{[jf]:wm}],[0,{[jf]:Sm}],[0,{[jf]:jm}],[0,{[jf]:km}],[1,{[jf]:Tm}],[0,{[jf]:Om}],[0,{[jf]:Dm}],[0,{[jf]:eh}],[0,{[jf]:Mf}],[0,{[jf]:Df}],[0,{[jf]:zf}],[0,{[jf]:Bf}],[0,{[jf]:Lf}],[4,{[jf]:Hm}],[0,{[jf]:Km}],[0,{[jf]:Qm}],[0,{[jf]:Ff}],[0,{[jf]:$f}],[0,{[jf]:Vf}],[0,{[jf]:Gf}],[1,{[jf]:"x-amz-write-offset-bytes"}],[128,{[Cf]:Wf}],[0,{[jf]:th}],[0,{[jf]:Zf}],[0,{[jf]:uh}],[0,{[jf]:oh}],[()=>_h,{[jf]:sh}],[0,{[jf]:ah}],[()=>Ih,{[jf]:rh}],[()=>Ah,{[jf]:ih}],[2,{[jf]:nh}],[0,{[jf]:Jf}],[0,{[jf]:lh}],[0,{[jf]:Xf}],[5,{[jf]:Qf}],[0,{[jf]:Kf}],[0,{[jf]:Hf}]],2],Kh=[3,ph,"SessionCredentials",0,[dm,sf,ff,Lm],[[0,{[_f]:dm}],[()=>Ph,{[_f]:sf}],[()=>Ph,{[_f]:ff}],[4,{[_f]:Lm}]],4],Xh=[3,ph,"UploadPartOutput",0,[lf,Um,bm,vm,xm,Am,Im,cf,pf,mf,fm,nf],[[0,{[jf]:th}],[0,{[jf]:Um}],[0,{[jf]:Mf}],[0,{[jf]:Df}],[0,{[jf]:zf}],[0,{[jf]:Bf}],[0,{[jf]:Lf}],[0,{[jf]:oh}],[0,{[jf]:ah}],[()=>Ih,{[jf]:rh}],[2,{[jf]:nh}],[0,{[jf]:Yf}]]],Qh=[3,ph,"UploadPartRequest",0,[mm,Ym,rf,yf,hm,Rm,Pm,ym,bm,vm,xm,Am,Im,cf,uf,pf,of,qm],[[0,1],[0,1],[1,{[kf]:"partNumber"}],[0,{[kf]:Of}],[()=>Mh,16],[1,{[jf]:Tm}],[0,{[jf]:Om}],[0,{[jf]:eh}],[0,{[jf]:Mf}],[0,{[jf]:Df}],[0,{[jf]:zf}],[0,{[jf]:Bf}],[0,{[jf]:Lf}],[0,{[jf]:oh}],[()=>_h,{[jf]:sh}],[0,{[jf]:ah}],[0,{[jf]:Jf}],[0,{[jf]:Hf}]],4],Yh=[1,ph,"CompletedPartList",0,()=>Lh],Jh=[9,ph,"AbortMultipartUpload",{[wf]:["DELETE","/{Key+}?x-id=AbortMultipartUpload",204]},()=>zh,()=>Dh],Zh=[9,ph,_m,{[wf]:["POST","/{Key+}",200]},()=>Uh,()=>qh],ey=[9,ph,"CreateMultipartUpload",{[wf]:["POST","/{Key+}?uploads",200]},()=>Fh,()=>Hh],ty=[9,ph,"CreateSession",{[wf]:["GET","/?session",200]},()=>Vh,()=>$h],ry=[9,ph,"PutObject",{[Sf]:"-",[wf]:["PUT","/{Key+}?x-id=PutObject",200]},()=>Wh,()=>Gh],ny=[9,ph,"UploadPart",{[Sf]:"-",[wf]:["PUT","/{Key+}?x-id=UploadPart",200]},()=>Qh,()=>Xh];class iy extends(Go.classBuilder().ep({...Xd,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(e,t,r,n){return[tc(r,e.getEndpointParameterInstructions()),Da(r)]}).s("AmazonS3","CreateSession",{}).n("S3Client","CreateSessionCommand").sc(ty).build()){}const oy="3.1014.0";function sy(e){return"string"==typeof e?0===e.length:0===e.byteLength}var ay={name:"SHA-1"},ly={name:"HMAC",hash:ay},cy=new Uint8Array([218,57,163,238,94,107,75,13,50,85,191,239,149,96,24,144,175,216,7,9]);const uy={};function py(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:uy}var dy=function(){function e(e){this.toHash=new Uint8Array(0),void 0!==e&&(this.key=new Promise(function(t,r){py().crypto.subtle.importKey("raw",my(e),ly,!1,["sign"]).then(t,r)}),this.key.catch(function(){}))}return e.prototype.update=function(e){if(!sy(e)){var t=my(e),r=new Uint8Array(this.toHash.byteLength+t.byteLength);r.set(this.toHash,0),r.set(t,this.toHash.byteLength),this.toHash=r}},e.prototype.digest=function(){var e=this;return this.key?this.key.then(function(t){return py().crypto.subtle.sign(ly,t,e.toHash).then(function(e){return new Uint8Array(e)})}):sy(this.toHash)?Promise.resolve(cy):Promise.resolve().then(function(){return py().crypto.subtle.digest(ay,e.toHash)}).then(function(e){return Promise.resolve(new Uint8Array(e))})},e.prototype.reset=function(){this.toHash=new Uint8Array(0)},e}();function my(e){return"string"==typeof e?Cs(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}var fy=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function hy(e){return!(!function(e){if("object"==typeof e&&"object"==typeof e.crypto){return"function"==typeof e.crypto.getRandomValues}return!1}(e)||"object"!=typeof e.crypto.subtle)&&function(e){return e&&fy.every(function(t){return"function"==typeof e[t]})}(e.crypto.subtle)}var yy=function(){function e(e){if(!hy(py()))throw new Error("SHA1 not supported");this.hash=new dy(e)}return e.prototype.update=function(e,t){this.hash.update(Ts(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}(),gy={name:"SHA-256"},by={name:"HMAC",hash:gy},vy=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]),xy=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!Rs(e)){var t=Ts(e),r=new Uint8Array(this.toHash.byteLength+t.byteLength);r.set(this.toHash,0),r.set(t,this.toHash.byteLength),this.toHash=r}},e.prototype.digest=function(){var e=this;return this.key?this.key.then(function(t){return py().crypto.subtle.sign(by,t,e.toHash).then(function(e){return new Uint8Array(e)})}):Rs(this.toHash)?Promise.resolve(vy):Promise.resolve().then(function(){return py().crypto.subtle.digest(gy,e.toHash)}).then(function(e){return Promise.resolve(new Uint8Array(e))})},e.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise(function(t,r){py().crypto.subtle.importKey("raw",Ts(e.secret),by,!1,["sign"]).then(t,r)}),this.key.catch(function(){}))},e}(),wy=64,Sy=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Ny=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],jy=Math.pow(2,53)-1,Ey=function(){function e(){this.state=Int32Array.from(Ny),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,r=e.byteLength;if(this.bytesHashed+=r,8*this.bytesHashed>jy)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=e[t++],r--,this.bufferLength===wy&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),r=this.bufferLength;if(t.setUint8(this.bufferLength++,128),r%wy>=56){for(var n=this.bufferLength;n<wy;n++)t.setUint8(n,0);this.hashBuffer(),this.bufferLength=0}for(n=this.bufferLength;n<56;n++)t.setUint8(n,0);t.setUint32(56,Math.floor(e/4294967296),!0),t.setUint32(60,e),this.hashBuffer(),this.finished=!0}var i=new Uint8Array(32);for(n=0;n<8;n++)i[4*n]=this.state[n]>>>24&255,i[4*n+1]=this.state[n]>>>16&255,i[4*n+2]=this.state[n]>>>8&255,i[4*n+3]=this.state[n]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,r=t[0],n=t[1],i=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],u=0;u<wy;u++){if(u<16)this.temp[u]=(255&e[4*u])<<24|(255&e[4*u+1])<<16|(255&e[4*u+2])<<8|255&e[4*u+3];else{var p=this.temp[u-2],d=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,m=((p=this.temp[u-15])>>>7|p<<25)^(p>>>18|p<<14)^p>>>3;this.temp[u]=(d+this.temp[u-7]|0)+(m+this.temp[u-16]|0)}var f=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&a^~s&l)|0)+(c+(Sy[u]+this.temp[u]|0)|0)|0,h=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&n^r&i^n&i)|0;c=l,l=a,a=s,s=o+f|0,o=i,i=n,n=r,r=f+h|0}t[0]+=r,t[1]+=n,t[2]+=i,t[3]+=o,t[4]+=s,t[5]+=a,t[6]+=l,t[7]+=c},e}(),Cy=function(){function e(e){this.secret=e,this.hash=new Ey,this.reset()}return e.prototype.update=function(e){if(!Rs(e)&&!this.error)try{this.hash.update(Ts(e))}catch(t){this.error=t}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return vs(this,void 0,void 0,function(){return xs(this,function(e){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new Ey,this.secret){this.outer=new Ey;var e=function(e){var t=Ts(e);if(t.byteLength>wy){var r=new Ey;r.update(t),t=r.digest()}var n=new Uint8Array(wy);return n.set(t),n}(this.secret),t=new Uint8Array(wy);t.set(e);for(var r=0;r<wy;r++)e[r]^=54,t[r]^=92;this.hash.update(e),this.outer.update(t);for(r=0;r<e.byteLength;r++)e[r]=0}},e}();var ky=function(){function e(e){hy(py())?this.hash=new xy(e):this.hash=new Cy(e)}return e.prototype.update=function(e,t){this.hash.update(Ts(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}();const Ty=({serviceId:e,clientVersion:t})=>async r=>{var n,i,o;const s="undefined"!=typeof window?window.navigator:void 0,a=(null==s?void 0:s.userAgent)??"",l=(null==(n=null==s?void 0:s.userAgentData)?void 0:n.platform)??Ry.os(a)??"other",c=(null==(i=null==s?void 0:s.userAgentData)?void 0:i.brands)??[],u=c[c.length-1],p=(null==u?void 0:u.brand)??Ry.browser(a)??"unknown",d=(null==u?void 0:u.version)??"unknown",m=[["aws-sdk-js",t],["ua","2.1"],[`os/${l}`,void 0],["lang/js"],["md/browser",`${p}_${d}`]];e&&m.push([`api/${e}`,t]);const f=await(null==(o=null==r?void 0:r.userAgentAppId)?void 0:o.call(r));return f&&m.push([`app/${f}`]),m},Ry={os:e=>/iPhone|iPad|iPod/.test(e)?"iOS":/Macintosh|Mac OS X/.test(e)?"macOS":/Windows NT/.test(e)?"Windows":/Android/.test(e)?"Android":/Linux/.test(e)?"Linux":void 0,browser:e=>/EdgiOS|EdgA|Edg\//.test(e)?"Microsoft Edge":/Firefox\//.test(e)?"Firefox":/Chrome\//.test(e)?"Chrome":/Safari\//.test(e)?"Safari":void 0};class Oy{constructor(e){if(r(this,"bytes"),this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let r=7,n=Math.abs(Math.round(e));r>-1&&n>0;r--,n/=256)t[r]=n;return e<0&&Py(t),new Oy(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&Py(e),parseInt(Wn(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function Py(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}class _y{constructor(e,t){r(this,"toUtf8"),r(this,"fromUtf8"),this.toUtf8=e,this.fromUtf8=t}format(e){const t=[];for(const i of Object.keys(e)){const r=this.fromUtf8(i);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[i]))}const r=new Uint8Array(t.reduce((e,t)=>e+t.byteLength,0));let n=0;for(const i of t)r.set(i,n),n+=i.byteLength;return r}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,e.value,!1),new Uint8Array(r.buffer);case"long":const n=new Uint8Array(9);return n[0]=5,n.set(e.value.bytes,1),n;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const o=new Uint8Array(i.buffer);return o.set(e.value,3),o;case"string":const s=this.fromUtf8(e.value),a=new DataView(new ArrayBuffer(3+s.byteLength));a.setUint8(0,7),a.setUint16(1,s.byteLength,!1);const l=new Uint8Array(a.buffer);return l.set(s,3),l;case"timestamp":const c=new Uint8Array(9);return c[0]=8,c.set(Oy.fromNumber(e.value.valueOf()).bytes,1),c;case"uuid":if(!Fy.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const u=new Uint8Array(17);return u[0]=9,u.set(Gn(e.value.replace(/\-/g,"")),1),u}}parse(e){const t={};let r=0;for(;r<e.byteLength;){const n=e.getUint8(r++),i=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+r,n));switch(r+=n,e.getUint8(r++)){case 0:t[i]={type:Iy,value:!0};break;case 1:t[i]={type:Iy,value:!1};break;case 2:t[i]={type:My,value:e.getInt8(r++)};break;case 3:t[i]={type:Dy,value:e.getInt16(r,!1)},r+=2;break;case 4:t[i]={type:zy,value:e.getInt32(r,!1)},r+=4;break;case 5:t[i]={type:By,value:new Oy(new Uint8Array(e.buffer,e.byteOffset+r,8))},r+=8;break;case 6:const n=e.getUint16(r,!1);r+=2,t[i]={type:Ly,value:new Uint8Array(e.buffer,e.byteOffset+r,n)},r+=n;break;case 7:const o=e.getUint16(r,!1);r+=2,t[i]={type:qy,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+r,o))},r+=o;break;case 8:t[i]={type:Uy,value:new Date(new Oy(new Uint8Array(e.buffer,e.byteOffset+r,8)).valueOf())},r+=8;break;case 9:const s=new Uint8Array(e.buffer,e.byteOffset+r,16);r+=16,t[i]={type:Hy,value:`${Wn(s.subarray(0,4))}-${Wn(s.subarray(4,6))}-${Wn(s.subarray(6,8))}-${Wn(s.subarray(8,10))}-${Wn(s.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return t}}var Ay;!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(Ay||(Ay={}));const Iy="boolean",My="byte",Dy="short",zy="integer",By="long",Ly="binary",qy="string",Uy="timestamp",Hy="uuid",Fy=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class $y{constructor(e,t){r(this,"headerMarshaller"),r(this,"messageBuffer"),r(this,"isEndOfStream"),this.headerMarshaller=new _y(e,t),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){const e=this.messageBuffer.pop(),t=this.isEndOfStream;return{getMessage:()=>e,isEndOfStream:()=>t}}getAvailableMessages(){const e=this.messageBuffer;this.messageBuffer=[];const t=this.isEndOfStream;return{getMessages:()=>e,isEndOfStream:()=>t}}encode({headers:e,body:t}){const r=this.headerMarshaller.format(e),n=r.byteLength+t.byteLength+16,i=new Uint8Array(n),o=new DataView(i.buffer,i.byteOffset,i.byteLength),s=new Ks;return o.setUint32(0,n,!1),o.setUint32(4,r.byteLength,!1),o.setUint32(8,s.update(i.subarray(0,8)).digest(),!1),i.set(r,12),i.set(t,r.byteLength+12),o.setUint32(n-4,s.update(i.subarray(8,n-4)).digest(),!1),i}decode(e){const{headers:t,body:r}=function({byteLength:e,byteOffset:t,buffer:r}){if(e<16)throw new Error("Provided message too short to accommodate event stream message overhead");const n=new DataView(r,t,e),i=n.getUint32(0,!1);if(e!==i)throw new Error("Reported message length does not match received message length");const o=n.getUint32(4,!1),s=n.getUint32(8,!1),a=n.getUint32(e-4,!1),l=(new Ks).update(new Uint8Array(r,t,8));if(s!==l.digest())throw new Error(`The prelude checksum specified in the message (${s}) does not match the calculated CRC32 checksum (${l.digest()})`);if(l.update(new Uint8Array(r,t+8,e-12)),a!==l.digest())throw new Error(`The message checksum (${l.digest()}) did not match the expected value of ${a}`);return{headers:new DataView(r,t+8+4,o),body:new Uint8Array(r,t+8+4+o,i-o-16)}}(e);return{headers:this.headerMarshaller.parse(t),body:r}}formatHeaders(e){return this.headerMarshaller.format(e)}}class Vy{constructor(e){r(this,"options"),this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.decoder.decode(e);yield t}}}class Gy{constructor(e){r(this,"options"),this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=this.options.encoder.encode(e);yield t}this.options.includeEndFrame&&(yield new Uint8Array(0))}}class Wy{constructor(e){r(this,"options"),this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=await this.options.deserializer(e);void 0!==t&&(yield t)}}}class Ky{constructor(e){r(this,"options"),this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.serializer(e);yield t}}}function Xy(e,t){return async function(r){const{value:n}=r.headers[":message-type"];if("error"===n){const e=new Error(r.headers[":error-message"].value||"UnknownError");throw e.name=r.headers[":error-code"].value,e}if("exception"===n){const n=r.headers[":exception-type"].value,i={[n]:r},o=await e(i);if(o.$unknown){const e=new Error(t(r.body));throw e.name=n,e}throw o[n]}if("event"===n){const t={[r.headers[":event-type"].value]:r},n=await e(t);if(n.$unknown)return;return n}throw Error(`Unrecognizable event type: ${r.headers[":event-type"].value}`)}}let Qy=class{constructor({utf8Encoder:e,utf8Decoder:t}){r(this,"eventStreamCodec"),r(this,"utfEncoder"),this.eventStreamCodec=new $y(e,t),this.utfEncoder=e}deserialize(e,t){const r=function(e){let t=0,r=0,n=null,i=null;const o=e=>{if("number"!=typeof e)throw new Error("Attempted to allocate an event message where size was not a number: "+e);t=e,r=4,n=new Uint8Array(e),new DataView(n.buffer).setUint32(0,e,!1)};return{[Symbol.asyncIterator]:async function*(){const s=e[Symbol.asyncIterator]();for(;;){const{value:e,done:a}=await s.next();if(a){if(!t)return;if(t!==r)throw new Error("Truncated event message received.");return void(yield n)}const l=e.length;let c=0;for(;c<l;){if(!n){const t=l-c;i||(i=new Uint8Array(4));const n=Math.min(4-r,t);if(i.set(e.slice(c,c+n),r),r+=n,c+=n,r<4)break;o(new DataView(i.buffer).getUint32(0,!1)),i=null}const s=Math.min(t-r,l-c);n.set(e.slice(c,c+s),r),r+=s,c+=s,t&&t===r&&(yield n,n=null,t=0,r=0)}}}}}(e);return new Wy({messageStream:new Vy({inputStream:r,decoder:this.eventStreamCodec}),deserializer:Xy(t,this.utfEncoder)})}serialize(e,t){return new Gy({messageStream:new Ky({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}};class Yy{constructor({utf8Encoder:e,utf8Decoder:t}){r(this,"universalMarshaller"),this.universalMarshaller=new Qy({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){const r=Jy(e)?(n=e,{[Symbol.asyncIterator]:async function*(){const e=n.getReader();try{for(;;){const{done:t,value:r}=await e.read();if(t)return;yield r}}finally{e.releaseLock()}}}):e;var n;return this.universalMarshaller.deserialize(r,t)}serialize(e,t){const r=this.universalMarshaller.serialize(e,t);return"function"==typeof ReadableStream?(e=>{const t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(e){const{done:r,value:n}=await t.next();if(r)return e.close();e.enqueue(n)}})})(r):r}}const Jy=e=>"function"==typeof ReadableStream&&e instanceof ReadableStream,Zy=e=>new Yy(e);const eg=async function(e,t){const r=new e;return await async function(e,t,r=1048576){const n=e.size;let i=0;for(;i<n;){const o=e.slice(i,Math.min(n,i+r));t(new Uint8Array(await o.arrayBuffer())),i+=o.size}}(t,e=>{r.update(e)}),r.digest()},tg=64,rg=[1732584193,4023233417,2562383102,271733878];class ng{constructor(){r(this,"state"),r(this,"buffer"),r(this,"bufferLength"),r(this,"bytesHashed"),r(this,"finished"),this.reset()}update(e){if(function(e){if("string"==typeof e)return 0===e.length;return 0===e.byteLength}(e))return;if(this.finished)throw new Error("Attempted to update an already finished hash.");const t=function(e){if("string"==typeof e)return Sn(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)}(e);let r=0,{byteLength:n}=t;for(this.bytesHashed+=n;n>0;)this.buffer.setUint8(this.bufferLength++,t[r++]),n--,this.bufferLength===tg&&(this.hashBuffer(),this.bufferLength=0)}async digest(){if(!this.finished){const{buffer:e,bufferLength:t,bytesHashed:r}=this,n=8*r;if(e.setUint8(this.bufferLength++,128),t%tg>=56){for(let t=this.bufferLength;t<tg;t++)e.setUint8(t,0);this.hashBuffer(),this.bufferLength=0}for(let i=this.bufferLength;i<56;i++)e.setUint8(i,0);e.setUint32(56,n>>>0,!0),e.setUint32(60,Math.floor(n/4294967296),!0),this.hashBuffer(),this.finished=!0}const e=new DataView(new ArrayBuffer(16));for(let t=0;t<4;t++)e.setUint32(4*t,this.state[t],!0);return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}hashBuffer(){const{buffer:e,state:t}=this;let r=t[0],n=t[1],i=t[2],o=t[3];r=og(r,n,i,o,e.getUint32(0,!0),7,3614090360),o=og(o,r,n,i,e.getUint32(4,!0),12,3905402710),i=og(i,o,r,n,e.getUint32(8,!0),17,606105819),n=og(n,i,o,r,e.getUint32(12,!0),22,3250441966),r=og(r,n,i,o,e.getUint32(16,!0),7,4118548399),o=og(o,r,n,i,e.getUint32(20,!0),12,1200080426),i=og(i,o,r,n,e.getUint32(24,!0),17,2821735955),n=og(n,i,o,r,e.getUint32(28,!0),22,4249261313),r=og(r,n,i,o,e.getUint32(32,!0),7,1770035416),o=og(o,r,n,i,e.getUint32(36,!0),12,2336552879),i=og(i,o,r,n,e.getUint32(40,!0),17,4294925233),n=og(n,i,o,r,e.getUint32(44,!0),22,2304563134),r=og(r,n,i,o,e.getUint32(48,!0),7,1804603682),o=og(o,r,n,i,e.getUint32(52,!0),12,4254626195),i=og(i,o,r,n,e.getUint32(56,!0),17,2792965006),n=og(n,i,o,r,e.getUint32(60,!0),22,1236535329),r=sg(r,n,i,o,e.getUint32(4,!0),5,4129170786),o=sg(o,r,n,i,e.getUint32(24,!0),9,3225465664),i=sg(i,o,r,n,e.getUint32(44,!0),14,643717713),n=sg(n,i,o,r,e.getUint32(0,!0),20,3921069994),r=sg(r,n,i,o,e.getUint32(20,!0),5,3593408605),o=sg(o,r,n,i,e.getUint32(40,!0),9,38016083),i=sg(i,o,r,n,e.getUint32(60,!0),14,3634488961),n=sg(n,i,o,r,e.getUint32(16,!0),20,3889429448),r=sg(r,n,i,o,e.getUint32(36,!0),5,568446438),o=sg(o,r,n,i,e.getUint32(56,!0),9,3275163606),i=sg(i,o,r,n,e.getUint32(12,!0),14,4107603335),n=sg(n,i,o,r,e.getUint32(32,!0),20,1163531501),r=sg(r,n,i,o,e.getUint32(52,!0),5,2850285829),o=sg(o,r,n,i,e.getUint32(8,!0),9,4243563512),i=sg(i,o,r,n,e.getUint32(28,!0),14,1735328473),n=sg(n,i,o,r,e.getUint32(48,!0),20,2368359562),r=ag(r,n,i,o,e.getUint32(20,!0),4,4294588738),o=ag(o,r,n,i,e.getUint32(32,!0),11,2272392833),i=ag(i,o,r,n,e.getUint32(44,!0),16,1839030562),n=ag(n,i,o,r,e.getUint32(56,!0),23,4259657740),r=ag(r,n,i,o,e.getUint32(4,!0),4,2763975236),o=ag(o,r,n,i,e.getUint32(16,!0),11,1272893353),i=ag(i,o,r,n,e.getUint32(28,!0),16,4139469664),n=ag(n,i,o,r,e.getUint32(40,!0),23,3200236656),r=ag(r,n,i,o,e.getUint32(52,!0),4,681279174),o=ag(o,r,n,i,e.getUint32(0,!0),11,3936430074),i=ag(i,o,r,n,e.getUint32(12,!0),16,3572445317),n=ag(n,i,o,r,e.getUint32(24,!0),23,76029189),r=ag(r,n,i,o,e.getUint32(36,!0),4,3654602809),o=ag(o,r,n,i,e.getUint32(48,!0),11,3873151461),i=ag(i,o,r,n,e.getUint32(60,!0),16,530742520),n=ag(n,i,o,r,e.getUint32(8,!0),23,3299628645),r=lg(r,n,i,o,e.getUint32(0,!0),6,4096336452),o=lg(o,r,n,i,e.getUint32(28,!0),10,1126891415),i=lg(i,o,r,n,e.getUint32(56,!0),15,2878612391),n=lg(n,i,o,r,e.getUint32(20,!0),21,4237533241),r=lg(r,n,i,o,e.getUint32(48,!0),6,1700485571),o=lg(o,r,n,i,e.getUint32(12,!0),10,2399980690),i=lg(i,o,r,n,e.getUint32(40,!0),15,4293915773),n=lg(n,i,o,r,e.getUint32(4,!0),21,2240044497),r=lg(r,n,i,o,e.getUint32(32,!0),6,1873313359),o=lg(o,r,n,i,e.getUint32(60,!0),10,4264355552),i=lg(i,o,r,n,e.getUint32(24,!0),15,2734768916),n=lg(n,i,o,r,e.getUint32(52,!0),21,1309151649),r=lg(r,n,i,o,e.getUint32(16,!0),6,4149444226),o=lg(o,r,n,i,e.getUint32(44,!0),10,3174756917),i=lg(i,o,r,n,e.getUint32(8,!0),15,718787259),n=lg(n,i,o,r,e.getUint32(36,!0),21,3951481745),t[0]=r+t[0]&4294967295,t[1]=n+t[1]&4294967295,t[2]=i+t[2]&4294967295,t[3]=o+t[3]&4294967295}reset(){this.state=Uint32Array.from(rg),this.buffer=new DataView(new ArrayBuffer(tg)),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}}function ig(e,t,r,n,i,o){return((t=(t+e&4294967295)+(n+o&4294967295)&4294967295)<<i|t>>>32-i)+r&4294967295}function og(e,t,r,n,i,o,s){return ig(t&r|~t&n,e,t,i,o,s)}function sg(e,t,r,n,i,o,s){return ig(t&n|r&~n,e,t,i,o,s)}function ag(e,t,r,n,i,o,s){return ig(t^r^n,e,t,i,o,s)}function lg(e,t,r,n,i,o,s){return ig(r^(t|~n),e,t,i,o,s)}const cg=["in-region","cross-region","mobile","standard","legacy"],ug=()=>{var e;const t=null==window?void 0:window.navigator;if(null==t?void 0:t.connection){const{effectiveType:e,rtt:r,downlink:n}=null==t?void 0:t.connection;if("string"==typeof e&&"4g"!==e||Number(r)>100||Number(n)<10)return!0}return(null==(e=null==t?void 0:t.userAgentData)?void 0:e.mobile)||"number"==typeof(null==t?void 0:t.maxTouchPoints)&&(null==t?void 0:t.maxTouchPoints)>1},pg=e=>{const t=(({defaultsMode:e}={})=>to(async()=>{const t="function"==typeof e?await e():e;switch(null==t?void 0:t.toLowerCase()){case"auto":return Promise.resolve(ug()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(null==t?void 0:t.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${cg.join(", ")}, got ${t}`)}}))(e),r=()=>t().then(Qo),n=(e=>({apiVersion:"2006-03-01",base64Decoder:(null==e?void 0:e.base64Decoder)??wn,base64Encoder:(null==e?void 0:e.base64Encoder)??En,disableHostPrefix:(null==e?void 0:e.disableHostPrefix)??!1,endpointProvider:(null==e?void 0:e.endpointProvider)??Ld,extensions:(null==e?void 0:e.extensions)??[],getAwsChunkedEncodingStream:(null==e?void 0:e.getAwsChunkedEncodingStream)??Mn,httpAuthSchemeProvider:(null==e?void 0:e.httpAuthSchemeProvider)??$d,httpAuthSchemes:(null==e?void 0:e.httpAuthSchemes)??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new an},{schemeId:"aws.auth#sigv4a",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4a"),signer:new ln}],logger:(null==e?void 0:e.logger)??new ts,protocol:(null==e?void 0:e.protocol)??ys,protocolSettings:(null==e?void 0:e.protocolSettings)??{defaultNamespace:"com.amazonaws.s3",errorTypeRegistries:Oh,xmlNamespace:"http://s3.amazonaws.com/doc/2006-03-01/",version:"2006-03-01",serviceTarget:"AmazonS3"},sdkStreamMixin:(null==e?void 0:e.sdkStreamMixin)??Xn,serviceId:(null==e?void 0:e.serviceId)??"S3",signerConstructor:(null==e?void 0:e.signerConstructor)??pc,signingEscapePath:(null==e?void 0:e.signingEscapePath)??!1,urlParser:(null==e?void 0:e.urlParser)??ri,useArnRegion:(null==e?void 0:e.useArnRegion)??void 0,utf8Decoder:(null==e?void 0:e.utf8Decoder)??Sn,utf8Encoder:(null==e?void 0:e.utf8Encoder)??jn}))(e);return{...n,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:(null==e?void 0:e.bodyLengthChecker)??zo,credentialDefaultProvider:(null==e?void 0:e.credentialDefaultProvider)??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:(null==e?void 0:e.defaultUserAgentProvider)??Ty({serviceId:n.serviceId,clientVersion:oy}),eventStreamSerdeProvider:(null==e?void 0:e.eventStreamSerdeProvider)??Zy,maxAttempts:(null==e?void 0:e.maxAttempts)??3,md5:(null==e?void 0:e.md5)??ng,region:(null==e?void 0:e.region)??(i="Region is missing",()=>Promise.reject(i)),requestHandler:Un.create((null==e?void 0:e.requestHandler)??r),retryMode:(null==e?void 0:e.retryMode)??(async()=>(await r()).retryMode||gl),sha1:(null==e?void 0:e.sha1)??yy,sha256:(null==e?void 0:e.sha256)??ky,streamCollector:(null==e?void 0:e.streamCollector)??Fn,streamHasher:(null==e?void 0:e.streamHasher)??eg,useDualstackEndpoint:(null==e?void 0:e.useDualstackEndpoint)??(()=>Promise.resolve(false)),useFipsEndpoint:(null==e?void 0:e.useFipsEndpoint)??(()=>Promise.resolve(false))};var i};class dg extends Fo{constructor(...[e]){const t=pg(e||{});super(t),r(this,"config"),this.initConfig=t;var n;const i=function(e){const t=gn(e.userAgentAppId??void 0),{customUserAgent:r}=e;return Object.assign(e,{customUserAgent:"string"==typeof r?[[r]]:r,userAgentAppId:async()=>{var r,n;const i=await t();if(!function(e){return void 0===e||"string"==typeof e&&e.length<=50}(i)){const t="NoOpLogger"!==(null==(n=null==(r=e.logger)?void 0:r.constructor)?void 0:n.name)&&e.logger?e.logger:console;"string"!=typeof i?null==t||t.warn("userAgentAppId must be a string or undefined."):i.length>50&&(null==t||t.warn("The provided userAgentAppId exceeds the maximum length of 50 characters."))}return i}})}((n=t,Object.assign(n,{useFipsEndpoint:n.useFipsEndpoint??!1,useDualstackEndpoint:n.useDualstackEndpoint??!1,forcePathStyle:n.forcePathStyle??!1,useAccelerateEndpoint:n.useAccelerateEndpoint??!1,useGlobalEndpoint:n.useGlobalEndpoint??!1,disableMultiregionAccessPoints:n.disableMultiregionAccessPoints??!1,defaultSigningName:"s3",clientContextParams:n.clientContextParams??{}}))),o=(e=>{const{requestChecksumCalculation:t,responseChecksumValidation:r,requestStreamBufferSize:n}=e;return Object.assign(e,{requestChecksumCalculation:un(t??Vr),responseChecksumValidation:un(r??Kr),requestStreamBufferSize:Number(n??0),checksumAlgorithms:e.checksumAlgorithms??{}})})(i),s=nc(o),a=(e=>{const t=e.tls??!0,{endpoint:r,useDualstackEndpoint:n,useFipsEndpoint:i}=e,o=null!=r?async()=>Yl(await un(r)()):void 0,s=!!r,a=Object.assign(e,{endpoint:o,tls:t,isCustomEndpoint:s,useDualstackEndpoint:un(n??!1),useFipsEndpoint:un(i??!1)});let l;return a.serviceConfiguredEndpoint=async()=>(e.serviceId&&!l&&(l=Ql(e.serviceId)),l),a})(ql(s)),l=(c=a,Object.assign(c,{eventStreamMarshaller:c.eventStreamSerdeProvider(c)}));var c;const u=((e,{session:t})=>{const[r,n]=t,{forcePathStyle:i,useAccelerateEndpoint:o,disableMultiregionAccessPoints:s,followRegionRedirects:a,s3ExpressIdentityProvider:l,bucketEndpoint:c,expectContinueHeader:u}=e;return Object.assign(e,{forcePathStyle:i??!1,useAccelerateEndpoint:o??!1,disableMultiregionAccessPoints:s??!1,followRegionRedirects:a??!1,s3ExpressIdentityProvider:l??new wa(async e=>r().send(new n({Bucket:e}))),bucketEndpoint:c??!1,expectContinueHeader:u??2097152})})(Kd(l),{session:[()=>this,iy]}),p=((e,t)=>{const r=Object.assign((e=>({setRegion(t){e.region=t},region:()=>e.region}))(e),Jo(e),(e=>({setHttpHandler(t){e.httpHandler=t},httpHandler:()=>e.httpHandler,updateHttpClientConfig(t,r){var n;null==(n=e.httpHandler)||n.updateHttpClientConfig(t,r)},httpHandlerConfigs:()=>e.httpHandler.httpHandlerConfigs()}))(e),(e=>{const t=e.httpAuthSchemes;let r=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(e){const r=t.findIndex(t=>t.schemeId===e.schemeId);-1===r?t.push(e):t.splice(r,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){r=e},httpAuthSchemeProvider:()=>r,setCredentials(e){n=e},credentials:()=>n}})(e));return t.forEach(e=>e.configure(r)),Object.assign(e,{region:r.region()},Zo(r),{httpHandler:r.httpHandler()},{httpAuthSchemes:(n=r).httpAuthSchemes(),httpAuthSchemeProvider:n.httpAuthSchemeProvider(),credentials:n.credentials()});var n})(u,(null==e?void 0:e.extensions)||[]);var d;this.config=p,this.middlewareStack.use(si(this.config)),this.middlewareStack.use((d=this.config,{applyToStack:e=>{e.add(Ml(d),zl)}})),this.middlewareStack.use(cc(this.config)),this.middlewareStack.use(Fl(this.config)),this.middlewareStack.use(ca(this.config)),this.middlewareStack.use((this.config,{applyToStack:e=>{e.add((e,t)=>async r=>{var n,i;try{const i=await e(r),{clientName:o,commandName:s,logger:a,dynamoDbDocumentClientOptions:l={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=l,p=c??t.inputFilterSensitiveLog,d=u??t.outputFilterSensitiveLog,{$metadata:m,...f}=i.output;return null==(n=null==a?void 0:a.info)||n.call(a,{clientName:o,commandName:s,input:p(r.input),output:d(f),metadata:m}),i}catch(o){const{clientName:e,commandName:n,logger:s,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:l}=a,c=l??t.inputFilterSensitiveLog;throw null==(i=null==s?void 0:s.error)||i.call(s,{clientName:e,commandName:n,input:c(r.input),error:o,metadata:o.$metadata}),o}},ua)}})),this.middlewareStack.use((this.config,{applyToStack:e=>{e.add(e=>async t=>e(t),pa)}})),this.middlewareStack.use(((e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r})=>({applyToStack:n=>{n.addRelativeTo(pn(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r}),dn)}}))(this.config,{httpAuthSchemeParametersProvider:qd,identityProviderConfigProvider:async e=>new Yi({"aws.auth#sigv4":e.credentials,"aws.auth#sigv4a":e.credentials})})),this.middlewareStack.use(yn(this.config)),this.middlewareStack.use(La(this.config)),this.middlewareStack.use(Hr(this.config)),this.middlewareStack.use(ya(this.config)),this.middlewareStack.use(Ta(this.config)),this.middlewareStack.use((e=>({applyToStack:t=>{t.addRelativeTo(Pa(e),hn)}}))(this.config))}destroy(){super.destroy()}}class mg extends(Go.classBuilder().ep({...Xd,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(e,t,r,n){return[tc(r,e.getEndpointParameterInstructions()),Da(r)]}).s("AmazonS3","AbortMultipartUpload",{}).n("S3Client","AbortMultipartUploadCommand").sc(Jh).build()){}const fg={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},hg=e=>({applyToStack:t=>{var r;t.add((r=e,e=>async t=>{const n={...t.input},i=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}];for(const e of i){const t=n[e.target];if(t){let i;"string"==typeof t?yg(t,r)?i=r.base64Decoder(t):(i=r.utf8Decoder(t),n[e.target]=r.base64Encoder(i)):(i=ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(t),n[e.target]=r.base64Encoder(i));const o=new r.md5;o.update(i),n[e.hash]=r.base64Encoder(await o.digest())}}return e({...t,input:n})}),fg)}});function yg(e,t){if(!/^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e))return!1;try{return 32===t.base64Decoder(e).length}catch{return!1}}class gg extends(Go.classBuilder().ep({...Xd,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(e,t,r,n){return[tc(r,e.getEndpointParameterInstructions()),Da(r),hg(r)]}).s("AmazonS3","CompleteMultipartUpload",{}).n("S3Client","CompleteMultipartUploadCommand").sc(Zh).build()){}class bg extends(Go.classBuilder().ep({...Xd,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(e,t,r,n){return[tc(r,e.getEndpointParameterInstructions()),Da(r),hg(r)]}).s("AmazonS3","CreateMultipartUpload",{}).n("S3Client","CreateMultipartUploadCommand").sc(ey).build()){}class vg extends(Go.classBuilder().ep({...Xd,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(e,t,r,n){return[tc(r,e.getEndpointParameterInstructions()),aa(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),ma(),Da(r),hg(r)]}).s("AmazonS3","PutObject",{}).n("S3Client","PutObjectCommand").sc(ry).build()){}class xg extends(Go.classBuilder().ep({...Xd,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(e,t,r,n){return[tc(r,e.getEndpointParameterInstructions()),aa(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),Da(r),hg(r)]}).s("AmazonS3","UploadPart",{}).n("S3Client","UploadPartCommand").sc(ny).build()){}const wg=new WeakMap,Sg=new WeakMap;class Ng{constructor(){this.onabort=null,wg.set(this,[]),Sg.set(this,!1)}get aborted(){if(!Sg.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return Sg.get(this)}static get none(){return new Ng}addEventListener(e,t){if(!wg.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");wg.get(this).push(t)}removeEventListener(e,t){if(!wg.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");const r=wg.get(this),n=r.indexOf(t);n>-1&&r.splice(n,1)}dispatchEvent(e){throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.")}}function jg(e){if(e.aborted)return;e.onabort&&e.onabort.call(e);const t=wg.get(e);t&&t.slice().forEach(t=>{t.call(e,{type:"abort"})}),Sg.set(e,!0)}let Eg=class extends Error{constructor(e){super(e),this.name="AbortError"}},Cg=class{constructor(e){if(this._signal=new Ng,e){Array.isArray(e)||(e=arguments);for(const t of e)t.aborted?this.abort():t.addEventListener("abort",()=>{this.abort()})}}get signal(){return this._signal}abort(){jg(this._signal)}static timeout(e){const t=new Ng,r=setTimeout(jg,e,t);return"function"==typeof r.unref&&r.unref(),t}};function kg(e){return e.toLowerCase()}function Tg(e){if(e&&"object"==typeof e){const t=e;if("function"==typeof t.rawHeaders&&"function"==typeof t.clone&&"function"==typeof t.get&&"function"==typeof t.set&&"function"==typeof t.contains&&"function"==typeof t.remove&&"function"==typeof t.headersArray&&"function"==typeof t.headerValues&&"function"==typeof t.headerNames&&"function"==typeof t.toJson)return!0}return!1}class Rg{constructor(e){if(this._headersMap={},e)for(const t in e)this.set(t,e[t])}set(e,t){this._headersMap[kg(e)]={name:e,value:t.toString().trim()}}get(e){const t=this._headersMap[kg(e)];return t?t.value:void 0}contains(e){return!!this._headersMap[kg(e)]}remove(e){const t=this.contains(e);return delete this._headersMap[kg(e)],t}rawHeaders(){return this.toJson({preserveCase:!0})}headersArray(){const e=[];for(const t in this._headersMap)e.push(this._headersMap[t]);return e}headerNames(){const e=[],t=this.headersArray();for(let r=0;r<t.length;++r)e.push(t[r].name);return e}headerValues(){const e=[],t=this.headersArray();for(let r=0;r<t.length;++r)e.push(t[r].value);return e}toJson(e={}){const t={};if(e.preserveCase)for(const r in this._headersMap){const e=this._headersMap[r];t[e.name]=e.value}else for(const r in this._headersMap){const e=this._headersMap[r];t[kg(e.name)]=e.value}return t}toString(){return JSON.stringify(this.toJson({preserveCase:!0}))}clone(){const e={};for(const t in this._headersMap){const r=this._headersMap[t];e[r.name]=r.value}return new Rg(e)}}function Og(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function Pg(e){const t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}const _g="3.0.5",Ag={StatusCodes:{TooManyRequests:429,ServiceUnavailable:503}},Ig={AUTHORIZATION:"authorization",RETRY_AFTER:"Retry-After"},Mg="$",Dg="_";var zg,Bg=new Uint8Array(16);function Lg(){if(!zg&&!(zg="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return zg(Bg)}const qg=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var Ug=[],Hg=0;Hg<256;++Hg)Ug.push((Hg+256).toString(16).substr(1));function Fg(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(Ug[e[t+0]]+Ug[e[t+1]]+Ug[e[t+2]]+Ug[e[t+3]]+"-"+Ug[e[t+4]]+Ug[e[t+5]]+"-"+Ug[e[t+6]]+Ug[e[t+7]]+"-"+Ug[e[t+8]]+Ug[e[t+9]]+"-"+Ug[e[t+10]]+Ug[e[t+11]]+Ug[e[t+12]]+Ug[e[t+13]]+Ug[e[t+14]]+Ug[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&qg.test(e)}(r))throw TypeError("Stringified UUID is invalid");return r}function $g(e,t,r){var n=(e=e||{}).random||(e.rng||Lg)();return n[6]=15&n[6]|64,n[8]=63&n[8]|128,Fg(n)}const Vg=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i;function Gg(){return $g()}const Wg=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Kg(e,t,r){return e&&t?e.split(t).join(r||""):e}class Xg{constructor(e={},t){this.modelMappers=e,this.isXML=t}validateConstraints(e,t,r){const n=(e,n)=>{throw new Error(`"${r}" with value "${t}" should satisfy the constraint "${e}": ${n}.`)};if(e.constraints&&null!=t){const r=t,{ExclusiveMaximum:i,ExclusiveMinimum:o,InclusiveMaximum:s,InclusiveMinimum:a,MaxItems:l,MaxLength:c,MinItems:u,MinLength:p,MultipleOf:d,Pattern:m,UniqueItems:f}=e.constraints;null!=i&&r>=i&&n("ExclusiveMaximum",i),null!=o&&r<=o&&n("ExclusiveMinimum",o),null!=s&&r>s&&n("InclusiveMaximum",s),null!=a&&r<a&&n("InclusiveMinimum",a);const h=t;if(null!=l&&h.length>l&&n("MaxItems",l),null!=c&&h.length>c&&n("MaxLength",c),null!=u&&h.length<u&&n("MinItems",u),null!=p&&h.length<p&&n("MinLength",p),null!=d&&r%d!==0&&n("MultipleOf",d),m){const e="string"==typeof m?new RegExp(m):m;"string"==typeof t&&null!==t.match(e)||n("Pattern",m)}f&&h.some((e,t,r)=>r.indexOf(e)!==t)&&n("UniqueItems",f)}}serialize(e,t,r,n={}){var i,o,s;const a={rootName:null!==(i=n.rootName)&&void 0!==i?i:"",includeRoot:null!==(o=n.includeRoot)&&void 0!==o&&o,xmlCharKey:null!==(s=n.xmlCharKey)&&void 0!==s?s:Dg};let l={};const c=e.type.name;r||(r=e.serializedName),null!==c.match(/^Sequence$/i)&&(l=[]),e.isConstant&&(t=e.defaultValue);const{required:u,nullable:p}=e;if(u&&p&&void 0===t)throw new Error(`${r} cannot be undefined.`);if(u&&!p&&null==t)throw new Error(`${r} cannot be null or undefined.`);if(!u&&!1===p&&null===t)throw new Error(`${r} cannot be null.`);if(null==t)l=t;else if(null!==c.match(/^any$/i))l=t;else if(null!==c.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i))l=function(e,t,r){if(null!=r)if(null!==e.match(/^Number$/i)){if("number"!=typeof r)throw new Error(`${t} with value ${r} must be of type number.`)}else if(null!==e.match(/^String$/i)){if("string"!=typeof r.valueOf())throw new Error(`${t} with value "${r}" must be of type string.`)}else if(null!==e.match(/^Uuid$/i)){if("string"!=typeof r.valueOf()||(n=r,!Vg.test(n)))throw new Error(`${t} with value "${r}" must be of type string and a valid uuid.`)}else if(null!==e.match(/^Boolean$/i)){if("boolean"!=typeof r)throw new Error(`${t} with value ${r} must be of type boolean.`)}else if(null!==e.match(/^Stream$/i)){const e=typeof r;if(!("string"===e||"function"===e||r instanceof ArrayBuffer||ArrayBuffer.isView(r)||("function"==typeof Blob||"object"==typeof Blob)&&r instanceof Blob))throw new Error(`${t} must be a string, Blob, ArrayBuffer, ArrayBufferView, or a function returning NodeJS.ReadableStream.`)}var n;return r}(c,r,t);else if(null!==c.match(/^Enum$/i)){l=function(e,t,r){if(!t)throw new Error(`Please provide a set of allowedValues to validate ${e} as an Enum Type.`);if(!t.some(e=>"string"==typeof e.valueOf()?e.toLowerCase()===r.toLowerCase():e===r))throw new Error(`${r} is not a valid value for ${e}. The valid values are: ${JSON.stringify(t)}.`);return r}(r,e.type.allowedValues,t)}else null!==c.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i)?l=function(e,t,r){if(null!=t)if(null!==e.match(/^Date$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${r} must be an instanceof Date or a string in ISO8601 format.`);t=t instanceof Date?t.toISOString().substring(0,10):new Date(t).toISOString().substring(0,10)}else if(null!==e.match(/^DateTime$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${r} must be an instanceof Date or a string in ISO8601 format.`);t=t instanceof Date?t.toISOString():new Date(t).toISOString()}else if(null!==e.match(/^DateTimeRfc1123$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${r} must be an instanceof Date or a string in RFC-1123 format.`);t=t instanceof Date?t.toUTCString():new Date(t).toUTCString()}else if(null!==e.match(/^UnixTime$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${r} must be an instanceof Date or a string in RFC-1123/ISO8601 format for it to be serialized in UnixTime/Epoch format.`);t=function(e){if(!e)return;"string"==typeof e.valueOf()&&(e=new Date(e));return Math.floor(e.getTime()/1e3)}(t)}else if(null!==e.match(/^TimeSpan$/i)&&!function(e){return Wg.test(e)}(t))throw new Error(`${r} must be a string in ISO 8601 format. Instead was "${t}".`);return t}(c,t,r):null!==c.match(/^ByteArray$/i)?l=function(e,t){let r="";if(null!=t){if(!(t instanceof Uint8Array))throw new Error(`${e} must be of type Uint8Array.`);r=Og(t)}return r}(r,t):null!==c.match(/^Base64Url$/i)?l=function(e,t){let r="";if(null!=t){if(!(t instanceof Uint8Array))throw new Error(`${e} must be of type Uint8Array.`);r=function(e){if(!e)return;if(!(e instanceof Uint8Array))throw new Error("Please provide an input of type Uint8Array for converting to Base64Url.");return function(e,t){let r=e.length;for(;r-1>=0&&e[r-1]===t;)--r;return e.substr(0,r)}(Og(e),"=").replace(/\+/g,"-").replace(/\//g,"_")}(t)||""}return r}(r,t):null!==c.match(/^Sequence$/i)?l=function(e,t,r,n,i,o){if(!Array.isArray(r))throw new Error(`${n} must be of type Array.`);const s=t.type.element;if(!s||"object"!=typeof s)throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${n}.`);const a=[];for(let l=0;l<r.length;l++){const t=e.serialize(s,r[l],n,o);if(i&&s.xmlNamespace){const e=s.xmlNamespacePrefix?`xmlns:${s.xmlNamespacePrefix}`:"xmlns";"Composite"===s.type.name?(a[l]=Object.assign({},t),a[l][Mg]={[e]:s.xmlNamespace}):(a[l]={},a[l][o.xmlCharKey]=t,a[l][Mg]={[e]:s.xmlNamespace})}else a[l]=t}return a}(this,e,t,r,Boolean(this.isXML),a):null!==c.match(/^Dictionary$/i)?l=function(e,t,r,n,i,o){if("object"!=typeof r)throw new Error(`${n} must be of type object.`);const s=t.type.value;if(!s||"object"!=typeof s)throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${n}.`);const a={};for(const l of Object.keys(r)){const t=e.serialize(s,r[l],n,o);a[l]=Zg(s,t,i,o)}if(i&&t.xmlNamespace){const e=t.xmlNamespacePrefix?`xmlns:${t.xmlNamespacePrefix}`:"xmlns",r=a;return r[Mg]={[e]:t.xmlNamespace},r}return a}(this,e,t,r,Boolean(this.isXML),a):null!==c.match(/^Composite$/i)&&(l=function(e,t,r,n,i,o){rb(e,t)&&(t=tb(e,t,r,"clientName"));if(null!=r){const s={},a=Jg(e,t,n);for(const c of Object.keys(a)){const l=a[c];if(l.readOnly)continue;let u,p=s;if(e.isXML)u=l.xmlIsWrapped?l.xmlName:l.xmlElementName||l.xmlName;else{const e=Qg(l.serializedName);u=e.pop();for(const t of e){null!=p[t]||null==r[c]&&void 0===l.defaultValue||(p[t]={}),p=p[t]}}if(null!=p){if(i&&t.xmlNamespace){const e=t.xmlNamespacePrefix?`xmlns:${t.xmlNamespacePrefix}`:"xmlns";p[Mg]=Object.assign(Object.assign({},p[Mg]),{[e]:t.xmlNamespace})}const s=""!==l.serializedName?n+"."+l.serializedName:n;let a=r[c];const d=rb(e,t);d&&d.clientName===c&&null==a&&(a=t.serializedName);const m=e.serialize(l,a,s,o);if(void 0!==m&&null!=u){const e=Zg(l,m,i,o);i&&l.xmlIsAttribute?(p[Mg]=p[Mg]||{},p[Mg][u]=m):i&&l.xmlIsWrapped?p[u]={[l.xmlElementName]:e}:p[u]=e}}}const l=function(e,t,r){const n=t.type.additionalProperties;if(!n&&t.type.className){const n=Yg(e,t,r);return null==n?void 0:n.type.additionalProperties}return n}(e,t,n);if(l){const t=Object.keys(a);for(const i in r){t.every(e=>e!==i)&&(s[i]=e.serialize(l,r[i],n+'["'+i+'"]',o))}}return s}return r}(this,e,t,r,Boolean(this.isXML),a));return l}deserialize(e,t,r,n={}){var i,o,s;const a={rootName:null!==(i=n.rootName)&&void 0!==i?i:"",includeRoot:null!==(o=n.includeRoot)&&void 0!==o&&o,xmlCharKey:null!==(s=n.xmlCharKey)&&void 0!==s?s:Dg};if(null==t)return this.isXML&&"Sequence"===e.type.name&&!e.xmlIsWrapped&&(t=[]),void 0!==e.defaultValue&&(t=e.defaultValue),t;let l;const c=e.type.name;if(r||(r=e.serializedName),null!==c.match(/^Composite$/i))l=function(e,t,r,n,i){var o,s;const a=null!==(o=i.xmlCharKey)&&void 0!==o?o:Dg;rb(e,t)&&(t=tb(e,t,r,"serializedName"));const l=Jg(e,t,n);let c={};const u=[];for(const d of Object.keys(l)){const o=l[d],p=Qg(l[d].serializedName);u.push(p[0]);const{serializedName:m,xmlName:f,xmlElementName:h}=o;let y=n;""!==m&&void 0!==m&&(y=n+"."+m);const g=o.headerCollectionPrefix;if(g){const t={};for(const n of Object.keys(r))n.startsWith(g)&&(t[n.substring(g.length)]=e.deserialize(o.type.value,r[n],y,i)),u.push(n);c[d]=t}else if(e.isXML)if(o.xmlIsAttribute&&r[Mg])c[d]=e.deserialize(o,r[Mg][f],y,i);else if(o.xmlIsMsText)void 0!==r[a]?c[d]=r[a]:"string"==typeof r&&(c[d]=r);else{const t=h||f||m;if(o.xmlIsWrapped){const t=r[f],n=null!==(s=null==t?void 0:t[h])&&void 0!==s?s:[];c[d]=e.deserialize(o,n,y,i),u.push(f)}else{const n=r[t];c[d]=e.deserialize(o,n,y,i),u.push(t)}}else{let n,s=r;for(const e of p){if(!s)break;s=s[e]}n=s;const a=t.type.polymorphicDiscriminator;let u;if(a&&d===a.clientName&&null==n&&(n=t.serializedName),Array.isArray(r[d])&&""===l[d].serializedName){n=r[d];const t=e.deserialize(o,n,y,i);for(const[e,r]of Object.entries(c))Object.prototype.hasOwnProperty.call(t,e)||(t[e]=r);c=t}else void 0===n&&void 0===o.defaultValue||(u=e.deserialize(o,n,y,i),c[d]=u)}}const p=t.type.additionalProperties;if(p){const t=e=>{for(const t in l){if(Qg(l[t].serializedName)[0]===e)return!1}return!0};for(const o in r)t(o)&&(c[o]=e.deserialize(p,r[o],n+'["'+o+'"]',i))}else if(r)for(const d of Object.keys(r))void 0!==c[d]||u.includes(d)||eb(d,i)||(c[d]=r[d]);return c}(this,e,t,r,a);else{if(this.isXML){const e=a.xmlCharKey,r=t;null!=r[Mg]&&null!=r[e]&&(t=r[e])}null!==c.match(/^Number$/i)?(l=parseFloat(t),isNaN(l)&&(l=t)):null!==c.match(/^Boolean$/i)?l="true"===t||"false"!==t&&t:null!==c.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i)?l=t:null!==c.match(/^(Date|DateTime|DateTimeRfc1123)$/i)?l=new Date(t):null!==c.match(/^UnixTime$/i)?l=function(e){if(!e)return;return new Date(1e3*e)}(t):null!==c.match(/^ByteArray$/i)?l=Pg(t):null!==c.match(/^Base64Url$/i)?l=function(e){if(!e)return;if(e&&"string"!=typeof e.valueOf())throw new Error("Please provide an input of type string for converting to Uint8Array");return Pg(e=e.replace(/-/g,"+").replace(/_/g,"/"))}(t):null!==c.match(/^Sequence$/i)?l=function(e,t,r,n,i){const o=t.type.element;if(!o||"object"!=typeof o)throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${n}`);if(r){Array.isArray(r)||(r=[r]);const t=[];for(let s=0;s<r.length;s++)t[s]=e.deserialize(o,r[s],`${n}[${s}]`,i);return t}return r}(this,e,t,r,a):null!==c.match(/^Dictionary$/i)&&(l=function(e,t,r,n,i){const o=t.type.value;if(!o||"object"!=typeof o)throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${n}`);if(r){const t={};for(const s of Object.keys(r))t[s]=e.deserialize(o,r[s],n,i);return t}return r}(this,e,t,r,a))}return e.isConstant&&(l=e.defaultValue),l}}function Qg(e){const t=[];let r="";if(e){const n=e.split(".");for(const e of n)"\\"===e.charAt(e.length-1)?r+=e.substr(0,e.length-1)+".":(r+=e,t.push(r),r="")}return t}function Yg(e,t,r){const n=t.type.className;if(!n)throw new Error(`Class name for model "${r}" is not provided in the mapper "${JSON.stringify(t,void 0,2)}".`);return e.modelMappers[n]}function Jg(e,t,r){let n=t.type.modelProperties;if(!n){const i=Yg(e,t,r);if(!i)throw new Error(`mapper() cannot be null or undefined for model "${t.type.className}".`);if(n=null==i?void 0:i.type.modelProperties,!n)throw new Error(`modelProperties cannot be null or undefined in the mapper "${JSON.stringify(i)}" of type "${t.type.className}" for object "${r}".`)}return n}function Zg(e,t,r,n){if(!r||!e.xmlNamespace)return t;const i=e.xmlNamespacePrefix?`xmlns:${e.xmlNamespacePrefix}`:"xmlns",o={[i]:e.xmlNamespace};if(["Composite"].includes(e.type.name)){if(t[Mg])return t;{const e=Object.assign({},t);return e[Mg]=o,e}}const s={};return s[n.xmlCharKey]=t,s[Mg]=o,s}function eb(e,t){return[Mg,t.xmlCharKey].includes(e)}function tb(e,t,r,n){const i=rb(e,t);if(i){const o=i[n];if(null!=o){const n=r[o];if(null!=n){const r=t.type.uberParent||t.type.className,i=n===r?n:r+"."+n,o=e.modelMappers.discriminators[i];o&&(t=o)}}}return t}function rb(e,t){return t.type.polymorphicDiscriminator||nb(e,t.type.uberParent)||nb(e,t.type.className)}function nb(e,t){return t&&e.modelMappers[t]&&e.modelMappers[t].type.polymorphicDiscriminator}const ib=function(e){const t={};for(const r of e)t[r]=r;return t}(["Base64Url","Boolean","ByteArray","Composite","Date","DateTime","DateTimeRfc1123","Dictionary","Enum","Number","Object","Sequence","String","Stream","TimeSpan","UnixTime"]);class ob{constructor(e,t,r,n,i,o,s,a,l,c,u,p,d,m,f){this.streamResponseBody=o,this.streamResponseStatusCodes=f,this.url=e||"",this.method=t||"GET",this.headers=Tg(i)?i:new Rg(i),this.body=r,this.query=n,this.formData=void 0,this.withCredentials=s||!1,this.abortSignal=a,this.timeout=l||0,this.onUploadProgress=c,this.onDownloadProgress=u,this.proxySettings=p,this.keepAlive=d,this.decompressResponse=m,this.requestId=this.headers.get("x-ms-client-request-id")||Gg()}validateRequestProperties(){if(!this.method)throw new Error("WebResource.method is required.");if(!this.url)throw new Error("WebResource.url is required.")}prepare(e){if(!e)throw new Error("options object is required");if(void 0===e.method||null===e.method||"string"!=typeof e.method.valueOf())throw new Error("options.method must be a string.");if(e.url&&e.pathTemplate)throw new Error("options.url and options.pathTemplate are mutually exclusive. Please provide exactly one of them.");if(!(void 0!==e.pathTemplate&&null!==e.pathTemplate&&"string"==typeof e.pathTemplate.valueOf()||void 0!==e.url&&null!==e.url&&"string"==typeof e.url.valueOf()))throw new Error("Please provide exactly one of options.pathTemplate or options.url.");if(e.url){if("string"!=typeof e.url)throw new Error('options.url must be of type "string".');this.url=e.url}if(e.method){const t=["GET","PUT","HEAD","DELETE","OPTIONS","POST","PATCH","TRACE"];if(-1===t.indexOf(e.method.toUpperCase()))throw new Error('The provided method "'+e.method+'" is invalid. Supported HTTP methods are: '+JSON.stringify(t))}if(this.method=e.method.toUpperCase(),e.pathTemplate){const{pathTemplate:t,pathParameters:r}=e;if("string"!=typeof t)throw new Error('options.pathTemplate must be of type "string".');e.baseUrl||(e.baseUrl="https://management.azure.com");const n=e.baseUrl;let i=n+(n.endsWith("/")?"":"/")+(t.startsWith("/")?t.slice(1):t);const o=i.match(/({[\w-]*\s*[\w-]*})/gi);if(o&&o.length){if(!r)throw new Error(`pathTemplate: ${t} has been provided. Hence, options.pathParameters must also be provided.`);o.forEach(function(e){const n=e.slice(1,-1),o=r[n];if(null==o||"string"!=typeof o&&"object"!=typeof o){const e=JSON.stringify(r,void 0,2);throw new Error(`pathTemplate: ${t} contains the path parameter ${n} however, it is not present in parameters: ${e}.The value of the path parameter can either be a "string" of the form { ${n}: "some sample value" } or it can be an "object" of the form { "${n}": { value: "some sample value", skipUrlEncoding: true } }.`)}if("string"==typeof o.valueOf()&&(i=i.replace(e,encodeURIComponent(o))),"object"==typeof o.valueOf()){if(!o.value)throw new Error(`options.pathParameters[${n}] is of type "object" but it does not contain a "value" property.`);i=o.skipUrlEncoding?i.replace(e,o.value):i.replace(e,encodeURIComponent(o.value))}})}this.url=i}if(e.queryParameters){const t=e.queryParameters;if("object"!=typeof t)throw new Error('options.queryParameters must be of type object. It should be a JSON object of "query-parameter-name" as the key and the "query-parameter-value" as the value. The "query-parameter-value" may be fo type "string" or an "object" of the form { value: "query-parameter-value", skipUrlEncoding: true }.');this.url&&-1===this.url.indexOf("?")&&(this.url+="?");const r=[];this.query={};for(const e in t){const n=t[e];if(n)if("string"==typeof n)r.push(e+"="+encodeURIComponent(n)),this.query[e]=encodeURIComponent(n);else if("object"==typeof n){if(!n.value)throw new Error(`options.queryParameters[${e}] is of type "object" but it does not contain a "value" property.`);n.skipUrlEncoding?(r.push(e+"="+n.value),this.query[e]=n.value):(r.push(e+"="+encodeURIComponent(n.value)),this.query[e]=encodeURIComponent(n.value))}}this.url+=r.join("&")}if(e.headers){const t=e.headers;for(const r of Object.keys(e.headers))this.headers.set(r,t[r])}return this.headers.get("accept-language")||this.headers.set("accept-language","en-US"),this.headers.get("x-ms-client-request-id")||e.disableClientRequestId||this.headers.set("x-ms-client-request-id",this.requestId),this.headers.get("Content-Type")||this.headers.set("Content-Type","application/json; charset=utf-8"),this.body=e.body,void 0!==e.body&&null!==e.body&&(e.bodyIsStream?(this.headers.get("Transfer-Encoding")||this.headers.set("Transfer-Encoding","chunked"),"application/octet-stream"!==this.headers.get("Content-Type")&&this.headers.set("Content-Type","application/octet-stream")):(e.serializationMapper&&(this.body=new Xg(e.mappers).serialize(e.serializationMapper,e.body,"requestBody")),e.disableJsonStringifyOnBody||(this.body=JSON.stringify(e.body)))),e.spanOptions&&(this.spanOptions=e.spanOptions),e.tracingContext&&(this.tracingContext=e.tracingContext),this.abortSignal=e.abortSignal,this.onDownloadProgress=e.onDownloadProgress,this.onUploadProgress=e.onUploadProgress,this}clone(){const e=new ob(this.url,this.method,this.body,this.query,this.headers&&this.headers.clone(),this.streamResponseBody,this.withCredentials,this.abortSignal,this.timeout,this.onUploadProgress,this.onDownloadProgress,this.proxySettings,this.keepAlive,this.decompressResponse,this.streamResponseStatusCodes);return this.formData&&(e.formData=this.formData),this.operationSpec&&(e.operationSpec=this.operationSpec),this.shouldDeserialize&&(e.shouldDeserialize=this.shouldDeserialize),this.operationResponseGetter&&(e.operationResponseGetter=this.operationResponseGetter),e}}class sb{constructor(){this._rawQuery={}}any(){return Object.keys(this._rawQuery).length>0}keys(){return Object.keys(this._rawQuery)}set(e,t){const r=t;if(e)if(null!=r){const t=Array.isArray(r)?r:r.toString();this._rawQuery[e]=t}else delete this._rawQuery[e]}get(e){return e?this._rawQuery[e]:void 0}toString(){let e="";for(const t in this._rawQuery){e&&(e+="&");const r=this._rawQuery[t];if(Array.isArray(r)){const n=[];for(const e of r)n.push(`${t}=${e}`);e+=n.join("&")}else e+=`${t}=${r}`}return e}static parse(e){const t=new sb;if(e){e.startsWith("?")&&(e=e.substring(1));let r="ParameterName",n="",i="";for(let o=0;o<e.length;++o){const s=e[o];switch(r){case"ParameterName":switch(s){case"=":r="ParameterValue";break;case"&":n="",i="";break;default:n+=s}break;case"ParameterValue":if("&"===s)t.set(n,i),n="",i="",r="ParameterName";else i+=s;break;default:throw new Error("Unrecognized URLQuery parse state: "+r)}}"ParameterValue"===r&&t.set(n,i)}return t}}class ab{setScheme(e){e?this.set(e,"SCHEME"):this._scheme=void 0}getScheme(){return this._scheme}setHost(e){e?this.set(e,"SCHEME_OR_HOST"):this._host=void 0}getHost(){return this._host}setPort(e){null==e||""===e?this._port=void 0:this.set(e.toString(),"PORT")}getPort(){return this._port}setPath(e){if(e){const t=e.indexOf("://");if(-1!==t){const r=e.lastIndexOf("/",t);this.set(-1===r?e:e.substr(r+1),"SCHEME")}else this.set(e,"PATH")}else this._path=void 0}appendPath(e){if(e){let t=this.getPath();t&&(t.endsWith("/")||(t+="/"),e.startsWith("/")&&(e=e.substring(1)),e=t+e),this.set(e,"PATH")}}getPath(){return this._path}setQuery(e){this._query=e?sb.parse(e):void 0}setQueryParameter(e,t){e&&(this._query||(this._query=new sb),this._query.set(e,t))}getQueryParameterValue(e){return this._query?this._query.get(e):void 0}getQuery(){return this._query?this._query.toString():void 0}set(e,t){const r=new cb(e,t);for(;r.next();){const e=r.current();let t;if(e)switch(e.type){case"SCHEME":this._scheme=e.text||void 0;break;case"HOST":this._host=e.text||void 0;break;case"PORT":this._port=e.text||void 0;break;case"PATH":t=e.text||void 0,this._path&&"/"!==this._path&&"/"===t||(this._path=t);break;case"QUERY":this._query=sb.parse(e.text);break;default:throw new Error(`Unrecognized URLTokenType: ${e.type}`)}}}toString(){let e="";return this._scheme&&(e+=`${this._scheme}://`),this._host&&(e+=this._host),this._port&&(e+=`:${this._port}`),this._path&&(this._path.startsWith("/")||(e+="/"),e+=this._path),this._query&&this._query.any()&&(e+=`?${this._query.toString()}`),e}replaceAll(e,t){e&&(this.setScheme(Kg(this.getScheme(),e,t)),this.setHost(Kg(this.getHost(),e,t)),this.setPort(Kg(this.getPort(),e,t)),this.setPath(Kg(this.getPath(),e,t)),this.setQuery(Kg(this.getQuery(),e,t)))}static parse(e){const t=new ab;return t.set(e,"SCHEME_OR_HOST"),t}}class lb{constructor(e,t){this.text=e,this.type=t}static scheme(e){return new lb(e,"SCHEME")}static host(e){return new lb(e,"HOST")}static port(e){return new lb(e,"PORT")}static path(e){return new lb(e,"PATH")}static query(e){return new lb(e,"QUERY")}}class cb{constructor(e,t){this._text=e,this._textLength=e?e.length:0,this._currentState=null!=t?t:"SCHEME_OR_HOST",this._currentIndex=0}current(){return this._currentToken}next(){if(ub(this))switch(this._currentState){case"SCHEME":!function(e){const t=function(e){return fb(e,e=>function(e){const t=e.charCodeAt(0);return 48<=t&&t<=57||65<=t&&t<=90||97<=t&&t<=122}(e))}(e);e._currentToken=lb.scheme(t),ub(e)?e._currentState="HOST":e._currentState="DONE"}(this);break;case"SCHEME_OR_HOST":!function(e){const t=hb(e,":","/","?");ub(e)?":"===pb(e)?"://"===mb(e,3)?(e._currentToken=lb.scheme(t),e._currentState="HOST"):(e._currentToken=lb.host(t),e._currentState="PORT"):(e._currentToken=lb.host(t),"/"===pb(e)?e._currentState="PATH":e._currentState="QUERY"):(e._currentToken=lb.host(t),e._currentState="DONE")}(this);break;case"HOST":!function(e){"://"===mb(e,3)&&db(e,3);const t=hb(e,":","/","?");e._currentToken=lb.host(t),ub(e)?":"===pb(e)?e._currentState="PORT":"/"===pb(e)?e._currentState="PATH":e._currentState="QUERY":e._currentState="DONE"}(this);break;case"PORT":!function(e){":"===pb(e)&&db(e);const t=hb(e,"/","?");e._currentToken=lb.port(t),ub(e)?"/"===pb(e)?e._currentState="PATH":e._currentState="QUERY":e._currentState="DONE"}(this);break;case"PATH":!function(e){const t=hb(e,"?");e._currentToken=lb.path(t),ub(e)?e._currentState="QUERY":e._currentState="DONE"}(this);break;case"QUERY":!function(e){"?"===pb(e)&&db(e);const t=function(e){let t="";e._currentIndex<e._textLength&&(t=e._text.substring(e._currentIndex),e._currentIndex=e._textLength);return t}(e);e._currentToken=lb.query(t),e._currentState="DONE"}(this);break;default:throw new Error(`Unrecognized URLTokenizerState: ${this._currentState}`)}else this._currentToken=void 0;return!!this._currentToken}}function ub(e){return e._currentIndex<e._textLength}function pb(e){return e._text[e._currentIndex]}function db(e,t){ub(e)&&(t||(t=1),e._currentIndex+=t)}function mb(e,t){let r=e._currentIndex+t;return e._textLength<r&&(r=e._textLength),e._text.substring(e._currentIndex,r)}function fb(e,t){let r="";for(;ub(e);){const n=pb(e);if(!t(n))break;r+=n,db(e)}return r}function hb(e,...t){return fb(e,e=>-1===t.indexOf(e))}const yb="REDACTED",gb=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"],bb=["api-version"];class vb{constructor({allowedHeaderNames:e=[],allowedQueryParameters:t=[]}={}){e=Array.isArray(e)?gb.concat(e):gb,t=Array.isArray(t)?bb.concat(t):bb,this.allowedHeaderNames=new Set(e.map(e=>e.toLowerCase())),this.allowedQueryParameters=new Set(t.map(e=>e.toLowerCase()))}sanitize(e){const t=new Set;return JSON.stringify(e,(e,r)=>{if(r instanceof Error)return Object.assign(Object.assign({},r),{name:r.name,message:r.message});if("_headersMap"===e)return this.sanitizeHeaders(r);if("url"===e)return this.sanitizeUrl(r);if("query"===e)return this.sanitizeQuery(r);if("body"!==e&&"response"!==e&&"operationSpec"!==e){if(Array.isArray(r)||!("object"!=typeof(n=r)||null===n||Array.isArray(n)||n instanceof RegExp||n instanceof Date)){if(t.has(r))return"[Circular]";t.add(r)}var n;return r}},2)}sanitizeHeaders(e){return this.sanitizeObject(e,this.allowedHeaderNames,(e,t)=>e[t].value)}sanitizeQuery(e){return this.sanitizeObject(e,this.allowedQueryParameters,(e,t)=>e[t])}sanitizeObject(e,t,r){if("object"!=typeof e||null===e)return e;const n={};for(const i of Object.keys(e))t.has(i.toLowerCase())?n[i]=r(e,i):n[i]=yb;return n}sanitizeUrl(e){if("string"!=typeof e||null===e)return e;const t=ab.parse(e),r=t.getQuery();if(!r)return e;const n=sb.parse(r);for(const i of n.keys())this.allowedQueryParameters.has(i.toLowerCase())||n.set(i,yb);return t.setQuery(n.toString()),t.toString()}}const xb={},wb=new vb;class Sb extends Error{constructor(e,t,r,n,i){super(e),this.name="RestError",this.code=t,this.statusCode=r,this.request=n,this.response=i,Object.setPrototypeOf(this,Sb.prototype)}[xb](){return`RestError: ${this.message} \n ${wb.sanitize(this)}`}}Sb.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR",Sb.PARSE_ERROR="PARSE_ERROR";class Nb{sendRequest(e){var t;const r=new XMLHttpRequest;if(e.proxySettings)throw new Error("HTTP proxy is not supported in browser environment");const n=e.abortSignal;if(n){if(n.aborted)return Promise.reject(new Eg("The operation was aborted."));const e=()=>{r.abort()};n.addEventListener("abort",e),r.addEventListener("readystatechange",()=>{r.readyState===XMLHttpRequest.DONE&&n.removeEventListener("abort",e)})}if(jb(r.upload,e.onUploadProgress),jb(r,e.onDownloadProgress),e.formData){const t=e.formData,r=new FormData,n=(e,t)=>{t&&Object.prototype.hasOwnProperty.call(t,"value")&&Object.prototype.hasOwnProperty.call(t,"options")?r.append(e,t.value,t.options):r.append(e,t)};for(const e of Object.keys(t)){const r=t[e];if(Array.isArray(r))for(let t=0;t<r.length;t++)n(e,r[t]);else n(e,r)}e.body=r,e.formData=void 0;const i=e.headers.get("Content-Type");i&&-1!==i.indexOf("multipart/form-data")&&e.headers.remove("Content-Type")}r.open(e.method,e.url),r.timeout=e.timeout,r.withCredentials=e.withCredentials;for(const i of e.headers.headersArray())r.setRequestHeader(i.name,i.value);return r.responseType=(null===(t=e.streamResponseStatusCodes)||void 0===t?void 0:t.size)||e.streamResponseBody?"blob":"text",r.send(void 0===e.body?null:e.body),"blob"===r.responseType?new Promise((t,n)=>{!function(e,t,r,n){e.addEventListener("readystatechange",()=>{var i;if(e.readyState===XMLHttpRequest.HEADERS_RECEIVED)if(t.streamResponseBody||(null===(i=t.streamResponseStatusCodes)||void 0===i?void 0:i.has(e.status))){const n=new Promise((r,n)=>{e.addEventListener("load",()=>{r(e.response)}),Cb(t,e,n)});r({request:t,status:e.status,headers:Eb(e),blobBody:n})}else e.addEventListener("load",()=>{if(e.response){const i=new FileReader;i.onload=function(n){var i;const o=null===(i=n.target)||void 0===i?void 0:i.result;r({request:t,status:e.status,headers:Eb(e),bodyAsText:o})},i.onerror=function(e){n(i.error)},i.readAsText(e.response,"UTF-8")}else r({request:t,status:e.status,headers:Eb(e)})})})}(r,e,t,n),Cb(e,r,n)}):new Promise(function(t,n){r.addEventListener("load",()=>t({request:e,status:r.status,headers:Eb(r),bodyAsText:r.responseText})),Cb(e,r,n)})}}function jb(e,t){t&&e.addEventListener("progress",e=>t({loadedBytes:e.loaded}))}function Eb(e){const t=new Rg,r=e.getAllResponseHeaders().trim().split(/[\r\n]+/);for(const n of r){const e=n.indexOf(":"),r=n.slice(0,e),i=n.slice(e+2);t.set(r,i)}return t}function Cb(e,t,r){t.addEventListener("error",()=>r(new Sb(`Failed to send request to ${e.url}`,Sb.REQUEST_SEND_ERROR,void 0,e)));const n=new Eg("The operation was aborted.");t.addEventListener("abort",()=>r(n)),t.addEventListener("timeout",()=>r(n))}var kb,Tb;function Rb(e){const{requestOptions:t,tracingOptions:r}=e;let n=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}(e,["requestOptions","tracingOptions"]);return t&&(n=Object.assign(Object.assign({},n),t)),r&&(n.tracingContext=r.tracingContext,n.spanOptions=null==r?void 0:r.spanOptions),n}(Tb=kb||(kb={}))[Tb.OFF=0]="OFF",Tb[Tb.ERROR=1]="ERROR",Tb[Tb.WARNING=2]="WARNING",Tb[Tb.INFO=3]="INFO";class Ob{constructor(e,t){this._nextPolicy=e,this._options=t}shouldLog(e){return this._options.shouldLog(e)}log(e,t){this._options.log(e,t)}}class Pb{constructor(e){this._logger=e}shouldLog(e){return!!this._logger&&e!==kb.OFF&&e<=this._logger.minimumLogLevel}log(e,t){this._logger&&this.shouldLog(e)&&this._logger.log(e,t)}}if(!(self.document&&self.DOMParser&&self.Node&&self.XMLSerializer))throw new Error('This library depends on the following DOM objects: ["document", "DOMParser", "Node", "XMLSerializer"] to parse XML, but some of these are undefined. You may provide a polyfill to make these globally available in order to support your environment. For more information, please refer to https://aka.ms/azsdk/js/web-workers. ');let _b,Ab,Ib,Mb,Db;function zb(){return _b||(_b=document.implementation.createDocument(null,null,null)),_b}function Bb(){return Ab||(Ab=new DOMParser),Ab}function Lb(e,t={}){var r,n,i,o;try{const s={rootName:null!==(r=t.rootName)&&void 0!==r?r:"",includeRoot:null!==(n=t.includeRoot)&&void 0!==n&&n,xmlCharKey:null!==(i=t.xmlCharKey)&&void 0!==i?i:Dg},a=Bb().parseFromString(null!==(o=null==Mb?void 0:Mb.createHTML(e))&&void 0!==o?o:e,"application/xml");let l;return function(e){const t=e.getElementsByTagName("parsererror");if(t.length>0&&function(){var e,t;if(void 0===Db)try{const r=null!==(e=null==Mb?void 0:Mb.createHTML("INVALID"))&&void 0!==e?e:"INVALID";Db=null!==(t=Bb().parseFromString(r,"text/xml").getElementsByTagName("parsererror")[0].namespaceURI)&&void 0!==t?t:""}catch(r){Db=""}return Db}())for(let r=0;r<t.length;r++)if(t[r].namespaceURI===Db)throw new Error(t[r].innerHTML)}(a),l=s.includeRoot?qb(a,s):qb(a.childNodes[0],s),Promise.resolve(l)}catch(s){return Promise.reject(s)}}function qb(e,t){let r={};const n=e.childNodes.length,i=e.childNodes[0],o=i&&1===n&&i.nodeType===Node.TEXT_NODE&&i.nodeValue||void 0,s=function(e){return function(e){return!!e.attributes}(e)&&e.hasAttributes()?e:void 0}(e);if(s){r[Mg]={};for(let e=0;e<s.attributes.length;e++){const t=s.attributes[e];r[Mg][t.nodeName]=t.nodeValue}o&&(r[t.xmlCharKey]=o)}else 0===n?r="":o&&(r=o);if(!o)for(let a=0;a<n;a++){const n=e.childNodes[a];if(n.nodeType!==Node.TEXT_NODE){const e=qb(n,t);r[n.nodeName]?Array.isArray(r[n.nodeName])?r[n.nodeName].push(e):r[n.nodeName]=[r[n.nodeName],e]:r[n.nodeName]=e}}return r}function Ub(e,t={}){var r,n,i;const o={rootName:null!==(r=t.rootName)&&void 0!==r?r:"root",includeRoot:null!==(n=t.includeRoot)&&void 0!==n&&n,xmlCharKey:null!==(i=t.xmlCharKey)&&void 0!==i?i:Dg},s=Fb(e,o.rootName,o)[0];return'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'+(Ib||(Ib=new XMLSerializer),Ib).serializeToString(s)}function Hb(e){const t=[];for(const r of Object.keys(e)){const n=zb().createAttribute(r);n.value=e[r].toString(),t.push(n)}return t}function Fb(e,t,r){if(null==e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e){const r=zb().createElement(t);return r.textContent=null==e?"":e.toString(),[r]}if(Array.isArray(e)){const n=[];for(const i of e)for(const e of Fb(i,t,r))n.push(e);return n}if("object"==typeof e){const n=zb().createElement(t);for(const t of Object.keys(e))if(t===Mg)for(const r of Hb(e[t]))n.attributes.setNamedItem(r);else if(t===r.xmlCharKey)n.textContent=e[t].toString();else for(const i of Fb(e[t],t,r))n.appendChild(i);return[n]}throw new Error(`Illegal value passed to buildObject: ${e}`)}function $b(e,t){return{create:(r,n)=>new Wb(r,n,e,t)}}void 0!==self.trustedTypes&&(Mb=self.trustedTypes.createPolicy("@azure/core-http#xml.browser",{createHTML:e=>e}));const Vb=["application/json","text/json"],Gb=["application/xml","application/atom+xml"];class Wb extends Ob{constructor(e,t,r,n={}){var i;super(e,t),this.jsonContentTypes=r&&r.json||Vb,this.xmlContentTypes=r&&r.xml||Gb,this.xmlCharKey=null!==(i=n.xmlCharKey)&&void 0!==i?i:Dg}async sendRequest(e){return this._nextPolicy.sendRequest(e).then(e=>function(e,t,r,n={}){var i,o,s;const a={rootName:null!==(i=n.rootName)&&void 0!==i?i:"",includeRoot:null!==(o=n.includeRoot)&&void 0!==o&&o,xmlCharKey:null!==(s=n.xmlCharKey)&&void 0!==s?s:Dg};return function(e,t,r,n){var i;const o=e=>{const t=`Error "${e}" occurred while parsing the response body - ${r.bodyAsText}.`,n=e.code||Sb.PARSE_ERROR,i=new Sb(t,n,r.status,r.request,r);return Promise.reject(i)},s=(null===(i=r.request.streamResponseStatusCodes)||void 0===i?void 0:i.has(r.status))||r.request.streamResponseBody;if(!s&&r.bodyAsText){const i=r.bodyAsText,s=r.headers.get("Content-Type")||"",a=s?s.split(";").map(e=>e.toLowerCase()):[];if(0===a.length||a.some(t=>-1!==e.indexOf(t)))return new Promise(e=>{r.parsedBody=JSON.parse(i),e(r)}).catch(o);if(a.some(e=>-1!==t.indexOf(e)))return Lb(i,n).then(e=>(r.parsedBody=e,r)).catch(o)}return Promise.resolve(r)}(e,t,r,a).then(e=>{if(!function(e){const t=e.request.shouldDeserialize;let r;r=void 0===t||("boolean"==typeof t?t:t(e));return r}(e))return e;const t=e.request.operationSpec;if(!t||!t.responses)return e;const i=function(e){let t;const r=e.request,n=r.operationSpec;if(n){const i=r.operationResponseGetter;t=i?i(n,e):n.responses[e.status]}return t}(e),{error:o,shouldReturnResponse:s}=function(e,t,r){var n;const i=200<=e.status&&e.status<300,o=function(e){const t=Object.keys(e.responses);return 0===t.length||1===t.length&&"default"===t[0]}(t)?i:!!r;if(o){if(!r)return{error:null,shouldReturnResponse:!1};if(!r.isError)return{error:null,shouldReturnResponse:!1}}const s=null!=r?r:t.responses.default,a=(null===(n=e.request.streamResponseStatusCodes)||void 0===n?void 0:n.has(e.status))||e.request.streamResponseBody,l=a?`Unexpected status code: ${e.status}`:e.bodyAsText,c=new Sb(l,void 0,e.status,e.request,e);if(!s)throw c;const u=s.bodyMapper,p=s.headersMapper;try{if(e.parsedBody){const r=e.parsedBody;let n;if(u){let e=r;t.isXML&&u.type.name===ib.Sequence&&(e="object"==typeof r?r[u.xmlElementName]:[]),n=t.serializer.deserialize(u,e,"error.response.parsedBody")}const i=r.error||n||r;c.code=i.code,i.message&&(c.message=i.message),u&&(c.response.parsedBody=n)}e.headers&&p&&(c.response.parsedHeaders=t.serializer.deserialize(p,e.headers.toJson(),"operationRes.parsedHeaders"))}catch(d){c.message=`Error "${d.message}" occurred in deserializing the responseBody - "${e.bodyAsText}" for the default response.`}return{error:c,shouldReturnResponse:!1}}(e,t,i);if(o)throw o;if(s)return e;if(i){if(i.bodyMapper){let r=e.parsedBody;t.isXML&&i.bodyMapper.type.name===ib.Sequence&&(r="object"==typeof r?r[i.bodyMapper.xmlElementName]:[]);try{e.parsedBody=t.serializer.deserialize(i.bodyMapper,r,"operationRes.parsedBody",n)}catch(a){throw new Sb(`Error ${a} occurred in deserializing the responseBody - ${e.bodyAsText}`,void 0,e.status,e.request,e)}}else"HEAD"===t.httpMethod&&(e.parsedBody=r.status>=200&&r.status<300);i.headersMapper&&(e.parsedHeaders=t.serializer.deserialize(i.headersMapper,e.headers.toJson(),"operationRes.parsedHeaders",n))}return e})}(this.jsonContentTypes,this.xmlContentTypes,e,{xmlCharKey:this.xmlCharKey}))}}const Kb={enable:!0};class Xb extends Ob{constructor(e,t,r){super(e,t),this.keepAliveOptions=r}async sendRequest(e){return e.keepAlive=this.keepAliveOptions.enable,this._nextPolicy.sendRequest(e)}}const Qb=["GET","HEAD"];class Yb extends Ob{constructor(e,t,r=20){super(e,t),this.maxRetries=r}sendRequest(e){return this._nextPolicy.sendRequest(e).then(e=>Jb(this,e,0))}}function Jb(e,t,r){const{request:n,status:i}=t,o=t.headers.get("location");if(o&&(300===i||301===i&&Qb.includes(n.method)||302===i&&Qb.includes(n.method)||303===i&&"POST"===n.method||307===i)&&(!e.maxRetries||r<e.maxRetries)){const t=ab.parse(n.url);return t.setPath(o),n.url=t.toString(),303===i&&(n.method="GET",delete n.body),e._nextPolicy.sendRequest(n).then(t=>Jb(e,t,r+1))}return Promise.resolve(t)}function Zb(e){return"number"==typeof e}function ev(e,t,r,n,i){return!!t(n,i)&&r.retryCount<e}function tv(e,t={retryCount:0,retryInterval:0},r){r&&(t.error&&(r.innerError=t.error),t.error=r),t.retryCount++;let n=Math.pow(2,t.retryCount-1)-1;return n*=.8*e.retryInterval+Math.floor(Math.random()*(.4*e.retryInterval)),t.retryInterval=Math.min(e.minRetryInterval+n,e.maxRetryInterval),t}"undefined"!=typeof Deno&&void 0!==Deno.version&&Deno.version.deno,"undefined"!=typeof Bun&&Bun.version;const rv=void 0!==globalThis.process&&Boolean(globalThis.process.version)&&Boolean(null==(e=globalThis.process.versions)?void 0:e.node);class nv extends Error{constructor(e){super(e),this.name="AbortError"}}function iv(e,t){let r;const{abortSignal:n,abortErrorMsg:i}=t??{};return function(e,t){const{cleanupBeforeAbort:r,abortSignal:n,abortErrorMsg:i}=t??{};return new Promise((t,o)=>{function s(){o(new nv(i??"The operation was aborted."))}function a(){null==n||n.removeEventListener("abort",l)}function l(){null==r||r(),a(),s()}if(null==n?void 0:n.aborted)return s();try{e(e=>{a(),t(e)},e=>{a(),o(e)})}catch(c){o(c)}null==n||n.addEventListener("abort",l)})}(t=>{r=setTimeout(t,e)},{cleanupBeforeAbort:()=>clearTimeout(r),abortSignal:n,abortErrorMsg:i??"The delay was aborted."})}const ov=rv;const sv="undefined"!=typeof process&&process.env&&process.env.DEBUG||void 0;let av,lv=[],cv=[];const uv=[];sv&&dv(sv);const pv=Object.assign(e=>hv(e),{enable:dv,enabled:mv,disable:function(){const e=av||"";return dv(""),e},log:function(...e){if(e.length>0){const t=String(e[0]);t.includes(":error")||t.includes(":warning")||t.includes(":info")||t.includes(":verbose")}}});function dv(e){av=e,lv=[],cv=[];const t=e.split(",").map(e=>e.trim());for(const r of t)r.startsWith("-")?cv.push(r.substring(1)):lv.push(r);for(const r of uv)r.enabled=mv(r.namespace)}function mv(e){if(e.endsWith("*"))return!0;for(const t of cv)if(fv(e,t))return!1;for(const t of lv)if(fv(e,t))return!0;return!1}function fv(e,t){if(-1===t.indexOf("*"))return e===t;let r=t;if(-1!==t.indexOf("**")){const e=[];let n="";for(const r of t)"*"===r&&"*"===n||(n=r,e.push(r));r=e.join("")}let n=0,i=0;const o=r.length,s=e.length;let a=-1,l=-1;for(;n<s&&i<o;)if("*"!==r[i]){if(r[i]!==e[n]){if(a>=0){if(i=a+1,n=l+1,n===s)return!1;for(;e[n]!==r[i];)if(n++,n===s)return!1;l=n,n++,i++;continue}return!1}i++,n++}else{if(a=i,i++,i===o)return!0;for(;e[n]!==r[i];)if(n++,n===s)return!1;l=n,n++,i++}const c=n===e.length,u=i===r.length,p=i===r.length-1&&"*"===r[i];return c&&(u||p)}function hv(e){const t=Object.assign(function(...r){if(!t.enabled)return;r.length>0&&(r[0]=`${e} ${r[0]}`);t.log(...r)},{enabled:mv(e),destroy:yv,log:pv.log,namespace:e,extend:gv});return uv.push(t),t}function yv(){const e=uv.indexOf(this);return e>=0&&(uv.splice(e,1),!0)}function gv(e){const t=hv(`${this.namespace}:${e}`);return t.log=this.log,t}const bv=["verbose","info","warning","error"],vv={verbose:400,info:300,warning:200,error:100};function xv(e,t){t.log=(...t)=>{e.log(...t)}}function wv(e){return bv.includes(e)}function Sv(e){const t=new Set,r="undefined"!=typeof process&&process.env&&process.env[e.logLevelEnvVarName]||void 0;let n;const i=pv(e.namespace);function o(e){if(e&&!wv(e))throw new Error(`Unknown log level '${e}'. Acceptable values: ${bv.join(",")}`);n=e;const r=[];for(const n of t)s(n)&&r.push(n.namespace);pv.enable(r.join(","))}function s(e){return Boolean(n&&vv[e.level]<=vv[n])}function a(e,r){const n=Object.assign(e.extend(r),{level:r});if(xv(e,n),s(n)){const e=pv.disable();pv.enable(e+","+n.namespace)}return t.add(n),n}return i.log=(...e)=>{pv.log(...e)},r&&wv(r)&&o(r),{setLogLevel:o,getLogLevel:function(){return n},createClientLogger:function(e){const t=i.extend(e);return xv(i,t),{error:a(t,"error"),warning:a(t,"warning"),info:a(t,"info"),verbose:a(t,"verbose")}},logger:i}}Sv({logLevelEnvVarName:"TYPESPEC_RUNTIME_LOG_LEVEL",namespace:"typeSpecRuntime"});const Nv=Sv({logLevelEnvVarName:"AZURE_LOG_LEVEL",namespace:"azure"});function jv(e){return Nv.createClientLogger(e)}const Ev=jv("core-http");var Cv,kv;(kv=Cv||(Cv={}))[kv.Exponential=0]="Exponential";class Tv extends Ob{constructor(e,t,r,n,i){super(e,t),this.retryCount=Zb(r)?r:3,this.retryInterval=Zb(n)?n:3e4,this.maxRetryInterval=Zb(i)?i:9e4}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).then(t=>Rv(this,e,t)).catch(t=>Rv(this,e,t.response,void 0,t))}}async function Rv(e,t,r,n,i){n=tv({retryInterval:e.retryInterval,minRetryInterval:0,maxRetryInterval:e.maxRetryInterval},n,i);const o=t.abortSignal&&t.abortSignal.aborted;if(o||!ev(e.retryCount,function(e){const t=null==e?void 0:e.status;return(503!==t||!(null==r?void 0:r.headers.get(Ig.RETRY_AFTER)))&&!(void 0===t||t<500&&408!==t||501===t||505===t)},n,r)){if(o||i||!r){throw n.error||new Sb("Failed to send the request.",Sb.REQUEST_SEND_ERROR,r&&r.status,r&&r.request,r)}return r}Ev.info(`Retrying request in ${n.retryInterval}`);try{await iv(n.retryInterval);const r=await e._nextPolicy.sendRequest(t.clone());return Rv(e,t,r,n)}catch(s){return Rv(e,t,r,n,s)}}function Ov(e={}){return{create:(t,r)=>new Pv(t,r,e)}}class Pv extends Ob{get allowedHeaderNames(){return this.sanitizer.allowedHeaderNames}set allowedHeaderNames(e){this.sanitizer.allowedHeaderNames=e}get allowedQueryParameters(){return this.sanitizer.allowedQueryParameters}set allowedQueryParameters(e){this.sanitizer.allowedQueryParameters=e}constructor(e,t,{logger:r=Ev.info,allowedHeaderNames:n=[],allowedQueryParameters:i=[]}={}){super(e,t),this.logger=r,this.sanitizer=new vb({allowedHeaderNames:n,allowedQueryParameters:i})}sendRequest(e){return this.logger.enabled?(this.logRequest(e),this._nextPolicy.sendRequest(e).then(e=>this.logResponse(e))):this._nextPolicy.sendRequest(e)}logRequest(e){this.logger(`Request: ${this.sanitizer.sanitize(e)}`)}logResponse(e){return this.logger(`Response status code: ${e.status}`),this.logger(`Headers: ${this.sanitizer.sanitize(e.headers)}`),e}}function _v(e){return Av(e.parameterPath,e.mapper)}function Av(e,t){let r;return r="string"==typeof e?e:Array.isArray(e)?e.join("."):t.serializedName,r}function Iv(e){const t=e;return t&&"function"==typeof t.getToken&&(void 0===t.signRequest||t.getToken.length>0)}function Mv(){return"x-ms-useragent"}const Dv=Mv;function zv(){const e=[{key:"core-http",value:_g}],t=function(){const e=self.navigator;return[{key:"OS",value:(e.oscpu||e.platform).replace(" ","")}]}();return function(e,t=" ",r="/"){return e.map(e=>{const t=e.value?`${r}${e.value}`:"";return`${e.key}${t}`}).join(t)}(e.concat(t))}class Bv extends Ob{constructor(e,t,r,n){super(e,t),this._nextPolicy=e,this._options=t,this.headerKey=r,this.headerValue=n}sendRequest(e){return this.addUserAgentHeader(e),this._nextPolicy.sendRequest(e)}addUserAgentHeader(e){e.headers||(e.headers=new Rg),!e.headers.get(this.headerKey)&&this.headerValue&&e.headers.set(this.headerKey,this.headerValue)}}var Lv,qv;(qv=Lv||(Lv={})).Csv=",",qv.Ssv=" ",qv.Tsv="\t",qv.Pipes="|",qv.Multi="Multi";const Uv={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:12e4};function Hv(e,t,r){let n=null,i=null;const o=Object.assign(Object.assign({},Uv),r),s={get isRefreshing(){return null!==n},get shouldRefresh(){var e;return!s.isRefreshing&&(null!==(e=null==i?void 0:i.expiresOnTimestamp)&&void 0!==e?e:0)-o.refreshWindowInMs<Date.now()},get mustRefresh(){return null===i||i.expiresOnTimestamp-o.forcedRefreshWindowInMs<Date.now()}};function a(r){var a;if(!s.isRefreshing){n=async function(e,t,r){async function n(){if(!(Date.now()<r)){const t=await e();if(null===t)throw new Error("Failed to refresh access token.");return t}try{return await e()}catch(a){return null}}let i=await n();for(;null===i;)await iv(t),i=await n();return i}(()=>e.getToken(t,r),o.retryIntervalInMs,null!==(a=null==i?void 0:i.expiresOnTimestamp)&&void 0!==a?a:Date.now()).then(e=>(n=null,i=e,i)).catch(e=>{throw n=null,i=null,e})}return n}return async e=>s.mustRefresh?a(e):(s.shouldRefresh&&a(e),i)}function Fv(e="x-ms-client-request-id"){return{create:(t,r)=>new $v(t,r,e)}}class $v extends Ob{constructor(e,t,r){super(e,t),this._requestIdHeaderName=r}sendRequest(e){return e.headers.contains(this._requestIdHeaderName)||e.headers.set(this._requestIdHeaderName,e.requestId),this._nextPolicy.sendRequest(e)}}let Vv;function Gv(e){return{create:(e,t)=>{throw new Error("ProxyPolicy is not supported in browser environment")}}}class Wv extends Ob{constructor(e,t,r=30){super(e,t),this._retryTimeout=r}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).then(t=>function(e,t,r){if(409===r.status){const n=function(e){let t,r;if(e){try{r=JSON.parse(e)}catch(n){}if(r&&r.error&&r.error.message&&r.error.code&&"MissingSubscriptionRegistration"===r.error.code){const e=r.error.message.match(/.*'(.*)'/i);e&&(t=e.pop())}}return t}(r.bodyAsText);if(n){const i=function(e){let t;const r=e.match(/.*\/subscriptions\/[a-f0-9-]+\//gi);if(!r||!r[0])throw new Error(`Unable to extract subscriptionId from the given url - ${e}.`);t=r[0];return t}(t.url);return async function(e,t,r,n){const i=`${t}providers/${r}/register?api-version=2016-02-01`,o=`${t}providers/${r}?api-version=2016-02-01`,s=Kv(n);s.method="POST",s.url=i;const a=await e._nextPolicy.sendRequest(s);if(200!==a.status)throw new Error(`Autoregistration of ${r} failed. Please try registering manually.`);return Xv(e,o,n)}(e,i,n,t).catch(()=>!1).then(n=>n?(t.headers.set("x-ms-client-request-id",Gg()),e._nextPolicy.sendRequest(t.clone())):r)}}return Promise.resolve(r)}(this,e,t))}}function Kv(e,t=!1){const r=e.clone();return t&&(r.url=e.url),r.headers.set("x-ms-client-request-id",Gg()),r.headers.set("Content-Type","application/json; charset=utf-8"),r}async function Xv(e,t,r){const n=Kv(r);n.url=t,n.method="GET";const i=await e._nextPolicy.sendRequest(n),o=i.parsedBody;return!(!i.parsedBody||!o.registrationState||"Registered"!==o.registrationState)||(await iv(1e3*e._retryTimeout),Xv(e,t,r))}class Qv extends Ob{constructor(e,t,r){super(e,t),this.authenticationProvider=r}signRequest(e){return this.authenticationProvider.signRequest(e)}sendRequest(e){return this.signRequest(e).then(e=>this._nextPolicy.sendRequest(e))}}class Yv extends Ob{constructor(e,t,r,n,i,o){super(e,t),this.retryCount=Zb(r)?r:3,this.retryInterval=Zb(n)?n:3e4,this.minRetryInterval=Zb(i)?i:3e3,this.maxRetryInterval=Zb(o)?o:9e4}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).catch(t=>Jv(this,e,t.response,t))}}async function Jv(e,t,r,n,i){if(i=tv(e,i,n),!ev(e.retryCount,function(e,t){return!(!t||!t.code||"ETIMEDOUT"!==t.code&&"ESOCKETTIMEDOUT"!==t.code&&"ECONNREFUSED"!==t.code&&"ECONNRESET"!==t.code&&"ENOENT"!==t.code)},i,r,n))return n?Promise.reject(i.error):r;try{return await iv(i.retryInterval),e._nextPolicy.sendRequest(t.clone())}catch(o){return Jv(e,t,r,o,i)}}const Zv=Ag.StatusCodes;const ex="The operation was aborted.";class tx extends Ob{constructor(e,t,r){super(e,t),this.numberOfRetries=0,this._handleResponse=r||this._defaultResponseHandler}async sendRequest(e){const t=await this._nextPolicy.sendRequest(e.clone());return t.status!==Zv.TooManyRequests&&t.status!==Zv.ServiceUnavailable?t:this._handleResponse(e,t)}async _defaultResponseHandler(e,t){var r;const n=t.headers.get(Ig.RETRY_AFTER);if(n){const t=tx.parseRetryAfterHeader(n);if(t){if(this.numberOfRetries+=1,await iv(t,{abortSignal:e.abortSignal,abortErrorMsg:ex}),null===(r=e.abortSignal)||void 0===r?void 0:r.aborted)throw new Eg(ex);return this.numberOfRetries<3?this.sendRequest(e):this._nextPolicy.sendRequest(e)}}return t}static parseRetryAfterHeader(e){const t=Number(e);return Number.isNaN(t)?tx.parseDateRetryAfterHeader(e):1e3*t}static parseDateRetryAfterHeader(e){try{const t=Date.now(),r=Date.parse(e)-t;return Number.isNaN(r)?void 0:r}catch(t){return}}}var rx="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},nx="1.9.0",ix=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;var ox=function(e){var t=new Set([e]),r=new Set,n=e.match(ix);if(!n)return function(){return!1};var i=+n[1],o=+n[2],s=+n[3];if(null!=n[4])return function(t){return t===e};function a(e){return r.add(e),!1}function l(e){return t.add(e),!0}return function(e){if(t.has(e))return!0;if(r.has(e))return!1;var n=e.match(ix);if(!n)return a(e);var c=+n[1],u=+n[2],p=+n[3];return null!=n[4]||i!==c?a(e):0===i?o===u&&s<=p?l(e):a(e):o<=u?l(e):a(e)}}(nx),sx=nx.split(".")[0],ax=Symbol.for("opentelemetry.js.api."+sx),lx=rx;function cx(e,t,r,n){var i;void 0===n&&(n=!1);var o=lx[ax]=null!==(i=lx[ax])&&void 0!==i?i:{version:nx};if(!n&&o[e]){var s=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return r.error(s.stack||s.message),!1}if(o.version!==nx){s=new Error("@opentelemetry/api: Registration of version v"+o.version+" for "+e+" does not match previously registered API v"+nx);return r.error(s.stack||s.message),!1}return o[e]=t,r.debug("@opentelemetry/api: Registered a global for "+e+" v"+nx+"."),!0}function ux(e){var t,r,n=null===(t=lx[ax])||void 0===t?void 0:t.version;if(n&&ox(n))return null===(r=lx[ax])||void 0===r?void 0:r[e]}function px(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+nx+".");var r=lx[ax];r&&delete r[e]}var dx,mx,fx=function(){function e(e){this._namespace=e.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return hx("debug",this._namespace,e)},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return hx("error",this._namespace,e)},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return hx("info",this._namespace,e)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return hx("warn",this._namespace,e)},e.prototype.verbose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return hx("verbose",this._namespace,e)},e}();function hx(e,t,r){var n=ux("diag");if(n)return r.unshift(t),n[e].apply(n,function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}([],function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(a){i={error:a}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}(r),!1))}(mx=dx||(dx={}))[mx.NONE=0]="NONE",mx[mx.ERROR=30]="ERROR",mx[mx.WARN=50]="WARN",mx[mx.INFO=60]="INFO",mx[mx.DEBUG=70]="DEBUG",mx[mx.VERBOSE=80]="VERBOSE",mx[mx.ALL=9999]="ALL";var yx=function(){function e(){function e(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=ux("diag");if(n)return n[e].apply(n,function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}([],function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(a){i={error:a}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}(t),!1))}}var t=this;t.setLogger=function(e,r){var n,i,o;if(void 0===r&&(r={logLevel:dx.INFO}),e===t){var s=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return t.error(null!==(n=s.stack)&&void 0!==n?n:s.message),!1}"number"==typeof r&&(r={logLevel:r});var a=ux("diag"),l=function(e,t){function r(r,n){var i=t[r];return"function"==typeof i&&e>=n?i.bind(t):function(){}}return e<dx.NONE?e=dx.NONE:e>dx.ALL&&(e=dx.ALL),t=t||{},{error:r("error",dx.ERROR),warn:r("warn",dx.WARN),info:r("info",dx.INFO),debug:r("debug",dx.DEBUG),verbose:r("verbose",dx.VERBOSE)}}(null!==(i=r.logLevel)&&void 0!==i?i:dx.INFO,e);if(a&&!r.suppressOverrideMessage){var c=null!==(o=(new Error).stack)&&void 0!==o?o:"<failed to generate stacktrace>";a.warn("Current logger will be overwritten from "+c),l.warn("Current logger will overwrite one already registered from "+c)}return cx("diag",l,t,!0)},t.disable=function(){px("diag",t)},t.createComponentLogger=function(e){return new fx(e)},t.verbose=e("verbose"),t.debug=e("debug"),t.info=e("info"),t.warn=e("warn"),t.error=e("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}(),gx=function(){function e(e){this._entries=e?new Map(e):new Map}return e.prototype.getEntry=function(e){var t=this._entries.get(e);if(t)return Object.assign({},t)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(e){var t=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(a){i={error:a}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}(e,2);return[t[0],t[1]]})},e.prototype.setEntry=function(t,r){var n=new e(this._entries);return n._entries.set(t,r),n},e.prototype.removeEntry=function(t){var r=new e(this._entries);return r._entries.delete(t),r},e.prototype.removeEntries=function(){for(var t,r,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=new e(this._entries);try{for(var s=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(n),a=s.next();!a.done;a=s.next()){var l=a.value;o._entries.delete(l)}}catch(c){t={error:c}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return o},e.prototype.clear=function(){return new e},e}();function bx(e){return void 0===e&&(e={}),new gx(new Map(Object.entries(e)))}function vx(e){return Symbol.for(e)}yx.instance();var xx,wx,Sx=new(function(){return function e(t){var r=this;r._currentContext=t?new Map(t):new Map,r.getValue=function(e){return r._currentContext.get(e)},r.setValue=function(t,n){var i=new e(r._currentContext);return i._currentContext.set(t,n),i},r.deleteValue=function(t){var n=new e(r._currentContext);return n._currentContext.delete(t),n}}}()),Nx=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),jx=function(){function e(){}return e.prototype.createGauge=function(e,t){return Dx},e.prototype.createHistogram=function(e,t){return zx},e.prototype.createCounter=function(e,t){return Mx},e.prototype.createUpDownCounter=function(e,t){return Bx},e.prototype.createObservableGauge=function(e,t){return qx},e.prototype.createObservableCounter=function(e,t){return Lx},e.prototype.createObservableUpDownCounter=function(e,t){return Ux},e.prototype.addBatchObservableCallback=function(e,t){},e.prototype.removeBatchObservableCallback=function(e){},e}(),Ex=function(){return function(){}}(),Cx=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Nx(t,e),t.prototype.add=function(e,t){},t}(Ex),kx=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Nx(t,e),t.prototype.add=function(e,t){},t}(Ex),Tx=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Nx(t,e),t.prototype.record=function(e,t){},t}(Ex),Rx=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Nx(t,e),t.prototype.record=function(e,t){},t}(Ex),Ox=function(){function e(){}return e.prototype.addCallback=function(e){},e.prototype.removeCallback=function(e){},e}(),Px=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Nx(t,e),t}(Ox),_x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Nx(t,e),t}(Ox),Ax=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Nx(t,e),t}(Ox),Ix=new jx,Mx=new Cx,Dx=new Tx,zx=new Rx,Bx=new kx,Lx=new Px,qx=new _x,Ux=new Ax,Hx={get:function(e,t){if(null!=e)return e[t]},keys:function(e){return null==e?[]:Object.keys(e)}},Fx={set:function(e,t,r){null!=e&&(e[t]=r)}},$x=function(){function e(){}return e.prototype.active=function(){return Sx},e.prototype.with=function(e,t,r){for(var n=[],i=3;i<arguments.length;i++)n[i-3]=arguments[i];return t.call.apply(t,function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}([r],function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(a){i={error:a}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}(n),!1))},e.prototype.bind=function(e,t){return t},e.prototype.enable=function(){return this},e.prototype.disable=function(){return this},e}(),Vx="context",Gx=new $x,Wx=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalContextManager=function(e){return cx(Vx,e,yx.instance())},e.prototype.active=function(){return this._getContextManager().active()},e.prototype.with=function(e,t,r){for(var n,i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];return(n=this._getContextManager()).with.apply(n,function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}([e,t,r],function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(a){i={error:a}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}(i),!1))},e.prototype.bind=function(e,t){return this._getContextManager().bind(e,t)},e.prototype._getContextManager=function(){return ux(Vx)||Gx},e.prototype.disable=function(){this._getContextManager().disable(),px(Vx,yx.instance())},e}();(wx=xx||(xx={}))[wx.NONE=0]="NONE",wx[wx.SAMPLED=1]="SAMPLED";var Kx="0000000000000000",Xx="00000000000000000000000000000000",Qx={traceId:Xx,spanId:Kx,traceFlags:xx.NONE},Yx=function(){function e(e){void 0===e&&(e=Qx),this._spanContext=e}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(e,t){return this},e.prototype.setAttributes=function(e){return this},e.prototype.addEvent=function(e,t){return this},e.prototype.addLink=function(e){return this},e.prototype.addLinks=function(e){return this},e.prototype.setStatus=function(e){return this},e.prototype.updateName=function(e){return this},e.prototype.end=function(e){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(e,t){},e}(),Jx=vx("OpenTelemetry Context Key SPAN");function Zx(e){return e.getValue(Jx)||void 0}function ew(){return Zx(Wx.getInstance().active())}function tw(e,t){return e.setValue(Jx,t)}function rw(e){return e.deleteValue(Jx)}function nw(e,t){return tw(e,new Yx(t))}function iw(e){var t;return null===(t=Zx(e))||void 0===t?void 0:t.spanContext()}var ow=/^([0-9a-f]{32})$/i,sw=/^[0-9a-f]{16}$/i;function aw(e){return r=e.traceId,ow.test(r)&&r!==Xx&&(t=e.spanId,sw.test(t)&&t!==Kx);var t,r}function lw(e){return new Yx(e)}var cw=Wx.getInstance(),uw=function(){function e(){}return e.prototype.startSpan=function(e,t,r){if(void 0===r&&(r=cw.active()),Boolean(null==t?void 0:t.root))return new Yx;var n,i=r&&iw(r);return"object"==typeof(n=i)&&"string"==typeof n.spanId&&"string"==typeof n.traceId&&"number"==typeof n.traceFlags&&aw(i)?new Yx(i):new Yx},e.prototype.startActiveSpan=function(e,t,r,n){var i,o,s;if(!(arguments.length<2)){2===arguments.length?s=t:3===arguments.length?(i=t,s=r):(i=t,o=r,s=n);var a=null!=o?o:cw.active(),l=this.startSpan(e,i,a),c=tw(a,l);return cw.with(c,s,void 0,l)}},e}();var pw=new uw,dw=function(){function e(e,t,r,n){this._provider=e,this.name=t,this.version=r,this.options=n}return e.prototype.startSpan=function(e,t,r){return this._getTracer().startSpan(e,t,r)},e.prototype.startActiveSpan=function(e,t,r,n){var i=this._getTracer();return Reflect.apply(i.startActiveSpan,i,arguments)},e.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):pw},e}(),mw=new(function(){function e(){}return e.prototype.getTracer=function(e,t,r){return new uw},e}()),fw=function(){function e(){}return e.prototype.getTracer=function(e,t,r){var n;return null!==(n=this.getDelegateTracer(e,t,r))&&void 0!==n?n:new dw(this,e,t,r)},e.prototype.getDelegate=function(){var e;return null!==(e=this._delegate)&&void 0!==e?e:mw},e.prototype.setDelegate=function(e){this._delegate=e},e.prototype.getDelegateTracer=function(e,t,r){var n;return null===(n=this._delegate)||void 0===n?void 0:n.getTracer(e,t,r)},e}(),hw=Wx.getInstance();yx.instance();var yw=new(function(){function e(){}return e.prototype.getMeter=function(e,t,r){return Ix},e}()),gw="metrics";(function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalMeterProvider=function(e){return cx(gw,e,yx.instance())},e.prototype.getMeterProvider=function(){return ux(gw)||yw},e.prototype.getMeter=function(e,t,r){return this.getMeterProvider().getMeter(e,t,r)},e.prototype.disable=function(){px(gw,yx.instance())},e})().getInstance();var bw=function(){function e(){}return e.prototype.inject=function(e,t){},e.prototype.extract=function(e,t){return e},e.prototype.fields=function(){return[]},e}(),vw=vx("OpenTelemetry Baggage Key");function xw(e){return e.getValue(vw)||void 0}function ww(){return xw(Wx.getInstance().active())}function Sw(e,t){return e.setValue(vw,t)}function Nw(e){return e.deleteValue(vw)}var jw="propagation",Ew=new bw;(function(){function e(){this.createBaggage=bx,this.getBaggage=xw,this.getActiveBaggage=ww,this.setBaggage=Sw,this.deleteBaggage=Nw}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalPropagator=function(e){return cx(jw,e,yx.instance())},e.prototype.inject=function(e,t,r){return void 0===r&&(r=Fx),this._getGlobalPropagator().inject(e,t,r)},e.prototype.extract=function(e,t,r){return void 0===r&&(r=Hx),this._getGlobalPropagator().extract(e,t,r)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){px(jw,yx.instance())},e.prototype._getGlobalPropagator=function(){return ux(jw)||Ew},e})().getInstance();var Cw,kw,Tw="trace",Rw=function(){function e(){this._proxyTracerProvider=new fw,this.wrapSpanContext=lw,this.isSpanContextValid=aw,this.deleteSpan=rw,this.getSpan=Zx,this.getActiveSpan=ew,this.getSpanContext=iw,this.setSpan=tw,this.setSpanContext=nw}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(e){var t=cx(Tw,this._proxyTracerProvider,yx.instance());return t&&this._proxyTracerProvider.setDelegate(e),t},e.prototype.getTracerProvider=function(){return ux(Tw)||this._proxyTracerProvider},e.prototype.getTracer=function(e,t){return this.getTracerProvider().getTracer(e,t)},e.prototype.disable=function(){px(Tw,yx.instance()),this._proxyTracerProvider=new fw},e}().getInstance();function Ow(e,t){return Rw.setSpan(e,t)}(kw=Cw||(Cw={}))[kw.INTERNAL=0]="INTERNAL",kw[kw.SERVER=1]="SERVER",kw[kw.CLIENT=2]="CLIENT",kw[kw.PRODUCER=3]="PRODUCER",kw[kw.CONSUMER=4]="CONSUMER";const Pw=hw;var _w,Aw;function Iw(e){return function(t,r){const n=Rw.getTracer("azure/core-tracing",i);var i;const o=(null==r?void 0:r.tracingOptions)||{},s=Object.assign({kind:Cw.INTERNAL},o.spanOptions),a=e.packagePrefix?`${e.packagePrefix}.${t}`:t;let l;l=function(){var e;if("undefined"==typeof process)return!1;const t=null===(e=process.env.AZURE_TRACING_DISABLED)||void 0===e?void 0:e.toLowerCase();return"false"!==t&&"0"!==t&&Boolean(t)}()?Rw.wrapSpanContext(Qx):n.startSpan(a,s,o.tracingContext),e.namespace&&l.setAttribute("az.namespace",e.namespace);let c=o.spanOptions||{};l.isRecording()&&e.namespace&&(c=Object.assign(Object.assign({},o.spanOptions),{attributes:Object.assign(Object.assign({},s.attributes),{"az.namespace":e.namespace})}));const u=Object.assign(Object.assign({},o),{spanOptions:c,tracingContext:Ow(o.tracingContext||Pw.active(),l)});return{span:l,updatedOptions:Object.assign(Object.assign({},r),{tracingOptions:u})}}}(Aw=_w||(_w={}))[Aw.UNSET=0]="UNSET",Aw[Aw.OK=1]="OK",Aw[Aw.ERROR=2]="ERROR";const Mw=Iw({packagePrefix:"",namespace:""});function Dw(e={}){return{create:(t,r)=>new zw(t,r,e)}}class zw extends Ob{constructor(e,t,r){super(e,t),this.userAgent=r.userAgent}async sendRequest(e){if(!e.tracingContext)return this._nextPolicy.sendRequest(e);const t=this.tryCreateSpan(e);if(!t)return this._nextPolicy.sendRequest(e);try{const r=await this._nextPolicy.sendRequest(e);return this.tryProcessResponse(t,r),r}catch(r){throw this.tryProcessError(t,r),r}}tryCreateSpan(e){var t,r;try{const{span:n}=Mw(`HTTP ${e.method}`,{tracingOptions:{spanOptions:Object.assign(Object.assign({},e.spanOptions),{kind:Cw.CLIENT}),tracingContext:e.tracingContext}});if(!n.isRecording())return void n.end();const i=null===(t=e.tracingContext)||void 0===t?void 0:t.getValue(Symbol.for("az.namespace"));"string"==typeof i&&n.setAttribute("az.namespace",i),n.setAttributes({"http.method":e.method,"http.url":e.url,requestId:e.requestId}),this.userAgent&&n.setAttribute("http.user_agent",this.userAgent);const o=n.spanContext(),s=function(e){const t=[];if(e.traceId||t.push("traceId"),e.spanId||t.push("spanId"),t.length)return;const r=(e.traceFlags||0).toString(16),n=1===r.length?`0${r}`:r;return`00-${e.traceId}-${e.spanId}-${n}`}(o);if(s&&(r=o,Rw.isSpanContextValid(r))){e.headers.set("traceparent",s);const t=o.traceState&&o.traceState.serialize();t&&e.headers.set("tracestate",t)}return n}catch(n){return void Ev.warning(`Skipping creating a tracing span due to an error: ${n.message}`)}}tryProcessError(e,t){try{e.setStatus({code:_w.ERROR,message:t.message}),t.statusCode&&e.setAttribute("http.status_code",t.statusCode),e.end()}catch(r){Ev.warning(`Skipping tracing span processing due to an error: ${r.message}`)}}tryProcessResponse(e,t){try{e.setAttribute("http.status_code",t.status);const r=t.headers.get("x-ms-request-id");r&&e.setAttribute("serviceRequestId",r),e.setStatus({code:_w.OK}),e.end()}catch(r){Ev.warning(`Skipping tracing span processing due to an error: ${r.message}`)}}}class Bw{constructor(e,t){let r;if(t||(t={}),this._withCredentials=t.withCredentials||!1,this._httpClient=t.httpClient||(Vv||(Vv=new Nb),Vv),this._requestPolicyOptions=new Pb(t.httpPipelineLogger),Array.isArray(t.requestPolicyFactories))Ev.info("ServiceClient: using custom request policies"),r=t.requestPolicyFactories;else{let i;if(Iv(e)){Ev.info("ServiceClient: creating bearer token authentication policy from provided credentials");const r=()=>{let r;const n=this,i=t;return{create(t,o){const s=function(e,t){if(null==e?void 0:e.credentialScopes)return e.credentialScopes;if(t)return`${t}/.default`;return}(i,n.baseUri);if(!s)throw new Error("When using credential, the ServiceClient must contain a baseUri or a credentialScopes in ServiceClientOptions. Unable to create a bearerTokenAuthenticationPolicy");return null==r&&(r=function(e,t){const r=Hv(e,t);class n extends Ob{constructor(e,t){super(e,t)}async sendRequest(e){if(!e.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");const{token:t}=await r({abortSignal:e.abortSignal,tracingOptions:{tracingContext:e.tracingContext}});return e.headers.set(Ig.AUTHORIZATION,`Bearer ${t}`),this._nextPolicy.sendRequest(e)}}return{create:(e,t)=>new n(e,t)}}(e,s)),r.create(t,o)}}};i=r()}else if(e&&"function"==typeof e.signRequest)Ev.info("ServiceClient: creating signing policy from provided credentials"),n=e,i={create:(e,t)=>new Qv(e,t,n)};else if(null!=e)throw new Error("The credentials argument must implement the TokenCredential interface");if(Ev.info("ServiceClient: using default request policies"),r=function(e,t){const r=[];t.generateClientRequestIdHeader&&r.push(Fv(t.clientRequestIdHeaderName));e&&r.push(e);const n=Lw(t.userAgentHeaderName,Dv),i=Lw(t.userAgent,zv);n&&i&&r.push(function(e){const t=e&&void 0!==e.key&&null!==e.key?e.key:"x-ms-useragent",r=e&&void 0!==e.value&&null!==e.value?e.value:zv();return{create:(e,n)=>new Bv(e,n,t,r)}}({key:n,value:i}));r.push(function(e=20){return{create:(t,r)=>new Yb(t,r,e)}}()),r.push(function(e=30){return{create:(t,r)=>new Wv(t,r,e)}}(t.rpRegistrationRetryTimeout)),t.noRetryPolicy||(r.push({create:(e,t)=>new Tv(e,t,o,s,a)}),r.push(function(e,t,r,n){return{create:(i,o)=>new Yv(i,o,e,t,r,n)}}()),r.push({create:(e,t)=>new tx(e,t)}));var o,s,a;r.push($b(t.deserializationContentTypes)),ov&&r.push(Gv(t.proxySettings));return r.push(Ov({logger:Ev.info})),r}(i,t),t.requestPolicyFactories){const e=t.requestPolicyFactories(r);e&&(r=e)}}var n;this._requestPolicyFactories=r}sendRequest(e){if(null==e||"object"!=typeof e)throw new Error("options cannot be null or undefined and it must be of type object.");let t;try{!function(e){if(e&&"object"==typeof e){const t=e;if("string"==typeof t.url&&"string"==typeof t.method&&"object"==typeof t.headers&&Tg(t.headers)&&"function"==typeof t.validateRequestProperties&&"function"==typeof t.prepare&&"function"==typeof t.clone)return!0}return!1}(e)?(t=new ob,t=t.prepare(e)):(e.validateRequestProperties(),t=e)}catch(n){return Promise.reject(n)}let r=this._httpClient;if(this._requestPolicyFactories&&this._requestPolicyFactories.length>0)for(let i=this._requestPolicyFactories.length-1;i>=0;--i)r=this._requestPolicyFactories[i].create(r,this._requestPolicyOptions);return r.sendRequest(t)}async sendOperationRequest(e,t,r){var n;"function"==typeof e.options&&(r=e.options,e.options=void 0);const i=null===(n=e.options)||void 0===n?void 0:n.serializerOptions,o=new ob;let s;try{const r=t.baseUrl||this.baseUri;if(!r)throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a baseUri string property that contains the base URL to use.");o.method=t.httpMethod,o.operationSpec=t;const n=ab.parse(r);if(t.path&&n.appendPath(t.path),t.urlParameters&&t.urlParameters.length>0)for(const o of t.urlParameters){let r=qw(this,e,o,t.serializer);r=t.serializer.serialize(o.mapper,r,_v(o),i),o.skipEncoding||(r=encodeURIComponent(r)),n.replaceAll(`{${o.mapper.serializedName||_v(o)}}`,r)}if(t.queryParameters&&t.queryParameters.length>0)for(const o of t.queryParameters){let r=qw(this,e,o,t.serializer);if(null!=r){if(r=t.serializer.serialize(o.mapper,r,_v(o),i),void 0!==o.collectionFormat&&null!==o.collectionFormat)if(o.collectionFormat===Lv.Multi){if(0===r.length)continue;for(const e in r){const t=r[e];r[e]=null==t?"":t.toString()}}else o.collectionFormat!==Lv.Ssv&&o.collectionFormat!==Lv.Tsv||(r=r.join(o.collectionFormat));if(!o.skipEncoding)if(Array.isArray(r))for(const e in r)void 0!==r[e]&&null!==r[e]&&(r[e]=encodeURIComponent(r[e]));else r=encodeURIComponent(r);void 0!==o.collectionFormat&&null!==o.collectionFormat&&o.collectionFormat!==Lv.Multi&&o.collectionFormat!==Lv.Ssv&&o.collectionFormat!==Lv.Tsv&&(r=r.join(o.collectionFormat)),n.setQueryParameter(o.mapper.serializedName||_v(o),r)}}o.url=n.toString();const a=t.contentType||this.requestContentType;if(a&&t.requestBody&&o.headers.set("Content-Type",a),t.headerParameters)for(const s of t.headerParameters){let r=qw(this,e,s,t.serializer);if(null!=r){r=t.serializer.serialize(s.mapper,r,_v(s),i);const e=s.mapper.headerCollectionPrefix;if(e)for(const t of Object.keys(r))o.headers.set(e+t,r[t]);else o.headers.set(s.mapper.serializedName||_v(s),r)}}const c=e.options;if(c){if(c.customHeaders)for(const e in c.customHeaders)o.headers.set(e,c.customHeaders[e]);c.abortSignal&&(o.abortSignal=c.abortSignal),c.timeout&&(o.timeout=c.timeout),c.onUploadProgress&&(o.onUploadProgress=c.onUploadProgress),c.onDownloadProgress&&(o.onDownloadProgress=c.onDownloadProgress),c.spanOptions&&(o.spanOptions=c.spanOptions),c.tracingContext&&(o.tracingContext=c.tracingContext),void 0!==c.shouldDeserialize&&null!==c.shouldDeserialize&&(o.shouldDeserialize=c.shouldDeserialize)}let u,p;o.withCredentials=this._withCredentials,function(e,t,r,n){var i,o,s,a,l,c;const u=null!==(o=null===(i=r.options)||void 0===i?void 0:i.serializerOptions)&&void 0!==o?o:{},p={rootName:null!==(s=u.rootName)&&void 0!==s?s:"",includeRoot:null!==(a=u.includeRoot)&&void 0!==a&&a,xmlCharKey:null!==(l=u.xmlCharKey)&&void 0!==l?l:Dg},d=u.xmlCharKey;if(n.requestBody&&n.requestBody.mapper){t.body=qw(e,r,n.requestBody,n.serializer);const i=n.requestBody.mapper,{required:o,xmlName:s,xmlElementName:a,serializedName:l,xmlNamespace:u,xmlNamespacePrefix:f}=i,h=i.type.name;try{if(void 0!==t.body&&null!==t.body||o){const e=_v(n.requestBody);t.body=n.serializer.serialize(i,t.body,e,p);const r=h===ib.Stream;if(n.isXML){const e=f?`xmlns:${f}`:"xmlns",n=function(e,t,r,n,i){if(e&&!["Composite","Sequence","Dictionary"].includes(r)){const r={};return r[i.xmlCharKey]=n,r[Mg]={[t]:e},r}return n}(u,e,h,t.body,p);h===ib.Sequence?t.body=Ub(function(e,t,r,n){if(Array.isArray(e)||(e=[e]),!r||!n)return{[t]:e};const i={[t]:e};return i[Mg]={[r]:n},i}(n,a||s||l,e,u),{rootName:s||l,xmlCharKey:d}):r||(t.body=Ub(n,{rootName:s||l,xmlCharKey:d}))}else{if(h===ib.String&&((null===(c=n.contentType)||void 0===c?void 0:c.match("text/plain"))||"text"===n.mediaType))return;r||(t.body=JSON.stringify(t.body))}}}catch(m){throw new Error(`Error "${m.message}" occurred in serializing the payload - ${JSON.stringify(l,void 0," ")}.`)}}else if(n.formDataParameters&&n.formDataParameters.length>0){t.formData={};for(const i of n.formDataParameters){const o=qw(e,r,i,n.serializer);if(null!=o){const e=i.mapper.serializedName||_v(i);t.formData[e]=n.serializer.serialize(i.mapper,o,_v(i),p)}}}}(this,o,e,t),void 0===o.streamResponseStatusCodes&&(o.streamResponseStatusCodes=function(e){const t=new Set;for(const r in e.responses){const n=e.responses[r];n.bodyMapper&&n.bodyMapper.type.name===ib.Stream&&t.add(Number(r))}return t}(t));try{u=await this.sendRequest(o)}catch(l){p=l}p?(p.response&&(p.details=Fw(p.response,t.responses[p.statusCode]||t.responses.default)),s=Promise.reject(p)):s=Promise.resolve(Fw(u,t.responses[u.status]))}catch(l){s=Promise.reject(l)}const a=r;return a&&s.then(e=>a(null,e._response.parsedBody,e._response.request,e._response)).catch(e=>a(e)),s}}function Lw(e,t){let r;return"string"==typeof e?r=e:(r=t(),"function"==typeof e&&(r=e(r))),r}function qw(e,t,r,n){return Uw(e,t,r.parameterPath,r.mapper,n)}function Uw(e,t,r,n,i){var o;let s;"string"==typeof r&&(r=[r]);const a=null===(o=t.options)||void 0===o?void 0:o.serializerOptions;if(Array.isArray(r)){if(r.length>0){if(n.isConstant)s=n.defaultValue;else{let i=Hw(t,r);i.propertyFound||(i=Hw(e,r));let o=!1;i.propertyFound||(o=n.required||"options"===r[0]&&2===r.length),s=o?n.defaultValue:i.propertyValue}const o=Av(r,n);i.serialize(n,s,o,a)}}else{n.required&&(s={});for(const o in r){const l=n.type.modelProperties[o],c=r[o],u=Uw(e,t,c,l,i),p=Av(c,l);i.serialize(l,u,p,a),null!=u&&(s||(s={}),s[o]=u)}}return s}function Hw(e,t){const r={propertyFound:!1};let n=0;for(;n<t.length;++n){const r=t[n];if(null==e||!(r in e))break;e=e[r]}return n===t.length&&(r.propertyValue=e,r.propertyFound=!0),r}function Fw(e,t){const r=e.parsedHeaders,n=t&&t.bodyMapper,i=t=>Object.defineProperty(t,"_response",{value:e});if(n){const t=n.type.name;if("Stream"===t)return i(Object.assign(Object.assign({},r),{blobBody:e.blobBody,readableStreamBody:e.readableStreamBody}));const o="Composite"===t&&n.type.modelProperties||{},s=Object.keys(o).some(e=>""===o[e].serializedName);if("Sequence"===t||s){const t=[...e.parsedBody||[]];for(const r of Object.keys(o))o[r].serializedName&&(t[r]=e.parsedBody[r]);if(r)for(const e of Object.keys(r))t[e]=r[e];return i(t),t}if("Composite"===t||"Dictionary"===t)return i(Object.assign(Object.assign({},r),e.parsedBody))}return n||"HEAD"===e.request.method||("object"!=typeof(o=e.parsedBody)&&"function"!=typeof o||null===o)?i(Object.assign(Object.assign({},r),{body:e.parsedBody})):i(Object.assign(Object.assign({},r),e.parsedBody));var o}const $w={serializedName:"StorageError",type:{name:"Composite",className:"StorageError",modelProperties:{message:{serializedName:"Message",xmlName:"Message",type:{name:"String"}},code:{serializedName:"Code",xmlName:"Code",type:{name:"String"}}}}},Vw={serializedName:"FilterBlobSegment",xmlName:"EnumerationResults",type:{name:"Composite",className:"FilterBlobSegment",modelProperties:{serviceEndpoint:{serializedName:"ServiceEndpoint",required:!0,xmlName:"ServiceEndpoint",xmlIsAttribute:!0,type:{name:"String"}},where:{serializedName:"Where",required:!0,xmlName:"Where",type:{name:"String"}},blobs:{serializedName:"Blobs",required:!0,xmlName:"Blobs",xmlIsWrapped:!0,xmlElementName:"Blob",type:{name:"Sequence",element:{type:{name:"Composite",className:"FilterBlobItem"}}}},continuationToken:{serializedName:"NextMarker",xmlName:"NextMarker",type:{name:"String"}}}}},Gw={serializedName:"BlobTags",xmlName:"Tags",type:{name:"Composite",className:"BlobTags",modelProperties:{blobTagSet:{serializedName:"BlobTagSet",required:!0,xmlName:"TagSet",xmlIsWrapped:!0,xmlElementName:"Tag",type:{name:"Sequence",element:{type:{name:"Composite",className:"BlobTag"}}}}}}},Ww={serializedName:"ListBlobsFlatSegmentResponse",xmlName:"EnumerationResults",type:{name:"Composite",className:"ListBlobsFlatSegmentResponse",modelProperties:{serviceEndpoint:{serializedName:"ServiceEndpoint",required:!0,xmlName:"ServiceEndpoint",xmlIsAttribute:!0,type:{name:"String"}},containerName:{serializedName:"ContainerName",required:!0,xmlName:"ContainerName",xmlIsAttribute:!0,type:{name:"String"}},prefix:{serializedName:"Prefix",xmlName:"Prefix",type:{name:"String"}},marker:{serializedName:"Marker",xmlName:"Marker",type:{name:"String"}},maxPageSize:{serializedName:"MaxResults",xmlName:"MaxResults",type:{name:"Number"}},segment:{serializedName:"Segment",xmlName:"Blobs",type:{name:"Composite",className:"BlobFlatListSegment"}},continuationToken:{serializedName:"NextMarker",xmlName:"NextMarker",type:{name:"String"}}}}},Kw={serializedName:"ListBlobsHierarchySegmentResponse",xmlName:"EnumerationResults",type:{name:"Composite",className:"ListBlobsHierarchySegmentResponse",modelProperties:{serviceEndpoint:{serializedName:"ServiceEndpoint",required:!0,xmlName:"ServiceEndpoint",xmlIsAttribute:!0,type:{name:"String"}},containerName:{serializedName:"ContainerName",required:!0,xmlName:"ContainerName",xmlIsAttribute:!0,type:{name:"String"}},prefix:{serializedName:"Prefix",xmlName:"Prefix",type:{name:"String"}},marker:{serializedName:"Marker",xmlName:"Marker",type:{name:"String"}},maxPageSize:{serializedName:"MaxResults",xmlName:"MaxResults",type:{name:"Number"}},delimiter:{serializedName:"Delimiter",xmlName:"Delimiter",type:{name:"String"}},segment:{serializedName:"Segment",xmlName:"Blobs",type:{name:"Composite",className:"BlobHierarchyListSegment"}},continuationToken:{serializedName:"NextMarker",xmlName:"NextMarker",type:{name:"String"}}}}},Xw={serializedName:"BlockLookupList",xmlName:"BlockList",type:{name:"Composite",className:"BlockLookupList",modelProperties:{committed:{serializedName:"Committed",xmlName:"Committed",xmlElementName:"Committed",type:{name:"Sequence",element:{type:{name:"String"}}}},uncommitted:{serializedName:"Uncommitted",xmlName:"Uncommitted",xmlElementName:"Uncommitted",type:{name:"Sequence",element:{type:{name:"String"}}}},latest:{serializedName:"Latest",xmlName:"Latest",xmlElementName:"Latest",type:{name:"Sequence",element:{type:{name:"String"}}}}}}},Qw={serializedName:"BlockList",type:{name:"Composite",className:"BlockList",modelProperties:{committedBlocks:{serializedName:"CommittedBlocks",xmlName:"CommittedBlocks",xmlIsWrapped:!0,xmlElementName:"Block",type:{name:"Sequence",element:{type:{name:"Composite",className:"Block"}}}},uncommittedBlocks:{serializedName:"UncommittedBlocks",xmlName:"UncommittedBlocks",xmlIsWrapped:!0,xmlElementName:"Block",type:{name:"Sequence",element:{type:{name:"Composite",className:"Block"}}}}}}},Yw={serializedName:"PageList",type:{name:"Composite",className:"PageList",modelProperties:{pageRange:{serializedName:"PageRange",xmlName:"PageRange",xmlElementName:"PageRange",type:{name:"Sequence",element:{type:{name:"Composite",className:"PageRange"}}}},clearRange:{serializedName:"ClearRange",xmlName:"ClearRange",xmlElementName:"ClearRange",type:{name:"Sequence",element:{type:{name:"Composite",className:"ClearRange"}}}},continuationToken:{serializedName:"NextMarker",xmlName:"NextMarker",type:{name:"String"}}}}},Jw={serializedName:"QueryRequest",xmlName:"QueryRequest",type:{name:"Composite",className:"QueryRequest",modelProperties:{queryType:{serializedName:"QueryType",required:!0,xmlName:"QueryType",type:{name:"String"}},expression:{serializedName:"Expression",required:!0,xmlName:"Expression",type:{name:"String"}},inputSerialization:{serializedName:"InputSerialization",xmlName:"InputSerialization",type:{name:"Composite",className:"QuerySerialization"}},outputSerialization:{serializedName:"OutputSerialization",xmlName:"OutputSerialization",type:{name:"Composite",className:"QuerySerialization"}}}}},Zw={serializedName:"Container_createHeaders",type:{name:"Composite",className:"ContainerCreateHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},eS={serializedName:"Container_createExceptionHeaders",type:{name:"Composite",className:"ContainerCreateExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},tS={serializedName:"Container_getPropertiesHeaders",type:{name:"Composite",className:"ContainerGetPropertiesHeaders",modelProperties:{metadata:{serializedName:"x-ms-meta",xmlName:"x-ms-meta",type:{name:"Dictionary",value:{type:{name:"String"}}},headerCollectionPrefix:"x-ms-meta-"},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},leaseDuration:{serializedName:"x-ms-lease-duration",xmlName:"x-ms-lease-duration",type:{name:"Enum",allowedValues:["infinite","fixed"]}},leaseState:{serializedName:"x-ms-lease-state",xmlName:"x-ms-lease-state",type:{name:"Enum",allowedValues:["available","leased","expired","breaking","broken"]}},leaseStatus:{serializedName:"x-ms-lease-status",xmlName:"x-ms-lease-status",type:{name:"Enum",allowedValues:["locked","unlocked"]}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},blobPublicAccess:{serializedName:"x-ms-blob-public-access",xmlName:"x-ms-blob-public-access",type:{name:"Enum",allowedValues:["container","blob"]}},hasImmutabilityPolicy:{serializedName:"x-ms-has-immutability-policy",xmlName:"x-ms-has-immutability-policy",type:{name:"Boolean"}},hasLegalHold:{serializedName:"x-ms-has-legal-hold",xmlName:"x-ms-has-legal-hold",type:{name:"Boolean"}},defaultEncryptionScope:{serializedName:"x-ms-default-encryption-scope",xmlName:"x-ms-default-encryption-scope",type:{name:"String"}},denyEncryptionScopeOverride:{serializedName:"x-ms-deny-encryption-scope-override",xmlName:"x-ms-deny-encryption-scope-override",type:{name:"Boolean"}},isImmutableStorageWithVersioningEnabled:{serializedName:"x-ms-immutable-storage-with-versioning-enabled",xmlName:"x-ms-immutable-storage-with-versioning-enabled",type:{name:"Boolean"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},rS={serializedName:"Container_getPropertiesExceptionHeaders",type:{name:"Composite",className:"ContainerGetPropertiesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},nS={serializedName:"Container_deleteHeaders",type:{name:"Composite",className:"ContainerDeleteHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},iS={serializedName:"Container_deleteExceptionHeaders",type:{name:"Composite",className:"ContainerDeleteExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},oS={serializedName:"Container_setMetadataHeaders",type:{name:"Composite",className:"ContainerSetMetadataHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},sS={serializedName:"Container_setMetadataExceptionHeaders",type:{name:"Composite",className:"ContainerSetMetadataExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},aS={serializedName:"Container_getAccessPolicyHeaders",type:{name:"Composite",className:"ContainerGetAccessPolicyHeaders",modelProperties:{blobPublicAccess:{serializedName:"x-ms-blob-public-access",xmlName:"x-ms-blob-public-access",type:{name:"Enum",allowedValues:["container","blob"]}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},lS={serializedName:"Container_getAccessPolicyExceptionHeaders",type:{name:"Composite",className:"ContainerGetAccessPolicyExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},cS={serializedName:"Container_setAccessPolicyHeaders",type:{name:"Composite",className:"ContainerSetAccessPolicyHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},uS={serializedName:"Container_setAccessPolicyExceptionHeaders",type:{name:"Composite",className:"ContainerSetAccessPolicyExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},pS={serializedName:"Container_restoreHeaders",type:{name:"Composite",className:"ContainerRestoreHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},dS={serializedName:"Container_restoreExceptionHeaders",type:{name:"Composite",className:"ContainerRestoreExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},mS={serializedName:"Container_renameHeaders",type:{name:"Composite",className:"ContainerRenameHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},fS={serializedName:"Container_renameExceptionHeaders",type:{name:"Composite",className:"ContainerRenameExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},hS={serializedName:"Container_submitBatchHeaders",type:{name:"Composite",className:"ContainerSubmitBatchHeaders",modelProperties:{contentType:{serializedName:"content-type",xmlName:"content-type",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}}}}},yS={serializedName:"Container_submitBatchExceptionHeaders",type:{name:"Composite",className:"ContainerSubmitBatchExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},gS={serializedName:"Container_filterBlobsHeaders",type:{name:"Composite",className:"ContainerFilterBlobsHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}},bS={serializedName:"Container_filterBlobsExceptionHeaders",type:{name:"Composite",className:"ContainerFilterBlobsExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},vS={serializedName:"Container_acquireLeaseHeaders",type:{name:"Composite",className:"ContainerAcquireLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},leaseId:{serializedName:"x-ms-lease-id",xmlName:"x-ms-lease-id",type:{name:"String"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}},xS={serializedName:"Container_acquireLeaseExceptionHeaders",type:{name:"Composite",className:"ContainerAcquireLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},wS={serializedName:"Container_releaseLeaseHeaders",type:{name:"Composite",className:"ContainerReleaseLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}},SS={serializedName:"Container_releaseLeaseExceptionHeaders",type:{name:"Composite",className:"ContainerReleaseLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},NS={serializedName:"Container_renewLeaseHeaders",type:{name:"Composite",className:"ContainerRenewLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},leaseId:{serializedName:"x-ms-lease-id",xmlName:"x-ms-lease-id",type:{name:"String"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}},jS={serializedName:"Container_renewLeaseExceptionHeaders",type:{name:"Composite",className:"ContainerRenewLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ES={serializedName:"Container_breakLeaseHeaders",type:{name:"Composite",className:"ContainerBreakLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},leaseTime:{serializedName:"x-ms-lease-time",xmlName:"x-ms-lease-time",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}},CS={serializedName:"Container_breakLeaseExceptionHeaders",type:{name:"Composite",className:"ContainerBreakLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},kS={serializedName:"Container_changeLeaseHeaders",type:{name:"Composite",className:"ContainerChangeLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},leaseId:{serializedName:"x-ms-lease-id",xmlName:"x-ms-lease-id",type:{name:"String"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}},TS={serializedName:"Container_changeLeaseExceptionHeaders",type:{name:"Composite",className:"ContainerChangeLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},RS={serializedName:"Container_listBlobFlatSegmentHeaders",type:{name:"Composite",className:"ContainerListBlobFlatSegmentHeaders",modelProperties:{contentType:{serializedName:"content-type",xmlName:"content-type",type:{name:"String"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},OS={serializedName:"Container_listBlobFlatSegmentExceptionHeaders",type:{name:"Composite",className:"ContainerListBlobFlatSegmentExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},PS={serializedName:"Container_listBlobHierarchySegmentHeaders",type:{name:"Composite",className:"ContainerListBlobHierarchySegmentHeaders",modelProperties:{contentType:{serializedName:"content-type",xmlName:"content-type",type:{name:"String"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},_S={serializedName:"Container_listBlobHierarchySegmentExceptionHeaders",type:{name:"Composite",className:"ContainerListBlobHierarchySegmentExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},AS={serializedName:"Container_getAccountInfoHeaders",type:{name:"Composite",className:"ContainerGetAccountInfoHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},skuName:{serializedName:"x-ms-sku-name",xmlName:"x-ms-sku-name",type:{name:"Enum",allowedValues:["Standard_LRS","Standard_GRS","Standard_RAGRS","Standard_ZRS","Premium_LRS"]}},accountKind:{serializedName:"x-ms-account-kind",xmlName:"x-ms-account-kind",type:{name:"Enum",allowedValues:["Storage","BlobStorage","StorageV2","FileStorage","BlockBlobStorage"]}}}}},IS={serializedName:"Container_getAccountInfoExceptionHeaders",type:{name:"Composite",className:"ContainerGetAccountInfoExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},MS={serializedName:"Blob_downloadHeaders",type:{name:"Composite",className:"BlobDownloadHeaders",modelProperties:{lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},createdOn:{serializedName:"x-ms-creation-time",xmlName:"x-ms-creation-time",type:{name:"DateTimeRfc1123"}},metadata:{serializedName:"x-ms-meta",xmlName:"x-ms-meta",type:{name:"Dictionary",value:{type:{name:"String"}}},headerCollectionPrefix:"x-ms-meta-"},objectReplicationPolicyId:{serializedName:"x-ms-or-policy-id",xmlName:"x-ms-or-policy-id",type:{name:"String"}},objectReplicationRules:{serializedName:"x-ms-or",xmlName:"x-ms-or",type:{name:"Dictionary",value:{type:{name:"String"}}},headerCollectionPrefix:"x-ms-or-"},contentLength:{serializedName:"content-length",xmlName:"content-length",type:{name:"Number"}},contentType:{serializedName:"content-type",xmlName:"content-type",type:{name:"String"}},contentRange:{serializedName:"content-range",xmlName:"content-range",type:{name:"String"}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},contentEncoding:{serializedName:"content-encoding",xmlName:"content-encoding",type:{name:"String"}},cacheControl:{serializedName:"cache-control",xmlName:"cache-control",type:{name:"String"}},contentDisposition:{serializedName:"content-disposition",xmlName:"content-disposition",type:{name:"String"}},contentLanguage:{serializedName:"content-language",xmlName:"content-language",type:{name:"String"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},blobType:{serializedName:"x-ms-blob-type",xmlName:"x-ms-blob-type",type:{name:"Enum",allowedValues:["BlockBlob","PageBlob","AppendBlob"]}},copyCompletedOn:{serializedName:"x-ms-copy-completion-time",xmlName:"x-ms-copy-completion-time",type:{name:"DateTimeRfc1123"}},copyStatusDescription:{serializedName:"x-ms-copy-status-description",xmlName:"x-ms-copy-status-description",type:{name:"String"}},copyId:{serializedName:"x-ms-copy-id",xmlName:"x-ms-copy-id",type:{name:"String"}},copyProgress:{serializedName:"x-ms-copy-progress",xmlName:"x-ms-copy-progress",type:{name:"String"}},copySource:{serializedName:"x-ms-copy-source",xmlName:"x-ms-copy-source",type:{name:"String"}},copyStatus:{serializedName:"x-ms-copy-status",xmlName:"x-ms-copy-status",type:{name:"Enum",allowedValues:["pending","success","aborted","failed"]}},leaseDuration:{serializedName:"x-ms-lease-duration",xmlName:"x-ms-lease-duration",type:{name:"Enum",allowedValues:["infinite","fixed"]}},leaseState:{serializedName:"x-ms-lease-state",xmlName:"x-ms-lease-state",type:{name:"Enum",allowedValues:["available","leased","expired","breaking","broken"]}},leaseStatus:{serializedName:"x-ms-lease-status",xmlName:"x-ms-lease-status",type:{name:"Enum",allowedValues:["locked","unlocked"]}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},isCurrentVersion:{serializedName:"x-ms-is-current-version",xmlName:"x-ms-is-current-version",type:{name:"Boolean"}},acceptRanges:{serializedName:"accept-ranges",xmlName:"accept-ranges",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},blobCommittedBlockCount:{serializedName:"x-ms-blob-committed-block-count",xmlName:"x-ms-blob-committed-block-count",type:{name:"Number"}},isServerEncrypted:{serializedName:"x-ms-server-encrypted",xmlName:"x-ms-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},blobContentMD5:{serializedName:"x-ms-blob-content-md5",xmlName:"x-ms-blob-content-md5",type:{name:"ByteArray"}},tagCount:{serializedName:"x-ms-tag-count",xmlName:"x-ms-tag-count",type:{name:"Number"}},isSealed:{serializedName:"x-ms-blob-sealed",xmlName:"x-ms-blob-sealed",type:{name:"Boolean"}},lastAccessed:{serializedName:"x-ms-last-access-time",xmlName:"x-ms-last-access-time",type:{name:"DateTimeRfc1123"}},immutabilityPolicyExpiresOn:{serializedName:"x-ms-immutability-policy-until-date",xmlName:"x-ms-immutability-policy-until-date",type:{name:"DateTimeRfc1123"}},immutabilityPolicyMode:{serializedName:"x-ms-immutability-policy-mode",xmlName:"x-ms-immutability-policy-mode",type:{name:"Enum",allowedValues:["Mutable","Unlocked","Locked"]}},legalHold:{serializedName:"x-ms-legal-hold",xmlName:"x-ms-legal-hold",type:{name:"Boolean"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}},contentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}}}}},DS={serializedName:"Blob_downloadExceptionHeaders",type:{name:"Composite",className:"BlobDownloadExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},zS={serializedName:"Blob_getPropertiesHeaders",type:{name:"Composite",className:"BlobGetPropertiesHeaders",modelProperties:{lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},createdOn:{serializedName:"x-ms-creation-time",xmlName:"x-ms-creation-time",type:{name:"DateTimeRfc1123"}},metadata:{serializedName:"x-ms-meta",xmlName:"x-ms-meta",type:{name:"Dictionary",value:{type:{name:"String"}}},headerCollectionPrefix:"x-ms-meta-"},objectReplicationPolicyId:{serializedName:"x-ms-or-policy-id",xmlName:"x-ms-or-policy-id",type:{name:"String"}},objectReplicationRules:{serializedName:"x-ms-or",xmlName:"x-ms-or",type:{name:"Dictionary",value:{type:{name:"String"}}},headerCollectionPrefix:"x-ms-or-"},blobType:{serializedName:"x-ms-blob-type",xmlName:"x-ms-blob-type",type:{name:"Enum",allowedValues:["BlockBlob","PageBlob","AppendBlob"]}},copyCompletedOn:{serializedName:"x-ms-copy-completion-time",xmlName:"x-ms-copy-completion-time",type:{name:"DateTimeRfc1123"}},copyStatusDescription:{serializedName:"x-ms-copy-status-description",xmlName:"x-ms-copy-status-description",type:{name:"String"}},copyId:{serializedName:"x-ms-copy-id",xmlName:"x-ms-copy-id",type:{name:"String"}},copyProgress:{serializedName:"x-ms-copy-progress",xmlName:"x-ms-copy-progress",type:{name:"String"}},copySource:{serializedName:"x-ms-copy-source",xmlName:"x-ms-copy-source",type:{name:"String"}},copyStatus:{serializedName:"x-ms-copy-status",xmlName:"x-ms-copy-status",type:{name:"Enum",allowedValues:["pending","success","aborted","failed"]}},isIncrementalCopy:{serializedName:"x-ms-incremental-copy",xmlName:"x-ms-incremental-copy",type:{name:"Boolean"}},destinationSnapshot:{serializedName:"x-ms-copy-destination-snapshot",xmlName:"x-ms-copy-destination-snapshot",type:{name:"String"}},leaseDuration:{serializedName:"x-ms-lease-duration",xmlName:"x-ms-lease-duration",type:{name:"Enum",allowedValues:["infinite","fixed"]}},leaseState:{serializedName:"x-ms-lease-state",xmlName:"x-ms-lease-state",type:{name:"Enum",allowedValues:["available","leased","expired","breaking","broken"]}},leaseStatus:{serializedName:"x-ms-lease-status",xmlName:"x-ms-lease-status",type:{name:"Enum",allowedValues:["locked","unlocked"]}},contentLength:{serializedName:"content-length",xmlName:"content-length",type:{name:"Number"}},contentType:{serializedName:"content-type",xmlName:"content-type",type:{name:"String"}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},contentEncoding:{serializedName:"content-encoding",xmlName:"content-encoding",type:{name:"String"}},contentDisposition:{serializedName:"content-disposition",xmlName:"content-disposition",type:{name:"String"}},contentLanguage:{serializedName:"content-language",xmlName:"content-language",type:{name:"String"}},cacheControl:{serializedName:"cache-control",xmlName:"cache-control",type:{name:"String"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},acceptRanges:{serializedName:"accept-ranges",xmlName:"accept-ranges",type:{name:"String"}},blobCommittedBlockCount:{serializedName:"x-ms-blob-committed-block-count",xmlName:"x-ms-blob-committed-block-count",type:{name:"Number"}},isServerEncrypted:{serializedName:"x-ms-server-encrypted",xmlName:"x-ms-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},accessTier:{serializedName:"x-ms-access-tier",xmlName:"x-ms-access-tier",type:{name:"String"}},accessTierInferred:{serializedName:"x-ms-access-tier-inferred",xmlName:"x-ms-access-tier-inferred",type:{name:"Boolean"}},archiveStatus:{serializedName:"x-ms-archive-status",xmlName:"x-ms-archive-status",type:{name:"String"}},accessTierChangedOn:{serializedName:"x-ms-access-tier-change-time",xmlName:"x-ms-access-tier-change-time",type:{name:"DateTimeRfc1123"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},isCurrentVersion:{serializedName:"x-ms-is-current-version",xmlName:"x-ms-is-current-version",type:{name:"Boolean"}},tagCount:{serializedName:"x-ms-tag-count",xmlName:"x-ms-tag-count",type:{name:"Number"}},expiresOn:{serializedName:"x-ms-expiry-time",xmlName:"x-ms-expiry-time",type:{name:"DateTimeRfc1123"}},isSealed:{serializedName:"x-ms-blob-sealed",xmlName:"x-ms-blob-sealed",type:{name:"Boolean"}},rehydratePriority:{serializedName:"x-ms-rehydrate-priority",xmlName:"x-ms-rehydrate-priority",type:{name:"Enum",allowedValues:["High","Standard"]}},lastAccessed:{serializedName:"x-ms-last-access-time",xmlName:"x-ms-last-access-time",type:{name:"DateTimeRfc1123"}},immutabilityPolicyExpiresOn:{serializedName:"x-ms-immutability-policy-until-date",xmlName:"x-ms-immutability-policy-until-date",type:{name:"DateTimeRfc1123"}},immutabilityPolicyMode:{serializedName:"x-ms-immutability-policy-mode",xmlName:"x-ms-immutability-policy-mode",type:{name:"Enum",allowedValues:["Mutable","Unlocked","Locked"]}},legalHold:{serializedName:"x-ms-legal-hold",xmlName:"x-ms-legal-hold",type:{name:"Boolean"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},BS={serializedName:"Blob_getPropertiesExceptionHeaders",type:{name:"Composite",className:"BlobGetPropertiesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},LS={serializedName:"Blob_deleteHeaders",type:{name:"Composite",className:"BlobDeleteHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},qS={serializedName:"Blob_deleteExceptionHeaders",type:{name:"Composite",className:"BlobDeleteExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},US={serializedName:"Blob_undeleteHeaders",type:{name:"Composite",className:"BlobUndeleteHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},HS={serializedName:"Blob_undeleteExceptionHeaders",type:{name:"Composite",className:"BlobUndeleteExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},FS={serializedName:"Blob_setExpiryHeaders",type:{name:"Composite",className:"BlobSetExpiryHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}},$S={serializedName:"Blob_setExpiryExceptionHeaders",type:{name:"Composite",className:"BlobSetExpiryExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},VS={serializedName:"Blob_setHttpHeadersHeaders",type:{name:"Composite",className:"BlobSetHttpHeadersHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},GS={serializedName:"Blob_setHttpHeadersExceptionHeaders",type:{name:"Composite",className:"BlobSetHttpHeadersExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},WS={serializedName:"Blob_setImmutabilityPolicyHeaders",type:{name:"Composite",className:"BlobSetImmutabilityPolicyHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},immutabilityPolicyExpiry:{serializedName:"x-ms-immutability-policy-until-date",xmlName:"x-ms-immutability-policy-until-date",type:{name:"DateTimeRfc1123"}},immutabilityPolicyMode:{serializedName:"x-ms-immutability-policy-mode",xmlName:"x-ms-immutability-policy-mode",type:{name:"Enum",allowedValues:["Mutable","Unlocked","Locked"]}}}}},KS={serializedName:"Blob_setImmutabilityPolicyExceptionHeaders",type:{name:"Composite",className:"BlobSetImmutabilityPolicyExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},XS={serializedName:"Blob_deleteImmutabilityPolicyHeaders",type:{name:"Composite",className:"BlobDeleteImmutabilityPolicyHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}},QS={serializedName:"Blob_deleteImmutabilityPolicyExceptionHeaders",type:{name:"Composite",className:"BlobDeleteImmutabilityPolicyExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},YS={serializedName:"Blob_setLegalHoldHeaders",type:{name:"Composite",className:"BlobSetLegalHoldHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},legalHold:{serializedName:"x-ms-legal-hold",xmlName:"x-ms-legal-hold",type:{name:"Boolean"}}}}},JS={serializedName:"Blob_setLegalHoldExceptionHeaders",type:{name:"Composite",className:"BlobSetLegalHoldExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ZS={serializedName:"Blob_setMetadataHeaders",type:{name:"Composite",className:"BlobSetMetadataHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},eN={serializedName:"Blob_setMetadataExceptionHeaders",type:{name:"Composite",className:"BlobSetMetadataExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},tN={serializedName:"Blob_acquireLeaseHeaders",type:{name:"Composite",className:"BlobAcquireLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},leaseId:{serializedName:"x-ms-lease-id",xmlName:"x-ms-lease-id",type:{name:"String"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}},rN={serializedName:"Blob_acquireLeaseExceptionHeaders",type:{name:"Composite",className:"BlobAcquireLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},nN={serializedName:"Blob_releaseLeaseHeaders",type:{name:"Composite",className:"BlobReleaseLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}},iN={serializedName:"Blob_releaseLeaseExceptionHeaders",type:{name:"Composite",className:"BlobReleaseLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},oN={serializedName:"Blob_renewLeaseHeaders",type:{name:"Composite",className:"BlobRenewLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},leaseId:{serializedName:"x-ms-lease-id",xmlName:"x-ms-lease-id",type:{name:"String"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}},sN={serializedName:"Blob_renewLeaseExceptionHeaders",type:{name:"Composite",className:"BlobRenewLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},aN={serializedName:"Blob_changeLeaseHeaders",type:{name:"Composite",className:"BlobChangeLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},leaseId:{serializedName:"x-ms-lease-id",xmlName:"x-ms-lease-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}},lN={serializedName:"Blob_changeLeaseExceptionHeaders",type:{name:"Composite",className:"BlobChangeLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},cN={serializedName:"Blob_breakLeaseHeaders",type:{name:"Composite",className:"BlobBreakLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},leaseTime:{serializedName:"x-ms-lease-time",xmlName:"x-ms-lease-time",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}},uN={serializedName:"Blob_breakLeaseExceptionHeaders",type:{name:"Composite",className:"BlobBreakLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},pN={serializedName:"Blob_createSnapshotHeaders",type:{name:"Composite",className:"BlobCreateSnapshotHeaders",modelProperties:{snapshot:{serializedName:"x-ms-snapshot",xmlName:"x-ms-snapshot",type:{name:"String"}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},dN={serializedName:"Blob_createSnapshotExceptionHeaders",type:{name:"Composite",className:"BlobCreateSnapshotExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},mN={serializedName:"Blob_startCopyFromURLHeaders",type:{name:"Composite",className:"BlobStartCopyFromURLHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},copyId:{serializedName:"x-ms-copy-id",xmlName:"x-ms-copy-id",type:{name:"String"}},copyStatus:{serializedName:"x-ms-copy-status",xmlName:"x-ms-copy-status",type:{name:"Enum",allowedValues:["pending","success","aborted","failed"]}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},fN={serializedName:"Blob_startCopyFromURLExceptionHeaders",type:{name:"Composite",className:"BlobStartCopyFromURLExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},hN={serializedName:"Blob_copyFromURLHeaders",type:{name:"Composite",className:"BlobCopyFromURLHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},copyId:{serializedName:"x-ms-copy-id",xmlName:"x-ms-copy-id",type:{name:"String"}},copyStatus:{defaultValue:"success",isConstant:!0,serializedName:"x-ms-copy-status",type:{name:"String"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},yN={serializedName:"Blob_copyFromURLExceptionHeaders",type:{name:"Composite",className:"BlobCopyFromURLExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},gN={serializedName:"Blob_abortCopyFromURLHeaders",type:{name:"Composite",className:"BlobAbortCopyFromURLHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},bN={serializedName:"Blob_abortCopyFromURLExceptionHeaders",type:{name:"Composite",className:"BlobAbortCopyFromURLExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},vN={serializedName:"Blob_setTierHeaders",type:{name:"Composite",className:"BlobSetTierHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},xN={serializedName:"Blob_setTierExceptionHeaders",type:{name:"Composite",className:"BlobSetTierExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},wN={serializedName:"Blob_getAccountInfoHeaders",type:{name:"Composite",className:"BlobGetAccountInfoHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},skuName:{serializedName:"x-ms-sku-name",xmlName:"x-ms-sku-name",type:{name:"Enum",allowedValues:["Standard_LRS","Standard_GRS","Standard_RAGRS","Standard_ZRS","Premium_LRS"]}},accountKind:{serializedName:"x-ms-account-kind",xmlName:"x-ms-account-kind",type:{name:"Enum",allowedValues:["Storage","BlobStorage","StorageV2","FileStorage","BlockBlobStorage"]}}}}},SN={serializedName:"Blob_getAccountInfoExceptionHeaders",type:{name:"Composite",className:"BlobGetAccountInfoExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},NN={serializedName:"Blob_queryHeaders",type:{name:"Composite",className:"BlobQueryHeaders",modelProperties:{lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},metadata:{serializedName:"x-ms-meta",xmlName:"x-ms-meta",type:{name:"Dictionary",value:{type:{name:"String"}}}},contentLength:{serializedName:"content-length",xmlName:"content-length",type:{name:"Number"}},contentType:{serializedName:"content-type",xmlName:"content-type",type:{name:"String"}},contentRange:{serializedName:"content-range",xmlName:"content-range",type:{name:"String"}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},contentEncoding:{serializedName:"content-encoding",xmlName:"content-encoding",type:{name:"String"}},cacheControl:{serializedName:"cache-control",xmlName:"cache-control",type:{name:"String"}},contentDisposition:{serializedName:"content-disposition",xmlName:"content-disposition",type:{name:"String"}},contentLanguage:{serializedName:"content-language",xmlName:"content-language",type:{name:"String"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},blobType:{serializedName:"x-ms-blob-type",xmlName:"x-ms-blob-type",type:{name:"Enum",allowedValues:["BlockBlob","PageBlob","AppendBlob"]}},copyCompletionTime:{serializedName:"x-ms-copy-completion-time",xmlName:"x-ms-copy-completion-time",type:{name:"DateTimeRfc1123"}},copyStatusDescription:{serializedName:"x-ms-copy-status-description",xmlName:"x-ms-copy-status-description",type:{name:"String"}},copyId:{serializedName:"x-ms-copy-id",xmlName:"x-ms-copy-id",type:{name:"String"}},copyProgress:{serializedName:"x-ms-copy-progress",xmlName:"x-ms-copy-progress",type:{name:"String"}},copySource:{serializedName:"x-ms-copy-source",xmlName:"x-ms-copy-source",type:{name:"String"}},copyStatus:{serializedName:"x-ms-copy-status",xmlName:"x-ms-copy-status",type:{name:"Enum",allowedValues:["pending","success","aborted","failed"]}},leaseDuration:{serializedName:"x-ms-lease-duration",xmlName:"x-ms-lease-duration",type:{name:"Enum",allowedValues:["infinite","fixed"]}},leaseState:{serializedName:"x-ms-lease-state",xmlName:"x-ms-lease-state",type:{name:"Enum",allowedValues:["available","leased","expired","breaking","broken"]}},leaseStatus:{serializedName:"x-ms-lease-status",xmlName:"x-ms-lease-status",type:{name:"Enum",allowedValues:["locked","unlocked"]}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},acceptRanges:{serializedName:"accept-ranges",xmlName:"accept-ranges",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},blobCommittedBlockCount:{serializedName:"x-ms-blob-committed-block-count",xmlName:"x-ms-blob-committed-block-count",type:{name:"Number"}},isServerEncrypted:{serializedName:"x-ms-server-encrypted",xmlName:"x-ms-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},blobContentMD5:{serializedName:"x-ms-blob-content-md5",xmlName:"x-ms-blob-content-md5",type:{name:"ByteArray"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}},contentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}}}}},jN={serializedName:"Blob_queryExceptionHeaders",type:{name:"Composite",className:"BlobQueryExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},EN={serializedName:"Blob_getTagsHeaders",type:{name:"Composite",className:"BlobGetTagsHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},CN={serializedName:"Blob_getTagsExceptionHeaders",type:{name:"Composite",className:"BlobGetTagsExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},kN={serializedName:"Blob_setTagsHeaders",type:{name:"Composite",className:"BlobSetTagsHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},TN={serializedName:"Blob_setTagsExceptionHeaders",type:{name:"Composite",className:"BlobSetTagsExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},RN={serializedName:"PageBlob_createHeaders",type:{name:"Composite",className:"PageBlobCreateHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ON={serializedName:"PageBlob_createExceptionHeaders",type:{name:"Composite",className:"PageBlobCreateExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},PN={serializedName:"PageBlob_uploadPagesHeaders",type:{name:"Composite",className:"PageBlobUploadPagesHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},_N={serializedName:"PageBlob_uploadPagesExceptionHeaders",type:{name:"Composite",className:"PageBlobUploadPagesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},AN={serializedName:"PageBlob_clearPagesHeaders",type:{name:"Composite",className:"PageBlobClearPagesHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},IN={serializedName:"PageBlob_clearPagesExceptionHeaders",type:{name:"Composite",className:"PageBlobClearPagesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},MN={serializedName:"PageBlob_uploadPagesFromURLHeaders",type:{name:"Composite",className:"PageBlobUploadPagesFromURLHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},DN={serializedName:"PageBlob_uploadPagesFromURLExceptionHeaders",type:{name:"Composite",className:"PageBlobUploadPagesFromURLExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},zN={serializedName:"PageBlob_getPageRangesHeaders",type:{name:"Composite",className:"PageBlobGetPageRangesHeaders",modelProperties:{lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},blobContentLength:{serializedName:"x-ms-blob-content-length",xmlName:"x-ms-blob-content-length",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},BN={serializedName:"PageBlob_getPageRangesExceptionHeaders",type:{name:"Composite",className:"PageBlobGetPageRangesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},LN={serializedName:"PageBlob_getPageRangesDiffHeaders",type:{name:"Composite",className:"PageBlobGetPageRangesDiffHeaders",modelProperties:{lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},blobContentLength:{serializedName:"x-ms-blob-content-length",xmlName:"x-ms-blob-content-length",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},qN={serializedName:"PageBlob_getPageRangesDiffExceptionHeaders",type:{name:"Composite",className:"PageBlobGetPageRangesDiffExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},UN={serializedName:"PageBlob_resizeHeaders",type:{name:"Composite",className:"PageBlobResizeHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},HN={serializedName:"PageBlob_resizeExceptionHeaders",type:{name:"Composite",className:"PageBlobResizeExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},FN={serializedName:"PageBlob_updateSequenceNumberHeaders",type:{name:"Composite",className:"PageBlobUpdateSequenceNumberHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},$N={serializedName:"PageBlob_updateSequenceNumberExceptionHeaders",type:{name:"Composite",className:"PageBlobUpdateSequenceNumberExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},VN={serializedName:"PageBlob_copyIncrementalHeaders",type:{name:"Composite",className:"PageBlobCopyIncrementalHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},copyId:{serializedName:"x-ms-copy-id",xmlName:"x-ms-copy-id",type:{name:"String"}},copyStatus:{serializedName:"x-ms-copy-status",xmlName:"x-ms-copy-status",type:{name:"Enum",allowedValues:["pending","success","aborted","failed"]}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},GN={serializedName:"PageBlob_copyIncrementalExceptionHeaders",type:{name:"Composite",className:"PageBlobCopyIncrementalExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},WN={serializedName:"AppendBlob_createHeaders",type:{name:"Composite",className:"AppendBlobCreateHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},KN={serializedName:"AppendBlob_createExceptionHeaders",type:{name:"Composite",className:"AppendBlobCreateExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},XN={serializedName:"AppendBlob_appendBlockHeaders",type:{name:"Composite",className:"AppendBlobAppendBlockHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},blobAppendOffset:{serializedName:"x-ms-blob-append-offset",xmlName:"x-ms-blob-append-offset",type:{name:"String"}},blobCommittedBlockCount:{serializedName:"x-ms-blob-committed-block-count",xmlName:"x-ms-blob-committed-block-count",type:{name:"Number"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},QN={serializedName:"AppendBlob_appendBlockExceptionHeaders",type:{name:"Composite",className:"AppendBlobAppendBlockExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},YN={serializedName:"AppendBlob_appendBlockFromUrlHeaders",type:{name:"Composite",className:"AppendBlobAppendBlockFromUrlHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},blobAppendOffset:{serializedName:"x-ms-blob-append-offset",xmlName:"x-ms-blob-append-offset",type:{name:"String"}},blobCommittedBlockCount:{serializedName:"x-ms-blob-committed-block-count",xmlName:"x-ms-blob-committed-block-count",type:{name:"Number"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},JN={serializedName:"AppendBlob_appendBlockFromUrlExceptionHeaders",type:{name:"Composite",className:"AppendBlobAppendBlockFromUrlExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ZN={serializedName:"AppendBlob_sealHeaders",type:{name:"Composite",className:"AppendBlobSealHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isSealed:{serializedName:"x-ms-blob-sealed",xmlName:"x-ms-blob-sealed",type:{name:"Boolean"}}}}},ej={serializedName:"AppendBlob_sealExceptionHeaders",type:{name:"Composite",className:"AppendBlobSealExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},tj={serializedName:"BlockBlob_uploadHeaders",type:{name:"Composite",className:"BlockBlobUploadHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},rj={serializedName:"BlockBlob_uploadExceptionHeaders",type:{name:"Composite",className:"BlockBlobUploadExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},nj={serializedName:"BlockBlob_putBlobFromUrlHeaders",type:{name:"Composite",className:"BlockBlobPutBlobFromUrlHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ij={serializedName:"BlockBlob_putBlobFromUrlExceptionHeaders",type:{name:"Composite",className:"BlockBlobPutBlobFromUrlExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},oj={serializedName:"BlockBlob_stageBlockHeaders",type:{name:"Composite",className:"BlockBlobStageBlockHeaders",modelProperties:{contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},sj={serializedName:"BlockBlob_stageBlockExceptionHeaders",type:{name:"Composite",className:"BlockBlobStageBlockExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},aj={serializedName:"BlockBlob_stageBlockFromURLHeaders",type:{name:"Composite",className:"BlockBlobStageBlockFromURLHeaders",modelProperties:{contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},lj={serializedName:"BlockBlob_stageBlockFromURLExceptionHeaders",type:{name:"Composite",className:"BlockBlobStageBlockFromURLExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},cj={serializedName:"BlockBlob_commitBlockListHeaders",type:{name:"Composite",className:"BlockBlobCommitBlockListHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},uj={serializedName:"BlockBlob_commitBlockListExceptionHeaders",type:{name:"Composite",className:"BlockBlobCommitBlockListExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},pj={serializedName:"BlockBlob_getBlockListHeaders",type:{name:"Composite",className:"BlockBlobGetBlockListHeaders",modelProperties:{lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},contentType:{serializedName:"content-type",xmlName:"content-type",type:{name:"String"}},blobContentLength:{serializedName:"x-ms-blob-content-length",xmlName:"x-ms-blob-content-length",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},dj={serializedName:"BlockBlob_getBlockListExceptionHeaders",type:{name:"Composite",className:"BlockBlobGetBlockListExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},mj=Object.freeze(Object.defineProperty({__proto__:null,AccessPolicy:{serializedName:"AccessPolicy",type:{name:"Composite",className:"AccessPolicy",modelProperties:{startsOn:{serializedName:"Start",xmlName:"Start",type:{name:"String"}},expiresOn:{serializedName:"Expiry",xmlName:"Expiry",type:{name:"String"}},permissions:{serializedName:"Permission",xmlName:"Permission",type:{name:"String"}}}}},AppendBlobAppendBlockExceptionHeaders:QN,AppendBlobAppendBlockFromUrlExceptionHeaders:JN,AppendBlobAppendBlockFromUrlHeaders:YN,AppendBlobAppendBlockHeaders:XN,AppendBlobCreateExceptionHeaders:KN,AppendBlobCreateHeaders:WN,AppendBlobSealExceptionHeaders:ej,AppendBlobSealHeaders:ZN,ArrowConfiguration:{serializedName:"ArrowConfiguration",xmlName:"ArrowConfiguration",type:{name:"Composite",className:"ArrowConfiguration",modelProperties:{schema:{serializedName:"Schema",required:!0,xmlName:"Schema",xmlIsWrapped:!0,xmlElementName:"Field",type:{name:"Sequence",element:{type:{name:"Composite",className:"ArrowField"}}}}}}},ArrowField:{serializedName:"ArrowField",xmlName:"Field",type:{name:"Composite",className:"ArrowField",modelProperties:{type:{serializedName:"Type",required:!0,xmlName:"Type",type:{name:"String"}},name:{serializedName:"Name",xmlName:"Name",type:{name:"String"}},precision:{serializedName:"Precision",xmlName:"Precision",type:{name:"Number"}},scale:{serializedName:"Scale",xmlName:"Scale",type:{name:"Number"}}}}},BlobAbortCopyFromURLExceptionHeaders:bN,BlobAbortCopyFromURLHeaders:gN,BlobAcquireLeaseExceptionHeaders:rN,BlobAcquireLeaseHeaders:tN,BlobBreakLeaseExceptionHeaders:uN,BlobBreakLeaseHeaders:cN,BlobChangeLeaseExceptionHeaders:lN,BlobChangeLeaseHeaders:aN,BlobCopyFromURLExceptionHeaders:yN,BlobCopyFromURLHeaders:hN,BlobCreateSnapshotExceptionHeaders:dN,BlobCreateSnapshotHeaders:pN,BlobDeleteExceptionHeaders:qS,BlobDeleteHeaders:LS,BlobDeleteImmutabilityPolicyExceptionHeaders:QS,BlobDeleteImmutabilityPolicyHeaders:XS,BlobDownloadExceptionHeaders:DS,BlobDownloadHeaders:MS,BlobFlatListSegment:{serializedName:"BlobFlatListSegment",xmlName:"Blobs",type:{name:"Composite",className:"BlobFlatListSegment",modelProperties:{blobItems:{serializedName:"BlobItems",required:!0,xmlName:"BlobItems",xmlElementName:"Blob",type:{name:"Sequence",element:{type:{name:"Composite",className:"BlobItemInternal"}}}}}}},BlobGetAccountInfoExceptionHeaders:SN,BlobGetAccountInfoHeaders:wN,BlobGetPropertiesExceptionHeaders:BS,BlobGetPropertiesHeaders:zS,BlobGetTagsExceptionHeaders:CN,BlobGetTagsHeaders:EN,BlobHierarchyListSegment:{serializedName:"BlobHierarchyListSegment",xmlName:"Blobs",type:{name:"Composite",className:"BlobHierarchyListSegment",modelProperties:{blobPrefixes:{serializedName:"BlobPrefixes",xmlName:"BlobPrefixes",xmlElementName:"BlobPrefix",type:{name:"Sequence",element:{type:{name:"Composite",className:"BlobPrefix"}}}},blobItems:{serializedName:"BlobItems",required:!0,xmlName:"BlobItems",xmlElementName:"Blob",type:{name:"Sequence",element:{type:{name:"Composite",className:"BlobItemInternal"}}}}}}},BlobItemInternal:{serializedName:"BlobItemInternal",xmlName:"Blob",type:{name:"Composite",className:"BlobItemInternal",modelProperties:{name:{serializedName:"Name",xmlName:"Name",type:{name:"Composite",className:"BlobName"}},deleted:{serializedName:"Deleted",required:!0,xmlName:"Deleted",type:{name:"Boolean"}},snapshot:{serializedName:"Snapshot",required:!0,xmlName:"Snapshot",type:{name:"String"}},versionId:{serializedName:"VersionId",xmlName:"VersionId",type:{name:"String"}},isCurrentVersion:{serializedName:"IsCurrentVersion",xmlName:"IsCurrentVersion",type:{name:"Boolean"}},properties:{serializedName:"Properties",xmlName:"Properties",type:{name:"Composite",className:"BlobPropertiesInternal"}},metadata:{serializedName:"Metadata",xmlName:"Metadata",type:{name:"Dictionary",value:{type:{name:"String"}}}},blobTags:{serializedName:"BlobTags",xmlName:"Tags",type:{name:"Composite",className:"BlobTags"}},objectReplicationMetadata:{serializedName:"ObjectReplicationMetadata",xmlName:"OrMetadata",type:{name:"Dictionary",value:{type:{name:"String"}}}},hasVersionsOnly:{serializedName:"HasVersionsOnly",xmlName:"HasVersionsOnly",type:{name:"Boolean"}}}}},BlobName:{serializedName:"BlobName",type:{name:"Composite",className:"BlobName",modelProperties:{encoded:{serializedName:"Encoded",xmlName:"Encoded",xmlIsAttribute:!0,type:{name:"Boolean"}},content:{serializedName:"content",xmlName:"content",xmlIsMsText:!0,type:{name:"String"}}}}},BlobPrefix:{serializedName:"BlobPrefix",type:{name:"Composite",className:"BlobPrefix",modelProperties:{name:{serializedName:"Name",xmlName:"Name",type:{name:"Composite",className:"BlobName"}}}}},BlobPropertiesInternal:{serializedName:"BlobPropertiesInternal",xmlName:"Properties",type:{name:"Composite",className:"BlobPropertiesInternal",modelProperties:{createdOn:{serializedName:"Creation-Time",xmlName:"Creation-Time",type:{name:"DateTimeRfc1123"}},lastModified:{serializedName:"Last-Modified",required:!0,xmlName:"Last-Modified",type:{name:"DateTimeRfc1123"}},etag:{serializedName:"Etag",required:!0,xmlName:"Etag",type:{name:"String"}},contentLength:{serializedName:"Content-Length",xmlName:"Content-Length",type:{name:"Number"}},contentType:{serializedName:"Content-Type",xmlName:"Content-Type",type:{name:"String"}},contentEncoding:{serializedName:"Content-Encoding",xmlName:"Content-Encoding",type:{name:"String"}},contentLanguage:{serializedName:"Content-Language",xmlName:"Content-Language",type:{name:"String"}},contentMD5:{serializedName:"Content-MD5",xmlName:"Content-MD5",type:{name:"ByteArray"}},contentDisposition:{serializedName:"Content-Disposition",xmlName:"Content-Disposition",type:{name:"String"}},cacheControl:{serializedName:"Cache-Control",xmlName:"Cache-Control",type:{name:"String"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},blobType:{serializedName:"BlobType",xmlName:"BlobType",type:{name:"Enum",allowedValues:["BlockBlob","PageBlob","AppendBlob"]}},leaseStatus:{serializedName:"LeaseStatus",xmlName:"LeaseStatus",type:{name:"Enum",allowedValues:["locked","unlocked"]}},leaseState:{serializedName:"LeaseState",xmlName:"LeaseState",type:{name:"Enum",allowedValues:["available","leased","expired","breaking","broken"]}},leaseDuration:{serializedName:"LeaseDuration",xmlName:"LeaseDuration",type:{name:"Enum",allowedValues:["infinite","fixed"]}},copyId:{serializedName:"CopyId",xmlName:"CopyId",type:{name:"String"}},copyStatus:{serializedName:"CopyStatus",xmlName:"CopyStatus",type:{name:"Enum",allowedValues:["pending","success","aborted","failed"]}},copySource:{serializedName:"CopySource",xmlName:"CopySource",type:{name:"String"}},copyProgress:{serializedName:"CopyProgress",xmlName:"CopyProgress",type:{name:"String"}},copyCompletedOn:{serializedName:"CopyCompletionTime",xmlName:"CopyCompletionTime",type:{name:"DateTimeRfc1123"}},copyStatusDescription:{serializedName:"CopyStatusDescription",xmlName:"CopyStatusDescription",type:{name:"String"}},serverEncrypted:{serializedName:"ServerEncrypted",xmlName:"ServerEncrypted",type:{name:"Boolean"}},incrementalCopy:{serializedName:"IncrementalCopy",xmlName:"IncrementalCopy",type:{name:"Boolean"}},destinationSnapshot:{serializedName:"DestinationSnapshot",xmlName:"DestinationSnapshot",type:{name:"String"}},deletedOn:{serializedName:"DeletedTime",xmlName:"DeletedTime",type:{name:"DateTimeRfc1123"}},remainingRetentionDays:{serializedName:"RemainingRetentionDays",xmlName:"RemainingRetentionDays",type:{name:"Number"}},accessTier:{serializedName:"AccessTier",xmlName:"AccessTier",type:{name:"Enum",allowedValues:["P4","P6","P10","P15","P20","P30","P40","P50","P60","P70","P80","Hot","Cool","Archive","Cold"]}},accessTierInferred:{serializedName:"AccessTierInferred",xmlName:"AccessTierInferred",type:{name:"Boolean"}},archiveStatus:{serializedName:"ArchiveStatus",xmlName:"ArchiveStatus",type:{name:"Enum",allowedValues:["rehydrate-pending-to-hot","rehydrate-pending-to-cool","rehydrate-pending-to-cold"]}},customerProvidedKeySha256:{serializedName:"CustomerProvidedKeySha256",xmlName:"CustomerProvidedKeySha256",type:{name:"String"}},encryptionScope:{serializedName:"EncryptionScope",xmlName:"EncryptionScope",type:{name:"String"}},accessTierChangedOn:{serializedName:"AccessTierChangeTime",xmlName:"AccessTierChangeTime",type:{name:"DateTimeRfc1123"}},tagCount:{serializedName:"TagCount",xmlName:"TagCount",type:{name:"Number"}},expiresOn:{serializedName:"Expiry-Time",xmlName:"Expiry-Time",type:{name:"DateTimeRfc1123"}},isSealed:{serializedName:"Sealed",xmlName:"Sealed",type:{name:"Boolean"}},rehydratePriority:{serializedName:"RehydratePriority",xmlName:"RehydratePriority",type:{name:"Enum",allowedValues:["High","Standard"]}},lastAccessedOn:{serializedName:"LastAccessTime",xmlName:"LastAccessTime",type:{name:"DateTimeRfc1123"}},immutabilityPolicyExpiresOn:{serializedName:"ImmutabilityPolicyUntilDate",xmlName:"ImmutabilityPolicyUntilDate",type:{name:"DateTimeRfc1123"}},immutabilityPolicyMode:{serializedName:"ImmutabilityPolicyMode",xmlName:"ImmutabilityPolicyMode",type:{name:"Enum",allowedValues:["Mutable","Unlocked","Locked"]}},legalHold:{serializedName:"LegalHold",xmlName:"LegalHold",type:{name:"Boolean"}}}}},BlobQueryExceptionHeaders:jN,BlobQueryHeaders:NN,BlobReleaseLeaseExceptionHeaders:iN,BlobReleaseLeaseHeaders:nN,BlobRenewLeaseExceptionHeaders:sN,BlobRenewLeaseHeaders:oN,BlobServiceProperties:{serializedName:"BlobServiceProperties",xmlName:"StorageServiceProperties",type:{name:"Composite",className:"BlobServiceProperties",modelProperties:{blobAnalyticsLogging:{serializedName:"Logging",xmlName:"Logging",type:{name:"Composite",className:"Logging"}},hourMetrics:{serializedName:"HourMetrics",xmlName:"HourMetrics",type:{name:"Composite",className:"Metrics"}},minuteMetrics:{serializedName:"MinuteMetrics",xmlName:"MinuteMetrics",type:{name:"Composite",className:"Metrics"}},cors:{serializedName:"Cors",xmlName:"Cors",xmlIsWrapped:!0,xmlElementName:"CorsRule",type:{name:"Sequence",element:{type:{name:"Composite",className:"CorsRule"}}}},defaultServiceVersion:{serializedName:"DefaultServiceVersion",xmlName:"DefaultServiceVersion",type:{name:"String"}},deleteRetentionPolicy:{serializedName:"DeleteRetentionPolicy",xmlName:"DeleteRetentionPolicy",type:{name:"Composite",className:"RetentionPolicy"}},staticWebsite:{serializedName:"StaticWebsite",xmlName:"StaticWebsite",type:{name:"Composite",className:"StaticWebsite"}}}}},BlobServiceStatistics:{serializedName:"BlobServiceStatistics",xmlName:"StorageServiceStats",type:{name:"Composite",className:"BlobServiceStatistics",modelProperties:{geoReplication:{serializedName:"GeoReplication",xmlName:"GeoReplication",type:{name:"Composite",className:"GeoReplication"}}}}},BlobSetExpiryExceptionHeaders:$S,BlobSetExpiryHeaders:FS,BlobSetHttpHeadersExceptionHeaders:GS,BlobSetHttpHeadersHeaders:VS,BlobSetImmutabilityPolicyExceptionHeaders:KS,BlobSetImmutabilityPolicyHeaders:WS,BlobSetLegalHoldExceptionHeaders:JS,BlobSetLegalHoldHeaders:YS,BlobSetMetadataExceptionHeaders:eN,BlobSetMetadataHeaders:ZS,BlobSetTagsExceptionHeaders:TN,BlobSetTagsHeaders:kN,BlobSetTierExceptionHeaders:xN,BlobSetTierHeaders:vN,BlobStartCopyFromURLExceptionHeaders:fN,BlobStartCopyFromURLHeaders:mN,BlobTag:{serializedName:"BlobTag",xmlName:"Tag",type:{name:"Composite",className:"BlobTag",modelProperties:{key:{serializedName:"Key",required:!0,xmlName:"Key",type:{name:"String"}},value:{serializedName:"Value",required:!0,xmlName:"Value",type:{name:"String"}}}}},BlobTags:Gw,BlobUndeleteExceptionHeaders:HS,BlobUndeleteHeaders:US,Block:{serializedName:"Block",type:{name:"Composite",className:"Block",modelProperties:{name:{serializedName:"Name",required:!0,xmlName:"Name",type:{name:"String"}},size:{serializedName:"Size",required:!0,xmlName:"Size",type:{name:"Number"}}}}},BlockBlobCommitBlockListExceptionHeaders:uj,BlockBlobCommitBlockListHeaders:cj,BlockBlobGetBlockListExceptionHeaders:dj,BlockBlobGetBlockListHeaders:pj,BlockBlobPutBlobFromUrlExceptionHeaders:ij,BlockBlobPutBlobFromUrlHeaders:nj,BlockBlobStageBlockExceptionHeaders:sj,BlockBlobStageBlockFromURLExceptionHeaders:lj,BlockBlobStageBlockFromURLHeaders:aj,BlockBlobStageBlockHeaders:oj,BlockBlobUploadExceptionHeaders:rj,BlockBlobUploadHeaders:tj,BlockList:Qw,BlockLookupList:Xw,ClearRange:{serializedName:"ClearRange",xmlName:"ClearRange",type:{name:"Composite",className:"ClearRange",modelProperties:{start:{serializedName:"Start",required:!0,xmlName:"Start",type:{name:"Number"}},end:{serializedName:"End",required:!0,xmlName:"End",type:{name:"Number"}}}}},ContainerAcquireLeaseExceptionHeaders:xS,ContainerAcquireLeaseHeaders:vS,ContainerBreakLeaseExceptionHeaders:CS,ContainerBreakLeaseHeaders:ES,ContainerChangeLeaseExceptionHeaders:TS,ContainerChangeLeaseHeaders:kS,ContainerCreateExceptionHeaders:eS,ContainerCreateHeaders:Zw,ContainerDeleteExceptionHeaders:iS,ContainerDeleteHeaders:nS,ContainerFilterBlobsExceptionHeaders:bS,ContainerFilterBlobsHeaders:gS,ContainerGetAccessPolicyExceptionHeaders:lS,ContainerGetAccessPolicyHeaders:aS,ContainerGetAccountInfoExceptionHeaders:IS,ContainerGetAccountInfoHeaders:AS,ContainerGetPropertiesExceptionHeaders:rS,ContainerGetPropertiesHeaders:tS,ContainerItem:{serializedName:"ContainerItem",xmlName:"Container",type:{name:"Composite",className:"ContainerItem",modelProperties:{name:{serializedName:"Name",required:!0,xmlName:"Name",type:{name:"String"}},deleted:{serializedName:"Deleted",xmlName:"Deleted",type:{name:"Boolean"}},version:{serializedName:"Version",xmlName:"Version",type:{name:"String"}},properties:{serializedName:"Properties",xmlName:"Properties",type:{name:"Composite",className:"ContainerProperties"}},metadata:{serializedName:"Metadata",xmlName:"Metadata",type:{name:"Dictionary",value:{type:{name:"String"}}}}}}},ContainerListBlobFlatSegmentExceptionHeaders:OS,ContainerListBlobFlatSegmentHeaders:RS,ContainerListBlobHierarchySegmentExceptionHeaders:_S,ContainerListBlobHierarchySegmentHeaders:PS,ContainerProperties:{serializedName:"ContainerProperties",type:{name:"Composite",className:"ContainerProperties",modelProperties:{lastModified:{serializedName:"Last-Modified",required:!0,xmlName:"Last-Modified",type:{name:"DateTimeRfc1123"}},etag:{serializedName:"Etag",required:!0,xmlName:"Etag",type:{name:"String"}},leaseStatus:{serializedName:"LeaseStatus",xmlName:"LeaseStatus",type:{name:"Enum",allowedValues:["locked","unlocked"]}},leaseState:{serializedName:"LeaseState",xmlName:"LeaseState",type:{name:"Enum",allowedValues:["available","leased","expired","breaking","broken"]}},leaseDuration:{serializedName:"LeaseDuration",xmlName:"LeaseDuration",type:{name:"Enum",allowedValues:["infinite","fixed"]}},publicAccess:{serializedName:"PublicAccess",xmlName:"PublicAccess",type:{name:"Enum",allowedValues:["container","blob"]}},hasImmutabilityPolicy:{serializedName:"HasImmutabilityPolicy",xmlName:"HasImmutabilityPolicy",type:{name:"Boolean"}},hasLegalHold:{serializedName:"HasLegalHold",xmlName:"HasLegalHold",type:{name:"Boolean"}},defaultEncryptionScope:{serializedName:"DefaultEncryptionScope",xmlName:"DefaultEncryptionScope",type:{name:"String"}},preventEncryptionScopeOverride:{serializedName:"DenyEncryptionScopeOverride",xmlName:"DenyEncryptionScopeOverride",type:{name:"Boolean"}},deletedOn:{serializedName:"DeletedTime",xmlName:"DeletedTime",type:{name:"DateTimeRfc1123"}},remainingRetentionDays:{serializedName:"RemainingRetentionDays",xmlName:"RemainingRetentionDays",type:{name:"Number"}},isImmutableStorageWithVersioningEnabled:{serializedName:"ImmutableStorageWithVersioningEnabled",xmlName:"ImmutableStorageWithVersioningEnabled",type:{name:"Boolean"}}}}},ContainerReleaseLeaseExceptionHeaders:SS,ContainerReleaseLeaseHeaders:wS,ContainerRenameExceptionHeaders:fS,ContainerRenameHeaders:mS,ContainerRenewLeaseExceptionHeaders:jS,ContainerRenewLeaseHeaders:NS,ContainerRestoreExceptionHeaders:dS,ContainerRestoreHeaders:pS,ContainerSetAccessPolicyExceptionHeaders:uS,ContainerSetAccessPolicyHeaders:cS,ContainerSetMetadataExceptionHeaders:sS,ContainerSetMetadataHeaders:oS,ContainerSubmitBatchExceptionHeaders:yS,ContainerSubmitBatchHeaders:hS,CorsRule:{serializedName:"CorsRule",type:{name:"Composite",className:"CorsRule",modelProperties:{allowedOrigins:{serializedName:"AllowedOrigins",required:!0,xmlName:"AllowedOrigins",type:{name:"String"}},allowedMethods:{serializedName:"AllowedMethods",required:!0,xmlName:"AllowedMethods",type:{name:"String"}},allowedHeaders:{serializedName:"AllowedHeaders",required:!0,xmlName:"AllowedHeaders",type:{name:"String"}},exposedHeaders:{serializedName:"ExposedHeaders",required:!0,xmlName:"ExposedHeaders",type:{name:"String"}},maxAgeInSeconds:{constraints:{InclusiveMinimum:0},serializedName:"MaxAgeInSeconds",required:!0,xmlName:"MaxAgeInSeconds",type:{name:"Number"}}}}},DelimitedTextConfiguration:{serializedName:"DelimitedTextConfiguration",xmlName:"DelimitedTextConfiguration",type:{name:"Composite",className:"DelimitedTextConfiguration",modelProperties:{columnSeparator:{serializedName:"ColumnSeparator",xmlName:"ColumnSeparator",type:{name:"String"}},fieldQuote:{serializedName:"FieldQuote",xmlName:"FieldQuote",type:{name:"String"}},recordSeparator:{serializedName:"RecordSeparator",xmlName:"RecordSeparator",type:{name:"String"}},escapeChar:{serializedName:"EscapeChar",xmlName:"EscapeChar",type:{name:"String"}},headersPresent:{serializedName:"HeadersPresent",xmlName:"HasHeaders",type:{name:"Boolean"}}}}},FilterBlobItem:{serializedName:"FilterBlobItem",xmlName:"Blob",type:{name:"Composite",className:"FilterBlobItem",modelProperties:{name:{serializedName:"Name",required:!0,xmlName:"Name",type:{name:"String"}},containerName:{serializedName:"ContainerName",required:!0,xmlName:"ContainerName",type:{name:"String"}},tags:{serializedName:"Tags",xmlName:"Tags",type:{name:"Composite",className:"BlobTags"}}}}},FilterBlobSegment:Vw,GeoReplication:{serializedName:"GeoReplication",type:{name:"Composite",className:"GeoReplication",modelProperties:{status:{serializedName:"Status",required:!0,xmlName:"Status",type:{name:"Enum",allowedValues:["live","bootstrap","unavailable"]}},lastSyncOn:{serializedName:"LastSyncTime",required:!0,xmlName:"LastSyncTime",type:{name:"DateTimeRfc1123"}}}}},JsonTextConfiguration:{serializedName:"JsonTextConfiguration",xmlName:"JsonTextConfiguration",type:{name:"Composite",className:"JsonTextConfiguration",modelProperties:{recordSeparator:{serializedName:"RecordSeparator",xmlName:"RecordSeparator",type:{name:"String"}}}}},KeyInfo:{serializedName:"KeyInfo",type:{name:"Composite",className:"KeyInfo",modelProperties:{startsOn:{serializedName:"Start",required:!0,xmlName:"Start",type:{name:"String"}},expiresOn:{serializedName:"Expiry",required:!0,xmlName:"Expiry",type:{name:"String"}}}}},ListBlobsFlatSegmentResponse:Ww,ListBlobsHierarchySegmentResponse:Kw,ListContainersSegmentResponse:{serializedName:"ListContainersSegmentResponse",xmlName:"EnumerationResults",type:{name:"Composite",className:"ListContainersSegmentResponse",modelProperties:{serviceEndpoint:{serializedName:"ServiceEndpoint",required:!0,xmlName:"ServiceEndpoint",xmlIsAttribute:!0,type:{name:"String"}},prefix:{serializedName:"Prefix",xmlName:"Prefix",type:{name:"String"}},marker:{serializedName:"Marker",xmlName:"Marker",type:{name:"String"}},maxPageSize:{serializedName:"MaxResults",xmlName:"MaxResults",type:{name:"Number"}},containerItems:{serializedName:"ContainerItems",required:!0,xmlName:"Containers",xmlIsWrapped:!0,xmlElementName:"Container",type:{name:"Sequence",element:{type:{name:"Composite",className:"ContainerItem"}}}},continuationToken:{serializedName:"NextMarker",xmlName:"NextMarker",type:{name:"String"}}}}},Logging:{serializedName:"Logging",type:{name:"Composite",className:"Logging",modelProperties:{version:{serializedName:"Version",required:!0,xmlName:"Version",type:{name:"String"}},deleteProperty:{serializedName:"Delete",required:!0,xmlName:"Delete",type:{name:"Boolean"}},read:{serializedName:"Read",required:!0,xmlName:"Read",type:{name:"Boolean"}},write:{serializedName:"Write",required:!0,xmlName:"Write",type:{name:"Boolean"}},retentionPolicy:{serializedName:"RetentionPolicy",xmlName:"RetentionPolicy",type:{name:"Composite",className:"RetentionPolicy"}}}}},Metrics:{serializedName:"Metrics",type:{name:"Composite",className:"Metrics",modelProperties:{version:{serializedName:"Version",xmlName:"Version",type:{name:"String"}},enabled:{serializedName:"Enabled",required:!0,xmlName:"Enabled",type:{name:"Boolean"}},includeAPIs:{serializedName:"IncludeAPIs",xmlName:"IncludeAPIs",type:{name:"Boolean"}},retentionPolicy:{serializedName:"RetentionPolicy",xmlName:"RetentionPolicy",type:{name:"Composite",className:"RetentionPolicy"}}}}},PageBlobClearPagesExceptionHeaders:IN,PageBlobClearPagesHeaders:AN,PageBlobCopyIncrementalExceptionHeaders:GN,PageBlobCopyIncrementalHeaders:VN,PageBlobCreateExceptionHeaders:ON,PageBlobCreateHeaders:RN,PageBlobGetPageRangesDiffExceptionHeaders:qN,PageBlobGetPageRangesDiffHeaders:LN,PageBlobGetPageRangesExceptionHeaders:BN,PageBlobGetPageRangesHeaders:zN,PageBlobResizeExceptionHeaders:HN,PageBlobResizeHeaders:UN,PageBlobUpdateSequenceNumberExceptionHeaders:$N,PageBlobUpdateSequenceNumberHeaders:FN,PageBlobUploadPagesExceptionHeaders:_N,PageBlobUploadPagesFromURLExceptionHeaders:DN,PageBlobUploadPagesFromURLHeaders:MN,PageBlobUploadPagesHeaders:PN,PageList:Yw,PageRange:{serializedName:"PageRange",xmlName:"PageRange",type:{name:"Composite",className:"PageRange",modelProperties:{start:{serializedName:"Start",required:!0,xmlName:"Start",type:{name:"Number"}},end:{serializedName:"End",required:!0,xmlName:"End",type:{name:"Number"}}}}},QueryFormat:{serializedName:"QueryFormat",type:{name:"Composite",className:"QueryFormat",modelProperties:{type:{serializedName:"Type",required:!0,xmlName:"Type",type:{name:"Enum",allowedValues:["delimited","json","arrow","parquet"]}},delimitedTextConfiguration:{serializedName:"DelimitedTextConfiguration",xmlName:"DelimitedTextConfiguration",type:{name:"Composite",className:"DelimitedTextConfiguration"}},jsonTextConfiguration:{serializedName:"JsonTextConfiguration",xmlName:"JsonTextConfiguration",type:{name:"Composite",className:"JsonTextConfiguration"}},arrowConfiguration:{serializedName:"ArrowConfiguration",xmlName:"ArrowConfiguration",type:{name:"Composite",className:"ArrowConfiguration"}},parquetTextConfiguration:{serializedName:"ParquetTextConfiguration",xmlName:"ParquetTextConfiguration",type:{name:"any"}}}}},QueryRequest:Jw,QuerySerialization:{serializedName:"QuerySerialization",type:{name:"Composite",className:"QuerySerialization",modelProperties:{format:{serializedName:"Format",xmlName:"Format",type:{name:"Composite",className:"QueryFormat"}}}}},RetentionPolicy:{serializedName:"RetentionPolicy",type:{name:"Composite",className:"RetentionPolicy",modelProperties:{enabled:{serializedName:"Enabled",required:!0,xmlName:"Enabled",type:{name:"Boolean"}},days:{constraints:{InclusiveMinimum:1},serializedName:"Days",xmlName:"Days",type:{name:"Number"}}}}},ServiceFilterBlobsExceptionHeaders:{serializedName:"Service_filterBlobsExceptionHeaders",type:{name:"Composite",className:"ServiceFilterBlobsExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ServiceFilterBlobsHeaders:{serializedName:"Service_filterBlobsHeaders",type:{name:"Composite",className:"ServiceFilterBlobsHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ServiceGetAccountInfoExceptionHeaders:{serializedName:"Service_getAccountInfoExceptionHeaders",type:{name:"Composite",className:"ServiceGetAccountInfoExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ServiceGetAccountInfoHeaders:{serializedName:"Service_getAccountInfoHeaders",type:{name:"Composite",className:"ServiceGetAccountInfoHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},skuName:{serializedName:"x-ms-sku-name",xmlName:"x-ms-sku-name",type:{name:"Enum",allowedValues:["Standard_LRS","Standard_GRS","Standard_RAGRS","Standard_ZRS","Premium_LRS"]}},accountKind:{serializedName:"x-ms-account-kind",xmlName:"x-ms-account-kind",type:{name:"Enum",allowedValues:["Storage","BlobStorage","StorageV2","FileStorage","BlockBlobStorage"]}},isHierarchicalNamespaceEnabled:{serializedName:"x-ms-is-hns-enabled",xmlName:"x-ms-is-hns-enabled",type:{name:"Boolean"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ServiceGetPropertiesExceptionHeaders:{serializedName:"Service_getPropertiesExceptionHeaders",type:{name:"Composite",className:"ServiceGetPropertiesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ServiceGetPropertiesHeaders:{serializedName:"Service_getPropertiesHeaders",type:{name:"Composite",className:"ServiceGetPropertiesHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ServiceGetStatisticsExceptionHeaders:{serializedName:"Service_getStatisticsExceptionHeaders",type:{name:"Composite",className:"ServiceGetStatisticsExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ServiceGetStatisticsHeaders:{serializedName:"Service_getStatisticsHeaders",type:{name:"Composite",className:"ServiceGetStatisticsHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ServiceGetUserDelegationKeyExceptionHeaders:{serializedName:"Service_getUserDelegationKeyExceptionHeaders",type:{name:"Composite",className:"ServiceGetUserDelegationKeyExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ServiceGetUserDelegationKeyHeaders:{serializedName:"Service_getUserDelegationKeyHeaders",type:{name:"Composite",className:"ServiceGetUserDelegationKeyHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ServiceListContainersSegmentExceptionHeaders:{serializedName:"Service_listContainersSegmentExceptionHeaders",type:{name:"Composite",className:"ServiceListContainersSegmentExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ServiceListContainersSegmentHeaders:{serializedName:"Service_listContainersSegmentHeaders",type:{name:"Composite",className:"ServiceListContainersSegmentHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ServiceSetPropertiesExceptionHeaders:{serializedName:"Service_setPropertiesExceptionHeaders",type:{name:"Composite",className:"ServiceSetPropertiesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ServiceSetPropertiesHeaders:{serializedName:"Service_setPropertiesHeaders",type:{name:"Composite",className:"ServiceSetPropertiesHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ServiceSubmitBatchExceptionHeaders:{serializedName:"Service_submitBatchExceptionHeaders",type:{name:"Composite",className:"ServiceSubmitBatchExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ServiceSubmitBatchHeaders:{serializedName:"Service_submitBatchHeaders",type:{name:"Composite",className:"ServiceSubmitBatchHeaders",modelProperties:{contentType:{serializedName:"content-type",xmlName:"content-type",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},SignedIdentifier:{serializedName:"SignedIdentifier",xmlName:"SignedIdentifier",type:{name:"Composite",className:"SignedIdentifier",modelProperties:{id:{serializedName:"Id",required:!0,xmlName:"Id",type:{name:"String"}},accessPolicy:{serializedName:"AccessPolicy",xmlName:"AccessPolicy",type:{name:"Composite",className:"AccessPolicy"}}}}},StaticWebsite:{serializedName:"StaticWebsite",type:{name:"Composite",className:"StaticWebsite",modelProperties:{enabled:{serializedName:"Enabled",required:!0,xmlName:"Enabled",type:{name:"Boolean"}},indexDocument:{serializedName:"IndexDocument",xmlName:"IndexDocument",type:{name:"String"}},errorDocument404Path:{serializedName:"ErrorDocument404Path",xmlName:"ErrorDocument404Path",type:{name:"String"}},defaultIndexDocumentPath:{serializedName:"DefaultIndexDocumentPath",xmlName:"DefaultIndexDocumentPath",type:{name:"String"}}}}},StorageError:$w,UserDelegationKey:{serializedName:"UserDelegationKey",type:{name:"Composite",className:"UserDelegationKey",modelProperties:{signedObjectId:{serializedName:"SignedOid",required:!0,xmlName:"SignedOid",type:{name:"String"}},signedTenantId:{serializedName:"SignedTid",required:!0,xmlName:"SignedTid",type:{name:"String"}},signedStartsOn:{serializedName:"SignedStart",required:!0,xmlName:"SignedStart",type:{name:"String"}},signedExpiresOn:{serializedName:"SignedExpiry",required:!0,xmlName:"SignedExpiry",type:{name:"String"}},signedService:{serializedName:"SignedService",required:!0,xmlName:"SignedService",type:{name:"String"}},signedVersion:{serializedName:"SignedVersion",required:!0,xmlName:"SignedVersion",type:{name:"String"}},value:{serializedName:"Value",required:!0,xmlName:"Value",type:{name:"String"}}}}}},Symbol.toStringTag,{value:"Module"})),fj={parameterPath:["options","contentType"],mapper:{defaultValue:"application/xml",isConstant:!0,serializedName:"Content-Type",type:{name:"String"}}},hj={parameterPath:"accept",mapper:{defaultValue:"application/xml",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},yj={parameterPath:"url",mapper:{serializedName:"url",required:!0,xmlName:"url",type:{name:"String"}},skipEncoding:!0},gj={parameterPath:"comp",mapper:{defaultValue:"properties",isConstant:!0,serializedName:"comp",type:{name:"String"}}},bj={parameterPath:["options","timeoutInSeconds"],mapper:{constraints:{InclusiveMinimum:0},serializedName:"timeout",xmlName:"timeout",type:{name:"Number"}}},vj={parameterPath:"version",mapper:{defaultValue:"2023-11-03",isConstant:!0,serializedName:"x-ms-version",type:{name:"String"}}},xj={parameterPath:["options","requestId"],mapper:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}}},wj={parameterPath:"accept",mapper:{defaultValue:"application/xml",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},Sj={parameterPath:"comp",mapper:{defaultValue:"list",isConstant:!0,serializedName:"comp",type:{name:"String"}}},Nj={parameterPath:["options","prefix"],mapper:{serializedName:"prefix",xmlName:"prefix",type:{name:"String"}}},jj={parameterPath:["options","marker"],mapper:{serializedName:"marker",xmlName:"marker",type:{name:"String"}}},Ej={parameterPath:["options","maxPageSize"],mapper:{constraints:{InclusiveMinimum:1},serializedName:"maxresults",xmlName:"maxresults",type:{name:"Number"}}};Lv.Csv;const Cj={parameterPath:"restype",mapper:{defaultValue:"account",isConstant:!0,serializedName:"restype",type:{name:"String"}}},kj={parameterPath:"contentLength",mapper:{serializedName:"Content-Length",required:!0,xmlName:"Content-Length",type:{name:"Number"}}},Tj={parameterPath:"restype",mapper:{defaultValue:"container",isConstant:!0,serializedName:"restype",type:{name:"String"}}},Rj={parameterPath:["options","metadata"],mapper:{serializedName:"x-ms-meta",xmlName:"x-ms-meta",type:{name:"Dictionary",value:{type:{name:"String"}}},headerCollectionPrefix:"x-ms-meta-"}},Oj={parameterPath:["options","access"],mapper:{serializedName:"x-ms-blob-public-access",xmlName:"x-ms-blob-public-access",type:{name:"Enum",allowedValues:["container","blob"]}}},Pj={parameterPath:["options","leaseAccessConditions","leaseId"],mapper:{serializedName:"x-ms-lease-id",xmlName:"x-ms-lease-id",type:{name:"String"}}},_j={parameterPath:["options","modifiedAccessConditions","ifModifiedSince"],mapper:{serializedName:"If-Modified-Since",xmlName:"If-Modified-Since",type:{name:"DateTimeRfc1123"}}},Aj={parameterPath:["options","modifiedAccessConditions","ifUnmodifiedSince"],mapper:{serializedName:"If-Unmodified-Since",xmlName:"If-Unmodified-Since",type:{name:"DateTimeRfc1123"}}},Ij={parameterPath:"comp",mapper:{defaultValue:"metadata",isConstant:!0,serializedName:"comp",type:{name:"String"}}},Mj={parameterPath:"comp",mapper:{defaultValue:"acl",isConstant:!0,serializedName:"comp",type:{name:"String"}}},Dj={parameterPath:"comp",mapper:{defaultValue:"undelete",isConstant:!0,serializedName:"comp",type:{name:"String"}}},zj={parameterPath:"comp",mapper:{defaultValue:"lease",isConstant:!0,serializedName:"comp",type:{name:"String"}}},Bj={parameterPath:"action",mapper:{defaultValue:"acquire",isConstant:!0,serializedName:"x-ms-lease-action",type:{name:"String"}}},Lj={parameterPath:["options","duration"],mapper:{serializedName:"x-ms-lease-duration",xmlName:"x-ms-lease-duration",type:{name:"Number"}}},qj={parameterPath:["options","proposedLeaseId"],mapper:{serializedName:"x-ms-proposed-lease-id",xmlName:"x-ms-proposed-lease-id",type:{name:"String"}}},Uj={parameterPath:"action",mapper:{defaultValue:"release",isConstant:!0,serializedName:"x-ms-lease-action",type:{name:"String"}}},Hj={parameterPath:"leaseId",mapper:{serializedName:"x-ms-lease-id",required:!0,xmlName:"x-ms-lease-id",type:{name:"String"}}},Fj={parameterPath:"action",mapper:{defaultValue:"renew",isConstant:!0,serializedName:"x-ms-lease-action",type:{name:"String"}}},$j={parameterPath:"action",mapper:{defaultValue:"break",isConstant:!0,serializedName:"x-ms-lease-action",type:{name:"String"}}},Vj={parameterPath:["options","breakPeriod"],mapper:{serializedName:"x-ms-lease-break-period",xmlName:"x-ms-lease-break-period",type:{name:"Number"}}},Gj={parameterPath:"action",mapper:{defaultValue:"change",isConstant:!0,serializedName:"x-ms-lease-action",type:{name:"String"}}},Wj={parameterPath:"proposedLeaseId",mapper:{serializedName:"x-ms-proposed-lease-id",required:!0,xmlName:"x-ms-proposed-lease-id",type:{name:"String"}}},Kj={parameterPath:["options","include"],mapper:{serializedName:"include",xmlName:"include",xmlElementName:"ListBlobsIncludeItem",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["copy","deleted","metadata","snapshots","uncommittedblobs","versions","tags","immutabilitypolicy","legalhold","deletedwithversions"]}}}},collectionFormat:Lv.Csv},Xj={parameterPath:["options","snapshot"],mapper:{serializedName:"snapshot",xmlName:"snapshot",type:{name:"String"}}},Qj={parameterPath:["options","versionId"],mapper:{serializedName:"versionid",xmlName:"versionid",type:{name:"String"}}},Yj={parameterPath:["options","range"],mapper:{serializedName:"x-ms-range",xmlName:"x-ms-range",type:{name:"String"}}},Jj={parameterPath:["options","cpkInfo","encryptionKey"],mapper:{serializedName:"x-ms-encryption-key",xmlName:"x-ms-encryption-key",type:{name:"String"}}},Zj={parameterPath:["options","cpkInfo","encryptionKeySha256"],mapper:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}}},eE={parameterPath:["options","cpkInfo","encryptionAlgorithm"],mapper:{serializedName:"x-ms-encryption-algorithm",xmlName:"x-ms-encryption-algorithm",type:{name:"String"}}},tE={parameterPath:["options","modifiedAccessConditions","ifMatch"],mapper:{serializedName:"If-Match",xmlName:"If-Match",type:{name:"String"}}},rE={parameterPath:["options","modifiedAccessConditions","ifNoneMatch"],mapper:{serializedName:"If-None-Match",xmlName:"If-None-Match",type:{name:"String"}}},nE={parameterPath:["options","modifiedAccessConditions","ifTags"],mapper:{serializedName:"x-ms-if-tags",xmlName:"x-ms-if-tags",type:{name:"String"}}},iE={parameterPath:["options","blobHttpHeaders","blobCacheControl"],mapper:{serializedName:"x-ms-blob-cache-control",xmlName:"x-ms-blob-cache-control",type:{name:"String"}}},oE={parameterPath:["options","blobHttpHeaders","blobContentType"],mapper:{serializedName:"x-ms-blob-content-type",xmlName:"x-ms-blob-content-type",type:{name:"String"}}},sE={parameterPath:["options","blobHttpHeaders","blobContentMD5"],mapper:{serializedName:"x-ms-blob-content-md5",xmlName:"x-ms-blob-content-md5",type:{name:"ByteArray"}}},aE={parameterPath:["options","blobHttpHeaders","blobContentEncoding"],mapper:{serializedName:"x-ms-blob-content-encoding",xmlName:"x-ms-blob-content-encoding",type:{name:"String"}}},lE={parameterPath:["options","blobHttpHeaders","blobContentLanguage"],mapper:{serializedName:"x-ms-blob-content-language",xmlName:"x-ms-blob-content-language",type:{name:"String"}}},cE={parameterPath:["options","blobHttpHeaders","blobContentDisposition"],mapper:{serializedName:"x-ms-blob-content-disposition",xmlName:"x-ms-blob-content-disposition",type:{name:"String"}}},uE={parameterPath:"comp",mapper:{defaultValue:"immutabilityPolicies",isConstant:!0,serializedName:"comp",type:{name:"String"}}},pE={parameterPath:["options","immutabilityPolicyExpiry"],mapper:{serializedName:"x-ms-immutability-policy-until-date",xmlName:"x-ms-immutability-policy-until-date",type:{name:"DateTimeRfc1123"}}},dE={parameterPath:["options","immutabilityPolicyMode"],mapper:{serializedName:"x-ms-immutability-policy-mode",xmlName:"x-ms-immutability-policy-mode",type:{name:"Enum",allowedValues:["Mutable","Unlocked","Locked"]}}},mE={parameterPath:["options","encryptionScope"],mapper:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}}},fE={parameterPath:["options","tier"],mapper:{serializedName:"x-ms-access-tier",xmlName:"x-ms-access-tier",type:{name:"Enum",allowedValues:["P4","P6","P10","P15","P20","P30","P40","P50","P60","P70","P80","Hot","Cool","Archive","Cold"]}}},hE={parameterPath:["options","rehydratePriority"],mapper:{serializedName:"x-ms-rehydrate-priority",xmlName:"x-ms-rehydrate-priority",type:{name:"Enum",allowedValues:["High","Standard"]}}},yE={parameterPath:["options","sourceModifiedAccessConditions","sourceIfModifiedSince"],mapper:{serializedName:"x-ms-source-if-modified-since",xmlName:"x-ms-source-if-modified-since",type:{name:"DateTimeRfc1123"}}},gE={parameterPath:["options","sourceModifiedAccessConditions","sourceIfUnmodifiedSince"],mapper:{serializedName:"x-ms-source-if-unmodified-since",xmlName:"x-ms-source-if-unmodified-since",type:{name:"DateTimeRfc1123"}}},bE={parameterPath:["options","sourceModifiedAccessConditions","sourceIfMatch"],mapper:{serializedName:"x-ms-source-if-match",xmlName:"x-ms-source-if-match",type:{name:"String"}}},vE={parameterPath:["options","sourceModifiedAccessConditions","sourceIfNoneMatch"],mapper:{serializedName:"x-ms-source-if-none-match",xmlName:"x-ms-source-if-none-match",type:{name:"String"}}},xE={parameterPath:["options","sourceModifiedAccessConditions","sourceIfTags"],mapper:{serializedName:"x-ms-source-if-tags",xmlName:"x-ms-source-if-tags",type:{name:"String"}}},wE={parameterPath:"copySource",mapper:{serializedName:"x-ms-copy-source",required:!0,xmlName:"x-ms-copy-source",type:{name:"String"}}},SE={parameterPath:["options","blobTagsString"],mapper:{serializedName:"x-ms-tags",xmlName:"x-ms-tags",type:{name:"String"}}},NE={parameterPath:["options","legalHold"],mapper:{serializedName:"x-ms-legal-hold",xmlName:"x-ms-legal-hold",type:{name:"Boolean"}}},jE={parameterPath:["options","sourceContentMD5"],mapper:{serializedName:"x-ms-source-content-md5",xmlName:"x-ms-source-content-md5",type:{name:"ByteArray"}}},EE={parameterPath:["options","copySourceAuthorization"],mapper:{serializedName:"x-ms-copy-source-authorization",xmlName:"x-ms-copy-source-authorization",type:{name:"String"}}},CE={parameterPath:["options","copySourceTags"],mapper:{serializedName:"x-ms-copy-source-tag-option",xmlName:"x-ms-copy-source-tag-option",type:{name:"Enum",allowedValues:["REPLACE","COPY"]}}},kE={parameterPath:["options","queryRequest"],mapper:Jw},TE={parameterPath:"comp",mapper:{defaultValue:"tags",isConstant:!0,serializedName:"comp",type:{name:"String"}}},RE={parameterPath:["options","tags"],mapper:Gw},OE={parameterPath:["options","transactionalContentMD5"],mapper:{serializedName:"Content-MD5",xmlName:"Content-MD5",type:{name:"ByteArray"}}},PE={parameterPath:["options","transactionalContentCrc64"],mapper:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}}},_E={parameterPath:"blobContentLength",mapper:{serializedName:"x-ms-blob-content-length",required:!0,xmlName:"x-ms-blob-content-length",type:{name:"Number"}}},AE={parameterPath:["options","blobSequenceNumber"],mapper:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}}},IE={parameterPath:["options","contentType"],mapper:{defaultValue:"application/octet-stream",isConstant:!0,serializedName:"Content-Type",type:{name:"String"}}},ME={parameterPath:"body",mapper:{serializedName:"body",required:!0,xmlName:"body",type:{name:"Stream"}}},DE={parameterPath:"accept",mapper:{defaultValue:"application/xml",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},zE={parameterPath:"comp",mapper:{defaultValue:"page",isConstant:!0,serializedName:"comp",type:{name:"String"}}},BE={parameterPath:"pageWrite",mapper:{defaultValue:"update",isConstant:!0,serializedName:"x-ms-page-write",type:{name:"String"}}},LE={parameterPath:["options","sequenceNumberAccessConditions","ifSequenceNumberLessThanOrEqualTo"],mapper:{serializedName:"x-ms-if-sequence-number-le",xmlName:"x-ms-if-sequence-number-le",type:{name:"Number"}}},qE={parameterPath:["options","sequenceNumberAccessConditions","ifSequenceNumberLessThan"],mapper:{serializedName:"x-ms-if-sequence-number-lt",xmlName:"x-ms-if-sequence-number-lt",type:{name:"Number"}}},UE={parameterPath:["options","sequenceNumberAccessConditions","ifSequenceNumberEqualTo"],mapper:{serializedName:"x-ms-if-sequence-number-eq",xmlName:"x-ms-if-sequence-number-eq",type:{name:"Number"}}},HE={parameterPath:"sourceUrl",mapper:{serializedName:"x-ms-copy-source",required:!0,xmlName:"x-ms-copy-source",type:{name:"String"}}},FE={parameterPath:["options","sourceContentCrc64"],mapper:{serializedName:"x-ms-source-content-crc64",xmlName:"x-ms-source-content-crc64",type:{name:"ByteArray"}}},$E={parameterPath:"comp",mapper:{defaultValue:"pagelist",isConstant:!0,serializedName:"comp",type:{name:"String"}}},VE={parameterPath:"comp",mapper:{defaultValue:"appendblock",isConstant:!0,serializedName:"comp",type:{name:"String"}}},GE={parameterPath:["options","appendPositionAccessConditions","maxSize"],mapper:{serializedName:"x-ms-blob-condition-maxsize",xmlName:"x-ms-blob-condition-maxsize",type:{name:"Number"}}},WE={parameterPath:["options","appendPositionAccessConditions","appendPosition"],mapper:{serializedName:"x-ms-blob-condition-appendpos",xmlName:"x-ms-blob-condition-appendpos",type:{name:"Number"}}},KE={parameterPath:["options","sourceRange"],mapper:{serializedName:"x-ms-source-range",xmlName:"x-ms-source-range",type:{name:"String"}}},XE={parameterPath:"blobType",mapper:{defaultValue:"BlockBlob",isConstant:!0,serializedName:"x-ms-blob-type",type:{name:"String"}}},QE={parameterPath:"comp",mapper:{defaultValue:"block",isConstant:!0,serializedName:"comp",type:{name:"String"}}},YE={parameterPath:"blockId",mapper:{serializedName:"blockid",required:!0,xmlName:"blockid",type:{name:"String"}}},JE={parameterPath:"blocks",mapper:Xw},ZE={parameterPath:"comp",mapper:{defaultValue:"blocklist",isConstant:!0,serializedName:"comp",type:{name:"String"}}};class eC{constructor(e){this.client=e}create(e){const t={options:Rb(e||{})};return this.client.sendOperationRequest(t,rC)}getProperties(e){const t={options:Rb(e||{})};return this.client.sendOperationRequest(t,nC)}delete(e){const t={options:Rb(e||{})};return this.client.sendOperationRequest(t,iC)}setMetadata(e){const t={options:Rb(e||{})};return this.client.sendOperationRequest(t,oC)}getAccessPolicy(e){const t={options:Rb(e||{})};return this.client.sendOperationRequest(t,sC)}setAccessPolicy(e){const t={options:Rb(e||{})};return this.client.sendOperationRequest(t,aC)}restore(e){const t={options:Rb(e||{})};return this.client.sendOperationRequest(t,lC)}rename(e,t){const r={sourceContainerName:e,options:Rb(t||{})};return this.client.sendOperationRequest(r,cC)}submitBatch(e,t,r,n){const i={contentLength:e,multipartContentType:t,body:r,options:Rb(n||{})};return this.client.sendOperationRequest(i,uC)}filterBlobs(e){const t={options:Rb(e||{})};return this.client.sendOperationRequest(t,pC)}acquireLease(e){const t={options:Rb(e||{})};return this.client.sendOperationRequest(t,dC)}releaseLease(e,t){const r={leaseId:e,options:Rb(t||{})};return this.client.sendOperationRequest(r,mC)}renewLease(e,t){const r={leaseId:e,options:Rb(t||{})};return this.client.sendOperationRequest(r,fC)}breakLease(e){const t={options:Rb(e||{})};return this.client.sendOperationRequest(t,hC)}changeLease(e,t,r){const n={leaseId:e,proposedLeaseId:t,options:Rb(r||{})};return this.client.sendOperationRequest(n,yC)}listBlobFlatSegment(e){const t={options:Rb(e||{})};return this.client.sendOperationRequest(t,gC)}listBlobHierarchySegment(e,t){const r={delimiter:e,options:Rb(t||{})};return this.client.sendOperationRequest(r,bC)}getAccountInfo(e){const t={options:Rb(e||{})};return this.client.sendOperationRequest(t,vC)}}const tC=new Xg(mj,!0),rC={path:"/{containerName}",httpMethod:"PUT",responses:{201:{headersMapper:Zw},default:{bodyMapper:$w,headersMapper:eS}},queryParameters:[bj,Tj],urlParameters:[yj],headerParameters:[vj,xj,wj,Rj,Oj,{parameterPath:["options","containerEncryptionScope","defaultEncryptionScope"],mapper:{serializedName:"x-ms-default-encryption-scope",xmlName:"x-ms-default-encryption-scope",type:{name:"String"}}},{parameterPath:["options","containerEncryptionScope","preventEncryptionScopeOverride"],mapper:{serializedName:"x-ms-deny-encryption-scope-override",xmlName:"x-ms-deny-encryption-scope-override",type:{name:"Boolean"}}}],isXML:!0,serializer:tC},nC={path:"/{containerName}",httpMethod:"GET",responses:{200:{headersMapper:tS},default:{bodyMapper:$w,headersMapper:rS}},queryParameters:[bj,Tj],urlParameters:[yj],headerParameters:[vj,xj,wj,Pj],isXML:!0,serializer:tC},iC={path:"/{containerName}",httpMethod:"DELETE",responses:{202:{headersMapper:nS},default:{bodyMapper:$w,headersMapper:iS}},queryParameters:[bj,Tj],urlParameters:[yj],headerParameters:[vj,xj,wj,Pj,_j,Aj],isXML:!0,serializer:tC},oC={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:oS},default:{bodyMapper:$w,headersMapper:sS}},queryParameters:[bj,Tj,Ij],urlParameters:[yj],headerParameters:[vj,xj,wj,Rj,Pj,_j],isXML:!0,serializer:tC},sC={path:"/{containerName}",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"SignedIdentifier"}}},serializedName:"SignedIdentifiers",xmlName:"SignedIdentifiers",xmlIsWrapped:!0,xmlElementName:"SignedIdentifier"},headersMapper:aS},default:{bodyMapper:$w,headersMapper:lS}},queryParameters:[bj,Tj,Mj],urlParameters:[yj],headerParameters:[vj,xj,wj,Pj],isXML:!0,serializer:tC},aC={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:cS},default:{bodyMapper:$w,headersMapper:uS}},requestBody:{parameterPath:["options","containerAcl"],mapper:{serializedName:"containerAcl",xmlName:"SignedIdentifiers",xmlIsWrapped:!0,xmlElementName:"SignedIdentifier",type:{name:"Sequence",element:{type:{name:"Composite",className:"SignedIdentifier"}}}}},queryParameters:[bj,Tj,Mj],urlParameters:[yj],headerParameters:[fj,hj,vj,xj,Oj,Pj,_j,Aj],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:tC},lC={path:"/{containerName}",httpMethod:"PUT",responses:{201:{headersMapper:pS},default:{bodyMapper:$w,headersMapper:dS}},queryParameters:[bj,Tj,Dj],urlParameters:[yj],headerParameters:[vj,xj,wj,{parameterPath:["options","deletedContainerName"],mapper:{serializedName:"x-ms-deleted-container-name",xmlName:"x-ms-deleted-container-name",type:{name:"String"}}},{parameterPath:["options","deletedContainerVersion"],mapper:{serializedName:"x-ms-deleted-container-version",xmlName:"x-ms-deleted-container-version",type:{name:"String"}}}],isXML:!0,serializer:tC},cC={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:mS},default:{bodyMapper:$w,headersMapper:fS}},queryParameters:[bj,Tj,{parameterPath:"comp",mapper:{defaultValue:"rename",isConstant:!0,serializedName:"comp",type:{name:"String"}}}],urlParameters:[yj],headerParameters:[vj,xj,wj,{parameterPath:"sourceContainerName",mapper:{serializedName:"x-ms-source-container-name",required:!0,xmlName:"x-ms-source-container-name",type:{name:"String"}}},{parameterPath:["options","sourceLeaseId"],mapper:{serializedName:"x-ms-source-lease-id",xmlName:"x-ms-source-lease-id",type:{name:"String"}}}],isXML:!0,serializer:tC},uC={path:"/{containerName}",httpMethod:"POST",responses:{202:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:hS},default:{bodyMapper:$w,headersMapper:yS}},requestBody:{parameterPath:"body",mapper:{serializedName:"body",required:!0,xmlName:"body",type:{name:"Stream"}}},queryParameters:[bj,{parameterPath:"comp",mapper:{defaultValue:"batch",isConstant:!0,serializedName:"comp",type:{name:"String"}}},Tj],urlParameters:[yj],headerParameters:[fj,hj,vj,xj,kj,{parameterPath:"multipartContentType",mapper:{serializedName:"Content-Type",required:!0,xmlName:"Content-Type",type:{name:"String"}}}],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:tC},pC={path:"/{containerName}",httpMethod:"GET",responses:{200:{bodyMapper:Vw,headersMapper:gS},default:{bodyMapper:$w,headersMapper:bS}},queryParameters:[bj,jj,Ej,{parameterPath:"comp",mapper:{defaultValue:"blobs",isConstant:!0,serializedName:"comp",type:{name:"String"}}},{parameterPath:["options","where"],mapper:{serializedName:"where",xmlName:"where",type:{name:"String"}}},Tj],urlParameters:[yj],headerParameters:[vj,xj,wj],isXML:!0,serializer:tC},dC={path:"/{containerName}",httpMethod:"PUT",responses:{201:{headersMapper:vS},default:{bodyMapper:$w,headersMapper:xS}},queryParameters:[bj,Tj,zj],urlParameters:[yj],headerParameters:[vj,xj,wj,_j,Aj,Bj,Lj,qj],isXML:!0,serializer:tC},mC={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:wS},default:{bodyMapper:$w,headersMapper:SS}},queryParameters:[bj,Tj,zj],urlParameters:[yj],headerParameters:[vj,xj,wj,_j,Aj,Uj,Hj],isXML:!0,serializer:tC},fC={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:NS},default:{bodyMapper:$w,headersMapper:jS}},queryParameters:[bj,Tj,zj],urlParameters:[yj],headerParameters:[vj,xj,wj,_j,Aj,Hj,Fj],isXML:!0,serializer:tC},hC={path:"/{containerName}",httpMethod:"PUT",responses:{202:{headersMapper:ES},default:{bodyMapper:$w,headersMapper:CS}},queryParameters:[bj,Tj,zj],urlParameters:[yj],headerParameters:[vj,xj,wj,_j,Aj,$j,Vj],isXML:!0,serializer:tC},yC={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:kS},default:{bodyMapper:$w,headersMapper:TS}},queryParameters:[bj,Tj,zj],urlParameters:[yj],headerParameters:[vj,xj,wj,_j,Aj,Hj,Gj,Wj],isXML:!0,serializer:tC},gC={path:"/{containerName}",httpMethod:"GET",responses:{200:{bodyMapper:Ww,headersMapper:RS},default:{bodyMapper:$w,headersMapper:OS}},queryParameters:[bj,Sj,Nj,jj,Ej,Tj,Kj],urlParameters:[yj],headerParameters:[vj,xj,wj],isXML:!0,serializer:tC},bC={path:"/{containerName}",httpMethod:"GET",responses:{200:{bodyMapper:Kw,headersMapper:PS},default:{bodyMapper:$w,headersMapper:_S}},queryParameters:[bj,Sj,Nj,jj,Ej,Tj,Kj,{parameterPath:"delimiter",mapper:{serializedName:"delimiter",required:!0,xmlName:"delimiter",type:{name:"String"}}}],urlParameters:[yj],headerParameters:[vj,xj,wj],isXML:!0,serializer:tC},vC={path:"/{containerName}",httpMethod:"GET",responses:{200:{headersMapper:AS},default:{bodyMapper:$w,headersMapper:IS}},queryParameters:[gj,Cj],urlParameters:[yj],headerParameters:[vj,wj],isXML:!0,serializer:tC};let xC=class{constructor(e){this.client=e}download(e){const t={options:Rb(e||{})};return this.client.sendOperationRequest(t,SC)}getProperties(e){const t={options:Rb(e||{})};return this.client.sendOperationRequest(t,NC)}delete(e){const t={options:Rb(e||{})};return this.client.sendOperationRequest(t,jC)}undelete(e){const t={options:Rb(e||{})};return this.client.sendOperationRequest(t,EC)}setExpiry(e,t){const r={expiryOptions:e,options:Rb(t||{})};return this.client.sendOperationRequest(r,CC)}setHttpHeaders(e){const t={options:Rb(e||{})};return this.client.sendOperationRequest(t,kC)}setImmutabilityPolicy(e){const t={options:Rb(e||{})};return this.client.sendOperationRequest(t,TC)}deleteImmutabilityPolicy(e){const t={options:Rb(e||{})};return this.client.sendOperationRequest(t,RC)}setLegalHold(e,t){const r={legalHold:e,options:Rb(t||{})};return this.client.sendOperationRequest(r,OC)}setMetadata(e){const t={options:Rb(e||{})};return this.client.sendOperationRequest(t,PC)}acquireLease(e){const t={options:Rb(e||{})};return this.client.sendOperationRequest(t,_C)}releaseLease(e,t){const r={leaseId:e,options:Rb(t||{})};return this.client.sendOperationRequest(r,AC)}renewLease(e,t){const r={leaseId:e,options:Rb(t||{})};return this.client.sendOperationRequest(r,IC)}changeLease(e,t,r){const n={leaseId:e,proposedLeaseId:t,options:Rb(r||{})};return this.client.sendOperationRequest(n,MC)}breakLease(e){const t={options:Rb(e||{})};return this.client.sendOperationRequest(t,DC)}createSnapshot(e){const t={options:Rb(e||{})};return this.client.sendOperationRequest(t,zC)}startCopyFromURL(e,t){const r={copySource:e,options:Rb(t||{})};return this.client.sendOperationRequest(r,BC)}copyFromURL(e,t){const r={copySource:e,options:Rb(t||{})};return this.client.sendOperationRequest(r,LC)}abortCopyFromURL(e,t){const r={copyId:e,options:Rb(t||{})};return this.client.sendOperationRequest(r,qC)}setTier(e,t){const r={tier:e,options:Rb(t||{})};return this.client.sendOperationRequest(r,UC)}getAccountInfo(e){const t={options:Rb(e||{})};return this.client.sendOperationRequest(t,HC)}query(e){const t={options:Rb(e||{})};return this.client.sendOperationRequest(t,FC)}getTags(e){const t={options:Rb(e||{})};return this.client.sendOperationRequest(t,$C)}setTags(e){const t={options:Rb(e||{})};return this.client.sendOperationRequest(t,VC)}};const wC=new Xg(mj,!0),SC={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:MS},206:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:MS},default:{bodyMapper:$w,headersMapper:DS}},queryParameters:[bj,Xj,Qj],urlParameters:[yj],headerParameters:[vj,xj,wj,Pj,_j,Aj,Yj,{parameterPath:["options","rangeGetContentMD5"],mapper:{serializedName:"x-ms-range-get-content-md5",xmlName:"x-ms-range-get-content-md5",type:{name:"Boolean"}}},{parameterPath:["options","rangeGetContentCRC64"],mapper:{serializedName:"x-ms-range-get-content-crc64",xmlName:"x-ms-range-get-content-crc64",type:{name:"Boolean"}}},Jj,Zj,eE,tE,rE,nE],isXML:!0,serializer:wC},NC={path:"/{containerName}/{blob}",httpMethod:"HEAD",responses:{200:{headersMapper:zS},default:{bodyMapper:$w,headersMapper:BS}},queryParameters:[bj,Xj,Qj],urlParameters:[yj],headerParameters:[vj,xj,wj,Pj,_j,Aj,Jj,Zj,eE,tE,rE,nE],isXML:!0,serializer:wC},jC={path:"/{containerName}/{blob}",httpMethod:"DELETE",responses:{202:{headersMapper:LS},default:{bodyMapper:$w,headersMapper:qS}},queryParameters:[bj,Xj,Qj,{parameterPath:["options","blobDeleteType"],mapper:{serializedName:"deletetype",xmlName:"deletetype",type:{name:"String"}}}],urlParameters:[yj],headerParameters:[vj,xj,wj,Pj,_j,Aj,tE,rE,nE,{parameterPath:["options","deleteSnapshots"],mapper:{serializedName:"x-ms-delete-snapshots",xmlName:"x-ms-delete-snapshots",type:{name:"Enum",allowedValues:["include","only"]}}}],isXML:!0,serializer:wC},EC={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:US},default:{bodyMapper:$w,headersMapper:HS}},queryParameters:[bj,Dj],urlParameters:[yj],headerParameters:[vj,xj,wj],isXML:!0,serializer:wC},CC={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:FS},default:{bodyMapper:$w,headersMapper:$S}},queryParameters:[bj,{parameterPath:"comp",mapper:{defaultValue:"expiry",isConstant:!0,serializedName:"comp",type:{name:"String"}}}],urlParameters:[yj],headerParameters:[vj,xj,wj,{parameterPath:"expiryOptions",mapper:{serializedName:"x-ms-expiry-option",required:!0,xmlName:"x-ms-expiry-option",type:{name:"String"}}},{parameterPath:["options","expiresOn"],mapper:{serializedName:"x-ms-expiry-time",xmlName:"x-ms-expiry-time",type:{name:"String"}}}],isXML:!0,serializer:wC},kC={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:VS},default:{bodyMapper:$w,headersMapper:GS}},queryParameters:[gj,bj],urlParameters:[yj],headerParameters:[vj,xj,wj,Pj,_j,Aj,tE,rE,nE,iE,oE,sE,aE,lE,cE],isXML:!0,serializer:wC},TC={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:WS},default:{bodyMapper:$w,headersMapper:KS}},queryParameters:[bj,uE],urlParameters:[yj],headerParameters:[vj,xj,wj,Aj,pE,dE],isXML:!0,serializer:wC},RC={path:"/{containerName}/{blob}",httpMethod:"DELETE",responses:{200:{headersMapper:XS},default:{bodyMapper:$w,headersMapper:QS}},queryParameters:[bj,uE],urlParameters:[yj],headerParameters:[vj,xj,wj],isXML:!0,serializer:wC},OC={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:YS},default:{bodyMapper:$w,headersMapper:JS}},queryParameters:[bj,{parameterPath:"comp",mapper:{defaultValue:"legalhold",isConstant:!0,serializedName:"comp",type:{name:"String"}}}],urlParameters:[yj],headerParameters:[vj,xj,wj,{parameterPath:"legalHold",mapper:{serializedName:"x-ms-legal-hold",required:!0,xmlName:"x-ms-legal-hold",type:{name:"Boolean"}}}],isXML:!0,serializer:wC},PC={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:ZS},default:{bodyMapper:$w,headersMapper:eN}},queryParameters:[bj,Ij],urlParameters:[yj],headerParameters:[vj,xj,wj,Rj,Pj,_j,Aj,Jj,Zj,eE,tE,rE,nE,mE],isXML:!0,serializer:wC},_C={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:tN},default:{bodyMapper:$w,headersMapper:rN}},queryParameters:[bj,zj],urlParameters:[yj],headerParameters:[vj,xj,wj,_j,Aj,Bj,Lj,qj,tE,rE,nE],isXML:!0,serializer:wC},AC={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:nN},default:{bodyMapper:$w,headersMapper:iN}},queryParameters:[bj,zj],urlParameters:[yj],headerParameters:[vj,xj,wj,_j,Aj,Uj,Hj,tE,rE,nE],isXML:!0,serializer:wC},IC={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:oN},default:{bodyMapper:$w,headersMapper:sN}},queryParameters:[bj,zj],urlParameters:[yj],headerParameters:[vj,xj,wj,_j,Aj,Hj,Fj,tE,rE,nE],isXML:!0,serializer:wC},MC={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:aN},default:{bodyMapper:$w,headersMapper:lN}},queryParameters:[bj,zj],urlParameters:[yj],headerParameters:[vj,xj,wj,_j,Aj,Hj,Gj,Wj,tE,rE,nE],isXML:!0,serializer:wC},DC={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{202:{headersMapper:cN},default:{bodyMapper:$w,headersMapper:uN}},queryParameters:[bj,zj],urlParameters:[yj],headerParameters:[vj,xj,wj,_j,Aj,$j,Vj,tE,rE,nE],isXML:!0,serializer:wC},zC={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:pN},default:{bodyMapper:$w,headersMapper:dN}},queryParameters:[bj,{parameterPath:"comp",mapper:{defaultValue:"snapshot",isConstant:!0,serializedName:"comp",type:{name:"String"}}}],urlParameters:[yj],headerParameters:[vj,xj,wj,Rj,Pj,_j,Aj,Jj,Zj,eE,tE,rE,nE,mE],isXML:!0,serializer:wC},BC={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{202:{headersMapper:mN},default:{bodyMapper:$w,headersMapper:fN}},queryParameters:[bj],urlParameters:[yj],headerParameters:[vj,xj,wj,Rj,Pj,_j,Aj,tE,rE,nE,pE,dE,fE,hE,yE,gE,bE,vE,xE,wE,SE,{parameterPath:["options","sealBlob"],mapper:{serializedName:"x-ms-seal-blob",xmlName:"x-ms-seal-blob",type:{name:"Boolean"}}},NE],isXML:!0,serializer:wC},LC={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{202:{headersMapper:hN},default:{bodyMapper:$w,headersMapper:yN}},queryParameters:[bj],urlParameters:[yj],headerParameters:[vj,xj,wj,Rj,Pj,_j,Aj,tE,rE,nE,pE,dE,mE,fE,yE,gE,bE,vE,wE,SE,NE,{parameterPath:"xMsRequiresSync",mapper:{defaultValue:"true",isConstant:!0,serializedName:"x-ms-requires-sync",type:{name:"String"}}},jE,EE,CE],isXML:!0,serializer:wC},qC={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{204:{headersMapper:gN},default:{bodyMapper:$w,headersMapper:bN}},queryParameters:[bj,{parameterPath:"comp",mapper:{defaultValue:"copy",isConstant:!0,serializedName:"comp",type:{name:"String"}}},{parameterPath:"copyId",mapper:{serializedName:"copyid",required:!0,xmlName:"copyid",type:{name:"String"}}}],urlParameters:[yj],headerParameters:[vj,xj,wj,Pj,{parameterPath:"copyActionAbortConstant",mapper:{defaultValue:"abort",isConstant:!0,serializedName:"x-ms-copy-action",type:{name:"String"}}}],isXML:!0,serializer:wC},UC={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:vN},202:{headersMapper:vN},default:{bodyMapper:$w,headersMapper:xN}},queryParameters:[bj,Xj,Qj,{parameterPath:"comp",mapper:{defaultValue:"tier",isConstant:!0,serializedName:"comp",type:{name:"String"}}}],urlParameters:[yj],headerParameters:[vj,xj,wj,Pj,nE,hE,{parameterPath:"tier",mapper:{serializedName:"x-ms-access-tier",required:!0,xmlName:"x-ms-access-tier",type:{name:"Enum",allowedValues:["P4","P6","P10","P15","P20","P30","P40","P50","P60","P70","P80","Hot","Cool","Archive","Cold"]}}}],isXML:!0,serializer:wC},HC={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{headersMapper:wN},default:{bodyMapper:$w,headersMapper:SN}},queryParameters:[gj,Cj],urlParameters:[yj],headerParameters:[vj,wj],isXML:!0,serializer:wC},FC={path:"/{containerName}/{blob}",httpMethod:"POST",responses:{200:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:NN},206:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:NN},default:{bodyMapper:$w,headersMapper:jN}},requestBody:kE,queryParameters:[bj,Xj,{parameterPath:"comp",mapper:{defaultValue:"query",isConstant:!0,serializedName:"comp",type:{name:"String"}}}],urlParameters:[yj],headerParameters:[fj,hj,vj,xj,Pj,_j,Aj,Jj,Zj,eE,tE,rE,nE],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:wC},$C={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{bodyMapper:Gw,headersMapper:EN},default:{bodyMapper:$w,headersMapper:CN}},queryParameters:[bj,Xj,Qj,TE],urlParameters:[yj],headerParameters:[vj,xj,wj,Pj,nE],isXML:!0,serializer:wC},VC={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{204:{headersMapper:kN},default:{bodyMapper:$w,headersMapper:TN}},requestBody:RE,queryParameters:[bj,Qj,TE],urlParameters:[yj],headerParameters:[fj,hj,vj,xj,Pj,nE,OE,PE],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:wC};class GC{constructor(e){this.client=e}create(e,t,r){const n={contentLength:e,blobContentLength:t,options:Rb(r||{})};return this.client.sendOperationRequest(n,XC)}uploadPages(e,t,r){const n={contentLength:e,body:t,options:Rb(r||{})};return this.client.sendOperationRequest(n,QC)}clearPages(e,t){const r={contentLength:e,options:Rb(t||{})};return this.client.sendOperationRequest(r,YC)}uploadPagesFromURL(e,t,r,n,i){const o={sourceUrl:e,sourceRange:t,contentLength:r,range:n,options:Rb(i||{})};return this.client.sendOperationRequest(o,JC)}getPageRanges(e){const t={options:Rb(e||{})};return this.client.sendOperationRequest(t,ZC)}getPageRangesDiff(e){const t={options:Rb(e||{})};return this.client.sendOperationRequest(t,ek)}resize(e,t){const r={blobContentLength:e,options:Rb(t||{})};return this.client.sendOperationRequest(r,tk)}updateSequenceNumber(e,t){const r={sequenceNumberAction:e,options:Rb(t||{})};return this.client.sendOperationRequest(r,rk)}copyIncremental(e,t){const r={copySource:e,options:Rb(t||{})};return this.client.sendOperationRequest(r,nk)}}const WC=new Xg(mj,!0),KC=new Xg(mj,!1),XC={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:RN},default:{bodyMapper:$w,headersMapper:ON}},queryParameters:[bj],urlParameters:[yj],headerParameters:[vj,xj,wj,kj,Rj,Pj,_j,Aj,Jj,Zj,eE,tE,rE,nE,iE,oE,sE,aE,lE,cE,pE,dE,mE,fE,SE,NE,{parameterPath:"blobType",mapper:{defaultValue:"PageBlob",isConstant:!0,serializedName:"x-ms-blob-type",type:{name:"String"}}},_E,AE],isXML:!0,serializer:WC},QC={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:PN},default:{bodyMapper:$w,headersMapper:_N}},requestBody:ME,queryParameters:[bj,zE],urlParameters:[yj],headerParameters:[vj,xj,kj,Pj,_j,Aj,Yj,Jj,Zj,eE,tE,rE,nE,mE,OE,PE,IE,DE,BE,LE,qE,UE],mediaType:"binary",serializer:KC},YC={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:AN},default:{bodyMapper:$w,headersMapper:IN}},queryParameters:[bj,zE],urlParameters:[yj],headerParameters:[vj,xj,wj,kj,Pj,_j,Aj,Yj,Jj,Zj,eE,tE,rE,nE,mE,LE,qE,UE,{parameterPath:"pageWrite",mapper:{defaultValue:"clear",isConstant:!0,serializedName:"x-ms-page-write",type:{name:"String"}}}],isXML:!0,serializer:WC},JC={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:MN},default:{bodyMapper:$w,headersMapper:DN}},queryParameters:[bj,zE],urlParameters:[yj],headerParameters:[vj,xj,wj,kj,Pj,_j,Aj,Jj,Zj,eE,tE,rE,nE,mE,yE,gE,bE,vE,jE,EE,BE,LE,qE,UE,HE,{parameterPath:"sourceRange",mapper:{serializedName:"x-ms-source-range",required:!0,xmlName:"x-ms-source-range",type:{name:"String"}}},FE,{parameterPath:"range",mapper:{serializedName:"x-ms-range",required:!0,xmlName:"x-ms-range",type:{name:"String"}}}],isXML:!0,serializer:WC},ZC={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{bodyMapper:Yw,headersMapper:zN},default:{bodyMapper:$w,headersMapper:BN}},queryParameters:[bj,jj,Ej,Xj,$E],urlParameters:[yj],headerParameters:[vj,xj,wj,Pj,_j,Aj,Yj,tE,rE,nE],isXML:!0,serializer:WC},ek={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{bodyMapper:Yw,headersMapper:LN},default:{bodyMapper:$w,headersMapper:qN}},queryParameters:[bj,jj,Ej,Xj,$E,{parameterPath:["options","prevsnapshot"],mapper:{serializedName:"prevsnapshot",xmlName:"prevsnapshot",type:{name:"String"}}}],urlParameters:[yj],headerParameters:[vj,xj,wj,Pj,_j,Aj,Yj,tE,rE,nE,{parameterPath:["options","prevSnapshotUrl"],mapper:{serializedName:"x-ms-previous-snapshot-url",xmlName:"x-ms-previous-snapshot-url",type:{name:"String"}}}],isXML:!0,serializer:WC},tk={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:UN},default:{bodyMapper:$w,headersMapper:HN}},queryParameters:[gj,bj],urlParameters:[yj],headerParameters:[vj,xj,wj,Pj,_j,Aj,Jj,Zj,eE,tE,rE,nE,mE,_E],isXML:!0,serializer:WC},rk={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:FN},default:{bodyMapper:$w,headersMapper:$N}},queryParameters:[gj,bj],urlParameters:[yj],headerParameters:[vj,xj,wj,Pj,_j,Aj,tE,rE,nE,AE,{parameterPath:"sequenceNumberAction",mapper:{serializedName:"x-ms-sequence-number-action",required:!0,xmlName:"x-ms-sequence-number-action",type:{name:"Enum",allowedValues:["max","update","increment"]}}}],isXML:!0,serializer:WC},nk={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{202:{headersMapper:VN},default:{bodyMapper:$w,headersMapper:GN}},queryParameters:[bj,{parameterPath:"comp",mapper:{defaultValue:"incrementalcopy",isConstant:!0,serializedName:"comp",type:{name:"String"}}}],urlParameters:[yj],headerParameters:[vj,xj,wj,_j,Aj,tE,rE,nE,wE],isXML:!0,serializer:WC};class ik{constructor(e){this.client=e}create(e,t){const r={contentLength:e,options:Rb(t||{})};return this.client.sendOperationRequest(r,ak)}appendBlock(e,t,r){const n={contentLength:e,body:t,options:Rb(r||{})};return this.client.sendOperationRequest(n,lk)}appendBlockFromUrl(e,t,r){const n={sourceUrl:e,contentLength:t,options:Rb(r||{})};return this.client.sendOperationRequest(n,ck)}seal(e){const t={options:Rb(e||{})};return this.client.sendOperationRequest(t,uk)}}const ok=new Xg(mj,!0),sk=new Xg(mj,!1),ak={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:WN},default:{bodyMapper:$w,headersMapper:KN}},queryParameters:[bj],urlParameters:[yj],headerParameters:[vj,xj,wj,kj,Rj,Pj,_j,Aj,Jj,Zj,eE,tE,rE,nE,iE,oE,sE,aE,lE,cE,pE,dE,mE,SE,NE,{parameterPath:"blobType",mapper:{defaultValue:"AppendBlob",isConstant:!0,serializedName:"x-ms-blob-type",type:{name:"String"}}}],isXML:!0,serializer:ok},lk={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:XN},default:{bodyMapper:$w,headersMapper:QN}},requestBody:ME,queryParameters:[bj,VE],urlParameters:[yj],headerParameters:[vj,xj,kj,Pj,_j,Aj,Jj,Zj,eE,tE,rE,nE,mE,OE,PE,IE,DE,GE,WE],mediaType:"binary",serializer:sk},ck={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:YN},default:{bodyMapper:$w,headersMapper:JN}},queryParameters:[bj,VE],urlParameters:[yj],headerParameters:[vj,xj,wj,kj,Pj,_j,Aj,Jj,Zj,eE,tE,rE,nE,mE,yE,gE,bE,vE,jE,EE,OE,HE,FE,GE,WE,KE],isXML:!0,serializer:ok},uk={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:ZN},default:{bodyMapper:$w,headersMapper:ej}},queryParameters:[bj,{parameterPath:"comp",mapper:{defaultValue:"seal",isConstant:!0,serializedName:"comp",type:{name:"String"}}}],urlParameters:[yj],headerParameters:[vj,xj,wj,Pj,_j,Aj,tE,rE,WE],isXML:!0,serializer:ok};class pk{constructor(e){this.client=e}upload(e,t,r){const n={contentLength:e,body:t,options:Rb(r||{})};return this.client.sendOperationRequest(n,fk)}putBlobFromUrl(e,t,r){const n={contentLength:e,copySource:t,options:Rb(r||{})};return this.client.sendOperationRequest(n,hk)}stageBlock(e,t,r,n){const i={blockId:e,contentLength:t,body:r,options:Rb(n||{})};return this.client.sendOperationRequest(i,yk)}stageBlockFromURL(e,t,r,n){const i={blockId:e,contentLength:t,sourceUrl:r,options:Rb(n||{})};return this.client.sendOperationRequest(i,gk)}commitBlockList(e,t){const r={blocks:e,options:Rb(t||{})};return this.client.sendOperationRequest(r,bk)}getBlockList(e,t){const r={listType:e,options:Rb(t||{})};return this.client.sendOperationRequest(r,vk)}}const dk=new Xg(mj,!0),mk=new Xg(mj,!1),fk={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:tj},default:{bodyMapper:$w,headersMapper:rj}},requestBody:ME,queryParameters:[bj],urlParameters:[yj],headerParameters:[vj,xj,kj,Rj,Pj,_j,Aj,Jj,Zj,eE,tE,rE,nE,iE,oE,sE,aE,lE,cE,pE,dE,mE,fE,SE,NE,OE,PE,IE,DE,XE],mediaType:"binary",serializer:mk},hk={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:nj},default:{bodyMapper:$w,headersMapper:ij}},queryParameters:[bj],urlParameters:[yj],headerParameters:[vj,xj,wj,kj,Rj,Pj,_j,Aj,Jj,Zj,eE,tE,rE,nE,iE,oE,sE,aE,lE,cE,mE,fE,yE,gE,bE,vE,xE,wE,SE,jE,EE,CE,OE,XE,{parameterPath:["options","copySourceBlobProperties"],mapper:{serializedName:"x-ms-copy-source-blob-properties",xmlName:"x-ms-copy-source-blob-properties",type:{name:"Boolean"}}}],isXML:!0,serializer:dk},yk={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:oj},default:{bodyMapper:$w,headersMapper:sj}},requestBody:ME,queryParameters:[bj,QE,YE],urlParameters:[yj],headerParameters:[vj,xj,kj,Pj,Jj,Zj,eE,mE,OE,PE,IE,DE],mediaType:"binary",serializer:mk},gk={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:aj},default:{bodyMapper:$w,headersMapper:lj}},queryParameters:[bj,QE,YE],urlParameters:[yj],headerParameters:[vj,xj,wj,kj,Pj,Jj,Zj,eE,mE,yE,gE,bE,vE,jE,EE,HE,FE,KE],isXML:!0,serializer:dk},bk={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:cj},default:{bodyMapper:$w,headersMapper:uj}},requestBody:JE,queryParameters:[bj,ZE],urlParameters:[yj],headerParameters:[fj,hj,vj,xj,Rj,Pj,_j,Aj,Jj,Zj,eE,tE,rE,nE,iE,oE,sE,aE,lE,cE,pE,dE,mE,fE,SE,NE,OE,PE],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:dk},vk={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{bodyMapper:Qw,headersMapper:pj},default:{bodyMapper:$w,headersMapper:dj}},queryParameters:[bj,Xj,ZE,{parameterPath:"listType",mapper:{defaultValue:"committed",serializedName:"blocklisttype",required:!0,xmlName:"blocklisttype",type:{name:"Enum",allowedValues:["committed","uncommitted","all"]}}}],urlParameters:[yj],headerParameters:[vj,xj,wj,Pj,nE],isXML:!0,serializer:dk},xk=jv("storage-blob"),wk="2023-11-03",Sk=268435456,Nk=4194304e3,jk=5e4,Ek=4194304,Ck={FORCE_BROWSER_NO_CACHE:"_",SNAPSHOT:"snapshot",VERSIONID:"versionid",TIMEOUT:"timeout"},kk="Content-Length",Tk="Cookie",Rk="User-Agent",Ok="",Pk=["Access-Control-Allow-Origin","Cache-Control","Content-Length","Content-Type","Date","Request-Id","traceparent","Transfer-Encoding","User-Agent","x-ms-client-request-id","x-ms-date","x-ms-error-code","x-ms-request-id","x-ms-return-client-request-id","x-ms-version","Accept-Ranges","Content-Disposition","Content-Encoding","Content-Language","Content-MD5","Content-Range","ETag","Last-Modified","Server","Vary","x-ms-content-crc64","x-ms-copy-action","x-ms-copy-completion-time","x-ms-copy-id","x-ms-copy-progress","x-ms-copy-status","x-ms-has-immutability-policy","x-ms-has-legal-hold","x-ms-lease-state","x-ms-lease-status","x-ms-range","x-ms-request-server-encrypted","x-ms-server-encrypted","x-ms-snapshot","x-ms-source-range","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","x-ms-access-tier","x-ms-access-tier-change-time","x-ms-access-tier-inferred","x-ms-account-kind","x-ms-archive-status","x-ms-blob-append-offset","x-ms-blob-cache-control","x-ms-blob-committed-block-count","x-ms-blob-condition-appendpos","x-ms-blob-condition-maxsize","x-ms-blob-content-disposition","x-ms-blob-content-encoding","x-ms-blob-content-language","x-ms-blob-content-length","x-ms-blob-content-md5","x-ms-blob-content-type","x-ms-blob-public-access","x-ms-blob-sequence-number","x-ms-blob-type","x-ms-copy-destination-snapshot","x-ms-creation-time","x-ms-default-encryption-scope","x-ms-delete-snapshots","x-ms-delete-type-permanent","x-ms-deny-encryption-scope-override","x-ms-encryption-algorithm","x-ms-if-sequence-number-eq","x-ms-if-sequence-number-le","x-ms-if-sequence-number-lt","x-ms-incremental-copy","x-ms-lease-action","x-ms-lease-break-period","x-ms-lease-duration","x-ms-lease-id","x-ms-lease-time","x-ms-page-write","x-ms-proposed-lease-id","x-ms-range-get-content-md5","x-ms-rehydrate-priority","x-ms-sequence-number-action","x-ms-sku-name","x-ms-source-content-md5","x-ms-source-if-match","x-ms-source-if-modified-since","x-ms-source-if-none-match","x-ms-source-if-unmodified-since","x-ms-tag-count","x-ms-encryption-key-sha256","x-ms-if-tags","x-ms-source-if-tags"],_k=["comp","maxresults","rscc","rscd","rsce","rscl","rsct","se","si","sip","sp","spr","sr","srt","ss","st","sv","include","marker","prefix","copyid","restype","blockid","blocklisttype","delimiter","prevsnapshot","ske","skoid","sks","skt","sktid","skv","snapshot"],Ak=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];function Ik(e){const t=ab.parse(e);let r=t.getPath();return r=r||"/",r=encodeURIComponent(r).replace(/%2F/g,"/").replace(/'/g,"%27").replace(/\+/g,"%20").replace(/%25/g,"%"),t.setPath(r),t.toString()}function Mk(e,t){const r=e.split(";");for(const n of r)if(n.trim().startsWith(t))return n.trim().match(t+"=(.*)")[1];return""}function Dk(e){let t="";e.startsWith("UseDevelopmentStorage=true")&&(t=function(e){let t="";if(-1!==e.search("DevelopmentStorageProxyUri=")){const r=e.split(";");for(const e of r)e.trim().startsWith("DevelopmentStorageProxyUri=")&&(t=e.trim().match("DevelopmentStorageProxyUri=(.*)")[1])}return t}(e),e="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;");let r=Mk(e,"BlobEndpoint");if(r=r.endsWith("/")?r.slice(0,-1):r,-1!==e.search("DefaultEndpointsProtocol=")&&-1!==e.search("AccountKey=")){let n="",i="",o=Buffer.from("accountKey","base64"),s="";if(i=Mk(e,"AccountName"),o=Buffer.from(Mk(e,"AccountKey"),"base64"),!r){n=Mk(e,"DefaultEndpointsProtocol");const t=n.toLowerCase();if("https"!==t&&"http"!==t)throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'");if(s=Mk(e,"EndpointSuffix"),!s)throw new Error("Invalid EndpointSuffix in the provided Connection String");r=`${n}://${i}.blob.${s}`}if(!i)throw new Error("Invalid AccountName in the provided Connection String");if(0===o.length)throw new Error("Invalid AccountKey in the provided Connection String");return{kind:"AccountConnString",url:r,accountName:i,accountKey:o,proxyUri:t}}{const t=Mk(e,"SharedAccessSignature");let n=Mk(e,"AccountName");if(n||(n=Hk(r)),!r)throw new Error("Invalid BlobEndpoint in the provided SAS Connection String");if(!t)throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String");return{kind:"SASConnString",url:r,accountName:n,accountSas:t}}}function zk(e,t){const r=ab.parse(e);let n=r.getPath();n=n?n.endsWith("/")?`${n}${t}`:`${n}/${t}`:t,r.setPath(n);return new URL(r.toString()).toString()}function Bk(e,t,r){const n=ab.parse(e);return n.setQueryParameter(t,r),n.toString()}function Lk(e,t){return ab.parse(e).getQueryParameterValue(t)}function qk(e,t=!0){const r=e.toISOString();return t?r.substring(0,r.length-1)+"0000Z":r.substring(0,r.length-5)+"Z"}function Uk(e,t){e.length>42&&(e=e.slice(0,42));const r=e+function(e,t,r=" "){if(String.prototype.padStart)return e.padStart(t,r);return r=r||" ",e.length>t?e:((t-=e.length)>r.length&&(r+=r.repeat(t/r.length)),r.slice(0,t)+e)}(t.toString(),48-e.length,"0");return n=r,ov?Buffer.from(n).toString("base64"):btoa(n);var n}function Hk(e){const t=ab.parse(e);let r;try{return r="blob"===t.getHost().split(".")[1]?t.getHost().split(".")[0]:Fk(t)?t.getPath().split("/")[1]:"",r}catch(n){throw new Error("Unable to extract accountName with provided information.")}}function Fk(e){if(void 0===e.getHost())return!1;const t=e.getHost()+(void 0===e.getPort()?"":":"+e.getPort());return/^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(t)||void 0!==e.getPort()&&Ak.includes(e.getPort())}function $k(e){if(void 0===e)return;const t=[];for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const n=e[r];t.push(`${encodeURIComponent(r)}=${encodeURIComponent(n)}`)}return t.join("&")}function Vk(e){if(void 0===e)return;const t={blobTagSet:[]};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const n=e[r];t.blobTagSet.push({key:r,value:n})}return t}function Gk(e){if(void 0===e)return;const t={};for(const r of e.blobTagSet)t[r.key]=r.value;return t}function Wk(e){if(void 0!==e)switch(e.kind){case"csv":return{format:{type:"delimited",delimitedTextConfiguration:{columnSeparator:e.columnSeparator||",",fieldQuote:e.fieldQuote||"",recordSeparator:e.recordSeparator,escapeChar:e.escapeCharacter||"",headersPresent:e.hasHeaders||!1}}};case"json":return{format:{type:"json",jsonTextConfiguration:{recordSeparator:e.recordSeparator}}};case"arrow":return{format:{type:"arrow",arrowConfiguration:{schema:e.schema}}};case"parquet":return{format:{type:"parquet"}};default:throw Error("Invalid BlobQueryTextConfiguration.")}}function Kk(e){if(!e)return;if("policy-id"in e)return;const t=[];for(const r in e){const n=r.split("_"),i="or-";n[0].startsWith(i)&&(n[0]=n[0].substring(i.length));const o={ruleId:n[1],replicationStatus:e[r]},s=t.findIndex(e=>e.policyId===n[0]);s>-1?t[s].rules.push(o):t.push({policyId:n[0],rules:[o]})}return t}function Xk(e){return e?e.scheme+" "+e.value:void 0}function*Qk(e){let t=[],r=[];e.pageRange&&(t=e.pageRange),e.clearRange&&(r=e.clearRange);let n=0,i=0;for(;n<t.length&&i<r.length;)t[n].start<r[i].start?(yield{start:t[n].start,end:t[n].end,isClear:!1},++n):(yield{start:r[i].start,end:r[i].end,isClear:!0},++i);for(;n<t.length;++n)yield{start:t[n].start,end:t[n].end,isClear:!1};for(;i<r.length;++i)yield{start:r[i].start,end:r[i].end,isClear:!0}}class Yk extends Ob{constructor(e,t){super(e,t)}async sendRequest(e){return ov||("GET"!==e.method.toUpperCase()&&"HEAD"!==e.method.toUpperCase()||(e.url=Bk(e.url,Ck.FORCE_BROWSER_NO_CACHE,(new Date).getTime().toString())),e.headers.remove(Tk),e.headers.remove(kk)),this._nextPolicy.sendRequest(e)}}class Jk{create(e,t){return new Yk(e,t)}}var Zk,eT;(eT=Zk||(Zk={}))[eT.EXPONENTIAL=0]="EXPONENTIAL",eT[eT.FIXED=1]="FIXED";const tT={maxRetryDelayInMs:12e4,maxTries:4,retryDelayInMs:4e3,retryPolicyType:Zk.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},rT=new Eg("The operation was aborted.");class nT extends Ob{constructor(e,t,r=tT){super(e,t),this.retryOptions={retryPolicyType:r.retryPolicyType?r.retryPolicyType:tT.retryPolicyType,maxTries:r.maxTries&&r.maxTries>=1?Math.floor(r.maxTries):tT.maxTries,tryTimeoutInMs:r.tryTimeoutInMs&&r.tryTimeoutInMs>=0?r.tryTimeoutInMs:tT.tryTimeoutInMs,retryDelayInMs:r.retryDelayInMs&&r.retryDelayInMs>=0?Math.min(r.retryDelayInMs,r.maxRetryDelayInMs?r.maxRetryDelayInMs:tT.maxRetryDelayInMs):tT.retryDelayInMs,maxRetryDelayInMs:r.maxRetryDelayInMs&&r.maxRetryDelayInMs>=0?r.maxRetryDelayInMs:tT.maxRetryDelayInMs,secondaryHost:r.secondaryHost?r.secondaryHost:tT.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,!1,1)}async attemptSendRequest(e,t,r){const n=e.clone(),i=t||!this.retryOptions.secondaryHost||!("GET"===e.method||"HEAD"===e.method||"OPTIONS"===e.method)||r%2==1;let o;i||(n.url=function(e,t){const r=ab.parse(e);return r.setHost(t),r.toString()}(n.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(n.url=Bk(n.url,Ck.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));try{if(xk.info(`RetryPolicy: =====> Try=${r} ${i?"Primary":"Secondary"}`),o=await this._nextPolicy.sendRequest(n),!this.shouldRetry(i,r,o))return o;t=t||!i&&404===o.status}catch(s){if(xk.error(`RetryPolicy: Caught error, message: ${s.message}, code: ${s.code}`),!this.shouldRetry(i,r,o,s))throw s}return await this.delay(i,r,e.abortSignal),this.attemptSendRequest(e,t,++r)}shouldRetry(e,t,r,n){if(t>=this.retryOptions.maxTries)return xk.info(`RetryPolicy: Attempt(s) ${t} >= maxTries ${this.retryOptions.maxTries}, no further try.`),!1;const i=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(n)for(const o of i)if(n.name.toUpperCase().includes(o)||n.message.toUpperCase().includes(o)||n.code&&n.code.toString().toUpperCase()===o)return xk.info(`RetryPolicy: Network error ${o} found, will retry.`),!0;if(r||n){const t=r?r.status:n?n.statusCode:0;if(!e&&404===t)return xk.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(503===t||500===t)return xk.info(`RetryPolicy: Will retry for status code ${t}.`),!0}return!("PARSE_ERROR"!==(null==n?void 0:n.code)||!(null==n?void 0:n.message.startsWith('Error "Error: Unclosed root tag')))&&(xk.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0)}async delay(e,t,r){let n=0;if(e)switch(this.retryOptions.retryPolicyType){case Zk.EXPONENTIAL:n=Math.min((Math.pow(2,t-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case Zk.FIXED:n=this.retryOptions.retryDelayInMs}else n=1e3*Math.random();return xk.info(`RetryPolicy: Delay for ${n}ms`),async function(e,t,r){return new Promise((n,i)=>{let o;const s=()=>{void 0!==o&&clearTimeout(o),i(r)};o=setTimeout(()=>{void 0!==t&&t.removeEventListener("abort",s),n()},e),void 0!==t&&t.addEventListener("abort",s)})}(n,r,rT)}}class iT{constructor(e){this.retryOptions=e}create(e,t){return new nT(e,t,this.retryOptions)}}class oT extends Ob{sendRequest(e){return this._nextPolicy.sendRequest(this.signRequest(e))}signRequest(e){return e}}class sT extends oT{constructor(e,t){super(e,t)}}class aT{create(e,t){throw new Error("Method should be implemented in children classes.")}}class lT extends aT{create(e,t){return new sT(e,t)}}const cT=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));class uT extends Ob{constructor(e,t,r){super(e,t),this.telemetry=r}async sendRequest(e){return ov&&(e.headers||(e.headers=new Rg),e.headers.get(Rk)||e.headers.set(Rk,this.telemetry)),this._nextPolicy.sendRequest(e)}}class pT{constructor(e){const t=[];if(ov){if(e){const r=e.userAgentPrefix||"";r.length>0&&-1===t.indexOf(r)&&t.push(r)}const r="azsdk-js-storageblob/12.17.0";-1===t.indexOf(r)&&t.push(r);let n=`(NODE-VERSION ${process.version})`;cT&&(n=`(NODE-VERSION ${process.version}; ${(void 0)()} ${(void 0)()})`),-1===t.indexOf(n)&&t.push(n)}this.telemetryString=t.join(" ")}create(e,t){return new uT(e,t,this.telemetryString)}}const dT=new Nb;const mT="/.default",fT={AUTHORIZATION:"authorization"},hT={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:12e4};function yT(e,t,r){let n=null,i=null;const o=Object.assign(Object.assign({},hT),r),s={get isRefreshing(){return null!==n},get shouldRefresh(){var e;return!s.isRefreshing&&(null!==(e=null==i?void 0:i.expiresOnTimestamp)&&void 0!==e?e:0)-o.refreshWindowInMs<Date.now()},get mustRefresh(){return null===i||i.expiresOnTimestamp-o.forcedRefreshWindowInMs<Date.now()}};function a(r){var a;if(!s.isRefreshing){n=async function(e,t,r){async function n(){if(!(Date.now()<r)){const t=await e();if(null===t)throw new Error("Failed to refresh access token.");return t}try{return await e()}catch(a){return null}}let i=await n();for(;null===i;)await iv(t),i=await n();return i}(()=>e.getToken(t,r),o.retryIntervalInMs,null!==(a=null==i?void 0:i.expiresOnTimestamp)&&void 0!==a?a:Date.now()).then(e=>(n=null,i=e,i)).catch(e=>{throw n=null,i=null,e})}return n}return async e=>s.mustRefresh?a(e):(s.shouldRefresh&&a(e),i)}function gT(e,t){let r=yT(e,t);class n extends Ob{constructor(e,t){super(e,t)}async sendRequest(t){if(!t.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");const n=r,i=(await n({abortSignal:t.abortSignal,tracingOptions:{tracingContext:t.tracingContext}})).token;t.headers.set(fT.AUTHORIZATION,`Bearer ${i}`);const o=await this._nextPolicy.sendRequest(t);if(401===(null==o?void 0:o.status)){const n=function(e){const t=e.headers.get("WWW-Authenticate");if(401===e.status&&t)return t}(o);if(n){const i=function(e){return`${e.slice(7).trim()} `.split(" ").filter(e=>e).map(e=>(([e,t])=>({[e]:t}))(e.trim().split("="))).reduce((e,t)=>Object.assign(Object.assign({},e),t),{})}(n),o=i.resource_id+mT,s=ab.parse(i.authorization_uri).getPath().split("/")[1],a=yT(e,o),l=(await a({abortSignal:t.abortSignal,tracingOptions:{tracingContext:t.tracingContext},tenantId:s})).token;return r=a,t.headers.set(fT.AUTHORIZATION,`Bearer ${l}`),this._nextPolicy.sendRequest(t)}}return o}}return{create:(e,t)=>new n(e,t)}}function bT(e){if(!e||"object"!=typeof e)return!1;const t=e;return Array.isArray(t.factories)&&"object"==typeof t.options&&"function"==typeof t.toServiceClientOptions}class vT{constructor(e,t={}){this.factories=e,this.options=Object.assign(Object.assign({},t),{httpClient:t.httpClient||dT})}toServiceClientOptions(){return{httpClient:this.options.httpClient,requestPolicyFactories:this.factories}}}function xT(e,t={}){var r;void 0===e&&(e=new lT);const n=new pT(t.userAgentOptions),i=[Dw({userAgent:n.telemetryString}),(o=t.keepAliveOptions,{create:(e,t)=>new Xb(e,t,o||Kb)}),n,Fv(),new Jk,new iT(t.retryOptions),$b(void 0,{xmlCharKey:"#"}),Ov({logger:xk.info,allowedHeaderNames:Pk,allowedQueryParameters:_k})];var o;return ov&&(i.push(Gv(t.proxyOptions)),i.push({create:(e,t)=>{throw new Error("DisableResponseDecompressionPolicy is not supported in browser environment")}})),i.push(Iv(e)?function(e,t){return e.credential=t,e}(gT(e,null!==(r=t.audience)&&void 0!==r?r:"https://storage.azure.com/.default"),e):e),new vT(i,t)}class wT{}class ST extends Bw{constructor(e,t){if(void 0===e)throw new Error("'url' cannot be null");if(t||(t={}),!t.userAgent){const e=zv();t.userAgent=`azure-storage-blob/12.17.0 ${e}`}super(void 0,t),this.requestContentType="application/json; charset=utf-8",this.baseUri=t.endpoint||"{url}",this.url=e,this.version=t.version||"2023-11-03"}}class NT{constructor(e,t){var r,n;this.url=Ik(e),this.accountName=Hk(e),this.pipeline=t,this.storageClientContext=new ST(this.url,t.toServiceClientOptions()),this.isHttps=(r=function(e){return ab.parse(e).getScheme()}(this.url)||"",n="https",r.toLocaleLowerCase()===n.toLocaleLowerCase()),this.credential=new lT;for(const i of this.pipeline.factories)ov&&i instanceof wT||i instanceof lT?this.credential=i:Iv(i.credential)&&(this.credential=i.credential);this.storageClientContext.requestContentType=void 0}}const jT=Iw({packagePrefix:"Azure.Storage.Blob",namespace:"Microsoft.Storage"});function ET(e){var t,r;return{spanOptions:null===(t=null==e?void 0:e.tracingOptions)||void 0===t?void 0:t.spanOptions,tracingContext:null===(r=null==e?void 0:e.tracingOptions)||void 0===r?void 0:r.tracingContext}}class CT{constructor(){this.read=!1,this.add=!1,this.create=!1,this.write=!1,this.delete=!1,this.deleteVersion=!1,this.tag=!1,this.move=!1,this.execute=!1,this.setImmutabilityPolicy=!1,this.permanentDelete=!1}static parse(e){const t=new CT;for(const r of e)switch(r){case"r":t.read=!0;break;case"a":t.add=!0;break;case"c":t.create=!0;break;case"w":t.write=!0;break;case"d":t.delete=!0;break;case"x":t.deleteVersion=!0;break;case"t":t.tag=!0;break;case"m":t.move=!0;break;case"e":t.execute=!0;break;case"i":t.setImmutabilityPolicy=!0;break;case"y":t.permanentDelete=!0;break;default:throw new RangeError(`Invalid permission: ${r}`)}return t}static from(e){const t=new CT;return e.read&&(t.read=!0),e.add&&(t.add=!0),e.create&&(t.create=!0),e.write&&(t.write=!0),e.delete&&(t.delete=!0),e.deleteVersion&&(t.deleteVersion=!0),e.tag&&(t.tag=!0),e.move&&(t.move=!0),e.execute&&(t.execute=!0),e.setImmutabilityPolicy&&(t.setImmutabilityPolicy=!0),e.permanentDelete&&(t.permanentDelete=!0),t}toString(){const e=[];return this.read&&e.push("r"),this.add&&e.push("a"),this.create&&e.push("c"),this.write&&e.push("w"),this.delete&&e.push("d"),this.deleteVersion&&e.push("x"),this.tag&&e.push("t"),this.move&&e.push("m"),this.execute&&e.push("e"),this.setImmutabilityPolicy&&e.push("i"),this.permanentDelete&&e.push("y"),e.join("")}}class kT{constructor(){this.read=!1,this.add=!1,this.create=!1,this.write=!1,this.delete=!1,this.deleteVersion=!1,this.list=!1,this.tag=!1,this.move=!1,this.execute=!1,this.setImmutabilityPolicy=!1,this.permanentDelete=!1,this.filterByTags=!1}static parse(e){const t=new kT;for(const r of e)switch(r){case"r":t.read=!0;break;case"a":t.add=!0;break;case"c":t.create=!0;break;case"w":t.write=!0;break;case"d":t.delete=!0;break;case"l":t.list=!0;break;case"t":t.tag=!0;break;case"x":t.deleteVersion=!0;break;case"m":t.move=!0;break;case"e":t.execute=!0;break;case"i":t.setImmutabilityPolicy=!0;break;case"y":t.permanentDelete=!0;break;case"f":t.filterByTags=!0;break;default:throw new RangeError(`Invalid permission ${r}`)}return t}static from(e){const t=new kT;return e.read&&(t.read=!0),e.add&&(t.add=!0),e.create&&(t.create=!0),e.write&&(t.write=!0),e.delete&&(t.delete=!0),e.list&&(t.list=!0),e.deleteVersion&&(t.deleteVersion=!0),e.tag&&(t.tag=!0),e.move&&(t.move=!0),e.execute&&(t.execute=!0),e.setImmutabilityPolicy&&(t.setImmutabilityPolicy=!0),e.permanentDelete&&(t.permanentDelete=!0),e.filterByTags&&(t.filterByTags=!0),t}toString(){const e=[];return this.read&&e.push("r"),this.add&&e.push("a"),this.create&&e.push("c"),this.write&&e.push("w"),this.delete&&e.push("d"),this.deleteVersion&&e.push("x"),this.list&&e.push("l"),this.tag&&e.push("t"),this.move&&e.push("m"),this.execute&&e.push("e"),this.setImmutabilityPolicy&&e.push("i"),this.permanentDelete&&e.push("y"),this.filterByTags&&e.push("f"),e.join("")}}function TT(e){return e.end?`${e.start}-${e.end}`:e.start}var RT,OT;(OT=RT||(RT={})).Https="https",OT.HttpsAndHttp="https,http";class PT{constructor(e,t,r,n,i,o,s,a,l,c,u,p,d,m,f,h,y,g,b,v){this.version=e,this.signature=t,void 0!==r&&"string"!=typeof r?(this.permissions=r.permissions,this.services=r.services,this.resourceTypes=r.resourceTypes,this.protocol=r.protocol,this.startsOn=r.startsOn,this.expiresOn=r.expiresOn,this.ipRangeInner=r.ipRange,this.identifier=r.identifier,this.encryptionScope=r.encryptionScope,this.resource=r.resource,this.cacheControl=r.cacheControl,this.contentDisposition=r.contentDisposition,this.contentEncoding=r.contentEncoding,this.contentLanguage=r.contentLanguage,this.contentType=r.contentType,r.userDelegationKey&&(this.signedOid=r.userDelegationKey.signedObjectId,this.signedTenantId=r.userDelegationKey.signedTenantId,this.signedStartsOn=r.userDelegationKey.signedStartsOn,this.signedExpiresOn=r.userDelegationKey.signedExpiresOn,this.signedService=r.userDelegationKey.signedService,this.signedVersion=r.userDelegationKey.signedVersion,this.preauthorizedAgentObjectId=r.preauthorizedAgentObjectId,this.correlationId=r.correlationId)):(this.services=n,this.resourceTypes=i,this.expiresOn=a,this.permissions=r,this.protocol=o,this.startsOn=s,this.ipRangeInner=l,this.encryptionScope=v,this.identifier=c,this.resource=u,this.cacheControl=p,this.contentDisposition=d,this.contentEncoding=m,this.contentLanguage=f,this.contentType=h,y&&(this.signedOid=y.signedObjectId,this.signedTenantId=y.signedTenantId,this.signedStartsOn=y.signedStartsOn,this.signedExpiresOn=y.signedExpiresOn,this.signedService=y.signedService,this.signedVersion=y.signedVersion,this.preauthorizedAgentObjectId=g,this.correlationId=b))}get ipRange(){if(this.ipRangeInner)return{end:this.ipRangeInner.end,start:this.ipRangeInner.start}}toString(){const e=["sv","ss","srt","spr","st","se","sip","si","ses","skoid","sktid","skt","ske","sks","skv","sr","sp","sig","rscc","rscd","rsce","rscl","rsct","saoid","scid"],t=[];for(const r of e)switch(r){case"sv":this.tryAppendQueryParameter(t,r,this.version);break;case"ss":this.tryAppendQueryParameter(t,r,this.services);break;case"srt":this.tryAppendQueryParameter(t,r,this.resourceTypes);break;case"spr":this.tryAppendQueryParameter(t,r,this.protocol);break;case"st":this.tryAppendQueryParameter(t,r,this.startsOn?qk(this.startsOn,!1):void 0);break;case"se":this.tryAppendQueryParameter(t,r,this.expiresOn?qk(this.expiresOn,!1):void 0);break;case"sip":this.tryAppendQueryParameter(t,r,this.ipRange?TT(this.ipRange):void 0);break;case"si":this.tryAppendQueryParameter(t,r,this.identifier);break;case"ses":this.tryAppendQueryParameter(t,r,this.encryptionScope);break;case"skoid":this.tryAppendQueryParameter(t,r,this.signedOid);break;case"sktid":this.tryAppendQueryParameter(t,r,this.signedTenantId);break;case"skt":this.tryAppendQueryParameter(t,r,this.signedStartsOn?qk(this.signedStartsOn,!1):void 0);break;case"ske":this.tryAppendQueryParameter(t,r,this.signedExpiresOn?qk(this.signedExpiresOn,!1):void 0);break;case"sks":this.tryAppendQueryParameter(t,r,this.signedService);break;case"skv":this.tryAppendQueryParameter(t,r,this.signedVersion);break;case"sr":this.tryAppendQueryParameter(t,r,this.resource);break;case"sp":this.tryAppendQueryParameter(t,r,this.permissions);break;case"sig":this.tryAppendQueryParameter(t,r,this.signature);break;case"rscc":this.tryAppendQueryParameter(t,r,this.cacheControl);break;case"rscd":this.tryAppendQueryParameter(t,r,this.contentDisposition);break;case"rsce":this.tryAppendQueryParameter(t,r,this.contentEncoding);break;case"rscl":this.tryAppendQueryParameter(t,r,this.contentLanguage);break;case"rsct":this.tryAppendQueryParameter(t,r,this.contentType);break;case"saoid":this.tryAppendQueryParameter(t,r,this.preauthorizedAgentObjectId);break;case"scid":this.tryAppendQueryParameter(t,r,this.correlationId)}return t.join("&")}tryAppendQueryParameter(e,t,r){r&&(t=encodeURIComponent(t),r=encodeURIComponent(r),t.length>0&&r.length>0&&e.push(`${t}=${r}`))}}function _T(e,t,r){const n=e.version?e.version:wk,i=t instanceof wT?t:void 0;let o;if(void 0===i)throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName.");if(n>="2020-12-06")return void 0!==i?function(e,t){if(e=IT(e),!(e.identifier||e.permissions&&e.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r,n="c",i=e.snapshotTime;e.blobName&&(n="b",e.snapshotTime?n="bs":e.versionId&&(n="bv",i=e.versionId));e.permissions&&(r=e.blobName?CT.parse(e.permissions.toString()).toString():kT.parse(e.permissions.toString()).toString());const o=[r||"",e.startsOn?qk(e.startsOn,!1):"",e.expiresOn?qk(e.expiresOn,!1):"",AT(t.accountName,e.containerName,e.blobName),e.identifier,e.ipRange?TT(e.ipRange):"",e.protocol?e.protocol:"",e.version,n,i,e.encryptionScope,e.cacheControl?e.cacheControl:"",e.contentDisposition?e.contentDisposition:"",e.contentEncoding?e.contentEncoding:"",e.contentLanguage?e.contentLanguage:"",e.contentType?e.contentType:""].join("\n"),s=t.computeHMACSHA256(o);return new PT(e.version,s,r,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,n,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,void 0,void 0,void 0,e.encryptionScope)}(e,i):function(e,t){if(e=IT(e),!e.permissions||!e.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r,n="c",i=e.snapshotTime;e.blobName&&(n="b",e.snapshotTime?n="bs":e.versionId&&(n="bv",i=e.versionId));e.permissions&&(r=e.blobName?CT.parse(e.permissions.toString()).toString():kT.parse(e.permissions.toString()).toString());const o=[r||"",e.startsOn?qk(e.startsOn,!1):"",e.expiresOn?qk(e.expiresOn,!1):"",AT(t.accountName,e.containerName,e.blobName),t.userDelegationKey.signedObjectId,t.userDelegationKey.signedTenantId,t.userDelegationKey.signedStartsOn?qk(t.userDelegationKey.signedStartsOn,!1):"",t.userDelegationKey.signedExpiresOn?qk(t.userDelegationKey.signedExpiresOn,!1):"",t.userDelegationKey.signedService,t.userDelegationKey.signedVersion,e.preauthorizedAgentObjectId,void 0,e.correlationId,e.ipRange?TT(e.ipRange):"",e.protocol?e.protocol:"",e.version,n,i,e.encryptionScope,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType].join("\n"),s=t.computeHMACSHA256(o);return new PT(e.version,s,r,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,n,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,t.userDelegationKey,e.preauthorizedAgentObjectId,e.correlationId,e.encryptionScope)}(e,o);if(n>="2018-11-09")return void 0!==i?function(e,t){if(e=IT(e),!(e.identifier||e.permissions&&e.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r,n="c",i=e.snapshotTime;e.blobName&&(n="b",e.snapshotTime?n="bs":e.versionId&&(n="bv",i=e.versionId));e.permissions&&(r=e.blobName?CT.parse(e.permissions.toString()).toString():kT.parse(e.permissions.toString()).toString());const o=[r||"",e.startsOn?qk(e.startsOn,!1):"",e.expiresOn?qk(e.expiresOn,!1):"",AT(t.accountName,e.containerName,e.blobName),e.identifier,e.ipRange?TT(e.ipRange):"",e.protocol?e.protocol:"",e.version,n,i,e.cacheControl?e.cacheControl:"",e.contentDisposition?e.contentDisposition:"",e.contentEncoding?e.contentEncoding:"",e.contentLanguage?e.contentLanguage:"",e.contentType?e.contentType:""].join("\n"),s=t.computeHMACSHA256(o);return new PT(e.version,s,r,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,n,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType)}(e,i):n>="2020-02-10"?function(e,t){if(e=IT(e),!e.permissions||!e.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r,n="c",i=e.snapshotTime;e.blobName&&(n="b",e.snapshotTime?n="bs":e.versionId&&(n="bv",i=e.versionId));e.permissions&&(r=e.blobName?CT.parse(e.permissions.toString()).toString():kT.parse(e.permissions.toString()).toString());const o=[r||"",e.startsOn?qk(e.startsOn,!1):"",e.expiresOn?qk(e.expiresOn,!1):"",AT(t.accountName,e.containerName,e.blobName),t.userDelegationKey.signedObjectId,t.userDelegationKey.signedTenantId,t.userDelegationKey.signedStartsOn?qk(t.userDelegationKey.signedStartsOn,!1):"",t.userDelegationKey.signedExpiresOn?qk(t.userDelegationKey.signedExpiresOn,!1):"",t.userDelegationKey.signedService,t.userDelegationKey.signedVersion,e.preauthorizedAgentObjectId,void 0,e.correlationId,e.ipRange?TT(e.ipRange):"",e.protocol?e.protocol:"",e.version,n,i,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType].join("\n"),s=t.computeHMACSHA256(o);return new PT(e.version,s,r,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,n,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,t.userDelegationKey,e.preauthorizedAgentObjectId,e.correlationId)}(e,o):function(e,t){if(e=IT(e),!e.permissions||!e.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r,n="c",i=e.snapshotTime;e.blobName&&(n="b",e.snapshotTime?n="bs":e.versionId&&(n="bv",i=e.versionId));e.permissions&&(r=e.blobName?CT.parse(e.permissions.toString()).toString():kT.parse(e.permissions.toString()).toString());const o=[r||"",e.startsOn?qk(e.startsOn,!1):"",e.expiresOn?qk(e.expiresOn,!1):"",AT(t.accountName,e.containerName,e.blobName),t.userDelegationKey.signedObjectId,t.userDelegationKey.signedTenantId,t.userDelegationKey.signedStartsOn?qk(t.userDelegationKey.signedStartsOn,!1):"",t.userDelegationKey.signedExpiresOn?qk(t.userDelegationKey.signedExpiresOn,!1):"",t.userDelegationKey.signedService,t.userDelegationKey.signedVersion,e.ipRange?TT(e.ipRange):"",e.protocol?e.protocol:"",e.version,n,i,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType].join("\n"),s=t.computeHMACSHA256(o);return new PT(e.version,s,r,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,n,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,t.userDelegationKey)}(e,o);if(n>="2015-04-05"){if(void 0!==i)return function(e,t){if(e=IT(e),!(e.identifier||e.permissions&&e.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r,n="c";e.blobName&&(n="b");e.permissions&&(r=e.blobName?CT.parse(e.permissions.toString()).toString():kT.parse(e.permissions.toString()).toString());const i=[r||"",e.startsOn?qk(e.startsOn,!1):"",e.expiresOn?qk(e.expiresOn,!1):"",AT(t.accountName,e.containerName,e.blobName),e.identifier,e.ipRange?TT(e.ipRange):"",e.protocol?e.protocol:"",e.version,e.cacheControl?e.cacheControl:"",e.contentDisposition?e.contentDisposition:"",e.contentEncoding?e.contentEncoding:"",e.contentLanguage?e.contentLanguage:"",e.contentType?e.contentType:""].join("\n"),o=t.computeHMACSHA256(i);return new PT(e.version,o,r,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,n,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType)}(e,i);throw new RangeError("'version' must be >= '2018-11-09' when generating user delegation SAS using user delegation key.")}throw new RangeError("'version' must be >= '2015-04-05'.")}function AT(e,t,r){const n=[`/blob/${e}/${t}`];return r&&n.push(`/${r}`),n.join("")}function IT(e){const t=e.version?e.version:wk;if(e.snapshotTime&&t<"2018-11-09")throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");if(void 0===e.blobName&&e.snapshotTime)throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.");if(e.versionId&&t<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");if(void 0===e.blobName&&e.versionId)throw RangeError("Must provide 'blobName' when providing 'versionId'.");if(e.permissions&&e.permissions.setImmutabilityPolicy&&t<"2020-08-04")throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(e.permissions&&e.permissions.deleteVersion&&t<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");if(e.permissions&&e.permissions.permanentDelete&&t<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");if(e.permissions&&e.permissions.tag&&t<"2019-12-12")throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.");if(t<"2020-02-10"&&e.permissions&&(e.permissions.move||e.permissions.execute))throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");if(t<"2021-04-10"&&e.permissions&&e.permissions.filterByTags)throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");if(t<"2020-02-10"&&(e.preauthorizedAgentObjectId||e.correlationId))throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");if(e.encryptionScope&&t<"2020-12-06")throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");return e.version=t,e}class MT{constructor(e,t){const r=new ST(e.url,e.pipeline.toServiceClientOptions());this._url=e.url,void 0===e.name?(this._isContainer=!0,this._containerOrBlobOperation=new eC(r)):(this._isContainer=!1,this._containerOrBlobOperation=new xC(r)),t||(t=Gg()),this._leaseId=t}get leaseId(){return this._leaseId}get url(){return this._url}async acquireLease(e,t={}){var r,n,i,o,s,a;const{span:l,updatedOptions:c}=jT("BlobLeaseClient-acquireLease",t);if(this._isContainer&&((null===(r=t.conditions)||void 0===r?void 0:r.ifMatch)&&(null===(n=t.conditions)||void 0===n?void 0:n.ifMatch)!==Ok||(null===(i=t.conditions)||void 0===i?void 0:i.ifNoneMatch)&&(null===(o=t.conditions)||void 0===o?void 0:o.ifNoneMatch)!==Ok||(null===(s=t.conditions)||void 0===s?void 0:s.tagConditions)))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");try{return await this._containerOrBlobOperation.acquireLease(Object.assign({abortSignal:t.abortSignal,duration:e,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(a=t.conditions)||void 0===a?void 0:a.tagConditions}),proposedLeaseId:this._leaseId},ET(c)))}catch(u){throw l.setStatus({code:_w.ERROR,message:u.message}),u}finally{l.end()}}async changeLease(e,t={}){var r,n,i,o,s,a;const{span:l,updatedOptions:c}=jT("BlobLeaseClient-changeLease",t);if(this._isContainer&&((null===(r=t.conditions)||void 0===r?void 0:r.ifMatch)&&(null===(n=t.conditions)||void 0===n?void 0:n.ifMatch)!==Ok||(null===(i=t.conditions)||void 0===i?void 0:i.ifNoneMatch)&&(null===(o=t.conditions)||void 0===o?void 0:o.ifNoneMatch)!==Ok||(null===(s=t.conditions)||void 0===s?void 0:s.tagConditions)))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");try{const r=await this._containerOrBlobOperation.changeLease(this._leaseId,e,Object.assign({abortSignal:t.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(a=t.conditions)||void 0===a?void 0:a.tagConditions})},ET(c)));return this._leaseId=e,r}catch(u){throw l.setStatus({code:_w.ERROR,message:u.message}),u}finally{l.end()}}async releaseLease(e={}){var t,r,n,i,o,s;const{span:a,updatedOptions:l}=jT("BlobLeaseClient-releaseLease",e);if(this._isContainer&&((null===(t=e.conditions)||void 0===t?void 0:t.ifMatch)&&(null===(r=e.conditions)||void 0===r?void 0:r.ifMatch)!==Ok||(null===(n=e.conditions)||void 0===n?void 0:n.ifNoneMatch)&&(null===(i=e.conditions)||void 0===i?void 0:i.ifNoneMatch)!==Ok||(null===(o=e.conditions)||void 0===o?void 0:o.tagConditions)))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");try{return await this._containerOrBlobOperation.releaseLease(this._leaseId,Object.assign({abortSignal:e.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:null===(s=e.conditions)||void 0===s?void 0:s.tagConditions})},ET(l)))}catch(c){throw a.setStatus({code:_w.ERROR,message:c.message}),c}finally{a.end()}}async renewLease(e={}){var t,r,n,i,o,s;const{span:a,updatedOptions:l}=jT("BlobLeaseClient-renewLease",e);if(this._isContainer&&((null===(t=e.conditions)||void 0===t?void 0:t.ifMatch)&&(null===(r=e.conditions)||void 0===r?void 0:r.ifMatch)!==Ok||(null===(n=e.conditions)||void 0===n?void 0:n.ifNoneMatch)&&(null===(i=e.conditions)||void 0===i?void 0:i.ifNoneMatch)!==Ok||(null===(o=e.conditions)||void 0===o?void 0:o.tagConditions)))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");try{return await this._containerOrBlobOperation.renewLease(this._leaseId,Object.assign({abortSignal:e.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:null===(s=e.conditions)||void 0===s?void 0:s.tagConditions})},ET(l)))}catch(c){throw a.setStatus({code:_w.ERROR,message:c.message}),c}finally{a.end()}}async breakLease(e,t={}){var r,n,i,o,s,a;const{span:l,updatedOptions:c}=jT("BlobLeaseClient-breakLease",t);if(this._isContainer&&((null===(r=t.conditions)||void 0===r?void 0:r.ifMatch)&&(null===(n=t.conditions)||void 0===n?void 0:n.ifMatch)!==Ok||(null===(i=t.conditions)||void 0===i?void 0:i.ifNoneMatch)&&(null===(o=t.conditions)||void 0===o?void 0:o.ifNoneMatch)!==Ok||(null===(s=t.conditions)||void 0===s?void 0:s.tagConditions)))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");try{const r=Object.assign({abortSignal:t.abortSignal,breakPeriod:e,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(a=t.conditions)||void 0===a?void 0:a.tagConditions})},ET(c));return await this._containerOrBlobOperation.breakLease(r)}catch(u){throw l.setStatus({code:_w.ERROR,message:u.message}),u}finally{l.end()}}}class DT{constructor(e,t={}){this.originalResponse=e}get acceptRanges(){return this.originalResponse.acceptRanges}get cacheControl(){return this.originalResponse.cacheControl}get contentDisposition(){return this.originalResponse.contentDisposition}get contentEncoding(){return this.originalResponse.contentEncoding}get contentLanguage(){return this.originalResponse.contentLanguage}get blobSequenceNumber(){return this.originalResponse.blobSequenceNumber}get blobType(){return this.originalResponse.blobType}get contentLength(){return this.originalResponse.contentLength}get contentMD5(){return this.originalResponse.contentMD5}get contentRange(){return this.originalResponse.contentRange}get contentType(){return this.originalResponse.contentType}get copyCompletedOn(){}get copyId(){return this.originalResponse.copyId}get copyProgress(){return this.originalResponse.copyProgress}get copySource(){return this.originalResponse.copySource}get copyStatus(){return this.originalResponse.copyStatus}get copyStatusDescription(){return this.originalResponse.copyStatusDescription}get leaseDuration(){return this.originalResponse.leaseDuration}get leaseState(){return this.originalResponse.leaseState}get leaseStatus(){return this.originalResponse.leaseStatus}get date(){return this.originalResponse.date}get blobCommittedBlockCount(){return this.originalResponse.blobCommittedBlockCount}get etag(){return this.originalResponse.etag}get errorCode(){return this.originalResponse.errorCode}get isServerEncrypted(){return this.originalResponse.isServerEncrypted}get blobContentMD5(){return this.originalResponse.blobContentMD5}get lastModified(){return this.originalResponse.lastModified}get metadata(){return this.originalResponse.metadata}get requestId(){return this.originalResponse.requestId}get clientRequestId(){return this.originalResponse.clientRequestId}get version(){return this.originalResponse.version}get encryptionKeySha256(){return this.originalResponse.encryptionKeySha256}get contentCrc64(){return this.originalResponse.contentCrc64}get blobBody(){throw Error("Quick query in browser is not supported yet.")}get readableStreamBody(){}get _response(){return this.originalResponse._response}}var zT,BT,LT,qT,UT,HT;function FT(e){if(void 0!==e)return e}function $T(e,t){if(e&&!t)throw new RangeError("Customer-provided encryption key must be used over HTTPS.");e&&!e.encryptionAlgorithm&&(e.encryptionAlgorithm="AES256")}function VT(e){const t=(e._response.parsedBody.pageRange||[]).map(e=>({offset:e.start,count:e.end-e.start})),r=(e._response.parsedBody.clearRange||[]).map(e=>({offset:e.start,count:e.end-e.start}));return Object.assign(Object.assign({},e),{pageRange:t,clearRange:r,_response:Object.assign(Object.assign({},e._response),{parsedBody:{pageRange:t,clearRange:r}})})}(BT=zT||(zT={})).Hot="Hot",BT.Cool="Cool",BT.Cold="Cold",BT.Archive="Archive",(qT=LT||(LT={})).P4="P4",qT.P6="P6",qT.P10="P10",qT.P15="P15",qT.P20="P20",qT.P30="P30",qT.P40="P40",qT.P50="P50",qT.P60="P60",qT.P70="P70",qT.P80="P80",(HT=UT||(UT={})).StorageOAuthScopes="https://storage.azure.com/.default",HT.DiskComputeOAuthScopes="https://disk.compute.azure.com/.default";class GT extends Error{constructor(e){super(e),this.name="PollerStoppedError",Object.setPrototypeOf(this,GT.prototype)}}class WT extends Error{constructor(e){super(e),this.name="PollerCancelledError",Object.setPrototypeOf(this,WT.prototype)}}class KT{constructor(e){this.resolveOnUnsuccessful=!1,this.stopped=!0,this.pollProgressCallbacks=[],this.operation=e,this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t}),this.promise.catch(()=>{})}async startPolling(e={}){for(this.stopped&&(this.stopped=!1);!this.isStopped()&&!this.isDone();)await this.poll(e),await this.delay()}async pollOnce(e={}){this.isDone()||(this.operation=await this.operation.update({abortSignal:e.abortSignal,fireProgress:this.fireProgress.bind(this)})),this.processUpdatedState()}fireProgress(e){for(const t of this.pollProgressCallbacks)t(e)}async cancelOnce(e={}){this.operation=await this.operation.cancel(e)}poll(e={}){if(!this.pollOncePromise){this.pollOncePromise=this.pollOnce(e);const t=()=>{this.pollOncePromise=void 0};this.pollOncePromise.then(t,t).catch(this.reject)}return this.pollOncePromise}processUpdatedState(){if(this.operation.state.error&&(this.stopped=!0,!this.resolveOnUnsuccessful))throw this.reject(this.operation.state.error),this.operation.state.error;if(this.operation.state.isCancelled&&(this.stopped=!0,!this.resolveOnUnsuccessful)){const e=new WT("Operation was canceled");throw this.reject(e),e}this.isDone()&&this.resolve&&this.resolve(this.getResult())}async pollUntilDone(e={}){return this.stopped&&this.startPolling(e).catch(this.reject),this.processUpdatedState(),this.promise}onProgress(e){return this.pollProgressCallbacks.push(e),()=>{this.pollProgressCallbacks=this.pollProgressCallbacks.filter(t=>t!==e)}}isDone(){const e=this.operation.state;return Boolean(e.isCompleted||e.isCancelled||e.error)}stopPolling(){this.stopped||(this.stopped=!0,this.reject&&this.reject(new GT("This poller is already stopped")))}isStopped(){return this.stopped}cancelOperation(e={}){if(this.cancelPromise){if(e.abortSignal)throw new Error("A cancel request is currently pending")}else this.cancelPromise=this.cancelOnce(e);return this.cancelPromise}getOperationState(){return this.operation.state}getResult(){return this.operation.state.result}toString(){return this.operation.toString()}}class XT extends KT{constructor(e){const{blobClient:t,copySource:r,intervalInMs:n=15e3,onProgress:i,resumeFrom:o,startCopyFromURLOptions:s}=e;let a;o&&(a=JSON.parse(o).state);super(ZT(Object.assign(Object.assign({},a),{blobClient:t,copySource:r,startCopyFromURLOptions:s}))),"function"==typeof i&&this.onProgress(i),this.intervalInMs=n}delay(){return iv(this.intervalInMs)}}const QT=async function(e={}){const t=this.state,{copyId:r}=t;return t.isCompleted?ZT(t):r?(await t.blobClient.abortCopyFromURL(r,{abortSignal:e.abortSignal}),t.isCancelled=!0,ZT(t)):(t.isCancelled=!0,ZT(t))},YT=async function(e={}){const t=this.state,{blobClient:r,copySource:n,startCopyFromURLOptions:i}=t;if(t.isStarted){if(!t.isCompleted)try{const r=await t.blobClient.getProperties({abortSignal:e.abortSignal}),{copyStatus:n,copyProgress:i}=r,o=t.copyProgress;i&&(t.copyProgress=i),"pending"===n&&i!==o&&"function"==typeof e.fireProgress?e.fireProgress(t):"success"===n?(t.result=r,t.isCompleted=!0):"failed"===n&&(t.error=new Error(`Blob copy failed with reason: "${r.copyStatusDescription||"unknown"}"`),t.isCompleted=!0)}catch(o){t.error=o,t.isCompleted=!0}}else{t.isStarted=!0;const e=await r.startCopyFromURL(n,i);t.copyId=e.copyId,"success"===e.copyStatus&&(t.result=e,t.isCompleted=!0)}return ZT(t)},JT=function(){return JSON.stringify({state:this.state},(e,t)=>{if("blobClient"!==e)return t})};function ZT(e){return{state:Object.assign({},e),cancel:QT,toString:JT,update:YT}}function eR(e){if(e.offset<0)throw new RangeError("Range.offset cannot be smaller than 0.");if(e.count&&e.count<=0)throw new RangeError("Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.");return e.count?`bytes=${e.offset}-${e.offset+e.count-1}`:`bytes=${e.offset}-`}var tR,rR,nR=$t();(rR=tR||(tR={}))[rR.Good=0]="Good",rR[rR.Error=1]="Error";class iR{constructor(e=5){if(this.actives=0,this.completed=0,this.offset=0,this.operations=[],this.state=tR.Good,e<1)throw new RangeError("concurrency must be larger than 0");this.concurrency=e,this.emitter=new nR.EventEmitter}addOperation(e){this.operations.push(async()=>{try{this.actives++,await e(),this.actives--,this.completed++,this.parallelExecute()}catch(t){this.emitter.emit("error",t)}})}async do(){return 0===this.operations.length?Promise.resolve():(this.parallelExecute(),new Promise((e,t)=>{this.emitter.on("finish",e),this.emitter.on("error",e=>{this.state=tR.Error,t(e)})}))}nextOperation(){return this.offset<this.operations.length?this.operations[this.offset++]:null}parallelExecute(){if(this.state!==tR.Error)if(this.completed>=this.operations.length)this.emitter.emit("finish");else for(;this.actives<this.concurrency;){const e=this.nextOperation();if(!e)return;e()}}}class oR{}class sR extends NT{constructor(e,t,r,n){let i,o;if(n=n||{},bT(t))o=e,i=t;else if(ov&&t instanceof wT||t instanceof lT||Iv(t))o=e,i=xT(t,n=r);else if(t||"string"==typeof t){if(!t||"string"!=typeof t||!r||"string"!=typeof r)throw new Error("Expecting non-empty strings for containerName and blobName parameters");{const s=t,a=r,l=Dk(e);if("AccountConnString"===l.kind){if(!ov)throw new Error("Account connection string is only supported in Node.js environment");{const e=new wT(l.accountName,l.accountKey);o=zk(zk(l.url,encodeURIComponent(s)),encodeURIComponent(a)),n.proxyOptions||(n.proxyOptions=void l.proxyUri),i=xT(e,n)}}else{if("SASConnString"!==l.kind)throw new Error("Connection string must be either an Account connection string or a SAS connection string");o=zk(zk(l.url,encodeURIComponent(s)),encodeURIComponent(a))+"?"+l.accountSas,i=xT(new lT,n)}}}else o=e,r&&"string"!=typeof r&&(n=r),i=xT(new lT,n);super(o,i),({blobName:this._name,containerName:this._containerName}=this.getBlobAndContainerNamesFromUrl()),this.blobContext=new xC(this.storageClientContext),this._snapshot=Lk(this.url,Ck.SNAPSHOT),this._versionId=Lk(this.url,Ck.VERSIONID)}get name(){return this._name}get containerName(){return this._containerName}withSnapshot(e){return new sR(Bk(this.url,Ck.SNAPSHOT,0===e.length?void 0:e),this.pipeline)}withVersion(e){return new sR(Bk(this.url,Ck.VERSIONID,0===e.length?void 0:e),this.pipeline)}getAppendBlobClient(){return new aR(this.url,this.pipeline)}getBlockBlobClient(){return new lR(this.url,this.pipeline)}getPageBlobClient(){return new cR(this.url,this.pipeline)}async download(e=0,t,r={}){var n;r.conditions=r.conditions||{},r.conditions=r.conditions||{},$T(r.customerProvidedKey,this.isHttps);const{span:i,updatedOptions:o}=jT("BlobClient-download",r);try{const i=await this.blobContext.download(Object.assign({abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:null===(n=r.conditions)||void 0===n?void 0:n.tagConditions}),requestOptions:{onDownloadProgress:ov?void 0:r.onProgress},range:0!==e||t?eR({offset:e,count:t}):void 0,rangeGetContentMD5:r.rangeGetContentMD5,rangeGetContentCRC64:r.rangeGetContentCrc64,snapshot:r.snapshot,cpkInfo:r.customerProvidedKey},ET(o))),s=Object.assign(Object.assign({},i),{_response:i._response,objectReplicationDestinationPolicyId:i.objectReplicationPolicyId,objectReplicationSourceProperties:Kk(i.objectReplicationRules)});if(!ov)return s;if((void 0===r.maxRetryRequests||r.maxRetryRequests<0)&&(r.maxRetryRequests=5),void 0===i.contentLength)throw new RangeError("File download response doesn't contain valid content length header");if(!i.etag)throw new RangeError("File download response doesn't contain valid etag header");return new 1(s,async t=>{var n;const o={leaseAccessConditions:r.conditions,modifiedAccessConditions:{ifMatch:r.conditions.ifMatch||i.etag,ifModifiedSince:r.conditions.ifModifiedSince,ifNoneMatch:r.conditions.ifNoneMatch,ifUnmodifiedSince:r.conditions.ifUnmodifiedSince,ifTags:null===(n=r.conditions)||void 0===n?void 0:n.tagConditions},range:eR({count:e+i.contentLength-t,offset:t}),rangeGetContentMD5:r.rangeGetContentMD5,rangeGetContentCRC64:r.rangeGetContentCrc64,snapshot:r.snapshot,cpkInfo:r.customerProvidedKey};return(await this.blobContext.download(Object.assign({abortSignal:r.abortSignal},o))).readableStreamBody},e,i.contentLength,{maxRetryRequests:r.maxRetryRequests,onProgress:r.onProgress})}catch(s){throw i.setStatus({code:_w.ERROR,message:s.message}),s}finally{i.end()}}async exists(e={}){const{span:t,updatedOptions:r}=jT("BlobClient-exists",e);try{return $T(e.customerProvidedKey,this.isHttps),await this.getProperties({abortSignal:e.abortSignal,customerProvidedKey:e.customerProvidedKey,conditions:e.conditions,tracingOptions:r.tracingOptions}),!0}catch(n){if(404===n.statusCode)return!1;if(409===n.statusCode&&("BlobUsesCustomerSpecifiedEncryption"===n.details.errorCode||"BlobDoesNotUseCustomerSpecifiedEncryption"===n.details.errorCode))return!0;throw t.setStatus({code:_w.ERROR,message:n.message}),n}finally{t.end()}}async getProperties(e={}){var t;const{span:r,updatedOptions:n}=jT("BlobClient-getProperties",e);try{e.conditions=e.conditions||{},$T(e.customerProvidedKey,this.isHttps);const r=await this.blobContext.getProperties(Object.assign({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:null===(t=e.conditions)||void 0===t?void 0:t.tagConditions}),cpkInfo:e.customerProvidedKey},ET(n)));return Object.assign(Object.assign({},r),{_response:r._response,objectReplicationDestinationPolicyId:r.objectReplicationPolicyId,objectReplicationSourceProperties:Kk(r.objectReplicationRules)})}catch(i){throw r.setStatus({code:_w.ERROR,message:i.message}),i}finally{r.end()}}async delete(e={}){var t;const{span:r,updatedOptions:n}=jT("BlobClient-delete",e);e.conditions=e.conditions||{};try{return await this.blobContext.delete(Object.assign({abortSignal:e.abortSignal,deleteSnapshots:e.deleteSnapshots,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:null===(t=e.conditions)||void 0===t?void 0:t.tagConditions})},ET(n)))}catch(i){throw r.setStatus({code:_w.ERROR,message:i.message}),i}finally{r.end()}}async deleteIfExists(e={}){var t,r;const{span:n,updatedOptions:i}=jT("BlobClient-deleteIfExists",e);try{const e=await this.delete(i);return Object.assign(Object.assign({succeeded:!0},e),{_response:e._response})}catch(o){if("BlobNotFound"===(null===(t=o.details)||void 0===t?void 0:t.errorCode))return n.setStatus({code:_w.ERROR,message:"Expected exception when deleting a blob or snapshot only if it exists."}),Object.assign(Object.assign({succeeded:!1},null===(r=o.response)||void 0===r?void 0:r.parsedHeaders),{_response:o.response});throw n.setStatus({code:_w.ERROR,message:o.message}),o}finally{n.end()}}async undelete(e={}){const{span:t,updatedOptions:r}=jT("BlobClient-undelete",e);try{return await this.blobContext.undelete(Object.assign({abortSignal:e.abortSignal},ET(r)))}catch(n){throw t.setStatus({code:_w.ERROR,message:n.message}),n}finally{t.end()}}async setHTTPHeaders(e,t={}){var r;const{span:n,updatedOptions:i}=jT("BlobClient-setHTTPHeaders",t);t.conditions=t.conditions||{};try{return $T(t.customerProvidedKey,this.isHttps),await this.blobContext.setHttpHeaders(Object.assign({abortSignal:t.abortSignal,blobHttpHeaders:e,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(r=t.conditions)||void 0===r?void 0:r.tagConditions})},ET(i)))}catch(o){throw n.setStatus({code:_w.ERROR,message:o.message}),o}finally{n.end()}}async setMetadata(e,t={}){var r;const{span:n,updatedOptions:i}=jT("BlobClient-setMetadata",t);t.conditions=t.conditions||{};try{return $T(t.customerProvidedKey,this.isHttps),await this.blobContext.setMetadata(Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,metadata:e,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(r=t.conditions)||void 0===r?void 0:r.tagConditions}),cpkInfo:t.customerProvidedKey,encryptionScope:t.encryptionScope},ET(i)))}catch(o){throw n.setStatus({code:_w.ERROR,message:o.message}),o}finally{n.end()}}async setTags(e,t={}){var r;const{span:n,updatedOptions:i}=jT("BlobClient-setTags",t);try{return await this.blobContext.setTags(Object.assign(Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(r=t.conditions)||void 0===r?void 0:r.tagConditions})},ET(i)),{tags:Vk(e)}))}catch(o){throw n.setStatus({code:_w.ERROR,message:o.message}),o}finally{n.end()}}async getTags(e={}){var t;const{span:r,updatedOptions:n}=jT("BlobClient-getTags",e);try{const r=await this.blobContext.getTags(Object.assign({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:null===(t=e.conditions)||void 0===t?void 0:t.tagConditions})},ET(n)));return Object.assign(Object.assign({},r),{_response:r._response,tags:Gk({blobTagSet:r.blobTagSet})||{}})}catch(i){throw r.setStatus({code:_w.ERROR,message:i.message}),i}finally{r.end()}}getBlobLeaseClient(e){return new MT(this,e)}async createSnapshot(e={}){var t;const{span:r,updatedOptions:n}=jT("BlobClient-createSnapshot",e);e.conditions=e.conditions||{};try{return $T(e.customerProvidedKey,this.isHttps),await this.blobContext.createSnapshot(Object.assign({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,metadata:e.metadata,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:null===(t=e.conditions)||void 0===t?void 0:t.tagConditions}),cpkInfo:e.customerProvidedKey,encryptionScope:e.encryptionScope},ET(n)))}catch(i){throw r.setStatus({code:_w.ERROR,message:i.message}),i}finally{r.end()}}async beginCopyFromURL(e,t={}){const r=new XT({blobClient:{abortCopyFromURL:(...e)=>this.abortCopyFromURL(...e),getProperties:(...e)=>this.getProperties(...e),startCopyFromURL:(...e)=>this.startCopyFromURL(...e)},copySource:e,intervalInMs:t.intervalInMs,onProgress:t.onProgress,resumeFrom:t.resumeFrom,startCopyFromURLOptions:t});return await r.poll(),r}async abortCopyFromURL(e,t={}){const{span:r,updatedOptions:n}=jT("BlobClient-abortCopyFromURL",t);try{return await this.blobContext.abortCopyFromURL(e,Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions},ET(n)))}catch(i){throw r.setStatus({code:_w.ERROR,message:i.message}),i}finally{r.end()}}async syncCopyFromURL(e,t={}){var r,n,i;const{span:o,updatedOptions:s}=jT("BlobClient-syncCopyFromURL",t);t.conditions=t.conditions||{},t.sourceConditions=t.sourceConditions||{};try{return await this.blobContext.copyFromURL(e,Object.assign({abortSignal:t.abortSignal,metadata:t.metadata,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(r=t.conditions)||void 0===r?void 0:r.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:t.sourceConditions.ifMatch,sourceIfModifiedSince:t.sourceConditions.ifModifiedSince,sourceIfNoneMatch:t.sourceConditions.ifNoneMatch,sourceIfUnmodifiedSince:t.sourceConditions.ifUnmodifiedSince},sourceContentMD5:t.sourceContentMD5,copySourceAuthorization:Xk(t.sourceAuthorization),tier:FT(t.tier),blobTagsString:$k(t.tags),immutabilityPolicyExpiry:null===(n=t.immutabilityPolicy)||void 0===n?void 0:n.expiriesOn,immutabilityPolicyMode:null===(i=t.immutabilityPolicy)||void 0===i?void 0:i.policyMode,legalHold:t.legalHold,encryptionScope:t.encryptionScope,copySourceTags:t.copySourceTags},ET(s)))}catch(a){throw o.setStatus({code:_w.ERROR,message:a.message}),a}finally{o.end()}}async setAccessTier(e,t={}){var r;const{span:n,updatedOptions:i}=jT("BlobClient-setAccessTier",t);try{return await this.blobContext.setTier(FT(e),Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(r=t.conditions)||void 0===r?void 0:r.tagConditions}),rehydratePriority:t.rehydratePriority},ET(i)))}catch(o){throw n.setStatus({code:_w.ERROR,message:o.message}),o}finally{n.end()}}async downloadToBuffer(e,t,r,n={}){let i,o=0,s=0,a=n;e instanceof Buffer?(i=e,o=t||0,s="number"==typeof r?r:0):(o="number"==typeof e?e:0,s="number"==typeof t?t:0,a=r||{});const{span:l,updatedOptions:c}=jT("BlobClient-downloadToBuffer",a);try{if(a.blockSize||(a.blockSize=0),a.blockSize<0)throw new RangeError("blockSize option must be >= 0");if(0===a.blockSize&&(a.blockSize=Ek),o<0)throw new RangeError("offset option must be >= 0");if(s&&s<=0)throw new RangeError("count option must be greater than 0");if(a.conditions||(a.conditions={}),!s){const e=await this.getProperties(Object.assign(Object.assign({},a),{tracingOptions:Object.assign(Object.assign({},a.tracingOptions),ET(c))}));if(s=e.contentLength-o,s<0)throw new RangeError(`offset ${o} shouldn't be larger than blob size ${e.contentLength}`)}if(!i)try{i=Buffer.alloc(s)}catch(u){throw new Error(`Unable to allocate the buffer of size: ${s}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile".\t ${u.message}`)}if(i.length<s)throw new RangeError(`The buffer's size should be equal to or larger than the request count of bytes: ${s}`);let e=0;const t=new iR(a.concurrency);for(let r=o;r<o+s;r+=a.blockSize)t.addOperation(async()=>{let t=o+s;r+a.blockSize<t&&(t=r+a.blockSize);(await this.download(r,t-r,{abortSignal:a.abortSignal,conditions:a.conditions,maxRetryRequests:a.maxRetryRequestsPerBlock,customerProvidedKey:a.customerProvidedKey,tracingOptions:Object.assign(Object.assign({},a.tracingOptions),ET(c))})).readableStreamBody;await void 0,e+=t-r,a.onProgress&&a.onProgress({loadedBytes:e})});return await t.do(),i}catch(p){throw l.setStatus({code:_w.ERROR,message:p.message}),p}finally{l.end()}}async downloadToFile(e,t=0,r,n={}){const{span:i,updatedOptions:o}=jT("BlobClient-downloadToFile",n);try{const e=await this.download(t,r,Object.assign(Object.assign({},n),{tracingOptions:Object.assign(Object.assign({},n.tracingOptions),ET(o))}));return e.readableStreamBody&&await void e.readableStreamBody,e.blobDownloadStream=void 0,e}catch(s){throw i.setStatus({code:_w.ERROR,message:s.message}),s}finally{i.end()}}getBlobAndContainerNamesFromUrl(){let e,t;try{const r=ab.parse(this.url);if("blob"===r.getHost().split(".")[1]){const n=r.getPath().match("/([^/]*)(/(.*))?");e=n[1],t=n[3]}else if(Fk(r)){const n=r.getPath().match("/([^/]*)/([^/]*)(/(.*))?");e=n[2],t=n[4]}else{const n=r.getPath().match("/([^/]*)(/(.*))?");e=n[1],t=n[3]}if(e=decodeURIComponent(e),t=decodeURIComponent(t),t=t.replace(/\\/g,"/"),!e)throw new Error("Provided containerName is invalid.");return{blobName:t,containerName:e}}catch(r){throw new Error("Unable to extract blobName and containerName with provided information.")}}async startCopyFromURL(e,t={}){var r,n,i;const{span:o,updatedOptions:s}=jT("BlobClient-startCopyFromURL",t);t.conditions=t.conditions||{},t.sourceConditions=t.sourceConditions||{};try{return await this.blobContext.startCopyFromURL(e,Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,metadata:t.metadata,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(r=t.conditions)||void 0===r?void 0:r.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:t.sourceConditions.ifMatch,sourceIfModifiedSince:t.sourceConditions.ifModifiedSince,sourceIfNoneMatch:t.sourceConditions.ifNoneMatch,sourceIfUnmodifiedSince:t.sourceConditions.ifUnmodifiedSince,sourceIfTags:t.sourceConditions.tagConditions},immutabilityPolicyExpiry:null===(n=t.immutabilityPolicy)||void 0===n?void 0:n.expiriesOn,immutabilityPolicyMode:null===(i=t.immutabilityPolicy)||void 0===i?void 0:i.policyMode,legalHold:t.legalHold,rehydratePriority:t.rehydratePriority,tier:FT(t.tier),blobTagsString:$k(t.tags),sealBlob:t.sealBlob},ET(s)))}catch(a){throw o.setStatus({code:_w.ERROR,message:a.message}),a}finally{o.end()}}generateSasUrl(e){return new Promise(t=>{if(!(this.credential instanceof wT))throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential");const r=_T(Object.assign({containerName:this._containerName,blobName:this._name,snapshotTime:this._snapshot,versionId:this._versionId},e),this.credential).toString();t(function(e,t){const r=ab.parse(e);let n=r.getQuery();return n?n+="&"+t:n=t,r.setQuery(n),r.toString()}(this.url,r))})}async deleteImmutabilityPolicy(e){const{span:t,updatedOptions:r}=jT("BlobClient-deleteImmutabilityPolicy",e);try{return await this.blobContext.deleteImmutabilityPolicy(Object.assign({abortSignal:null==e?void 0:e.abortSignal},ET(r)))}catch(n){throw t.setStatus({code:_w.ERROR,message:n.message}),n}finally{t.end()}}async setImmutabilityPolicy(e,t){const{span:r,updatedOptions:n}=jT("BlobClient-setImmutabilityPolicy",t);try{return await this.blobContext.setImmutabilityPolicy(Object.assign({abortSignal:null==t?void 0:t.abortSignal,immutabilityPolicyExpiry:e.expiriesOn,immutabilityPolicyMode:e.policyMode,modifiedAccessConditions:null==t?void 0:t.modifiedAccessCondition},ET(n)))}catch(i){throw r.setStatus({code:_w.ERROR,message:i.message}),i}finally{r.end()}}async setLegalHold(e,t){const{span:r,updatedOptions:n}=jT("BlobClient-setLegalHold",t);try{return await this.blobContext.setLegalHold(e,Object.assign({abortSignal:null==t?void 0:t.abortSignal},ET(n)))}catch(i){throw r.setStatus({code:_w.ERROR,message:i.message}),i}finally{r.end()}}}class aR extends sR{constructor(e,t,r,n){let i,o;if(n=n||{},bT(t))o=e,i=t;else if(ov&&t instanceof wT||t instanceof lT||Iv(t))o=e,i=xT(t,n=r);else if(t||"string"==typeof t){if(!t||"string"!=typeof t||!r||"string"!=typeof r)throw new Error("Expecting non-empty strings for containerName and blobName parameters");{const s=t,a=r,l=Dk(e);if("AccountConnString"===l.kind){if(!ov)throw new Error("Account connection string is only supported in Node.js environment");{const e=new wT(l.accountName,l.accountKey);o=zk(zk(l.url,encodeURIComponent(s)),encodeURIComponent(a)),n.proxyOptions||(n.proxyOptions=void l.proxyUri),i=xT(e,n)}}else{if("SASConnString"!==l.kind)throw new Error("Connection string must be either an Account connection string or a SAS connection string");o=zk(zk(l.url,encodeURIComponent(s)),encodeURIComponent(a))+"?"+l.accountSas,i=xT(new lT,n)}}}else o=e,i=xT(new lT,n);super(o,i),this.appendBlobContext=new ik(this.storageClientContext)}withSnapshot(e){return new aR(Bk(this.url,Ck.SNAPSHOT,0===e.length?void 0:e),this.pipeline)}async create(e={}){var t,r,n;const{span:i,updatedOptions:o}=jT("AppendBlobClient-create",e);e.conditions=e.conditions||{};try{return $T(e.customerProvidedKey,this.isHttps),await this.appendBlobContext.create(0,Object.assign({abortSignal:e.abortSignal,blobHttpHeaders:e.blobHTTPHeaders,leaseAccessConditions:e.conditions,metadata:e.metadata,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:null===(t=e.conditions)||void 0===t?void 0:t.tagConditions}),cpkInfo:e.customerProvidedKey,encryptionScope:e.encryptionScope,immutabilityPolicyExpiry:null===(r=e.immutabilityPolicy)||void 0===r?void 0:r.expiriesOn,immutabilityPolicyMode:null===(n=e.immutabilityPolicy)||void 0===n?void 0:n.policyMode,legalHold:e.legalHold,blobTagsString:$k(e.tags)},ET(o)))}catch(s){throw i.setStatus({code:_w.ERROR,message:s.message}),s}finally{i.end()}}async createIfNotExists(e={}){var t,r;const{span:n,updatedOptions:i}=jT("AppendBlobClient-createIfNotExists",e),o={ifNoneMatch:"*"};try{const e=await this.create(Object.assign(Object.assign({},i),{conditions:o}));return Object.assign(Object.assign({succeeded:!0},e),{_response:e._response})}catch(s){if("BlobAlreadyExists"===(null===(t=s.details)||void 0===t?void 0:t.errorCode))return n.setStatus({code:_w.ERROR,message:"Expected exception when creating a blob only if it does not already exist."}),Object.assign(Object.assign({succeeded:!1},null===(r=s.response)||void 0===r?void 0:r.parsedHeaders),{_response:s.response});throw n.setStatus({code:_w.ERROR,message:s.message}),s}finally{n.end()}}async seal(e={}){var t;const{span:r,updatedOptions:n}=jT("AppendBlobClient-seal",e);e.conditions=e.conditions||{};try{return await this.appendBlobContext.seal(Object.assign({abortSignal:e.abortSignal,appendPositionAccessConditions:e.conditions,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:null===(t=e.conditions)||void 0===t?void 0:t.tagConditions})},ET(n)))}catch(i){throw r.setStatus({code:_w.ERROR,message:i.message}),i}finally{r.end()}}async appendBlock(e,t,r={}){var n;const{span:i,updatedOptions:o}=jT("AppendBlobClient-appendBlock",r);r.conditions=r.conditions||{};try{return $T(r.customerProvidedKey,this.isHttps),await this.appendBlobContext.appendBlock(t,e,Object.assign({abortSignal:r.abortSignal,appendPositionAccessConditions:r.conditions,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:null===(n=r.conditions)||void 0===n?void 0:n.tagConditions}),requestOptions:{onUploadProgress:r.onProgress},transactionalContentMD5:r.transactionalContentMD5,transactionalContentCrc64:r.transactionalContentCrc64,cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope},ET(o)))}catch(s){throw i.setStatus({code:_w.ERROR,message:s.message}),s}finally{i.end()}}async appendBlockFromURL(e,t,r,n={}){var i;const{span:o,updatedOptions:s}=jT("AppendBlobClient-appendBlockFromURL",n);n.conditions=n.conditions||{},n.sourceConditions=n.sourceConditions||{};try{return $T(n.customerProvidedKey,this.isHttps),await this.appendBlobContext.appendBlockFromUrl(e,0,Object.assign({abortSignal:n.abortSignal,sourceRange:eR({offset:t,count:r}),sourceContentMD5:n.sourceContentMD5,sourceContentCrc64:n.sourceContentCrc64,leaseAccessConditions:n.conditions,appendPositionAccessConditions:n.conditions,modifiedAccessConditions:Object.assign(Object.assign({},n.conditions),{ifTags:null===(i=n.conditions)||void 0===i?void 0:i.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:n.sourceConditions.ifMatch,sourceIfModifiedSince:n.sourceConditions.ifModifiedSince,sourceIfNoneMatch:n.sourceConditions.ifNoneMatch,sourceIfUnmodifiedSince:n.sourceConditions.ifUnmodifiedSince},copySourceAuthorization:Xk(n.sourceAuthorization),cpkInfo:n.customerProvidedKey,encryptionScope:n.encryptionScope},ET(s)))}catch(a){throw o.setStatus({code:_w.ERROR,message:a.message}),a}finally{o.end()}}}class lR extends sR{constructor(e,t,r,n){let i,o;if(n=n||{},bT(t))o=e,i=t;else if(ov&&t instanceof wT||t instanceof lT||Iv(t))o=e,i=xT(t,n=r);else if(t||"string"==typeof t){if(!t||"string"!=typeof t||!r||"string"!=typeof r)throw new Error("Expecting non-empty strings for containerName and blobName parameters");{const s=t,a=r,l=Dk(e);if("AccountConnString"===l.kind){if(!ov)throw new Error("Account connection string is only supported in Node.js environment");{const e=new wT(l.accountName,l.accountKey);o=zk(zk(l.url,encodeURIComponent(s)),encodeURIComponent(a)),n.proxyOptions||(n.proxyOptions=void l.proxyUri),i=xT(e,n)}}else{if("SASConnString"!==l.kind)throw new Error("Connection string must be either an Account connection string or a SAS connection string");o=zk(zk(l.url,encodeURIComponent(s)),encodeURIComponent(a))+"?"+l.accountSas,i=xT(new lT,n)}}}else o=e,r&&"string"!=typeof r&&(n=r),i=xT(new lT,n);super(o,i),this.blockBlobContext=new pk(this.storageClientContext),this._blobContext=new xC(this.storageClientContext)}withSnapshot(e){return new lR(Bk(this.url,Ck.SNAPSHOT,0===e.length?void 0:e),this.pipeline)}async query(e,t={}){var r;$T(t.customerProvidedKey,this.isHttps);const{span:n,updatedOptions:i}=jT("BlockBlobClient-query",t);try{if(!ov)throw new Error("This operation currently is only supported in Node.js.");$T(t.customerProvidedKey,this.isHttps);const n=await this._blobContext.query(Object.assign({abortSignal:t.abortSignal,queryRequest:{queryType:"SQL",expression:e,inputSerialization:Wk(t.inputTextConfiguration),outputSerialization:Wk(t.outputTextConfiguration)},leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(r=t.conditions)||void 0===r?void 0:r.tagConditions}),cpkInfo:t.customerProvidedKey},ET(i)));return new DT(n,{abortSignal:t.abortSignal,onProgress:t.onProgress,onError:t.onError})}catch(o){throw n.setStatus({code:_w.ERROR,message:o.message}),o}finally{n.end()}}async upload(e,t,r={}){var n,i,o;r.conditions=r.conditions||{};const{span:s,updatedOptions:a}=jT("BlockBlobClient-upload",r);try{return $T(r.customerProvidedKey,this.isHttps),await this.blockBlobContext.upload(t,e,Object.assign({abortSignal:r.abortSignal,blobHttpHeaders:r.blobHTTPHeaders,leaseAccessConditions:r.conditions,metadata:r.metadata,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:null===(n=r.conditions)||void 0===n?void 0:n.tagConditions}),requestOptions:{onUploadProgress:r.onProgress},cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope,immutabilityPolicyExpiry:null===(i=r.immutabilityPolicy)||void 0===i?void 0:i.expiriesOn,immutabilityPolicyMode:null===(o=r.immutabilityPolicy)||void 0===o?void 0:o.policyMode,legalHold:r.legalHold,tier:FT(r.tier),blobTagsString:$k(r.tags)},ET(a)))}catch(l){throw s.setStatus({code:_w.ERROR,message:l.message}),l}finally{s.end()}}async syncUploadFromURL(e,t={}){var r,n,i,o,s;t.conditions=t.conditions||{};const{span:a,updatedOptions:l}=jT("BlockBlobClient-syncUploadFromURL",t);try{return $T(t.customerProvidedKey,this.isHttps),await this.blockBlobContext.putBlobFromUrl(0,e,Object.assign(Object.assign(Object.assign({},t),{blobHttpHeaders:t.blobHTTPHeaders,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:t.conditions.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:null===(r=t.sourceConditions)||void 0===r?void 0:r.ifMatch,sourceIfModifiedSince:null===(n=t.sourceConditions)||void 0===n?void 0:n.ifModifiedSince,sourceIfNoneMatch:null===(i=t.sourceConditions)||void 0===i?void 0:i.ifNoneMatch,sourceIfUnmodifiedSince:null===(o=t.sourceConditions)||void 0===o?void 0:o.ifUnmodifiedSince,sourceIfTags:null===(s=t.sourceConditions)||void 0===s?void 0:s.tagConditions},cpkInfo:t.customerProvidedKey,copySourceAuthorization:Xk(t.sourceAuthorization),tier:FT(t.tier),blobTagsString:$k(t.tags),copySourceTags:t.copySourceTags}),ET(l)))}catch(c){throw a.setStatus({code:_w.ERROR,message:c.message}),c}finally{a.end()}}async stageBlock(e,t,r,n={}){const{span:i,updatedOptions:o}=jT("BlockBlobClient-stageBlock",n);try{return $T(n.customerProvidedKey,this.isHttps),await this.blockBlobContext.stageBlock(e,r,t,Object.assign({abortSignal:n.abortSignal,leaseAccessConditions:n.conditions,requestOptions:{onUploadProgress:n.onProgress},transactionalContentMD5:n.transactionalContentMD5,transactionalContentCrc64:n.transactionalContentCrc64,cpkInfo:n.customerProvidedKey,encryptionScope:n.encryptionScope},ET(o)))}catch(s){throw i.setStatus({code:_w.ERROR,message:s.message}),s}finally{i.end()}}async stageBlockFromURL(e,t,r=0,n,i={}){const{span:o,updatedOptions:s}=jT("BlockBlobClient-stageBlockFromURL",i);try{return $T(i.customerProvidedKey,this.isHttps),await this.blockBlobContext.stageBlockFromURL(e,0,t,Object.assign({abortSignal:i.abortSignal,leaseAccessConditions:i.conditions,sourceContentMD5:i.sourceContentMD5,sourceContentCrc64:i.sourceContentCrc64,sourceRange:0!==r||n?eR({offset:r,count:n}):void 0,cpkInfo:i.customerProvidedKey,encryptionScope:i.encryptionScope,copySourceAuthorization:Xk(i.sourceAuthorization)},ET(s)))}catch(a){throw o.setStatus({code:_w.ERROR,message:a.message}),a}finally{o.end()}}async commitBlockList(e,t={}){var r,n,i;t.conditions=t.conditions||{};const{span:o,updatedOptions:s}=jT("BlockBlobClient-commitBlockList",t);try{return $T(t.customerProvidedKey,this.isHttps),await this.blockBlobContext.commitBlockList({latest:e},Object.assign({abortSignal:t.abortSignal,blobHttpHeaders:t.blobHTTPHeaders,leaseAccessConditions:t.conditions,metadata:t.metadata,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(r=t.conditions)||void 0===r?void 0:r.tagConditions}),cpkInfo:t.customerProvidedKey,encryptionScope:t.encryptionScope,immutabilityPolicyExpiry:null===(n=t.immutabilityPolicy)||void 0===n?void 0:n.expiriesOn,immutabilityPolicyMode:null===(i=t.immutabilityPolicy)||void 0===i?void 0:i.policyMode,legalHold:t.legalHold,tier:FT(t.tier),blobTagsString:$k(t.tags)},ET(s)))}catch(a){throw o.setStatus({code:_w.ERROR,message:a.message}),a}finally{o.end()}}async getBlockList(e,t={}){var r;const{span:n,updatedOptions:i}=jT("BlockBlobClient-getBlockList",t);try{const n=await this.blockBlobContext.getBlockList(e,Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(r=t.conditions)||void 0===r?void 0:r.tagConditions})},ET(i)));return n.committedBlocks||(n.committedBlocks=[]),n.uncommittedBlocks||(n.uncommittedBlocks=[]),n}catch(o){throw n.setStatus({code:_w.ERROR,message:o.message}),o}finally{n.end()}}async uploadData(e,t={}){const{span:r,updatedOptions:n}=jT("BlockBlobClient-uploadData",t);try{if(ov){let t;return t=e instanceof Buffer?e:e instanceof ArrayBuffer?Buffer.from(e):Buffer.from(e.buffer,e.byteOffset,e.byteLength),this.uploadSeekableInternal((e,r)=>t.slice(e,e+r),t.byteLength,n)}{const t=new Blob([e]);return this.uploadSeekableInternal((e,r)=>t.slice(e,e+r),t.size,n)}}catch(i){throw r.setStatus({code:_w.ERROR,message:i.message}),i}finally{r.end()}}async uploadBrowserData(e,t={}){const{span:r,updatedOptions:n}=jT("BlockBlobClient-uploadBrowserData",t);try{const t=new Blob([e]);return await this.uploadSeekableInternal((e,r)=>t.slice(e,e+r),t.size,n)}catch(i){throw r.setStatus({code:_w.ERROR,message:i.message}),i}finally{r.end()}}async uploadSeekableInternal(e,t,r={}){if(r.blockSize||(r.blockSize=0),r.blockSize<0||r.blockSize>Nk)throw new RangeError("blockSize option must be >= 0 and <= 4194304000");if(0===r.maxSingleShotSize||r.maxSingleShotSize||(r.maxSingleShotSize=Sk),r.maxSingleShotSize<0||r.maxSingleShotSize>Sk)throw new RangeError("maxSingleShotSize option must be >= 0 and <= 268435456");if(0===r.blockSize){if(t>2097152e8)throw new RangeError(`${t} is too larger to upload to a block blob.`);t>r.maxSingleShotSize&&(r.blockSize=Math.ceil(t/jk),r.blockSize<Ek&&(r.blockSize=Ek))}r.blobHTTPHeaders||(r.blobHTTPHeaders={}),r.conditions||(r.conditions={});const{span:n,updatedOptions:i}=jT("BlockBlobClient-uploadSeekableInternal",r);try{if(t<=r.maxSingleShotSize)return await this.upload(e(0,t),t,i);const n=Math.floor((t-1)/r.blockSize)+1;if(n>jk)throw new RangeError("The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= 50000");const o=[],s=Gg();let a=0;const l=new iR(r.concurrency);for(let c=0;c<n;c++)l.addOperation(async()=>{const l=Uk(s,c),u=r.blockSize*c,p=(c===n-1?t:u+r.blockSize)-u;o.push(l),await this.stageBlock(l,e(u,p),p,{abortSignal:r.abortSignal,conditions:r.conditions,encryptionScope:r.encryptionScope,tracingOptions:i.tracingOptions}),a+=p,r.onProgress&&r.onProgress({loadedBytes:a})});return await l.do(),this.commitBlockList(o,i)}catch(o){throw n.setStatus({code:_w.ERROR,message:o.message}),o}finally{n.end()}}async uploadFile(e,t={}){const{span:r,updatedOptions:n}=jT("BlockBlobClient-uploadFile",t);try{const e=(await void 0).size;return await this.uploadSeekableInternal((e,t)=>()=>{},e,Object.assign(Object.assign({},t),{tracingOptions:Object.assign(Object.assign({},t.tracingOptions),ET(n))}))}catch(i){throw r.setStatus({code:_w.ERROR,message:i.message}),i}finally{r.end()}}async uploadStream(e,t=8388608,r=5,n={}){n.blobHTTPHeaders||(n.blobHTTPHeaders={}),n.conditions||(n.conditions={});const{span:i,updatedOptions:o}=jT("BlockBlobClient-uploadStream",n);try{let i=0;const s=Gg();let a=0;const l=[],c=new oR(e,t,r,async(e,t)=>{const r=Uk(s,i);l.push(r),i++,await this.stageBlock(r,e,t,{conditions:n.conditions,encryptionScope:n.encryptionScope,tracingOptions:o.tracingOptions}),a+=t,n.onProgress&&n.onProgress({loadedBytes:a})},Math.ceil(r/4*3));return await c.do(),await this.commitBlockList(l,Object.assign(Object.assign({},n),{tracingOptions:Object.assign(Object.assign({},n.tracingOptions),ET(o))}))}catch(s){throw i.setStatus({code:_w.ERROR,message:s.message}),s}finally{i.end()}}}class cR extends sR{constructor(e,t,r,n){let i,o;if(n=n||{},bT(t))o=e,i=t;else if(ov&&t instanceof wT||t instanceof lT||Iv(t))o=e,i=xT(t,n=r);else if(t||"string"==typeof t){if(!t||"string"!=typeof t||!r||"string"!=typeof r)throw new Error("Expecting non-empty strings for containerName and blobName parameters");{const s=t,a=r,l=Dk(e);if("AccountConnString"===l.kind){if(!ov)throw new Error("Account connection string is only supported in Node.js environment");{const e=new wT(l.accountName,l.accountKey);o=zk(zk(l.url,encodeURIComponent(s)),encodeURIComponent(a)),n.proxyOptions||(n.proxyOptions=void l.proxyUri),i=xT(e,n)}}else{if("SASConnString"!==l.kind)throw new Error("Connection string must be either an Account connection string or a SAS connection string");o=zk(zk(l.url,encodeURIComponent(s)),encodeURIComponent(a))+"?"+l.accountSas,i=xT(new lT,n)}}}else o=e,i=xT(new lT,n);super(o,i),this.pageBlobContext=new GC(this.storageClientContext)}withSnapshot(e){return new cR(Bk(this.url,Ck.SNAPSHOT,0===e.length?void 0:e),this.pipeline)}async create(e,t={}){var r,n,i;t.conditions=t.conditions||{};const{span:o,updatedOptions:s}=jT("PageBlobClient-create",t);try{return $T(t.customerProvidedKey,this.isHttps),await this.pageBlobContext.create(0,e,Object.assign({abortSignal:t.abortSignal,blobHttpHeaders:t.blobHTTPHeaders,blobSequenceNumber:t.blobSequenceNumber,leaseAccessConditions:t.conditions,metadata:t.metadata,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(r=t.conditions)||void 0===r?void 0:r.tagConditions}),cpkInfo:t.customerProvidedKey,encryptionScope:t.encryptionScope,immutabilityPolicyExpiry:null===(n=t.immutabilityPolicy)||void 0===n?void 0:n.expiriesOn,immutabilityPolicyMode:null===(i=t.immutabilityPolicy)||void 0===i?void 0:i.policyMode,legalHold:t.legalHold,tier:FT(t.tier),blobTagsString:$k(t.tags)},ET(s)))}catch(a){throw o.setStatus({code:_w.ERROR,message:a.message}),a}finally{o.end()}}async createIfNotExists(e,t={}){var r,n;const{span:i,updatedOptions:o}=jT("PageBlobClient-createIfNotExists",t);try{const r={ifNoneMatch:"*"},n=await this.create(e,Object.assign(Object.assign({},t),{conditions:r,tracingOptions:o.tracingOptions}));return Object.assign(Object.assign({succeeded:!0},n),{_response:n._response})}catch(s){if("BlobAlreadyExists"===(null===(r=s.details)||void 0===r?void 0:r.errorCode))return i.setStatus({code:_w.ERROR,message:"Expected exception when creating a blob only if it does not already exist."}),Object.assign(Object.assign({succeeded:!1},null===(n=s.response)||void 0===n?void 0:n.parsedHeaders),{_response:s.response});throw i.setStatus({code:_w.ERROR,message:s.message}),s}finally{i.end()}}async uploadPages(e,t,r,n={}){var i;n.conditions=n.conditions||{};const{span:o,updatedOptions:s}=jT("PageBlobClient-uploadPages",n);try{return $T(n.customerProvidedKey,this.isHttps),await this.pageBlobContext.uploadPages(r,e,Object.assign({abortSignal:n.abortSignal,leaseAccessConditions:n.conditions,modifiedAccessConditions:Object.assign(Object.assign({},n.conditions),{ifTags:null===(i=n.conditions)||void 0===i?void 0:i.tagConditions}),requestOptions:{onUploadProgress:n.onProgress},range:eR({offset:t,count:r}),sequenceNumberAccessConditions:n.conditions,transactionalContentMD5:n.transactionalContentMD5,transactionalContentCrc64:n.transactionalContentCrc64,cpkInfo:n.customerProvidedKey,encryptionScope:n.encryptionScope},ET(s)))}catch(a){throw o.setStatus({code:_w.ERROR,message:a.message}),a}finally{o.end()}}async uploadPagesFromURL(e,t,r,n,i={}){var o;i.conditions=i.conditions||{},i.sourceConditions=i.sourceConditions||{};const{span:s,updatedOptions:a}=jT("PageBlobClient-uploadPagesFromURL",i);try{return $T(i.customerProvidedKey,this.isHttps),await this.pageBlobContext.uploadPagesFromURL(e,eR({offset:t,count:n}),0,eR({offset:r,count:n}),Object.assign({abortSignal:i.abortSignal,sourceContentMD5:i.sourceContentMD5,sourceContentCrc64:i.sourceContentCrc64,leaseAccessConditions:i.conditions,sequenceNumberAccessConditions:i.conditions,modifiedAccessConditions:Object.assign(Object.assign({},i.conditions),{ifTags:null===(o=i.conditions)||void 0===o?void 0:o.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:i.sourceConditions.ifMatch,sourceIfModifiedSince:i.sourceConditions.ifModifiedSince,sourceIfNoneMatch:i.sourceConditions.ifNoneMatch,sourceIfUnmodifiedSince:i.sourceConditions.ifUnmodifiedSince},cpkInfo:i.customerProvidedKey,encryptionScope:i.encryptionScope,copySourceAuthorization:Xk(i.sourceAuthorization)},ET(a)))}catch(l){throw s.setStatus({code:_w.ERROR,message:l.message}),l}finally{s.end()}}async clearPages(e=0,t,r={}){var n;r.conditions=r.conditions||{};const{span:i,updatedOptions:o}=jT("PageBlobClient-clearPages",r);try{return await this.pageBlobContext.clearPages(0,Object.assign({abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:null===(n=r.conditions)||void 0===n?void 0:n.tagConditions}),range:eR({offset:e,count:t}),sequenceNumberAccessConditions:r.conditions,cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope},ET(o)))}catch(s){throw i.setStatus({code:_w.ERROR,message:s.message}),s}finally{i.end()}}async getPageRanges(e=0,t,r={}){var n;r.conditions=r.conditions||{};const{span:i,updatedOptions:o}=jT("PageBlobClient-getPageRanges",r);try{return await this.pageBlobContext.getPageRanges(Object.assign({abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:null===(n=r.conditions)||void 0===n?void 0:n.tagConditions}),range:eR({offset:e,count:t})},ET(o))).then(VT)}catch(s){throw i.setStatus({code:_w.ERROR,message:s.message}),s}finally{i.end()}}async listPageRangesSegment(e=0,t,r,n={}){var i;const{span:o,updatedOptions:s}=jT("PageBlobClient-getPageRangesSegment",n);try{return await this.pageBlobContext.getPageRanges(Object.assign({abortSignal:n.abortSignal,leaseAccessConditions:n.conditions,modifiedAccessConditions:Object.assign(Object.assign({},n.conditions),{ifTags:null===(i=n.conditions)||void 0===i?void 0:i.tagConditions}),range:eR({offset:e,count:t}),marker:r,maxPageSize:n.maxPageSize},ET(s)))}catch(a){throw o.setStatus({code:_w.ERROR,message:a.message}),a}finally{o.end()}}listPageRangeItemSegments(e=0,t,r,n={}){return Ns(this,arguments,function*(){let i;if(r||void 0===r)do{i=yield Ss(this.listPageRangesSegment(e,t,r,n)),r=i.continuationToken,yield yield Ss(yield Ss(i))}while(r)})}listPageRangeItems(e=0,t,r={}){return Ns(this,arguments,function*(){var n,i;try{for(var o,s=Es(this.listPageRangeItemSegments(e,t,void 0,r));!(o=yield Ss(s.next())).done;){const e=o.value;yield Ss(yield*js(Es(Qk(e))))}}catch(a){n={error:a}}finally{try{o&&!o.done&&(i=s.return)&&(yield Ss(i.call(s)))}finally{if(n)throw n.error}}})}listPageRanges(e=0,t,r={}){r.conditions=r.conditions||{};const n=this.listPageRangeItems(e,t,r);return{next:()=>n.next(),[Symbol.asyncIterator](){return this},byPage:(n={})=>this.listPageRangeItemSegments(e,t,n.continuationToken,Object.assign({maxPageSize:n.maxPageSize},r))}}async getPageRangesDiff(e,t,r,n={}){var i;n.conditions=n.conditions||{};const{span:o,updatedOptions:s}=jT("PageBlobClient-getPageRangesDiff",n);try{return await this.pageBlobContext.getPageRangesDiff(Object.assign({abortSignal:n.abortSignal,leaseAccessConditions:n.conditions,modifiedAccessConditions:Object.assign(Object.assign({},n.conditions),{ifTags:null===(i=n.conditions)||void 0===i?void 0:i.tagConditions}),prevsnapshot:r,range:eR({offset:e,count:t})},ET(s))).then(VT)}catch(a){throw o.setStatus({code:_w.ERROR,message:a.message}),a}finally{o.end()}}async listPageRangesDiffSegment(e,t,r,n,i){var o;const{span:s,updatedOptions:a}=jT("PageBlobClient-getPageRangesDiffSegment",i);try{return await this.pageBlobContext.getPageRangesDiff(Object.assign({abortSignal:null==i?void 0:i.abortSignal,leaseAccessConditions:null==i?void 0:i.conditions,modifiedAccessConditions:Object.assign(Object.assign({},null==i?void 0:i.conditions),{ifTags:null===(o=null==i?void 0:i.conditions)||void 0===o?void 0:o.tagConditions}),prevsnapshot:r,range:eR({offset:e,count:t}),marker:n,maxPageSize:null==i?void 0:i.maxPageSize},ET(a)))}catch(l){throw s.setStatus({code:_w.ERROR,message:l.message}),l}finally{s.end()}}listPageRangeDiffItemSegments(e,t,r,n,i){return Ns(this,arguments,function*(){let o;if(n||void 0===n)do{o=yield Ss(this.listPageRangesDiffSegment(e,t,r,n,i)),n=o.continuationToken,yield yield Ss(yield Ss(o))}while(n)})}listPageRangeDiffItems(e,t,r,n){return Ns(this,arguments,function*(){var i,o;try{for(var s,a=Es(this.listPageRangeDiffItemSegments(e,t,r,void 0,n));!(s=yield Ss(a.next())).done;){const e=s.value;yield Ss(yield*js(Es(Qk(e))))}}catch(l){i={error:l}}finally{try{s&&!s.done&&(o=a.return)&&(yield Ss(o.call(a)))}finally{if(i)throw i.error}}})}listPageRangesDiff(e,t,r,n={}){n.conditions=n.conditions||{};const i=this.listPageRangeDiffItems(e,t,r,Object.assign({},n));return{next:()=>i.next(),[Symbol.asyncIterator](){return this},byPage:(i={})=>this.listPageRangeDiffItemSegments(e,t,r,i.continuationToken,Object.assign({maxPageSize:i.maxPageSize},n))}}async getPageRangesDiffForManagedDisks(e,t,r,n={}){var i;n.conditions=n.conditions||{};const{span:o,updatedOptions:s}=jT("PageBlobClient-GetPageRangesDiffForManagedDisks",n);try{return await this.pageBlobContext.getPageRangesDiff(Object.assign({abortSignal:n.abortSignal,leaseAccessConditions:n.conditions,modifiedAccessConditions:Object.assign(Object.assign({},n.conditions),{ifTags:null===(i=n.conditions)||void 0===i?void 0:i.tagConditions}),prevSnapshotUrl:r,range:eR({offset:e,count:t})},ET(s))).then(VT)}catch(a){throw o.setStatus({code:_w.ERROR,message:a.message}),a}finally{o.end()}}async resize(e,t={}){var r;t.conditions=t.conditions||{};const{span:n,updatedOptions:i}=jT("PageBlobClient-resize",t);try{return await this.pageBlobContext.resize(e,Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(r=t.conditions)||void 0===r?void 0:r.tagConditions}),encryptionScope:t.encryptionScope},ET(i)))}catch(o){throw n.setStatus({code:_w.ERROR,message:o.message}),o}finally{n.end()}}async updateSequenceNumber(e,t,r={}){var n;r.conditions=r.conditions||{};const{span:i,updatedOptions:o}=jT("PageBlobClient-updateSequenceNumber",r);try{return await this.pageBlobContext.updateSequenceNumber(e,Object.assign({abortSignal:r.abortSignal,blobSequenceNumber:t,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:null===(n=r.conditions)||void 0===n?void 0:n.tagConditions})},ET(o)))}catch(s){throw i.setStatus({code:_w.ERROR,message:s.message}),s}finally{i.end()}}async startCopyIncremental(e,t={}){var r;const{span:n,updatedOptions:i}=jT("PageBlobClient-startCopyIncremental",t);try{return await this.pageBlobContext.copyIncremental(e,Object.assign({abortSignal:t.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(r=t.conditions)||void 0===r?void 0:r.tagConditions})},ET(i)))}catch(o){throw n.setStatus({code:_w.ERROR,message:o.message}),o}finally{n.end()}}}function uR(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var pR,dR={exports:{}};var mR,fR=(pR||(pR=1,mR=window,dR.exports=function(){function e(t,r,n){function i(s,a){if(!r[s]){if(!t[s]){if(!a&&uR)return uR(s);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[s]={exports:{}};t[s][0].call(c.exports,function(e){return i(t[s][1][e]||e)},c,c.exports,e,t,r,n)}return r[s].exports}for(var o=uR,s=0;s<n.length;s++)i(n[s]);return i}return e}()({1:[function(e,t,r){var n=e("./browser/client");n.Buffer=e("buffer").Buffer,n.urllib=e("../shims/xhr"),n.version=e("./browser/version").version,t.exports=n},{"../shims/xhr":546,"./browser/client":3,"./browser/version":6,buffer:103}],2:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator")),o=n(e("@babel/runtime/helpers/asyncToGenerator"));e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.array.slice.js");var s=e("assert"),a=e("../common/utils/checkBucketName").checkBucketName,l=r;function c(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}function u(e){return e?c(e)?e:[e]:[]}l.useBucket=function(e){return a(e),this.options.bucket=e,this},l.setBucket=function(e){return a(e),this.options.bucket=e,this},l.getBucket=function(){return this.options.bucket},l.deleteBucket=function(){var e=(0,o.default)(i.default.mark(function e(t,r){var n,o;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=this._bucketRequestParams("DELETE",t,"",r),e.next=3,this.request(n);case 3:if(200!==(o=e.sent).status&&204!==o.status){e.next=6;break}return e.abrupt("return",{res:o.res});case 6:return e.next=8,this.requestError(o);case 8:throw e.sent;case 9:case"end":return e.stop()}},e,this)}));function t(t,r){return e.apply(this,arguments)}return t}(),l.putBucketACL=function(){var e=(0,o.default)(i.default.mark(function e(t,r,n){var o,s;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(o=this._bucketRequestParams("PUT",t,"acl",n)).headers={"x-oss-acl":r},o.successStatuses=[200],e.next=5,this.request(o);case 5:return s=e.sent,e.abrupt("return",{bucket:s.headers.location&&s.headers.location.substring(1)||null,res:s.res});case 7:case"end":return e.stop()}},e,this)}));function t(t,r,n){return e.apply(this,arguments)}return t}(),l.getBucketACL=function(){var e=(0,o.default)(i.default.mark(function e(t,r){var n,o;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(n=this._bucketRequestParams("GET",t,"acl",r)).successStatuses=[200],n.xmlResponse=!0,e.next=5,this.request(n);case 5:return o=e.sent,e.abrupt("return",{acl:o.data.AccessControlList.Grant,owner:{id:o.data.Owner.ID,displayName:o.data.Owner.DisplayName},res:o.res});case 7:case"end":return e.stop()}},e,this)}));function t(t,r){return e.apply(this,arguments)}return t}(),l.putBucketLogging=function(){var e=(0,o.default)(i.default.mark(function e(t,r,n){var o,s,a;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=this._bucketRequestParams("PUT",t,"logging",n),s='<?xml version="1.0" encoding="UTF-8"?>\n<BucketLoggingStatus>\n<LoggingEnabled>\n<TargetBucket>'.concat(t,"</TargetBucket>\n"),r&&(s+="<TargetPrefix>".concat(r,"</TargetPrefix>\n")),s+="</LoggingEnabled>\n</BucketLoggingStatus>",o.content=s,o.mime="xml",o.successStatuses=[200],e.next=9,this.request(o);case 9:return a=e.sent,e.abrupt("return",{res:a.res});case 11:case"end":return e.stop()}},e,this)}));function t(t,r,n){return e.apply(this,arguments)}return t}(),l.getBucketLogging=function(){var e=(0,o.default)(i.default.mark(function e(t,r){var n,o,s;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(n=this._bucketRequestParams("GET",t,"logging",r)).successStatuses=[200],n.xmlResponse=!0,e.next=5,this.request(n);case 5:return o=e.sent,s=o.data.LoggingEnabled,e.abrupt("return",{enable:!!s,prefix:s&&s.TargetPrefix||null,res:o.res});case 8:case"end":return e.stop()}},e,this)}));function t(t,r){return e.apply(this,arguments)}return t}(),l.deleteBucketLogging=function(){var e=(0,o.default)(i.default.mark(function e(t,r){var n,o;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(n=this._bucketRequestParams("DELETE",t,"logging",r)).successStatuses=[204,200],e.next=4,this.request(n);case 4:return o=e.sent,e.abrupt("return",{res:o.res});case 6:case"end":return e.stop()}},e,this)}));function t(t,r){return e.apply(this,arguments)}return t}(),l.putBucketCORS=function(){var e=(0,o.default)(i.default.mark(function e(t,r,n){var o,a,l,c,p,d,m,f,h,y;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(s((r=r||[]).length,"rules is required"),r.forEach(function(e){s(e.allowedOrigin,"allowedOrigin is required"),s(e.allowedMethod,"allowedMethod is required")}),o=this._bucketRequestParams("PUT",t,"cors",n),a='<?xml version="1.0" encoding="UTF-8"?>\n<CORSConfiguration>',l=function(e){a+="<AllowedOrigin>".concat(e,"</AllowedOrigin>")},c=function(e){a+="<AllowedMethod>".concat(e,"</AllowedMethod>")},p=function(e){a+="<AllowedHeader>".concat(e,"</AllowedHeader>")},d=function(e){a+="<ExposeHeader>".concat(e,"</ExposeHeader>")},m=0,f=r.length;m<f;m++)h=r[m],a+="<CORSRule>",u(h.allowedOrigin).forEach(l),u(h.allowedMethod).forEach(c),u(h.allowedHeader).forEach(p),u(h.exposeHeader).forEach(d),h.maxAgeSeconds&&(a+="<MaxAgeSeconds>".concat(h.maxAgeSeconds,"</MaxAgeSeconds>")),a+="</CORSRule>";return a+="</CORSConfiguration>",o.content=a,o.mime="xml",o.successStatuses=[200],e.next=16,this.request(o);case 16:return y=e.sent,e.abrupt("return",{res:y.res});case 18:case"end":return e.stop()}},e,this)}));function t(t,r,n){return e.apply(this,arguments)}return t}(),l.getBucketCORS=function(){var e=(0,o.default)(i.default.mark(function e(t,r){var n,o,s,a;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(n=this._bucketRequestParams("GET",t,"cors",r)).successStatuses=[200],n.xmlResponse=!0,e.next=5,this.request(n);case 5:return o=e.sent,s=[],o.data&&o.data.CORSRule&&(c(a=o.data.CORSRule)||(a=[a]),a.forEach(function(e){var t={};Object.keys(e).forEach(function(r){t[r.slice(0,1).toLowerCase()+r.slice(1,r.length)]=e[r]}),s.push(t)})),e.abrupt("return",{rules:s,res:o.res});case 9:case"end":return e.stop()}},e,this)}));function t(t,r){return e.apply(this,arguments)}return t}(),l.deleteBucketCORS=function(){var e=(0,o.default)(i.default.mark(function e(t,r){var n,o;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(n=this._bucketRequestParams("DELETE",t,"cors",r)).successStatuses=[204],e.next=4,this.request(n);case 4:return o=e.sent,e.abrupt("return",{res:o.res});case 6:case"end":return e.stop()}},e,this)}));function t(t,r){return e.apply(this,arguments)}return t}(),l.putBucketReferer=function(){var e=(0,o.default)(i.default.mark(function e(t,r,n,o){var s,a,l,c;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(s=this._bucketRequestParams("PUT",t,"referer",o),a='<?xml version="1.0" encoding="UTF-8"?>\n<RefererConfiguration>\n',a+=" <AllowEmptyReferer>".concat(r?"true":"false","</AllowEmptyReferer>\n"),n&&n.length>0){for(a+=" <RefererList>\n",l=0;l<n.length;l++)a+=" <Referer>".concat(n[l],"</Referer>\n");a+=" </RefererList>\n"}else a+=" <RefererList />\n";return a+="</RefererConfiguration>",s.content=a,s.mime="xml",s.successStatuses=[200],e.next=10,this.request(s);case 10:return c=e.sent,e.abrupt("return",{res:c.res});case 12:case"end":return e.stop()}},e,this)}));function t(t,r,n,i){return e.apply(this,arguments)}return t}(),l.getBucketReferer=function(){var e=(0,o.default)(i.default.mark(function e(t,r){var n,o,s;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(n=this._bucketRequestParams("GET",t,"referer",r)).successStatuses=[200],n.xmlResponse=!0,e.next=5,this.request(n);case 5:return o=e.sent,(s=o.data.RefererList.Referer||null)&&(c(s)||(s=[s])),e.abrupt("return",{allowEmpty:"true"===o.data.AllowEmptyReferer,referers:s,res:o.res});case 9:case"end":return e.stop()}},e,this)}));function t(t,r){return e.apply(this,arguments)}return t}(),l.deleteBucketReferer=function(){var e=(0,o.default)(i.default.mark(function e(t,r){return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.putBucketReferer(t,!0,null,r);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));function t(t,r){return e.apply(this,arguments)}return t}(),l._bucketRequestParams=function(e,t,r,n){return{method:e,bucket:t,subres:r,additionalHeaders:n&&n.additionalHeaders,timeout:n&&n.timeout,ctx:n&&n.ctx}}},{"../common/utils/checkBucketName":53,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,assert:95,"core-js/modules/es.array.slice.js":319,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.to-string.js":339,"core-js/modules/web.dom-collections.for-each.js":380}],3:[function(e,t,r){(function(r,n){(function(){var i=e("@babel/runtime/helpers/interopRequireDefault"),o=i(e("@babel/runtime/regenerator")),s=i(e("@babel/runtime/helpers/asyncToGenerator"));e("core-js/modules/es.function.name.js"),e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.array.includes.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.symbol.js"),e("core-js/modules/es.symbol.description.js"),e("core-js/modules/es.array.slice.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.promise.js"),e("core-js/modules/es.regexp.to-string.js");var a=e("debug")("ali-oss"),l=e("xml2js"),c=e("agentkeepalive"),u=e("merge-descriptors"),p=e("platform"),d=e("utility"),m=e("urllib"),f=e("./version"),h=e("bowser"),y=e("../common/signUtils"),g=e("../common/client/initOptions"),b=e("../common/utils/createRequest").createRequest,v=e("../common/utils/encoder").encoder,x=e("../common/client/getReqUrl").getReqUrl,w=e("../common/utils/setSTSToken").setSTSToken,S=e("../common/utils/retry").retry,N=e("../common/utils/isFunction").isFunction,j=e("../common/utils/getStandardRegion").getStandardRegion,E=new c;function C(){var e=p.name,t=p.version;e&&e.toLowerCase&&"ie"===e.toLowerCase()&&t.split(".")[0]}function k(){return location&&"https:"===location.protocol}function T(e,t){if(C(),!(this instanceof T))return new T(e,t);e&&e.inited?this.options=e:this.options=T.initOptions(e),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=m,this.agent=this.options.agent||E),this.ctx=t,this.userAgent=this._getUserAgent(),this.stsTokenFreshTime=new Date,this.options.amendTimeSkewed=0}t.exports=T,T.initOptions=function(e){e.stsToken;var t=Object.assign({secure:k(),useFetch:!1},e);return g(t)};var R=T.prototype;function O(e){return P.apply(this,arguments)}function P(){return(P=(0,s.default)(o.default.mark(function e(t){var r,n,i,s,a,l;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.options.stsToken||!N(this.options.refreshSTSToken)){e.next=3;break}return e.next=3,w.call(this);case 3:return r=b.call(this,t),this.options.useFetch||(r.params.mode="disable-fetch"),s=!!t.stream,e.prev=6,e.next=9,this.urllib.request(r.url,r.params);case 9:n=e.sent,this.debug("response %s %s, got %s, headers: %j",t.method,r.url,n.status,n.headers,"info"),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(6),i=e.t0;case 16:if(!n||!t.successStatuses||-1!==t.successStatuses.indexOf(n.status)){e.next=28;break}return e.next=19,this.requestError(n);case 19:if("RequestTimeTooSkewed"!==(a=e.sent).code||s){e.next=25;break}return this.options.amendTimeSkewed=+new Date(a.serverTime)-new Date,e.next=24,this.request(t);case 24:return e.abrupt("return",e.sent);case 25:a.params=t,e.next=32;break;case 28:if(!i){e.next=32;break}return e.next=31,this.requestError(i);case 31:a=e.sent;case 32:if(!a){e.next=34;break}throw a;case 34:if(!t.xmlResponse){e.next=39;break}return e.next=37,this.parseXML(n.data);case 37:l=e.sent,n.data=l;case 39:return e.abrupt("return",n);case 40:case"end":return e.stop()}},e,this,[[6,13]])}))).apply(this,arguments)}R.debug=a,u(R,e("./object")),u(R,e("./bucket")),u(R,e("../common/bucket/getBucketWebsite")),u(R,e("../common/bucket/putBucketWebsite")),u(R,e("../common/bucket/deleteBucketWebsite")),u(R,e("../common/bucket/getBucketLifecycle")),u(R,e("../common/bucket/putBucketLifecycle")),u(R,e("../common/bucket/deleteBucketLifecycle")),u(R,e("../common/bucket/putBucketVersioning")),u(R,e("../common/bucket/getBucketVersioning")),u(R,e("../common/bucket/getBucketInventory")),u(R,e("../common/bucket/deleteBucketInventory")),u(R,e("../common/bucket/listBucketInventory")),u(R,e("../common/bucket/putBucketInventory")),u(R,e("../common/bucket/abortBucketWorm")),u(R,e("../common/bucket/completeBucketWorm")),u(R,e("../common/bucket/extendBucketWorm")),u(R,e("../common/bucket/getBucketWorm")),u(R,e("../common/bucket/initiateBucketWorm")),u(R,e("./managed-upload")),u(R,e("../common/multipart-copy")),u(R,e("../common/multipart")),u(R,e("../common/parallel")),R.signature=function(e){return this.debug("authorization stringToSign: %s",e,"info"),y.computeSignature(this.options.accessKeySecret,e,this.options.headerEncoding)},R._getReqUrl=x,R.authorization=function(e,t,r,n){var i=y.buildCanonicalString(e.toUpperCase(),t,{headers:n,parameters:r});return y.authorization(this.options.accessKeyId,this.options.accessKeySecret,i,this.options.headerEncoding)},R.authorizationV4=function(e,t,r,n,i){return y.authorizationV4(this.options.accessKeyId,this.options.accessKeySecret,j(this.options.region),e,t,r,n,i,this.options.headerEncoding)},R.request=function(){var e=(0,s.default)(o.default.mark(function e(t){var r=this;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.options.retryMax){e.next=6;break}return e.next=3,S(O.bind(this),this.options.retryMax,{errorHandler:function(e){return!!function(e){if(t.stream)return!1;var n=[-1,-2].includes(e.status),i=r.options.requestErrorRetryHandle||function(){return!0};return n&&i(e)}(e)}})(t);case 3:return e.abrupt("return",e.sent);case 6:return e.abrupt("return",O.call(this,t));case 7:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),R._getResource=function(e){var t="/";return e.bucket&&(t+="".concat(e.bucket,"/")),e.object&&(t+=v(e.object,this.options.headerEncoding)),t},R._escape=function(e){return d.encodeURIComponent(e).replace(/%2F/g,"/")},R._getUserAgent=function(){var e=n&&n.browser?"js":"nodejs",t="aliyun-sdk-".concat(e,"/").concat(f.version),r=p.description;return!r&&n&&(r="Node.js ".concat(n.version.slice(1)," on ").concat(n.platform," ").concat(n.arch)),this._checkUserAgent("".concat(t," ").concat(r))},R._checkUserAgent=function(e){return e.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta")},R.checkBrowserAndVersion=function(e,t){return h.name===e&&h.version.split(".")[0]===t},R.parseXML=function(e){return new Promise(function(t,n){r.isBuffer(e)&&(e=e.toString()),l.parseString(e,{explicitRoot:!1,explicitArray:!1},function(e,r){e?n(e):t(r)})})},R.requestError=function(){var e=(0,s.default)(o.default.mark(function e(t){var r,n,i,a,l,c=this;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=null,n=function(){var e=(0,s.default)(o.default.mark(function e(n){var i,s;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.parseXML(n);case 3:if(e.t0=e.sent,e.t0){e.next=6;break}e.t0={};case 6:i=e.t0,e.next=16;break;case 9:return e.prev=9,e.t1=e.catch(0),c.debug(n,"error"),e.t1.message+="\nraw xml: ".concat(n),e.t1.status=t.status,e.t1.requestId=t.headers&&t.headers["x-oss-request-id"],e.abrupt("return",e.t1);case 16:return s=i.Message||"unknow request error, status: ".concat(t.status),i.Condition&&(s+=" (condition: ".concat(i.Condition,")")),(r=new Error(s)).name=i.Code?"".concat(i.Code,"Error"):"UnknownError",r.status=t.status,r.code=i.Code,r.ecCode=i.EC,r.requestId=i.RequestId,r.hostId=i.HostId,r.serverTime=i.ServerTime,e.abrupt("return",r);case 27:case"end":return e.stop()}},e,null,[[0,9]])}));return function(t){return e.apply(this,arguments)}}(),t.data&&t.data.length){e.next=38;break}if(-1!==t.status&&-2!==t.status){e.next=10;break}(r=new Error(t.message)).name=t.name,r.status=t.status,r.code=t.name,e.next=36;break;case 10:if(404!==t.status){e.next=17;break}(r=new Error("Object not exists")).name="NoSuchKeyError",r.status=404,r.code="NoSuchKey",e.next=34;break;case 17:if(412!==t.status){e.next=24;break}(r=new Error("Pre condition failed")).name="PreconditionFailedError",r.status=412,r.code="PreconditionFailed",e.next=34;break;case 24:if((r=new Error("Unknow error, status: ".concat(t.status))).name="UnknownError",r.status=t.status,r.res=t,!(i=t.headers&&t.headers["x-oss-err"])){e.next=34;break}return a=atob(i),e.next=33,n(a);case 33:r=e.sent;case 34:r.requestId=t.headers&&t.headers["x-oss-request-id"],r.host="";case 36:e.next=43;break;case 38:return l=String(t.data),this.debug("request response error data: %s",l,"error"),e.next=42,n(l);case 42:r=e.sent;case 43:return this.debug("generate error %j",r,"error"),e.abrupt("return",r);case 45:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()}).call(this)}).call(this,{isBuffer:e("../../node_modules/is-buffer/index.js")},e("_process"))},{"../../node_modules/is-buffer/index.js":409,"../common/bucket/abortBucketWorm":7,"../common/bucket/completeBucketWorm":8,"../common/bucket/deleteBucketInventory":9,"../common/bucket/deleteBucketLifecycle":10,"../common/bucket/deleteBucketWebsite":11,"../common/bucket/extendBucketWorm":12,"../common/bucket/getBucketInventory":13,"../common/bucket/getBucketLifecycle":14,"../common/bucket/getBucketVersioning":15,"../common/bucket/getBucketWebsite":16,"../common/bucket/getBucketWorm":17,"../common/bucket/initiateBucketWorm":18,"../common/bucket/listBucketInventory":19,"../common/bucket/putBucketInventory":20,"../common/bucket/putBucketLifecycle":21,"../common/bucket/putBucketVersioning":22,"../common/bucket/putBucketWebsite":23,"../common/client/getReqUrl":25,"../common/client/initOptions":26,"../common/multipart":30,"../common/multipart-copy":29,"../common/parallel":51,"../common/signUtils":52,"../common/utils/createRequest":58,"../common/utils/encoder":62,"../common/utils/getStandardRegion":65,"../common/utils/isFunction":72,"../common/utils/retry":80,"../common/utils/setSTSToken":82,"./bucket":2,"./managed-upload":4,"./object":5,"./version":6,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,_process:538,agentkeepalive:94,bowser:101,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.array.includes.js":315,"core-js/modules/es.array.slice.js":319,"core-js/modules/es.function.name.js":322,"core-js/modules/es.object.assign.js":325,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.promise.js":333,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.regexp.to-string.js":339,"core-js/modules/es.string.replace.js":345,"core-js/modules/es.symbol.description.js":351,"core-js/modules/es.symbol.js":354,debug:536,"merge-descriptors":428,platform:440,urllib:546,utility:545,xml2js:496}],4:[function(e,t,r){(function(t){(function(){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator"));e("core-js/modules/es.function.name.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.promise.js"),e("core-js/modules/es.array.from.js"),e("core-js/modules/es.string.iterator.js"),e("core-js/modules/es.array.map.js"),e("core-js/modules/es.array.filter.js"),e("core-js/modules/es.array.find.js"),e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.regexp.to-string.js"),e("core-js/modules/es.array.slice.js"),e("core-js/modules/es.array.iterator.js"),e("core-js/modules/es.array-buffer.slice.js"),e("core-js/modules/es.typed-array.uint8-array.js"),e("core-js/modules/es.typed-array.copy-within.js"),e("core-js/modules/es.typed-array.every.js"),e("core-js/modules/es.typed-array.fill.js"),e("core-js/modules/es.typed-array.filter.js"),e("core-js/modules/es.typed-array.find.js"),e("core-js/modules/es.typed-array.find-index.js"),e("core-js/modules/es.typed-array.for-each.js"),e("core-js/modules/es.typed-array.includes.js"),e("core-js/modules/es.typed-array.index-of.js"),e("core-js/modules/es.typed-array.iterator.js"),e("core-js/modules/es.typed-array.join.js"),e("core-js/modules/es.typed-array.last-index-of.js"),e("core-js/modules/es.typed-array.map.js"),e("core-js/modules/es.typed-array.reduce.js"),e("core-js/modules/es.typed-array.reduce-right.js"),e("core-js/modules/es.typed-array.reverse.js"),e("core-js/modules/es.typed-array.set.js"),e("core-js/modules/es.typed-array.slice.js"),e("core-js/modules/es.typed-array.some.js"),e("core-js/modules/es.typed-array.sort.js"),e("core-js/modules/es.typed-array.subarray.js"),e("core-js/modules/es.typed-array.to-locale-string.js"),e("core-js/modules/es.typed-array.to-string.js");var o=n(e("@babel/runtime/helpers/asyncToGenerator")),s=e("util"),a=e("path"),l=e("mime"),c=e("copy-to"),u=e("../common/utils/isBlob").isBlob,p=e("../common/utils/isFile").isFile,d=e("../common/utils/isBuffer").isBuffer,m=r;m.multipartUpload=function(){var e=(0,o.default)(i.default.mark(function e(t,r){var n,o,s,c,m,f,h,y,g,b=arguments;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=b.length>2&&void 0!==b[2]?b[2]:{},this.resetCancelFlag(),n.disabledMD5=void 0===n.disabledMD5||!!n.disabledMD5,!n.checkpoint||!n.checkpoint.uploadId){e.next=8;break}return r&&p(r)&&(n.checkpoint.file=r),e.next=7,this._resumeMultipart(n.checkpoint,n);case 7:case 41:return e.abrupt("return",e.sent);case 8:return o=102400,n.mime||(p(r)?n.mime=l.getType(a.extname(r.name)):u(r)?n.mime=r.type:d(r)?n.mime="":n.mime=l.getType(a.extname(r))),n.headers=n.headers||{},this._convertMetaToHeaders(n.meta,n.headers),e.next=14,this._getFileSize(r);case 14:if(!((s=e.sent)<o)){e.next=26;break}return n.contentLength=s,e.next=19,this.put(t,r,n);case 19:if(c=e.sent,!n||!n.progress){e.next=23;break}return e.next=23,n.progress(1);case 23:return m={res:c.res,bucket:this.options.bucket,name:t,etag:c.res.headers.etag},(n.headers&&n.headers["x-oss-callback"]||n.callback)&&(m.data=c.data),e.abrupt("return",m);case 26:if(!n.partSize||parseInt(n.partSize,10)===n.partSize){e.next=28;break}throw new Error("partSize must be int number");case 28:if(!(n.partSize&&n.partSize<o)){e.next=30;break}throw new Error("partSize must not be smaller than ".concat(o));case 30:return e.next=32,this.initMultipartUpload(t,n);case 32:if(f=e.sent,h=f.uploadId,y=this._getPartSize(s,n.partSize),g={file:r,name:t,fileSize:s,partSize:y,uploadId:h,doneParts:[]},!n||!n.progress){e.next=39;break}return e.next=39,n.progress(0,g,f.res);case 39:return e.next=41,this._resumeMultipart(g,n);case 42:case"end":return e.stop()}},e,this)}));function t(t,r){return e.apply(this,arguments)}return t}(),m._resumeMultipart=function(){var e=(0,o.default)(i.default.mark(function e(t,r){var n,s,a,l,u,p,d,m,f,h,y,g,b,v,x,w,S,N,j;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this,!this.isCancel()){e.next=3;break}throw this._makeCancelEvent();case 3:return s=t.file,a=t.fileSize,l=t.partSize,u=t.uploadId,p=t.doneParts,d=t.name,m=[],p.length>0&&c(p).to(m),f=this._divideParts(a,l),h=f.length,y=!1,g=function(e,n){return new Promise(function(){var a=(0,o.default)(i.default.mark(function o(a,l){var m,g,b,v,x;return i.default.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(i.prev=0,e.isCancel()){i.next=29;break}return m=f[n-1],i.next=5,e._createBuffer(s,m.start,m.end);case 5:return g=i.sent,b={content:g,size:m.end-m.start},i.prev=7,i.next=10,e._uploadPart(d,u,n,b,r);case 10:v=i.sent,i.next=18;break;case 13:if(i.prev=13,i.t0=i.catch(7),404!==i.t0.status){i.next=17;break}throw e._makeAbortEvent();case 17:throw i.t0;case 18:if(e.isCancel()||y){i.next=26;break}if(t.doneParts.push({number:n,etag:v.res.headers.etag}),!r.progress){i.next=23;break}return i.next=23,r.progress(p.length/(h+1),t,v.res);case 23:a({number:n,etag:v.res.headers.etag}),i.next=27;break;case 26:a();case 27:i.next=30;break;case 29:a();case 30:i.next=41;break;case 32:i.prev=32,i.t1=i.catch(0),(x=new Error).name=i.t1.name,x.message=i.t1.message,x.stack=i.t1.stack,x.partNum=n,c(i.t1).to(x),l(x);case 41:case"end":return i.stop()}},o,null,[[0,32],[7,13]])}));return function(e,t){return a.apply(this,arguments)}}())},b=Array.from(new Array(h),function(e,t){return t+1}),v=m.map(function(e){return e.number}),x=b.filter(function(e){return v.indexOf(e)<0}),w=5,S=r.parallel||w,e.next=17,this._parallel(x,S,function(e){return new Promise(function(t,r){g(n,e).then(function(e){e&&m.push(e),t()}).catch(function(e){r(e)})})});case 17:if(N=e.sent,y=!0,!(j=N.find(function(e){return"abort"===e.name}))){e.next=22;break}throw j;case 22:if(!this.isCancel()){e.next=25;break}throw g=null,this._makeCancelEvent();case 25:if(!(N&&N.length>0)){e.next=28;break}throw N[0].message="Failed to upload some parts with error: ".concat(N[0].toString()," part_num: ").concat(N[0].partNum),N[0];case 28:return e.next=30,this.completeMultipartUpload(d,u,m,r);case 30:return e.abrupt("return",e.sent);case 31:case"end":return e.stop()}},e,this)}));function t(t,r){return e.apply(this,arguments)}return t}(),m._getFileSize=function(){var e=(0,o.default)(i.default.mark(function e(t){return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!d(t)){e.next=4;break}return e.abrupt("return",t.length);case 4:if(!u(t)&&!p(t)){e.next=6;break}return e.abrupt("return",t.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return e.stop()}},e)}));function t(t){return e.apply(this,arguments)}return t}();var f=e("stream").Readable;function h(e,t){if(!(this instanceof h))return new h(e,t);f.call(this,t),this.file=e,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}function y(e){return e.arrayBuffer?e.arrayBuffer():new Promise(function(t,r){var n=new FileReader;n.onload=function(e){t(e.target.result)},n.onerror=function(e){r(e)},n.readAsArrayBuffer(e)})}s.inherits(h,f),h.prototype.readFileAndPush=function(e){if(this.fileBuffer)for(var t=!0;t&&this.fileBuffer&&this.start<this.fileBuffer.length;){var r=this.start,n=r+e;n=n>this.fileBuffer.length?this.fileBuffer.length:n,this.start=n,t=this.push(this.fileBuffer.slice(r,n))}},h.prototype._read=function(e){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||0===this.start&&!this.file)return this.finish||(this.fileBuffer=null,this.finish=!0),void this.push(null);e=e||16384;var r=this;this.reader.onload=function(n){r.fileBuffer=t.from(new Uint8Array(n.target.result)),r.file=null,r.readFileAndPush(e)},0===this.start?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(e)},m._createBuffer=function(){var e=(0,o.default)(i.default.mark(function e(r,n,o){var s,a;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!u(r)&&!p(r)){e.next=8;break}return s=r.slice(n,o),e.next=4,y(s);case 4:return a=e.sent,e.abrupt("return",t.from(a));case 8:if(!d(r)){e.next=12;break}return e.abrupt("return",r.subarray(n,o));case 12:throw new Error("_createBuffer requires File/Blob/Buffer.");case 13:case"end":return e.stop()}},e)}));function r(t,r,n){return e.apply(this,arguments)}return r}(),m._getPartSize=function(e,t){var r=1e4;t||(t=1048576);var n=Math.ceil(e/r);return t<n&&(t=n),t},m._divideParts=function(e,t){for(var r=Math.ceil(e/t),n=[],i=0;i<r;i++){var o=t*i,s=Math.min(o+t,e);n.push({start:o,end:s})}return n}}).call(this)}).call(this,e("buffer").Buffer)},{"../common/utils/isBlob":68,"../common/utils/isBuffer":69,"../common/utils/isFile":71,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,buffer:103,"copy-to":107,"core-js/modules/es.array-buffer.slice.js":309,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.array.filter.js":312,"core-js/modules/es.array.find.js":313,"core-js/modules/es.array.from.js":314,"core-js/modules/es.array.iterator.js":316,"core-js/modules/es.array.map.js":318,"core-js/modules/es.array.slice.js":319,"core-js/modules/es.function.name.js":322,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.promise.js":333,"core-js/modules/es.regexp.to-string.js":339,"core-js/modules/es.string.iterator.js":343,"core-js/modules/es.typed-array.copy-within.js":356,"core-js/modules/es.typed-array.every.js":357,"core-js/modules/es.typed-array.fill.js":358,"core-js/modules/es.typed-array.filter.js":359,"core-js/modules/es.typed-array.find-index.js":360,"core-js/modules/es.typed-array.find.js":361,"core-js/modules/es.typed-array.for-each.js":362,"core-js/modules/es.typed-array.includes.js":363,"core-js/modules/es.typed-array.index-of.js":364,"core-js/modules/es.typed-array.iterator.js":365,"core-js/modules/es.typed-array.join.js":366,"core-js/modules/es.typed-array.last-index-of.js":367,"core-js/modules/es.typed-array.map.js":368,"core-js/modules/es.typed-array.reduce-right.js":369,"core-js/modules/es.typed-array.reduce.js":370,"core-js/modules/es.typed-array.reverse.js":371,"core-js/modules/es.typed-array.set.js":372,"core-js/modules/es.typed-array.slice.js":373,"core-js/modules/es.typed-array.some.js":374,"core-js/modules/es.typed-array.sort.js":375,"core-js/modules/es.typed-array.subarray.js":376,"core-js/modules/es.typed-array.to-locale-string.js":377,"core-js/modules/es.typed-array.to-string.js":378,"core-js/modules/es.typed-array.uint8-array.js":379,mime:430,path:439,stream:468,util:489}],5:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault");e("core-js/modules/es.function.name.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js"),e("core-js/modules/es.array.map.js"),e("core-js/modules/es.number.constructor.js"),e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.promise.js");var i=n(e("@babel/runtime/regenerator")),o=n(e("@babel/runtime/helpers/asyncToGenerator")),s=e("fs"),a=e("copy-to"),l=e("path"),c=e("mime"),u=e("../common/callback"),p=e("merge-descriptors"),d=e("../common/utils/isBlob").isBlob,m=e("../common/utils/isFile").isFile,f=e("../common/utils/isBuffer").isBuffer,h=e("../common/utils/obj2xml").obj2xml,y=e("../common/utils/parseRestoreInfo").parseRestoreInfo,g=r;g.append=function(){var e=(0,o.default)(i.default.mark(function e(t,r,n){var o;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===(n=n||{}).position&&(n.position="0"),n.subres={append:"",position:n.position},n.method="POST",e.next=6,this.put(t,r,n);case 6:return(o=e.sent).nextAppendPosition=o.res.headers["x-oss-next-append-position"],e.abrupt("return",o);case 9:case"end":return e.stop()}},e,this)}));function t(t,r,n){return e.apply(this,arguments)}return t}(),g.put=function(){var e=(0,o.default)(i.default.mark(function e(t,r,n){var o,s,a,p,h;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((n=n||{}).disabledMD5=void 0===n.disabledMD5||!!n.disabledMD5,n.headers=n.headers||{},t=this._objectName(t),!f(r)){e.next=8;break}o=r,e.next=19;break;case 8:if(!d(r)&&!m(r)){e.next=18;break}return n.mime||(m(r)?n.mime=c.getType(l.extname(r.name)):n.mime=r.type),e.next=12,this._createBuffer(r,0,r.size);case 12:return o=e.sent,e.next=15,this._getFileSize(r);case 15:n.contentLength=e.sent,e.next=19;break;case 18:throw new TypeError("Must provide Buffer/Blob/File for put.");case 19:return this._convertMetaToHeaders(n.meta,n.headers),s=n.method||"PUT",a=this._objectRequestParams(s,t,n),u.encodeCallback(a,n),a.mime=n.mime,a.disabledMD5=n.disabledMD5,a.content=o,a.successStatuses=[200],e.next=29,this.request(a);case 29:return p=e.sent,h={name:t,url:this._objectUrl(t),res:p.res},a.headers&&a.headers["x-oss-callback"]&&(h.data=JSON.parse(p.data.toString())),e.abrupt("return",h);case 33:case"end":return e.stop()}},e,this)}));function t(t,r,n){return e.apply(this,arguments)}return t}(),g.putStream=function(){var e=(0,o.default)(i.default.mark(function e(t,r,n){var o,s,a,l;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(n=n||{}).headers=n.headers||{},t=this._objectName(t),n.contentLength?n.headers["Content-Length"]=n.contentLength:n.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(n.meta,n.headers),o=n.method||"PUT",s=this._objectRequestParams(o,t,n),u.encodeCallback(s,n),s.mime=n.mime,s.stream=r,s.successStatuses=[200],e.next=13,this.request(s);case 13:return a=e.sent,l={name:t,url:this._objectUrl(t),res:a.res},s.headers&&s.headers["x-oss-callback"]&&(l.data=JSON.parse(a.data.toString())),e.abrupt("return",l);case 17:case"end":return e.stop()}},e,this)}));function t(t,r,n){return e.apply(this,arguments)}return t}(),p(g,e("../common/object/copyObject")),p(g,e("../common/object/getObjectTagging")),p(g,e("../common/object/putObjectTagging")),p(g,e("../common/object/deleteObjectTagging")),p(g,e("../common/image")),p(g,e("../common/object/getBucketVersions")),p(g,e("../common/object/getACL")),p(g,e("../common/object/putACL")),p(g,e("../common/object/head")),p(g,e("../common/object/delete")),p(g,e("../common/object/get")),p(g,e("../common/object/putSymlink")),p(g,e("../common/object/getSymlink")),p(g,e("../common/object/deleteMulti")),p(g,e("../common/object/getObjectMeta")),p(g,e("../common/object/getObjectUrl")),p(g,e("../common/object/generateObjectUrl")),p(g,e("../common/object/signatureUrl")),p(g,e("../common/object/asyncSignatureUrl")),p(g,e("../common/object/signatureUrlV4")),p(g,e("../common/object/signPostObjectPolicyV4")),g.putMeta=function(){var e=(0,o.default)(i.default.mark(function e(t,r,n){var o;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.copy(t,t,{meta:r||{},timeout:n&&n.timeout,ctx:n&&n.ctx});case 2:return o=e.sent,e.abrupt("return",o);case 4:case"end":return e.stop()}},e,this)}));function t(t,r,n){return e.apply(this,arguments)}return t}(),g.list=function(){var e=(0,o.default)(i.default.mark(function e(t,r){var n,o,s,a,l;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(n=this._objectRequestParams("GET","",r)).query=t,n.xmlResponse=!0,n.successStatuses=[200],e.next=6,this.request(n);case 6:return o=e.sent,s=o.data.Contents||[],a=this,s&&(Array.isArray(s)||(s=[s]),s=s.map(function(e){return{name:e.Key,url:a._objectUrl(e.Key),lastModified:e.LastModified,etag:e.ETag,type:e.Type,size:Number(e.Size),storageClass:e.StorageClass,owner:{id:e.Owner.ID,displayName:e.Owner.DisplayName},restoreInfo:y(e.RestoreInfo)}})),(l=o.data.CommonPrefixes||null)&&(Array.isArray(l)||(l=[l]),l=l.map(function(e){return e.Prefix})),e.abrupt("return",{res:o.res,objects:s,prefixes:l,nextMarker:o.data.NextMarker||null,isTruncated:"true"===o.data.IsTruncated});case 13:case"end":return e.stop()}},e,this)}));function t(t,r){return e.apply(this,arguments)}return t}(),g.listV2=function(){var e=(0,o.default)(i.default.mark(function e(t){var r,n,o,s,a,l,c,u=arguments;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=u.length>1&&void 0!==u[1]?u[1]:{},(n=t["continuation-token"]||t.continuationToken)&&(r.subres=Object.assign({"continuation-token":n},r.subres)),(o=this._objectRequestParams("GET","",r)).query=Object.assign({"list-type":2},t),delete o.query["continuation-token"],delete o.query.continuationToken,o.xmlResponse=!0,o.successStatuses=[200],e.next=11,this.request(o);case 11:return s=e.sent,a=s.data.Contents||[],l=this,a&&(Array.isArray(a)||(a=[a]),a=a.map(function(e){var t=null;return e.Owner&&(t={id:e.Owner.ID,displayName:e.Owner.DisplayName}),{name:e.Key,url:l._objectUrl(e.Key),lastModified:e.LastModified,etag:e.ETag,type:e.Type,size:Number(e.Size),storageClass:e.StorageClass,owner:t,restoreInfo:y(e.RestoreInfo)}})),(c=s.data.CommonPrefixes||null)&&(Array.isArray(c)||(c=[c]),c=c.map(function(e){return e.Prefix})),e.abrupt("return",{res:s.res,objects:a,prefixes:c,isTruncated:"true"===s.data.IsTruncated,keyCount:+s.data.KeyCount,continuationToken:s.data.ContinuationToken||null,nextContinuationToken:s.data.NextContinuationToken||null});case 18:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),g.restore=function(){var e=(0,o.default)(i.default.mark(function e(t){var r,n,o,s,a=arguments;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(r=(r=a.length>1&&void 0!==a[1]?a[1]:{type:"Archive"})||{}).subres=Object.assign({restore:""},r.subres),r.versionId&&(r.subres.versionId=r.versionId),n=this._objectRequestParams("POST",t,r),o={RestoreRequest:{Days:r.Days?r.Days:2}},"ColdArchive"!==r.type&&"DeepColdArchive"!==r.type||(o.RestoreRequest.JobParameters={Tier:r.JobParameters?r.JobParameters:"Standard"}),n.content=h(o,{headers:!0}),n.mime="xml",n.successStatuses=[202],e.next=12,this.request(n);case 12:return s=e.sent,e.abrupt("return",{res:s.res});case 14:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),g._objectUrl=function(e){return this._getReqUrl({bucket:this.options.bucket,object:e})},g._objectRequestParams=function(e,t,r){if(!this.options.bucket&&!this.options.cname)throw new Error("Please create a bucket first");r=r||{};var n={object:t=this._objectName(t),bucket:this.options.bucket,method:e,subres:r&&r.subres,additionalHeaders:r&&r.additionalHeaders,timeout:r&&r.timeout,ctx:r&&r.ctx};return r.headers&&(n.headers={},a(r.headers).to(n.headers)),n},g._objectName=function(e){return e.replace(/^\/+/,"")},g._convertMetaToHeaders=function(e,t){e&&Object.keys(e).forEach(function(r){t["x-oss-meta-".concat(r)]=e[r]})},g._deleteFileSafe=function(e){var t=this;return new Promise(function(r){s.exists(e,function(n){n?s.unlink(e,function(n){n&&t.debug("unlink %j error: %s",e,n,"error"),r()}):r()})})}},{"../common/callback":24,"../common/image":27,"../common/object/asyncSignatureUrl":31,"../common/object/copyObject":32,"../common/object/delete":33,"../common/object/deleteMulti":34,"../common/object/deleteObjectTagging":35,"../common/object/generateObjectUrl":36,"../common/object/get":37,"../common/object/getACL":38,"../common/object/getBucketVersions":39,"../common/object/getObjectMeta":40,"../common/object/getObjectTagging":41,"../common/object/getObjectUrl":42,"../common/object/getSymlink":43,"../common/object/head":44,"../common/object/putACL":45,"../common/object/putObjectTagging":46,"../common/object/putSymlink":47,"../common/object/signPostObjectPolicyV4":48,"../common/object/signatureUrl":49,"../common/object/signatureUrlV4":50,"../common/utils/isBlob":68,"../common/utils/isBuffer":69,"../common/utils/isFile":71,"../common/utils/obj2xml":76,"../common/utils/parseRestoreInfo":78,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"copy-to":107,"core-js/modules/es.array.map.js":318,"core-js/modules/es.function.name.js":322,"core-js/modules/es.number.constructor.js":324,"core-js/modules/es.object.assign.js":325,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.promise.js":333,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.regexp.to-string.js":339,"core-js/modules/es.string.replace.js":345,"core-js/modules/web.dom-collections.for-each.js":380,fs:102,"merge-descriptors":428,mime:430,path:439}],6:[function(e,t,r){r.version="6.23.0"},{}],7:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator")),o=n(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(r,"__esModule",{value:!0}),r.abortBucketWorm=void 0;var s=e("../utils/checkBucketName");function a(e,t){return l.apply(this,arguments)}function l(){return(l=(0,o.default)(i.default.mark(function e(t,r){var n,o;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s.checkBucketName(t),n=this._bucketRequestParams("DELETE",t,"worm",r),e.next=4,this.request(n);case 4:return o=e.sent,e.abrupt("return",{res:o.res,status:o.status});case 6:case"end":return e.stop()}},e,this)}))).apply(this,arguments)}r.abortBucketWorm=a},{"../utils/checkBucketName":53,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93}],8:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator")),o=n(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(r,"__esModule",{value:!0}),r.completeBucketWorm=void 0;var s=e("../utils/checkBucketName");function a(e,t,r){return l.apply(this,arguments)}function l(){return(l=(0,o.default)(i.default.mark(function e(t,r,n){var o,a;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s.checkBucketName(t),o=this._bucketRequestParams("POST",t,{wormId:r},n),e.next=4,this.request(o);case 4:return a=e.sent,e.abrupt("return",{res:a.res,status:a.status});case 6:case"end":return e.stop()}},e,this)}))).apply(this,arguments)}r.completeBucketWorm=a},{"../utils/checkBucketName":53,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93}],9:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var o=n(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(r,"__esModule",{value:!0}),r.deleteBucketInventory=void 0;var s=e("../utils/checkBucketName");function a(e,t){return l.apply(this,arguments)}function l(){return l=(0,o.default)(i.default.mark(function e(t,r){var n,o,a,l,c=arguments;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=c.length>2&&void 0!==c[2]?c[2]:{},o=Object.assign({inventory:"",inventoryId:r},n.subres),s.checkBucketName(t),(a=this._bucketRequestParams("DELETE",t,o,n)).successStatuses=[204],e.next=7,this.request(a);case 7:return l=e.sent,e.abrupt("return",{status:l.status,res:l.res});case 9:case"end":return e.stop()}},e,this)})),l.apply(this,arguments)}r.deleteBucketInventory=a},{"../utils/checkBucketName":53,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],10:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator")),o=n(e("@babel/runtime/helpers/asyncToGenerator")),s=e("../utils/checkBucketName").checkBucketName;r.deleteBucketLifecycle=function(){var e=(0,o.default)(i.default.mark(function e(t,r){var n,o;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s(t),(n=this._bucketRequestParams("DELETE",t,"lifecycle",r)).successStatuses=[204],e.next=5,this.request(n);case 5:return o=e.sent,e.abrupt("return",{res:o.res});case 7:case"end":return e.stop()}},e,this)}));function t(t,r){return e.apply(this,arguments)}return t}()},{"../utils/checkBucketName":53,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93}],11:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator")),o=n(e("@babel/runtime/helpers/asyncToGenerator")),s=e("../utils/checkBucketName").checkBucketName;r.deleteBucketWebsite=function(){var e=(0,o.default)(i.default.mark(function e(t,r){var n,o;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s(t),(n=this._bucketRequestParams("DELETE",t,"website",r)).successStatuses=[204],e.next=5,this.request(n);case 5:return o=e.sent,e.abrupt("return",{res:o.res});case 7:case"end":return e.stop()}},e,this)}));function t(t,r){return e.apply(this,arguments)}return t}()},{"../utils/checkBucketName":53,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93}],12:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator")),o=n(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(r,"__esModule",{value:!0}),r.extendBucketWorm=void 0;var s=e("../utils/checkBucketName"),a=e("../utils/obj2xml");function l(e,t,r,n){return c.apply(this,arguments)}function c(){return(c=(0,o.default)(i.default.mark(function e(t,r,n,o){var l,c,u;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s.checkBucketName(t),l=this._bucketRequestParams("POST",t,{wormExtend:"",wormId:r},o),c={ExtendWormConfiguration:{RetentionPeriodInDays:n}},l.mime="xml",l.content=a.obj2xml(c,{headers:!0}),l.successStatuses=[200],e.next=8,this.request(l);case 8:return u=e.sent,e.abrupt("return",{res:u.res,status:u.status});case 10:case"end":return e.stop()}},e,this)}))).apply(this,arguments)}r.extendBucketWorm=l},{"../utils/checkBucketName":53,"../utils/obj2xml":76,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93}],13:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var o=n(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(r,"__esModule",{value:!0}),r.getBucketInventory=void 0;var s=e("../utils/checkBucketName"),a=e("../utils/formatInventoryConfig");function l(e,t){return c.apply(this,arguments)}function c(){return c=(0,o.default)(i.default.mark(function e(t,r){var n,o,l,c,u=arguments;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=u.length>2&&void 0!==u[2]?u[2]:{},o=Object.assign({inventory:"",inventoryId:r},n.subres),s.checkBucketName(t),(l=this._bucketRequestParams("GET",t,o,n)).successStatuses=[200],l.xmlResponse=!0,e.next=8,this.request(l);case 8:return c=e.sent,e.abrupt("return",{status:c.status,res:c.res,inventory:a.formatInventoryConfig(c.data)});case 10:case"end":return e.stop()}},e,this)})),c.apply(this,arguments)}r.getBucketInventory=l},{"../utils/checkBucketName":53,"../utils/formatInventoryConfig":63,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],14:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator"));e("core-js/modules/es.array.map.js");var o=n(e("@babel/runtime/helpers/asyncToGenerator")),s=e("../utils/checkBucketName").checkBucketName,a=e("../utils/isArray").isArray,l=e("../utils/formatObjKey").formatObjKey;r.getBucketLifecycle=function(){var e=(0,o.default)(i.default.mark(function e(t,r){var n,o,c;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s(t),(n=this._bucketRequestParams("GET",t,"lifecycle",r)).successStatuses=[200],n.xmlResponse=!0,e.next=6,this.request(n);case 6:return o=e.sent,(c=o.data.Rule||null)&&(a(c)||(c=[c]),c=c.map(function(e){return e.ID&&(e.id=e.ID,delete e.ID),e.Tag&&!a(e.Tag)&&(e.Tag=[e.Tag]),l(e,"firstLowerCase")})),e.abrupt("return",{rules:c,res:o.res});case 10:case"end":return e.stop()}},e,this)}));function t(t,r){return e.apply(this,arguments)}return t}()},{"../utils/checkBucketName":53,"../utils/formatObjKey":64,"../utils/isArray":67,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.array.map.js":318}],15:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator")),o=n(e("@babel/runtime/helpers/asyncToGenerator")),s=e("../utils/checkBucketName").checkBucketName;r.getBucketVersioning=function(){var e=(0,o.default)(i.default.mark(function e(t,r){var n,o,a;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s(t),(n=this._bucketRequestParams("GET",t,"versioning",r)).xmlResponse=!0,n.successStatuses=[200],e.next=6,this.request(n);case 6:return o=e.sent,a=o.data.Status,e.abrupt("return",{status:o.status,versionStatus:a,res:o.res});case 9:case"end":return e.stop()}},e,this)}));function t(t,r){return e.apply(this,arguments)}return t}()},{"../utils/checkBucketName":53,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93}],16:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator")),o=n(e("@babel/runtime/helpers/asyncToGenerator")),s=e("../utils/checkBucketName").checkBucketName,a=e("../utils/isObject").isObject;r.getBucketWebsite=function(){var e=(0,o.default)(i.default.mark(function e(t,r){var n,o,l;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s(t),(n=this._bucketRequestParams("GET",t,"website",r)).successStatuses=[200],n.xmlResponse=!0,e.next=6,this.request(n);case 6:return o=e.sent,l=[],o.data.RoutingRules&&o.data.RoutingRules.RoutingRule&&(l=a(o.data.RoutingRules.RoutingRule)?[o.data.RoutingRules.RoutingRule]:o.data.RoutingRules.RoutingRule),e.abrupt("return",{index:o.data.IndexDocument&&o.data.IndexDocument.Suffix||"",supportSubDir:o.data.IndexDocument&&o.data.IndexDocument.SupportSubDir||"false",type:o.data.IndexDocument&&o.data.IndexDocument.Type,routingRules:l,error:o.data.ErrorDocument&&o.data.ErrorDocument.Key||null,res:o.res});case 10:case"end":return e.stop()}},e,this)}));function t(t,r){return e.apply(this,arguments)}return t}()},{"../utils/checkBucketName":53,"../utils/isObject":74,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93}],17:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var o=n(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(r,"__esModule",{value:!0}),r.getBucketWorm=void 0;var s=e("../utils/checkBucketName"),a=e("../utils/dataFix");function l(e,t){return c.apply(this,arguments)}function c(){return(c=(0,o.default)(i.default.mark(function e(t,r){var n,o;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s.checkBucketName(t),(n=this._bucketRequestParams("GET",t,"worm",r)).successStatuses=[200],n.xmlResponse=!0,e.next=6,this.request(n);case 6:return o=e.sent,a.dataFix(o.data,{lowerFirst:!0,rename:{RetentionPeriodInDays:"days"}}),e.abrupt("return",Object.assign(Object.assign({},o.data),{res:o.res,status:o.status}));case 9:case"end":return e.stop()}},e,this)}))).apply(this,arguments)}r.getBucketWorm=l},{"../utils/checkBucketName":53,"../utils/dataFix":59,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],18:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator")),o=n(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(r,"__esModule",{value:!0}),r.initiateBucketWorm=void 0;var s=e("../utils/obj2xml"),a=e("../utils/checkBucketName");function l(e,t,r){return c.apply(this,arguments)}function c(){return(c=(0,o.default)(i.default.mark(function e(t,r,n){var o,l,c;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a.checkBucketName(t),o=this._bucketRequestParams("POST",t,"worm",n),l={InitiateWormConfiguration:{RetentionPeriodInDays:r}},o.mime="xml",o.content=s.obj2xml(l,{headers:!0}),o.successStatuses=[200],e.next=8,this.request(o);case 8:return c=e.sent,e.abrupt("return",{res:c.res,wormId:c.res.headers["x-oss-worm-id"],status:c.status});case 10:case"end":return e.stop()}},e,this)}))).apply(this,arguments)}r.initiateBucketWorm=l},{"../utils/checkBucketName":53,"../utils/obj2xml":76,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93}],19:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var o=n(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(r,"__esModule",{value:!0}),r.listBucketInventory=void 0;var s=e("../utils/checkBucketName"),a=e("../utils/formatInventoryConfig");function l(e){return c.apply(this,arguments)}function c(){return c=(0,o.default)(i.default.mark(function e(t){var r,n,o,l,c,u,p,d,m=arguments;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=m.length>1&&void 0!==m[1]?m[1]:{},n=r.continuationToken,o=Object.assign({inventory:""},n&&{"continuation-token":n},r.subres),s.checkBucketName(t),(l=this._bucketRequestParams("GET",t,o,r)).successStatuses=[200],l.xmlResponse=!0,e.next=9,this.request(l);case 9:return c=e.sent,u=c.data,p=c.res,d=c.status,e.abrupt("return",{isTruncated:"true"===u.IsTruncated,nextContinuationToken:u.NextContinuationToken,inventoryList:a.formatInventoryConfig(u.InventoryConfiguration,!0),status:d,res:p});case 12:case"end":return e.stop()}},e,this)})),c.apply(this,arguments)}r.listBucketInventory=l},{"../utils/checkBucketName":53,"../utils/formatInventoryConfig":63,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],20:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.array.concat.js");var o=n(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(r,"__esModule",{value:!0}),r.putBucketInventory=void 0;var s=e("../utils/checkBucketName"),a=e("../utils/obj2xml");function l(e,t){return c.apply(this,arguments)}function c(){return c=(0,o.default)(i.default.mark(function e(t,r){var n,o,l,c,u,p,d,m,f,h,y,g=arguments;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=g.length>2&&void 0!==g[2]?g[2]:{},o=Object.assign({inventory:"",inventoryId:r.id},n.subres),s.checkBucketName(t),l=r.OSSBucketDestination,c=r.optionalFields,u=r.includedObjectVersions,p="acs:oss:::",d="acs:ram::".concat(l.accountId,":role/"),m={InventoryConfiguration:{Id:r.id,IsEnabled:r.isEnabled,Filter:{Prefix:r.prefix||""},Destination:{OSSBucketDestination:{Format:l.format,AccountId:l.accountId,RoleArn:"".concat(d).concat(l.rolename),Bucket:"".concat(p).concat(l.bucket),Prefix:l.prefix||"",Encryption:l.encryption||""}},Schedule:{Frequency:r.frequency},IncludedObjectVersions:u,OptionalFields:{Field:(null==c?void 0:c.field)||[]}}},f=a.obj2xml(m,{headers:!0,firstUpperCase:!0}),(h=this._bucketRequestParams("PUT",t,o,n)).successStatuses=[200],h.mime="xml",h.content=f,e.next=14,this.request(h);case 14:return y=e.sent,e.abrupt("return",{status:y.status,res:y.res});case 16:case"end":return e.stop()}},e,this)})),c.apply(this,arguments)}r.putBucketInventory=l},{"../utils/checkBucketName":53,"../utils/obj2xml":76,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.object.assign.js":325}],21:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.array.includes.js");var o=n(e("@babel/runtime/helpers/asyncToGenerator")),s=e("../utils/checkBucketName").checkBucketName,a=e("../utils/isArray").isArray,l=e("../utils/deepCopy").deepCopy,c=e("../utils/isObject").isObject,u=e("../utils/obj2xml").obj2xml,p=e("../utils/checkObjectTag").checkObjectTag,d=e("../utils/getStrBytesCount").getStrBytesCount;function m(e){e.days&&(e.expiration={days:e.days}),e.date&&(e.expiration={createdBeforeDate:e.date})}function f(e,t){var r=e.days,n=e.createdBeforeDate;if(!r&&!n)throw new Error("".concat(t," must includes days or createdBeforeDate"));if(r&&(a(r)||!/^[1-9][0-9]*$/.test(r)))throw new Error("days must be a positive integer");if(n&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(n))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function h(e,t){var r=e.noncurrentDays;if(!r)throw new Error("".concat(t," must includes noncurrentDays"));if(r&&(a(r)||!/^[1-9][0-9]*$/.test(r)))throw new Error("noncurrentDays must be a positive integer")}function y(e){if(!a(e)&&!c(e))throw new Error("tag must be Object or Array");e=c(e)?[e]:e;var t={};l(e).forEach(function(e){t[e.key]=e.value}),p(t)}function g(e){if(!["IA","Archive","ColdArchive","DeepColdArchive"].includes(e))throw new Error("StorageClass must be IA or Archive or ColdArchive or DeepColdArchive")}function b(e){if(e.id&&d(e.id)>255)throw new Error("ID is composed of 255 bytes at most");if(void 0===e.prefix)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(e.status))throw new Error("Status must be Enabled or Disabled");if(!(e.expiration||e.noncurrentVersionExpiration||e.abortMultipartUpload||e.transition||e.noncurrentVersionTransition))throw new Error("Rule must includes expiration or noncurrentVersionExpiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(e.transition&&(g(e.transition.storageClass),f(e.transition,"Transition")),e.expiration)if(e.expiration.expiredObjectDeleteMarker){if(e.expiration.days||e.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}else f(e.expiration,"Expiration");if(e.abortMultipartUpload&&f(e.abortMultipartUpload,"AbortMultipartUpload"),e.noncurrentVersionTransition&&(g(e.noncurrentVersionTransition.storageClass),h(e.noncurrentVersionTransition,"NoncurrentVersionTransition")),e.noncurrentVersionExpiration&&h(e.noncurrentVersionExpiration,"NoncurrentVersionExpiration"),e.tag){if(e.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");y(e.tag)}}r.putBucketLifecycle=function(){var e=(0,o.default)(i.default.mark(function e(t,r,n){var o,l,c,p,d;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(s(t),a(r)){e.next=3;break}throw new Error("rules must be Array");case 3:return o=this._bucketRequestParams("PUT",t,"lifecycle",n),c={LifecycleConfiguration:{Rule:l=[]}},r.forEach(function(e){m(e),b(e),e.id&&(e.ID=e.id,delete e.id),l.push(e)}),p=u(c,{headers:!0,firstUpperCase:!0}),o.content=p,o.mime="xml",o.successStatuses=[200],e.next=13,this.request(o);case 13:return d=e.sent,e.abrupt("return",{res:d.res});case 15:case"end":return e.stop()}},e,this)}));function t(t,r,n){return e.apply(this,arguments)}return t}()},{"../utils/checkBucketName":53,"../utils/checkObjectTag":56,"../utils/deepCopy":60,"../utils/getStrBytesCount":66,"../utils/isArray":67,"../utils/isObject":74,"../utils/obj2xml":76,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.array.includes.js":315,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/web.dom-collections.for-each.js":380}],22:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator"));e("core-js/modules/es.array.includes.js");var o=n(e("@babel/runtime/helpers/asyncToGenerator")),s=e("../utils/checkBucketName").checkBucketName,a=e("../utils/obj2xml").obj2xml;r.putBucketVersioning=function(){var e=(0,o.default)(i.default.mark(function e(t,r){var n,o,l,c,u=arguments;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=u.length>2&&void 0!==u[2]?u[2]:{},s(t),["Enabled","Suspended"].includes(r)){e.next=4;break}throw new Error("status must be Enabled or Suspended");case 4:return o=this._bucketRequestParams("PUT",t,"versioning",n),l={VersioningConfiguration:{Status:r}},o.mime="xml",o.content=a(l,{headers:!0}),e.next=10,this.request(o);case 10:return c=e.sent,e.abrupt("return",{res:c.res,status:c.status});case 12:case"end":return e.stop()}},e,this)}));function t(t,r){return e.apply(this,arguments)}return t}()},{"../utils/checkBucketName":53,"../utils/obj2xml":76,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.array.includes.js":315}],23:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator")),o=n(e("@babel/runtime/helpers/asyncToGenerator")),s=e("../utils/checkBucketName").checkBucketName,a=e("../utils/obj2xml").obj2xml,l=e("../utils/isArray").isArray;r.putBucketWebsite=function(){var e=(0,o.default)(i.default.mark(function e(t){var r,n,o,c,u,p,d,m=arguments;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=m.length>1&&void 0!==m[1]?m[1]:{},n=m.length>2?m[2]:void 0,s(t),o=this._bucketRequestParams("PUT",t,"website",n),c={Suffix:r.index||"index.html"},p={WebsiteConfiguration:u={IndexDocument:c}},r.supportSubDir&&(c.SupportSubDir=r.supportSubDir),r.type&&(c.Type=r.type),r.error&&(u.ErrorDocument={Key:r.error}),void 0===r.routingRules){e.next=14;break}if(l(r.routingRules)){e.next=13;break}throw new Error("RoutingRules must be Array");case 13:u.RoutingRules={RoutingRule:r.routingRules};case 14:return p=a(p),o.content=p,o.mime="xml",o.successStatuses=[200],e.next=20,this.request(o);case 20:return d=e.sent,e.abrupt("return",{res:d.res});case 22:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{"../utils/checkBucketName":53,"../utils/isArray":67,"../utils/obj2xml":76,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93}],24:[function(e,t,r){(function(t){(function(){e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),r.encodeCallback=function(e,r){if(e.headers=e.headers||{},!Object.prototype.hasOwnProperty.call(e.headers,"x-oss-callback")&&r.callback){var n={callbackUrl:encodeURI(r.callback.url),callbackBody:r.callback.body};r.callback.host&&(n.callbackHost=r.callback.host),r.callback.contentType&&(n.callbackBodyType=r.callback.contentType),r.callback.callbackSNI&&(n.callbackSNI=r.callback.callbackSNI);var i=t.from(JSON.stringify(n)).toString("base64");if(e.headers["x-oss-callback"]=i,r.callback.customValue){var o={};Object.keys(r.callback.customValue).forEach(function(e){o["x:".concat(e)]=r.callback.customValue[e].toString()}),e.headers["x-oss-callback-var"]=t.from(JSON.stringify(o)).toString("base64")}}}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:103,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.to-string.js":339,"core-js/modules/web.dom-collections.for-each.js":380}],25:[function(e,t,r){e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js");var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.getReqUrl=void 0;var i=n(e("copy-to")),o=n(e("url")),s=n(e("merge-descriptors")),a=n(e("is-type-of")),l=e("../utils/isIP"),c=e("../utils/checkConfigValid");function u(e){var t={},r=this.options.cname;c.checkConfigValid(this.options.endpoint,"endpoint"),i.default(this.options.endpoint,!1).to(t),!e.bucket||r||l.isIP(t.hostname)||this.options.sldEnable||(t.host="".concat(e.bucket,".").concat(t.host));var n="/";e.bucket&&this.options.sldEnable&&(n+="".concat(e.bucket,"/")),e.object&&(n+=this._escape(e.object).replace(/\+/g,"%2B")),t.pathname=n;var u={};if(e.query&&s.default(u,e.query),e.subres){var p={};a.default.string(e.subres)?p[e.subres]="":a.default.array(e.subres)?e.subres.forEach(function(e){p[e]=""}):p=e.subres,s.default(u,p)}return t.query=u,o.default.format(t)}r.getReqUrl=u},{"../utils/checkConfigValid":54,"../utils/isIP":73,"copy-to":107,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.string.replace.js":345,"core-js/modules/web.dom-collections.for-each.js":380,"is-type-of":537,"merge-descriptors":428,url:543}],26:[function(e,t,r){e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.string.trim.js");var n=e("humanize-ms"),i=e("url"),o=e("../utils/checkBucketName").checkBucketName,s=e("../utils/setRegion").setRegion,a=e("../utils/checkConfigValid").checkConfigValid;function l(e,t){a(e,"endpoint");var r=i.parse(e);if(r.protocol||(r=i.parse("http".concat(t?"s":"","://").concat(e))),"http:"!==r.protocol&&"https:"!==r.protocol)throw new Error("Endpoint protocol must be http or https.");return r}t.exports=function(e){if(!e||!e.accessKeyId||!e.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");e.stsToken&&!e.refreshSTSToken&&e.refreshSTSTokenInterval,e.bucket&&o(e.bucket);var t=Object.assign({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1,headerEncoding:"utf-8",refreshSTSToken:null,refreshSTSTokenInterval:3e5,retryMax:0,authorizationV4:!1},e);if(t.accessKeyId=t.accessKeyId.trim(),t.accessKeySecret=t.accessKeySecret.trim(),t.timeout&&(t.timeout=n(t.timeout)),t.endpoint)t.endpoint=l(t.endpoint,t.secure);else{if(!t.region)throw new Error("require options.endpoint or options.region");t.endpoint=s(t.region,t.internal,t.secure)}return t.inited=!0,t}},{"../utils/checkBucketName":53,"../utils/checkConfigValid":54,"../utils/setRegion":81,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.object.assign.js":325,"core-js/modules/es.string.trim.js":349,"humanize-ms":399,url:543}],27:[function(e,t,r){e("merge-descriptors")(r,e("./processObjectSave"))},{"./processObjectSave":28,"merge-descriptors":428}],28:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator"));e("core-js/modules/es.array.concat.js");var o=n(e("@babel/runtime/helpers/asyncToGenerator")),s=e("../utils/checkBucketName").checkBucketName,a=e("querystring"),l=e("js-base64").Base64.encode;function c(e,t){if(!e)throw new Error("".concat(t," is required"));if("string"!=typeof e)throw new Error("".concat(t," must be String"))}r.processObjectSave=function(){var e=(0,o.default)(i.default.mark(function e(t,r,n,o){var u,p,d,m;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c(t,"sourceObject"),c(r,"targetObject"),c(n,"process"),r=this._objectName(r),o&&s(o),u=this._objectRequestParams("POST",t,{subres:"x-oss-process"}),p=o?",b_".concat(l(o)):"",r=l(r),d={"x-oss-process":"".concat(n,"|sys/saveas,o_").concat(r).concat(p)},u.content=a.stringify(d),e.next=12,this.request(u);case 12:return m=e.sent,e.abrupt("return",{res:m.res,status:m.res.status});case 14:case"end":return e.stop()}},e,this)}));function t(t,r,n,i){return e.apply(this,arguments)}return t}()},{"../utils/checkBucketName":53,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.array.concat.js":310,"js-base64":413,querystring:451}],29:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator"));e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.function.name.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.promise.js"),e("core-js/modules/es.array.from.js"),e("core-js/modules/es.string.iterator.js"),e("core-js/modules/es.array.map.js"),e("core-js/modules/es.array.filter.js"),e("core-js/modules/es.array.find.js"),e("core-js/modules/es.regexp.to-string.js");var o=n(e("@babel/runtime/helpers/asyncToGenerator")),s=e("debug")("ali-oss:multipart-copy"),a=e("copy-to"),l=r;l.uploadPartCopy=function(){var e=(0,o.default)(i.default.mark(function e(t,r,n,o,s){var a,l,c,u,p,d=arguments;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(a=d.length>5&&void 0!==d[5]?d[5]:{}).headers=a.headers||{},l=a.versionId||a.subres&&a.subres.versionId||null,c=l?"/".concat(s.sourceBucketName,"/").concat(encodeURIComponent(s.sourceKey),"?versionId=").concat(l):"/".concat(s.sourceBucketName,"/").concat(encodeURIComponent(s.sourceKey)),a.headers["x-oss-copy-source"]=c,o&&(a.headers["x-oss-copy-source-range"]="bytes=".concat(o)),a.subres={partNumber:n,uploadId:r},(u=this._objectRequestParams("PUT",t,a)).mime=a.mime,u.successStatuses=[200],e.next=12,this.request(u);case 12:return p=e.sent,e.abrupt("return",{name:t,etag:p.res.headers.etag,res:p.res});case 14:case"end":return e.stop()}},e,this)}));function t(t,r,n,i,o){return e.apply(this,arguments)}return t}(),l.multipartUploadCopy=function(){var e=(0,o.default)(i.default.mark(function e(t,r){var n,o,s,a,l,c,u,p,d,m,f,h=arguments;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=h.length>2&&void 0!==h[2]?h[2]:{},this.resetCancelFlag(),o=n.versionId,s={versionId:void 0===o?null:o},e.next=6,this._getObjectMeta(r.sourceBucketName,r.sourceKey,s);case 6:if(a=e.sent,l=a.res.headers["content-length"],r.startOffset=r.startOffset||0,r.endOffset=r.endOffset||l,!n.checkpoint||!n.checkpoint.uploadId){e.next=14;break}return e.next=13,this._resumeMultipartCopy(n.checkpoint,r,n);case 13:case 31:return e.abrupt("return",e.sent);case 14:if(c=102400,!((u=r.endOffset-r.startOffset)<c)){e.next=18;break}throw new Error("copySize must not be smaller than ".concat(c));case 18:if(!(n.partSize&&n.partSize<c)){e.next=20;break}throw new Error("partSize must not be smaller than ".concat(c));case 20:return e.next=22,this.initMultipartUpload(t,n);case 22:if(p=e.sent,d=p.uploadId,m=this._getPartSize(u,n.partSize),f={name:t,copySize:u,partSize:m,uploadId:d,doneParts:[]},!n||!n.progress){e.next=29;break}return e.next=29,n.progress(0,f,p.res);case 29:return e.next=31,this._resumeMultipartCopy(f,r,n);case 32:case"end":return e.stop()}},e,this)}));function t(t,r){return e.apply(this,arguments)}return t}(),l._resumeMultipartCopy=function(){var e=(0,o.default)(i.default.mark(function e(t,r,n){var l,c,u,p,d,m,f,h,y,g,b,v,x,w,S,N,j,E,C,k,T;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isCancel()){e.next=2;break}throw this._makeCancelEvent();case 2:if(l=n.versionId,u={versionId:c=void 0===l?null:l},p=t.copySize,d=t.partSize,m=t.uploadId,f=t.doneParts,h=t.name,y=this._divideMultipartCopyParts(p,d,r.startOffset),g=y.length,b={headers:{}},n.copyheaders&&a(n.copyheaders).to(b.headers),c&&a(u).to(b),v=function(e,r,a){return new Promise(function(){var l=(0,o.default)(i.default.mark(function o(l,c){var u,p,d;return i.default.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(i.prev=0,e.isCancel()){i.next=22;break}return u=y[r-1],p="".concat(u.start,"-").concat(u.end-1),i.prev=4,i.next=7,e.uploadPartCopy(h,m,r,p,a,b);case 7:d=i.sent,i.next=15;break;case 10:if(i.prev=10,i.t0=i.catch(4),404!==i.t0.status){i.next=14;break}throw e._makeAbortEvent();case 14:throw i.t0;case 15:if(e.isCancel()){i.next=22;break}if(s("content-range ".concat(d.res.headers["content-range"])),f.push({number:r,etag:d.res.headers.etag}),t.doneParts=f,!n||!n.progress){i.next=22;break}return i.next=22,n.progress(f.length/g,t,d.res);case 22:l(),i.next=29;break;case 25:i.prev=25,i.t1=i.catch(0),i.t1.partNum=r,c(i.t1);case 29:case"end":return i.stop()}},o,null,[[0,25],[4,10]])}));return function(e,t){return l.apply(this,arguments)}}())},x=Array.from(new Array(g),function(e,t){return t+1}),w=f.map(function(e){return e.number}),S=x.filter(function(e){return w.indexOf(e)<0}),N=5,j=n.parallel||N,!this.checkBrowserAndVersion("Internet Explorer","10")&&1!==j){e.next=28;break}E=0;case 18:if(!(E<S.length)){e.next=26;break}if(!this.isCancel()){e.next=21;break}throw this._makeCancelEvent();case 21:return e.next=23,v(this,S[E],r);case 23:E++,e.next=18;break;case 26:e.next=40;break;case 28:return e.next=30,this._parallelNode(S,j,v,r);case 30:if(C=e.sent,!(k=C.find(function(e){return"abort"===e.name}))){e.next=34;break}throw k;case 34:if(!this.isCancel()){e.next=36;break}throw this._makeCancelEvent();case 36:if(!(C&&C.length>0)){e.next=40;break}throw(T=C[0]).message="Failed to copy some parts with error: ".concat(T.toString()," part_num: ").concat(T.partNum),T;case 40:return e.next=42,this.completeMultipartUpload(h,m,f,n);case 42:return e.abrupt("return",e.sent);case 43:case"end":return e.stop()}},e,this)}));function t(t,r,n){return e.apply(this,arguments)}return t}(),l._divideMultipartCopyParts=function(e,t,r){for(var n=Math.ceil(e/t),i=[],o=0;o<n;o++){var s=t*o+r,a=Math.min(s+t,e+r);i.push({start:s,end:a})}return i},l._getObjectMeta=function(){var e=(0,o.default)(i.default.mark(function e(t,r,n){var o,s;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=this.getBucket(),this.setBucket(t),e.next=4,this.head(r,n);case 4:return s=e.sent,this.setBucket(o),e.abrupt("return",s);case 7:case"end":return e.stop()}},e,this)}));function t(t,r,n){return e.apply(this,arguments)}return t}()},{"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"copy-to":107,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.array.filter.js":312,"core-js/modules/es.array.find.js":313,"core-js/modules/es.array.from.js":314,"core-js/modules/es.array.map.js":318,"core-js/modules/es.function.name.js":322,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.promise.js":333,"core-js/modules/es.regexp.to-string.js":339,"core-js/modules/es.string.iterator.js":343,debug:536}],30:[function(e,t,r){(function(t){(function(){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator"));e("core-js/modules/es.array.map.js"),e("core-js/modules/es.array.filter.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.array.sort.js"),e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.regexp.to-string.js");var o=n(e("@babel/runtime/helpers/asyncToGenerator")),s=e("copy-to"),a=e("./callback"),l=e("./utils/deepCopy").deepCopyWith,c=e("./utils/isBuffer").isBuffer,u=e("./utils/omit").omit,p=r;p.listUploads=function(){var e=(0,o.default)(i.default.mark(function e(t,r){var n,o,a,l;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n={},s(r=r||{}).to(n),n.subres="uploads",(o=this._objectRequestParams("GET","",n)).query=t,o.xmlResponse=!0,o.successStatuses=[200],e.next=10,this.request(o);case 10:return a=e.sent,l=a.data.Upload||[],Array.isArray(l)||(l=[l]),l=l.map(function(e){return{name:e.Key,uploadId:e.UploadId,initiated:e.Initiated}}),e.abrupt("return",{res:a.res,uploads:l,bucket:a.data.Bucket,nextKeyMarker:a.data.NextKeyMarker,nextUploadIdMarker:a.data.NextUploadIdMarker,isTruncated:"true"===a.data.IsTruncated});case 15:case"end":return e.stop()}},e,this)}));function t(t,r){return e.apply(this,arguments)}return t}(),p.listParts=function(){var e=(0,o.default)(i.default.mark(function e(t,r,n,o){var a,l,c;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a={},s(o=o||{}).to(a),a.subres={uploadId:r},(l=this._objectRequestParams("GET",t,a)).query=n,l.xmlResponse=!0,l.successStatuses=[200],e.next=10,this.request(l);case 10:return c=e.sent,e.abrupt("return",{res:c.res,uploadId:c.data.UploadId,bucket:c.data.Bucket,name:c.data.Key,partNumberMarker:c.data.PartNumberMarker,nextPartNumberMarker:c.data.NextPartNumberMarker,maxParts:c.data.MaxParts,isTruncated:c.data.IsTruncated,parts:c.data.Part||[]});case 12:case"end":return e.stop()}},e,this)}));function t(t,r,n,i){return e.apply(this,arguments)}return t}(),p.abortMultipartUpload=function(){var e=(0,o.default)(i.default.mark(function e(t,r,n){var o,a,l;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this._stop(),o={},s(n=n||{}).to(o),o.subres={uploadId:r},(a=this._objectRequestParams("DELETE",t,o)).successStatuses=[204],e.next=9,this.request(a);case 9:return l=e.sent,e.abrupt("return",{res:l.res});case 11:case"end":return e.stop()}},e,this)}));function t(t,r,n){return e.apply(this,arguments)}return t}(),p.initMultipartUpload=function(){var e=(0,o.default)(i.default.mark(function e(t,r){var n,o,a;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n={},s(r=r||{}).to(n),n.headers=n.headers||{},this._convertMetaToHeaders(r.meta,n.headers),n.subres="uploads",(o=this._objectRequestParams("POST",t,n)).mime=r.mime,o.xmlResponse=!0,o.successStatuses=[200],e.next=12,this.request(o);case 12:return a=e.sent,e.abrupt("return",{res:a.res,bucket:a.data.Bucket,name:a.data.Key,uploadId:a.data.UploadId});case 14:case"end":return e.stop()}},e,this)}));function t(t,r){return e.apply(this,arguments)}return t}(),p.uploadPart=function(){var e=(0,o.default)(i.default.mark(function e(r,n,o,s,a,l,c){var u;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(u={size:l-a},!t||!t.browser){e.next=8;break}return e.next=5,this._createBuffer(s,a,l);case 5:u.content=e.sent,e.next=11;break;case 8:return e.next=10,this._createStream(s,a,l);case 10:u.stream=e.sent;case 11:return e.next=13,this._uploadPart(r,n,o,u,c);case 13:return e.abrupt("return",e.sent);case 14:case"end":return e.stop()}},e,this)}));function r(t,r,n,i,o,s,a){return e.apply(this,arguments)}return r}(),p.completeMultipartUpload=function(){var e=(0,o.default)(i.default.mark(function e(t,r,n,o){var s,p,d,m,f,h,y,g;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(s=n.concat().sort(function(e,t){return e.number-t.number}).filter(function(e,t,r){return!t||e.number!==r[t-1].number}),p='<?xml version="1.0" encoding="UTF-8"?>\n<CompleteMultipartUpload>\n',d=0;d<s.length;d++)m=s[d],p+="<Part>\n",p+="<PartNumber>".concat(m.number,"</PartNumber>\n"),p+="<ETag>".concat(m.etag,"</ETag>\n"),p+="</Part>\n";return p+="</CompleteMultipartUpload>",f={},(f=l(o=o||{},function(e){if(c(e))return null})).subres={uploadId:r},f.headers=u(f.headers,["x-oss-server-side-encryption","x-oss-storage-class"]),h=this._objectRequestParams("POST",t,f),a.encodeCallback(h,f),h.mime="xml",h.content=p,h.headers&&h.headers["x-oss-callback"]||(h.xmlResponse=!0),h.successStatuses=[200],e.next=17,this.request(h);case 17:if(y=e.sent,!o.progress){e.next=21;break}return e.next=21,o.progress(1,null,y.res);case 21:return g={res:y.res,bucket:h.bucket,name:t,etag:y.res.headers.etag},h.headers&&h.headers["x-oss-callback"]&&(g.data=JSON.parse(y.data.toString())),e.abrupt("return",g);case 24:case"end":return e.stop()}},e,this)}));function t(t,r,n,i){return e.apply(this,arguments)}return t}(),p._uploadPart=function(){var e=(0,o.default)(i.default.mark(function e(r,n,o,a,l){var c,p,d;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c={},s(l=l||{}).to(c),c.headers=c.headers||{},c.headers["Content-Length"]=a.size,c.headers=u(c.headers,["x-oss-server-side-encryption","x-oss-storage-class"]),c.subres={partNumber:o,uploadId:n},(p=this._objectRequestParams("PUT",r,c)).mime=c.mime,t&&t.browser?p.content=a.content:p.stream=a.stream,p.successStatuses=[200],p.disabledMD5=l.disabledMD5,e.next=15,this.request(p);case 15:if((d=e.sent).res.headers.etag){e.next=18;break}throw new Error("Please set the etag of expose-headers in OSS \n https://help.aliyun.com/document_detail/32069.html");case 18:return a.stream&&(a.stream=null,p.stream=null),e.abrupt("return",{name:r,etag:d.res.headers.etag,res:d.res});case 20:case"end":return e.stop()}},e,this)}));function r(t,r,n,i,o){return e.apply(this,arguments)}return r}()}).call(this)}).call(this,e("_process"))},{"./callback":24,"./utils/deepCopy":60,"./utils/isBuffer":69,"./utils/omit":77,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,_process:538,"copy-to":107,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.array.filter.js":312,"core-js/modules/es.array.map.js":318,"core-js/modules/es.array.sort.js":320,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.to-string.js":339}],31:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator"));e("core-js/modules/es.regexp.exec.js");var o=n(e("@babel/runtime/helpers/asyncToGenerator")),s=e("url"),a=e("utility"),l=e("copy-to"),c=e("../../common/signUtils"),u=e("../utils/isIP").isIP,p=e("../utils/setSTSToken").setSTSToken,d=e("../utils/isFunction").isFunction;r.asyncSignatureUrl=function(){var e=(0,o.default)(i.default.mark(function e(t,r){var n,o,m,f,h,y,g=arguments;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!(g.length>2&&void 0!==g[2])||g[2],!u(this.options.endpoint.hostname)){e.next=3;break}throw new Error("can not get the object URL when endpoint is IP");case 3:if(!n||!/^\?/.test(t)){e.next=5;break}throw new Error("Invalid object name ".concat(t));case 5:if(r=r||{},t=this._objectName(t),r.method=r.method||"GET",o=a.timestamp()+(r.expires||1800),m={bucket:this.options.bucket,object:t},f=this._getResource(m),!this.options.stsToken||!d(this.options.refreshSTSToken)){e.next=14;break}return e.next=14,p.call(this);case 14:return this.options.stsToken&&(r["security-token"]=this.options.stsToken),h=c._signatureForURL(this.options.accessKeySecret,r,f,o),(y=s.parse(this._getReqUrl(m))).query={OSSAccessKeyId:this.options.accessKeyId,Expires:o,Signature:h.Signature},l(h.subResource).to(y.query),e.abrupt("return",y.format());case 20:case"end":return e.stop()}},e,this)}));function t(t,r){return e.apply(this,arguments)}return t}()},{"../../common/signUtils":52,"../utils/isFunction":72,"../utils/isIP":73,"../utils/setSTSToken":82,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"copy-to":107,"core-js/modules/es.regexp.exec.js":338,url:543,utility:545}],32:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.array.find.js"),e("core-js/modules/es.array.includes.js"),e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js");var o=n(e("@babel/runtime/helpers/typeof")),s=n(e("@babel/runtime/helpers/asyncToGenerator")),a=e("../utils/checkBucketName").checkBucketName,l=r,c=["content-type","content-encoding","content-language","content-disposition","cache-control","expires"];l.copy=function(){var e=(0,s.default)(i.default.mark(function e(t,r,n,s){var a,l,u;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return"object"===(0,o.default)(n)&&(s=n),(s=s||{}).headers=s.headers||{},Object.keys(s.headers).forEach(function(e){s.headers["x-oss-copy-source-".concat(e.toLowerCase())]=s.headers[e]}),(s.meta||Object.keys(s.headers).find(function(e){return c.includes(e.toLowerCase())}))&&(s.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(s.meta,s.headers),r=this._getSourceName(r,n),s.versionId&&(r="".concat(r,"?versionId=").concat(s.versionId)),s.headers["x-oss-copy-source"]=r,(a=this._objectRequestParams("PUT",t,s)).xmlResponse=!0,a.successStatuses=[200,304],e.next=14,this.request(a);case 14:return l=e.sent,(u=l.data)&&(u={etag:u.ETag,lastModified:u.LastModified}),e.abrupt("return",{data:u,res:l.res});case 18:case"end":return e.stop()}},e,this)}));function t(t,r,n,i){return e.apply(this,arguments)}return t}(),l._getSourceName=function(e,t){return"string"==typeof t?e=this._objectName(e):"/"!==e[0]?t=this.options.bucket:(t=e.replace(/\/(.+?)(\/.*)/,"$1"),e=e.replace(/(\/.+?\/)(.*)/,"$2")),a(t),e=encodeURIComponent(e),e="/".concat(t,"/").concat(e)}},{"../utils/checkBucketName":53,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/helpers/typeof":91,"@babel/runtime/regenerator":93,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.array.find.js":313,"core-js/modules/es.array.includes.js":315,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.string.replace.js":345,"core-js/modules/web.dom-collections.for-each.js":380}],33:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var o=n(e("@babel/runtime/helpers/asyncToGenerator"));r.delete=function(){var e=(0,o.default)(i.default.mark(function e(t){var r,n,o,s=arguments;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(r=s.length>1&&void 0!==s[1]?s[1]:{}).subres=Object.assign({},r.subres),r.versionId&&(r.subres.versionId=r.versionId),(n=this._objectRequestParams("DELETE",t,r)).successStatuses=[204],e.next=7,this.request(n);case 7:return o=e.sent,e.abrupt("return",{res:o.res});case 9:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],34:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var o=n(e("@babel/runtime/helpers/asyncToGenerator")),s=e("utility"),a=e("../utils/obj2xml").obj2xml;r.deleteMulti=function(){var e=(0,o.default)(i.default.mark(function e(t){var r,n,o,l,c,u,p,d,m,f,h,y,g,b=arguments;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=b.length>1&&void 0!==b[1]?b[1]:{},n=[],t&&t.length){e.next=4;break}throw new Error("names is required");case 4:for(o=0;o<t.length;o++)l={},"string"==typeof t[o]?l.Key=s.escape(this._objectName(t[o])):(c=t[o],u=c.key,p=c.versionId,l.Key=s.escape(this._objectName(u)),l.VersionId=p),n.push(l);return d={Delete:{Quiet:!!r.quiet,Object:n}},m=a(d,{headers:!0}),r.subres=Object.assign({delete:""},r.subres),r.versionId&&(r.subres.versionId=r.versionId),(f=this._objectRequestParams("POST","",r)).mime="xml",f.content=m,f.xmlResponse=!0,f.successStatuses=[200],e.next=16,this.request(f);case 16:return h=e.sent,y=h.data,(g=y&&y.Deleted||null)&&(Array.isArray(g)||(g=[g])),e.abrupt("return",{res:h.res,deleted:g||[]});case 21:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{"../utils/obj2xml":76,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325,utility:545}],35:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var o=n(e("@babel/runtime/helpers/asyncToGenerator"));r.deleteObjectTagging=function(){var e=(0,o.default)(i.default.mark(function e(t){var r,n,o,s=arguments;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(r=s.length>1&&void 0!==s[1]?s[1]:{}).subres=Object.assign({tagging:""},r.subres),r.versionId&&(r.subres.versionId=r.versionId),t=this._objectName(t),(n=this._objectRequestParams("DELETE",t,r)).successStatuses=[204],e.next=8,this.request(n);case 8:return o=e.sent,e.abrupt("return",{status:o.status,res:o.res});case 10:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],36:[function(e,t,r){e("core-js/modules/es.array.concat.js");var n=e("url"),i=e("../utils/isIP").isIP;r.generateObjectUrl=function(e,t){if(i(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");if(t)"/"!==t[t.length-1]&&(t+="/");else{t=this.options.endpoint.format();var r=n.parse(t),o=this.options.bucket;r.hostname="".concat(o,".").concat(r.hostname),r.host="".concat(o,".").concat(r.host),t=r.format()}return t+this._escape(this._objectName(e))}},{"../utils/isIP":73,"core-js/modules/es.array.concat.js":310,url:543}],37:[function(e,t,r){(function(t){(function(){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var o=n(e("@babel/runtime/helpers/asyncToGenerator")),s=e("fs"),a=e("is-type-of"),l=e("../utils/isObject").isObject;r.get=function(){var e=(0,o.default)(i.default.mark(function e(r,n){var o,c,u,p,d,m,f,h,y=arguments;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=y.length>2&&void 0!==y[2]?y[2]:{},c=null,u=!1,a.writableStream(n)?c=n:a.string(n)?(c=s.createWriteStream(n),u=!0):l(n)&&(o=n),o=o||{},p=t&&t.browser,d=null===o.responseCacheControl?"":"no-cache",m=p&&d?{"response-cache-control":d}:{},o.subres=Object.assign(m,o.subres),o.versionId&&(o.subres.versionId=o.versionId),o.process&&(o.subres["x-oss-process"]=o.process),e.prev=11,(h=this._objectRequestParams("GET",r,o)).writeStream=c,h.successStatuses=[200,206,304],e.next=17,this.request(h);case 17:f=e.sent,u&&c.destroy(),e.next=28;break;case 21:if(e.prev=21,e.t0=e.catch(11),!u){e.next=27;break}return c.destroy(),e.next=27,this._deleteFileSafe(n);case 27:throw e.t0;case 28:return e.abrupt("return",{res:f.res,content:f.data});case 29:case"end":return e.stop()}},e,this,[[11,21]])}));function r(t,r){return e.apply(this,arguments)}return r}()}).call(this)}).call(this,e("_process"))},{"../utils/isObject":74,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,_process:538,"core-js/modules/es.object.assign.js":325,fs:102,"is-type-of":537}],38:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var o=n(e("@babel/runtime/helpers/asyncToGenerator"));r.getACL=function(){var e=(0,o.default)(i.default.mark(function e(t){var r,n,o,s=arguments;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(r=s.length>1&&void 0!==s[1]?s[1]:{}).subres=Object.assign({acl:""},r.subres),r.versionId&&(r.subres.versionId=r.versionId),t=this._objectName(t),(n=this._objectRequestParams("GET",t,r)).successStatuses=[200],n.xmlResponse=!0,e.next=9,this.request(n);case 9:return o=e.sent,e.abrupt("return",{acl:o.data.AccessControlList.Grant,owner:{id:o.data.Owner.ID,displayName:o.data.Owner.DisplayName},res:o.res});case 11:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],39:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator"));e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.array.map.js"),e("core-js/modules/es.number.constructor.js");var o=n(e("@babel/runtime/helpers/asyncToGenerator")),s=r,a=e("../utils/isObject").isObject,l=e("../utils/isArray").isArray,c=e("../utils/parseRestoreInfo").parseRestoreInfo;function u(){return p.apply(this,arguments)}function p(){return p=(0,o.default)(i.default.mark(function e(){var t,r,n,o,s,a,u,p,d=arguments;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=d.length>0&&void 0!==d[0]?d[0]:{},r=d.length>1&&void 0!==d[1]?d[1]:{},!t.versionIdMarker||void 0!==t.keyMarker){e.next=4;break}throw new Error("A version-id marker cannot be specified without a key marker");case 4:return r.subres=Object.assign({versions:""},r.subres),r.versionId&&(r.subres.versionId=r.versionId),(n=this._objectRequestParams("GET","",r)).xmlResponse=!0,n.successStatuses=[200],n.query=m(t),e.next=12,this.request(n);case 12:return o=e.sent,s=o.data.Version||[],a=o.data.DeleteMarker||[],u=this,s&&(Array.isArray(s)||(s=[s]),s=s.map(function(e){return{name:e.Key,url:u._objectUrl(e.Key),lastModified:e.LastModified,isLatest:"true"===e.IsLatest,versionId:e.VersionId,etag:e.ETag,type:e.Type,size:Number(e.Size),storageClass:e.StorageClass,owner:{id:e.Owner.ID,displayName:e.Owner.DisplayName},restoreInfo:c(e.RestoreInfo)}})),a&&(l(a)||(a=[a]),a=a.map(function(e){return{name:e.Key,lastModified:e.LastModified,versionId:e.VersionId,owner:{id:e.Owner.ID,displayName:e.Owner.DisplayName}}})),(p=o.data.CommonPrefixes||null)&&(l(p)||(p=[p]),p=p.map(function(e){return e.Prefix})),e.abrupt("return",{res:o.res,objects:s,deleteMarker:a,prefixes:p,nextMarker:o.data.NextKeyMarker||null,NextVersionIdMarker:o.data.NextVersionIdMarker||null,nextKeyMarker:o.data.NextKeyMarker||null,nextVersionIdMarker:o.data.NextVersionIdMarker||null,isTruncated:"true"===o.data.IsTruncated});case 21:case"end":return e.stop()}},e,this)})),p.apply(this,arguments)}function d(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return a(e)&&Object.keys(e).forEach(function(r){t[d(r)]=e[r]}),t}s.getBucketVersions=u,s.listObjectVersions=u},{"../utils/isArray":67,"../utils/isObject":74,"../utils/parseRestoreInfo":78,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.array.map.js":318,"core-js/modules/es.number.constructor.js":324,"core-js/modules/es.object.assign.js":325,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.string.replace.js":345,"core-js/modules/web.dom-collections.for-each.js":380}],40:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var o=n(e("@babel/runtime/helpers/asyncToGenerator"));r.getObjectMeta=function(){var e=(0,o.default)(i.default.mark(function e(t,r){var n,o;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=r||{},t=this._objectName(t),r.subres=Object.assign({objectMeta:""},r.subres),r.versionId&&(r.subres.versionId=r.versionId),(n=this._objectRequestParams("HEAD",t,r)).successStatuses=[200],e.next=8,this.request(n);case 8:return o=e.sent,e.abrupt("return",{status:o.status,res:o.res});case 10:case"end":return e.stop()}},e,this)}));function t(t,r){return e.apply(this,arguments)}return t}()},{"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],41:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js");var o=n(e("@babel/runtime/helpers/asyncToGenerator")),s=r,a=e("../utils/isObject").isObject;s.getObjectTagging=function(){var e=(0,o.default)(i.default.mark(function e(t){var r,n,o,s,l,c,u=arguments;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(r=u.length>1&&void 0!==u[1]?u[1]:{}).subres=Object.assign({tagging:""},r.subres),r.versionId&&(r.subres.versionId=r.versionId),t=this._objectName(t),(n=this._objectRequestParams("GET",t,r)).successStatuses=[200],e.next=8,this.request(n);case 8:return o=e.sent,e.next=11,this.parseXML(o.data);case 11:return s=e.sent,l=(l=s.TagSet.Tag)&&a(l)?[l]:l||[],c={},l.forEach(function(e){c[e.Key]=e.Value}),e.abrupt("return",{status:o.status,res:o.res,tag:c});case 17:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{"../utils/isObject":74,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325,"core-js/modules/es.object.to-string.js":329,"core-js/modules/web.dom-collections.for-each.js":380}],42:[function(e,t,r){var n=e("../utils/isIP").isIP;r.getObjectUrl=function(e,t){if(n(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");return t?"/"!==t[t.length-1]&&(t+="/"):t=this.options.endpoint.format(),t+this._escape(this._objectName(e))}},{"../utils/isIP":73}],43:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var o=n(e("@babel/runtime/helpers/asyncToGenerator"));r.getSymlink=function(){var e=(0,o.default)(i.default.mark(function e(t){var r,n,o,s,a=arguments;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(r=a.length>1&&void 0!==a[1]?a[1]:{}).subres=Object.assign({symlink:""},r.subres),r.versionId&&(r.subres.versionId=r.versionId),t=this._objectName(t),(n=this._objectRequestParams("GET",t,r)).successStatuses=[200],e.next=8,this.request(n);case 8:return o=e.sent,s=o.res.headers["x-oss-symlink-target"],e.abrupt("return",{targetName:decodeURIComponent(s),res:o.res});case 11:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],44:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js");var o=n(e("@babel/runtime/helpers/asyncToGenerator")),s=e("../utils/checkEnv").checkEnv;r.head=function(){var e=(0,o.default)(i.default.mark(function e(t){var r,n,o,a,l=arguments;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=l.length>1&&void 0!==l[1]?l[1]:{},s("Because HeadObject has gzip enabled, head cannot get the file size correctly. If you need to get the file size, please use getObjectMeta"),r.subres=Object.assign({},r.subres),r.versionId&&(r.subres.versionId=r.versionId),(n=this._objectRequestParams("HEAD",t,r)).successStatuses=[200,304],e.next=8,this.request(n);case 8:return o=e.sent,a={meta:null,res:o.res,status:o.status},200===o.status&&Object.keys(o.headers).forEach(function(e){0===e.indexOf("x-oss-meta-")&&(a.meta||(a.meta={}),a.meta[e.substring(11)]=o.headers[e])}),e.abrupt("return",a);case 12:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{"../utils/checkEnv":55,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/web.dom-collections.for-each.js":380}],45:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var o=n(e("@babel/runtime/helpers/asyncToGenerator"));r.putACL=function(){var e=(0,o.default)(i.default.mark(function e(t,r,n){var o,s;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(n=n||{}).subres=Object.assign({acl:""},n.subres),n.versionId&&(n.subres.versionId=n.versionId),n.headers=n.headers||{},n.headers["x-oss-object-acl"]=r,t=this._objectName(t),(o=this._objectRequestParams("PUT",t,n)).successStatuses=[200],e.next=10,this.request(o);case 10:return s=e.sent,e.abrupt("return",{res:s.res});case 12:case"end":return e.stop()}},e,this)}));function t(t,r,n){return e.apply(this,arguments)}return t}()},{"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],46:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.array.map.js"),e("core-js/modules/es.object.keys.js");var o=n(e("@babel/runtime/helpers/asyncToGenerator")),s=e("../utils/obj2xml").obj2xml,a=e("../utils/checkObjectTag").checkObjectTag;r.putObjectTagging=function(){var e=(0,o.default)(i.default.mark(function e(t,r){var n,o,l,c,u=arguments;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=u.length>2&&void 0!==u[2]?u[2]:{},a(r),n.subres=Object.assign({tagging:""},n.subres),n.versionId&&(n.subres.versionId=n.versionId),t=this._objectName(t),(o=this._objectRequestParams("PUT",t,n)).successStatuses=[200],r=Object.keys(r).map(function(e){return{Key:e,Value:r[e]}}),l={Tagging:{TagSet:{Tag:r}}},o.mime="xml",o.content=s(l),e.next=13,this.request(o);case 13:return c=e.sent,e.abrupt("return",{res:c.res,status:c.status});case 15:case"end":return e.stop()}},e,this)}));function t(t,r){return e.apply(this,arguments)}return t}()},{"../utils/checkObjectTag":56,"../utils/obj2xml":76,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.array.map.js":318,"core-js/modules/es.object.assign.js":325,"core-js/modules/es.object.keys.js":328}],47:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var o=n(e("@babel/runtime/helpers/asyncToGenerator"));r.putSymlink=function(){var e=(0,o.default)(i.default.mark(function e(t,r,n){var o,s;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(n=n||{}).headers=n.headers||{},r=this._escape(this._objectName(r)),this._convertMetaToHeaders(n.meta,n.headers),n.headers["x-oss-symlink-target"]=r,n.subres=Object.assign({symlink:""},n.subres),n.versionId&&(n.subres.versionId=n.versionId),n.storageClass&&(n.headers["x-oss-storage-class"]=n.storageClass),t=this._objectName(t),(o=this._objectRequestParams("PUT",t,n)).successStatuses=[200],e.next=13,this.request(o);case 13:return s=e.sent,e.abrupt("return",{res:s.res});case 15:case"end":return e.stop()}},e,this)}));function t(t,r,n){return e.apply(this,arguments)}return t}()},{"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],48:[function(e,t,r){(function(t){(function(){e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js");var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.signPostObjectPolicyV4=void 0;var i=n(e("dateformat")),o=e("../utils/getStandardRegion"),s=e("../utils/policy2Str"),a=e("../signUtils");function l(e,r){var n=t.from(s.policy2Str(e),"utf8").toString("base64"),l=i.default(r,"UTC:yyyymmdd'T'HHMMss'Z'").split("T")[0];return a.getSignatureV4(this.options.accessKeySecret,l,o.getStandardRegion(this.options.region),n)}r.signPostObjectPolicyV4=l}).call(this)}).call(this,e("buffer").Buffer)},{"../signUtils":52,"../utils/getStandardRegion":65,"../utils/policy2Str":79,buffer:103,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.to-string.js":339,dateformat:383}],49:[function(e,t,r){e("core-js/modules/es.regexp.exec.js");var n=e("url"),i=e("utility"),o=e("copy-to"),s=e("../../common/signUtils"),a=e("../utils/isIP").isIP;r.signatureUrl=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(a(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");if(r&&/^\?/.test(e))throw new Error("Invalid object name ".concat(e));t=t||{},e=this._objectName(e),t.method=t.method||"GET";var l=i.timestamp()+(t.expires||1800),c={bucket:this.options.bucket,object:e},u=this._getResource(c);this.options.stsToken&&(t["security-token"]=this.options.stsToken);var p=s._signatureForURL(this.options.accessKeySecret,t,u,l),d=n.parse(this._getReqUrl(c));return d.query={OSSAccessKeyId:this.options.accessKeyId,Expires:l,Signature:p.Signature},o(p.subResource).to(d.query),d.format()}},{"../../common/signUtils":52,"../utils/isIP":73,"copy-to":107,"core-js/modules/es.regexp.exec.js":338,url:543,utility:545}],50:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.array.join.js");var o=n(e("@babel/runtime/helpers/asyncToGenerator")),s=e("dateformat"),a=e("url"),l=e("../../common/signUtils"),c=e("../utils/setSTSToken").setSTSToken,u=e("../utils/isFunction").isFunction,p=e("../utils/getStandardRegion").getStandardRegion;r.signatureUrlV4=function(){var e=(0,o.default)(i.default.mark(function e(t,r,n,o,d){var m,f,h,y,g,b,v,x,w,S,N;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(m=this.options.cloudBoxId,f=l.getProduct(m),h=l.getSignRegion(p(this.options.region),m),y=n&&n.headers||{},g=Object.assign({},n&&n.queries||{}),b=s(new Date,"UTC:yyyymmdd'T'HHMMss'Z'"),v=b.split("T")[0],(x=l.fixAdditionalHeaders(d)).length>0&&(g["x-oss-additional-headers"]=x.join(";")),g["x-oss-credential"]=l.getCredential(v,h,this.options.accessKeyId,f),g["x-oss-date"]=b,g["x-oss-expires"]=r,g["x-oss-signature-version"]="OSS4-HMAC-SHA256",!this.options.stsToken||!u(this.options.refreshSTSToken)){e.next=17;break}return e.next=17,c.call(this);case 17:return this.options.stsToken&&(g["x-oss-security-token"]=this.options.stsToken),w=l.getCanonicalRequest(t,{headers:y,queries:g},this.options.bucket,o,x),S=l.getStringToSign(h,b,w,f),g["x-oss-signature"]=l.getSignatureV4(this.options.accessKeySecret,v,h,S,f),(N=a.parse(this._getReqUrl({bucket:this.options.bucket,object:o}))).query=Object.assign({},g),e.abrupt("return",N.format());case 24:case"end":return e.stop()}},e,this)}));function t(t,r,n,i,o){return e.apply(this,arguments)}return t}()},{"../../common/signUtils":52,"../utils/getStandardRegion":65,"../utils/isFunction":72,"../utils/setSTSToken":82,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.array.join.js":317,"core-js/modules/es.object.assign.js":325,dateformat:383,url:543}],51:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator"));e("core-js/modules/es.array.iterator.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.promise.js"),e("core-js/modules/es.string.iterator.js"),e("core-js/modules/web.dom-collections.iterator.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.function.name.js");var o=n(e("@babel/runtime/helpers/asyncToGenerator")),s=e("./utils/isArray").isArray,a=r;a._parallelNode=function(){var e=(0,o.default)(i.default.mark(function e(t,r,n,o){var s,a,l,c,u,p,d,m;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:s=this,a=[],l=[],c=t.length/r,u=t.length%r,p=0===u?c:(t.length-u)/r+1,d=1,m=0;case 8:if(!(m<t.length)){e.next=26;break}if(!s.isCancel()){e.next=11;break}return e.abrupt("break",26);case 11:if(o?l.push(n(s,t[m],o)):l.push(n(s,t[m])),l.length!==r&&(d!==p||m!==t.length-1)){e.next=23;break}return e.prev=13,d+=1,e.next=17,Promise.all(l);case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(13),a.push(e.t0);case 22:l=[];case 23:m++,e.next=8;break;case 26:return e.abrupt("return",a);case 27:case"end":return e.stop()}},e,this,[[13,19]])}));function t(t,r,n,i){return e.apply(this,arguments)}return t}(),a._parallel=function(e,t,r){var n=this;return new Promise(function(i){var o=[];if(t<=0||!e)i(o);else{var s=p(e),a=!1,l=0,c=!1;f()}function u(e){return function(){if(null===e)throw new Error("Callback was already called.");var t=e;e=null;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}function p(e){var t=-1,r=e.length;return function(){return++t<r&&!n.isCancel()?{value:e[t],key:t}:null}}function d(e){l-=1,e?(a=!0,o.push(e),i(o)):a&&l<=0?(a=!0,i(o)):c||(n.isCancel()?i(o):f())}function m(e,t){r(e).then(function(e){t(null,e)}).catch(function(e){t(e)})}function f(){for(c=!0;l<t&&!a&&!n.isCancel();){var e=s();if(null===e||o.length>0)return a=!0,void(l<=0&&i(o));l+=1,m(e.value,u(d))}c=!1}})},a.cancel=function(e){this.options.cancelFlag=!0,s(this.multipartUploadStreams)&&this.multipartUploadStreams.forEach(function(e){if(!1===e.destroyed){var t={name:"cancel",message:"cancel"};e.destroy(t)}}),this.multipartUploadStreams=[],e&&this.abortMultipartUpload(e.name,e.uploadId,e.options)},a.isCancel=function(){return this.options.cancelFlag},a.resetCancelFlag=function(){this.options.cancelFlag=!1},a._stop=function(){this.options.cancelFlag=!0},a._makeCancelEvent=function(){return{status:0,name:"cancel"}},a._makeAbortEvent=function(){return{status:0,name:"abort",message:"upload task has been abort"}}},{"./utils/isArray":67,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.array.iterator.js":316,"core-js/modules/es.function.name.js":322,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.promise.js":333,"core-js/modules/es.string.iterator.js":343,"core-js/modules/web.dom-collections.for-each.js":380,"core-js/modules/web.dom-collections.iterator.js":381}],52:[function(e,t,r){(function(t){(function(){var n=e("@babel/runtime/helpers/interopRequireDefault")(e("@babel/runtime/helpers/toConsumableArray"));e("core-js/modules/es.string.trim.js"),e("core-js/modules/es.array.sort.js"),e("core-js/modules/es.array.join.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.array.filter.js"),e("core-js/modules/es.array.iterator.js"),e("core-js/modules/es.set.js"),e("core-js/modules/es.string.iterator.js"),e("core-js/modules/web.dom-collections.iterator.js"),e("core-js/modules/es.array.map.js"),e("core-js/modules/es.string.starts-with.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/es.object.entries.js"),e("core-js/modules/es.regexp.to-string.js");var i=e("./../../shims/crypto/crypto.js"),o=e("is-type-of"),s=e("qs"),a=e("./utils/lowercaseKeyHeader").lowercaseKeyHeader,l=e("./utils/encodeString").encodeString;r.getProduct=function(e){return void 0===e?"oss":"oss-cloudbox"},r.getSignRegion=function(e,t){return void 0===t?e:t},r.buildCanonicalizedResource=function(e,t){var r="".concat(e),n="?";if(o.string(t)&&""!==t.trim())r+=n+t;else if(o.array(t))t.sort(),r+=n+t.join("&");else if(t){var i=function(e){r+=n+e,(t[e]||0===t[e])&&(r+="=".concat(t[e])),n="&"};Object.keys(t).sort().forEach(i)}return r},r.buildCanonicalString=function(e,t,r,n){var i=a((r=r||{}).headers),o="x-oss-",s=[],l={},c=[e.toUpperCase(),i["content-md5"]||"",i["content-type"],n||i["x-oss-date"]];return Object.keys(i).forEach(function(e){var t=e.toLowerCase();0===t.indexOf(o)&&(l[t]=String(i[e]).trim())}),Object.keys(l).sort().forEach(function(e){s.push("".concat(e,":").concat(l[e]))}),(c=c.concat(s)).push(this.buildCanonicalizedResource(t,r.parameters)),c.join("\n")},r.computeSignature=function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"utf-8";return i.createHmac("sha1",e).update(t.from(r,n)).digest("base64")},r.authorization=function(e,t,r,n){return"OSS ".concat(e,":").concat(this.computeSignature(t,r,n))},r.fixAdditionalHeaders=function(e){if(!e)return[];var t="x-oss-";return(0,n.default)(new Set(e.map(function(e){return e.toLowerCase()}))).filter(function(e){return"content-type"!==e&&"content-md5"!==e&&!e.startsWith(t)}).sort()},r.getCanonicalRequest=function(e,t,r,i,c){var u=a(t.headers),p=t.queries||{},d="x-oss-";if(i&&!r)throw Error("Please ensure that bucketName is passed into getCanonicalRequest.");var m=[e.toUpperCase(),l("/".concat(r?"".concat(r,"/"):"").concat(i||"")).replace(/%2F/g,"/")];m.push(s.stringify(p,{encoder:l,sort:function(e,t){return e.localeCompare(t)},strictNullHandling:!0})),c&&c.forEach(function(e){if(!Object.prototype.hasOwnProperty.call(u,e))throw Error("Can't find additional header ".concat(e," in request headers."))});var f=new Set(c);Object.keys(u).forEach(function(e){("content-type"===e||"content-md5"===e||e.startsWith(d))&&f.add(e)});var h="".concat((0,n.default)(f).sort().map(function(e){return"".concat(e,":").concat(o.string(u[e])?u[e].trim():u[e],"\n")}).join(""));return m.push(h),c&&c.length>0?m.push(c.join(";")):m.push(""),m.push(u["x-oss-content-sha256"]||"UNSIGNED-PAYLOAD"),m.join("\n")},r.getCredential=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"oss",i="".concat(e,"/").concat(t,"/").concat(n,"/aliyun_v4_request");return r?"".concat(r,"/").concat(i):i},r.getStringToSign=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"oss";return["OSS4-HMAC-SHA256",t,this.getCredential(t.split("T")[0],e,void 0,n),i.createHash("sha256").update(r).digest("hex")].join("\n")},r.getSignatureV4=function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"oss",s=i.createHmac("sha256","aliyun_v4".concat(e)).update(t).digest(),a=i.createHmac("sha256",s).update(r).digest(),l=i.createHmac("sha256",a).update(o).digest(),c=i.createHmac("sha256",l).update("aliyun_v4_request").digest();return i.createHmac("sha256",c).update(n).digest("hex")},r.authorizationV4=function(e,r,n,i,s,a,l,c){var u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"utf-8",p=arguments.length>9?arguments[9]:void 0,d=this.getProduct(p),m=this.fixAdditionalHeaders(c),f={};Object.entries(s.headers).forEach(function(e){f[e[0]]=o.string(e[1])?t.from(e[1],u).toString():e[1]});var h=f["x-oss-date"]||s.queries&&s.queries["x-oss-date"],y=this.getCanonicalRequest(i,{headers:f,queries:s.queries},a,l,m),g=this.getStringToSign(n,h,y,d),b=h.split("T")[0],v=this.getSignatureV4(r,b,n,g,d),x=m.length>0?"AdditionalHeaders=".concat(m.join(";"),","):"";return"OSS4-HMAC-SHA256 Credential=".concat(this.getCredential(b,n,e,d),",").concat(x,"Signature=").concat(v)},r._signatureForURL=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,s={},a=r.subResource,l=void 0===a?{}:a;if(r.process&&(l["x-oss-process"]=r.process),r.trafficLimit&&(l["x-oss-traffic-limit"]=r.trafficLimit),r.response&&Object.keys(r.response).forEach(function(e){var t="response-".concat(e.toLowerCase());l[t]=r.response[e]}),Object.keys(r).forEach(function(e){var t=e.toLowerCase(),n=r[e];0===t.indexOf("x-oss-")?s[t]=n:(0===t.indexOf("content-md5")||0===t.indexOf("content-type"))&&(s[e]=n)}),Object.prototype.hasOwnProperty.call(r,"security-token")&&(l["security-token"]=r["security-token"]),Object.prototype.hasOwnProperty.call(r,"callback")){var c={callbackUrl:encodeURI(r.callback.url),callbackBody:r.callback.body};if(r.callback.host&&(c.callbackHost=r.callback.host),r.callback.contentType&&(c.callbackBodyType=r.callback.contentType),r.callback.callbackSNI&&(c.callbackSNI=r.callback.callbackSNI),l.callback=t.from(JSON.stringify(c)).toString("base64"),r.callback.customValue){var u={};Object.keys(r.callback.customValue).forEach(function(e){u["x:".concat(e)]=r.callback.customValue[e]}),l["callback-var"]=t.from(JSON.stringify(u)).toString("base64")}}var p=this.buildCanonicalString(r.method,n,{headers:s,parameters:l},i.toString());return{Signature:this.computeSignature(e,p,o),subResource:l}}}).call(this)}).call(this,e("buffer").Buffer)},{"./../../shims/crypto/crypto.js":531,"./utils/encodeString":61,"./utils/lowercaseKeyHeader":75,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/helpers/toConsumableArray":90,buffer:103,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.array.filter.js":312,"core-js/modules/es.array.iterator.js":316,"core-js/modules/es.array.join.js":317,"core-js/modules/es.array.map.js":318,"core-js/modules/es.array.sort.js":320,"core-js/modules/es.object.entries.js":326,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.regexp.to-string.js":339,"core-js/modules/es.set.js":341,"core-js/modules/es.string.iterator.js":343,"core-js/modules/es.string.replace.js":345,"core-js/modules/es.string.starts-with.js":348,"core-js/modules/es.string.trim.js":349,"core-js/modules/web.dom-collections.for-each.js":380,"core-js/modules/web.dom-collections.iterator.js":381,"is-type-of":537,qs:445}],53:[function(e,t,r){e("core-js/modules/es.regexp.exec.js"),Object.defineProperty(r,"__esModule",{value:!0}),r.checkBucketName=void 0,r.checkBucketName=function(e){if(!(arguments.length>1&&void 0!==arguments[1]&&arguments[1]?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/).test(e))throw new Error("The bucket must be conform to the specifications")}},{"core-js/modules/es.regexp.exec.js":338}],54:[function(e,t,r){e("core-js/modules/es.regexp.exec.js"),Object.defineProperty(r,"__esModule",{value:!0}),r.checkConfigValid=void 0;var n={endpoint:i,region:/^[a-zA-Z0-9\-_]+$/};function i(e){return"string"==typeof e?/^[a-zA-Z0-9._:/-]+$/.test(e):!!e.host&&/^[a-zA-Z0-9._:/-]+$/.test(e.host)}r.checkConfigValid=function(e,t){if(n[t]&&!(n[t]instanceof Function?n[t](e):n[t].test(e)))throw new Error("The ".concat(t," must be conform to the specifications"))}},{"core-js/modules/es.regexp.exec.js":338}],55:[function(e,t,r){(function(e){(function(){function t(t){e.browser}Object.defineProperty(r,"__esModule",{value:!0}),r.checkEnv=void 0,r.checkEnv=t}).call(this)}).call(this,e("_process"))},{_process:538}],56:[function(e,t,r){e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.object.entries.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),Object.defineProperty(r,"__esModule",{value:!0}),r.checkObjectTag=void 0;var n=e("./checkValid").checkValid,i=e("./isObject").isObject,o=[{validator:function(e){if("string"!=typeof e)throw new Error("the key and value of the tag must be String")}},{pattern:/^[a-zA-Z0-9 +-=._:/]+$/,msg:"tag can contain letters, numbers, spaces, and the following symbols: plus sign (+), hyphen (-), equal sign (=), period (.), underscore (_), colon (:), and forward slash (/)"}],s={key:[].concat(o,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(o,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function a(e){if(!i(e))throw new Error("tag must be Object");var t=Object.entries(e);if(t.length>10)throw new Error("maximum of 10 tags for a object");var r=["key","value"];t.forEach(function(e){e.forEach(function(e,t){n(e,s[r[t]])})})}r.checkObjectTag=a},{"./checkValid":57,"./isObject":74,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.object.entries.js":326,"core-js/modules/es.object.to-string.js":329,"core-js/modules/web.dom-collections.for-each.js":380}],57:[function(e,t,r){function n(e,t){t.forEach(function(t){if(t.validator)t.validator(e);else if(t.pattern&&!t.pattern.test(e))throw new Error(t.msg)})}e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.regexp.exec.js"),Object.defineProperty(r,"__esModule",{value:!0}),r.checkValid=void 0,r.checkValid=n},{"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/web.dom-collections.for-each.js":380}],58:[function(e,t,r){(function(t){(function(){e("core-js/modules/es.array.includes.js"),e("core-js/modules/es.string.includes.js"),e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.entries.js"),e("core-js/modules/es.array.concat.js"),Object.defineProperty(r,"__esModule",{value:!0}),r.createRequest=void 0;var n=e("./../../../shims/crypto/crypto.js"),i=e("debug")("ali-oss"),o=e("lodash/isString"),s=e("lodash/isArray"),a=e("lodash/isObject"),l=e("mime"),c=e("dateformat"),u=e("copy-to"),p=e("path"),d=e("./encoder").encoder,m=e("./isIP").isIP,f=e("./setRegion").setRegion,h=e("../client/getReqUrl").getReqUrl,y=e("./isDingTalk").isDingTalk;function g(e,t){return e[t]||e[t.toLowerCase()]}function b(e,t){delete e[t],delete e[t.toLowerCase()]}function v(e){var r=new Date;this.options.amendTimeSkewed&&(r=+new Date+this.options.amendTimeSkewed);var v={"x-oss-date":c(r,this.options.authorizationV4?"UTC:yyyymmdd'T'HHMMss'Z'":"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'")};this.options.authorizationV4&&(v["x-oss-content-sha256"]="UNSIGNED-PAYLOAD"),"undefined"!=typeof window&&(v["x-oss-user-agent"]=this.userAgent),this.userAgent.includes("nodejs")&&(v["User-Agent"]=this.userAgent),this.options.isRequestPay&&Object.assign(v,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(v["x-oss-security-token"]=this.options.stsToken),u(e.headers).to(v),g(v,"Content-Type")||(e.mime&&e.mime.indexOf("/")>0?v["Content-Type"]=e.mime:y()?v["Content-Type"]="application/octet-stream":v["Content-Type"]=l.getType(e.mime||p.extname(e.object||""))),g(v,"Content-Type")||b(v,"Content-Type"),e.content&&(e.disabledMD5||(e.headers&&e.headers["Content-MD5"]?v["Content-MD5"]=e.headers["Content-MD5"]:v["Content-MD5"]=n.createHash("md5").update(t.from(e.content,"utf8")).digest("base64")),v["Content-Length"]||(v["Content-Length"]=e.content.length));var x=Object.prototype.hasOwnProperty;for(var w in v)v[w]&&x.call(v,w)&&(v[w]=d(String(v[w]),this.options.headerEncoding));var S={};if(o(e.subres)?S[e.subres]=null:s(e.subres)?e.subres.forEach(function(e){S[e]=null}):a(e.subres)&&Object.entries(e.subres).forEach(function(e){S[e[0]]=""===e[1]?null:e[1]}),a(e.query)&&Object.entries(e.query).forEach(function(e){S[e[0]]=e[1]}),v.authorization=this.options.authorizationV4?this.authorizationV4(e.method,{headers:v,queries:S},e.bucket,e.object,e.additionalHeaders):this.authorization(e.method,this._getResource(e),e.subres,v,this.options.headerEncoding),m(this.options.endpoint.hostname)){var N=this.options,j=N.region,E=N.internal,C=N.secure,k=f(j,E,C);v.host="".concat(e.bucket,".").concat(k.host)}var T=h.bind(this)(e);i("request %s %s, with headers %j, !!stream: %s",e.method,T,v,!!e.stream);var R=e.timeout||this.options.timeout,O={method:e.method,content:e.content,stream:e.stream,headers:v,timeout:R,writeStream:e.writeStream,customResponse:e.customResponse,ctx:e.ctx||this.ctx};return this.agent&&(O.agent=this.agent),this.httpsAgent&&(O.httpsAgent=this.httpsAgent),O.enableProxy=!!this.options.enableProxy,O.proxy=this.options.proxy?this.options.proxy:null,{url:T,params:O}}r.createRequest=v}).call(this)}).call(this,e("buffer").Buffer)},{"../client/getReqUrl":25,"./../../../shims/crypto/crypto.js":531,"./encoder":62,"./isDingTalk":70,"./isIP":73,"./setRegion":81,buffer:103,"copy-to":107,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.array.includes.js":315,"core-js/modules/es.object.assign.js":325,"core-js/modules/es.object.entries.js":326,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.string.includes.js":342,"core-js/modules/web.dom-collections.for-each.js":380,dateformat:383,debug:536,"lodash/isArray":422,"lodash/isObject":423,"lodash/isString":425,mime:430,path:439}],59:[function(e,t,r){e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.entries.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/es.array.includes.js"),e("core-js/modules/es.object.keys.js"),Object.defineProperty(r,"__esModule",{value:!0}),r.dataFix=void 0;var n=e("./isObject"),i=["true","TRUE","1",1],o=["false","FALSE","0",0];function s(e,t,r){if(n.isObject(e)){var i=t.remove,o=void 0===i?[]:i,c=t.rename,u=void 0===c?{}:c,p=t.camel,d=void 0===p?[]:p,m=t.bool,f=void 0===m?[]:m,h=t.lowerFirst,y=void 0!==h&&h;return o.forEach(function(t){return delete e[t]}),Object.entries(u).forEach(function(t){e[t[0]]&&(e[t[1]]||(e[t[1]]=e[t[0]],delete e[t[0]]))}),d.forEach(function(t){if(e[t]){var r=t.replace(/^(.)/,function(e){return e.toLowerCase()}).replace(/-(\w)/g,function(e,t){return t.toUpperCase()});e[r]||(e[r]=e[t])}}),f.forEach(function(t){e[t]=a(e[t])}),"function"==typeof r&&r(e),l(e,y),s}}function a(e){return!!e&&(!!i.includes(e)||!o.includes(e)&&e)}function l(e,t){t&&Object.keys(e).forEach(function(t){var r=t.replace(/^\w/,function(e){return e.toLowerCase()});void 0===e[r]&&(e[r]=e[t],delete e[t])})}r.dataFix=s},{"./isObject":74,"core-js/modules/es.array.includes.js":315,"core-js/modules/es.object.entries.js":326,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.string.replace.js":345,"core-js/modules/web.dom-collections.for-each.js":380}],60:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault");e("core-js/modules/es.array.slice.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js");var i=n(e("@babel/runtime/helpers/typeof"));Object.defineProperty(r,"__esModule",{value:!0}),r.deepCopyWith=r.deepCopy=void 0;var o=e("./isBuffer");r.deepCopy=function(e){if(null===e||"object"!==(0,i.default)(e))return e;if(o.isBuffer(e))return e.slice();var t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(function(n){t[n]=r.deepCopy(e[n])}),t},r.deepCopyWith=function(e,t){function n(e,r,s){var a=t(e,r,s);if(void 0!==a)return a;if(null===e||"object"!==(0,i.default)(e))return e;if(o.isBuffer(e))return e.slice();var l=Array.isArray(e)?[]:{};return Object.keys(e).forEach(function(t){l[t]=n(e[t],t,e)}),l}return t?n(e,"",null):r.deepCopy(e)}},{"./isBuffer":69,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/helpers/typeof":91,"core-js/modules/es.array.slice.js":319,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/web.dom-collections.for-each.js":380}],61:[function(e,t,r){e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js");var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.encodeString=void 0;var i=n(e("lodash/toString"));function o(e){var t=i.default(e);return encodeURIComponent(t).replace(/[!'()*]/g,function(e){return"%".concat(e.charCodeAt(0).toString(16).toUpperCase())})}r.encodeString=o},{"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.regexp.to-string.js":339,"core-js/modules/es.string.replace.js":345,"lodash/toString":427}],62:[function(e,t,r){(function(t){(function(){function n(e){return"utf-8"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf-8")?e:t.from(e).toString("latin1")}e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(r,"__esModule",{value:!0}),r.encoder=void 0,r.encoder=n}).call(this)}).call(this,e("buffer").Buffer)},{buffer:103,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.to-string.js":339}],63:[function(e,t,r){e("core-js/modules/es.array.map.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),Object.defineProperty(r,"__esModule",{value:!0}),r.formatInventoryConfig=void 0;var n=e("../utils/dataFix"),i=e("../utils/isObject"),o=e("../utils/isArray"),s=e("../utils/formatObjKey");function a(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&i.isObject(e)&&(e=[e]),e=o.isArray(e)?e.map(l):l(e)}function l(e){return n.dataFix(e,{bool:["IsEnabled"]},function(e){var t,r;e.prefix=e.Filter.Prefix,delete e.Filter,e.OSSBucketDestination=e.Destination.OSSBucketDestination,e.OSSBucketDestination.rolename=e.OSSBucketDestination.RoleArn.replace(/.*\//,""),delete e.OSSBucketDestination.RoleArn,e.OSSBucketDestination.bucket=e.OSSBucketDestination.Bucket.replace(/.*:::/,""),delete e.OSSBucketDestination.Bucket,delete e.Destination,e.frequency=e.Schedule.Frequency,delete e.Schedule.Frequency,(null===(t=null==e?void 0:e.OptionalFields)||void 0===t?void 0:t.Field)&&!o.isArray(null===(r=e.OptionalFields)||void 0===r?void 0:r.Field)&&(e.OptionalFields.Field=[e.OptionalFields.Field])}),e=s.formatObjKey(e,"firstLowerCase",{exclude:["OSSBucketDestination","SSE-OSS","SSE-KMS"]})}r.formatInventoryConfig=a},{"../utils/dataFix":59,"../utils/formatObjKey":64,"../utils/isArray":67,"../utils/isObject":74,"core-js/modules/es.array.map.js":318,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.string.replace.js":345}],64:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault");e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.array.includes.js"),e("core-js/modules/es.string.includes.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js");var i=n(e("@babel/runtime/helpers/typeof"));function o(e,t,r){if(null===e||"object"!==(0,i.default)(e))return e;var n;if(Array.isArray(e)){n=[];for(var a=0;a<e.length;a++)n.push(o(e[a],t,r))}else n={},Object.keys(e).forEach(function(i){n[s(i,t,r)]=o(e[i],t,r)});return n}function s(e,t,r){return r&&r.exclude&&r.exclude.includes(e)||("firstUpperCase"===t?e=e.replace(/^./,function(e){return e.toUpperCase()}):"firstLowerCase"===t&&(e=e.replace(/^./,function(e){return e.toLowerCase()}))),e}Object.defineProperty(r,"__esModule",{value:!0}),r.formatObjKey=void 0,r.formatObjKey=o},{"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/helpers/typeof":91,"core-js/modules/es.array.includes.js":315,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.string.includes.js":342,"core-js/modules/es.string.replace.js":345,"core-js/modules/web.dom-collections.for-each.js":380}],65:[function(e,t,r){function n(e){return e.replace(/^oss-/g,"")}e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),Object.defineProperty(r,"__esModule",{value:!0}),r.getStandardRegion=void 0,r.getStandardRegion=n},{"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.string.replace.js":345}],66:[function(e,t,r){function n(e){for(var t=0,r=0;r<e.length;r++){var n=e.charAt(r);/^[\u00-\uff]$/.test(n)?t+=1:t+=2}return t}e("core-js/modules/es.regexp.exec.js"),Object.defineProperty(r,"__esModule",{value:!0}),r.getStrBytesCount=void 0,r.getStrBytesCount=n},{"core-js/modules/es.regexp.exec.js":338}],67:[function(e,t,r){e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(r,"__esModule",{value:!0}),r.isArray=void 0,r.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.to-string.js":339}],68:[function(e,t,r){function n(e){return"undefined"!=typeof Blob&&e instanceof Blob}Object.defineProperty(r,"__esModule",{value:!0}),r.isBlob=void 0,r.isBlob=n},{}],69:[function(e,t,r){(function(e){(function(){function t(t){return e.isBuffer(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.isBuffer=void 0,r.isBuffer=t}).call(this)}).call(this,{isBuffer:e("../../../node_modules/is-buffer/index.js")})},{"../../../node_modules/is-buffer/index.js":409}],70:[function(e,t,r){(function(t){(function(){function n(){return!(!t.browser||!window.navigator.userAgent.toLowerCase().includes("aliapp(dingtalk"))}e("core-js/modules/es.array.includes.js"),e("core-js/modules/es.string.includes.js"),Object.defineProperty(r,"__esModule",{value:!0}),r.isDingTalk=void 0,r.isDingTalk=n}).call(this)}).call(this,e("_process"))},{_process:538,"core-js/modules/es.array.includes.js":315,"core-js/modules/es.string.includes.js":342}],71:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.isFile=void 0,r.isFile=function(e){return"undefined"!=typeof File&&e instanceof File}},{}],72:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.isFunction=void 0,r.isFunction=function(e){return"function"==typeof e}},{}],73:[function(e,t,r){e("core-js/modules/es.regexp.exec.js"),Object.defineProperty(r,"__esModule",{value:!0}),r.isIP=void 0,r.isIP=function(e){var t=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/.test(e)||t.test(e)}},{"core-js/modules/es.regexp.exec.js":338}],74:[function(e,t,r){e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(r,"__esModule",{value:!0}),r.isObject=void 0,r.isObject=function(e){return"[object Object]"===Object.prototype.toString.call(e)}},{"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.to-string.js":339}],75:[function(e,t,r){e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),Object.defineProperty(r,"__esModule",{value:!0}),r.lowercaseKeyHeader=void 0;var n=e("./isObject");function i(e){var t={};return n.isObject(e)&&Object.keys(e).forEach(function(r){t[r.toLowerCase()]=e[r]}),t}r.lowercaseKeyHeader=i},{"./isObject":74,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/web.dom-collections.for-each.js":380}],76:[function(e,t,r){e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.array.join.js"),e("core-js/modules/es.array.map.js"),Object.defineProperty(r,"__esModule",{value:!0}),r.obj2xml=void 0;var n=e("./formatObjKey");function i(e){return Object.prototype.toString.call(e).replace(/(.*? |])/g,"").toLowerCase()}function o(e,t){var r="";return t&&t.headers&&(r='<?xml version="1.0" encoding="UTF-8"?>\n'),t&&t.firstUpperCase&&(e=n.formatObjKey(e,"firstUpperCase")),"object"===i(e)?Object.keys(e).forEach(function(t){"undefined"!==i(e[t])&&"null"!==i(e[t])&&("string"===i(e[t])||"number"===i(e[t])?r+="<".concat(t,">").concat(e[t],"</").concat(t,">"):"object"===i(e[t])?r+="<".concat(t,">").concat(o(e[t]),"</").concat(t,">"):"array"===i(e[t])?r+=e[t].map(function(e){return"<".concat(t,">").concat(o(e),"</").concat(t,">")}).join(""):r+="<".concat(t,">").concat(e[t].toString(),"</").concat(t,">"))}):r+=e.toString(),r}r.obj2xml=o},{"./formatObjKey":64,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.array.join.js":317,"core-js/modules/es.array.map.js":318,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.regexp.to-string.js":339,"core-js/modules/es.string.replace.js":345,"core-js/modules/web.dom-collections.for-each.js":380}],77:[function(e,t,r){function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=i(e))||t){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 s,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,s=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw s}}}}function i(e,t){if(e){if("string"==typeof e)return o(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)?o(e,t):void 0}}function o(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}function s(e,t){var r,i=Object.assign({},e),o=n(t);try{for(o.s();!(r=o.n()).done;)delete i[r.value]}catch(s){o.e(s)}finally{o.f()}return i}e("core-js/modules/es.array.slice.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js"),e("core-js/modules/es.function.name.js"),e("core-js/modules/es.array.from.js"),e("core-js/modules/es.string.iterator.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.symbol.js"),e("core-js/modules/es.symbol.description.js"),e("core-js/modules/es.symbol.iterator.js"),e("core-js/modules/es.array.iterator.js"),e("core-js/modules/web.dom-collections.iterator.js"),e("core-js/modules/es.object.assign.js"),Object.defineProperty(r,"__esModule",{value:!0}),r.omit=void 0,r.omit=s},{"core-js/modules/es.array.from.js":314,"core-js/modules/es.array.iterator.js":316,"core-js/modules/es.array.slice.js":319,"core-js/modules/es.function.name.js":322,"core-js/modules/es.object.assign.js":325,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.regexp.to-string.js":339,"core-js/modules/es.string.iterator.js":343,"core-js/modules/es.symbol.description.js":351,"core-js/modules/es.symbol.iterator.js":353,"core-js/modules/es.symbol.js":354,"core-js/modules/web.dom-collections.iterator.js":381}],78:[function(e,t,r){e("core-js/modules/es.array.includes.js"),e("core-js/modules/es.string.includes.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.match.js"),Object.defineProperty(r,"__esModule",{value:!0}),r.parseRestoreInfo=void 0,r.parseRestoreInfo=function(e){var t;if(e&&!(t={ongoingRequest:e.includes("true")}).ongoingRequest){var r=e.match(/expiry-date="(.*)"/);r&&r[1]&&(t.expiryDate=new Date(r[1]))}return t}},{"core-js/modules/es.array.includes.js":315,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.string.includes.js":342,"core-js/modules/es.string.match.js":344}],79:[function(e,t,r){function n(e){var t;if(e)if("string"==typeof e)try{t=JSON.stringify(JSON.parse(e))}catch(r){throw new Error("Policy string is not a valid JSON: ".concat(r.message))}else t=JSON.stringify(e);return t}e("core-js/modules/es.object.keys.js"),Object.defineProperty(r,"__esModule",{value:!0}),r.policy2Str=void 0,r.policy2Str=n},{"core-js/modules/es.object.keys.js":328}],80:[function(e,t,r){function n(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=0,i=r.retryDelay,o=void 0===i?500:i,s=r.errorHandler,a=void 0===s?function(){return!0}:s,l=function r(){for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];return new Promise(function(i,l){e.apply(void 0,s).then(function(e){n=0,i(e)}).catch(function(e){n<t&&a(e)?(n++,setTimeout(function(){i(r.apply(void 0,s))},o)):(n=0,l(e))})})};return l}e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.promise.js"),Object.defineProperty(r,"__esModule",{value:!0}),r.retry=void 0,r.retry=n},{"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.promise.js":333}],81:[function(e,t,r){var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.setRegion=void 0;var i=n(e("url")),o=e("./checkConfigValid");function s(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];o.checkConfigValid(e,"region");var n=r?"https://":"http://",s=t?"-internal.aliyuncs.com":".aliyuncs.com",a="vpc100-oss-cn-";return e.substr(0,a.length)===a&&(s=".aliyuncs.com"),i.default.parse(n+e+s)}r.setRegion=s},{"./checkConfigValid":54,url:543}],82:[function(e,t,r){var n=e("@babel/runtime/helpers/interopRequireDefault"),i=n(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.array.find.js"),e("core-js/modules/es.object.assign.js");var o=n(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(r,"__esModule",{value:!0}),r.checkCredentials=r.setSTSToken=void 0;var s=e("./formatObjKey");function a(){return l.apply(this,arguments)}function l(){return(l=(0,o.default)(i.default.mark(function e(){var t,r;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.options||(this.options={}),t=new Date,!this.stsTokenFreshTime){e.next=14;break}if(!(+t-this.stsTokenFreshTime>=this.options.refreshSTSTokenInterval)){e.next=12;break}return this.stsTokenFreshTime=t,e.next=7,this.options.refreshSTSToken();case 7:r=e.sent,(r=s.formatObjKey(r,"firstLowerCase")).securityToken&&(r.stsToken=r.securityToken),c(r),Object.assign(this.options,r);case 12:e.next=15;break;case 14:this.stsTokenFreshTime=t;case 15:return e.abrupt("return",null);case 16:case"end":return e.stop()}},e,this)}))).apply(this,arguments)}function c(e){var t=["accessKeySecret","accessKeyId","stsToken"],r=Object.keys(e);t.forEach(function(e){if(!r.find(function(t){return t===e}))throw Error("refreshSTSToken must return contains ".concat(e))})}r.setSTSToken=a,r.checkCredentials=c},{"./formatObjKey":64,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.array.find.js":313,"core-js/modules/es.object.assign.js":325,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329}],83:[function(e,t,r){function n(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}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},{}],84:[function(e,t,r){var n=e("./arrayLikeToArray.js");function i(e){if(Array.isArray(e))return n(e)}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},{"./arrayLikeToArray.js":83}],85:[function(e,t,r){function n(e,t,r,n,i,o,s){try{var a=e[o](s),l=a.value}catch(c){return void r(c)}a.done?t(l):Promise.resolve(l).then(n,i)}function i(e){return function(){var t=this,r=arguments;return new Promise(function(i,o){var s=e.apply(t,r);function a(e){n(s,i,o,a,l,"next",e)}function l(e){n(s,i,o,a,l,"throw",e)}a(void 0)})}}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},{}],86:[function(e,t,r){function n(e){return e&&e.__esModule?e:{default:e}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},{}],87:[function(e,t,r){function n(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},{}],88:[function(e,t,r){function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},{}],89:[function(e,t,r){var n=e("./typeof.js").default;function i(){t.exports=i=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var e,r={},o=Object.prototype,s=o.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",p=l.toStringTag||"@@toStringTag";function d(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(M){d=function(e,t,r){return e[t]=r}}function m(e,t,r,n){var i=t&&t.prototype instanceof x?t:x,o=Object.create(i.prototype),s=new A(n||[]);return a(o,"_invoke",{value:R(e,r,s)}),o}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(n){return{type:"throw",arg:n}}}r.wrap=m;var h="suspendedStart",y="suspendedYield",g="executing",b="completed",v={};function x(){}function w(){}function S(){}var N={};d(N,c,function(){return this});var j=Object.getPrototypeOf,E=j&&j(j(I([])));E&&E!==o&&s.call(E,c)&&(N=E);var C=S.prototype=x.prototype=Object.create(N);function k(e){["next","throw","return"].forEach(function(t){d(e,t,function(e){return this._invoke(t,e)})})}function T(e,t){function r(i,o,a,l){var c=f(e[i],e,o);if("throw"!==c.type){var u=c.arg,p=u.value;return p&&"object"==n(p)&&s.call(p,"__await")?t.resolve(p.__await).then(function(e){r("next",e,a,l)},function(e){r("throw",e,a,l)}):t.resolve(p).then(function(e){u.value=e,a(u)},function(e){return r("throw",e,a,l)})}l(c.arg)}var i;a(this,"_invoke",{value:function(e,n){function o(){return new t(function(t,i){r(e,n,t,i)})}return i=i?i.then(o,o):o()}})}function R(t,r,n){var i=h;return function(o,s){if(i===g)throw new Error("Generator is already running");if(i===b){if("throw"===o)throw s;return{value:e,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var l=O(a,n);if(l){if(l===v)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=g;var c=f(t,r,n);if("normal"===c.type){if(i=n.done?b:y,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=b,n.method="throw",n.arg=c.arg)}}}function O(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,O(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=f(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var s=o.arg;return s?s.done?(r[t.resultName]=s.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(s.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(n(t)+" is not iterable")}return w.prototype=S,a(C,"constructor",{value:S,configurable:!0}),a(S,"constructor",{value:w,configurable:!0}),w.displayName=d(S,p,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,d(e,p,"GeneratorFunction")),e.prototype=Object.create(C),e},r.awrap=function(e){return{__await:e}},k(T.prototype),d(T.prototype,u,function(){return this}),r.AsyncIterator=T,r.async=function(e,t,n,i,o){void 0===o&&(o=Promise);var s=new T(m(e,t,n,i),o);return r.isGeneratorFunction(t)?s:s.next().then(function(e){return e.done?e.value:s.next()})},k(C),d(C,p,"Generator"),d(C,c,function(){return this}),d(C,"toString",function(){return"[object Generator]"}),r.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=I,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(_),!t)for(var r in this)"t"===r.charAt(0)&&s.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,i){return a.type="throw",a.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var l=s.call(o,"catchLoc"),c=s.call(o,"finallyLoc");if(l&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&s.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;_(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},r}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},{"./typeof.js":91}],90:[function(e,t,r){var n=e("./arrayWithoutHoles.js"),i=e("./iterableToArray.js"),o=e("./unsupportedIterableToArray.js"),s=e("./nonIterableSpread.js");function a(e){return n(e)||i(e)||o(e)||s()}t.exports=a,t.exports.__esModule=!0,t.exports.default=t.exports},{"./arrayWithoutHoles.js":84,"./iterableToArray.js":87,"./nonIterableSpread.js":88,"./unsupportedIterableToArray.js":92}],91:[function(e,t,r){function n(e){return t.exports=n="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},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},{}],92:[function(e,t,r){var n=e("./arrayLikeToArray.js");function i(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}}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},{"./arrayLikeToArray.js":83}],93:[function(e,t,r){var n=e("../helpers/regeneratorRuntime")();t.exports=n;try{regeneratorRuntime=n}catch(i){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},{"../helpers/regeneratorRuntime":89}],94:[function(e,t,r){function n(){}t.exports=n,t.exports.HttpsAgent=n},{}],95:[function(e,t,r){(function(r){(function(){var n=e("object.assign/polyfill")();
3
3
  /*!
4
4
  * The buffer module from node.js, for the browser.