newt-client-js 3.3.13 → 3.3.14

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.
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).newtClient={})}(this,(function(e){"use strict";function t(e,t){return function(){return e.apply(t,arguments)}}const{toString:r}=Object.prototype,{getPrototypeOf:n}=Object,{iterator:o,toStringTag:i}=Symbol,a=(s=Object.create(null),e=>{const t=r.call(e);return s[t]||(s[t]=t.slice(8,-1).toLowerCase())});var s;const c=e=>(e=e.toLowerCase(),t=>a(t)===e),l=e=>t=>typeof t===e,{isArray:u}=Array,f=l("undefined");function p(e){return null!==e&&!f(e)&&null!==e.constructor&&!f(e.constructor)&&h(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const d=c("ArrayBuffer");const y=l("string"),h=l("function"),m=l("number"),g=e=>null!==e&&"object"==typeof e,b=e=>{if("object"!==a(e))return!1;const t=n(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||i in e||o in e)},w=c("Date"),E=c("File"),v=c("Blob"),O=c("FileList"),S=c("URLSearchParams"),[R,A,_,j]=["ReadableStream","Request","Response","Headers"].map(c);function T(e,t){let r,n,{allOwnKeys:o=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null!=e)if("object"!=typeof e&&(e=[e]),u(e))for(r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else{if(p(e))return;const n=o?Object.getOwnPropertyNames(e):Object.keys(e),i=n.length;let a;for(r=0;r<i;r++)a=n[r],t.call(null,e[a],a,e)}}function P(e,t){if(p(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const N="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,x=e=>!f(e)&&e!==N;const U=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&n(Uint8Array)),D=c("HTMLFormElement"),C=(e=>{let{hasOwnProperty:t}=e;return(e,r)=>t.call(e,r)})(Object.prototype),F=c("RegExp"),L=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};T(r,((r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)})),Object.defineProperties(e,n)};const I=c("AsyncFunction"),k=(B="function"==typeof setImmediate,M=h(N.postMessage),B?setImmediate:M?(q=`axios@${Math.random()}`,W=[],N.addEventListener("message",(e=>{let{source:t,data:r}=e;t===N&&r===q&&W.length&&W.shift()()}),!1),e=>{W.push(e),N.postMessage(q,"*")}):e=>setTimeout(e));var B,M,q,W;const $="undefined"!=typeof queueMicrotask?queueMicrotask.bind(N):"undefined"!=typeof process&&process.nextTick||k;var H={isArray:u,isArrayBuffer:d,isBuffer:p,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||h(e.append)&&("formdata"===(t=a(e))||"object"===t&&h(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&d(e.buffer),t},isString:y,isNumber:m,isBoolean:e=>!0===e||!1===e,isObject:g,isPlainObject:b,isEmptyObject:e=>{if(!g(e)||p(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:R,isRequest:A,isResponse:_,isHeaders:j,isUndefined:f,isDate:w,isFile:E,isBlob:v,isRegExp:F,isFunction:h,isStream:e=>g(e)&&h(e.pipe),isURLSearchParams:S,isTypedArray:U,isFileList:O,forEach:T,merge:function e(){const{caseless:t,skipUndefined:r}=x(this)&&this||{},n={},o=(o,i)=>{if("__proto__"===i||"constructor"===i||"prototype"===i)return;const a=t&&P(n,i)||i;b(n[a])&&b(o)?n[a]=e(n[a],o):b(o)?n[a]=e({},o):u(o)?n[a]=o.slice():r&&f(o)||(n[a]=o)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&T(arguments[e],o);return n},extend:function(e,r,n){let{allOwnKeys:o}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return T(r,((r,o)=>{n&&h(r)?Object.defineProperty(e,o,{value:t(r,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{value:r,writable:!0,enumerable:!0,configurable:!0})}),{allOwnKeys:o}),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,o)=>{let i,a,s;const c={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)s=i[a],o&&!o(s,e,t)||c[s]||(t[s]=e[s],c[s]=!0);e=!1!==r&&n(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:a,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(u(e))return e;let t=e.length;if(!m(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[o]).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:C,hasOwnProp:C,reduceDescriptors:L,freezeMethods:e=>{L(e,((t,r)=>{if(h(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];h(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 u(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:P,global:N,isContextDefined:x,isSpecCompliantForm:function(e){return!!(e&&h(e.append)&&"FormData"===e[i]&&e[o])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(g(e)){if(t.indexOf(e)>=0)return;if(p(e))return e;if(!("toJSON"in e)){t[n]=e;const o=u(e)?[]:{};return T(e,((e,t)=>{const i=r(e,n+1);!f(i)&&(o[t]=i)})),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:I,isThenable:e=>e&&(g(e)||h(e))&&h(e.then)&&h(e.catch),setImmediate:k,asap:$,isIterable:e=>null!=e&&h(e[o])};class z extends Error{static from(e,t,r,n,o,i){const a=new z(e.message,t||e.code,r,n,o);return a.cause=e,a.name=e.name,i&&Object.assign(a,i),a}constructor(e,t,r,n,o){super(e),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.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:H.toJSONObject(this.config),code:this.code,status:this.status}}}z.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",z.ERR_BAD_OPTION="ERR_BAD_OPTION",z.ECONNABORTED="ECONNABORTED",z.ETIMEDOUT="ETIMEDOUT",z.ERR_NETWORK="ERR_NETWORK",z.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",z.ERR_DEPRECATED="ERR_DEPRECATED",z.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",z.ERR_BAD_REQUEST="ERR_BAD_REQUEST",z.ERR_CANCELED="ERR_CANCELED",z.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",z.ERR_INVALID_URL="ERR_INVALID_URL";var K=z;function V(e){return H.isPlainObject(e)||H.isArray(e)}function G(e){return H.endsWith(e,"[]")?e.slice(0,-2):e}function J(e,t,r){return e?e.concat(t).map((function(e,t){return e=G(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const Q=H.toFlatObject(H,{},null,(function(e){return/^is[A-Z]/.test(e)}));function X(e,t,r){if(!H.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=H.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!H.isUndefined(t[e])}))).metaTokens,o=r.visitor||l,i=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&H.isSpecCompliantForm(t);if(!H.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(H.isDate(e))return e.toISOString();if(H.isBoolean(e))return e.toString();if(!s&&H.isBlob(e))throw new K("Blob is not supported. Use a Buffer instead.");return H.isArrayBuffer(e)||H.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,r,o){let s=e;if(e&&!o&&"object"==typeof e)if(H.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(H.isArray(e)&&function(e){return H.isArray(e)&&!e.some(V)}(e)||(H.isFileList(e)||H.endsWith(r,"[]"))&&(s=H.toArray(e)))return r=G(r),s.forEach((function(e,n){!H.isUndefined(e)&&null!==e&&t.append(!0===a?J([r],n,i):null===a?r:r+"[]",c(e))})),!1;return!!V(e)||(t.append(J(o,r,i),c(e)),!1)}const u=[],f=Object.assign(Q,{defaultVisitor:l,convertValue:c,isVisitable:V});if(!H.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!H.isUndefined(r)){if(-1!==u.indexOf(r))throw Error("Circular reference detected in "+n.join("."));u.push(r),H.forEach(r,(function(r,i){!0===(!(H.isUndefined(r)||null===r)&&o.call(t,r,H.isString(i)?i.trim():i,n,f))&&e(r,n?n.concat(i):[i])})),u.pop()}}(e),t}function Y(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Z(e,t){this._pairs=[],e&&X(e,this,t)}const ee=Z.prototype;function te(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function re(e,t,r){if(!t)return e;const n=r&&r.encode||te,o=H.isFunction(r)?{serialize:r}:r,i=o&&o.serialize;let a;if(a=i?i(t,o):H.isURLSearchParams(t)?t.toString():new Z(t,o).toString(n),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}ee.append=function(e,t){this._pairs.push([e,t])},ee.toString=function(e){const t=e?function(t){return e.call(this,t,Y)}:Y;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var ne=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){H.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},oe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},ie={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Z,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const ae="undefined"!=typeof window&&"undefined"!=typeof document,se="object"==typeof navigator&&navigator||void 0,ce=ae&&(!se||["ReactNative","NativeScript","NS"].indexOf(se.product)<0),le="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ue=ae&&window.location.href||"http://localhost";var fe={...Object.freeze({__proto__:null,hasBrowserEnv:ae,hasStandardBrowserWebWorkerEnv:le,hasStandardBrowserEnv:ce,navigator:se,origin:ue}),...ie};function pe(e){function t(e,r,n,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&H.isArray(n)?n.length:i,s)return H.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!a;n[i]&&H.isObject(n[i])||(n[i]=[]);return t(e,r,n[i],o)&&H.isArray(n[i])&&(n[i]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}(n[i])),!a}if(H.isFormData(e)&&H.isFunction(e.entries)){const r={};return H.forEachEntry(e,((e,n)=>{t(function(e){return H.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null}const de={transitional:oe,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=H.isObject(e);o&&H.isHTMLForm(e)&&(e=new FormData(e));if(H.isFormData(e))return n?JSON.stringify(pe(e)):e;if(H.isArrayBuffer(e)||H.isBuffer(e)||H.isStream(e)||H.isFile(e)||H.isBlob(e)||H.isReadableStream(e))return e;if(H.isArrayBufferView(e))return e.buffer;if(H.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return X(e,new fe.classes.URLSearchParams,{visitor:function(e,t,r,n){return fe.isNode&&H.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((i=H.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return X(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e,t,r){if(H.isString(e))try{return(t||JSON.parse)(e),H.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||de.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(H.isResponse(e)||H.isReadableStream(e))return e;if(e&&H.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e,this.parseReviver)}catch(e){if(r){if("SyntaxError"===e.name)throw K.from(e,K.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:fe.classes.FormData,Blob:fe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};H.forEach(["delete","get","head","post","put","patch"],(e=>{de.headers[e]={}}));var ye=de;const he=H.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 me=Symbol("internals");function ge(e){return e&&String(e).trim().toLowerCase()}function be(e){return!1===e||null==e?e:H.isArray(e)?e.map(be):String(e)}function we(e,t,r,n,o){return H.isFunction(n)?n.call(this,t,r):(o&&(t=r),H.isString(t)?H.isString(n)?-1!==t.indexOf(n):H.isRegExp(n)?n.test(t):void 0:void 0)}class Ee{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=ge(t);if(!o)throw new Error("header name must be a non-empty string");const i=H.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=be(e))}const i=(e,t)=>H.forEach(e,((e,r)=>o(e,r,t)));if(H.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(H.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&he[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(H.isObject(e)&&H.isIterable(e)){let r,n,o={};for(const t of e){if(!H.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[n=t[0]]=(r=o[n])?H.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}i(o,t)}else null!=e&&o(t,e,r);return this}get(e,t){if(e=ge(e)){const r=H.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(H.isFunction(t))return t.call(this,e,r);if(H.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ge(e)){const r=H.findKey(this,e);return!(!r||void 0===this[r]||t&&!we(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=ge(e)){const o=H.findKey(r,e);!o||t&&!we(0,r[o],o,t)||(delete r[o],n=!0)}}return H.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!we(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return H.forEach(this,((n,o)=>{const i=H.findKey(r,o);if(i)return t[i]=be(n),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(o):String(o).trim();a!==o&&delete t[o],t[a]=be(n),r[a]=!0})),this}concat(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.constructor.concat(this,...t)}toJSON(e){const t=Object.create(null);return H.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&H.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((e=>{let[t,r]=e;return t+": "+r})).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){const t=new this(e);for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return n.forEach((e=>t.set(e))),t}static accessor(e){const t=(this[me]=this[me]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=ge(e);t[n]||(!function(e,t){const r=H.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})}))}(r,e),t[n]=!0)}return H.isArray(e)?e.forEach(n):n(e),this}}Ee.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),H.reduceDescriptors(Ee.prototype,((e,t)=>{let{value:r}=e,n=t[0].toUpperCase()+t.slice(1);return{get:()=>r,set(e){this[n]=e}}})),H.freezeMethods(Ee);var ve=Ee;function Oe(e,t){const r=this||ye,n=t||r,o=ve.from(n.headers);let i=n.data;return H.forEach(e,(function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Se(e){return!(!e||!e.__CANCEL__)}var Re=class extends K{constructor(e,t,r){super(null==e?"canceled":e,K.ERR_CANCELED,t,r),this.name="CanceledError",this.__CANCEL__=!0}};function Ae(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 _e=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,n=0;const o=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const c=Date.now(),l=n[a];o||(o=c),r[i]=s,n[i]=c;let u=a,f=0;for(;u!==i;)f+=r[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;const p=l&&c-l;return p?Math.round(1e3*f/p):void 0}}(50,250);return function(e,t){let r,n,o=0,i=1e3/t;const a=function(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();o=i,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[function(){const e=Date.now(),t=e-o;for(var s=arguments.length,c=new Array(s),l=0;l<s;l++)c[l]=arguments[l];t>=i?a(c,e):(r=c,n||(n=setTimeout((()=>{n=null,a(r)}),i-t)))},()=>r&&a(r)]}((r=>{const i=r.loaded,a=r.lengthComputable?r.total:void 0,s=i-n,c=o(s);n=i;e({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&i<=a?(a-i)/c:void 0,event:r,lengthComputable:null!=a,[t?"download":"upload"]:!0})}),r)},je=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Te=e=>function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return H.asap((()=>e(...r)))};var Pe=fe.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,fe.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(fe.origin),fe.navigator&&/(msie|trident)/i.test(fe.navigator.userAgent)):()=>!0,Ne=fe.hasStandardBrowserEnv?{write(e,t,r,n,o,i,a){if("undefined"==typeof document)return;const s=[`${e}=${encodeURIComponent(t)}`];H.isNumber(r)&&s.push(`expires=${new Date(r).toUTCString()}`),H.isString(n)&&s.push(`path=${n}`),H.isString(o)&&s.push(`domain=${o}`),!0===i&&s.push("secure"),H.isString(a)&&s.push(`SameSite=${a}`),document.cookie=s.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 xe(e,t,r){let n=!("string"==typeof(o=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(o));var o;return e&&(n||0==r)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Ue=e=>e instanceof ve?{...e}:e;function De(e,t){t=t||{};const r={};function n(e,t,r,n){return H.isPlainObject(e)&&H.isPlainObject(t)?H.merge.call({caseless:n},e,t):H.isPlainObject(t)?H.merge({},t):H.isArray(t)?t.slice():t}function o(e,t,r,o){return H.isUndefined(t)?H.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function i(e,t){if(!H.isUndefined(t))return n(void 0,t)}function a(e,t){return H.isUndefined(t)?H.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,o,i){return i in t?n(r,o):i in e?n(void 0,r):void 0}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,r)=>o(Ue(e),Ue(t),0,!0)};return H.forEach(Object.keys({...e,...t}),(function(n){if("__proto__"===n||"constructor"===n||"prototype"===n)return;const i=H.hasOwnProp(c,n)?c[n]:o,a=i(e[n],t[n],n);H.isUndefined(a)&&i!==s||(r[n]=a)})),r}var Ce=e=>{const t=De({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=t;if(t.headers=a=ve.from(a),t.url=re(xe(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),H.isFormData(r))if(fe.hasStandardBrowserEnv||fe.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(H.isFunction(r.getHeaders)){const e=r.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach((e=>{let[r,n]=e;t.includes(r.toLowerCase())&&a.set(r,n)}))}if(fe.hasStandardBrowserEnv&&(n&&H.isFunction(n)&&(n=n(t)),n||!1!==n&&Pe(t.url))){const e=o&&i&&Ne.read(i);e&&a.set(o,e)}return t};var Fe="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){const n=Ce(e);let o=n.data;const i=ve.from(n.headers).normalize();let a,s,c,l,u,{responseType:f,onUploadProgress:p,onDownloadProgress:d}=n;function y(){l&&l(),u&&u(),n.cancelToken&&n.cancelToken.unsubscribe(a),n.signal&&n.signal.removeEventListener("abort",a)}let h=new XMLHttpRequest;function m(){if(!h)return;const n=ve.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());Ae((function(e){t(e),y()}),(function(e){r(e),y()}),{data:f&&"text"!==f&&"json"!==f?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=m:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(m)},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",o=new K(n,K.ERR_NETWORK,e,h);o.event=t||null,r(o),h=null},h.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||oe;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new K(t,o.clarifyTimeoutError?K.ETIMEDOUT:K.ECONNABORTED,e,h)),h=null},void 0===o&&i.setContentType(null),"setRequestHeader"in h&&H.forEach(i.toJSON(),(function(e,t){h.setRequestHeader(t,e)})),H.isUndefined(n.withCredentials)||(h.withCredentials=!!n.withCredentials),f&&"json"!==f&&(h.responseType=n.responseType),d&&([c,u]=_e(d,!0),h.addEventListener("progress",c)),p&&h.upload&&([s,l]=_e(p),h.upload.addEventListener("progress",s),h.upload.addEventListener("loadend",l)),(n.cancelToken||n.signal)&&(a=t=>{h&&(r(!t||t.type?new Re(null,e,h):t),h.abort(),h=null)},n.cancelToken&&n.cancelToken.subscribe(a),n.signal&&(n.signal.aborted?a():n.signal.addEventListener("abort",a)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);g&&-1===fe.protocols.indexOf(g)?r(new K("Unsupported protocol "+g+":",K.ERR_BAD_REQUEST,e)):h.send(o||null)}))};var Le=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const o=function(e){if(!r){r=!0,a();const t=e instanceof Error?e:this.reason;n.abort(t instanceof K?t:new Re(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null,o(new K(`timeout of ${t}ms exceeded`,K.ETIMEDOUT))}),t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:s}=n;return s.unsubscribe=()=>H.asap(a),s}};const Ie=function*(e,t){let r=e.byteLength;if(!t||r<t)return void(yield e);let n,o=0;for(;o<r;)n=o+t,yield e.slice(o,n),o=n},ke=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()}},Be=(e,t,r,n)=>{const o=async function*(e,t){for await(const r of ke(e))yield*Ie(r,t)}(e,t);let i,a=0,s=e=>{i||(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return s(),void e.close();let i=n.byteLength;if(r){let e=a+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},{isFunction:Me}=H,qe=(e=>{let{Request:t,Response:r}=e;return{Request:t,Response:r}})(H.global),{ReadableStream:We,TextEncoder:$e}=H.global,He=function(e){try{for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return!!e(...r)}catch(e){return!1}},ze=e=>{e=H.merge.call({skipUndefined:!0},qe,e);const{fetch:t,Request:r,Response:n}=e,o=t?Me(t):"function"==typeof fetch,i=Me(r),a=Me(n);if(!o)return!1;const s=o&&Me(We),c=o&&("function"==typeof $e?(l=new $e,e=>l.encode(e)):async e=>new Uint8Array(await new r(e).arrayBuffer()));var l;const u=i&&s&&He((()=>{let e=!1;const t=new r(fe.origin,{body:new We,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),f=a&&s&&He((()=>H.isReadableStream(new n("").body))),p={stream:f&&(e=>e.body)};o&&["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=H.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(H.isBlob(e))return e.size;if(H.isSpecCompliantForm(e)){const t=new r(fe.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return H.isArrayBufferView(e)||H.isArrayBuffer(e)?e.byteLength:(H.isURLSearchParams(e)&&(e+=""),H.isString(e)?(await c(e)).byteLength:void 0)})(t):n};return async e=>{let{url:o,method:a,data:s,signal:c,cancelToken:l,timeout:y,onDownloadProgress:h,onUploadProgress:m,responseType:g,headers:b,withCredentials:w="same-origin",fetchOptions:E}=Ce(e),v=t||fetch;g=g?(g+"").toLowerCase():"text";let O=Le([c,l&&l.toAbortSignal()],y),S=null;const R=O&&O.unsubscribe&&(()=>{O.unsubscribe()});let A;try{if(m&&u&&"get"!==a&&"head"!==a&&0!==(A=await d(b,s))){let e,t=new r(o,{method:"POST",body:s,duplex:"half"});if(H.isFormData(s)&&(e=t.headers.get("content-type"))&&b.setContentType(e),t.body){const[e,r]=je(A,_e(Te(m)));s=Be(t.body,65536,e,r)}}H.isString(w)||(w=w?"include":"omit");const t=i&&"credentials"in r.prototype,c={...E,signal:O,method:a.toUpperCase(),headers:b.normalize().toJSON(),body:s,duplex:"half",credentials:t?w:void 0};S=i&&new r(o,c);let l=await(i?v(S,E):v(o,c));const y=f&&("stream"===g||"response"===g);if(f&&(h||y&&R)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=l[t]}));const t=H.toFiniteNumber(l.headers.get("content-length")),[r,o]=h&&je(t,_e(Te(h),!0))||[];l=new n(Be(l.body,65536,r,(()=>{o&&o(),R&&R()})),e)}g=g||"text";let _=await p[H.findKey(p,g)||"text"](l,e);return!y&&R&&R(),await new Promise(((t,r)=>{Ae(t,r,{data:_,headers:ve.from(l.headers),status:l.status,statusText:l.statusText,config:e,request:S})}))}catch(t){if(R&&R(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new K("Network Error",K.ERR_NETWORK,e,S,t&&t.response),{cause:t.cause||t});throw K.from(t,t&&t.code,e,S,t&&t.response)}}},Ke=new Map,Ve=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:o}=t,i=[n,o,r];let a,s,c=i.length,l=Ke;for(;c--;)a=i[c],s=l.get(a),void 0===s&&l.set(a,s=c?new Map:ze(t)),l=s;return s};Ve();const Ge={http:null,xhr:Fe,fetch:{get:Ve}};H.forEach(Ge,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Je=e=>`- ${e}`,Qe=e=>H.isFunction(e)||null===e||!1===e;var Xe={getAdapter:function(e,t){e=H.isArray(e)?e:[e];const{length:r}=e;let n,o;const i={};for(let a=0;a<r;a++){let r;if(n=e[a],o=n,!Qe(n)&&(o=Ge[(r=String(n)).toLowerCase()],void 0===o))throw new K(`Unknown adapter '${r}'`);if(o&&(H.isFunction(o)||(o=o.get(t))))break;i[r||"#"+a]=o}if(!o){const e=Object.entries(i).map((e=>{let[t,r]=e;return`adapter ${t} `+(!1===r?"is not supported by the environment":"is not available in the build")}));let t=r?e.length>1?"since :\n"+e.map(Je).join("\n"):" "+Je(e[0]):"as no adapter specified";throw new K("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return o},adapters:Ge};function Ye(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Re(null,e)}function Ze(e){Ye(e),e.headers=ve.from(e.headers),e.data=Oe.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Xe.getAdapter(e.adapter||ye.adapter,e)(e).then((function(t){return Ye(e),t.data=Oe.call(e,e.transformResponse,t),t.headers=ve.from(t.headers),t}),(function(t){return Se(t)||(Ye(e),t&&t.response&&(t.response.data=Oe.call(e,e.transformResponse,t.response),t.response.headers=ve.from(t.response.headers))),Promise.reject(t)}))}const et="1.13.5",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){function n(e,t){return"[Axios v"+et+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,i)=>{if(!1===e)throw new K(n(o," has been removed"+(t?" in "+t:"")),K.ERR_DEPRECATED);return t&&!rt[o]&&(rt[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}},tt.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};var 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 o=n.length;for(;o-- >0;){const i=n[o],a=t[i];if(a){const t=e[i],r=void 0===t||a(t,i,e);if(!0!==r)throw new K("option "+i+" must be "+r,K.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new K("Unknown option "+i,K.ERR_BAD_OPTION)}},validators:tt};const ot=nt.validators;class it{constructor(e){this.defaults=e||{},this.interceptors={request:new ne,response:new ne}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=De(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&nt.assertOptions(r,{silentJSONParsing:ot.transitional(ot.boolean),forcedJSONParsing:ot.transitional(ot.boolean),clarifyTimeoutError:ot.transitional(ot.boolean),legacyInterceptorReqResOrdering:ot.transitional(ot.boolean)},!1),null!=n&&(H.isFunction(n)?t.paramsSerializer={serialize:n}:nt.assertOptions(n,{encode:ot.function,serialize:ot.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),nt.assertOptions(t,{baseUrl:ot.spelling("baseURL"),withXsrfToken:ot.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&H.merge(o.common,o[t.method]);o&&H.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=ve.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;s=s&&e.synchronous;const r=t.transitional||oe;r&&r.legacyInterceptorReqResOrdering?a.unshift(e.fulfilled,e.rejected):a.push(e.fulfilled,e.rejected)}));const c=[];let l;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let u,f=0;if(!s){const e=[Ze.bind(this),void 0];for(e.unshift(...a),e.push(...c),u=e.length,l=Promise.resolve(t);f<u;)l=l.then(e[f++],e[f++]);return l}u=a.length;let p=t;for(;f<u;){const e=a[f++],t=a[f++];try{p=e(p)}catch(e){t.call(this,e);break}}try{l=Ze.call(this,p)}catch(e){return Promise.reject(e)}for(f=0,u=c.length;f<u;)l=l.then(c[f++],c[f++]);return l}getUri(e){return re(xe((e=De(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}H.forEach(["delete","get","head","options"],(function(e){it.prototype[e]=function(t,r){return this.request(De(r||{},{method:e,url:t,data:(r||{}).data}))}})),H.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(De(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}it.prototype[e]=t(),it.prototype[e+"Form"]=t(!0)}));var at=it;class st{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,o){r.reason||(r.reason=new Re(e,n,o),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 st((function(t){e=t})),cancel:e}}}var ct=st;const lt={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(lt).forEach((e=>{let[t,r]=e;lt[r]=t}));var ut=lt;const ft=function e(r){const n=new at(r),o=t(at.prototype.request,n);return H.extend(o,at.prototype,n,{allOwnKeys:!0}),H.extend(o,n,null,{allOwnKeys:!0}),o.create=function(t){return e(De(r,t))},o}(ye);ft.Axios=at,ft.CanceledError=Re,ft.CancelToken=ct,ft.isCancel=Se,ft.VERSION=et,ft.toFormData=X,ft.AxiosError=K,ft.Cancel=ft.CanceledError,ft.all=function(e){return Promise.all(e)},ft.spread=function(e){return function(t){return e.apply(null,t)}},ft.isAxiosError=function(e){return H.isObject(e)&&!0===e.isAxiosError},ft.mergeConfig=De,ft.AxiosHeaders=ve,ft.formToJSON=e=>pe(H.isHTMLForm(e)?new FormData(e):e),ft.getAdapter=Xe.getAdapter,ft.HttpStatusCode=ut,ft.default=ft;var pt=ft,dt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function yt(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})})),t}const ht=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);function mt(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function gt(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){mt(i,n,o,a,s,"next",e)}function s(e){mt(i,n,o,a,s,"throw",e)}a(void 0)}))}}function bt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function wt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?bt(Object(r),!0).forEach((function(t){Et(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Et(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var vt="axios-retry";function Ot(e){return!e.response&&Boolean(e.code)&&"ECONNABORTED"!==e.code&&(e=>!ht.has(e&&e.code))(e)}var St=["get","head","options"],Rt=St.concat(["put","delete"]);function At(e){return"ECONNABORTED"!==e.code&&(!e.response||e.response.status>=500&&e.response.status<=599)}function _t(e){return!!e.config&&(At(e)&&-1!==Rt.indexOf(e.config.method))}function jt(e){return Ot(e)||_t(e)}function Tt(){return 0}function Pt(e){var t=e[vt]||{};return t.retryCount=t.retryCount||0,e[vt]=t,t}function Nt(){return(Nt=gt((function*(e,t,r,n){var o=r.retryCount<e&&t(n);if("object"==typeof o)try{return yield o,!0}catch(e){return!1}return o}))).apply(this,arguments)}function xt(e,t){e.interceptors.request.use((e=>(Pt(e).lastRequestTime=Date.now(),e))),e.interceptors.response.use(null,function(){var r=gt((function*(r){var{config:n}=r;if(!n)return Promise.reject(r);var{retries:o=3,retryCondition:i=jt,retryDelay:a=Tt,shouldResetTimeout:s=!1}=function(e,t){return wt(wt({},t),e[vt])}(n,t),c=Pt(n);if(yield function(e,t,r,n){return Nt.apply(this,arguments)}(o,i,c,r)){c.retryCount+=1;var l=a(c.retryCount,r);if(function(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}(e,n),!s&&n.timeout&&c.lastRequestTime){var u=Date.now()-c.lastRequestTime;n.timeout=Math.max(n.timeout-u-l,1)}return n.transformRequest=[e=>e],new Promise((t=>setTimeout((()=>t(e(n))),l)))}return Promise.reject(r)}));return function(e){return r.apply(this,arguments)}}())}xt.isNetworkError=Ot,xt.isSafeRequestError=function(e){return!!e.config&&(At(e)&&-1!==St.indexOf(e.config.method))},xt.isIdempotentRequestError=_t,xt.isNetworkOrIdempotentRequestError=jt,xt.exponentialDelay=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=100*Math.pow(2,e);return t+.2*t*Math.random()},xt.isRetryableError=At;var Ut=TypeError,Dt=yt(Object.freeze({__proto__:null,default:{}})),Ct="function"==typeof Map&&Map.prototype,Ft=Object.getOwnPropertyDescriptor&&Ct?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Lt=Ct&&Ft&&"function"==typeof Ft.get?Ft.get:null,It=Ct&&Map.prototype.forEach,kt="function"==typeof Set&&Set.prototype,Bt=Object.getOwnPropertyDescriptor&&kt?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Mt=kt&&Bt&&"function"==typeof Bt.get?Bt.get:null,qt=kt&&Set.prototype.forEach,Wt="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,$t="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,Ht="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,zt=Boolean.prototype.valueOf,Kt=Object.prototype.toString,Vt=Function.prototype.toString,Gt=String.prototype.match,Jt=String.prototype.slice,Qt=String.prototype.replace,Xt=String.prototype.toUpperCase,Yt=String.prototype.toLowerCase,Zt=RegExp.prototype.test,er=Array.prototype.concat,tr=Array.prototype.join,rr=Array.prototype.slice,nr=Math.floor,or="function"==typeof BigInt?BigInt.prototype.valueOf:null,ir=Object.getOwnPropertySymbols,ar="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,sr="function"==typeof Symbol&&"object"==typeof Symbol.iterator,cr="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===sr||"symbol")?Symbol.toStringTag:null,lr=Object.prototype.propertyIsEnumerable,ur=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function fr(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||Zt.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-nr(-e):nr(e);if(n!==e){var o=String(n),i=Jt.call(t,o.length+1);return Qt.call(o,r,"$&_")+"."+Qt.call(Qt.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Qt.call(t,r,"$&_")}var pr=Dt,dr=pr.custom,yr=Sr(dr)?dr:null,hr={__proto__:null,double:'"',single:"'"},mr={__proto__:null,double:/(["\\])/g,single:/(['\\])/g},gr=function e(t,r,n,o){var i=r||{};if(Ar(i,"quoteStyle")&&!Ar(hr,i.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ar(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!Ar(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ar(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ar(i,"numericSeparator")&&"boolean"!=typeof i.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=i.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return Tr(t,i);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var c=String(t);return s?fr(t,c):c}if("bigint"==typeof t){var l=String(t)+"n";return s?fr(t,l):l}var u=void 0===i.depth?5:i.depth;if(void 0===n&&(n=0),n>=u&&u>0&&"object"==typeof t)return vr(t)?"[Array]":"[Object]";var f=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=tr.call(Array(e.indent+1)," ")}return{base:r,prev:tr.call(Array(t+1),r)}}(i,n);if(void 0===o)o=[];else if(jr(o,t)>=0)return"[Circular]";function p(t,r,a){if(r&&(o=rr.call(o)).push(r),a){var s={depth:i.depth};return Ar(i,"quoteStyle")&&(s.quoteStyle=i.quoteStyle),e(t,s,n+1,o)}return e(t,i,n+1,o)}if("function"==typeof t&&!Or(t)){var d=function(e){if(e.name)return e.name;var t=Gt.call(Vt.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),y=Cr(t,p);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(y.length>0?" { "+tr.call(y,", ")+" }":"")}if(Sr(t)){var h=sr?Qt.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):ar.call(t);return"object"!=typeof t||sr?h:Nr(h)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var m="<"+Yt.call(String(t.nodeName)),g=t.attributes||[],b=0;b<g.length;b++)m+=" "+g[b].name+"="+br(wr(g[b].value),"double",i);return m+=">",t.childNodes&&t.childNodes.length&&(m+="..."),m+="</"+Yt.call(String(t.nodeName))+">"}if(vr(t)){if(0===t.length)return"[]";var w=Cr(t,p);return f&&!function(e){for(var t=0;t<e.length;t++)if(jr(e[t],"\n")>=0)return!1;return!0}(w)?"["+Dr(w,f)+"]":"[ "+tr.call(w,", ")+" ]"}if(function(e){return"[object Error]"===_r(e)&&Er(e)}(t)){var E=Cr(t,p);return"cause"in Error.prototype||!("cause"in t)||lr.call(t,"cause")?0===E.length?"["+String(t)+"]":"{ ["+String(t)+"] "+tr.call(E,", ")+" }":"{ ["+String(t)+"] "+tr.call(er.call("[cause]: "+p(t.cause),E),", ")+" }"}if("object"==typeof t&&a){if(yr&&"function"==typeof t[yr]&&pr)return pr(t,{depth:u-n});if("symbol"!==a&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!Lt||!e||"object"!=typeof e)return!1;try{Lt.call(e);try{Mt.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var v=[];return It&&It.call(t,(function(e,r){v.push(p(r,t,!0)+" => "+p(e,t))})),Ur("Map",Lt.call(t),v,f)}if(function(e){if(!Mt||!e||"object"!=typeof e)return!1;try{Mt.call(e);try{Lt.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var O=[];return qt&&qt.call(t,(function(e){O.push(p(e,t))})),Ur("Set",Mt.call(t),O,f)}if(function(e){if(!Wt||!e||"object"!=typeof e)return!1;try{Wt.call(e,Wt);try{$t.call(e,$t)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return xr("WeakMap");if(function(e){if(!$t||!e||"object"!=typeof e)return!1;try{$t.call(e,$t);try{Wt.call(e,Wt)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return xr("WeakSet");if(function(e){if(!Ht||!e||"object"!=typeof e)return!1;try{return Ht.call(e),!0}catch(e){}return!1}(t))return xr("WeakRef");if(function(e){return"[object Number]"===_r(e)&&Er(e)}(t))return Nr(p(Number(t)));if(function(e){if(!e||"object"!=typeof e||!or)return!1;try{return or.call(e),!0}catch(e){}return!1}(t))return Nr(p(or.call(t)));if(function(e){return"[object Boolean]"===_r(e)&&Er(e)}(t))return Nr(zt.call(t));if(function(e){return"[object String]"===_r(e)&&Er(e)}(t))return Nr(p(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&t===globalThis||void 0!==dt&&t===dt)return"{ [object globalThis] }";if(!function(e){return"[object Date]"===_r(e)&&Er(e)}(t)&&!Or(t)){var S=Cr(t,p),R=ur?ur(t)===Object.prototype:t instanceof Object||t.constructor===Object,A=t instanceof Object?"":"null prototype",_=!R&&cr&&Object(t)===t&&cr in t?Jt.call(_r(t),8,-1):A?"Object":"",j=(R||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(_||A?"["+tr.call(er.call([],_||[],A||[]),": ")+"] ":"");return 0===S.length?j+"{}":f?j+"{"+Dr(S,f)+"}":j+"{ "+tr.call(S,", ")+" }"}return String(t)};function br(e,t,r){var n=r.quoteStyle||t,o=hr[n];return o+e+o}function wr(e){return Qt.call(String(e),/"/g,"&quot;")}function Er(e){return!cr||!("object"==typeof e&&(cr in e||void 0!==e[cr]))}function vr(e){return"[object Array]"===_r(e)&&Er(e)}function Or(e){return"[object RegExp]"===_r(e)&&Er(e)}function Sr(e){if(sr)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!ar)return!1;try{return ar.call(e),!0}catch(e){}return!1}var Rr=Object.prototype.hasOwnProperty||function(e){return e in this};function Ar(e,t){return Rr.call(e,t)}function _r(e){return Kt.call(e)}function jr(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function Tr(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Tr(Jt.call(e,0,t.maxStringLength),t)+n}var o=mr[t.quoteStyle||"single"];return o.lastIndex=0,br(Qt.call(Qt.call(e,o,"\\$1"),/[\x00-\x1f]/g,Pr),"single",t)}function Pr(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+Xt.call(t.toString(16))}function Nr(e){return"Object("+e+")"}function xr(e){return e+" { ? }"}function Ur(e,t,r,n){return e+" ("+t+") {"+(n?Dr(r,n):tr.call(r,", "))+"}"}function Dr(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+tr.call(e,","+r)+"\n"+t.prev}function Cr(e,t){var r=vr(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=Ar(e,o)?t(e[o],e):""}var i,a="function"==typeof ir?ir(e):[];if(sr){i={};for(var s=0;s<a.length;s++)i["$"+a[s]]=a[s]}for(var c in e)Ar(e,c)&&(r&&String(Number(c))===c&&c<e.length||sr&&i["$"+c]instanceof Symbol||(Zt.call(/[^\w$]/,c)?n.push(t(c,e)+": "+t(e[c],e)):n.push(c+": "+t(e[c],e))));if("function"==typeof ir)for(var l=0;l<a.length;l++)lr.call(e,a[l])&&n.push("["+t(a[l])+"]: "+t(e[a[l]],e));return n}var Fr=gr,Lr=Ut,Ir=function(e,t,r){for(var n,o=e;null!=(n=o.next);o=n)if(n.key===t)return o.next=n.next,r||(n.next=e.next,e.next=n),n},kr=Object,Br=Error,Mr=EvalError,qr=RangeError,Wr=ReferenceError,$r=SyntaxError,Hr=URIError,zr=Math.abs,Kr=Math.floor,Vr=Math.max,Gr=Math.min,Jr=Math.pow,Qr=Math.round,Xr=Number.isNaN||function(e){return e!=e},Yr=Object.getOwnPropertyDescriptor;if(Yr)try{Yr([],"length")}catch(e){Yr=null}var Zr=Yr,en=Object.defineProperty||!1;if(en)try{en({},"a",{value:1})}catch(e){en=!1}var tn,rn=en,nn="undefined"!=typeof Symbol&&Symbol,on=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0},an="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null,sn=kr.getPrototypeOf||null,cn=Object.prototype.toString,ln=Math.max,un=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r},fn=function(e){var t=this;if("function"!=typeof t||"[object Function]"!==cn.apply(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var r,n=function(e,t){for(var r=[],n=t||0,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r}(arguments,1),o=ln(0,t.length-n.length),i=[],a=0;a<o;a++)i[a]="$"+a;if(r=Function("binder","return function ("+function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r}(i,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof r){var o=t.apply(this,un(n,arguments));return Object(o)===o?o:this}return t.apply(e,un(n,arguments))})),t.prototype){var s=function(){};s.prototype=t.prototype,r.prototype=new s,s.prototype=null}return r},pn=Function.prototype.bind||fn,dn=Function.prototype.call,yn=Function.prototype.apply,hn=yn,mn=dn,gn="undefined"!=typeof Reflect&&Reflect&&Reflect.apply||pn.call(mn,hn),bn=pn,wn=Ut,En=dn,vn=gn,On=function(e){if(e.length<1||"function"!=typeof e[0])throw new wn("a function is required");return vn(bn,En,e)},Sn=On,Rn=Zr;try{tn=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var An,_n=!!tn&&Rn&&Rn(Object.prototype,"__proto__"),jn=Object,Tn=jn.getPrototypeOf,Pn=_n&&"function"==typeof _n.get?Sn([_n.get]):"function"==typeof Tn&&function(e){return Tn(null==e?e:jn(e))},Nn=an,xn=sn,Un=Pn,Dn=Nn?function(e){return Nn(e)}:xn?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return xn(e)}:Un?function(e){return Un(e)}:null,Cn=Object.prototype.toString,Fn=Math.max,Ln=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r},In=function(e){var t=this;if("function"!=typeof t||"[object Function]"!==Cn.apply(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var r,n=function(e,t){for(var r=[],n=t||0,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r}(arguments,1),o=Fn(0,t.length-n.length),i=[],a=0;a<o;a++)i[a]="$"+a;if(r=Function("binder","return function ("+function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r}(i,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof r){var o=t.apply(this,Ln(n,arguments));return Object(o)===o?o:this}return t.apply(e,Ln(n,arguments))})),t.prototype){var s=function(){};s.prototype=t.prototype,r.prototype=new s,s.prototype=null}return r},kn=Function.prototype.bind||In,Bn=Object.prototype.toString,Mn=Math.max,qn=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r},Wn=function(e){var t=this;if("function"!=typeof t||"[object Function]"!==Bn.apply(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var r,n=function(e,t){for(var r=[],n=t||0,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r}(arguments,1),o=Mn(0,t.length-n.length),i=[],a=0;a<o;a++)i[a]="$"+a;if(r=Function("binder","return function ("+function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r}(i,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof r){var o=t.apply(this,qn(n,arguments));return Object(o)===o?o:this}return t.apply(e,qn(n,arguments))})),t.prototype){var s=function(){};s.prototype=t.prototype,r.prototype=new s,s.prototype=null}return r},$n=Function.prototype.bind||Wn,Hn=Function.prototype.call,zn=Object.prototype.hasOwnProperty,Kn=$n.call(Hn,zn),Vn=kr,Gn=Br,Jn=Mr,Qn=qr,Xn=Wr,Yn=$r,Zn=Ut,eo=Hr,to=zr,ro=Kr,no=Vr,oo=Gr,io=Jr,ao=Qr,so=function(e){return Xr(e)||0===e?e:e<0?-1:1},co=Function,lo=function(e){try{return co('"use strict"; return ('+e+").constructor;")()}catch(e){}},uo=Zr,fo=rn,po=function(){throw new Zn},yo=uo?function(){try{return po}catch(e){try{return uo(arguments,"callee").get}catch(e){return po}}}():po,ho="function"==typeof nn&&"function"==typeof Symbol&&"symbol"==typeof nn("foo")&&"symbol"==typeof Symbol("bar")&&on(),mo=Dn,go=sn,bo=an,wo=yn,Eo=dn,vo={},Oo="undefined"!=typeof Uint8Array&&mo?mo(Uint8Array):An,So={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?An:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?An:ArrayBuffer,"%ArrayIteratorPrototype%":ho&&mo?mo([][Symbol.iterator]()):An,"%AsyncFromSyncIteratorPrototype%":An,"%AsyncFunction%":vo,"%AsyncGenerator%":vo,"%AsyncGeneratorFunction%":vo,"%AsyncIteratorPrototype%":vo,"%Atomics%":"undefined"==typeof Atomics?An:Atomics,"%BigInt%":"undefined"==typeof BigInt?An:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?An:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?An:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?An:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Gn,"%eval%":eval,"%EvalError%":Jn,"%Float16Array%":"undefined"==typeof Float16Array?An:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?An:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?An:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?An:FinalizationRegistry,"%Function%":co,"%GeneratorFunction%":vo,"%Int8Array%":"undefined"==typeof Int8Array?An:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?An:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?An:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ho&&mo?mo(mo([][Symbol.iterator]())):An,"%JSON%":"object"==typeof JSON?JSON:An,"%Map%":"undefined"==typeof Map?An:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&ho&&mo?mo((new Map)[Symbol.iterator]()):An,"%Math%":Math,"%Number%":Number,"%Object%":Vn,"%Object.getOwnPropertyDescriptor%":uo,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?An:Promise,"%Proxy%":"undefined"==typeof Proxy?An:Proxy,"%RangeError%":Qn,"%ReferenceError%":Xn,"%Reflect%":"undefined"==typeof Reflect?An:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?An:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&ho&&mo?mo((new Set)[Symbol.iterator]()):An,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?An:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ho&&mo?mo(""[Symbol.iterator]()):An,"%Symbol%":ho?Symbol:An,"%SyntaxError%":Yn,"%ThrowTypeError%":yo,"%TypedArray%":Oo,"%TypeError%":Zn,"%Uint8Array%":"undefined"==typeof Uint8Array?An:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?An:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?An:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?An:Uint32Array,"%URIError%":eo,"%WeakMap%":"undefined"==typeof WeakMap?An:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?An:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?An:WeakSet,"%Function.prototype.call%":Eo,"%Function.prototype.apply%":wo,"%Object.defineProperty%":fo,"%Object.getPrototypeOf%":go,"%Math.abs%":to,"%Math.floor%":ro,"%Math.max%":no,"%Math.min%":oo,"%Math.pow%":io,"%Math.round%":ao,"%Math.sign%":so,"%Reflect.getPrototypeOf%":bo};if(mo)try{null.error}catch(e){var Ro=mo(mo(e));So["%Error.prototype%"]=Ro}var Ao=function e(t){var r;if("%AsyncFunction%"===t)r=lo("async function () {}");else if("%GeneratorFunction%"===t)r=lo("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=lo("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&mo&&(r=mo(o.prototype))}return So[t]=r,r},_o={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},jo=kn,To=Kn,Po=jo.call(Eo,Array.prototype.concat),No=jo.call(wo,Array.prototype.splice),xo=jo.call(Eo,String.prototype.replace),Uo=jo.call(Eo,String.prototype.slice),Do=jo.call(Eo,RegExp.prototype.exec),Co=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Fo=/\\(\\)?/g,Lo=function(e,t){var r,n=e;if(To(_o,n)&&(n="%"+(r=_o[n])[0]+"%"),To(So,n)){var o=So[n];if(o===vo&&(o=Ao(n)),void 0===o&&!t)throw new Zn("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new Yn("intrinsic "+e+" does not exist!")},Io=function(e,t){if("string"!=typeof e||0===e.length)throw new Zn("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new Zn('"allowMissing" argument must be a boolean');if(null===Do(/^%?[^%]*%?$/,e))throw new Yn("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=Uo(e,0,1),r=Uo(e,-1);if("%"===t&&"%"!==r)throw new Yn("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new Yn("invalid intrinsic syntax, expected opening `%`");var n=[];return xo(e,Co,(function(e,t,r,o){n[n.length]=r?xo(o,Fo,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",o=Lo("%"+n+"%",t),i=o.name,a=o.value,s=!1,c=o.alias;c&&(n=c[0],No(r,Po([0,1],c)));for(var l=1,u=!0;l<r.length;l+=1){var f=r[l],p=Uo(f,0,1),d=Uo(f,-1);if(('"'===p||"'"===p||"`"===p||'"'===d||"'"===d||"`"===d)&&p!==d)throw new Yn("property names with quotes must have matching quotes");if("constructor"!==f&&u||(s=!0),To(So,i="%"+(n+="."+f)+"%"))a=So[i];else if(null!=a){if(!(f in a)){if(!t)throw new Zn("base intrinsic for "+e+" exists, but the property is not available.");return}if(uo&&l+1>=r.length){var y=uo(a,f);a=(u=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:a[f]}else u=To(a,f),a=a[f];u&&!s&&(So[i]=a)}}return a},ko=Io,Bo=On,Mo=Bo([ko("%String.prototype.indexOf%")]),qo=function(e,t){var r=ko(e,!!t);return"function"==typeof r&&Mo(e,".prototype.")>-1?Bo([r]):r},Wo=qo,$o=gr,Ho=Ut,zo=Io("%Map%",!0),Ko=Wo("Map.prototype.get",!0),Vo=Wo("Map.prototype.set",!0),Go=Wo("Map.prototype.has",!0),Jo=Wo("Map.prototype.delete",!0),Qo=Wo("Map.prototype.size",!0),Xo=!!zo&&function(){var e,t={assert:function(e){if(!t.has(e))throw new Ho("Side channel does not contain "+$o(e))},delete:function(t){if(e){var r=Jo(e,t);return 0===Qo(e)&&(e=void 0),r}return!1},get:function(t){if(e)return Ko(e,t)},has:function(t){return!!e&&Go(e,t)},set:function(t,r){e||(e=new zo),Vo(e,t,r)}};return t},Yo=qo,Zo=gr,ei=Xo,ti=Ut,ri=Io("%WeakMap%",!0),ni=Yo("WeakMap.prototype.get",!0),oi=Yo("WeakMap.prototype.set",!0),ii=Yo("WeakMap.prototype.has",!0),ai=Yo("WeakMap.prototype.delete",!0),si=Ut,ci=gr,li=(ri?function(){var e,t,r={assert:function(e){if(!r.has(e))throw new ti("Side channel does not contain "+Zo(e))},delete:function(r){if(ri&&r&&("object"==typeof r||"function"==typeof r)){if(e)return ai(e,r)}else if(ei&&t)return t.delete(r);return!1},get:function(r){return ri&&r&&("object"==typeof r||"function"==typeof r)&&e?ni(e,r):t&&t.get(r)},has:function(r){return ri&&r&&("object"==typeof r||"function"==typeof r)&&e?ii(e,r):!!t&&t.has(r)},set:function(r,n){ri&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new ri),oi(e,r,n)):ei&&(t||(t=ei()),t.set(r,n))}};return r}:ei)||Xo||function(){var e,t={assert:function(e){if(!t.has(e))throw new Lr("Side channel does not contain "+Fr(e))},delete:function(t){var r=e&&e.next,n=function(e,t){if(e)return Ir(e,t,!0)}(e,t);return n&&r&&r===n&&(e=void 0),!!n},get:function(t){return function(e,t){if(e){var r=Ir(e,t);return r&&r.value}}(e,t)},has:function(t){return function(e,t){return!!e&&!!Ir(e,t)}(e,t)},set:function(t,r){e||(e={next:void 0}),function(e,t,r){var n=Ir(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(e,t,r)}};return t},ui=function(){var e,t={assert:function(e){if(!t.has(e))throw new si("Side channel does not contain "+ci(e))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,r){e||(e=li()),e.set(t,r)}};return t},fi=String.prototype.replace,pi=/%20/g,di="RFC3986",yi={default:di,formatters:{RFC1738:function(e){return fi.call(e,pi,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:di},hi=yi,mi=ui,gi=Object.prototype.hasOwnProperty,bi=Array.isArray,wi=mi(),Ei=function(e,t){return wi.set(e,t),e},vi=function(e){return wi.has(e)},Oi=function(e){return wi.get(e)},Si=function(e,t){wi.set(e,t)},Ri=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Ai=function(e,t){for(var r=t&&t.plainObjects?{__proto__:null}:{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},_i=1024,ji={arrayToObject:Ai,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t,r,n){if(vi(e)){var o=Oi(e)+1;return e[o]=t,Si(e,o),e}var i=[].concat(e,t);return i.length>r?Ei(Ai(i,{plainObjects:n}),i.length-1):i},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],i=o.obj[o.prop],a=Object.keys(i),s=0;s<a.length;++s){var c=a[s],l=i[c];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(t.push({obj:i,prop:c}),r.push(l))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(bi(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,n,o){if(0===e.length)return e;var i=e;if("symbol"==typeof e?i=Symbol.prototype.toString.call(e):"string"!=typeof e&&(i=String(e)),"iso-8859-1"===r)return escape(i).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var a="",s=0;s<i.length;s+=_i){for(var c=i.length>=_i?i.slice(s,s+_i):i,l=[],u=0;u<c.length;++u){var f=c.charCodeAt(u);45===f||46===f||95===f||126===f||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||o===hi.RFC1738&&(40===f||41===f)?l[l.length]=c.charAt(u):f<128?l[l.length]=Ri[f]:f<2048?l[l.length]=Ri[192|f>>6]+Ri[128|63&f]:f<55296||f>=57344?l[l.length]=Ri[224|f>>12]+Ri[128|f>>6&63]+Ri[128|63&f]:(u+=1,f=65536+((1023&f)<<10|1023&c.charCodeAt(u)),l[l.length]=Ri[240|f>>18]+Ri[128|f>>12&63]+Ri[128|f>>6&63]+Ri[128|63&f])}a+=l.join("")}return a},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isOverflow:vi,isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(bi(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r&&"function"!=typeof r){if(bi(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];if(vi(t)){var o=Oi(t)+1;t[o]=r,Si(t,o)}else(n&&(n.plainObjects||n.allowPrototypes)||!gi.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t){if(vi(r)){for(var i=Object.keys(r),a=n&&n.plainObjects?{__proto__:null,0:t}:{0:t},s=0;s<i.length;s++){a[parseInt(i[s],10)+1]=r[i[s]]}return Ei(a,Oi(r)+1)}return[t].concat(r)}var c=t;return bi(t)&&!bi(r)&&(c=Ai(t,n)),bi(t)&&bi(r)?(r.forEach((function(r,o){if(gi.call(t,o)){var i=t[o];i&&"object"==typeof i&&r&&"object"==typeof r?t[o]=e(i,r,n):t.push(r)}else t[o]=r})),t):Object.keys(r).reduce((function(t,o){var i=r[o];return gi.call(t,o)?t[o]=e(t[o],i,n):t[o]=i,t}),c)}},Ti=ui,Pi=ji,Ni=yi,xi=Object.prototype.hasOwnProperty,Ui={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},Di=Array.isArray,Ci=Array.prototype.push,Fi=function(e,t){Ci.apply(e,Di(t)?t:[t])},Li=Date.prototype.toISOString,Ii=Ni.default,ki={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Pi.encode,encodeValuesOnly:!1,filter:void 0,format:Ii,formatter:Ni.formatters[Ii],indices:!1,serializeDate:function(e){return Li.call(e)},skipNulls:!1,strictNullHandling:!1},Bi={},Mi=function e(t,r,n,o,i,a,s,c,l,u,f,p,d,y,h,m,g,b){for(var w,E=t,v=b,O=0,S=!1;void 0!==(v=v.get(Bi))&&!S;){var R=v.get(t);if(O+=1,void 0!==R){if(R===O)throw new RangeError("Cyclic object value");S=!0}void 0===v.get(Bi)&&(O=0)}if("function"==typeof u?E=u(r,E):E instanceof Date?E=d(E):"comma"===n&&Di(E)&&(E=Pi.maybeMap(E,(function(e){return e instanceof Date?d(e):e}))),null===E){if(a)return l&&!m?l(r,ki.encoder,g,"key",y):r;E=""}if("string"==typeof(w=E)||"number"==typeof w||"boolean"==typeof w||"symbol"==typeof w||"bigint"==typeof w||Pi.isBuffer(E))return l?[h(m?r:l(r,ki.encoder,g,"key",y))+"="+h(l(E,ki.encoder,g,"value",y))]:[h(r)+"="+h(String(E))];var A,_=[];if(void 0===E)return _;if("comma"===n&&Di(E))m&&l&&(E=Pi.maybeMap(E,l)),A=[{value:E.length>0?E.join(",")||null:void 0}];else if(Di(u))A=u;else{var j=Object.keys(E);A=f?j.sort(f):j}var T=c?String(r).replace(/\./g,"%2E"):String(r),P=o&&Di(E)&&1===E.length?T+"[]":T;if(i&&Di(E)&&0===E.length)return P+"[]";for(var N=0;N<A.length;++N){var x=A[N],U="object"==typeof x&&x&&void 0!==x.value?x.value:E[x];if(!s||null!==U){var D=p&&c?String(x).replace(/\./g,"%2E"):String(x),C=Di(E)?"function"==typeof n?n(P,D):P:P+(p?"."+D:"["+D+"]");b.set(t,O);var F=Ti();F.set(Bi,b),Fi(_,e(U,C,n,o,i,a,s,c,"comma"===n&&m&&Di(E)?null:l,u,f,p,d,y,h,m,g,F))}}return _},qi=ji,Wi=Object.prototype.hasOwnProperty,$i=Array.isArray,Hi={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:qi.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},zi=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},Ki=function(e,t,r){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},Vi=function(e,t,r,n){if(e){var o=function(e,t){var r=t.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(t.depth<=0){if(!t.plainObjects&&Wi.call(Object.prototype,r)&&!t.allowPrototypes)return;return[r]}var n=/(\[[^[\]]*])/g,o=/(\[[^[\]]*])/.exec(r),i=o?r.slice(0,o.index):r,a=[];if(i){if(!t.plainObjects&&Wi.call(Object.prototype,i)&&!t.allowPrototypes)return;a.push(i)}for(var s=0;null!==(o=n.exec(r))&&s<t.depth;){s+=1;var c=o[1].slice(1,-1);if(!t.plainObjects&&Wi.call(Object.prototype,c)&&!t.allowPrototypes)return;a.push(o[1])}if(o){if(!0===t.strictDepth)throw new RangeError("Input depth exceeded depth option of "+t.depth+" and strictDepth is true");a.push("["+r.slice(o.index)+"]")}return a}(e,r);if(o)return function(e,t,r,n){var o=0;if(e.length>0&&"[]"===e[e.length-1]){var i=e.slice(0,-1).join("");o=Array.isArray(t)&&t[i]?t[i].length:0}for(var a=n?t:Ki(t,r,o),s=e.length-1;s>=0;--s){var c,l=e[s];if("[]"===l&&r.parseArrays)c=qi.isOverflow(a)?a:r.allowEmptyArrays&&(""===a||r.strictNullHandling&&null===a)?[]:qi.combine([],a,r.arrayLimit,r.plainObjects);else{c=r.plainObjects?{__proto__:null}:{};var u="["===l.charAt(0)&&"]"===l.charAt(l.length-1)?l.slice(1,-1):l,f=r.decodeDotInKeys?u.replace(/%2E/g,"."):u,p=parseInt(f,10);r.parseArrays||""!==f?!isNaN(p)&&l!==f&&String(p)===f&&p>=0&&r.parseArrays&&p<=r.arrayLimit?(c=[])[p]=a:"__proto__"!==f&&(c[f]=a):c={0:a}}a=c}return a}(o,t,r,n)}},Gi=function(e,t){var r,n=e,o=function(e){if(!e)return ki;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||ki.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=Ni.default;if(void 0!==e.format){if(!xi.call(Ni.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n,o=Ni.formatters[r],i=ki.filter;if(("function"==typeof e.filter||Di(e.filter))&&(i=e.filter),n=e.arrayFormat in Ui?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":ki.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var a=void 0===e.allowDots?!0===e.encodeDotInKeys||ki.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:ki.addQueryPrefix,allowDots:a,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:ki.allowEmptyArrays,arrayFormat:n,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:ki.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?ki.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:ki.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:ki.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:ki.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:ki.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:ki.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:ki.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:ki.strictNullHandling}}(t);"function"==typeof o.filter?n=(0,o.filter)("",n):Di(o.filter)&&(r=o.filter);var i=[];if("object"!=typeof n||null===n)return"";var a=Ui[o.arrayFormat],s="comma"===a&&o.commaRoundTrip;r||(r=Object.keys(n)),o.sort&&r.sort(o.sort);for(var c=Ti(),l=0;l<r.length;++l){var u=r[l],f=n[u];o.skipNulls&&null===f||Fi(i,Mi(f,u,a,s,o.allowEmptyArrays,o.strictNullHandling,o.skipNulls,o.encodeDotInKeys,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,c))}var p=i.join(o.delimiter),d=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?d+="utf8=%26%2310003%3B&":d+="utf8=%E2%9C%93&"),p.length>0?d+p:""},Ji=function(e,t){var r=function(e){if(!e)return Hi;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==e.throwOnLimitExceeded&&"boolean"!=typeof e.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var t=void 0===e.charset?Hi.charset:e.charset,r=void 0===e.duplicates?Hi.duplicates:e.duplicates;if("combine"!==r&&"first"!==r&&"last"!==r)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||Hi.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:Hi.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:Hi.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:Hi.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:Hi.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:Hi.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:Hi.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:Hi.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:Hi.decoder,delimiter:"string"==typeof e.delimiter||qi.isRegExp(e.delimiter)?e.delimiter:Hi.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:Hi.depth,duplicates:r,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:Hi.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:Hi.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:Hi.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:Hi.strictDepth,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:Hi.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof e.throwOnLimitExceeded&&e.throwOnLimitExceeded}}(t);if(""===e||null==e)return r.plainObjects?{__proto__:null}:{};for(var n="string"==typeof e?function(e,t){var r={__proto__:null},n=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;n=n.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var o=t.parameterLimit===1/0?void 0:t.parameterLimit,i=n.split(t.delimiter,t.throwOnLimitExceeded?o+1:o);if(t.throwOnLimitExceeded&&i.length>o)throw new RangeError("Parameter limit exceeded. Only "+o+" parameter"+(1===o?"":"s")+" allowed.");var a,s=-1,c=t.charset;if(t.charsetSentinel)for(a=0;a<i.length;++a)0===i[a].indexOf("utf8=")&&("utf8=%E2%9C%93"===i[a]?c="utf-8":"utf8=%26%2310003%3B"===i[a]&&(c="iso-8859-1"),s=a,a=i.length);for(a=0;a<i.length;++a)if(a!==s){var l,u,f=i[a],p=f.indexOf("]="),d=-1===p?f.indexOf("="):p+1;if(-1===d?(l=t.decoder(f,Hi.decoder,c,"key"),u=t.strictNullHandling?null:""):null!==(l=t.decoder(f.slice(0,d),Hi.decoder,c,"key"))&&(u=qi.maybeMap(Ki(f.slice(d+1),t,$i(r[l])?r[l].length:0),(function(e){return t.decoder(e,Hi.decoder,c,"value")}))),u&&t.interpretNumericEntities&&"iso-8859-1"===c&&(u=zi(String(u))),f.indexOf("[]=")>-1&&(u=$i(u)?[u]:u),null!==l){var y=Wi.call(r,l);y&&"combine"===t.duplicates?r[l]=qi.combine(r[l],u,t.arrayLimit,t.plainObjects):y&&"last"!==t.duplicates||(r[l]=u)}}return r}(e,r):e,o=r.plainObjects?{__proto__:null}:{},i=Object.keys(n),a=0;a<i.length;++a){var s=i[a],c=Vi(s,n[s],r,"string"==typeof e);o=qi.merge(o,c,r)}return!0===r.allowSparse?o:qi.compact(o)},Qi={formats:yi,parse:Ji,stringify:Gi};const Xi=e=>{let t={raw:"",encoded:""};e.and&&(t=(e=>{if(!e)throw new Error("invalid query");const t=[],r=[];return e.forEach((e=>{const{raw:n,encoded:o}=Xi(e);t.push(n),r.push(o)})),{raw:t.join("&"),encoded:r.join("&")}})(e.and),delete e.and);let r={raw:"",encoded:""};e.or&&(r=(e=>{if(!e)throw new Error("invalid query");const t=[];e.forEach((e=>{const{raw:r}=Xi(e);t.push(r)}));const r=new URLSearchParams;return r.set("[or]",`(${t.join(";")})`),{raw:`[or]=(${t.join(";")})`,encoded:r.toString()}})(e.or),delete e.or);const n=Qi.stringify(e,{encode:!1,arrayFormat:"comma"}),o=Qi.stringify(e,{arrayFormat:"comma"});return{raw:[n,r.raw,t.raw].filter((e=>e)).join("&"),encoded:[o,r.encoded,t.encoded].filter((e=>e)).join("&")}},Yi=e=>{if(!pt.isAxiosError(e))throw e;const{config:t,response:r}=e;if(null==r||!r.data)throw e;const{data:n}=r,o={status:n.status,code:n.code,message:n.message};if(t&&(o.request={method:t.method,headers:t.headers},t.url)){const e=new URL(t.url,t.baseURL);o.request.url=e.toString()}const i=new Error;i.name=`${n.status} ${n.code}`;try{i.message=JSON.stringify(o,null,2)}catch{i.message=n.message}throw i},Zi=(e,t)=>{if(!(e=>{if("object"!=typeof e||null===e)return!1;const t=e;return"number"==typeof t.status&&"string"==typeof t.code&&"string"==typeof t.message})(e))throw e;const{status:r,code:n,message:o}=e,i={status:r,code:n,message:o,request:t},a=new Error;a.name=`${r} ${n}`;try{a.message=JSON.stringify(i,null,2)}catch{a.message=o}throw a};e.createClient=e=>{let{spaceUid:t,token:r,apiType:n="cdn",adapter:o,retryOnError:i=!0,retryLimit:a=3,fetch:s}=e;if(!t)throw new Error("spaceUid parameter is required.");if(!r)throw new Error("token parameter is required.");if(!["cdn","api"].includes(n))throw new Error(`apiType parameter should be set to "cdn" or "api". apiType: ${n}`);if(a>10)throw new Error("retryLimit should be a value less than or equal to 10.");const c=new URL(`https://${t}.${n}.newt.so`),l={Authorization:`Bearer ${r}`},u=pt.create({baseURL:c.toString(),headers:l,adapter:o});i&&xt(u,{retries:a,retryCondition:e=>{var t,r;return 429===(null===(t=e.response)||void 0===t?void 0:t.status)||500===(null===(r=e.response)||void 0===r?void 0:r.status)},retryDelay:e=>1e3*e});const f=async e=>{let{appUid:t,modelUid:r,query:n}=e;if(!t)throw new Error("appUid parameter is required.");if(!r)throw new Error("modelUid parameter is required.");const o=new URL(`/v1/${t}/${r}`,c.toString());if(n&&Object.keys(n).length){const{encoded:e}=Xi(n);o.search=e}if(s){const e={method:"get",headers:l,url:o.toString()};try{const t=await s(o.toString(),{headers:l}),r=await t.json();return t.ok?r:Zi(r,e)}catch(t){return Zi(t,e)}}else try{const{data:e}=await u.get(o.pathname+o.search);return e}catch(e){return Yi(e)}};return{getContents:f,getContent:async e=>{let{appUid:t,modelUid:r,contentId:n,query:o}=e;if(!t)throw new Error("appUid parameter is required.");if(!r)throw new Error("modelUid parameter is required.");if(!n)throw new Error("contentId parameter is required.");const i=new URL(`/v1/${t}/${r}/${n}`,c.toString());if(o&&Object.keys(o).length){const{encoded:e}=Xi(o);i.search=e}if(s){const e={method:"get",headers:l,url:i.toString()};try{const t=await s(i.toString(),{headers:l}),r=await t.json();return t.ok?r:Zi(r,e)}catch(t){return Zi(t,e)}}else try{const{data:e}=await u.get(i.pathname+i.search);return e}catch(e){return Yi(e)}},getFirstContent:async e=>{let{appUid:t,modelUid:r,query:n}=e;if(n&&n.limit)throw new Error("query.limit parameter cannot have a value.");const o={...n,limit:1},{items:i}=await f({appUid:t,modelUid:r,query:o});return 0===i.length?null:i[0]},getApp:async e=>{let{appUid:t}=e;if(!t)throw new Error("appUid parameter is required.");const r=new URL(`/v1/space/apps/${t}`,c.toString());if(s){const e={method:"get",headers:l,url:r.toString()};try{const t=await s(r.toString(),{headers:l}),n=await t.json();return t.ok?n:Zi(n,e)}catch(t){return Zi(t,e)}}else try{const{data:e}=await u.get(r.pathname);return e}catch(e){return Yi(e)}}}},Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).newtClient={})}(this,(function(e){"use strict";function t(e,t){return function(){return e.apply(t,arguments)}}const{toString:r}=Object.prototype,{getPrototypeOf:n}=Object,{iterator:o,toStringTag:i}=Symbol,a=(s=Object.create(null),e=>{const t=r.call(e);return s[t]||(s[t]=t.slice(8,-1).toLowerCase())});var s;const c=e=>(e=e.toLowerCase(),t=>a(t)===e),l=e=>t=>typeof t===e,{isArray:u}=Array,f=l("undefined");function p(e){return null!==e&&!f(e)&&null!==e.constructor&&!f(e.constructor)&&h(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const d=c("ArrayBuffer");const y=l("string"),h=l("function"),m=l("number"),g=e=>null!==e&&"object"==typeof e,b=e=>{if("object"!==a(e))return!1;const t=n(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||i in e||o in e)},w=c("Date"),E=c("File"),v=c("Blob"),O=c("FileList"),S=c("URLSearchParams"),[R,A,_,j]=["ReadableStream","Request","Response","Headers"].map(c);function T(e,t){let r,n,{allOwnKeys:o=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null!=e)if("object"!=typeof e&&(e=[e]),u(e))for(r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else{if(p(e))return;const n=o?Object.getOwnPropertyNames(e):Object.keys(e),i=n.length;let a;for(r=0;r<i;r++)a=n[r],t.call(null,e[a],a,e)}}function P(e,t){if(p(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const N="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,x=e=>!f(e)&&e!==N;const U=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&n(Uint8Array)),D=c("HTMLFormElement"),C=(e=>{let{hasOwnProperty:t}=e;return(e,r)=>t.call(e,r)})(Object.prototype),L=c("RegExp"),F=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};T(r,((r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)})),Object.defineProperties(e,n)};const I=c("AsyncFunction"),k=(B="function"==typeof setImmediate,M=h(N.postMessage),B?setImmediate:M?(q=`axios@${Math.random()}`,W=[],N.addEventListener("message",(e=>{let{source:t,data:r}=e;t===N&&r===q&&W.length&&W.shift()()}),!1),e=>{W.push(e),N.postMessage(q,"*")}):e=>setTimeout(e));var B,M,q,W;const $="undefined"!=typeof queueMicrotask?queueMicrotask.bind(N):"undefined"!=typeof process&&process.nextTick||k;var H={isArray:u,isArrayBuffer:d,isBuffer:p,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||h(e.append)&&("formdata"===(t=a(e))||"object"===t&&h(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&d(e.buffer),t},isString:y,isNumber:m,isBoolean:e=>!0===e||!1===e,isObject:g,isPlainObject:b,isEmptyObject:e=>{if(!g(e)||p(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:R,isRequest:A,isResponse:_,isHeaders:j,isUndefined:f,isDate:w,isFile:E,isBlob:v,isRegExp:L,isFunction:h,isStream:e=>g(e)&&h(e.pipe),isURLSearchParams:S,isTypedArray:U,isFileList:O,forEach:T,merge:function e(){const{caseless:t,skipUndefined:r}=x(this)&&this||{},n={},o=(o,i)=>{if("__proto__"===i||"constructor"===i||"prototype"===i)return;const a=t&&P(n,i)||i;b(n[a])&&b(o)?n[a]=e(n[a],o):b(o)?n[a]=e({},o):u(o)?n[a]=o.slice():r&&f(o)||(n[a]=o)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&T(arguments[e],o);return n},extend:function(e,r,n){let{allOwnKeys:o}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return T(r,((r,o)=>{n&&h(r)?Object.defineProperty(e,o,{value:t(r,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{value:r,writable:!0,enumerable:!0,configurable:!0})}),{allOwnKeys:o}),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,o)=>{let i,a,s;const c={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)s=i[a],o&&!o(s,e,t)||c[s]||(t[s]=e[s],c[s]=!0);e=!1!==r&&n(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:a,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(u(e))return e;let t=e.length;if(!m(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[o]).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:C,hasOwnProp:C,reduceDescriptors:F,freezeMethods:e=>{F(e,((t,r)=>{if(h(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];h(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 u(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:P,global:N,isContextDefined:x,isSpecCompliantForm:function(e){return!!(e&&h(e.append)&&"FormData"===e[i]&&e[o])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(g(e)){if(t.indexOf(e)>=0)return;if(p(e))return e;if(!("toJSON"in e)){t[n]=e;const o=u(e)?[]:{};return T(e,((e,t)=>{const i=r(e,n+1);!f(i)&&(o[t]=i)})),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:I,isThenable:e=>e&&(g(e)||h(e))&&h(e.then)&&h(e.catch),setImmediate:k,asap:$,isIterable:e=>null!=e&&h(e[o])};class z extends Error{static from(e,t,r,n,o,i){const a=new z(e.message,t||e.code,r,n,o);return a.cause=e,a.name=e.name,i&&Object.assign(a,i),a}constructor(e,t,r,n,o){super(e),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.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:H.toJSONObject(this.config),code:this.code,status:this.status}}}z.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",z.ERR_BAD_OPTION="ERR_BAD_OPTION",z.ECONNABORTED="ECONNABORTED",z.ETIMEDOUT="ETIMEDOUT",z.ERR_NETWORK="ERR_NETWORK",z.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",z.ERR_DEPRECATED="ERR_DEPRECATED",z.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",z.ERR_BAD_REQUEST="ERR_BAD_REQUEST",z.ERR_CANCELED="ERR_CANCELED",z.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",z.ERR_INVALID_URL="ERR_INVALID_URL";var K=z;function V(e){return H.isPlainObject(e)||H.isArray(e)}function G(e){return H.endsWith(e,"[]")?e.slice(0,-2):e}function J(e,t,r){return e?e.concat(t).map((function(e,t){return e=G(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const Q=H.toFlatObject(H,{},null,(function(e){return/^is[A-Z]/.test(e)}));function X(e,t,r){if(!H.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=H.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!H.isUndefined(t[e])}))).metaTokens,o=r.visitor||l,i=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&H.isSpecCompliantForm(t);if(!H.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(H.isDate(e))return e.toISOString();if(H.isBoolean(e))return e.toString();if(!s&&H.isBlob(e))throw new K("Blob is not supported. Use a Buffer instead.");return H.isArrayBuffer(e)||H.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,r,o){let s=e;if(e&&!o&&"object"==typeof e)if(H.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(H.isArray(e)&&function(e){return H.isArray(e)&&!e.some(V)}(e)||(H.isFileList(e)||H.endsWith(r,"[]"))&&(s=H.toArray(e)))return r=G(r),s.forEach((function(e,n){!H.isUndefined(e)&&null!==e&&t.append(!0===a?J([r],n,i):null===a?r:r+"[]",c(e))})),!1;return!!V(e)||(t.append(J(o,r,i),c(e)),!1)}const u=[],f=Object.assign(Q,{defaultVisitor:l,convertValue:c,isVisitable:V});if(!H.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!H.isUndefined(r)){if(-1!==u.indexOf(r))throw Error("Circular reference detected in "+n.join("."));u.push(r),H.forEach(r,(function(r,i){!0===(!(H.isUndefined(r)||null===r)&&o.call(t,r,H.isString(i)?i.trim():i,n,f))&&e(r,n?n.concat(i):[i])})),u.pop()}}(e),t}function Y(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Z(e,t){this._pairs=[],e&&X(e,this,t)}const ee=Z.prototype;function te(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function re(e,t,r){if(!t)return e;const n=r&&r.encode||te,o=H.isFunction(r)?{serialize:r}:r,i=o&&o.serialize;let a;if(a=i?i(t,o):H.isURLSearchParams(t)?t.toString():new Z(t,o).toString(n),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}ee.append=function(e,t){this._pairs.push([e,t])},ee.toString=function(e){const t=e?function(t){return e.call(this,t,Y)}:Y;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var ne=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){H.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},oe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},ie={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Z,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const ae="undefined"!=typeof window&&"undefined"!=typeof document,se="object"==typeof navigator&&navigator||void 0,ce=ae&&(!se||["ReactNative","NativeScript","NS"].indexOf(se.product)<0),le="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ue=ae&&window.location.href||"http://localhost";var fe={...Object.freeze({__proto__:null,hasBrowserEnv:ae,hasStandardBrowserWebWorkerEnv:le,hasStandardBrowserEnv:ce,navigator:se,origin:ue}),...ie};function pe(e){function t(e,r,n,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&H.isArray(n)?n.length:i,s)return H.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!a;n[i]&&H.isObject(n[i])||(n[i]=[]);return t(e,r,n[i],o)&&H.isArray(n[i])&&(n[i]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}(n[i])),!a}if(H.isFormData(e)&&H.isFunction(e.entries)){const r={};return H.forEachEntry(e,((e,n)=>{t(function(e){return H.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null}const de={transitional:oe,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=H.isObject(e);o&&H.isHTMLForm(e)&&(e=new FormData(e));if(H.isFormData(e))return n?JSON.stringify(pe(e)):e;if(H.isArrayBuffer(e)||H.isBuffer(e)||H.isStream(e)||H.isFile(e)||H.isBlob(e)||H.isReadableStream(e))return e;if(H.isArrayBufferView(e))return e.buffer;if(H.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return X(e,new fe.classes.URLSearchParams,{visitor:function(e,t,r,n){return fe.isNode&&H.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((i=H.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return X(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e,t,r){if(H.isString(e))try{return(t||JSON.parse)(e),H.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||de.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(H.isResponse(e)||H.isReadableStream(e))return e;if(e&&H.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e,this.parseReviver)}catch(e){if(r){if("SyntaxError"===e.name)throw K.from(e,K.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:fe.classes.FormData,Blob:fe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};H.forEach(["delete","get","head","post","put","patch"],(e=>{de.headers[e]={}}));var ye=de;const he=H.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 me=Symbol("internals");function ge(e){return e&&String(e).trim().toLowerCase()}function be(e){return!1===e||null==e?e:H.isArray(e)?e.map(be):String(e)}function we(e,t,r,n,o){return H.isFunction(n)?n.call(this,t,r):(o&&(t=r),H.isString(t)?H.isString(n)?-1!==t.indexOf(n):H.isRegExp(n)?n.test(t):void 0:void 0)}class Ee{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=ge(t);if(!o)throw new Error("header name must be a non-empty string");const i=H.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=be(e))}const i=(e,t)=>H.forEach(e,((e,r)=>o(e,r,t)));if(H.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(H.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&he[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(H.isObject(e)&&H.isIterable(e)){let r,n,o={};for(const t of e){if(!H.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[n=t[0]]=(r=o[n])?H.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}i(o,t)}else null!=e&&o(t,e,r);return this}get(e,t){if(e=ge(e)){const r=H.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(H.isFunction(t))return t.call(this,e,r);if(H.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ge(e)){const r=H.findKey(this,e);return!(!r||void 0===this[r]||t&&!we(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=ge(e)){const o=H.findKey(r,e);!o||t&&!we(0,r[o],o,t)||(delete r[o],n=!0)}}return H.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!we(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return H.forEach(this,((n,o)=>{const i=H.findKey(r,o);if(i)return t[i]=be(n),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(o):String(o).trim();a!==o&&delete t[o],t[a]=be(n),r[a]=!0})),this}concat(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.constructor.concat(this,...t)}toJSON(e){const t=Object.create(null);return H.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&H.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((e=>{let[t,r]=e;return t+": "+r})).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){const t=new this(e);for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return n.forEach((e=>t.set(e))),t}static accessor(e){const t=(this[me]=this[me]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=ge(e);t[n]||(!function(e,t){const r=H.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})}))}(r,e),t[n]=!0)}return H.isArray(e)?e.forEach(n):n(e),this}}Ee.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),H.reduceDescriptors(Ee.prototype,((e,t)=>{let{value:r}=e,n=t[0].toUpperCase()+t.slice(1);return{get:()=>r,set(e){this[n]=e}}})),H.freezeMethods(Ee);var ve=Ee;function Oe(e,t){const r=this||ye,n=t||r,o=ve.from(n.headers);let i=n.data;return H.forEach(e,(function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Se(e){return!(!e||!e.__CANCEL__)}var Re=class extends K{constructor(e,t,r){super(null==e?"canceled":e,K.ERR_CANCELED,t,r),this.name="CanceledError",this.__CANCEL__=!0}};function Ae(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 _e=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,n=0;const o=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const c=Date.now(),l=n[a];o||(o=c),r[i]=s,n[i]=c;let u=a,f=0;for(;u!==i;)f+=r[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;const p=l&&c-l;return p?Math.round(1e3*f/p):void 0}}(50,250);return function(e,t){let r,n,o=0,i=1e3/t;const a=function(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();o=i,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[function(){const e=Date.now(),t=e-o;for(var s=arguments.length,c=new Array(s),l=0;l<s;l++)c[l]=arguments[l];t>=i?a(c,e):(r=c,n||(n=setTimeout((()=>{n=null,a(r)}),i-t)))},()=>r&&a(r)]}((r=>{const i=r.loaded,a=r.lengthComputable?r.total:void 0,s=i-n,c=o(s);n=i;e({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&i<=a?(a-i)/c:void 0,event:r,lengthComputable:null!=a,[t?"download":"upload"]:!0})}),r)},je=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Te=e=>function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return H.asap((()=>e(...r)))};var Pe=fe.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,fe.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(fe.origin),fe.navigator&&/(msie|trident)/i.test(fe.navigator.userAgent)):()=>!0,Ne=fe.hasStandardBrowserEnv?{write(e,t,r,n,o,i,a){if("undefined"==typeof document)return;const s=[`${e}=${encodeURIComponent(t)}`];H.isNumber(r)&&s.push(`expires=${new Date(r).toUTCString()}`),H.isString(n)&&s.push(`path=${n}`),H.isString(o)&&s.push(`domain=${o}`),!0===i&&s.push("secure"),H.isString(a)&&s.push(`SameSite=${a}`),document.cookie=s.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 xe(e,t,r){let n=!("string"==typeof(o=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(o));var o;return e&&(n||0==r)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Ue=e=>e instanceof ve?{...e}:e;function De(e,t){t=t||{};const r={};function n(e,t,r,n){return H.isPlainObject(e)&&H.isPlainObject(t)?H.merge.call({caseless:n},e,t):H.isPlainObject(t)?H.merge({},t):H.isArray(t)?t.slice():t}function o(e,t,r,o){return H.isUndefined(t)?H.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function i(e,t){if(!H.isUndefined(t))return n(void 0,t)}function a(e,t){return H.isUndefined(t)?H.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,o,i){return i in t?n(r,o):i in e?n(void 0,r):void 0}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,r)=>o(Ue(e),Ue(t),0,!0)};return H.forEach(Object.keys({...e,...t}),(function(n){if("__proto__"===n||"constructor"===n||"prototype"===n)return;const i=H.hasOwnProp(c,n)?c[n]:o,a=i(e[n],t[n],n);H.isUndefined(a)&&i!==s||(r[n]=a)})),r}var Ce=e=>{const t=De({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=t;if(t.headers=a=ve.from(a),t.url=re(xe(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),H.isFormData(r))if(fe.hasStandardBrowserEnv||fe.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(H.isFunction(r.getHeaders)){const e=r.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach((e=>{let[r,n]=e;t.includes(r.toLowerCase())&&a.set(r,n)}))}if(fe.hasStandardBrowserEnv&&(n&&H.isFunction(n)&&(n=n(t)),n||!1!==n&&Pe(t.url))){const e=o&&i&&Ne.read(i);e&&a.set(o,e)}return t};var Le="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){const n=Ce(e);let o=n.data;const i=ve.from(n.headers).normalize();let a,s,c,l,u,{responseType:f,onUploadProgress:p,onDownloadProgress:d}=n;function y(){l&&l(),u&&u(),n.cancelToken&&n.cancelToken.unsubscribe(a),n.signal&&n.signal.removeEventListener("abort",a)}let h=new XMLHttpRequest;function m(){if(!h)return;const n=ve.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());Ae((function(e){t(e),y()}),(function(e){r(e),y()}),{data:f&&"text"!==f&&"json"!==f?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=m:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(m)},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",o=new K(n,K.ERR_NETWORK,e,h);o.event=t||null,r(o),h=null},h.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||oe;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new K(t,o.clarifyTimeoutError?K.ETIMEDOUT:K.ECONNABORTED,e,h)),h=null},void 0===o&&i.setContentType(null),"setRequestHeader"in h&&H.forEach(i.toJSON(),(function(e,t){h.setRequestHeader(t,e)})),H.isUndefined(n.withCredentials)||(h.withCredentials=!!n.withCredentials),f&&"json"!==f&&(h.responseType=n.responseType),d&&([c,u]=_e(d,!0),h.addEventListener("progress",c)),p&&h.upload&&([s,l]=_e(p),h.upload.addEventListener("progress",s),h.upload.addEventListener("loadend",l)),(n.cancelToken||n.signal)&&(a=t=>{h&&(r(!t||t.type?new Re(null,e,h):t),h.abort(),h=null)},n.cancelToken&&n.cancelToken.subscribe(a),n.signal&&(n.signal.aborted?a():n.signal.addEventListener("abort",a)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);g&&-1===fe.protocols.indexOf(g)?r(new K("Unsupported protocol "+g+":",K.ERR_BAD_REQUEST,e)):h.send(o||null)}))};var Fe=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const o=function(e){if(!r){r=!0,a();const t=e instanceof Error?e:this.reason;n.abort(t instanceof K?t:new Re(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null,o(new K(`timeout of ${t}ms exceeded`,K.ETIMEDOUT))}),t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:s}=n;return s.unsubscribe=()=>H.asap(a),s}};const Ie=function*(e,t){let r=e.byteLength;if(!t||r<t)return void(yield e);let n,o=0;for(;o<r;)n=o+t,yield e.slice(o,n),o=n},ke=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()}},Be=(e,t,r,n)=>{const o=async function*(e,t){for await(const r of ke(e))yield*Ie(r,t)}(e,t);let i,a=0,s=e=>{i||(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return s(),void e.close();let i=n.byteLength;if(r){let e=a+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},{isFunction:Me}=H,qe=(e=>{let{Request:t,Response:r}=e;return{Request:t,Response:r}})(H.global),{ReadableStream:We,TextEncoder:$e}=H.global,He=function(e){try{for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return!!e(...r)}catch(e){return!1}},ze=e=>{e=H.merge.call({skipUndefined:!0},qe,e);const{fetch:t,Request:r,Response:n}=e,o=t?Me(t):"function"==typeof fetch,i=Me(r),a=Me(n);if(!o)return!1;const s=o&&Me(We),c=o&&("function"==typeof $e?(l=new $e,e=>l.encode(e)):async e=>new Uint8Array(await new r(e).arrayBuffer()));var l;const u=i&&s&&He((()=>{let e=!1;const t=new r(fe.origin,{body:new We,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),f=a&&s&&He((()=>H.isReadableStream(new n("").body))),p={stream:f&&(e=>e.body)};o&&["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=H.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(H.isBlob(e))return e.size;if(H.isSpecCompliantForm(e)){const t=new r(fe.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return H.isArrayBufferView(e)||H.isArrayBuffer(e)?e.byteLength:(H.isURLSearchParams(e)&&(e+=""),H.isString(e)?(await c(e)).byteLength:void 0)})(t):n};return async e=>{let{url:o,method:a,data:s,signal:c,cancelToken:l,timeout:y,onDownloadProgress:h,onUploadProgress:m,responseType:g,headers:b,withCredentials:w="same-origin",fetchOptions:E}=Ce(e),v=t||fetch;g=g?(g+"").toLowerCase():"text";let O=Fe([c,l&&l.toAbortSignal()],y),S=null;const R=O&&O.unsubscribe&&(()=>{O.unsubscribe()});let A;try{if(m&&u&&"get"!==a&&"head"!==a&&0!==(A=await d(b,s))){let e,t=new r(o,{method:"POST",body:s,duplex:"half"});if(H.isFormData(s)&&(e=t.headers.get("content-type"))&&b.setContentType(e),t.body){const[e,r]=je(A,_e(Te(m)));s=Be(t.body,65536,e,r)}}H.isString(w)||(w=w?"include":"omit");const t=i&&"credentials"in r.prototype,c={...E,signal:O,method:a.toUpperCase(),headers:b.normalize().toJSON(),body:s,duplex:"half",credentials:t?w:void 0};S=i&&new r(o,c);let l=await(i?v(S,E):v(o,c));const y=f&&("stream"===g||"response"===g);if(f&&(h||y&&R)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=l[t]}));const t=H.toFiniteNumber(l.headers.get("content-length")),[r,o]=h&&je(t,_e(Te(h),!0))||[];l=new n(Be(l.body,65536,r,(()=>{o&&o(),R&&R()})),e)}g=g||"text";let _=await p[H.findKey(p,g)||"text"](l,e);return!y&&R&&R(),await new Promise(((t,r)=>{Ae(t,r,{data:_,headers:ve.from(l.headers),status:l.status,statusText:l.statusText,config:e,request:S})}))}catch(t){if(R&&R(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new K("Network Error",K.ERR_NETWORK,e,S,t&&t.response),{cause:t.cause||t});throw K.from(t,t&&t.code,e,S,t&&t.response)}}},Ke=new Map,Ve=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:o}=t,i=[n,o,r];let a,s,c=i.length,l=Ke;for(;c--;)a=i[c],s=l.get(a),void 0===s&&l.set(a,s=c?new Map:ze(t)),l=s;return s};Ve();const Ge={http:null,xhr:Le,fetch:{get:Ve}};H.forEach(Ge,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Je=e=>`- ${e}`,Qe=e=>H.isFunction(e)||null===e||!1===e;var Xe={getAdapter:function(e,t){e=H.isArray(e)?e:[e];const{length:r}=e;let n,o;const i={};for(let a=0;a<r;a++){let r;if(n=e[a],o=n,!Qe(n)&&(o=Ge[(r=String(n)).toLowerCase()],void 0===o))throw new K(`Unknown adapter '${r}'`);if(o&&(H.isFunction(o)||(o=o.get(t))))break;i[r||"#"+a]=o}if(!o){const e=Object.entries(i).map((e=>{let[t,r]=e;return`adapter ${t} `+(!1===r?"is not supported by the environment":"is not available in the build")}));let t=r?e.length>1?"since :\n"+e.map(Je).join("\n"):" "+Je(e[0]):"as no adapter specified";throw new K("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return o},adapters:Ge};function Ye(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Re(null,e)}function Ze(e){Ye(e),e.headers=ve.from(e.headers),e.data=Oe.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Xe.getAdapter(e.adapter||ye.adapter,e)(e).then((function(t){return Ye(e),t.data=Oe.call(e,e.transformResponse,t),t.headers=ve.from(t.headers),t}),(function(t){return Se(t)||(Ye(e),t&&t.response&&(t.response.data=Oe.call(e,e.transformResponse,t.response),t.response.headers=ve.from(t.response.headers))),Promise.reject(t)}))}const et="1.13.5",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){function n(e,t){return"[Axios v"+et+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,i)=>{if(!1===e)throw new K(n(o," has been removed"+(t?" in "+t:"")),K.ERR_DEPRECATED);return t&&!rt[o]&&(rt[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}},tt.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};var 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 o=n.length;for(;o-- >0;){const i=n[o],a=t[i];if(a){const t=e[i],r=void 0===t||a(t,i,e);if(!0!==r)throw new K("option "+i+" must be "+r,K.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new K("Unknown option "+i,K.ERR_BAD_OPTION)}},validators:tt};const ot=nt.validators;class it{constructor(e){this.defaults=e||{},this.interceptors={request:new ne,response:new ne}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=De(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&nt.assertOptions(r,{silentJSONParsing:ot.transitional(ot.boolean),forcedJSONParsing:ot.transitional(ot.boolean),clarifyTimeoutError:ot.transitional(ot.boolean),legacyInterceptorReqResOrdering:ot.transitional(ot.boolean)},!1),null!=n&&(H.isFunction(n)?t.paramsSerializer={serialize:n}:nt.assertOptions(n,{encode:ot.function,serialize:ot.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),nt.assertOptions(t,{baseUrl:ot.spelling("baseURL"),withXsrfToken:ot.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&H.merge(o.common,o[t.method]);o&&H.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=ve.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;s=s&&e.synchronous;const r=t.transitional||oe;r&&r.legacyInterceptorReqResOrdering?a.unshift(e.fulfilled,e.rejected):a.push(e.fulfilled,e.rejected)}));const c=[];let l;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let u,f=0;if(!s){const e=[Ze.bind(this),void 0];for(e.unshift(...a),e.push(...c),u=e.length,l=Promise.resolve(t);f<u;)l=l.then(e[f++],e[f++]);return l}u=a.length;let p=t;for(;f<u;){const e=a[f++],t=a[f++];try{p=e(p)}catch(e){t.call(this,e);break}}try{l=Ze.call(this,p)}catch(e){return Promise.reject(e)}for(f=0,u=c.length;f<u;)l=l.then(c[f++],c[f++]);return l}getUri(e){return re(xe((e=De(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}H.forEach(["delete","get","head","options"],(function(e){it.prototype[e]=function(t,r){return this.request(De(r||{},{method:e,url:t,data:(r||{}).data}))}})),H.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(De(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}it.prototype[e]=t(),it.prototype[e+"Form"]=t(!0)}));var at=it;class st{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,o){r.reason||(r.reason=new Re(e,n,o),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 st((function(t){e=t})),cancel:e}}}var ct=st;const lt={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(lt).forEach((e=>{let[t,r]=e;lt[r]=t}));var ut=lt;const ft=function e(r){const n=new at(r),o=t(at.prototype.request,n);return H.extend(o,at.prototype,n,{allOwnKeys:!0}),H.extend(o,n,null,{allOwnKeys:!0}),o.create=function(t){return e(De(r,t))},o}(ye);ft.Axios=at,ft.CanceledError=Re,ft.CancelToken=ct,ft.isCancel=Se,ft.VERSION=et,ft.toFormData=X,ft.AxiosError=K,ft.Cancel=ft.CanceledError,ft.all=function(e){return Promise.all(e)},ft.spread=function(e){return function(t){return e.apply(null,t)}},ft.isAxiosError=function(e){return H.isObject(e)&&!0===e.isAxiosError},ft.mergeConfig=De,ft.AxiosHeaders=ve,ft.formToJSON=e=>pe(H.isHTMLForm(e)?new FormData(e):e),ft.getAdapter=Xe.getAdapter,ft.HttpStatusCode=ut,ft.default=ft;var pt=ft,dt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function yt(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})})),t}const ht=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);function mt(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function gt(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){mt(i,n,o,a,s,"next",e)}function s(e){mt(i,n,o,a,s,"throw",e)}a(void 0)}))}}function bt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function wt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?bt(Object(r),!0).forEach((function(t){Et(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Et(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var vt="axios-retry";function Ot(e){return!e.response&&Boolean(e.code)&&"ECONNABORTED"!==e.code&&(e=>!ht.has(e&&e.code))(e)}var St=["get","head","options"],Rt=St.concat(["put","delete"]);function At(e){return"ECONNABORTED"!==e.code&&(!e.response||e.response.status>=500&&e.response.status<=599)}function _t(e){return!!e.config&&(At(e)&&-1!==Rt.indexOf(e.config.method))}function jt(e){return Ot(e)||_t(e)}function Tt(){return 0}function Pt(e){var t=e[vt]||{};return t.retryCount=t.retryCount||0,e[vt]=t,t}function Nt(){return(Nt=gt((function*(e,t,r,n){var o=r.retryCount<e&&t(n);if("object"==typeof o)try{return yield o,!0}catch(e){return!1}return o}))).apply(this,arguments)}function xt(e,t){e.interceptors.request.use((e=>(Pt(e).lastRequestTime=Date.now(),e))),e.interceptors.response.use(null,function(){var r=gt((function*(r){var{config:n}=r;if(!n)return Promise.reject(r);var{retries:o=3,retryCondition:i=jt,retryDelay:a=Tt,shouldResetTimeout:s=!1}=function(e,t){return wt(wt({},t),e[vt])}(n,t),c=Pt(n);if(yield function(e,t,r,n){return Nt.apply(this,arguments)}(o,i,c,r)){c.retryCount+=1;var l=a(c.retryCount,r);if(function(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}(e,n),!s&&n.timeout&&c.lastRequestTime){var u=Date.now()-c.lastRequestTime;n.timeout=Math.max(n.timeout-u-l,1)}return n.transformRequest=[e=>e],new Promise((t=>setTimeout((()=>t(e(n))),l)))}return Promise.reject(r)}));return function(e){return r.apply(this,arguments)}}())}xt.isNetworkError=Ot,xt.isSafeRequestError=function(e){return!!e.config&&(At(e)&&-1!==St.indexOf(e.config.method))},xt.isIdempotentRequestError=_t,xt.isNetworkOrIdempotentRequestError=jt,xt.exponentialDelay=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=100*Math.pow(2,e);return t+.2*t*Math.random()},xt.isRetryableError=At;var Ut=TypeError,Dt=yt(Object.freeze({__proto__:null,default:{}})),Ct="function"==typeof Map&&Map.prototype,Lt=Object.getOwnPropertyDescriptor&&Ct?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ft=Ct&&Lt&&"function"==typeof Lt.get?Lt.get:null,It=Ct&&Map.prototype.forEach,kt="function"==typeof Set&&Set.prototype,Bt=Object.getOwnPropertyDescriptor&&kt?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Mt=kt&&Bt&&"function"==typeof Bt.get?Bt.get:null,qt=kt&&Set.prototype.forEach,Wt="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,$t="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,Ht="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,zt=Boolean.prototype.valueOf,Kt=Object.prototype.toString,Vt=Function.prototype.toString,Gt=String.prototype.match,Jt=String.prototype.slice,Qt=String.prototype.replace,Xt=String.prototype.toUpperCase,Yt=String.prototype.toLowerCase,Zt=RegExp.prototype.test,er=Array.prototype.concat,tr=Array.prototype.join,rr=Array.prototype.slice,nr=Math.floor,or="function"==typeof BigInt?BigInt.prototype.valueOf:null,ir=Object.getOwnPropertySymbols,ar="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,sr="function"==typeof Symbol&&"object"==typeof Symbol.iterator,cr="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===sr||"symbol")?Symbol.toStringTag:null,lr=Object.prototype.propertyIsEnumerable,ur=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function fr(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||Zt.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-nr(-e):nr(e);if(n!==e){var o=String(n),i=Jt.call(t,o.length+1);return Qt.call(o,r,"$&_")+"."+Qt.call(Qt.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Qt.call(t,r,"$&_")}var pr=Dt,dr=pr.custom,yr=Sr(dr)?dr:null,hr={__proto__:null,double:'"',single:"'"},mr={__proto__:null,double:/(["\\])/g,single:/(['\\])/g},gr=function e(t,r,n,o){var i=r||{};if(Ar(i,"quoteStyle")&&!Ar(hr,i.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ar(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!Ar(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ar(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ar(i,"numericSeparator")&&"boolean"!=typeof i.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=i.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return Tr(t,i);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var c=String(t);return s?fr(t,c):c}if("bigint"==typeof t){var l=String(t)+"n";return s?fr(t,l):l}var u=void 0===i.depth?5:i.depth;if(void 0===n&&(n=0),n>=u&&u>0&&"object"==typeof t)return vr(t)?"[Array]":"[Object]";var f=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=tr.call(Array(e.indent+1)," ")}return{base:r,prev:tr.call(Array(t+1),r)}}(i,n);if(void 0===o)o=[];else if(jr(o,t)>=0)return"[Circular]";function p(t,r,a){if(r&&(o=rr.call(o)).push(r),a){var s={depth:i.depth};return Ar(i,"quoteStyle")&&(s.quoteStyle=i.quoteStyle),e(t,s,n+1,o)}return e(t,i,n+1,o)}if("function"==typeof t&&!Or(t)){var d=function(e){if(e.name)return e.name;var t=Gt.call(Vt.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),y=Cr(t,p);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(y.length>0?" { "+tr.call(y,", ")+" }":"")}if(Sr(t)){var h=sr?Qt.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):ar.call(t);return"object"!=typeof t||sr?h:Nr(h)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var m="<"+Yt.call(String(t.nodeName)),g=t.attributes||[],b=0;b<g.length;b++)m+=" "+g[b].name+"="+br(wr(g[b].value),"double",i);return m+=">",t.childNodes&&t.childNodes.length&&(m+="..."),m+="</"+Yt.call(String(t.nodeName))+">"}if(vr(t)){if(0===t.length)return"[]";var w=Cr(t,p);return f&&!function(e){for(var t=0;t<e.length;t++)if(jr(e[t],"\n")>=0)return!1;return!0}(w)?"["+Dr(w,f)+"]":"[ "+tr.call(w,", ")+" ]"}if(function(e){return"[object Error]"===_r(e)&&Er(e)}(t)){var E=Cr(t,p);return"cause"in Error.prototype||!("cause"in t)||lr.call(t,"cause")?0===E.length?"["+String(t)+"]":"{ ["+String(t)+"] "+tr.call(E,", ")+" }":"{ ["+String(t)+"] "+tr.call(er.call("[cause]: "+p(t.cause),E),", ")+" }"}if("object"==typeof t&&a){if(yr&&"function"==typeof t[yr]&&pr)return pr(t,{depth:u-n});if("symbol"!==a&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!Ft||!e||"object"!=typeof e)return!1;try{Ft.call(e);try{Mt.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var v=[];return It&&It.call(t,(function(e,r){v.push(p(r,t,!0)+" => "+p(e,t))})),Ur("Map",Ft.call(t),v,f)}if(function(e){if(!Mt||!e||"object"!=typeof e)return!1;try{Mt.call(e);try{Ft.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var O=[];return qt&&qt.call(t,(function(e){O.push(p(e,t))})),Ur("Set",Mt.call(t),O,f)}if(function(e){if(!Wt||!e||"object"!=typeof e)return!1;try{Wt.call(e,Wt);try{$t.call(e,$t)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return xr("WeakMap");if(function(e){if(!$t||!e||"object"!=typeof e)return!1;try{$t.call(e,$t);try{Wt.call(e,Wt)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return xr("WeakSet");if(function(e){if(!Ht||!e||"object"!=typeof e)return!1;try{return Ht.call(e),!0}catch(e){}return!1}(t))return xr("WeakRef");if(function(e){return"[object Number]"===_r(e)&&Er(e)}(t))return Nr(p(Number(t)));if(function(e){if(!e||"object"!=typeof e||!or)return!1;try{return or.call(e),!0}catch(e){}return!1}(t))return Nr(p(or.call(t)));if(function(e){return"[object Boolean]"===_r(e)&&Er(e)}(t))return Nr(zt.call(t));if(function(e){return"[object String]"===_r(e)&&Er(e)}(t))return Nr(p(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&t===globalThis||void 0!==dt&&t===dt)return"{ [object globalThis] }";if(!function(e){return"[object Date]"===_r(e)&&Er(e)}(t)&&!Or(t)){var S=Cr(t,p),R=ur?ur(t)===Object.prototype:t instanceof Object||t.constructor===Object,A=t instanceof Object?"":"null prototype",_=!R&&cr&&Object(t)===t&&cr in t?Jt.call(_r(t),8,-1):A?"Object":"",j=(R||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(_||A?"["+tr.call(er.call([],_||[],A||[]),": ")+"] ":"");return 0===S.length?j+"{}":f?j+"{"+Dr(S,f)+"}":j+"{ "+tr.call(S,", ")+" }"}return String(t)};function br(e,t,r){var n=r.quoteStyle||t,o=hr[n];return o+e+o}function wr(e){return Qt.call(String(e),/"/g,"&quot;")}function Er(e){return!cr||!("object"==typeof e&&(cr in e||void 0!==e[cr]))}function vr(e){return"[object Array]"===_r(e)&&Er(e)}function Or(e){return"[object RegExp]"===_r(e)&&Er(e)}function Sr(e){if(sr)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!ar)return!1;try{return ar.call(e),!0}catch(e){}return!1}var Rr=Object.prototype.hasOwnProperty||function(e){return e in this};function Ar(e,t){return Rr.call(e,t)}function _r(e){return Kt.call(e)}function jr(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function Tr(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Tr(Jt.call(e,0,t.maxStringLength),t)+n}var o=mr[t.quoteStyle||"single"];return o.lastIndex=0,br(Qt.call(Qt.call(e,o,"\\$1"),/[\x00-\x1f]/g,Pr),"single",t)}function Pr(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+Xt.call(t.toString(16))}function Nr(e){return"Object("+e+")"}function xr(e){return e+" { ? }"}function Ur(e,t,r,n){return e+" ("+t+") {"+(n?Dr(r,n):tr.call(r,", "))+"}"}function Dr(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+tr.call(e,","+r)+"\n"+t.prev}function Cr(e,t){var r=vr(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=Ar(e,o)?t(e[o],e):""}var i,a="function"==typeof ir?ir(e):[];if(sr){i={};for(var s=0;s<a.length;s++)i["$"+a[s]]=a[s]}for(var c in e)Ar(e,c)&&(r&&String(Number(c))===c&&c<e.length||sr&&i["$"+c]instanceof Symbol||(Zt.call(/[^\w$]/,c)?n.push(t(c,e)+": "+t(e[c],e)):n.push(c+": "+t(e[c],e))));if("function"==typeof ir)for(var l=0;l<a.length;l++)lr.call(e,a[l])&&n.push("["+t(a[l])+"]: "+t(e[a[l]],e));return n}var Lr=gr,Fr=Ut,Ir=function(e,t,r){for(var n,o=e;null!=(n=o.next);o=n)if(n.key===t)return o.next=n.next,r||(n.next=e.next,e.next=n),n},kr=Object,Br=Error,Mr=EvalError,qr=RangeError,Wr=ReferenceError,$r=SyntaxError,Hr=URIError,zr=Math.abs,Kr=Math.floor,Vr=Math.max,Gr=Math.min,Jr=Math.pow,Qr=Math.round,Xr=Number.isNaN||function(e){return e!=e},Yr=Object.getOwnPropertyDescriptor;if(Yr)try{Yr([],"length")}catch(e){Yr=null}var Zr=Yr,en=Object.defineProperty||!1;if(en)try{en({},"a",{value:1})}catch(e){en=!1}var tn,rn=en,nn="undefined"!=typeof Symbol&&Symbol,on=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0},an="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null,sn=kr.getPrototypeOf||null,cn=Object.prototype.toString,ln=Math.max,un=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r},fn=function(e){var t=this;if("function"!=typeof t||"[object Function]"!==cn.apply(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var r,n=function(e,t){for(var r=[],n=t||0,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r}(arguments,1),o=ln(0,t.length-n.length),i=[],a=0;a<o;a++)i[a]="$"+a;if(r=Function("binder","return function ("+function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r}(i,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof r){var o=t.apply(this,un(n,arguments));return Object(o)===o?o:this}return t.apply(e,un(n,arguments))})),t.prototype){var s=function(){};s.prototype=t.prototype,r.prototype=new s,s.prototype=null}return r},pn=Function.prototype.bind||fn,dn=Function.prototype.call,yn=Function.prototype.apply,hn=yn,mn=dn,gn="undefined"!=typeof Reflect&&Reflect&&Reflect.apply||pn.call(mn,hn),bn=pn,wn=Ut,En=dn,vn=gn,On=function(e){if(e.length<1||"function"!=typeof e[0])throw new wn("a function is required");return vn(bn,En,e)},Sn=On,Rn=Zr;try{tn=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var An,_n=!!tn&&Rn&&Rn(Object.prototype,"__proto__"),jn=Object,Tn=jn.getPrototypeOf,Pn=_n&&"function"==typeof _n.get?Sn([_n.get]):"function"==typeof Tn&&function(e){return Tn(null==e?e:jn(e))},Nn=an,xn=sn,Un=Pn,Dn=Nn?function(e){return Nn(e)}:xn?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return xn(e)}:Un?function(e){return Un(e)}:null,Cn=Object.prototype.toString,Ln=Math.max,Fn=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r},In=function(e){var t=this;if("function"!=typeof t||"[object Function]"!==Cn.apply(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var r,n=function(e,t){for(var r=[],n=t||0,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r}(arguments,1),o=Ln(0,t.length-n.length),i=[],a=0;a<o;a++)i[a]="$"+a;if(r=Function("binder","return function ("+function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r}(i,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof r){var o=t.apply(this,Fn(n,arguments));return Object(o)===o?o:this}return t.apply(e,Fn(n,arguments))})),t.prototype){var s=function(){};s.prototype=t.prototype,r.prototype=new s,s.prototype=null}return r},kn=Function.prototype.bind||In,Bn=Object.prototype.toString,Mn=Math.max,qn=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r},Wn=function(e){var t=this;if("function"!=typeof t||"[object Function]"!==Bn.apply(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var r,n=function(e,t){for(var r=[],n=t||0,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r}(arguments,1),o=Mn(0,t.length-n.length),i=[],a=0;a<o;a++)i[a]="$"+a;if(r=Function("binder","return function ("+function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r}(i,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof r){var o=t.apply(this,qn(n,arguments));return Object(o)===o?o:this}return t.apply(e,qn(n,arguments))})),t.prototype){var s=function(){};s.prototype=t.prototype,r.prototype=new s,s.prototype=null}return r},$n=Function.prototype.bind||Wn,Hn=Function.prototype.call,zn=Object.prototype.hasOwnProperty,Kn=$n.call(Hn,zn),Vn=kr,Gn=Br,Jn=Mr,Qn=qr,Xn=Wr,Yn=$r,Zn=Ut,eo=Hr,to=zr,ro=Kr,no=Vr,oo=Gr,io=Jr,ao=Qr,so=function(e){return Xr(e)||0===e?e:e<0?-1:1},co=Function,lo=function(e){try{return co('"use strict"; return ('+e+").constructor;")()}catch(e){}},uo=Zr,fo=rn,po=function(){throw new Zn},yo=uo?function(){try{return po}catch(e){try{return uo(arguments,"callee").get}catch(e){return po}}}():po,ho="function"==typeof nn&&"function"==typeof Symbol&&"symbol"==typeof nn("foo")&&"symbol"==typeof Symbol("bar")&&on(),mo=Dn,go=sn,bo=an,wo=yn,Eo=dn,vo={},Oo="undefined"!=typeof Uint8Array&&mo?mo(Uint8Array):An,So={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?An:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?An:ArrayBuffer,"%ArrayIteratorPrototype%":ho&&mo?mo([][Symbol.iterator]()):An,"%AsyncFromSyncIteratorPrototype%":An,"%AsyncFunction%":vo,"%AsyncGenerator%":vo,"%AsyncGeneratorFunction%":vo,"%AsyncIteratorPrototype%":vo,"%Atomics%":"undefined"==typeof Atomics?An:Atomics,"%BigInt%":"undefined"==typeof BigInt?An:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?An:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?An:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?An:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Gn,"%eval%":eval,"%EvalError%":Jn,"%Float16Array%":"undefined"==typeof Float16Array?An:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?An:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?An:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?An:FinalizationRegistry,"%Function%":co,"%GeneratorFunction%":vo,"%Int8Array%":"undefined"==typeof Int8Array?An:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?An:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?An:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ho&&mo?mo(mo([][Symbol.iterator]())):An,"%JSON%":"object"==typeof JSON?JSON:An,"%Map%":"undefined"==typeof Map?An:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&ho&&mo?mo((new Map)[Symbol.iterator]()):An,"%Math%":Math,"%Number%":Number,"%Object%":Vn,"%Object.getOwnPropertyDescriptor%":uo,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?An:Promise,"%Proxy%":"undefined"==typeof Proxy?An:Proxy,"%RangeError%":Qn,"%ReferenceError%":Xn,"%Reflect%":"undefined"==typeof Reflect?An:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?An:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&ho&&mo?mo((new Set)[Symbol.iterator]()):An,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?An:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ho&&mo?mo(""[Symbol.iterator]()):An,"%Symbol%":ho?Symbol:An,"%SyntaxError%":Yn,"%ThrowTypeError%":yo,"%TypedArray%":Oo,"%TypeError%":Zn,"%Uint8Array%":"undefined"==typeof Uint8Array?An:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?An:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?An:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?An:Uint32Array,"%URIError%":eo,"%WeakMap%":"undefined"==typeof WeakMap?An:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?An:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?An:WeakSet,"%Function.prototype.call%":Eo,"%Function.prototype.apply%":wo,"%Object.defineProperty%":fo,"%Object.getPrototypeOf%":go,"%Math.abs%":to,"%Math.floor%":ro,"%Math.max%":no,"%Math.min%":oo,"%Math.pow%":io,"%Math.round%":ao,"%Math.sign%":so,"%Reflect.getPrototypeOf%":bo};if(mo)try{null.error}catch(e){var Ro=mo(mo(e));So["%Error.prototype%"]=Ro}var Ao=function e(t){var r;if("%AsyncFunction%"===t)r=lo("async function () {}");else if("%GeneratorFunction%"===t)r=lo("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=lo("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&mo&&(r=mo(o.prototype))}return So[t]=r,r},_o={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},jo=kn,To=Kn,Po=jo.call(Eo,Array.prototype.concat),No=jo.call(wo,Array.prototype.splice),xo=jo.call(Eo,String.prototype.replace),Uo=jo.call(Eo,String.prototype.slice),Do=jo.call(Eo,RegExp.prototype.exec),Co=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Lo=/\\(\\)?/g,Fo=function(e,t){var r,n=e;if(To(_o,n)&&(n="%"+(r=_o[n])[0]+"%"),To(So,n)){var o=So[n];if(o===vo&&(o=Ao(n)),void 0===o&&!t)throw new Zn("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new Yn("intrinsic "+e+" does not exist!")},Io=function(e,t){if("string"!=typeof e||0===e.length)throw new Zn("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new Zn('"allowMissing" argument must be a boolean');if(null===Do(/^%?[^%]*%?$/,e))throw new Yn("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=Uo(e,0,1),r=Uo(e,-1);if("%"===t&&"%"!==r)throw new Yn("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new Yn("invalid intrinsic syntax, expected opening `%`");var n=[];return xo(e,Co,(function(e,t,r,o){n[n.length]=r?xo(o,Lo,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",o=Fo("%"+n+"%",t),i=o.name,a=o.value,s=!1,c=o.alias;c&&(n=c[0],No(r,Po([0,1],c)));for(var l=1,u=!0;l<r.length;l+=1){var f=r[l],p=Uo(f,0,1),d=Uo(f,-1);if(('"'===p||"'"===p||"`"===p||'"'===d||"'"===d||"`"===d)&&p!==d)throw new Yn("property names with quotes must have matching quotes");if("constructor"!==f&&u||(s=!0),To(So,i="%"+(n+="."+f)+"%"))a=So[i];else if(null!=a){if(!(f in a)){if(!t)throw new Zn("base intrinsic for "+e+" exists, but the property is not available.");return}if(uo&&l+1>=r.length){var y=uo(a,f);a=(u=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:a[f]}else u=To(a,f),a=a[f];u&&!s&&(So[i]=a)}}return a},ko=Io,Bo=On,Mo=Bo([ko("%String.prototype.indexOf%")]),qo=function(e,t){var r=ko(e,!!t);return"function"==typeof r&&Mo(e,".prototype.")>-1?Bo([r]):r},Wo=qo,$o=gr,Ho=Ut,zo=Io("%Map%",!0),Ko=Wo("Map.prototype.get",!0),Vo=Wo("Map.prototype.set",!0),Go=Wo("Map.prototype.has",!0),Jo=Wo("Map.prototype.delete",!0),Qo=Wo("Map.prototype.size",!0),Xo=!!zo&&function(){var e,t={assert:function(e){if(!t.has(e))throw new Ho("Side channel does not contain "+$o(e))},delete:function(t){if(e){var r=Jo(e,t);return 0===Qo(e)&&(e=void 0),r}return!1},get:function(t){if(e)return Ko(e,t)},has:function(t){return!!e&&Go(e,t)},set:function(t,r){e||(e=new zo),Vo(e,t,r)}};return t},Yo=qo,Zo=gr,ei=Xo,ti=Ut,ri=Io("%WeakMap%",!0),ni=Yo("WeakMap.prototype.get",!0),oi=Yo("WeakMap.prototype.set",!0),ii=Yo("WeakMap.prototype.has",!0),ai=Yo("WeakMap.prototype.delete",!0),si=Ut,ci=gr,li=(ri?function(){var e,t,r={assert:function(e){if(!r.has(e))throw new ti("Side channel does not contain "+Zo(e))},delete:function(r){if(ri&&r&&("object"==typeof r||"function"==typeof r)){if(e)return ai(e,r)}else if(ei&&t)return t.delete(r);return!1},get:function(r){return ri&&r&&("object"==typeof r||"function"==typeof r)&&e?ni(e,r):t&&t.get(r)},has:function(r){return ri&&r&&("object"==typeof r||"function"==typeof r)&&e?ii(e,r):!!t&&t.has(r)},set:function(r,n){ri&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new ri),oi(e,r,n)):ei&&(t||(t=ei()),t.set(r,n))}};return r}:ei)||Xo||function(){var e,t={assert:function(e){if(!t.has(e))throw new Fr("Side channel does not contain "+Lr(e))},delete:function(t){var r=e&&e.next,n=function(e,t){if(e)return Ir(e,t,!0)}(e,t);return n&&r&&r===n&&(e=void 0),!!n},get:function(t){return function(e,t){if(e){var r=Ir(e,t);return r&&r.value}}(e,t)},has:function(t){return function(e,t){return!!e&&!!Ir(e,t)}(e,t)},set:function(t,r){e||(e={next:void 0}),function(e,t,r){var n=Ir(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(e,t,r)}};return t},ui=function(){var e,t={assert:function(e){if(!t.has(e))throw new si("Side channel does not contain "+ci(e))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,r){e||(e=li()),e.set(t,r)}};return t},fi=String.prototype.replace,pi=/%20/g,di="RFC3986",yi={default:di,formatters:{RFC1738:function(e){return fi.call(e,pi,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:di},hi=yi,mi=ui,gi=Object.prototype.hasOwnProperty,bi=Array.isArray,wi=mi(),Ei=function(e,t){return wi.set(e,t),e},vi=function(e){return wi.has(e)},Oi=function(e){return wi.get(e)},Si=function(e,t){wi.set(e,t)},Ri=function(){for(var e=[],t=0;t<256;++t)e[e.length]="%"+((t<16?"0":"")+t.toString(16)).toUpperCase();return e}(),Ai=function(e,t){for(var r=t&&t.plainObjects?{__proto__:null}:{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},_i=1024,ji={arrayToObject:Ai,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t,r,n){if(vi(e)){var o=Oi(e)+1;return e[o]=t,Si(e,o),e}var i=[].concat(e,t);return i.length>r?Ei(Ai(i,{plainObjects:n}),i.length-1):i},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],i=o.obj[o.prop],a=Object.keys(i),s=0;s<a.length;++s){var c=a[s],l=i[c];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(t[t.length]={obj:i,prop:c},r[r.length]=l)}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(bi(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&(n[n.length]=r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,n,o){if(0===e.length)return e;var i=e;if("symbol"==typeof e?i=Symbol.prototype.toString.call(e):"string"!=typeof e&&(i=String(e)),"iso-8859-1"===r)return escape(i).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var a="",s=0;s<i.length;s+=_i){for(var c=i.length>=_i?i.slice(s,s+_i):i,l=[],u=0;u<c.length;++u){var f=c.charCodeAt(u);45===f||46===f||95===f||126===f||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||o===hi.RFC1738&&(40===f||41===f)?l[l.length]=c.charAt(u):f<128?l[l.length]=Ri[f]:f<2048?l[l.length]=Ri[192|f>>6]+Ri[128|63&f]:f<55296||f>=57344?l[l.length]=Ri[224|f>>12]+Ri[128|f>>6&63]+Ri[128|63&f]:(u+=1,f=65536+((1023&f)<<10|1023&c.charCodeAt(u)),l[l.length]=Ri[240|f>>18]+Ri[128|f>>12&63]+Ri[128|f>>6&63]+Ri[128|63&f])}a+=l.join("")}return a},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isOverflow:vi,isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},markOverflow:Ei,maybeMap:function(e,t){if(bi(e)){for(var r=[],n=0;n<e.length;n+=1)r[r.length]=t(e[n]);return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r&&"function"!=typeof r){if(bi(t)){var o=t.length;if(n&&"number"==typeof n.arrayLimit&&o>n.arrayLimit)return Ei(Ai(t.concat(r),n),o);t[o]=r}else{if(!t||"object"!=typeof t)return[t,r];if(vi(t)){var i=Oi(t)+1;t[i]=r,Si(t,i)}else(n&&(n.plainObjects||n.allowPrototypes)||!gi.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t){if(vi(r)){for(var a=Object.keys(r),s=n&&n.plainObjects?{__proto__:null,0:t}:{0:t},c=0;c<a.length;c++){s[parseInt(a[c],10)+1]=r[a[c]]}return Ei(s,Oi(r)+1)}var l=[t].concat(r);return n&&"number"==typeof n.arrayLimit&&l.length>n.arrayLimit?Ei(Ai(l,n),l.length-1):l}var u=t;return bi(t)&&!bi(r)&&(u=Ai(t,n)),bi(t)&&bi(r)?(r.forEach((function(r,o){if(gi.call(t,o)){var i=t[o];i&&"object"==typeof i&&r&&"object"==typeof r?t[o]=e(i,r,n):t[t.length]=r}else t[o]=r})),t):Object.keys(r).reduce((function(t,o){var i=r[o];if(gi.call(t,o)?t[o]=e(t[o],i,n):t[o]=i,vi(r)&&!vi(t)&&Ei(t,Oi(r)),vi(t)){var a=parseInt(o,10);String(a)===o&&a>=0&&a>Oi(t)&&Si(t,a)}return t}),u)}},Ti=ui,Pi=ji,Ni=yi,xi=Object.prototype.hasOwnProperty,Ui={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},Di=Array.isArray,Ci=Array.prototype.push,Li=function(e,t){Ci.apply(e,Di(t)?t:[t])},Fi=Date.prototype.toISOString,Ii=Ni.default,ki={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Pi.encode,encodeValuesOnly:!1,filter:void 0,format:Ii,formatter:Ni.formatters[Ii],indices:!1,serializeDate:function(e){return Fi.call(e)},skipNulls:!1,strictNullHandling:!1},Bi={},Mi=function e(t,r,n,o,i,a,s,c,l,u,f,p,d,y,h,m,g,b){for(var w,E=t,v=b,O=0,S=!1;void 0!==(v=v.get(Bi))&&!S;){var R=v.get(t);if(O+=1,void 0!==R){if(R===O)throw new RangeError("Cyclic object value");S=!0}void 0===v.get(Bi)&&(O=0)}if("function"==typeof u?E=u(r,E):E instanceof Date?E=d(E):"comma"===n&&Di(E)&&(E=Pi.maybeMap(E,(function(e){return e instanceof Date?d(e):e}))),null===E){if(a)return l&&!m?l(r,ki.encoder,g,"key",y):r;E=""}if("string"==typeof(w=E)||"number"==typeof w||"boolean"==typeof w||"symbol"==typeof w||"bigint"==typeof w||Pi.isBuffer(E))return l?[h(m?r:l(r,ki.encoder,g,"key",y))+"="+h(l(E,ki.encoder,g,"value",y))]:[h(r)+"="+h(String(E))];var A,_=[];if(void 0===E)return _;if("comma"===n&&Di(E))m&&l&&(E=Pi.maybeMap(E,l)),A=[{value:E.length>0?E.join(",")||null:void 0}];else if(Di(u))A=u;else{var j=Object.keys(E);A=f?j.sort(f):j}var T=c?String(r).replace(/\./g,"%2E"):String(r),P=o&&Di(E)&&1===E.length?T+"[]":T;if(i&&Di(E)&&0===E.length)return P+"[]";for(var N=0;N<A.length;++N){var x=A[N],U="object"==typeof x&&x&&void 0!==x.value?x.value:E[x];if(!s||null!==U){var D=p&&c?String(x).replace(/\./g,"%2E"):String(x),C=Di(E)?"function"==typeof n?n(P,D):P:P+(p?"."+D:"["+D+"]");b.set(t,O);var L=Ti();L.set(Bi,b),Li(_,e(U,C,n,o,i,a,s,c,"comma"===n&&m&&Di(E)?null:l,u,f,p,d,y,h,m,g,L))}}return _},qi=ji,Wi=Object.prototype.hasOwnProperty,$i=Array.isArray,Hi={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:qi.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},zi=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},Ki=function(e,t,r){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},Vi=function(e,t,r,n){if(e){var o=function(e,t){var r=t.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(t.depth<=0){if(!t.plainObjects&&Wi.call(Object.prototype,r)&&!t.allowPrototypes)return;return[r]}var n=/(\[[^[\]]*])/g,o=/(\[[^[\]]*])/.exec(r),i=o?r.slice(0,o.index):r,a=[];if(i){if(!t.plainObjects&&Wi.call(Object.prototype,i)&&!t.allowPrototypes)return;a[a.length]=i}for(var s=0;null!==(o=n.exec(r))&&s<t.depth;){s+=1;var c=o[1].slice(1,-1);if(!t.plainObjects&&Wi.call(Object.prototype,c)&&!t.allowPrototypes)return;a[a.length]=o[1]}if(o){if(!0===t.strictDepth)throw new RangeError("Input depth exceeded depth option of "+t.depth+" and strictDepth is true");a[a.length]="["+r.slice(o.index)+"]"}return a}(e,r);if(o)return function(e,t,r,n){var o=0;if(e.length>0&&"[]"===e[e.length-1]){var i=e.slice(0,-1).join("");o=Array.isArray(t)&&t[i]?t[i].length:0}for(var a=n?t:Ki(t,r,o),s=e.length-1;s>=0;--s){var c,l=e[s];if("[]"===l&&r.parseArrays)c=qi.isOverflow(a)?a:r.allowEmptyArrays&&(""===a||r.strictNullHandling&&null===a)?[]:qi.combine([],a,r.arrayLimit,r.plainObjects);else{c=r.plainObjects?{__proto__:null}:{};var u="["===l.charAt(0)&&"]"===l.charAt(l.length-1)?l.slice(1,-1):l,f=r.decodeDotInKeys?u.replace(/%2E/g,"."):u,p=parseInt(f,10),d=!isNaN(p)&&l!==f&&String(p)===f&&p>=0&&r.parseArrays;if(r.parseArrays||""!==f)if(d&&p<r.arrayLimit)(c=[])[p]=a;else{if(d&&r.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+r.arrayLimit+" element"+(1===r.arrayLimit?"":"s")+" allowed in an array.");d?(c[p]=a,qi.markOverflow(c,p)):"__proto__"!==f&&(c[f]=a)}else c={0:a}}a=c}return a}(o,t,r,n)}},Gi=function(e,t){var r,n=e,o=function(e){if(!e)return ki;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||ki.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=Ni.default;if(void 0!==e.format){if(!xi.call(Ni.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n,o=Ni.formatters[r],i=ki.filter;if(("function"==typeof e.filter||Di(e.filter))&&(i=e.filter),n=e.arrayFormat in Ui?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":ki.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var a=void 0===e.allowDots?!0===e.encodeDotInKeys||ki.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:ki.addQueryPrefix,allowDots:a,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:ki.allowEmptyArrays,arrayFormat:n,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:ki.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?ki.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:ki.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:ki.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:ki.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:ki.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:ki.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:ki.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:ki.strictNullHandling}}(t);"function"==typeof o.filter?n=(0,o.filter)("",n):Di(o.filter)&&(r=o.filter);var i=[];if("object"!=typeof n||null===n)return"";var a=Ui[o.arrayFormat],s="comma"===a&&o.commaRoundTrip;r||(r=Object.keys(n)),o.sort&&r.sort(o.sort);for(var c=Ti(),l=0;l<r.length;++l){var u=r[l],f=n[u];o.skipNulls&&null===f||Li(i,Mi(f,u,a,s,o.allowEmptyArrays,o.strictNullHandling,o.skipNulls,o.encodeDotInKeys,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,c))}var p=i.join(o.delimiter),d=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?d+="utf8=%26%2310003%3B&":d+="utf8=%E2%9C%93&"),p.length>0?d+p:""},Ji=function(e,t){var r=function(e){if(!e)return Hi;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==e.throwOnLimitExceeded&&"boolean"!=typeof e.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var t=void 0===e.charset?Hi.charset:e.charset,r=void 0===e.duplicates?Hi.duplicates:e.duplicates;if("combine"!==r&&"first"!==r&&"last"!==r)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||Hi.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:Hi.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:Hi.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:Hi.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:Hi.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:Hi.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:Hi.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:Hi.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:Hi.decoder,delimiter:"string"==typeof e.delimiter||qi.isRegExp(e.delimiter)?e.delimiter:Hi.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:Hi.depth,duplicates:r,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:Hi.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:Hi.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:Hi.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:Hi.strictDepth,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:Hi.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof e.throwOnLimitExceeded&&e.throwOnLimitExceeded}}(t);if(""===e||null==e)return r.plainObjects?{__proto__:null}:{};for(var n="string"==typeof e?function(e,t){var r={__proto__:null},n=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;n=n.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var o=t.parameterLimit===1/0?void 0:t.parameterLimit,i=n.split(t.delimiter,t.throwOnLimitExceeded?o+1:o);if(t.throwOnLimitExceeded&&i.length>o)throw new RangeError("Parameter limit exceeded. Only "+o+" parameter"+(1===o?"":"s")+" allowed.");var a,s=-1,c=t.charset;if(t.charsetSentinel)for(a=0;a<i.length;++a)0===i[a].indexOf("utf8=")&&("utf8=%E2%9C%93"===i[a]?c="utf-8":"utf8=%26%2310003%3B"===i[a]&&(c="iso-8859-1"),s=a,a=i.length);for(a=0;a<i.length;++a)if(a!==s){var l,u,f=i[a],p=f.indexOf("]="),d=-1===p?f.indexOf("="):p+1;if(-1===d?(l=t.decoder(f,Hi.decoder,c,"key"),u=t.strictNullHandling?null:""):null!==(l=t.decoder(f.slice(0,d),Hi.decoder,c,"key"))&&(u=qi.maybeMap(Ki(f.slice(d+1),t,$i(r[l])?r[l].length:0),(function(e){return t.decoder(e,Hi.decoder,c,"value")}))),u&&t.interpretNumericEntities&&"iso-8859-1"===c&&(u=zi(String(u))),f.indexOf("[]=")>-1&&(u=$i(u)?[u]:u),t.comma&&$i(u)&&u.length>t.arrayLimit){if(t.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");u=qi.combine([],u,t.arrayLimit,t.plainObjects)}if(null!==l){var y=Wi.call(r,l);y&&"combine"===t.duplicates?r[l]=qi.combine(r[l],u,t.arrayLimit,t.plainObjects):y&&"last"!==t.duplicates||(r[l]=u)}}return r}(e,r):e,o=r.plainObjects?{__proto__:null}:{},i=Object.keys(n),a=0;a<i.length;++a){var s=i[a],c=Vi(s,n[s],r,"string"==typeof e);o=qi.merge(o,c,r)}return!0===r.allowSparse?o:qi.compact(o)},Qi={formats:yi,parse:Ji,stringify:Gi};const Xi=e=>{let t={raw:"",encoded:""};e.and&&(t=(e=>{if(!e)throw new Error("invalid query");const t=[],r=[];return e.forEach((e=>{const{raw:n,encoded:o}=Xi(e);t.push(n),r.push(o)})),{raw:t.join("&"),encoded:r.join("&")}})(e.and),delete e.and);let r={raw:"",encoded:""};e.or&&(r=(e=>{if(!e)throw new Error("invalid query");const t=[];e.forEach((e=>{const{raw:r}=Xi(e);t.push(r)}));const r=new URLSearchParams;return r.set("[or]",`(${t.join(";")})`),{raw:`[or]=(${t.join(";")})`,encoded:r.toString()}})(e.or),delete e.or);const n=Qi.stringify(e,{encode:!1,arrayFormat:"comma"}),o=Qi.stringify(e,{arrayFormat:"comma"});return{raw:[n,r.raw,t.raw].filter((e=>e)).join("&"),encoded:[o,r.encoded,t.encoded].filter((e=>e)).join("&")}},Yi=e=>{if(!pt.isAxiosError(e))throw e;const{config:t,response:r}=e;if(null==r||!r.data)throw e;const{data:n}=r,o={status:n.status,code:n.code,message:n.message};if(t&&(o.request={method:t.method,headers:t.headers},t.url)){const e=new URL(t.url,t.baseURL);o.request.url=e.toString()}const i=new Error;i.name=`${n.status} ${n.code}`;try{i.message=JSON.stringify(o,null,2)}catch{i.message=n.message}throw i},Zi=(e,t)=>{if(!(e=>{if("object"!=typeof e||null===e)return!1;const t=e;return"number"==typeof t.status&&"string"==typeof t.code&&"string"==typeof t.message})(e))throw e;const{status:r,code:n,message:o}=e,i={status:r,code:n,message:o,request:t},a=new Error;a.name=`${r} ${n}`;try{a.message=JSON.stringify(i,null,2)}catch{a.message=o}throw a};e.createClient=e=>{let{spaceUid:t,token:r,apiType:n="cdn",adapter:o,retryOnError:i=!0,retryLimit:a=3,fetch:s}=e;if(!t)throw new Error("spaceUid parameter is required.");if(!r)throw new Error("token parameter is required.");if(!["cdn","api"].includes(n))throw new Error(`apiType parameter should be set to "cdn" or "api". apiType: ${n}`);if(a>10)throw new Error("retryLimit should be a value less than or equal to 10.");const c=new URL(`https://${t}.${n}.newt.so`),l={Authorization:`Bearer ${r}`},u=pt.create({baseURL:c.toString(),headers:l,adapter:o});i&&xt(u,{retries:a,retryCondition:e=>{var t,r;return 429===(null===(t=e.response)||void 0===t?void 0:t.status)||500===(null===(r=e.response)||void 0===r?void 0:r.status)},retryDelay:e=>1e3*e});const f=async e=>{let{appUid:t,modelUid:r,query:n}=e;if(!t)throw new Error("appUid parameter is required.");if(!r)throw new Error("modelUid parameter is required.");const o=new URL(`/v1/${t}/${r}`,c.toString());if(n&&Object.keys(n).length){const{encoded:e}=Xi(n);o.search=e}if(s){const e={method:"get",headers:l,url:o.toString()};try{const t=await s(o.toString(),{headers:l}),r=await t.json();return t.ok?r:Zi(r,e)}catch(t){return Zi(t,e)}}else try{const{data:e}=await u.get(o.pathname+o.search);return e}catch(e){return Yi(e)}};return{getContents:f,getContent:async e=>{let{appUid:t,modelUid:r,contentId:n,query:o}=e;if(!t)throw new Error("appUid parameter is required.");if(!r)throw new Error("modelUid parameter is required.");if(!n)throw new Error("contentId parameter is required.");const i=new URL(`/v1/${t}/${r}/${n}`,c.toString());if(o&&Object.keys(o).length){const{encoded:e}=Xi(o);i.search=e}if(s){const e={method:"get",headers:l,url:i.toString()};try{const t=await s(i.toString(),{headers:l}),r=await t.json();return t.ok?r:Zi(r,e)}catch(t){return Zi(t,e)}}else try{const{data:e}=await u.get(i.pathname+i.search);return e}catch(e){return Yi(e)}},getFirstContent:async e=>{let{appUid:t,modelUid:r,query:n}=e;if(n&&n.limit)throw new Error("query.limit parameter cannot have a value.");const o={...n,limit:1},{items:i}=await f({appUid:t,modelUid:r,query:o});return 0===i.length?null:i[0]},getApp:async e=>{let{appUid:t}=e;if(!t)throw new Error("appUid parameter is required.");const r=new URL(`/v1/space/apps/${t}`,c.toString());if(s){const e={method:"get",headers:l,url:r.toString()};try{const t=await s(r.toString(),{headers:l}),n=await t.json();return t.ok?n:Zi(n,e)}catch(t){return Zi(t,e)}}else try{const{data:e}=await u.get(r.pathname);return e}catch(e){return Yi(e)}}}},Object.defineProperty(e,"__esModule",{value:!0})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "newt-client-js",
3
- "version": "3.3.13",
3
+ "version": "3.3.14",
4
4
  "description": "JavaScript SDK for Newt's API",
5
5
  "main": "./dist/cjs/newtClient.js",
6
6
  "module": "./dist/esm/newtClient.js",