varsnap 1.13.0 → 1.15.0

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,3 +1,3 @@
1
- /*! Varsnap.js v1.13.0 */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.varsnap=t():e.varsnap=t()}(this,()=>(()=>{"use strict";const e={d:(t,n)=>{if(Array.isArray(n))for(var r=0;r<n.length;){var o=n[r++],s=n[r++];e.o(t,o)?0===s&&r++:0===s?Object.defineProperty(t,o,{enumerable:!0,value:n[r++]}):Object.defineProperty(t,o,{enumerable:!0,get:s})}else for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})}};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e.r=e=>{Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};let t={};e.d(t,{default:()=>Ht});var n={};function r(e,t){return function(){return e.apply(t,arguments)}}e.r(n),e.d(n,{hasBrowserEnv:()=>Ae,hasStandardBrowserEnv:()=>Ce,hasStandardBrowserWebWorkerEnv:()=>je,navigator:()=>Pe,origin:()=>Ne});const{toString:o}=Object.prototype,{getPrototypeOf:s}=Object,{iterator:i,toStringTag:a}=Symbol,c=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),u=(e,t)=>{let n=e;const r=[];for(;null!=n&&n!==Object.prototype;){if(-1!==r.indexOf(n))return!1;if(r.push(n),c(n,t))return!0;n=s(n)}return!1},l=(f=Object.create(null),e=>{const t=o.call(e);return f[t]||(f[t]=t.slice(8,-1).toLowerCase())});var f;const d=e=>(e=e.toLowerCase(),t=>l(t)===e),p=e=>t=>typeof t===e,{isArray:h}=Array,g=p("undefined");function m(e){return null!==e&&!g(e)&&null!==e.constructor&&!g(e.constructor)&&w(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const b=d("ArrayBuffer");const y=p("string"),w=p("function"),O=p("number"),E=e=>null!==e&&"object"==typeof e,R=e=>{if(!E(e))return!1;const t=s(e);return!(null!==t&&t!==Object.prototype&&null!==s(t)||u(e,a)||u(e,i))},S=d("Date"),_=d("File"),v=d("Blob"),T=d("FileList");const A="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e.g?e.g:{},P=void 0!==A.FormData?A.FormData:void 0,C=d("URLSearchParams"),[j,N,x,U]=["ReadableStream","Request","Response","Headers"].map(d);function D(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),h(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(m(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let i;for(r=0;r<s;r++)i=o[r],t.call(null,e[i],i,e)}}function L(e,t){if(m(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const F="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:e.g,k=e=>!g(e)&&e!==F;const B=(q="undefined"!=typeof Uint8Array&&s(Uint8Array),e=>q&&e instanceof q);var q;const I=d("HTMLFormElement"),{propertyIsEnumerable:z}=Object.prototype,M=d("RegExp"),H=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};D(n,(n,o)=>{let s;!1!==(s=t(n,o,e))&&(r[o]=s||n)}),Object.defineProperties(e,r)};const J=d("AsyncFunction"),V=(W="function"==typeof setImmediate,$=w(F.postMessage),W?setImmediate:$?(K=`axios@${Math.random()}`,X=[],F.addEventListener("message",({source:e,data:t})=>{e===F&&t===K&&X.length&&X.shift()()},!1),e=>{X.push(e),F.postMessage(K,"*")}):e=>setTimeout(e));var W,$,K,X;const G="undefined"!=typeof queueMicrotask?queueMicrotask.bind(F):"undefined"!=typeof process&&process.nextTick||V,Q=e=>null!=e&&w(e[i]),Z={isArray:h,isArrayBuffer:b,isBuffer:m,isFormData:e=>{if(!e)return!1;if(P&&e instanceof P)return!0;const t=s(e);if(!t||t===Object.prototype)return!1;if(!w(e.append))return!1;const n=l(e);return"formdata"===n||"object"===n&&w(e.toString)&&"[object FormData]"===e.toString()},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&b(e.buffer),t},isString:y,isNumber:O,isBoolean:e=>!0===e||!1===e,isObject:E,isPlainObject:R,isEmptyObject:e=>{if(!E(e)||m(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:j,isRequest:N,isResponse:x,isHeaders:U,isUndefined:g,isDate:S,isFile:_,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:v,isRegExp:M,isFunction:w,isStream:e=>E(e)&&w(e.pipe),isURLSearchParams:C,isTypedArray:B,isFileList:T,forEach:D,merge:function e(...t){const{caseless:n,skipUndefined:r}=k(this)&&this||{},o={},s=(t,s)=>{if("__proto__"===s||"constructor"===s||"prototype"===s)return;const i=n&&"string"==typeof s&&L(o,s)||s,a=c(o,i)?o[i]:void 0;R(a)&&R(t)?o[i]=e(a,t):R(t)?o[i]=e({},t):h(t)?o[i]=t.slice():r&&g(t)||(o[i]=t)};for(let e=0,n=t.length;e<n;e++){const n=t[e];if(!n||m(n))continue;if(D(n,s),"object"!=typeof n||h(n))continue;const r=Object.getOwnPropertySymbols(n);for(let e=0;e<r.length;e++){const t=r[e];z.call(n,t)&&s(n[t],t)}}return o},extend:(e,t,n,{allOwnKeys:o}={})=>(D(t,(t,o)=>{n&&w(t)?Object.defineProperty(e,o,{__proto__:null,value:r(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{__proto__:null,value:t,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,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,a;const c={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],r&&!r(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==n&&s(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:l,kindOfTest:d,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(h(e))return e;let t=e.length;if(!O(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[i]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:I,hasOwnProperty:c,hasOwnProp:c,hasOwnInPrototypeChain:u,getSafeProp:(e,t)=>null!=e&&u(e,t)?e[t]:void 0,reduceDescriptors:H,freezeMethods:e=>{H(e,(t,n)=>{if(w(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];w(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return h(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:L,global:F,isContextDefined:k,isSpecCompliantForm:function(e){return!!(e&&w(e.append)&&"FormData"===e[a]&&e[i])},toJSONObject:e=>{const t=new WeakSet,n=e=>{if(E(e)){if(t.has(e))return;if(m(e))return e;if(!("toJSON"in e)){t.add(e);const r=h(e)?[]:{};return D(e,(e,t)=>{const o=n(e);!g(o)&&(r[t]=o)}),t.delete(e),r}}return e};return n(e)},isAsyncFn:J,isThenable:e=>e&&(E(e)||w(e))&&w(e.then)&&w(e.catch),setImmediate:V,asap:G,isIterable:Q,isSafeIterable:e=>null!=e&&u(e,i)&&Q(e)},Y=Z.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 ee=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),te=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function ne(e,t){return Z.isArray(e)?e.map(e=>ne(e,t)):function(e){let t=0,n=e.length;for(;t<n;){const n=e.charCodeAt(t);if(9!==n&&32!==n)break;t+=1}for(;n>t;){const t=e.charCodeAt(n-1);if(9!==t&&32!==t)break;n-=1}return 0===t&&n===e.length?e:e.slice(t,n)}(String(e).replace(t,""))}function re(e){const t=Object.create(null);return Z.forEach(e.toJSON(),(e,n)=>{t[n]=(e=>ne(e,te))(e)}),t}const oe=Symbol("internals");function se(e){return e&&String(e).trim().toLowerCase()}function ie(e){return!1===e||null==e?e:Z.isArray(e)?e.map(ie):(e=>ne(e,ee))(String(e))}function ae(e,t,n,r,o){return Z.isFunction(r)?r.call(this,t,n):(o&&(t=n),Z.isString(t)?Z.isString(r)?-1!==t.indexOf(r):Z.isRegExp(r)?r.test(t):void 0:void 0)}class ce{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=se(t);if(!o)return;const s=Z.findKey(r,o);(!s||void 0===r[s]||!0===n||void 0===n&&!1!==r[s])&&(r[s||t]=ie(e))}const s=(e,t)=>Z.forEach(e,(e,n)=>o(e,n,t));if(Z.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(Z.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&Y[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(Z.isObject(e)&&Z.isSafeIterable(e)){let n,r,o=Object.create(null);for(const t of e){if(!Z.isArray(t))throw new TypeError("Object iterator must return a key-value pair");r=t[0],Z.hasOwnProp(o,r)?(n=o[r],o[r]=Z.isArray(n)?[...n,t[1]]:[n,t[1]]):o[r]=t[1]}s(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=se(e)){const n=Z.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(Z.isFunction(t))return t.call(this,e,n);if(Z.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=se(e)){const n=Z.findKey(this,e);return!(!n||void 0===this[n]||t&&!ae(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=se(e)){const o=Z.findKey(n,e);!o||t&&!ae(0,n[o],o,t)||(delete n[o],r=!0)}}return Z.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!ae(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return Z.forEach(this,(r,o)=>{const s=Z.findKey(n,o);if(s)return t[s]=ie(r),void delete t[o];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();i!==o&&delete t[o],t[i]=ie(r),n[i]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Z.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Z.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[oe]=this[oe]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=se(e);t[r]||(!function(e,t){const n=Z.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return Z.isArray(e)?e.forEach(r):r(e),this}}ce.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Z.reduceDescriptors(ce.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),Z.freezeMethods(ce);const ue=ce;function le(e,t){const n=new Set(t.map(e=>String(e).toLowerCase())),r=[],o=e=>{if(null===e||"object"!=typeof e)return e;if(Z.isBuffer(e))return e;if(-1!==r.indexOf(e))return;let t;if(e instanceof ue&&(e=e.toJSON()),r.push(e),Z.isArray(e))t=[],e.forEach((e,n)=>{const r=o(e);Z.isUndefined(r)||(t[n]=r)});else{if(!Z.isPlainObject(e)&&function(e){if(Z.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(Z.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}(e))return r.pop(),e;t=Object.create(null);for(const[r,s]of Object.entries(e)){const e=n.has(r.toLowerCase())?"[REDACTED ****]":o(s);Z.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return o(e)}class fe extends Error{static from(e,t,n,r,o,s){const i=new fe(e.message,t||e.code,n,r,o);return Object.defineProperty(i,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),i.name=e.name,null!=e.status&&null==i.status&&(i.status=e.status),s&&Object.assign(i,s),i}constructor(e,t,n,r,o){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status)}toJSON(){const e=this.config,t=e&&Z.hasOwnProp(e,"redact")?e.redact:void 0,n=Z.isArray(t)&&t.length>0?le(e,t):Z.toJSONObject(e);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:n,code:this.code,status:this.status}}}fe.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",fe.ERR_BAD_OPTION="ERR_BAD_OPTION",fe.ECONNABORTED="ECONNABORTED",fe.ETIMEDOUT="ETIMEDOUT",fe.ECONNREFUSED="ECONNREFUSED",fe.ERR_NETWORK="ERR_NETWORK",fe.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",fe.ERR_DEPRECATED="ERR_DEPRECATED",fe.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",fe.ERR_BAD_REQUEST="ERR_BAD_REQUEST",fe.ERR_CANCELED="ERR_CANCELED",fe.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",fe.ERR_INVALID_URL="ERR_INVALID_URL",fe.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const de=fe;function pe(e){return Z.isPlainObject(e)||Z.isArray(e)}function he(e){return Z.endsWith(e,"[]")?e.slice(0,-2):e}function ge(e,t,n){return e?e.concat(t).map(function(e,t){return e=he(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const me=Z.toFlatObject(Z,{},null,function(e){return/^is[A-Z]/.test(e)});const be=function(e,t,n){if(!Z.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=Z.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Z.isUndefined(t[e])})).metaTokens,o=n.visitor||p,s=n.dots,i=n.indexes,a=n.Blob||"undefined"!=typeof Blob&&Blob,c=void 0===n.maxDepth?100:n.maxDepth,u=a&&Z.isSpecCompliantForm(t),l=[];if(!Z.isFunction(o))throw new TypeError("visitor must be a function");function f(e){if(null===e)return"";if(Z.isDate(e))return e.toISOString();if(Z.isBoolean(e))return e.toString();if(!u&&Z.isBlob(e))throw new de("Blob is not supported. Use a Buffer instead.");if(Z.isArrayBuffer(e)||Z.isTypedArray(e)){if(u&&"function"==typeof a)return new a([e]);if("undefined"!=typeof Buffer)return Buffer.from(e);throw new de("Blob is not supported. Use a Buffer instead.",de.ERR_NOT_SUPPORT)}return e}function d(e){if(e>c)throw new de("Object is too deeply nested ("+e+" levels). Max depth: "+c,de.ERR_FORM_DATA_DEPTH_EXCEEDED)}function p(e,n,o){let a=e;if(Z.isReactNative(t)&&Z.isReactNativeBlob(e))return t.append(ge(o,n,s),f(e)),!1;if(e&&!o&&"object"==typeof e)if(Z.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=function(e,t){if(c===1/0)return JSON.stringify(e);const n=[];return JSON.stringify(e,function(e,r){if(!Z.isObject(r))return r;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(r),d(t+n.length-1),r})}(e,1);else if(Z.isArray(e)&&function(e){return Z.isArray(e)&&!e.some(pe)}(e)||(Z.isFileList(e)||Z.endsWith(n,"[]"))&&(a=Z.toArray(e)))return n=he(n),a.forEach(function(e,r){!Z.isUndefined(e)&&null!==e&&t.append(!0===i?ge([n],r,s):null===i?n:n+"[]",f(e))}),!1;return!!pe(e)||(t.append(ge(o,n,s),f(e)),!1)}const h=Object.assign(me,{defaultVisitor:p,convertValue:f,isVisitable:pe});if(!Z.isObject(e))throw new TypeError("data must be an object");return function e(n,r,s=0){if(!Z.isUndefined(n)){if(d(s),-1!==l.indexOf(n))throw new Error("Circular reference detected in "+r.join("."));l.push(n),Z.forEach(n,function(n,i){!0===(!(Z.isUndefined(n)||null===n)&&o.call(t,n,Z.isString(i)?i.trim():i,r,h))&&e(n,r?r.concat(i):[i],s+1)}),l.pop()}}(e),t};function ye(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function we(e,t){this._pairs=[],e&&be(e,this,t)}const Oe=we.prototype;Oe.append=function(e,t){this._pairs.push([e,t])},Oe.toString=function(e){const t=e?t=>e.call(this,t,ye):ye;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};const Ee=we;function Re(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Se(e,t,n){if(!t)return e;e=e||"";const r=Z.isFunction(n)?{serialize:n}:n,o=Z.getSafeProp(r,"encode")||Re,s=Z.getSafeProp(r,"serialize");let i;if(i=s?s(t,r):Z.isURLSearchParams(t)?t.toString():new Ee(t,r).toString(o),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const _e=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Z.forEach(this.handlers,function(t){null!==t&&e(t)})}},ve={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Te={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Ee,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Ae="undefined"!=typeof window&&"undefined"!=typeof document,Pe="object"==typeof navigator&&navigator||void 0,Ce=Ae&&(!Pe||["ReactNative","NativeScript","NS"].indexOf(Pe.product)<0),je="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Ne=Ae&&window.location.href||"http://localhost",xe={...n,...Te};function Ue(e){if(e>100)throw new de("FormData field is too deeply nested ("+e+" levels). Max depth: 100",de.ERR_FORM_DATA_DEPTH_EXCEEDED)}const De=function(e){function t(e,n,r,o){Ue(o);let s=e[o++];if("__proto__"===s)return!0;const i=Number.isFinite(+s),a=o>=e.length;if(s=!s&&Z.isArray(r)?r.length:s,a)return Z.hasOwnProp(r,s)?r[s]=Z.isArray(r[s])?r[s].concat(n):[r[s],n]:r[s]=n,!i;Z.hasOwnProp(r,s)&&Z.isObject(r[s])||(r[s]=[]);return t(e,n,r[s],o)&&Z.isArray(r[s])&&(r[s]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}(r[s])),!i}if(Z.isFormData(e)&&Z.isFunction(e.entries)){const n={};return Z.forEachEntry(e,(e,r)=>{t(function(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;null!==(r=n.exec(e));)Ue(t.length),t.push("[]"===r[0]?"":r[1]||r[0]);return t}(e),r,n,0)}),n}return null},Le=(e,t)=>null!=e&&Z.hasOwnProp(e,t)?e[t]:void 0;const Fe={transitional:ve,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=Z.isObject(e);o&&Z.isHTMLForm(e)&&(e=new FormData(e));if(Z.isFormData(e))return r?JSON.stringify(De(e)):e;if(Z.isArrayBuffer(e)||Z.isBuffer(e)||Z.isStream(e)||Z.isFile(e)||Z.isBlob(e)||Z.isReadableStream(e))return e;if(Z.isArrayBufferView(e))return e.buffer;if(Z.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){const t=Le(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return be(e,new xe.classes.URLSearchParams,{visitor:function(e,t,n,r){return xe.isNode&&Z.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,t).toString();if((s=Z.isFileList(e))||n.indexOf("multipart/form-data")>-1){const n=Le(this,"env"),r=n&&n.FormData;return be(s?{"files[]":e}:e,r&&new r,t)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(Z.isString(e))try{return(t||JSON.parse)(e),Z.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=Le(this,"transitional")||Fe.transitional,n=t&&t.forcedJSONParsing,r=Le(this,"responseType"),o="json"===r;if(Z.isResponse(e)||Z.isReadableStream(e))return e;if(e&&Z.isString(e)&&(n&&!r||o)){const n=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e,Le(this,"parseReviver"))}catch(e){if(n){if("SyntaxError"===e.name)throw de.from(e,de.ERR_BAD_RESPONSE,this,null,Le(this,"response"));throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xe.classes.FormData,Blob:xe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Z.forEach(["delete","get","head","post","put","patch","query"],e=>{Fe.headers[e]={}});const ke=Fe;function Be(e,t){const n=this||ke,r=t||n,o=ue.from(r.headers);let s=r.data;return Z.forEach(e,function(e){s=e.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function qe(e){return!(!e||!e.__CANCEL__)}const Ie=class extends de{constructor(e,t,n){super(e??"canceled",de.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function ze(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new de("Request failed with status code "+n.status,n.status>=400&&n.status<500?de.ERR_BAD_REQUEST:de.ERR_BAD_RESPONSE,n.config,n.request,n)):e(n)}const Me=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,s=0,i=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=r[i];o||(o=c),n[s]=a,r[s]=c;let l=i,f=0;for(;l!==s;)f+=n[l++],l%=e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),c-o<t)return;const d=u&&c-u;return d?Math.round(1e3*f/d):void 0}};const He=function(e,t){let n,r,o=0,s=1e3/t;const i=(t,s=Date.now())=>{o=s,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=s?i(e,t):(n=e,r||(r=setTimeout(()=>{r=null,i(n)},s-a)))},()=>n&&i(n)]},Je=(e,t,n=3)=>{let r=0;const o=Me(50,250);return He(n=>{if(!n||"number"!=typeof n.loaded)return;const s=n.loaded,i=n.lengthComputable?n.total:void 0,a=null!=i?Math.min(s,i):s,c=Math.max(0,a-r),u=o(c);r=Math.max(r,a);e({loaded:a,total:i,progress:i?a/i:void 0,bytes:c,rate:u||void 0,estimated:u&&i?(i-a)/u:void 0,event:n,lengthComputable:null!=i,[t?"download":"upload"]:!0})},n)},Ve=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},We=e=>(...t)=>Z.asap(()=>e(...t)),$e=xe.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,xe.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(xe.origin),xe.navigator&&/(msie|trident)/i.test(xe.navigator.userAgent)):()=>!0,Ke=xe.hasStandardBrowserEnv?{write(e,t,n,r,o,s,i){if("undefined"==typeof document)return;const a=[`${e}=${encodeURIComponent(t)}`];Z.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),Z.isString(r)&&a.push(`path=${r}`),Z.isString(o)&&a.push(`domain=${o}`),!0===s&&a.push("secure"),Z.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),o=r.indexOf("=");if(-1!==o&&r.slice(0,o)===e)try{return decodeURIComponent(r.slice(o+1))}catch(e){return r.slice(o+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};const Xe=/^https?:(?!\/\/)/i,Ge=/[\t\n\r]/g;function Qe(e,t){if("string"==typeof e&&Xe.test(function(e){return function(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}(e).replace(Ge,"")}(e)))throw new de('Invalid URL: missing "//" after protocol',de.ERR_INVALID_URL,t)}function Ze(e,t,n,r){Qe(t,r);let o=!("string"==typeof(s=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s));var s;return e&&(o||!1===n)?(Qe(e,r),function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t)):t}const Ye=e=>e instanceof ue?{...e}:e;function et(e,t){e=e||{},t=t||{};const n=Object.create(null);function r(e,t,n,r){return Z.isPlainObject(e)&&Z.isPlainObject(t)?Z.merge.call({caseless:r},e,t):Z.isPlainObject(t)?Z.merge({},t):Z.isArray(t)?t.slice():t}function o(e,t,n,o){return Z.isUndefined(t)?Z.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function s(e,t){if(!Z.isUndefined(t))return r(void 0,t)}function i(e,t){return Z.isUndefined(t)?Z.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,s){return Z.hasOwnProp(t,s)?r(n,o):Z.hasOwnProp(e,s)?r(void 0,n):void 0}Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});const c={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,allowedSocketPaths:i,responseEncoding:i,validateStatus:a,headers:(e,t,n)=>o(Ye(e),Ye(t),0,!0)};return Z.forEach(Object.keys({...e,...t}),function(r){if("__proto__"===r||"constructor"===r||"prototype"===r)return;const s=Z.hasOwnProp(c,r)?c[r]:o,i=s(Z.hasOwnProp(e,r)?e[r]:void 0,Z.hasOwnProp(t,r)?t[r]:void 0,r);Z.isUndefined(i)&&s!==a||(n[r]=i)}),Z.hasOwnProp(t,"validateStatus")&&Z.isUndefined(t.validateStatus)&&!1===function(n){const r=Z.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!Z.isUndefined(r)){if(!Z.isPlainObject(r))return;if(Z.hasOwnProp(r,n))return r[n]}const o=Z.hasOwnProp(e,"transitional")?e.transitional:void 0;if(Z.isPlainObject(o)&&Z.hasOwnProp(o,n))return o[n]}("validateStatusUndefinedResolves")&&(Z.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const tt=["content-type","content-length"];const nt=function(e){const t=et({},e),n=e=>Z.hasOwnProp(t,e)?t[e]:void 0,r=n("data");let o=n("withXSRFToken");const s=n("xsrfHeaderName"),i=n("xsrfCookieName");let a=n("headers");const c=n("auth"),u=n("baseURL"),l=n("allowAbsoluteUrls"),f=n("url");if(t.headers=a=ue.from(a),t.url=Se(Ze(u,f,l,t),n("params"),n("paramsSerializer")),c){const t=Z.getSafeProp(c,"username")||"",n=Z.getSafeProp(c,"password")||"";try{a.set("Authorization","Basic "+btoa(t+":"+(n?encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))):"")))}catch(t){throw de.from(t,de.ERR_BAD_OPTION_VALUE,e)}}if(Z.isFormData(r)&&(xe.hasStandardBrowserEnv||xe.hasStandardBrowserWebWorkerEnv||Z.isReactNative(r)?a.setContentType(void 0):Z.isFunction(r.getHeaders)&&function(e,t,n){"content-only"===n?Object.entries(t||{}).forEach(([t,n])=>{tt.includes(t.toLowerCase())&&e.set(t,n)}):e.set(t)}(a,r.getHeaders(),n("formDataHeaderPolicy"))),xe.hasStandardBrowserEnv){Z.isFunction(o)&&(o=o(t));if(!0===o||null==o&&$e(t.url)){const e=s&&i&&Ke.read(i);e&&a.set(s,e)}}return t},rt="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=nt(e);let o=r.data;const s=ue.from(r.headers).normalize();let i,a,c,u,l,{responseType:f,onUploadProgress:d,onDownloadProgress:p}=r;function h(){u&&u(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(i),r.signal&&r.signal.removeEventListener("abort",i)}let g=new XMLHttpRequest;function m(){if(!g)return;const r=ue.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());ze(function(e){t(e),h()},function(e){n(e),h()},{data:f&&"text"!==f&&"json"!==f?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:e,request:g}),g=null}g.open(r.method.toUpperCase(),r.url,!0),g.timeout=r.timeout,"onloadend"in g?g.onloadend=m:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&g.responseURL.startsWith("file:"))&&setTimeout(m)},g.onabort=function(){g&&(n(new de("Request aborted",de.ECONNABORTED,e,g)),h(),g=null)},g.onerror=function(t){const r=t&&t.message?t.message:"Network Error",o=new de(r,de.ERR_NETWORK,e,g);o.event=t||null,n(o),h(),g=null},g.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||ve;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new de(t,o.clarifyTimeoutError?de.ETIMEDOUT:de.ECONNABORTED,e,g)),h(),g=null},void 0===o&&s.setContentType(null),"setRequestHeader"in g&&Z.forEach(re(s),function(e,t){g.setRequestHeader(t,e)}),Z.isUndefined(r.withCredentials)||(g.withCredentials=!!r.withCredentials),f&&"json"!==f&&(g.responseType=r.responseType),p&&([c,l]=Je(p,!0),g.addEventListener("progress",c)),d&&g.upload&&([a,u]=Je(d),g.upload.addEventListener("progress",a),g.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(i=t=>{g&&(n(!t||t.type?new Ie(null,e,g):t),g.abort(),h(),g=null)},r.cancelToken&&r.cancelToken.subscribe(i),r.signal&&(r.signal.aborted?i():r.signal.addEventListener("abort",i)));const b=function(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}(r.url);if(b&&!xe.protocols.includes(b))return n(new de("Unsupported protocol "+b+":",de.ERR_BAD_REQUEST,e)),void h();g.send(o||null)})},ot=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const o=function(e){if(!r){r=!0,i();const t=e instanceof Error?e:this.reason;n.abort(t instanceof de?t:new Ie(t instanceof Error?t.message:t))}};let s=t&&setTimeout(()=>{s=null,o(new de(`timeout of ${t}ms exceeded`,de.ETIMEDOUT))},t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o,{once:!0}));const{signal:a}=n;return a.unsubscribe=()=>Z.asap(i),a},st=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},it=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},at=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of it(e))yield*st(n,t)}(e,t);let s,i=0,a=e=>{s||(s=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return a(),void e.close();let s=r.byteLength;if(n){let e=i+=s;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},ct=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,ut=(e,t,n)=>t+2<n&&ct(e.charCodeAt(t+1))&&ct(e.charCodeAt(t+2));const{isFunction:lt}=Z,ft=e=>{if(!Z.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},dt=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},pt=e=>{const t=void 0!==Z.global&&null!==Z.global?Z.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=Z.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:s,Response:i}=e,a=o?lt(o):"function"==typeof fetch,c=lt(s),u=lt(i);if(!a)return!1;const l=a&&lt(n),f=a&&("function"==typeof r?(d=new r,e=>d.encode(e)):async e=>new Uint8Array(await new s(e).arrayBuffer()));var d;const p=c&&l&&dt(()=>{let e=!1;const t=new s(xe.origin,{body:new n,method:"POST",get duplex(){return e=!0,"half"}}),r=t.headers.has("Content-Type");return null!=t.body&&t.body.cancel(),e&&!r}),h=u&&l&&dt(()=>Z.isReadableStream(new i("").body)),g={stream:h&&(e=>e.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!g[e]&&(g[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new de(`Response type '${e}' is not supported`,de.ERR_NOT_SUPPORT,n)})});const m=async e=>{if(null==e)return 0;if(Z.isBlob(e))return e.size;if(Z.isSpecCompliantForm(e)){const t=new s(xe.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Z.isArrayBufferView(e)||Z.isArrayBuffer(e)?e.byteLength:(Z.isURLSearchParams(e)&&(e+=""),Z.isString(e)?(await f(e)).byteLength:void 0)};return async e=>{let{url:t,method:n,data:a,signal:u,cancelToken:f,timeout:d,onDownloadProgress:b,onUploadProgress:y,responseType:w,headers:O,withCredentials:E="same-origin",fetchOptions:R,maxContentLength:S,maxBodyLength:_}=nt(e);const v=Z.isNumber(S)&&S>-1,T=Z.isNumber(_)&&_>-1;let A=o||fetch;w=w?(w+"").toLowerCase():"text";let P=ot([u,f&&f.toAbortSignal()],d),C=null;const j=P&&P.unsubscribe&&(()=>{P.unsubscribe()});let N,x=null;const U=()=>new de("Request body larger than maxBodyLength limit",de.ERR_BAD_REQUEST,e,C);try{let o;const u=(L="auth",Z.hasOwnProp(e,L)?e[L]:void 0);if(u){const e=Z.getSafeProp(u,"username")||"";o={username:e,password:Z.getSafeProp(u,"password")||""}}if((e=>{const t=e.indexOf("://");let n=e;return-1!==t&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")})(t)){const e=new URL(t,xe.origin);if(!o&&(e.username||e.password)){const t=ft(e.username);o={username:t,password:ft(e.password)}}(e.username||e.password)&&(e.username="",e.password="",t=e.href)}if(o&&(O.delete("authorization"),O.set("Authorization","Basic "+btoa((D=(o.username||"")+":"+(o.password||""),encodeURIComponent(D).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))))),v&&"string"==typeof t&&t.startsWith("data:")){const n=function(e){if(!e||"string"!=typeof e)return 0;if(!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let e=r.length;const t=r.length;for(let n=0;n<t;n++)if(37===r.charCodeAt(n)&&n+2<t){const t=r.charCodeAt(n+1),o=r.charCodeAt(n+2);ct(t)&&ct(o)&&(e-=2,n+=2)}let n=0,o=t-1;const s=e=>e>=2&&37===r.charCodeAt(e-2)&&51===r.charCodeAt(e-1)&&(68===r.charCodeAt(e)||100===r.charCodeAt(e));o>=0&&(61===r.charCodeAt(o)?(n++,o--):s(o)&&(n++,o-=3)),1===n&&o>=0&&(61===r.charCodeAt(o)||s(o))&&n++;const i=3*Math.floor(e/4)-(n||0);return i>0?i:0}let o=0;for(let e=0,t=r.length;e<t;e++){const n=r.charCodeAt(e);if(37===n&&ut(r,e,t))o+=1,e+=2;else if(n<128)o+=1;else if(n<2048)o+=2;else if(n>=55296&&n<=56319&&e+1<t){const t=r.charCodeAt(e+1);t>=56320&&t<=57343?(o+=4,e++):o+=3}else o+=3}return o}(t);if(n>S)throw new de("maxContentLength size of "+S+" exceeded",de.ERR_BAD_RESPONSE,e,C)}if(T&&"get"!==n&&"head"!==n){const e=await m(a);if("number"==typeof e&&isFinite(e)&&(N=e,e>_))throw U()}const f=T&&(Z.isReadableStream(a)||Z.isStream(a)),d=(e,t,n)=>at(e,65536,e=>{if(T&&e>_)throw x=U();t&&t(e)},n);if(p&&"get"!==n&&"head"!==n&&(y||f)){if(N=N??await(async(e,t)=>{const n=Z.toFiniteNumber(e.getContentLength());return n??m(t)})(O,a),0!==N||f){let e,n=new s(t,{method:"POST",body:a,duplex:"half"});if(Z.isFormData(a)&&(e=n.headers.get("content-type"))&&O.setContentType(e),n.body){const[e,t]=y&&Ve(N,Je(We(y)))||[];a=d(n.body,e,t)}}}else if(f&&!c&&l&&"get"!==n&&"head"!==n)a=d(a);else if(f&&c&&!p&&"get"!==n&&"head"!==n)throw new de("Stream request bodies are not supported by the current fetch implementation",de.ERR_NOT_SUPPORT,e,C);Z.isString(E)||(E=E?"include":"omit");const F=c&&"credentials"in s.prototype;if(Z.isFormData(a)){const e=O.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&O.delete("content-type")}O.set("User-Agent","axios/1.18.1",!1);const k={...R,signal:P,method:n.toUpperCase(),headers:re(O.normalize()),body:a,duplex:"half",credentials:F?E:void 0};C=c&&new s(t,k);let B=await(c?A(C,R):A(t,k));const q=ue.from(B.headers);if(v){const t=Z.toFiniteNumber(q.getContentLength());if(null!=t&&t>S)throw new de("maxContentLength size of "+S+" exceeded",de.ERR_BAD_RESPONSE,e,C)}const I=h&&("stream"===w||"response"===w);if(h&&B.body&&(b||v||I&&j)){const t={};["status","statusText","headers"].forEach(e=>{t[e]=B[e]});const n=Z.toFiniteNumber(q.getContentLength()),[r,o]=b&&Ve(n,Je(We(b),!0))||[];let s=0;const a=t=>{if(v&&(s=t,s>S))throw new de("maxContentLength size of "+S+" exceeded",de.ERR_BAD_RESPONSE,e,C);r&&r(t)};B=new i(at(B.body,65536,a,()=>{o&&o(),j&&j()}),t)}w=w||"text";let z=await g[Z.findKey(g,w)||"text"](B,e);if(v&&!h&&!I){let t;if(null!=z&&("number"==typeof z.byteLength?t=z.byteLength:"number"==typeof z.size?t=z.size:"string"==typeof z&&(t="function"==typeof r?(new r).encode(z).byteLength:z.length)),"number"==typeof t&&t>S)throw new de("maxContentLength size of "+S+" exceeded",de.ERR_BAD_RESPONSE,e,C)}return!I&&j&&j(),await new Promise((t,n)=>{ze(t,n,{data:z,headers:ue.from(B.headers),status:B.status,statusText:B.statusText,config:e,request:C})})}catch(t){if(j&&j(),P&&P.aborted&&P.reason instanceof de){const n=P.reason;throw n.config=e,C&&(n.request=C),t!==n&&Object.defineProperty(n,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),n}if(x)throw C&&!x.request&&(x.request=C),x;if(t instanceof de)throw C&&!t.request&&(t.request=C),t;if(t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message)){const n=new de("Network Error",de.ERR_NETWORK,e,C,t&&t.response);throw Object.defineProperty(n,"cause",{__proto__:null,value:t.cause||t,writable:!0,enumerable:!1,configurable:!0}),n}throw de.from(t,t&&t.code,e,C,t&&t.response)}var D,L}},ht=new Map,gt=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,s=[r,o,n];let i,a,c=s.length,u=ht;for(;c--;)i=s[c],a=u.get(i),void 0===a&&u.set(i,a=c?new Map:pt(t)),u=a;return a},mt=(gt(),{http:null,xhr:rt,fetch:{get:gt}});Z.forEach(mt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(e){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const bt=e=>`- ${e}`,yt=e=>Z.isFunction(e)||null===e||!1===e;const wt={getAdapter:function(e,t){e=Z.isArray(e)?e:[e];const{length:n}=e;let r,o;const s={};for(let i=0;i<n;i++){let n;if(r=e[i],o=r,!yt(r)&&(o=mt[(n=String(r)).toLowerCase()],void 0===o))throw new de(`Unknown adapter '${n}'`);if(o&&(Z.isFunction(o)||(o=o.get(t))))break;s[n||"#"+i]=o}if(!o){const e=Object.entries(s).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=n?e.length>1?"since :\n"+e.map(bt).join("\n"):" "+bt(e[0]):"as no adapter specified";throw new de("There is no suitable adapter to dispatch the request "+t,de.ERR_NOT_SUPPORT)}return o},adapters:mt};function Ot(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ie(null,e)}function Et(e){Ot(e),e.headers=ue.from(e.headers),e.data=Be.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return wt.getAdapter(e.adapter||ke.adapter,e)(e).then(function(t){Ot(e),e.response=t;try{t.data=Be.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=ue.from(t.headers),t},function(t){if(!qe(t)&&(Ot(e),t&&t.response)){e.response=t.response;try{t.response.data=Be.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=ue.from(t.response.headers)}return Promise.reject(t)})}const Rt={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Rt[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const St={};Rt.transitional=function(e,t,n){function r(e,t){return"[Axios v1.18.1] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,s)=>{if(!1===e)throw new de(r(o," has been removed"+(t?" in "+t:"")),de.ERR_DEPRECATED);return t&&!St[o]&&(St[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,s)}},Rt.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const _t={assertOptions:function(e,t,n){if("object"!=typeof e||null===e)throw new de("options must be an object",de.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],i=Object.prototype.hasOwnProperty.call(t,s)?t[s]:void 0;if(i){const t=e[s],n=void 0===t||i(t,s,e);if(!0!==n)throw new de("option "+s+" must be "+n,de.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new de("Unknown option "+s,de.ERR_BAD_OPTION)}},validators:Rt},vt=_t.validators;class Tt{constructor(e){this.defaults=e||{},this.interceptors={request:new _e,response:new _e}}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 n=(()=>{if(!t.stack)return"";const e=t.stack.indexOf("\n");return-1===e?"":t.stack.slice(e+1)})();try{if(e.stack){if(n){const t=n.indexOf("\n"),r=-1===t?-1:n.indexOf("\n",t+1),o=-1===r?"":n.slice(r+1);String(e.stack).endsWith(o)||(e.stack+="\n"+n)}}else e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=et(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&_t.assertOptions(n,{silentJSONParsing:vt.transitional(vt.boolean),forcedJSONParsing:vt.transitional(vt.boolean),clarifyTimeoutError:vt.transitional(vt.boolean),legacyInterceptorReqResOrdering:vt.transitional(vt.boolean),advertiseZstdAcceptEncoding:vt.transitional(vt.boolean),validateStatusUndefinedResolves:vt.transitional(vt.boolean)},!1),null!=r&&(Z.isFunction(r)?t.paramsSerializer={serialize:r}:_t.assertOptions(r,{encode:vt.function,serialize:vt.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),_t.assertOptions(t,{baseUrl:vt.spelling("baseURL"),withXsrfToken:vt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&Z.merge(o.common,o[t.method]);o&&Z.forEach(["delete","get","head","post","put","patch","query","common"],e=>{delete o[e]}),t.headers=ue.concat(s,o);const i=[];let a=!0;this.interceptors.request.forEach(function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;a=a&&e.synchronous;const n=t.transitional||ve;n&&n.legacyInterceptorReqResOrdering?i.unshift(e.fulfilled,e.rejected):i.push(e.fulfilled,e.rejected)});const c=[];let u;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,f=0;if(!a){const e=[Et.bind(this),void 0];for(e.unshift(...i),e.push(...c),l=e.length,u=Promise.resolve(t);f<l;)u=u.then(e[f++],e[f++]);return u}l=i.length;let d=t;for(;f<l;){const e=i[f++],t=i[f++];try{d=e(d)}catch(e){t.call(this,e);break}}try{u=Et.call(this,d)}catch(e){return Promise.reject(e)}for(f=0,l=c.length;f<l;)u=u.then(c[f++],c[f++]);return u}getUri(e){return Se(Ze((e=et(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls,e),e.params,e.paramsSerializer)}}Z.forEach(["delete","get","head","options"],function(e){Tt.prototype[e]=function(t,n){return this.request(et(n||{},{method:e,url:t,data:n&&Z.hasOwnProp(n,"data")?n.data:void 0}))}}),Z.forEach(["post","put","patch","query"],function(e){function t(t){return function(n,r,o){return this.request(et(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Tt.prototype[e]=t(),"query"!==e&&(Tt.prototype[e+"Form"]=t(!0))});const At=Tt;class Pt{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 n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new Ie(e,r,o),t(n.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 Pt(function(t){e=t}),cancel:e}}}const Ct=Pt;const jt={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(jt).forEach(([e,t])=>{jt[t]=e});const Nt=jt;const xt=function e(t){const n=new At(t),o=r(At.prototype.request,n);return Z.extend(o,At.prototype,n,{allOwnKeys:!0}),Z.extend(o,n,null,{allOwnKeys:!0}),o.create=function(n){return e(et(t,n))},o}(ke);xt.Axios=At,xt.CanceledError=Ie,xt.CancelToken=Ct,xt.isCancel=qe,xt.VERSION="1.18.1",xt.toFormData=be,xt.AxiosError=de,xt.Cancel=xt.CanceledError,xt.all=function(e){return Promise.all(e)},xt.spread=function(e){return function(t){return e.apply(null,t)}},xt.isAxiosError=function(e){return Z.isObject(e)&&!0===e.isAxiosError},xt.mergeConfig=et,xt.AxiosHeaders=ue,xt.formToJSON=e=>De(Z.isHTMLForm(e)?new FormData(e):e),xt.getAdapter=wt.getAdapter,xt.HttpStatusCode=Nt,xt.default=xt;const Ut=xt,Dt="1.13.0",Lt="javascript."+Dt,Ft={varsnap:!0,env:"development",branch:"",producerToken:"",consumerToken:"",logger:console};let kt=[],Bt=[];class qt{static getConfig(e,t){if(!e)return"";let n=e[t];return n?(n=n.toString().toLowerCase(),n):""}static setConfig(e,t,n){return"varsnap"===t&&("string"==typeof n&&(n="true"===n),e[t]=n),"env"!==t&&"producerToken"!==t&&"consumerToken"!==t&&"branch"!==t||(e[t]=n),"logger"===t&&(e[t]=n),e}static getSignature(e,t){let n;return""!==t&&void 0!==t?n=t:(n=e.toString().split("{")[0],n=n.replace(/^\s+|\s+$/g,""),n=n.replace(/,\s+/g,",")),"javascript."+Dt+"."+n}static ajax(e,t){const n={method:"POST",url:e,headers:{"Content-Type":"application/x-www-form-urlencoded"},data:new URLSearchParams(t).toString(),responseType:"json"};qt.isNode()&&n.headers&&(n.headers["User-Agent"]="varsnap.js");return Ut(n).then(e=>e.data).catch(e=>e)}static debug(e,t){e.logger&&e.logger.debug(t)}static log(e,t){e.logger&&e.logger.log(t)}static error(e,t){e.logger&&e.logger.error(t)}static resetProducers(){kt=[]}static resetConsumers(){Bt=[]}static getProducers(){return kt}static getConsumers(){return Bt}static limitString(e){const t=String(e);return t.length<=30?t:t.substring(0,27)+"..."}static isNode(){return"object"==typeof process&&"undefined"==typeof window}}class It{constructor(e,t,n){this.targetFunc=e,this.signature=t,this.config=n}isEnabled(){return!!this.config.varsnap&&("production"===qt.getConfig(this.config,"env")&&!!qt.getConfig(this.config,"producerToken"))}static serialize(e){return"json:"+JSON.stringify(e)}static serialize_formatted(e){return JSON.stringify(e,null,2)}produce(e,t){if(!this.isEnabled()){return new Promise(e=>e(!1))}return qt.debug(this.config,"Sending call to Varsnap"),Promise.resolve(t).then(t=>{const n={producer_token:qt.getConfig(this.config,"producerToken"),signature:this.signature,inputs:It.serialize(e),prod_outputs:It.serialize(t)};return qt.ajax("https://www.varsnap.com/api/snap/produce/",n).then(()=>!0).catch(e=>{if(e.response){if(429===e.response.status)return qt.error(this.config,"Cannot produce to Varsnap; Signature at rate limit"),!0;404===e.response.status?qt.error(this.config,"Cannot produce to Varsnap; check your producer token"):qt.error(this.config,e.response.statusText)}return!1})})}}class zt{constructor(e,t,n){this.targetFunc=e,this.signature=t,this.config=n}isEnabled(){return!!this.config.varsnap&&("development"===qt.getConfig(this.config,"env")&&!!qt.getConfig(this.config,"consumerToken"))}static deserialize(e){if(""!==e)return e.startsWith("json:")?JSON.parse(e.substring(5)):JSON.parse(e)}consume(e){if(!this.isEnabled()){return new Promise(e=>(qt.error(this.config,"Varsnap not enabled for testing"),e(!1)))}const t={consumer_token:qt.getConfig(this.config,"consumerToken"),signature:this.signature};return qt.ajax("https://www.varsnap.com/api/snap/consume/",t).then(n=>{const r=n;if(!r||"ok"!==r.status){return[new Promise(e=>(qt.error(this.config,"Received error from Varsnap: "+r.status),e(!1)))]}0===r.results.length&&qt.log(this.config,"No snaps found for signature: "+t.signature);const o=[];for(const t of r.results){const n=zt.deserialize(t.inputs),r=zt.deserialize(t.prod_outputs);let s;try{s=this.targetFunc(...n)}catch(e){s=e}const i=Promise.resolve(s).then(o=>{const s=It.serialize(r)===It.serialize(o);return this.reportCentral(e,t,r,o,s).then(e=>{this.reportLog(t.id,n,r,o,s,e)}),s});o.push(i)}return o}).then(e=>Promise.all(e).then(e=>e.every(e=>e))).catch(e=>(qt.error(this.config,"Cannot contact Varsnap: "+e),!1))}reportCentral(e,t,n,r,o){const s={trial_group_id:e.trial_group_id,consumer_token:qt.getConfig(this.config,"consumerToken"),snap_id:t.id,test_outputs:It.serialize(r),matches:o.toString(),snap_outputs_formatted:It.serialize_formatted(n),test_outputs_formatted:It.serialize_formatted(r)};return qt.ajax("https://www.varsnap.com/api/trial/produce/",s).then(e=>{const t=e;if(!t||"ok"!==t.status)return!1;return t.trial_url}).catch(e=>(qt.error(this.config,"Cannot upload test results to Varsnap: "+e),!1))}reportLog(e,t,n,r,o,s){if(o)return;qt.log(this.config,""),qt.log(this.config,"Testing with Varsnap uuid: "+e),qt.log(this.config,"Signature: "+this.signature),qt.log(this.config,"Function input args: "+qt.limitString(t)),qt.log(this.config,"Production function outputs: "+qt.limitString(n)),qt.log(this.config,"Your function outputs: "+qt.limitString(r)),qt.log(this.config,"Matching outputs: "+o);let i="Cannot upload trial";s&&(i=String(s)),qt.log(this.config,"Trial URL: "+i)}reportTrialGroup(e){qt.log(this.config,"Trial Group: "+e.trial_group_url)}}function Mt(e,t){void 0===t&&(t="");const n=qt.getSignature(e,t),r=new It(e,n,Mt._config),o=new zt(e,n,Mt._config),s=function(...t){let n;try{n=e(...t)}catch(e){throw r.produce(t,e),e}return r.produce(t,n),n};return s.producer=r,s.consumer=o,s.signature=n,kt.push(r),Bt.push(o),s}Mt._config=Ft,Mt.updateConfig=function(e){let t=Mt._config;for(const n of Object.keys(Mt._config))Object.prototype.hasOwnProperty.call(e,n)&&(t=qt.setConfig(t,n,e[n]));Mt._config=t},Mt.reset=function(){qt.resetConsumers(),qt.resetProducers()},Mt.version=Dt,Mt.runTests=function(){const e=qt.getConsumers();return 0===e.length?Promise.resolve(!0):function(e){const t={branch:qt.getConfig(e,"branch"),consumer_token:qt.getConfig(e,"consumerToken"),client:Lt};return qt.ajax("https://www.varsnap.com/api/trial_group/",t).then(e=>e).catch(t=>{let n;return n=t&&t.response&&t.response.data?t.response.data.error:t.toString(),qt.error(e,"Cannot generate a new Trial Group: "+n),{status:"not ok",project_id:"",trial_group_id:"",trial_group_url:""}})}(e[0].config).then(t=>{const n=[];for(const r of e){const e=r.consume(t);n.push(e)}return e.length>0&&e[0].reportTrialGroup(t),Promise.all(n)}).then(e=>e.every(e=>e))};const Ht=Mt;return t=t.default,t})());
1
+ /*! Varsnap.js v1.15.0 */
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.varsnap=t():e.varsnap=t()}(this,()=>(()=>{"use strict";const e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})}};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e.r=e=>{Object.defineProperties(e,{[Symbol.toStringTag]:{value:"Module"},__esModule:{value:!0}})};let t={};e.d(t,{default:()=>Dn});var n={};function r(e,t){return function(){return e.apply(t,arguments)}}e.r(n),e.d(n,{hasBrowserEnv:()=>ze,hasStandardBrowserEnv:()=>qe,hasStandardBrowserWebWorkerEnv:()=>Me,navigator:()=>Ie,origin:()=>$e});const{toString:o}=Object.prototype,{getPrototypeOf:s}=Object,{iterator:i,toStringTag:a}=Symbol,c=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),l=e=>"string"==typeof e&&("__proto__"===e||"constructor"===e||"prototype"===e),u=(e,t,n)=>e===Object.prototype||!n&&null===t,f=(e,t)=>{let n=e;const r=[];for(;null!=n;){if(-1!==r.indexOf(n))return!1;r.push(n);const o=s(n);if(u(n,o,n===e))return!1;if(c(n,t))return!0;n=o}return!1},d=(p=Object.create(null),e=>{const t=o.call(e);return p[t]||(p[t]=t.slice(8,-1).toLowerCase())});var p;const h=e=>(e=e.toLowerCase(),t=>d(t)===e),g=e=>t=>typeof t===e,{isArray:m}=Array,b=g("undefined");function y(e){return null!==e&&!b(e)&&null!==e.constructor&&!b(e.constructor)&&E(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const w=h("ArrayBuffer");const O=g("string"),E=g("function"),S=g("number"),R=e=>null!==e&&"object"==typeof e,_=e=>{if(!R(e))return!1;const t=s(e);return(null===t||t===Object.prototype||null===s(t))&&(u(e,t,!0)||!c(e,a)&&!c(e,i))},v=h("Date"),P=h("File"),A=h("Blob"),T=h("FileList"),j=h("Set");const C="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e.g?e.g:{},N=void 0!==C.FormData?C.FormData:void 0,x=h("URLSearchParams"),[U,D,L,k]=["ReadableStream","Request","Response","Headers"].map(h);function F(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),m(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(y(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let i;for(r=0;r<s;r++)i=o[r],t.call(null,e[i],i,e)}}const B="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:e.g,z=e=>!b(e)&&e!==B;const I=(q="undefined"!=typeof Uint8Array&&s(Uint8Array),e=>q&&e instanceof q);var q;const M=h("HTMLFormElement"),{propertyIsEnumerable:$}=Object.prototype,W=h("RegExp"),V=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};F(n,(n,o)=>{let s;!1!==(s=t(n,o,e))&&(r[o]=s||n)}),Object.defineProperties(e,r)};const H=h("AsyncFunction"),J=(K="function"==typeof setImmediate,X=E(B.postMessage),K?setImmediate:X?(G=`axios@${Math.random()}`,Q=[],B.addEventListener("message",({source:e,data:t})=>{e===B&&t===G&&Q.length&&Q.shift()()},!1),e=>{Q.push(e),B.postMessage(G,"*")}):e=>setTimeout(e));var K,X,G,Q;const Z="undefined"!=typeof queueMicrotask?queueMicrotask.bind(B):"undefined"!=typeof process&&process.nextTick||J,Y=e=>null!=e&&E(e[i]),ee={isArray:m,isArrayBuffer:w,isBuffer:y,isFormData:e=>{if(!e)return!1;if(N&&e instanceof N)return!0;const t=s(e);if(!t||t===Object.prototype)return!1;if(!E(e.append))return!1;const n=d(e);return"formdata"===n||"object"===n&&E(e.toString)&&"[object FormData]"===e.toString()},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&w(e.buffer),t},isString:O,isNumber:S,isBoolean:e=>!0===e||!1===e,isObject:R,isPlainObject:_,isEmptyObject:e=>{if(!R(e)||y(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:U,isRequest:D,isResponse:L,isHeaders:k,isUndefined:b,isDate:v,isFile:P,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:A,isRegExp:W,isFunction:E,isStream:e=>R(e)&&E(e.pipe),isURLSearchParams:x,isTypedArray:I,isFileList:T,forEach:F,merge:function e(...t){const{caseless:n,skipUndefined:r}=z(this)&&this||{},o={},s=n?Object.create(null):null,i=(t,n)=>{if("__proto__"===n||"constructor"===n||"prototype"===n)return;let i=n;if(s&&"string"==typeof n){const e=n.toLowerCase(),t=s[e];void 0!==t&&c(o,t)?i=t:s[e]=n}const a=c(o,i)?o[i]:void 0;_(a)&&_(t)?o[i]=e(a,t):_(t)?o[i]=e({},t):m(t)?o[i]=t.slice():r&&b(t)||(o[i]=t)};for(let e=0,n=t.length;e<n;e++){const n=t[e];if(!n||y(n))continue;if(F(n,i),"object"!=typeof n||m(n)||!Object.getOwnPropertySymbols)continue;const r=Object.getOwnPropertySymbols(n);for(let e=0;e<r.length;e++){const t=r[e];$.call(n,t)&&i(n[t],t)}}return o},extend:(e,t,n,{allOwnKeys:o}={})=>(F(t,(t,o)=>{n&&E(t)?Object.defineProperty(e,o,{__proto__:null,value:r(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{__proto__:null,value:t,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,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,a;const c={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],r&&!r(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==n&&s(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:d,kindOfTest:h,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(m(e))return e;let t=e.length;if(!Number.isSafeInteger(t)||t<0||t>4294967295)return null;const n=new Set,r=new Set;let o=e;for(;null!=o&&n.size<t;){if(r.has(o))return null;r.add(o);const i=s(o);if(u(o,i,o===e))break;Object.getOwnPropertyNames(o).forEach(e=>{const r=+e;Number.isInteger(r)&&r>=0&&r<t&&String(r)===e&&c(o,e)&&n.add(r)}),o=i}if(n.size!==t)return null;const i=new Array(t);for(;t-- >0;)i[t]=e[t];return i},forEachEntry:(e,t)=>{const n=(e&&e[i]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:M,hasOwnProperty:c,hasOwnProp:c,hasOwnInPrototypeChain:f,getSafeProp:(e,t)=>null!=e&&f(e,t)?e[t]:void 0,toSafeFlatObject:e=>{if(null==e||"object"!=typeof e&&"function"!=typeof e)return e;const t=s(e);if(null===t&&(e=>{if(!Object.isExtensible(e))return!1;const t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(t=>{if(l(t))return!1;const n=Object.getOwnPropertyDescriptor(e,t);return!!n&&n.configurable&&!0===n.writable})})(e))return e;const n=Object.create(null),r=Object.create(null),o=[];let i=e;for(;null!=i&&-1===o.indexOf(i);){o.push(i);const a=i===e?t:s(i);if(u(i,a,i===e))break;const f=Object.getOwnPropertyNames(i);Object.getOwnPropertySymbols&&f.push(...Object.getOwnPropertySymbols(i));for(const t of f)l(t)||c(r,t)||(n[t]=e[t],r[t]=!0);i=a}return n},reduceDescriptors:V,freezeMethods:e=>{V(e,(t,n)=>{if(E(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];E(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return m(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:function(e,t){if(y(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null},global:B,isContextDefined:z,isSpecCompliantForm:function(e){return!!(e&&E(e.append)&&"FormData"===e[a]&&e[i])},toJSONObject:e=>{const t=new WeakSet,n=e=>{if(R(e)){if(t.has(e))return;if(y(e))return e;if(!("toJSON"in e)){let r;if(t.add(e),j(e)){r=[];for(const t of e){const e=n(t);!b(e)&&r.push(e)}}else r=m(e)?[]:{},F(e,(e,t)=>{const o=n(e);!b(o)&&(r[t]=o)});return t.delete(e),r}}return e};return n(e)},isAsyncFn:H,isThenable:e=>e&&(R(e)||E(e))&&E(e.then)&&E(e.catch),setImmediate:J,asap:Z,isIterable:Y,isSafeIterable:e=>null!=e&&f(e,i)&&Y(e)},te=ee.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 ne=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),re=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function oe(e,t){return ee.isArray(e)?e.map(e=>oe(e,t)):function(e){let t=0,n=e.length;for(;t<n;){const n=e.charCodeAt(t);if(9!==n&&32!==n)break;t+=1}for(;n>t;){const t=e.charCodeAt(n-1);if(9!==t&&32!==t)break;n-=1}return 0===t&&n===e.length?e:e.slice(t,n)}(String(e).replace(t,""))}function se(e){const t=Object.create(null);return ee.forEach(e.toJSON(),(e,n)=>{t[n]=(e=>oe(e,re))(e)}),t}const ie=Symbol("internals");function ae(e){return e&&String(e).trim().toLowerCase()}function ce(e){return!1===e||null==e?e:ee.isArray(e)?e.map(ce):(e=>oe(e,ne))(String(e))}const le=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function ue(e){let t=0,n=e.length;for(;t<n;){const n=e.charCodeAt(t);if(9!==n&&32!==n)break;t+=1}for(;n>t;){const t=e.charCodeAt(n-1);if(9!==t&&32!==t)break;n-=1}return 0===t&&n===e.length?e:e.slice(t,n)}const fe=e=>"__proto__"===e?"__Proto__":e;function de(e,t,n,r,o){return ee.isFunction(r)?r.call(e,t,n):(o&&(t=n),ee.isString(t)?ee.isString(r)?-1!==t.indexOf(r):ee.isRegExp(r)?r.test(t):void 0:void 0)}class pe{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=ae(t);if(!o)return;const s=ee.findKey(r,o);(!s||void 0===r[s]||!0===n||void 0===n&&!1!==r[s])&&(r[fe(s||t)]=ce(e))}const s=(e,t)=>ee.forEach(e,(e,n)=>o(e,n,t));if(ee.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(ee.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t=Object.create(null);let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim();const s=ee.hasOwnProp(t,n);!n||s&&ee.hasOwnProp(te,n)||("set-cookie"===n?s?t[n].push(r):t[n]=[r]:t[n]=s?t[n]+", "+r:r)}),t})(e),t);else if(ee.isObject(e)&&ee.isSafeIterable(e)){let n,r,o=Object.create(null);for(const t of e){if(!ee.isArray(t))throw new TypeError("Object iterator must return a key-value pair");r=t[0],ee.hasOwnProp(o,r)?(n=o[r],o[r]=ee.isArray(n)?[...n,t[1]]:[n,t[1]]):o[r]=t[1]}s(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=ae(e)){const n=ee.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(ee.isFunction(t))return t.call(this,e,n);if(ee.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ae(e)){const n=ee.findKey(this,e);return!(!n||void 0===this[n]||t&&!de(this,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=ae(e)){const o=ee.findKey(n,e);!o||t&&!de(n,n[o],o,t)||(delete n[o],r=!0)}}return ee.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!de(this,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n=Object.create(null);return ee.forEach(this,(r,o)=>{const s=ee.findKey(n,o);if(s)return t[s]=ce(r),void delete t[o];const i=fe(e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim());i!==o&&delete t[o],t[i]=ce(r),n[i]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return ee.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&ee.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){const e=this.get("set-cookie");return ee.isArray(e)?e:null==e||!1===e?[]:[e]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static parseParameters(e){return function(e){const t=Object.create(null),n=String(e);let r=0,o=!1,s=!1;function i(e){const o=ue(n.slice(r,e)),s=o.indexOf("=");if(s<1)return;const i=ue(o.slice(0,s));if(!le.test(i))return;const a=i.toLowerCase();if("__proto__"===a||"constructor"===a||"prototype"===a)return;const c=ue(o.slice(s+1));t[a]=function(e){const t=e.length-1;if(t<1||34!==e.charCodeAt(0)||34!==e.charCodeAt(t))return e;let n="";for(let r=1;r<t;r++){const o=e.charCodeAt(r);if(34===o)return e;if(92===o&&(r+=1,r>=t))return e;n+=e[r]}return n}(c)}for(let e=0;e<n.length;e++){const t=n.charCodeAt(e);o?s?s=!1:92===t?s=!0:34===t&&(o=!1):34===t?o=!0:44!==t&&59!==t||(i(e),r=e+1)}return i(n.length),t}(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[ie]=this[ie]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=ae(e);t[r]||(!function(e,t){const n=ee.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return ee.isArray(e)?e.forEach(r):r(e),this}}pe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ee.reduceDescriptors(pe.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),ee.freezeMethods(pe);const he=pe,ge="[REDACTED ****]";function me(e,t){const n=new Set(t.map(e=>String(e).toLowerCase())),r=[],o=e=>{if(null===e||"object"!=typeof e)return e;if(ee.isBuffer(e))return e;if(-1!==r.indexOf(e))return;let t;if(e instanceof he&&(e=e.toJSON()),r.push(e),ee.isArray(e))t=[],e.forEach((e,n)=>{const r=o(e);ee.isUndefined(r)||(t[n]=r)});else{if(!ee.isPlainObject(e)&&function(e){if(ee.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(ee.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}(e))return r.pop(),e;t=Object.create(null);for(const[r,s]of Object.entries(e)){const e=n.has(r.toLowerCase())?ge:o(s);ee.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return o(e)}function be(e){try{return String(e)}catch(e){return""}}const ye=Symbol("causeStack");class we extends Error{static from(e,t,n,r,o,s){let i=e.message;!i&&ee.isArray(e.errors)&&e.errors.length&&(i=function(e){return e.errors.map(e=>{try{return e&&e.message?be(e.message):be(e)}catch(e){return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}(e));const a=new we(i,t||e.code,n,r,o);return Object.defineProperty(a,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),a.name=e.name,function(e,t){try{const n=t&&t.stack;if("string"!=typeof n||!n)return;const r=e.stack;if("string"!=typeof r||!r)return;const o="\nCaused by: "+n;e.stack=r+o,Object.defineProperty(e,ye,{__proto__:null,value:o})}catch(e){}}(a,e),null!=e.status&&null==a.status&&(a.status=e.status),s&&Object.assign(a,s),a}constructor(e,t,n,r,o){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status)}toJSON(){const e=this.config,t=e&&ee.hasOwnProp(e,"redact")?e.redact:void 0,n=ee.isArray(t)&&t.length>0?me(e,t):ee.toJSONObject(e);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:n,code:this.code,status:this.status}}}we.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",we.ERR_BAD_OPTION="ERR_BAD_OPTION",we.ECONNABORTED="ECONNABORTED",we.ETIMEDOUT="ETIMEDOUT",we.ECONNREFUSED="ECONNREFUSED",we.ERR_NETWORK="ERR_NETWORK",we.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",we.ERR_DEPRECATED="ERR_DEPRECATED",we.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",we.ERR_BAD_REQUEST="ERR_BAD_REQUEST",we.ERR_CANCELED="ERR_CANCELED",we.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",we.ERR_INVALID_URL="ERR_INVALID_URL",we.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Oe=we;function Ee(e){return ee.isPlainObject(e)||ee.isArray(e)}function Se(e){return ee.endsWith(e,"[]")?e.slice(0,-2):e}function Re(e,t,n){return e?e.concat(t).map(function(e,t){return e=Se(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const _e=ee.toFlatObject(ee,{},null,function(e){return/^is[A-Z]/.test(e)});const ve=function(e,t,n){if(!ee.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(e,t)=>{const r=ee.getSafeProp(n,e);return ee.isUndefined(r)?t:r},o=r("metaTokens",!0),s=r("visitor")||h,i=r("dots",!1),a=r("indexes",!1),c=r("Blob")||"undefined"!=typeof Blob&&Blob,l=r("maxDepth",100),u=c&&ee.isSpecCompliantForm(t),f=[];if(!ee.isFunction(s))throw new TypeError("visitor must be a function");function d(e){if(null===e)return"";if(ee.isDate(e))return e.toISOString();if(ee.isBoolean(e))return e.toString();if(!u&&ee.isBlob(e))throw new Oe("Blob is not supported. Use a Buffer instead.");if(ee.isArrayBuffer(e)||ee.isTypedArray(e)){if(u&&"function"==typeof c)return new c([e]);throw new Oe("Blob is not supported. Use a Buffer instead.",Oe.ERR_NOT_SUPPORT)}return e}function p(e){if(e>l)throw new Oe("Object is too deeply nested ("+e+" levels). Max depth: "+l,Oe.ERR_FORM_DATA_DEPTH_EXCEEDED)}function h(e,n,r){let s=e;if(ee.isReactNative(t)&&ee.isReactNativeBlob(e))return t.append(Re(r,n,i),d(e)),!1;if(e&&!r&&"object"==typeof e)if(ee.endsWith(n,"{}"))n=o?n:n.slice(0,-2),e=function(e,t){if(l===1/0)return JSON.stringify(e);const n=[];return JSON.stringify(e,function(e,r){if(!ee.isObject(r))return r;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(r),p(t+n.length-1),r})}(e,1);else if(ee.isArray(e)&&function(e){return ee.isArray(e)&&!e.some(Ee)}(e)||(ee.isFileList(e)||ee.endsWith(n,"[]"))&&(s=ee.toArray(e)))return n=Se(n),s.forEach(function(e,r){!ee.isUndefined(e)&&null!==e&&t.append(!0===a?Re([n],r,i):null===a?n:n+"[]",d(e))}),!1;return!!Ee(e)||(t.append(Re(r,n,i),d(e)),!1)}const g=Object.assign(_e,{defaultVisitor:h,convertValue:d,isVisitable:Ee});if(!ee.isObject(e))throw new TypeError("data must be an object");return function e(n,r,o=0){if(!ee.isUndefined(n)){if(p(o),-1!==f.indexOf(n))throw new Error("Circular reference detected in "+r.join("."));f.push(n),ee.forEach(n,function(n,i){!0===(!(ee.isUndefined(n)||null===n)&&s.call(t,n,ee.isString(i)?i.trim():i,r,g))&&e(n,r?r.concat(i):[i],o+1)}),f.pop()}}(e),t};function Pe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function Ae(e,t){this._pairs=[],e&&ve(e,this,t)}const Te=Ae.prototype;Te.append=function(e,t){this._pairs.push([e,t])},Te.toString=function(e){const t=e?t=>e.call(this,t,Pe):Pe;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};const je=Ae;function Ce(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ne(e,t,n){if(!t)return e;e=e||"";const r=ee.isFunction(n)?{serialize:n}:n,o=ee.getSafeProp(r,"encode")||Ce,s=ee.getSafeProp(r,"serialize");let i;if(i=s?s(t,r):ee.isURLSearchParams(t)?t.toString():new je(t,r).toString(o),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const xe=Symbol("internals");function Ue(e){return e?e.length:0}function De(e){if(e)for(;e.length&&null===e[e.length-1];)e.pop()}function Le(e,t){const n=e.handlers,r=Ue(n);n!==t.handlersRef?(t.handlersRef=n,t.handlerEntries.clear()):r!==t.handlersLength&&(r?t.handlerEntries.forEach(function(e,r){n[e.index]!==e.handler&&t.handlerEntries.delete(r)}):t.handlerEntries.clear()),t.handlersLength=r}const ke=class{constructor(){this.handlers=[],this[xe]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(e,t,n){const r={fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null},o=this[xe];null==this.handlers&&(this.handlers=[]),Le(this,o);const s=o.nextId++;return this.handlers.push(r),o.handlerEntries.set(s,{handler:r,index:this.handlers.length-1}),o.handlersLength=this.handlers.length,s}eject(e){const t=this[xe];Le(this,t);const n=function(e){return"string"==typeof e&&""!==e&&String(Number(e))===e?Number(e):e}(e),r=t.handlerEntries.get(n);if(r){if(t.handlerEntries.delete(n),this.handlers[r.index]!==r.handler)return;this.handlers[r.index]=null,t.iterationDepth||(De(this.handlers),t.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],Le(this,this[xe]))}forEach(e){const t=this[xe];Le(this,t),t.iterationDepth++;try{ee.forEach(this.handlers,function(t){null!==t&&e(t)})}finally{--t.iterationDepth||(Le(this,t),De(this.handlers),t.handlersLength=Ue(this.handlers))}}},Fe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0,encodeBasicAuthUsername:!1},Be={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:je,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},ze="undefined"!=typeof window&&"undefined"!=typeof document,Ie="object"==typeof navigator&&navigator||void 0,qe=ze&&(!Ie||["ReactNative","NativeScript","NS"].indexOf(Ie.product)<0),Me="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,$e=ze&&window.location.href||"http://localhost",We={...n,...Be};function Ve(e){if(e>100)throw new Oe("FormData field is too deeply nested ("+e+" levels). Max depth: 100",Oe.ERR_FORM_DATA_DEPTH_EXCEEDED)}function He(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}function Je(e){if(!ee.isArray(e))return e;const t=Object.keys(e);return t.length!==e.length||t.some((e,t)=>e!==String(t))?He(e):e}const Ke=function(e){function t(e,n,r,o){Ve(o);let s=e[o++];if("__proto__"===s)return!0;const i=Number.isFinite(+s),a=o>=e.length;if(s=!s&&ee.isArray(r)?r.length:s,a)return ee.hasOwnProp(r,s)?(r[s]=Je(r[s]),r[s]=ee.isArray(r[s])?r[s].concat(n):[r[s],n]):r[s]=n,!i;ee.hasOwnProp(r,s)&&ee.isObject(r[s])||(r[s]=[]);return t(e,n,r[s],o)&&ee.isArray(r[s])&&(r[s]=He(r[s])),!i}if(ee.isFormData(e)&&ee.isFunction(e.entries)){const n={};return ee.forEachEntry(e,(e,r)=>{t(function(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;null!==(r=n.exec(e));)Ve(t.length),t.push("[]"===r[0]?"":r[1]||r[0]);return t}(e),r,n,0)}),function(e){const t=[e];for(;t.length;){const e=t.pop();Object.keys(e).forEach(n=>{const r=e[n]=Je(e[n]);(ee.isArray(r)||ee.isPlainObject(r))&&t.push(r)})}return e}(n)}return null},Xe=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),Ge=(e,t)=>null!=e&&ee.hasOwnProp(e,t)?e[t]:void 0;const Qe={transitional:Fe,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=ee.isObject(e);o&&ee.isHTMLForm(e)&&(e=new FormData(e));if(ee.isFormData(e))return r?JSON.stringify(Ke(e)):e;if(ee.isArrayBuffer(e)||ee.isBuffer(e)||ee.isStream(e)||ee.isFile(e)||ee.isBlob(e)||ee.isReadableStream(e))return e;if(ee.isArrayBufferView(e))return e.buffer;if(ee.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){const t=Ge(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ve(e,new We.classes.URLSearchParams,{visitor:function(e,t,n,r){return We.isNode&&ee.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,t).toString();if((s=ee.isFileList(e))||n.indexOf("multipart/form-data")>-1){const n=Ge(this,"env"),r=n&&n.FormData;return ve(s?{"files[]":e}:e,r&&new r,t)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(ee.isString(e))try{return(t||JSON.parse)(e),ee.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=Ge(this,"transitional")||Qe.transitional,n=t&&t.forcedJSONParsing,r=Ge(this,"responseType"),o="json"===r;if(ee.isResponse(e)||ee.isReadableStream(e))return e;if(e&&ee.isString(e)&&(n&&!r||o)){const n=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e,Ge(this,"parseReviver"))}catch(e){if(n){if("SyntaxError"===e.name)throw Oe.from(e,Oe.ERR_BAD_RESPONSE,this,null,Ge(this,"response"));throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:We.classes.FormData,Blob:We.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ee.forEach(Xe,e=>{Qe.headers[e]={}});const Ze=Qe;function Ye(e,t){const n=this||Ze,r=t||n,o=he.from(r.headers);let s=r.data;return ee.forEach(e,function(e){s=e.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function et(e){return!(!e||!e.__CANCEL__)}const tt=class extends Oe{constructor(e,t,n){super(e??"canceled",Oe.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function nt(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Oe("Request failed with status code "+n.status,n.status>=400&&n.status<500?Oe.ERR_BAD_REQUEST:Oe.ERR_BAD_RESPONSE,n.config,n.request,n)):e(n)}const rt=/[\t\n\r]/g;function ot(e){if("string"!=typeof e)return e;let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t).replace(rt,"")}function st(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1].toLowerCase()||""}const it=e=>{try{return decodeURIComponent(e)}catch(t){return e}},at=We.hasStandardBrowserEnv?{write(e,t,n,r,o,s,i){if("undefined"==typeof document)return;const a=[`${e}=${encodeURIComponent(t)}`];ee.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),ee.isString(r)&&a.push(`path=${r}`),ee.isString(o)&&a.push(`domain=${o}`),!0===s&&a.push("secure"),ee.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie;if(!t)return null;const n=t.split(";");for(let t=0;t<n.length;t++){const r=n[t].replace(/^\s+/,""),o=r.indexOf("=");if(-1!==o&&r.slice(0,o)===e)return it(r.slice(o+1))}return null},async readAsync(e){try{const t="undefined"!=typeof window&&window.cookieStore;if(t&&ee.isFunction(t.get)){const n=await t.get(e);return n?it(n.value):null}}catch(e){}return this.read(e)},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,readAsync:async()=>null,remove(){}};const ct=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,s=0,i=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=r[i];o||(o=c),n[s]=a,r[s]=c;let u=i,f=0;for(;u!==s;)f+=n[u++],u%=e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),c-o<t)return;const d=l&&c-l;return d?Math.round(1e3*f/d):void 0}};const lt=function(e,t){let n,r,o=0,s=1e3/t;const i=(t,s=Date.now())=>{o=s,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=s?i(e,t):(n=e,r||(r=setTimeout(()=>{r=null,i(n)},s-a)))},()=>n&&i(n),(...e)=>i(e)]},ut=(e,t,n=3)=>{let r=0;const o=ct(50,250);return lt(n=>{if(!n||!ee.isNumber(n.loaded))return;const s=n.loaded,i=n.lengthComputable?n.total:void 0,a=Math.max(0,null!=i?Math.min(s,i):s),c=Math.max(0,a-r),l=o(c);r=Math.max(r,a);e({loaded:a,total:i,progress:i?a/i:void 0,bytes:c,rate:l||void 0,estimated:l&&i?(i-a)/l:void 0,event:n,lengthComputable:null!=i,[t?"download":"upload"]:!0})},n)},ft=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},dt=(e,t=ee.asap)=>(...n)=>t(()=>e(...n)),pt=We.hasStandardBrowserEnv?(e=>t=>(t=new URL(t,document.baseURI||We.origin),e.protocol===t.protocol&&e.host===t.host&&e.port===t.port))(new URL(We.origin)):()=>!0;const ht=/^https?:(?!\/\/)/i;function gt(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${ge}@`),n=t.indexOf("#"),r=(-1===n?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${ge}`);return-1===n?r:`${r}#${o=t.slice(n+1),o?o.replace(/(^|&)([^=&]*=)?[^&]+/g,(e,t,n="")=>`${t}${n}${ge}`):o}`;var o}function mt(e,t){if("string"==typeof e){const n=ot(e);if(ht.test(n))throw new Oe(`Invalid URL ${JSON.stringify(gt(n))}: missing "//" after protocol`,Oe.ERR_INVALID_URL,t)}}function bt(e,t,n,r){mt(t,r);let o=!("string"==typeof(s=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s));var s;return e&&(o||!1===n)?(mt(e,r),function(e,t){if(!t)return e;let n=e.length;for(;n>0&&47===e.charCodeAt(n-1);)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}(e,t)):t}const yt=e=>e instanceof he?{...e}:e,wt=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>{const n=Object.getOwnPropertyDescriptor(e,t);return n&&n.enumerable})):Object.keys(e);function Ot(e,t,n,r){return ee.isPlainObject(e)&&ee.isPlainObject(t)?ee.merge.call({caseless:r},e,t):ee.isPlainObject(t)?ee.merge({},t):ee.isArray(t)?t.slice():t}function Et(e,t,n,r){return ee.isUndefined(t)?ee.isUndefined(e)?void 0:Ot(void 0,e,0,r):Ot(e,t,0,r)}function St(e,t){if(!ee.isUndefined(t))return Ot(void 0,t)}function Rt(e,t){return ee.isUndefined(t)?ee.isUndefined(e)?void 0:Ot(void 0,e):Ot(void 0,t)}function _t(e,t,n,r,o){return ee.hasOwnProp(o,n)?Ot(e,t):ee.hasOwnProp(r,n)?Ot(void 0,e):void 0}const vt=Object.freeze({__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0}),Pt={url:St,method:St,data:St,baseURL:Rt,transformRequest:Rt,transformResponse:Rt,params:function(e,t){const n=[],r=new WeakMap,o={};function s(e,t){if(!ee.isPlainObject(t))return ee.isArray(t)?t.slice():t;const s=ee.isPlainObject(e)?e:o;let i=r.get(t);if(i||(i=new WeakMap,r.set(t,i)),i.has(s))return i.get(s);const a={};return i.set(s,a),n.push({base:s,source:t,result:a}),a}const i=ee.isUndefined(t)?s(void 0,e):s(e,t);for(;n.length;){const{base:e,source:t,result:r}=n.pop(),o=new Set(wt(e)),i=new Set(wt(t));new Set([...o,...i]).forEach(n=>{if("__proto__"===n||"constructor"===n||"prototype"===n)return;const a=i.has(n),c=a?t[n]:void 0,l=a&&!ee.isPlainObject(c)||!o.has(n)?void 0:e[n];r[n]=a?s(l,c):s(void 0,l)})}return function(e){const t=[{value:e}],n=new WeakSet,r=new WeakSet;for(;t.length;){const{value:e,done:o}=t.pop();if(!ee.isPlainObject(e)&&!ee.isArray(e))continue;if(o){n.delete(e);continue}if(n.has(e))throw new Oe("Circular reference detected in params",Oe.ERR_BAD_OPTION_VALUE);if(r.has(e))continue;r.add(e),n.add(e),t.push({value:e,done:!0});const s=Object.keys(e);Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor&&Object.getOwnPropertySymbols(e).forEach(t=>{const n=Object.getOwnPropertyDescriptor(e,t);n&&n.enumerable&&s.push(t)}),s.forEach(n=>{if("__proto__"===n||"constructor"===n||"prototype"===n){const r=Object.getOwnPropertyDescriptor(e,n);r&&ee.hasOwnProp(r,"value")&&t.push({value:r.value})}else t.push({value:e[n]})})}}(i),i},paramsSerializer:Rt,timeout:Rt,timeoutErrorMessage:Rt,withCredentials:Rt,withXSRFToken:Rt,adapter:Rt,responseType:Rt,xsrfCookieName:Rt,xsrfHeaderName:Rt,onUploadProgress:Rt,onDownloadProgress:Rt,decompress:Rt,maxContentLength:Rt,maxBodyLength:Rt,beforeRedirect:Rt,transport:Rt,httpAgent:Rt,httpsAgent:Rt,cancelToken:Rt,socketPath:Rt,allowedSocketPaths:Rt,responseEncoding:Rt,validateStatus:_t,headers:function(e,t,n){return Et(yt(e),yt(t),0,!0)}};function At(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",vt);const r=wt({...e,...t});for(let o=0,s=r.length;o<s;o++){const s=r[o];if("__proto__"===s||"constructor"===s||"prototype"===s)continue;const i=ee.hasOwnProp(Pt,s)?Pt[s]:Et,a=ee.hasOwnProp(e,s)?e[s]:void 0,c=ee.hasOwnProp(t,s)?t[s]:void 0,l=i===_t?i(a,c,s,e,t):i(a,c,s);ee.isUndefined(l)&&i!==_t||(n[s]=l)}return ee.hasOwnProp(t,"validateStatus")&&ee.isUndefined(t.validateStatus)&&!1===function(e,t,n){const r=ee.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!ee.isUndefined(r)){if(!ee.isPlainObject(r))return;if(ee.hasOwnProp(r,n))return r[n]}const o=ee.hasOwnProp(e,"transitional")?e.transitional:void 0;if(ee.isPlainObject(o)&&ee.hasOwnProp(o,n))return o[n]}(e,t,"validateStatusUndefinedResolves")&&(ee.hasOwnProp(e,"validateStatus")?n.validateStatus=Ot(void 0,e.validateStatus):delete n.validateStatus),n}const Tt=["content-type","content-length"];const jt=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))),Ct=e=>at.read(e);const Nt=function(e,t=Ct){const n=At({},e),r=e=>ee.hasOwnProp(n,e)?n[e]:void 0,o=r("data");let s=r("withXSRFToken");const i=r("xsrfHeaderName"),a=r("xsrfCookieName");let c=r("headers");const l=r("auth"),u=r("baseURL"),f=r("allowAbsoluteUrls"),d=r("url");if(n.headers=c=he.from(c),n.url=Ne(bt(u,d,f,n),r("params"),r("paramsSerializer")),l){const t=ee.getSafeProp(l,"username")||"",n=ee.getSafeProp(l,"password")||"",o=r("transitional"),s=o&&ee.hasOwnProp(o,"encodeBasicAuthUsername")&&!0===o.encodeBasicAuthUsername;try{c.set("Authorization","Basic "+btoa((s?jt(t):t)+":"+(n?jt(n):"")))}catch(t){throw Oe.from(t,Oe.ERR_BAD_OPTION_VALUE,e)}}if(ee.isFormData(o)){const e=ee.getSafeProp(o,"getHeaders");We.hasStandardBrowserEnv||We.hasStandardBrowserWebWorkerEnv||ee.isReactNative(o)?c.setContentType(void 0):ee.isFunction(e)&&function(e,t,n){"content-only"===n?Object.entries(t||{}).forEach(([t,n])=>{Tt.includes(t.toLowerCase())&&e.set(t,n)}):e.set(t)}(c,e.call(o),r("formDataHeaderPolicy"))}if(We.hasStandardBrowserEnv){ee.isFunction(s)&&(s=s(n));if(!0===s||null==s&&pt(n.url)){const e=i&&a&&t(a);e&&c.set(i,e)}}return n},xt="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){let r,o;try{const e=We.hasStandardBrowserEnv&&"undefined"!=typeof window&&window.cookieStore;r=e&&ee.isFunction(e.get)}catch(e){}const s=Nt(e,r?e=>(o=e,null):void 0);let i=s.data;const a=he.from(s.headers).normalize();let c,l,u,f,d,p,h,{responseType:g,onUploadProgress:m,onDownloadProgress:b}=s;function y(){clearTimeout(l);try{d&&d()}catch(e){setTimeout(()=>{throw e})}try{p&&p()}catch(e){setTimeout(()=>{throw e})}w&&(f&&w.removeEventListener("progress",f),w.upload&&(u&&w.upload.removeEventListener("progress",u),d&&w.upload.removeEventListener("loadend",d))),s.cancelToken&&s.cancelToken.unsubscribe(c),s.signal&&s.signal.removeEventListener("abort",c)}let w=new XMLHttpRequest;function O(r){if(!w)return;if(!(0!==w.status||"file"===(st(ot(s.url))||st(We.origin))||w.responseURL&&w.responseURL.startsWith("file:")))return n(new Oe("Request aborted",Oe.ECONNABORTED,e,w)),y(),void(w=null);try{r?h&&h(r):p&&p()}catch(e){setTimeout(()=>{throw e})}if(!w)return;const o=he.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders());nt(function(e){t(e),y()},function(e){n(e),y()},{data:g&&"text"!==g&&"json"!==g?w.response:w.responseText,status:w.status,statusText:w.statusText,headers:o,config:e,request:w}),w=null}if(w.open(s.method.toUpperCase(),s.url,!0),w.timeout=s.timeout,"onloadend"in w?w.onloadend=O:w.onreadystatechange=function(){w&&4===w.readyState&&(0!==w.status||w.responseURL&&w.responseURL.startsWith("file:"))&&setTimeout(O)},w.onabort=function(){w&&(n(new Oe("Request aborted",Oe.ECONNABORTED,e,w)),y(),w=null)},w.onerror=function(t){const r=t&&t.message?t.message:"Network Error",o=new Oe(r,Oe.ERR_NETWORK,e,w);o.event=t||null,n(o),y(),w=null},w.ontimeout=function(){if(!w)return;let t=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const r=s.transitional||Fe;s.timeoutErrorMessage&&(t=s.timeoutErrorMessage),n(new Oe(t,r.clarifyTimeoutError?Oe.ETIMEDOUT:Oe.ECONNABORTED,e,w)),y(),w=null},void 0===i&&a.setContentType(null),ee.isUndefined(s.withCredentials)||(w.withCredentials=!!s.withCredentials),g&&"json"!==g&&(w.responseType=s.responseType),b&&([f,p,h]=ut(b,!0),w.addEventListener("progress",f)),m&&w.upload&&([u,d]=ut(m),w.upload.addEventListener("progress",u),w.upload.addEventListener("loadend",d)),s.cancelToken||s.signal){if(c=t=>{if(!w)return;n(!t||t.type?new tt(null,e,w):t);const r=w;y(),w=null,r.abort()},s.cancelToken&&s.cancelToken.subscribe(c),!w)return;s.signal&&(s.signal.aborted?c():s.signal.addEventListener("abort",c))}if(!w)return;const E=st(s.url);if(E&&!We.protocols.includes(E))return n(new Oe("Unsupported protocol "+E+":",Oe.ERR_BAD_REQUEST,e)),void y();const S=()=>{w&&("setRequestHeader"in w&&ee.forEach(se(a),function(e,t){w.setRequestHeader(t,e)}),w.send(i||null))};if(o){const t="undefined"!=typeof performance&&ee.isFunction(performance.now)?()=>performance.now():Date.now,r=w.timeout>0?t()+Number(w.timeout):void 0,i=()=>{if(!w)return;const e=w;e.ontimeout(),e.abort()};if(void 0!==r){const e=()=>{const n=r-t();n>0?l=setTimeout(e,Math.min(n,2147483647)):i()};e()}at.readAsync(o).then(e=>{if(w)if(void 0!==r&&t()>=r)i();else{if(e){const t=ee.hasOwnProp(s,"xsrfHeaderName")&&s.xsrfHeaderName;a.set(t,e)}S()}}).catch(t=>{w&&(n(Oe.from(t,null,e,w)),y(),w=null)})}else S()})},Ut=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const o=function(e){if(!r){r=!0,i();const t=e instanceof Error?e:this.reason;n.abort(t instanceof Oe?t:new tt(t instanceof Error?t.message:t))}};let s=t&&setTimeout(()=>{s=null,o(new Oe(`timeout of ${t}ms exceeded`,Oe.ETIMEDOUT))},t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(e=>{const t=ee.getSafeProp(e,"unsubscribe");ee.isFunction(t)?t.call(e,o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>{r||(e.aborted?o.call(e):e.addEventListener("abort",o,{once:!0}))});const{signal:a}=n;return a.unsubscribe=()=>ee.asap(i),a},Dt=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},Lt=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},kt=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of Lt(e))yield*Dt(n,t)}(e,t);let s,i=0,a=e=>{s||(s=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return a(),void e.close();let s=r.byteLength;if(n){let e=i+=s;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},Ft="\r\n",Bt=e=>String(e).replace(/\r\n|\r|\n/g,Ft),zt=e=>String(e).replace(/[\r\n"]/g,e=>"\r"===e?"%0D":"\n"===e?"%0A":"%22"),It=(e,t)=>{let n=0;for(let r=0;r<e.length;r++){const o=e.charCodeAt(r);!t||13!==o&&10!==o?o<128?n++:o<2048?n+=2:o>=55296&&o<=56319&&e.charCodeAt(r+1)>=56320&&e.charCodeAt(r+1)<=57343?(n+=4,r++):n+=3:(13===o&&10===e.charCodeAt(r+1)&&r++,n+=2)}return n};class qt extends TypeError{constructor(e,t){super(e),this.name="FormDataError",this.reason=t}}function Mt(e,t,n,r,o){if(!ee.isFunction(t))throw new Oe("Blob is not supported",Oe.ERR_NOT_SUPPORT);if(void 0===o)if(ee.isFunction(We.generateString))o="axios-"+We.generateString(36,"0123456789abcdef");else{const e=ee.global.crypto;if(!e||!ee.isFunction(e.getRandomValues))throw new Oe("Random byte generation is not supported",Oe.ERR_NOT_SUPPORT);const t=new Uint8Array(18);e.getRandomValues(t),o="axios-"+Array.from(t,e=>("0"+e.toString(16)).slice(-2)).join("")}try{return function(e,t,n,r,o){if(!ee.isFunction(t))throw new qt("Blob is not supported","blob");if(!ee.isString(o)||!/^[A-Za-z0-9'()+_,./:=? -]{1,70}$/.test(o)||/ $/.test(o))throw new qt("Invalid multipart boundary","boundary");const s="--"+o+"--"+Ft;let i=s.length;const a=[],c=e=>{if(i+e>n)throw r()};c(0);for(const[t,n]of e){const e=ee.isString(n),r=e?It(n,!0):n.size;if(!Number.isFinite(r)||r<0)throw new qt("Unsupported FormData part size","part");c(r+It(t,!0)+(!e&&n.name?It(n.name,!1):0)+(!e&&n.type?It(n.type,!1):0));let s="--"+o+'\r\nContent-Disposition: form-data; name="'+zt(Bt(t))+'"';e||(s+='; filename="'+zt(ee.isString(n.name)?n.name:"blob")+'"\r\nContent-Type: '+String(n.type||"application/octet-stream").replace(/[\r\n]/g,"")),s+=Ft+Ft;const l=It(s,!1)+r+2;c(l),i+=l,a.push({header:s,value:n,isString:e})}const l=[];for(const e of a)l.push(e.header,e.isString?Bt(e.value):e.value,Ft);return l.push(s),new t(l,{type:"multipart/form-data; boundary="+o})}(e,t,n,r,o)}catch(e){if(e instanceof qt){const t="boundary"===e.reason?Oe.ERR_BAD_OPTION_VALUE:Oe.ERR_BAD_REQUEST;throw new Oe(e.message,t)}throw e}}const $t=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Wt=(e,t,n)=>t+2<n&&$t(e.charCodeAt(t+1))&&$t(e.charCodeAt(t+2)),Vt=e=>e<=57?e-48:(223&e)-55,Ht=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||43===e||47===e||45===e||95===e,Jt=e=>9===e||10===e||12===e||13===e||32===e,Kt=e=>{const t=e.length;let n=0;return t>0&&61===e.charCodeAt(t-1)&&(n++,t>1&&61===e.charCodeAt(t-2)&&n++),Math.floor(3*(t-n)/4)},Xt=e=>{const t=e.length;let n=0,r=0,o=!1;for(let s=0;s<t;s++){let i=e.charCodeAt(s);37===i&&Wt(e,s,t)&&(i=16*Vt(e.charCodeAt(s+1))+Vt(e.charCodeAt(s+2)),s+=2),Jt(i)||(61!==i?!Ht(i)||r>0?o=!0:n++:r++)}return o||r>2||r>0&&(n+r)%4!=0||n%4==1?Kt(e):(e=>{const t=e%4;return 3*Math.floor(e/4)+(2===t?1:3===t?2:0)})(n)},Gt=(e,t,n)=>{if(!e||"string"!=typeof e)return 0;if(!/^data:/i.test(e))return 0;const r=e.indexOf(",");if(r<0)return 0;const o=e.slice(5,r),s=e.slice(r+1);if(n.test(o))return t(s);let i=0;for(let e=0,t=s.length;e<t;e++){const n=s.charCodeAt(e);if(37===n&&Wt(s,e,t))i+=1,e+=2;else if(n<128)i+=1;else if(n<2048)i+=2;else if(n>=55296&&n<=56319&&e+1<t){const t=s.charCodeAt(e+1);t>=56320&&t<=57343?(i+=4,e++):i+=3}else i+=3}return i};const Qt={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:Zt}=ee,Yt=e=>{if(!ee.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},en=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},tn=e=>{const t=void 0!==ee.global&&null!==ee.global?ee.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=ee.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response,Blob:t.Blob},e);const o=ee.hasOwnProp(e,"fetch")?e.fetch:void 0,{Request:s,Response:i,Blob:a}=e,c=o?Zt(o):"function"==typeof fetch,l=Zt(s),u=Zt(i);if(!c)return!1;const f=c&&Zt(n),d=c&&("function"==typeof r?(p=new r,e=>p.encode(e)):async e=>new Uint8Array(await new s(e).arrayBuffer()));var p;const h=l&&f&&en(()=>{let e=!1;const t=new s(We.origin,{body:new n,method:"POST",get duplex(){return e=!0,"half"}}),r=t.headers.has("Content-Type");return null!=t.body&&t.body.cancel(),e&&!r}),g=u&&f&&en(()=>ee.isReadableStream(new i("").body)),m=Object.assign(Object.create(null),Qt);l&&!en(()=>new s(We.origin,m))&&(delete m.cache,en(()=>new s(We.origin,m))||(m.cache=Qt.cache));const b={stream:g&&(e=>e.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!b[e]&&(b[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new Oe(`Response type '${e}' is not supported`,Oe.ERR_NOT_SUPPORT,n)})});const y=async e=>null==e?0:ee.isBlob(e)?e.size:ee.isArrayBufferView(e)||ee.isArrayBuffer(e)?e.byteLength:(ee.isURLSearchParams(e)&&(e+=""),ee.isString(e)?(await d(e)).byteLength:void 0);return async e=>{let{url:t,method:n,data:c,signal:u,cancelToken:d,timeout:p,onDownloadProgress:w,onUploadProgress:O,responseType:E,headers:S,withCredentials:R="same-origin",fetchOptions:_,maxContentLength:v,maxBodyLength:P,maxRedirects:A}=Nt(e);const T=ee.isNumber(v)&&v>-1,j=ee.isNumber(P)&&P>-1,C=t=>ee.hasOwnProp(e,t)?e[t]:void 0;let N=o||fetch;E=E?(E+"").toLowerCase():"text";let x=Ut([u,d&&d.toAbortSignal()],p),U=null;const D=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let L,k=null,F=null;const B=()=>new Oe("Request body larger than maxBodyLength limit",Oe.ERR_BAD_REQUEST,e,U);try{let o;const u=C("auth");if(u){const e=ee.getSafeProp(u,"username")||"";o={username:e,password:ee.getSafeProp(u,"password")||""}}let d;if((e=>{const t=e.indexOf("://");let n=e;return-1!==t&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")})(t)){if(d=new URL(t,We.origin),!o&&(d.username||d.password)){const e=Yt(d.username);o={username:e,password:Yt(d.password)}}(d.username||d.password)&&(d.username="",d.password="",t=d.href)}if(o&&(S.delete("authorization"),S.set("Authorization","Basic "+btoa((z=(o.username||"")+":"+(o.password||""),encodeURIComponent(z).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))))),T&&d&&"data:"===d.protocol){const t=function(e){const t="string"==typeof e?e.indexOf("#"):-1;return Gt(-1===t?e:e.slice(0,t),Xt,/; *base64[\t\n\f\r ]*$/i)}(d.href);if(t>v)throw new Oe("maxContentLength size of "+v+" exceeded",Oe.ERR_BAD_RESPONSE,e,U)}const p=ee.isSpecCompliantForm(c)&&he.from(C("headers")).getContentType();let I;if(ee.isString(p)&&/^multipart\/form-data(?:\s*;|$)/i.test(p.trim())){const e=he.parseParameters(p);ee.hasOwnProp(e,"boundary")&&(I=e.boundary)}if(ee.isSpecCompliantForm(c)&&"get"!==n&&"head"!==n&&(j||O&&h||void 0!==I)&&(c=Mt(c,a,j?P:1/0,B,I),S.setContentType(void 0===I?c.type:p),L=c.size),j&&"get"!==n&&"head"!==n){const e=await y(c);if("number"==typeof e&&isFinite(e)&&(L=e,e>P))throw B()}const q=j&&(ee.isReadableStream(c)||ee.isStream(c)),M=(e,t,n)=>kt(e,65536,e=>{if(j&&e>P)throw k=B();t&&t(e)},n);if(h&&"get"!==n&&"head"!==n&&(O||q)){if(L=L??await(async(e,t)=>{const n=ee.toFiniteNumber(e.getContentLength());return n??y(t)})(S,c),0!==L||q){let e,n=new s(t,{method:"POST",body:c,duplex:"half"});if(ee.isFormData(c)&&(e=n.headers.get("content-type"))&&S.setContentType(e),n.body){const[e,t]=O&&ft(L,ut(dt(O)))||[];c=M(n.body,e,t)}}}else if(q&&!l&&f&&"get"!==n&&"head"!==n)c=M(c);else if(q&&l&&!h&&"get"!==n&&"head"!==n)throw new Oe("Stream request bodies are not supported by the current fetch implementation",Oe.ERR_NOT_SUPPORT,e,U);ee.isString(R)||(R=R?"include":"omit");const $=l&&"credentials"in s.prototype;if(ee.isFormData(c)){const e=S.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&S.delete("content-type")}S.set("User-Agent","axios/1.21.1",!1);const W=null==_?_:Object.assign(Object.create(null),_);W&&(delete W.body,delete W.headers,delete W.method,delete W.signal,delete W.duplex,delete W.credentials);const V=Object.assign(Object.create(null),W,{signal:x,method:n.toUpperCase(),headers:se(S.normalize()),body:c,duplex:"half",credentials:$?R:void 0});l&&(ee.forEach(m,(e,t)=>{void 0===V[t]&&(V[t]=e)}),void 0===V.signal&&(V.signal=null),void 0===V.body&&(V.body=null)),0===A&&(V.redirect="manual",W&&(W.redirect="manual")),U=l&&new s(t,V);let H=await(l?N(U,W):N(t,V));const J=he.from(H.headers);if(T){const t=ee.toFiniteNumber(J.getContentLength());if(null!=t&&t>v)throw new Oe("maxContentLength size of "+v+" exceeded",Oe.ERR_BAD_RESPONSE,e,U)}const K=g&&("stream"===E||"response"===E);if(g&&H.body&&(w||T||K&&D)){const t={};["status","statusText","headers"].forEach(e=>{t[e]=H[e]});const n=ee.toFiniteNumber(J.getContentLength()),[r,o]=w&&ft(n,ut(dt(w),!0))||[];let s=0;const a=t=>{if(T&&(s=t,s>v))throw F=new Oe("maxContentLength size of "+v+" exceeded",Oe.ERR_BAD_RESPONSE,e,U);r&&r(t)};H=new i(kt(H.body,65536,a,()=>{o&&o(),D&&D()}),t)}E=E||"text";let X=await b[ee.findKey(b,E)||"text"](H,e);if(T&&!g&&!K){let t;if(null!=X&&("number"==typeof X.byteLength?t=X.byteLength:"number"==typeof X.size?t=X.size:"string"==typeof X&&(t="function"==typeof r?(new r).encode(X).byteLength:X.length)),"number"==typeof t&&t>v)throw new Oe("maxContentLength size of "+v+" exceeded",Oe.ERR_BAD_RESPONSE,e,U)}return!K&&D&&D(),await new Promise((t,n)=>{nt(t,n,{data:X,headers:he.from(H.headers),status:H.status,statusText:H.statusText,config:e,request:U})})}catch(t){if(D&&D(),x&&x.aborted&&x.reason instanceof Oe){const n=x.reason;throw n.config=e,U&&(n.request=U),t!==n&&Object.defineProperty(n,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),n}if(k)throw U&&!k.request&&(k.request=U),k;if(F)throw F;if(t instanceof Oe)throw U&&!t.request&&(t.request=U),t;if(t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message)){const n=new Oe("Network Error",Oe.ERR_NETWORK,e,U,t&&t.response);throw Object.defineProperty(n,"cause",{__proto__:null,value:t.cause||t,writable:!0,enumerable:!1,configurable:!0}),n}throw Oe.from(t,t&&t.code,e,U,t&&t.response)}var z}},nn=new Map,rn=e=>{const t=Object.create(null),n=e&&ee.hasOwnProp(e,"env")&&e.env;["fetch","Request","Response","Blob"].forEach(e=>{n&&ee.hasOwnProp(n,e)&&(t[e]=n[e])});const{fetch:r,Request:o,Response:s,Blob:i}=t,a=[o,s,r,i];let c,l,u=a.length,f=nn;for(;u--;)c=a[u],l=f.get(c),void 0===l&&f.set(c,l=u?new Map:tn(t)),f=l;return l},on=(rn(),{http:null,xhr:xt,fetch:{get:rn}});ee.forEach(on,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(e){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const sn=e=>`- ${e}`,an=e=>ee.isFunction(e)||null===e||!1===e;const cn={getAdapter:function(e,t){e=ee.isArray(e)?e:[e];const{length:n}=e;let r,o;const s={};for(let i=0;i<n;i++){let n;if(r=e[i],o=r,!an(r)&&(o=on[(n=String(r)).toLowerCase()],void 0===o))throw new Oe(`Unknown adapter '${n}'`);if(o&&(ee.isFunction(o)||(o=o.get(t))))break;s[n||"#"+i]=o}if(!o){const e=Object.entries(s).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=n?e.length>1?"since :\n"+e.map(sn).join("\n"):" "+sn(e[0]):"as no adapter specified";throw new Oe("There is no suitable adapter to dispatch the request "+t,Oe.ERR_NOT_SUPPORT)}return o},adapters:on};function ln(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new tt(null,e)}function un(e,t){return Math.max(0,Math.round(e()-t))}function fn(e){const t=ee.toSafeFlatObject(e);ln(t),t.headers=he.from(ee.getSafeProp(t,"headers")),t.data=Ye.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);const n=cn.getAdapter(t.adapter||Ze.adapter,t),r="undefined"!=typeof performance&&ee.isFunction(performance.now)?()=>performance.now():Date.now,o=r();return n(t).then(function(e){ln(t),e.duration=un(r,o),t.response=e;try{e.data=Ye.call(t,t.transformResponse,e)}finally{delete t.response}return e.headers=he.from(e.headers),e},function(e){if(!et(e)&&(ln(t),e&&e.response)){e.response.duration=un(r,o),t.response=e.response;try{e.response.data=Ye.call(t,t.transformResponse,e.response)}finally{delete t.response}e.response.headers=he.from(e.response.headers)}return Promise.reject(e)})}const dn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{dn[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const pn={};dn.transitional=function(e,t,n){function r(e,t){return"[Axios v1.21.1] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,s)=>{if(!1===e)throw new Oe(r(o," has been removed"+(t?" in "+t:"")),Oe.ERR_DEPRECATED);return t&&!pn[o]&&(pn[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,s)}},dn.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const hn={assertOptions:function(e,t,n){if("object"!=typeof e||null===e)throw new Oe("options must be an object",Oe.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],i=Object.prototype.hasOwnProperty.call(t,s)?t[s]:void 0;if(i){const t=e[s],n=void 0===t||i(t,s,e);if(!0!==n)throw new Oe("option "+s+" must be "+n,Oe.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new Oe("Unknown option "+s,Oe.ERR_BAD_OPTION)}},validators:dn},gn=hn.validators,mn=e=>{if(null==e||ee.isPlainObject(e)||e instanceof he)return!0;try{return ee.isObject(e)&&"AxiosHeaders"===ee.getSafeProp(e,Symbol.toStringTag)&&["toJSON","set","get","has","delete","clear","normalize","concat","toString",Symbol.iterator].every(t=>ee.isFunction(ee.getSafeProp(e,t)))}catch(e){return!1}};class bn{constructor(e){this.defaults=e||{},this.interceptors={request:new ke,response:new ke}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error)try{let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack;let r="";if("string"==typeof n){const e=n.indexOf("\n");r=-1===e?"":n.slice(e+1)}if(e.stack){if(r){const t=r.indexOf("\n"),n=-1===t?-1:r.indexOf("\n",t+1),o=-1===n?r:r.slice(n+1),s=String(e.stack),i=function(e,t){const n=ee.hasOwnProp(e,ye)&&e[ye];return n&&t.endsWith(n)?t.length-n.length:-1}(e,s),a=-1===i?s:s.slice(0,i),c=-1===i?"":s.slice(i);a.endsWith(o)||(e.stack=a+"\n"+r+c)}}else e.stack=r}catch(e){}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=At(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&hn.assertOptions(n,{silentJSONParsing:gn.transitional(gn.boolean),forcedJSONParsing:gn.transitional(gn.boolean),clarifyTimeoutError:gn.transitional(gn.boolean),legacyInterceptorReqResOrdering:gn.transitional(gn.boolean),advertiseZstdAcceptEncoding:gn.transitional(gn.boolean),validateStatusUndefinedResolves:gn.transitional(gn.boolean),encodeBasicAuthUsername:gn.transitional(gn.boolean)},!1),null!=r&&(ee.isFunction(r)?t.paramsSerializer={serialize:r}:hn.assertOptions(r,{encode:gn.function,serialize:gn.function},!0)),void 0!==t.allowAbsoluteUrls||(ee.hasOwnProp(this.defaults,"allowAbsoluteUrls")&&void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),hn.assertOptions(t,{baseUrl:gn.spelling("baseURL"),withXsrfToken:gn.spelling("withXSRFToken")},!0),t.method=(ee.getSafeProp(t,"method")||ee.getSafeProp(this.defaults,"method")||"get").toLowerCase();const s=ee.getSafeProp(o,"common"),i=ee.getSafeProp(o,t.method),a=o&&ee.merge(mn(s)?s:void 0,mn(i)?i:void 0);o&&ee.forEach(Xe.concat("common"),e=>{mn(ee.getSafeProp(o,e))&&delete o[e]}),t.headers=he.concat(a,o);const c=[];let l=!0;this.interceptors.request.forEach(function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;l=l&&e.synchronous;const n=t.transitional||Fe;n&&n.legacyInterceptorReqResOrdering?c.unshift(e.fulfilled,e.rejected):c.push(e.fulfilled,e.rejected)});const u=[];let f;this.interceptors.response.forEach(function(e){u.push(e.fulfilled,e.rejected)});let d,p=0;if(!l){const e=[fn.bind(this),void 0];for(e.unshift(...c),e.push(...u),d=e.length,f=Promise.resolve(t);p<d;)f=f.then(e[p++],e[p++]);return f}d=c.length;let h=t;for(;p<d;){const e=c[p++],t=c[p++];try{h=e?e(h):h}catch(e){if(!t){f=Promise.reject(e);break}try{const n=t.call(this,e);ee.isThenable(n)&&(f=Promise.resolve(n).then(()=>fn.call(this,h)))}catch(e){f=Promise.reject(e)}break}}if(!f)try{f=fn.call(this,h)}catch(e){f=Promise.reject(e)}for(p=0,d=u.length;p<d;)f=f.then(u[p++],u[p++]);return f}getUri(e){return Ne(bt((e=At(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls,e),e.params,e.paramsSerializer)}}ee.forEach(["delete","get","head","options"],function(e){bn.prototype[e]=async function(t,n){return this.request(At(n||{},{method:e,url:t,data:n&&ee.hasOwnProp(n,"data")?n.data:void 0}))}}),ee.forEach(["post","put","patch","query"],function(e){function t(t){return async function(n,r,o){return this.request(At(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}bn.prototype[e]=t(),"query"!==e&&(bn.prototype[e+"Form"]=t(!0))});const yn=bn;class wn{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 n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new tt(e,r,o),t(n.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 wn(function(t){e=t}),cancel:e}}}const On=wn;const En={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,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent: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,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(En).forEach(([e,t])=>{void 0===En[t]&&(En[t]=e)});const Sn=En;const Rn=function e(t){const n=new yn(t),o=r(yn.prototype.request,n);return ee.extend(o,yn.prototype,n,{allOwnKeys:!0}),ee.extend(o,n,null,{allOwnKeys:!0}),o.create=function(n){return e(At(t,n))},o}(Ze);Rn.Axios=yn,Rn.CanceledError=tt,Rn.CancelToken=On,Rn.isCancel=et,Rn.VERSION="1.21.1",Rn.toFormData=ve,Rn.AxiosError=Oe,Rn.Cancel=Rn.CanceledError,Rn.all=function(e){return Promise.all(e)},Rn.spread=function(e){return function(t){return e.apply(null,t)}},Rn.isAxiosError=function(e){return ee.isObject(e)&&!0===e.isAxiosError},Rn.mergeConfig=At,Rn.AxiosHeaders=he,Rn.formToJSON=e=>Ke(ee.isHTMLForm(e)?new FormData(e):e),Rn.getAdapter=cn.getAdapter,Rn.HttpStatusCode=Sn,Rn.default=Rn;const _n=Rn,vn="1.15.0",Pn="javascript."+vn,An={varsnap:!0,env:"development",branch:"",producerToken:"",consumerToken:"",logger:console};let Tn=[],jn=[];class Cn{static getConfig(e,t){if(!e)return"";let n=e[t];return n?(n=n.toString().toLowerCase(),n):""}static setConfig(e,t,n){return"varsnap"===t&&("string"==typeof n&&(n="true"===n),e[t]=n),"env"!==t&&"producerToken"!==t&&"consumerToken"!==t&&"branch"!==t||(e[t]=n),"logger"===t&&(e[t]=n),e}static getSignature(e,t){let n;return""!==t&&void 0!==t?n=t:(n=e.toString().split("{")[0],n=n.replace(/^\s+|\s+$/g,""),n=n.replace(/,\s+/g,",")),"javascript."+vn+"."+n}static ajax(e,t){const n={method:"POST",url:e,headers:{"Content-Type":"application/x-www-form-urlencoded"},data:new URLSearchParams(t).toString(),responseType:"json"};Cn.isNode()&&n.headers&&(n.headers["User-Agent"]="varsnap.js");return _n(n).then(e=>e.data).catch(e=>e)}static debug(e,t){e.logger&&e.logger.debug(t)}static log(e,t){e.logger&&e.logger.log(t)}static error(e,t){e.logger&&e.logger.error(t)}static resetProducers(){Tn=[]}static resetConsumers(){jn=[]}static getProducers(){return Tn}static getConsumers(){return jn}static limitString(e){const t=String(e);return t.length<=30?t:t.substring(0,27)+"..."}static hasCodec(e){if(null==e)return!1;const t=e;return"function"==typeof t.varsnapSerialize&&"function"==typeof t.varsnapDeserialize}static isNode(){return"object"==typeof process&&"undefined"==typeof window}}class Nn{constructor(e,t,n,r={}){this.targetFunc=e,this.signature=t,this.config=n,this.options=r}isEnabled(){return!!this.config.varsnap&&("production"===Cn.getConfig(this.config,"env")&&!!Cn.getConfig(this.config,"producerToken"))}static serialize(e,t){if(Cn.hasCodec(t)){const n=t.varsnapSerialize(e);if("string"!=typeof n)throw new Error("varsnapSerialize must return a string");return"type:"+n}return"json:"+JSON.stringify(e)}static serializeInputs(e,t=[]){const n={args:e.map((e,n)=>Nn.serialize(e,t[n])),kwargs:{},globals:Nn.serialize({})};return"inputs:"+JSON.stringify(n)}static serialize_formatted(e){try{return JSON.stringify(e,null,2)}catch(t){return String(e)}}produce(e,t,n=!1){if(!this.isEnabled()){return new Promise(e=>e(!1))}return Cn.debug(this.config,"Sending call to Varsnap"),Promise.resolve(t).then(t=>{let r,o;try{r=Nn.serializeInputs(e,this.options.types),o=Nn.serialize(t,n?void 0:this.options.returns)}catch(e){return Cn.error(this.config,"Cannot serialize snap for "+this.signature+": "+e),!1}const s={producer_token:Cn.getConfig(this.config,"producerToken"),signature:this.signature,inputs:r,prod_outputs:o};return Cn.ajax("https://www.varsnap.com/api/snap/produce/",s).then(()=>!0).catch(e=>{if(e.response){if(429===e.response.status)return Cn.error(this.config,"Cannot produce to Varsnap; Signature at rate limit"),!0;404===e.response.status?Cn.error(this.config,"Cannot produce to Varsnap; check your producer token"):Cn.error(this.config,e.response.statusText)}return!1})},e=>(Cn.log(this.config,"Not producing a snap for "+this.signature+"; its promise rejected: "+e),!1))}}class xn{constructor(e,t,n,r={}){this.targetFunc=e,this.signature=t,this.config=n,this.options=r}isEnabled(){return!!this.config.varsnap&&("development"===Cn.getConfig(this.config,"env")&&!!Cn.getConfig(this.config,"consumerToken"))}static deserialize(e,t){if(""!==e){if(e.startsWith("type:")){if(!Cn.hasCodec(t))throw new Error("Cannot deserialize a type: payload without a codec");return t.varsnapDeserialize(e.substring(5))}if(!e.startsWith("json:"))throw new Error("Unknown serialization format: "+Cn.limitString(e));return JSON.parse(e.substring(5))}}static deserializeInputs(e,t=[]){if(!e.startsWith("inputs:"))throw new Error("Expected an inputs: prefix");const n=JSON.parse(e.substring(7)),r=e=>"object"==typeof e&&null!==e&&!Array.isArray(e);if(!r(n)||!Array.isArray(n.args)||!n.args.every(e=>"string"==typeof e)||!r(n.kwargs)||Object.keys(n.kwargs).length>0||"string"!=typeof n.globals)throw new Error("Malformed inputs envelope");return n.args.map((e,n)=>xn.deserialize(e,t[n]))}consume(e){if(!this.isEnabled()){return new Promise(e=>(Cn.error(this.config,"Varsnap not enabled for testing"),e(!1)))}const t={consumer_token:Cn.getConfig(this.config,"consumerToken"),signature:this.signature};return Cn.ajax("https://www.varsnap.com/api/snap/consume/",t).then(n=>{const r=n;if(!r||"ok"!==r.status){return[new Promise(e=>(Cn.error(this.config,"Received error from Varsnap: "+r.status),e(!1)))]}0===r.results.length&&Cn.log(this.config,"No snaps found for signature: "+t.signature);const o=[];for(const t of r.results){let n,r,s;try{n=xn.deserializeInputs(t.inputs,this.options.types),r=xn.deserialize(t.prod_outputs,this.options.returns)}catch(e){Cn.error(this.config,"Cannot deserialize snap "+t.id+": "+e);continue}let i=!1;try{s=this.targetFunc(...n)}catch(e){s=e,i=!0}const a=Promise.resolve(s).then(o=>{let s="";try{s=Nn.serialize(o,i?void 0:this.options.returns)}catch(e){Cn.error(this.config,"Cannot serialize local outputs for snap "+t.id+": "+e)}const a=""!==s&&t.prod_outputs===s;return this.reportCentral(e,t,r,o,s,a).then(e=>{this.reportLog(t.id,n,r,o,a,e)}),a});o.push(a)}return o}).then(e=>Promise.all(e).then(e=>e.every(e=>e))).catch(e=>(Cn.error(this.config,"Cannot contact Varsnap: "+e),!1))}reportCentral(e,t,n,r,o,s){const i={trial_group_id:e.trial_group_id,consumer_token:Cn.getConfig(this.config,"consumerToken"),snap_id:t.id,test_outputs:o,matches:s.toString(),snap_outputs_formatted:Nn.serialize_formatted(n),test_outputs_formatted:Nn.serialize_formatted(r)};return Cn.ajax("https://www.varsnap.com/api/trial/produce/",i).then(e=>{const t=e;if(!t||"ok"!==t.status)return!1;return t.trial_url}).catch(e=>(Cn.error(this.config,"Cannot upload test results to Varsnap: "+e),!1))}reportLog(e,t,n,r,o,s){if(o)return;Cn.log(this.config,""),Cn.log(this.config,"Testing with Varsnap uuid: "+e),Cn.log(this.config,"Signature: "+this.signature),Cn.log(this.config,"Function input args: "+Cn.limitString(t)),Cn.log(this.config,"Production function outputs: "+Cn.limitString(n)),Cn.log(this.config,"Your function outputs: "+Cn.limitString(r)),Cn.log(this.config,"Matching outputs: "+o);let i="Cannot upload trial";s&&(i=String(s)),Cn.log(this.config,"Trial URL: "+i)}reportTrialGroup(e){Cn.log(this.config,"Trial Group: "+e.trial_group_url)}}function Un(e,t,n={}){void 0===t&&(t="");const r=Cn.getSignature(e,t),o=new Nn(e,r,Un._config,n),s=new xn(e,r,Un._config,n),i=function(...t){let n;try{n=e(...t)}catch(e){throw o.produce(t,e,!0),e}return o.produce(t,n,!1),n};return i.producer=o,i.consumer=s,i.signature=r,Tn.push(o),jn.push(s),i}Un._config=An,Un.updateConfig=function(e){let t=Un._config;for(const n of Object.keys(Un._config))Object.prototype.hasOwnProperty.call(e,n)&&(t=Cn.setConfig(t,n,e[n]));Un._config=t},Un.reset=function(){Cn.resetConsumers(),Cn.resetProducers()},Un.version=vn,Un.runTests=function(){const e=Cn.getConsumers();return 0===e.length?Promise.resolve(!0):function(e){const t={branch:Cn.getConfig(e,"branch"),consumer_token:Cn.getConfig(e,"consumerToken"),client:Pn};return Cn.ajax("https://www.varsnap.com/api/trial_group/",t).then(e=>e).catch(t=>{let n;return n=t&&t.response&&t.response.data?t.response.data.error:t.toString(),Cn.error(e,"Cannot generate a new Trial Group: "+n),{status:"not ok",project_id:"",trial_group_id:"",trial_group_url:""}})}(e[0].config).then(t=>{const n=[];for(const r of e){const e=r.consume(t);n.push(e)}return e.length>0&&e[0].reportTrialGroup(t),Promise.all(n)}).then(e=>e.every(e=>e))};const Dn=Un;return t=t.default,t})());
3
3
  //# sourceMappingURL=browser.min.js.map