9 lines
No EOL
41 KiB
JavaScript
9 lines
No EOL
41 KiB
JavaScript
import{m as e}from"./src-C0xjWfnx.js";import{n as t}from"./useMutation-DvG2_Fq3.js";import{n}from"./trpc-client-QrVjRqP1.js";function r(e,t){return function(){return e.apply(t,arguments)}}var{toString:i}=Object.prototype,{getPrototypeOf:a}=Object,{iterator:o,toStringTag:s}=Symbol,c=(e=>t=>{let n=i.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),l=e=>(e=e.toLowerCase(),t=>c(t)===e),u=e=>t=>typeof t===e,{isArray:d}=Array,f=u(`undefined`);function p(e){return e!==null&&!f(e)&&e.constructor!==null&&!f(e.constructor)&&_(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var m=l(`ArrayBuffer`);function h(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&m(e.buffer),t}var g=u(`string`),_=u(`function`),v=u(`number`),y=e=>typeof e==`object`&&!!e,b=e=>e===!0||e===!1,x=e=>{if(c(e)!==`object`)return!1;let t=a(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(s in e)&&!(o in e)},S=e=>{if(!y(e)||p(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},C=l(`Date`),w=l(`File`),ee=e=>!!(e&&e.uri!==void 0),te=e=>e&&e.getParts!==void 0,T=l(`Blob`),E=l(`FileList`),D=e=>y(e)&&_(e.pipe);function O(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}var k=O(),ne=k.FormData===void 0?void 0:k.FormData,re=e=>{if(!e)return!1;if(ne&&e instanceof ne)return!0;let t=a(e);if(!t||t===Object.prototype||!_(e.append))return!1;let n=c(e);return n===`formdata`||n===`object`&&_(e.toString)&&e.toString()===`[object FormData]`},ie=l(`URLSearchParams`),[ae,oe,se,ce]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(l),le=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function A(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),d(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(p(e))return;let i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length,o;for(r=0;r<a;r++)o=i[r],t.call(null,e[o],o,e)}}function ue(e,t){if(p(e))return null;t=t.toLowerCase();let n=Object.keys(e),r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}var j=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,de=e=>!f(e)&&e!==j;function fe(...e){let{caseless:t,skipUndefined:n}=de(this)&&this||{},r={},i=(e,i)=>{if(i===`__proto__`||i===`constructor`||i===`prototype`)return;let a=t&&ue(r,i)||i,o=M(r,a)?r[a]:void 0;x(o)&&x(e)?r[a]=fe(o,e):x(e)?r[a]=fe({},e):d(e)?r[a]=e.slice():(!n||!f(e))&&(r[a]=e)};for(let t=0,n=e.length;t<n;t++)e[t]&&A(e[t],i);return r}var pe=(e,t,n,{allOwnKeys:i}={})=>(A(t,(t,i)=>{n&&_(t)?Object.defineProperty(e,i,{__proto__:null,value:r(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),e),me=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),he=(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)},ge=(e,t,n,r)=>{let i,o,s,c={};if(t||={},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!c[s]&&(t[s]=e[s],c[s]=!0);e=n!==!1&&a(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},_e=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},ve=e=>{if(!e)return null;if(d(e))return e;let t=e.length;if(!v(t))return null;let n=Array(t);for(;t-- >0;)n[t]=e[t];return n},ye=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&a(Uint8Array)),be=(e,t)=>{let n=(e&&e[o]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},xe=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Se=l(`HTMLFormElement`),Ce=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),M=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),we=l(`RegExp`),Te=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};A(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},Ee=e=>{Te(e,(t,n)=>{if(_(e)&&[`arguments`,`caller`,`callee`].includes(n))return!1;let r=e[n];if(_(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)}}})},De=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return d(e)?r(e):r(String(e).split(t)),n},Oe=()=>{},ke=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Ae(e){return!!(e&&_(e.append)&&e[s]===`FormData`&&e[o])}var je=e=>{let t=Array(10),n=(e,r)=>{if(y(e)){if(t.indexOf(e)>=0)return;if(p(e))return e;if(!(`toJSON`in e)){t[r]=e;let i=d(e)?[]:{};return A(e,(e,t)=>{let a=n(e,r+1);!f(a)&&(i[t]=a)}),t[r]=void 0,i}}return e};return n(e,0)},Me=l(`AsyncFunction`),Ne=e=>e&&(y(e)||_(e))&&_(e.then)&&_(e.catch),Pe=((e,t)=>e?setImmediate:t?((e,t)=>(j.addEventListener(`message`,({source:n,data:r})=>{n===j&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),j.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,_(j.postMessage)),N={isArray:d,isArrayBuffer:m,isBuffer:p,isFormData:re,isArrayBufferView:h,isString:g,isNumber:v,isBoolean:b,isObject:y,isPlainObject:x,isEmptyObject:S,isReadableStream:ae,isRequest:oe,isResponse:se,isHeaders:ce,isUndefined:f,isDate:C,isFile:w,isReactNativeBlob:ee,isReactNative:te,isBlob:T,isRegExp:we,isFunction:_,isStream:D,isURLSearchParams:ie,isTypedArray:ye,isFileList:E,forEach:A,merge:fe,extend:pe,trim:le,stripBOM:me,inherits:he,toFlatObject:ge,kindOf:c,kindOfTest:l,endsWith:_e,toArray:ve,forEachEntry:be,matchAll:xe,isHTMLForm:Se,hasOwnProperty:M,hasOwnProp:M,reduceDescriptors:Te,freezeMethods:Ee,toObjectSet:De,toCamelCase:Ce,noop:Oe,toFiniteNumber:ke,findKey:ue,global:j,isContextDefined:de,isSpecCompliantForm:Ae,toJSONObject:je,isAsyncFn:Me,isThenable:Ne,setImmediate:Pe,asap:typeof queueMicrotask<`u`?queueMicrotask.bind(j):typeof process<`u`&&process.nextTick||Pe,isIterable:e=>e!=null&&_(e[o])},Fe=N.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`]),Ie=e=>{let t={},n,r,i;return e&&e.split(`
|
|
`).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!(!n||t[n]&&Fe[n])&&(n===`set-cookie`?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+`, `+r:r)}),t},Le=Symbol(`internals`),Re=/[^\x09\x20-\x7E\x80-\xFF]/g;function ze(e){let t=0,n=e.length;for(;t<n;){let n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;n>t;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}function P(e){return e&&String(e).trim().toLowerCase()}function Be(e){return ze(e.replace(Re,``))}function F(e){return e===!1||e==null?e:N.isArray(e)?e.map(F):Be(String(e))}function Ve(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var He=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ue(e,t,n,r,i){if(N.isFunction(r))return r.call(this,t,n);if(i&&(t=n),N.isString(t)){if(N.isString(r))return t.indexOf(r)!==-1;if(N.isRegExp(r))return r.test(t)}}function We(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function Ge(e,t){let n=N.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var I=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=P(t);if(!i)throw Error(`header name must be a non-empty string`);let a=N.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[a||t]=F(e))}let a=(e,t)=>N.forEach(e,(e,n)=>i(e,n,t));if(N.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(N.isString(e)&&(e=e.trim())&&!He(e))a(Ie(e),t);else if(N.isObject(e)&&N.isIterable(e)){let n={},r,i;for(let t of e){if(!N.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);n[i=t[0]]=(r=n[i])?N.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=P(e),e){let n=N.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return Ve(e);if(N.isFunction(t))return t.call(this,e,n);if(N.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=P(e),e){let n=N.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||Ue(this,this[n],n,t)))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=P(e),e){let i=N.findKey(n,e);i&&(!t||Ue(n,n[i],i,t))&&(delete n[i],r=!0)}}return N.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||Ue(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n={};return N.forEach(this,(r,i)=>{let a=N.findKey(n,i);if(a){t[a]=F(r),delete t[i];return}let o=e?We(i):String(i).trim();o!==i&&delete t[i],t[o]=F(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return N.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&N.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(`
|
|
`)}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){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[Le]=this[Le]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=P(e);t[r]||(Ge(n,e),t[r]=!0)}return N.isArray(e)?e.forEach(r):r(e),this}};I.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),N.reduceDescriptors(I.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),N.freezeMethods(I);var Ke=`[REDACTED ****]`;function qe(e){if(N.hasOwnProp(e,`toJSON`))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(N.hasOwnProp(t,`toJSON`))return!0;t=Object.getPrototypeOf(t)}return!1}function Je(e,t){let n=new Set(t.map(e=>String(e).toLowerCase())),r=[],i=e=>{if(typeof e!=`object`||!e||N.isBuffer(e))return e;if(r.indexOf(e)!==-1)return;e instanceof I&&(e=e.toJSON()),r.push(e);let t;if(N.isArray(e))t=[],e.forEach((e,n)=>{let r=i(e);N.isUndefined(r)||(t[n]=r)});else{if(!N.isPlainObject(e)&&qe(e))return r.pop(),e;t=Object.create(null);for(let[r,a]of Object.entries(e)){let e=n.has(r.toLowerCase())?Ke:i(a);N.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return i(e)}var L=class e extends Error{static from(t,n,r,i,a,o){let s=new e(t.message,n||t.code,r,i,a);return s.cause=t,s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),o&&Object.assign(s,o),s}constructor(e,t,n,r,i){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),i&&(this.response=i,this.status=i.status)}toJSON(){let e=this.config,t=e&&N.hasOwnProp(e,`redact`)?e.redact:void 0,n=N.isArray(t)&&t.length>0?Je(e,t):N.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}}};L.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,L.ERR_BAD_OPTION=`ERR_BAD_OPTION`,L.ECONNABORTED=`ECONNABORTED`,L.ETIMEDOUT=`ETIMEDOUT`,L.ECONNREFUSED=`ECONNREFUSED`,L.ERR_NETWORK=`ERR_NETWORK`,L.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,L.ERR_DEPRECATED=`ERR_DEPRECATED`,L.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,L.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,L.ERR_CANCELED=`ERR_CANCELED`,L.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,L.ERR_INVALID_URL=`ERR_INVALID_URL`,L.ERR_FORM_DATA_DEPTH_EXCEEDED=`ERR_FORM_DATA_DEPTH_EXCEEDED`;function Ye(e){return N.isPlainObject(e)||N.isArray(e)}function Xe(e){return N.endsWith(e,`[]`)?e.slice(0,-2):e}function Ze(e,t,n){return e?e.concat(t).map(function(e,t){return e=Xe(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function Qe(e){return N.isArray(e)&&!e.some(Ye)}var $e=N.toFlatObject(N,{},null,function(e){return/^is[A-Z]/.test(e)});function R(e,t,n){if(!N.isObject(e))throw TypeError(`target must be an object`);t||=new FormData,n=N.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!N.isUndefined(t[e])});let r=n.metaTokens,i=n.visitor||d,a=n.dots,o=n.indexes,s=n.Blob||typeof Blob<`u`&&Blob,c=n.maxDepth===void 0?100:n.maxDepth,l=s&&N.isSpecCompliantForm(t);if(!N.isFunction(i))throw TypeError(`visitor must be a function`);function u(e){if(e===null)return``;if(N.isDate(e))return e.toISOString();if(N.isBoolean(e))return e.toString();if(!l&&N.isBlob(e))throw new L(`Blob is not supported. Use a Buffer instead.`);return N.isArrayBuffer(e)||N.isTypedArray(e)?l&&typeof Blob==`function`?new Blob([e]):Buffer.from(e):e}function d(e,n,i){let s=e;if(N.isReactNative(t)&&N.isReactNativeBlob(e))return t.append(Ze(i,n,a),u(e)),!1;if(e&&!i&&typeof e==`object`){if(N.endsWith(n,`{}`))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(N.isArray(e)&&Qe(e)||(N.isFileList(e)||N.endsWith(n,`[]`))&&(s=N.toArray(e)))return n=Xe(n),s.forEach(function(e,r){!(N.isUndefined(e)||e===null)&&t.append(o===!0?Ze([n],r,a):o===null?n:n+`[]`,u(e))}),!1}return Ye(e)?!0:(t.append(Ze(i,n,a),u(e)),!1)}let f=[],p=Object.assign($e,{defaultVisitor:d,convertValue:u,isVisitable:Ye});function m(e,n,r=0){if(!N.isUndefined(e)){if(r>c)throw new L(`Object is too deeply nested (`+r+` levels). Max depth: `+c,L.ERR_FORM_DATA_DEPTH_EXCEEDED);if(f.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));f.push(e),N.forEach(e,function(e,a){(!(N.isUndefined(e)||e===null)&&i.call(t,e,N.isString(a)?a.trim():a,n,p))===!0&&m(e,n?n.concat(a):[a],r+1)}),f.pop()}}if(!N.isObject(e))throw TypeError(`data must be an object`);return m(e),t}function et(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function tt(e,t){this._pairs=[],e&&R(e,this,t)}var nt=tt.prototype;nt.append=function(e,t){this._pairs.push([e,t])},nt.toString=function(e){let t=e?function(t){return e.call(this,t,et)}:et;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};function rt(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function it(e,t,n){if(!t)return e;let r=n&&n.encode||rt,i=N.isFunction(n)?{serialize:n}:n,a=i&&i.serialize,o;if(o=a?a(t,i):N.isURLSearchParams(t)?t.toString():new tt(t,i).toString(r),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var at=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&=[]}forEach(e){N.forEach(this.handlers,function(t){t!==null&&e(t)})}},ot={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},st={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<`u`?URLSearchParams:tt,FormData:typeof FormData<`u`?FormData:null,Blob:typeof Blob<`u`?Blob:null},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]},ct=e({hasBrowserEnv:()=>lt,hasStandardBrowserEnv:()=>ut,hasStandardBrowserWebWorkerEnv:()=>dt,navigator:()=>z,origin:()=>ft}),lt=typeof window<`u`&&typeof document<`u`,z=typeof navigator==`object`&&navigator||void 0,ut=lt&&(!z||[`ReactNative`,`NativeScript`,`NS`].indexOf(z.product)<0),dt=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,ft=lt&&window.location.href||`http://localhost`,B={...ct,...st};function pt(e,t){return R(e,new B.classes.URLSearchParams,{visitor:function(e,t,n,r){return B.isNode&&N.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}function mt(e){return N.matchAll(/\w+|\[(\w*)]/g,e).map(e=>e[0]===`[]`?``:e[1]||e[0])}function ht(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function gt(e){function t(e,n,r,i){let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),s=i>=e.length;return a=!a&&N.isArray(r)?r.length:a,s?(N.hasOwnProp(r,a)?r[a]=N.isArray(r[a])?r[a].concat(n):[r[a],n]:r[a]=n,!o):((!r[a]||!N.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&N.isArray(r[a])&&(r[a]=ht(r[a])),!o)}if(N.isFormData(e)&&N.isFunction(e.entries)){let n={};return N.forEachEntry(e,(e,r)=>{t(mt(e),r,n,0)}),n}return null}var V=(e,t)=>e!=null&&N.hasOwnProp(e,t)?e[t]:void 0;function _t(e,t,n){if(N.isString(e))try{return(t||JSON.parse)(e),N.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}var H={transitional:ot,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=N.isObject(e);if(i&&N.isHTMLForm(e)&&(e=new FormData(e)),N.isFormData(e))return r?JSON.stringify(gt(e)):e;if(N.isArrayBuffer(e)||N.isBuffer(e)||N.isStream(e)||N.isFile(e)||N.isBlob(e)||N.isReadableStream(e))return e;if(N.isArrayBufferView(e))return e.buffer;if(N.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){let t=V(this,`formSerializer`);if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return pt(e,t).toString();if((a=N.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let n=V(this,`env`),r=n&&n.FormData;return R(a?{"files[]":e}:e,r&&new r,t)}}return i||r?(t.setContentType(`application/json`,!1),_t(e)):e}],transformResponse:[function(e){let t=V(this,`transitional`)||H.transitional,n=t&&t.forcedJSONParsing,r=V(this,`responseType`),i=r===`json`;if(N.isResponse(e)||N.isReadableStream(e))return e;if(e&&N.isString(e)&&(n&&!r||i)){let n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,V(this,`parseReviver`))}catch(e){if(n)throw e.name===`SyntaxError`?L.from(e,L.ERR_BAD_RESPONSE,this,null,V(this,`response`)):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:B.classes.FormData,Blob:B.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};N.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`],e=>{H.headers[e]={}});function vt(e,t){let n=this||H,r=t||n,i=I.from(r.headers),a=r.data;return N.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function yt(e){return!!(e&&e.__CANCEL__)}var U=class extends L{constructor(e,t,n){super(e??`canceled`,L.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function bt(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new L(`Request failed with status code `+n.status,n.status>=400&&n.status<500?L.ERR_BAD_REQUEST:L.ERR_BAD_RESPONSE,n.config,n.request,n))}function xt(e){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||``}function St(e,t){e||=10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||=c,n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;let f=l&&c-l;return f?Math.round(d*1e3/f):void 0}}function Ct(e,t){let n=0,r=1e3/t,i,a,o=(t,r=Date.now())=>{n=r,i=null,a&&=(clearTimeout(a),null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||=setTimeout(()=>{a=null,o(i)},r-s))},()=>i&&o(i)]}var W=(e,t,n=3)=>{let r=0,i=St(50,250);return Ct(n=>{let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=o==null?a:Math.min(a,o),c=Math.max(0,s-r),l=i(c);r=Math.max(r,s),e({loaded:s,total:o,progress:o?s/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o?(o-s)/l:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},wt=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Tt=e=>(...t)=>N.asap(()=>e(...t)),Et=B.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,B.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(B.origin),B.navigator&&/(msie|trident)/i.test(B.navigator.userAgent)):()=>!0,Dt=B.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];N.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),N.isString(r)&&s.push(`path=${r}`),N.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),N.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie.split(`;`);for(let n=0;n<t.length;n++){let r=t[n].replace(/^\s+/,``),i=r.indexOf(`=`);if(i!==-1&&r.slice(0,i)===e)return decodeURIComponent(r.slice(i+1))}return null},remove(e){this.write(e,``,Date.now()-864e5,`/`)}}:{write(){},read(){return null},remove(){}};function Ot(e){return typeof e==`string`?/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e):!1}function kt(e,t){return t?e.replace(/\/?\/$/,``)+`/`+t.replace(/^\/+/,``):e}function At(e,t,n){let r=!Ot(t);return e&&(r||n===!1)?kt(e,t):t}var jt=e=>e instanceof I?{...e}:e;function G(e,t){t||={};let n=Object.create(null);Object.defineProperty(n,`hasOwnProperty`,{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(e,t,n,r){return N.isPlainObject(e)&&N.isPlainObject(t)?N.merge.call({caseless:r},e,t):N.isPlainObject(t)?N.merge({},t):N.isArray(t)?t.slice():t}function i(e,t,n,i){if(!N.isUndefined(t))return r(e,t,n,i);if(!N.isUndefined(e))return r(void 0,e,n,i)}function a(e,t){if(!N.isUndefined(t))return r(void 0,t)}function o(e,t){if(!N.isUndefined(t))return r(void 0,t);if(!N.isUndefined(e))return r(void 0,e)}function s(n,i,a){if(N.hasOwnProp(t,a))return r(n,i);if(N.hasOwnProp(e,a))return r(void 0,n)}let c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:s,headers:(e,t,n)=>i(jt(e),jt(t),n,!0)};return N.forEach(Object.keys({...e,...t}),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=N.hasOwnProp(c,r)?c[r]:i,o=a(N.hasOwnProp(e,r)?e[r]:void 0,N.hasOwnProp(t,r)?t[r]:void 0,r);N.isUndefined(o)&&a!==s||(n[r]=o)}),n}var Mt=[`content-type`,`content-length`];function Nt(e,t,n){if(n!==`content-only`){e.set(t);return}Object.entries(t).forEach(([t,n])=>{Mt.includes(t.toLowerCase())&&e.set(t,n)})}var Pt=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))),Ft=e=>{let t=G({},e),n=e=>N.hasOwnProp(t,e)?t[e]:void 0,r=n(`data`),i=n(`withXSRFToken`),a=n(`xsrfHeaderName`),o=n(`xsrfCookieName`),s=n(`headers`),c=n(`auth`),l=n(`baseURL`),u=n(`allowAbsoluteUrls`),d=n(`url`);if(t.headers=s=I.from(s),t.url=it(At(l,d,u),e.params,e.paramsSerializer),c&&s.set(`Authorization`,`Basic `+btoa((c.username||``)+`:`+(c.password?Pt(c.password):``))),N.isFormData(r)&&(B.hasStandardBrowserEnv||B.hasStandardBrowserWebWorkerEnv?s.setContentType(void 0):N.isFunction(r.getHeaders)&&Nt(s,r.getHeaders(),n(`formDataHeaderPolicy`))),B.hasStandardBrowserEnv&&(N.isFunction(i)&&(i=i(t)),i===!0||i==null&&Et(t.url))){let e=a&&o&&Dt.read(o);e&&s.set(a,e)}return t},It=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r=Ft(e),i=r.data,a=I.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p;function m(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function g(){if(!h)return;let r=I.from(`getAllResponseHeaders`in h&&h.getAllResponseHeaders());bt(function(e){t(e),m()},function(e){n(e),m()},{data:!o||o===`text`||o===`json`?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:r,config:e,request:h}),h=null}`onloadend`in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.startsWith(`file:`))||setTimeout(g)},h.onabort=function(){h&&=(n(new L(`Request aborted`,L.ECONNABORTED,e,h)),m(),null)},h.onerror=function(t){let r=new L(t&&t.message?t.message:`Network Error`,L.ERR_NETWORK,e,h);r.event=t||null,n(r),m(),h=null},h.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||ot;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new L(t,i.clarifyTimeoutError?L.ETIMEDOUT:L.ECONNABORTED,e,h)),m(),h=null},i===void 0&&a.setContentType(null),`setRequestHeader`in h&&N.forEach(a.toJSON(),function(e,t){h.setRequestHeader(t,e)}),N.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),o&&o!==`json`&&(h.responseType=r.responseType),c&&([d,p]=W(c,!0),h.addEventListener(`progress`,d)),s&&h.upload&&([u,f]=W(s),h.upload.addEventListener(`progress`,u),h.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{h&&=(n(!t||t.type?new U(null,e,h):t),h.abort(),m(),null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let _=xt(r.url);if(_&&!B.protocols.includes(_)){n(new L(`Unsupported protocol `+_+`:`,L.ERR_BAD_REQUEST,e));return}h.send(i||null)})},Lt=(e,t)=>{let{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n=new AbortController,r,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof L?t:new U(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new L(`timeout of ${t}ms exceeded`,L.ETIMEDOUT))},t),o=()=>{e&&=(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),null)};e.forEach(e=>e.addEventListener(`abort`,i));let{signal:s}=n;return s.unsubscribe=()=>N.asap(o),s}},Rt=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},zt=async function*(e,t){for await(let n of Bt(e))yield*Rt(n,t)},Bt=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},Vt=(e,t,n,r)=>{let i=zt(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})};function Ht(e){if(!e||typeof e!=`string`||!e.startsWith(`data:`))return 0;let t=e.indexOf(`,`);if(t<0)return 0;let n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let e=r.length,t=r.length;for(let n=0;n<t;n++)if(r.charCodeAt(n)===37&&n+2<t){let t=r.charCodeAt(n+1),i=r.charCodeAt(n+2);(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102)&&(i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102)&&(e-=2,n+=2)}let n=0,i=t-1,a=e=>e>=2&&r.charCodeAt(e-2)===37&&r.charCodeAt(e-1)===51&&(r.charCodeAt(e)===68||r.charCodeAt(e)===100);i>=0&&(r.charCodeAt(i)===61?(n++,i--):a(i)&&(n++,i-=3)),n===1&&i>=0&&(r.charCodeAt(i)===61||a(i))&&n++;let o=Math.floor(e/4)*3-(n||0);return o>0?o:0}if(typeof Buffer<`u`&&typeof Buffer.byteLength==`function`)return Buffer.byteLength(r,`utf8`);let i=0;for(let e=0,t=r.length;e<t;e++){let n=r.charCodeAt(e);if(n<128)i+=1;else if(n<2048)i+=2;else if(n>=55296&&n<=56319&&e+1<t){let t=r.charCodeAt(e+1);t>=56320&&t<=57343?(i+=4,e++):i+=3}else i+=3}return i}var Ut=`1.16.0`,Wt=64*1024,{isFunction:K}=N,Gt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Kt=e=>{let t=N.global??globalThis,{ReadableStream:n,TextEncoder:r}=t;e=N.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);let{fetch:i,Request:a,Response:o}=e,s=i?K(i):typeof fetch==`function`,c=K(a),l=K(o);if(!s)return!1;let u=s&&K(n),d=s&&(typeof r==`function`?(e=>t=>e.encode(t))(new r):async e=>new Uint8Array(await new a(e).arrayBuffer())),f=c&&u&&Gt(()=>{let e=!1,t=new a(B.origin,{body:new n,method:`POST`,get duplex(){return e=!0,`half`}}),r=t.headers.has(`Content-Type`);return t.body!=null&&t.body.cancel(),e&&!r}),p=l&&u&&Gt(()=>N.isReadableStream(new o(``).body)),m={stream:p&&(e=>e.body)};s&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!m[e]&&(m[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new L(`Response type '${e}' is not supported`,L.ERR_NOT_SUPPORT,n)})});let h=async e=>{if(e==null)return 0;if(N.isBlob(e))return e.size;if(N.isSpecCompliantForm(e))return(await new a(B.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(N.isArrayBufferView(e)||N.isArrayBuffer(e))return e.byteLength;if(N.isURLSearchParams(e)&&(e+=``),N.isString(e))return(await d(e)).byteLength},g=async(e,t)=>N.toFiniteNumber(e.getContentLength())??h(t);return async e=>{let{url:t,method:n,data:s,signal:l,cancelToken:u,timeout:d,onDownloadProgress:h,onUploadProgress:_,responseType:v,headers:y,withCredentials:b=`same-origin`,fetchOptions:x,maxContentLength:S,maxBodyLength:C}=Ft(e),w=N.isNumber(S)&&S>-1,ee=N.isNumber(C)&&C>-1,te=i||fetch;v=v?(v+``).toLowerCase():`text`;let T=Lt([l,u&&u.toAbortSignal()],d),E=null,D=T&&T.unsubscribe&&(()=>{T.unsubscribe()}),O;try{if(w&&typeof t==`string`&&t.startsWith(`data:`)&&Ht(t)>S)throw new L(`maxContentLength size of `+S+` exceeded`,L.ERR_BAD_RESPONSE,e,E);if(ee&&n!==`get`&&n!==`head`){let t=await g(y,s);if(typeof t==`number`&&isFinite(t)&&t>C)throw new L(`Request body larger than maxBodyLength limit`,L.ERR_BAD_REQUEST,e,E)}if(_&&f&&n!==`get`&&n!==`head`&&(O=await g(y,s))!==0){let e=new a(t,{method:`POST`,body:s,duplex:`half`}),n;if(N.isFormData(s)&&(n=e.headers.get(`content-type`))&&y.setContentType(n),e.body){let[t,n]=wt(O,W(Tt(_)));s=Vt(e.body,Wt,t,n)}}N.isString(b)||(b=b?`include`:`omit`);let i=c&&`credentials`in a.prototype;if(N.isFormData(s)){let e=y.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&y.delete(`content-type`)}y.set(`User-Agent`,`axios/`+Ut,!1);let l={...x,signal:T,method:n.toUpperCase(),headers:y.normalize().toJSON(),body:s,duplex:`half`,credentials:i?b:void 0};E=c&&new a(t,l);let u=await(c?te(E,x):te(t,l));if(w){let t=N.toFiniteNumber(u.headers.get(`content-length`));if(t!=null&&t>S)throw new L(`maxContentLength size of `+S+` exceeded`,L.ERR_BAD_RESPONSE,e,E)}let d=p&&(v===`stream`||v===`response`);if(p&&u.body&&(h||w||d&&D)){let t={};[`status`,`statusText`,`headers`].forEach(e=>{t[e]=u[e]});let n=N.toFiniteNumber(u.headers.get(`content-length`)),[r,i]=h&&wt(n,W(Tt(h),!0))||[],a=0;u=new o(Vt(u.body,Wt,t=>{if(w&&(a=t,a>S))throw new L(`maxContentLength size of `+S+` exceeded`,L.ERR_BAD_RESPONSE,e,E);r&&r(t)},()=>{i&&i(),D&&D()}),t)}v||=`text`;let k=await m[N.findKey(m,v)||`text`](u,e);if(w&&!p&&!d){let t;if(k!=null&&(typeof k.byteLength==`number`?t=k.byteLength:typeof k.size==`number`?t=k.size:typeof k==`string`&&(t=typeof r==`function`?new r().encode(k).byteLength:k.length)),typeof t==`number`&&t>S)throw new L(`maxContentLength size of `+S+` exceeded`,L.ERR_BAD_RESPONSE,e,E)}return!d&&D&&D(),await new Promise((t,n)=>{bt(t,n,{data:k,headers:I.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:E})})}catch(t){if(D&&D(),T&&T.aborted&&T.reason instanceof L){let n=T.reason;throw n.config=e,E&&(n.request=E),t!==n&&(n.cause=t),n}throw t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)?Object.assign(new L(`Network Error`,L.ERR_NETWORK,e,E,t&&t.response),{cause:t.cause||t}):L.from(t,t&&t.code,e,E,t&&t.response)}}},qt=new Map,Jt=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=qt;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:Kt(t)),l=c;return c};Jt();var Yt={http:null,xhr:It,fetch:{get:Jt}};N.forEach(Yt,(e,t)=>{if(e){try{Object.defineProperty(e,`name`,{__proto__:null,value:t})}catch{}Object.defineProperty(e,`adapterName`,{__proto__:null,value:t})}});var Xt=e=>`- ${e}`,Zt=e=>N.isFunction(e)||e===null||e===!1;function Qt(e,t){e=N.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o<n;o++){r=e[o];let n;if(i=r,!Zt(r)&&(i=Yt[(n=String(r)).toLowerCase()],i===void 0))throw new L(`Unknown adapter '${n}'`);if(i&&(N.isFunction(i)||(i=i.get(t))))break;a[n||`#`+o]=i}if(!i){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new L(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since :
|
|
`+e.map(Xt).join(`
|
|
`):` `+Xt(e[0]):`as no adapter specified`),`ERR_NOT_SUPPORT`)}return i}var $t={getAdapter:Qt,adapters:Yt};function en(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new U(null,e)}function tn(e){return en(e),e.headers=I.from(e.headers),e.data=vt.call(e,e.transformRequest),[`post`,`put`,`patch`].indexOf(e.method)!==-1&&e.headers.setContentType(`application/x-www-form-urlencoded`,!1),$t.getAdapter(e.adapter||H.adapter,e)(e).then(function(t){en(e),e.response=t;try{t.data=vt.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=I.from(t.headers),t},function(t){if(!yt(t)&&(en(e),t&&t.response)){e.response=t.response;try{t.response.data=vt.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=I.from(t.response.headers)}return Promise.reject(t)})}var q={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{q[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});var nn={};q.transitional=function(e,t,n){function r(e,t){return`[Axios v`+Ut+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new L(r(i,` has been removed`+(t?` in `+t:``)),L.ERR_DEPRECATED);return t&&!nn[i]&&(nn[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),e?e(n,i,a):!0}},q.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function rn(e,t,n){if(typeof e!=`object`)throw new L(`options must be an object`,L.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-- >0;){let a=r[i],o=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new L(`option `+a+` must be `+n,L.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new L(`Unknown option `+a,L.ERR_BAD_OPTION)}}var J={assertOptions:rn,validators:q},Y=J.validators,X=class{constructor(e){this.defaults=e||{},this.interceptors={request:new at,response:new at}}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=Error();let n=(()=>{if(!t.stack)return``;let e=t.stack.indexOf(`
|
|
`);return e===-1?``:t.stack.slice(e+1)})();try{if(!e.stack)e.stack=n;else if(n){let t=n.indexOf(`
|
|
`),r=t===-1?-1:n.indexOf(`
|
|
`,t+1),i=r===-1?``:n.slice(r+1);String(e.stack).endsWith(i)||(e.stack+=`
|
|
`+n)}}catch{}}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=G(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&J.assertOptions(n,{silentJSONParsing:Y.transitional(Y.boolean),forcedJSONParsing:Y.transitional(Y.boolean),clarifyTimeoutError:Y.transitional(Y.boolean),legacyInterceptorReqResOrdering:Y.transitional(Y.boolean)},!1),r!=null&&(N.isFunction(r)?t.paramsSerializer={serialize:r}:J.assertOptions(r,{encode:Y.function,serialize:Y.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),J.assertOptions(t,{baseUrl:Y.spelling(`baseURL`),withXsrfToken:Y.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&N.merge(i.common,i[t.method]);i&&N.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`,`common`],e=>{delete i[e]}),t.headers=I.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s&&=e.synchronous;let n=t.transitional||ot;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[tn.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=tn.call(this,f)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=G(this.defaults,e),it(At(e.baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};N.forEach([`delete`,`get`,`head`,`options`],function(e){X.prototype[e]=function(t,n){return this.request(G(n||{},{method:e,url:t,data:(n||{}).data}))}}),N.forEach([`post`,`put`,`patch`,`query`],function(e){function t(t){return function(n,r,i){return this.request(G(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}X.prototype[e]=t(),e!==`query`&&(X.prototype[e+`Form`]=t(!0))});var an=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let 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,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new U(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function on(e){return function(t){return e.apply(null,t)}}function sn(e){return N.isObject(e)&&e.isAxiosError===!0}var cn={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(cn).forEach(([e,t])=>{cn[t]=e});function ln(e){let t=new X(e),n=r(X.prototype.request,t);return N.extend(n,X.prototype,t,{allOwnKeys:!0}),N.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return ln(G(e,t))},n}var Z=ln(H);Z.Axios=X,Z.CanceledError=U,Z.CancelToken=an,Z.isCancel=yt,Z.VERSION=Ut,Z.toFormData=R,Z.AxiosError=L,Z.Cancel=Z.CanceledError,Z.all=function(e){return Promise.all(e)},Z.spread=on,Z.isAxiosError=sn,Z.mergeConfig=G,Z.AxiosHeaders=I,Z.formToJSON=e=>gt(N.isHTMLForm(e)?new FormData(e):e),Z.getAdapter=$t.getAdapter,Z.HttpStatusCode=cn,Z.default=Z;var Q={products:`products.json`,stores:`stores.json`,slots:`slots.json`,essentialConsts:`essential-consts.json`,banners:`banners.json`},un=()=>{let e=n.common.essentialConsts.useQuery(void 0,{refetchInterval:6e4});return{...e,refetch:e.refetch}};function $(e){let{data:t}=un(),n=t?.assetsDomain,r=t?.apiCacheKey,i=t?.cacheVersion;return!n||!r||i==null?null:`${n}${r}/v-${i}/${e}`}function dn(){let e=$(Q.products);return t({queryKey:[`all-products`,e],queryFn:async()=>{if(!e)throw Error(`Cache URL not available`);return(await Z.get(e)).data},staleTime:6e4,enabled:!!e})}function fn(){let e=$(Q.stores);return t({queryKey:[`stores`,e],queryFn:async()=>{if(!e)throw Error(`Cache URL not available`);return(await Z.get(e)).data},staleTime:6e4,enabled:!!e})}function pn(){let e=$(Q.slots);return t({queryKey:[`slots`,e],queryFn:async()=>{if(!e)throw Error(`Cache URL not available`);return(await Z.get(e+`?v=123`)).data},staleTime:6e4,enabled:!!e})}function mn(){let e=$(Q.banners);return t({queryKey:[`banners`,e],queryFn:async()=>{if(!e)throw Error(`Cache URL not available`);return(await Z.get(e)).data},staleTime:6e4,enabled:!!e})}function hn(e){let{data:n}=un(),r=n?.assetsDomain,i=n?.apiCacheKey,a=n?.cacheVersion,o=r&&i?`${r}${i}/v-${a}/stores/${e}.json`:null;return t({queryKey:[`store-with-products`,e,o],queryFn:async()=>{if(!o)throw Error(`Cache URL not available`);return(await Z.get(o)).data},staleTime:6e4,enabled:!!o})}export{fn as a,hn as i,mn as n,pn as r,dn as t};
|