@vtj/utils 0.7.25 → 0.7.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +11 -7
- package/dist/index.iife.js +30 -26
- package/dist/index.mjs +1170 -610
- package/dist/index.umd.js +31 -27
- package/package.json +5 -5
- package/types/request.d.ts +6 -0
- package/types/version.d.ts +2 -2
package/dist/index.cjs
CHANGED
|
@@ -2,11 +2,15 @@
|
|
|
2
2
|
* Copyright (c) 2024, VTJ.PRO All rights reserved.
|
|
3
3
|
* @name @vtj/utils
|
|
4
4
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
5
|
-
* @version 0.7.
|
|
5
|
+
* @version 0.7.27
|
|
6
6
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
7
|
-
*/const rt="0.7.25";function xe(e,t){return function(){return e.apply(t,arguments)}}const{toString:st}=Object.prototype,{getPrototypeOf:ie}=Object,q=(e=>t=>{const n=st.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),x=e=>(e=e.toLowerCase(),t=>q(t)===e),M=e=>t=>typeof t===e,{isArray:N}=Array,F=M("undefined");function ot(e){return e!==null&&!F(e)&&e.constructor!==null&&!F(e.constructor)&&A(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ce=x("ArrayBuffer");function it(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ce(e.buffer),t}const at=M("string"),A=M("function"),_e=M("number"),J=e=>e!==null&&typeof e=="object",ct=e=>e===!0||e===!1,B=e=>{if(q(e)!=="object")return!1;const t=ie(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},ut=x("Date"),lt=x("File"),ft=x("Blob"),dt=x("FileList"),pt=e=>J(e)&&A(e.pipe),ht=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||A(e.append)&&((t=q(e))==="formdata"||t==="object"&&A(e.toString)&&e.toString()==="[object FormData]"))},mt=x("URLSearchParams"),yt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function k(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),N(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let c;for(r=0;r<i;r++)c=o[r],t.call(null,e[c],c,e)}}function Pe(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const je=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ne=e=>!F(e)&&e!==je;function Q(){const{caseless:e}=Ne(this)&&this||{},t={},n=(r,s)=>{const o=e&&Pe(t,s)||s;B(t[o])&&B(r)?t[o]=Q(t[o],r):B(r)?t[o]=Q({},r):N(r)?t[o]=r.slice():t[o]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&k(arguments[r],n);return t}const gt=(e,t,n,{allOwnKeys:r}={})=>(k(t,(s,o)=>{n&&A(s)?e[o]=xe(s,n):e[o]=s},{allOwnKeys:r}),e),wt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),bt=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Et=(e,t,n,r)=>{let s,o,i;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=n!==!1&&ie(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},St=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Rt=e=>{if(!e)return null;if(N(e))return e;let t=e.length;if(!_e(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Ot=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ie(Uint8Array)),At=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},Tt=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},xt=x("HTMLFormElement"),Ct=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),pe=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),_t=x("RegExp"),Le=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};k(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},Pt=e=>{Le(e,(t,n)=>{if(A(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(A(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},jt=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return N(e)?r(e):r(String(e).split(t)),n},Nt=()=>{},Lt=(e,t)=>(e=+e,Number.isFinite(e)?e:t),V="abcdefghijklmnopqrstuvwxyz",he="0123456789",Fe={DIGIT:he,ALPHA:V,ALPHA_DIGIT:V+V.toUpperCase()+he},Ft=(e=16,t=Fe.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function kt(e){return!!(e&&A(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Dt=e=>{const t=new Array(10),n=(r,s)=>{if(J(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const o=N(r)?[]:{};return k(r,(i,c)=>{const f=n(i,s+1);!F(f)&&(o[c]=f)}),t[s]=void 0,o}}return r};return n(e,0)},Ut=x("AsyncFunction"),Bt=e=>e&&(J(e)||A(e))&&A(e.then)&&A(e.catch),a={isArray:N,isArrayBuffer:Ce,isBuffer:ot,isFormData:ht,isArrayBufferView:it,isString:at,isNumber:_e,isBoolean:ct,isObject:J,isPlainObject:B,isUndefined:F,isDate:ut,isFile:lt,isBlob:ft,isRegExp:_t,isFunction:A,isStream:pt,isURLSearchParams:mt,isTypedArray:Ot,isFileList:dt,forEach:k,merge:Q,extend:gt,trim:yt,stripBOM:wt,inherits:bt,toFlatObject:Et,kindOf:q,kindOfTest:x,endsWith:St,toArray:Rt,forEachEntry:At,matchAll:Tt,isHTMLForm:xt,hasOwnProperty:pe,hasOwnProp:pe,reduceDescriptors:Le,freezeMethods:Pt,toObjectSet:jt,toCamelCase:Ct,noop:Nt,toFiniteNumber:Lt,findKey:Pe,global:je,isContextDefined:Ne,ALPHABET:Fe,generateString:Ft,isSpecCompliantForm:kt,toJSONObject:Dt,isAsyncFn:Ut,isThenable:Bt};function m(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s)}a.inherits(m,Error,{toJSON:function(){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:a.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const ke=m.prototype,De={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{De[e]={value:e}});Object.defineProperties(m,De);Object.defineProperty(ke,"isAxiosError",{value:!0});m.from=(e,t,n,r,s,o)=>{const i=Object.create(ke);return a.toFlatObject(e,i,function(f){return f!==Error.prototype},c=>c!=="isAxiosError"),m.call(i,e.message,t,n,r,s),i.cause=e,i.name=e.name,o&&Object.assign(i,o),i};const vt=null;function Y(e){return a.isPlainObject(e)||a.isArray(e)}function Ue(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function me(e,t,n){return e?e.concat(t).map(function(s,o){return s=Ue(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function It(e){return a.isArray(e)&&!e.some(Y)}const Ht=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function z(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,E){return!a.isUndefined(E[h])});const r=n.metaTokens,s=n.visitor||l,o=n.dots,i=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function d(p){if(p===null)return"";if(a.isDate(p))return p.toISOString();if(!f&&a.isBlob(p))throw new m("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(p)||a.isTypedArray(p)?f&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function l(p,h,E){let w=p;if(p&&!E&&typeof p=="object"){if(a.endsWith(h,"{}"))h=r?h:h.slice(0,-2),p=JSON.stringify(p);else if(a.isArray(p)&&It(p)||(a.isFileList(p)||a.endsWith(h,"[]"))&&(w=a.toArray(p)))return h=Ue(h),w.forEach(function(S,$){!(a.isUndefined(S)||S===null)&&t.append(i===!0?me([h],$,o):i===null?h:h+"[]",d(S))}),!1}return Y(p)?!0:(t.append(me(E,h,o),d(p)),!1)}const u=[],y=Object.assign(Ht,{defaultVisitor:l,convertValue:d,isVisitable:Y});function g(p,h){if(!a.isUndefined(p)){if(u.indexOf(p)!==-1)throw Error("Circular reference detected in "+h.join("."));u.push(p),a.forEach(p,function(w,O){(!(a.isUndefined(w)||w===null)&&s.call(t,w,a.isString(O)?O.trim():O,h,y))===!0&&g(w,h?h.concat(O):[O])}),u.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return g(e),t}function ye(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function ae(e,t){this._pairs=[],e&&z(e,this,t)}const Be=ae.prototype;Be.append=function(t,n){this._pairs.push([t,n])};Be.toString=function(t){const n=t?function(r){return t.call(this,r,ye)}:ye;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function qt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ve(e,t,n){if(!t)return e;const r=n&&n.encode||qt,s=n&&n.serialize;let o;if(s?o=s(t,n):o=a.isURLSearchParams(t)?t.toString():new ae(t,n).toString(r),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class ge{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Ie={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Mt=typeof URLSearchParams<"u"?URLSearchParams:ae,Jt=typeof FormData<"u"?FormData:null,zt=typeof Blob<"u"?Blob:null,Wt={isBrowser:!0,classes:{URLSearchParams:Mt,FormData:Jt,Blob:zt},protocols:["http","https","file","blob","url","data"]},He=typeof window<"u"&&typeof document<"u",$t=(e=>He&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),Vt=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Kt=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:He,hasStandardBrowserEnv:$t,hasStandardBrowserWebWorkerEnv:Vt},Symbol.toStringTag,{value:"Module"})),T={...Kt,...Wt};function Gt(e,t){return z(e,new T.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,o){return T.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Xt(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Qt(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],t[o]=e[o];return t}function qe(e){function t(n,r,s,o){let i=n[o++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),f=o>=n.length;return i=!i&&a.isArray(s)?s.length:i,f?(a.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!c):((!s[i]||!a.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&a.isArray(s[i])&&(s[i]=Qt(s[i])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(Xt(r),s,n,0)}),n}return null}function Yt(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ce={transitional:Ie,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=a.isObject(t);if(o&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(qe(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Gt(t,this.formSerializer).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return z(c?{"files[]":t}:t,f&&new f,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),Yt(t)):t}],transformResponse:[function(t){const n=this.transitional||ce.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(t&&a.isString(t)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(c){if(i)throw c.name==="SyntaxError"?m.from(c,m.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:T.classes.FormData,Blob:T.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{ce.headers[e]={}});const ue=ce,Zt=a.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"]),en=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
`):" "+Ee(o[0]):"as no adapter specified";throw new m("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:Z};function X(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new D(null,e)}function Se(e){return X(e),e.headers=C.from(e.headers),e.data=G.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ze.getAdapter(e.adapter||ue.adapter)(e).then(function(r){return X(e),r.data=G.call(e,e.transformResponse,r),r.headers=C.from(r.headers),r},function(r){return Me(r)||(X(e),r&&r.response&&(r.response.data=G.call(e,e.transformResponse,r.response),r.response.headers=C.from(r.response.headers))),Promise.reject(r)})}const Re=e=>e instanceof C?e.toJSON():e;function P(e,t){t=t||{};const n={};function r(d,l,u){return a.isPlainObject(d)&&a.isPlainObject(l)?a.merge.call({caseless:u},d,l):a.isPlainObject(l)?a.merge({},l):a.isArray(l)?l.slice():l}function s(d,l,u){if(a.isUndefined(l)){if(!a.isUndefined(d))return r(void 0,d,u)}else return r(d,l,u)}function o(d,l){if(!a.isUndefined(l))return r(void 0,l)}function i(d,l){if(a.isUndefined(l)){if(!a.isUndefined(d))return r(void 0,d)}else return r(void 0,l)}function c(d,l,u){if(u in t)return r(d,l);if(u in e)return r(void 0,d)}const f={url:o,method:o,data:o,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,responseEncoding:i,validateStatus:c,headers:(d,l)=>s(Re(d),Re(l),!0)};return a.forEach(Object.keys(Object.assign({},e,t)),function(l){const u=f[l]||s,y=u(e[l],t[l],l);a.isUndefined(y)&&u!==c||(n[l]=y)}),n}const We="1.6.7",le={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{le[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Oe={};le.transitional=function(t,n,r){function s(o,i){return"[Axios v"+We+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,c)=>{if(t===!1)throw new m(s(i," has been removed"+(n?" in "+n:"")),m.ERR_DEPRECATED);return n&&!Oe[i]&&(Oe[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,c):!0}};function yn(e,t,n){if(typeof e!="object")throw new m("options must be an object",m.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const c=e[o],f=c===void 0||i(c,o,e);if(f!==!0)throw new m("option "+o+" must be "+f,m.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new m("Unknown option "+o,m.ERR_BAD_OPTION)}}const ee={assertOptions:yn,validators:le},_=ee.validators;class H{constructor(t){this.defaults=t,this.interceptors={request:new ge,response:new ge}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
12
|
-
`+o):r.stack=o}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=P(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&ee.assertOptions(r,{silentJSONParsing:_.transitional(_.boolean),forcedJSONParsing:_.transitional(_.boolean),clarifyTimeoutError:_.transitional(_.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:ee.assertOptions(s,{encode:_.function,serialize:_.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&a.merge(o.common,o[n.method]);o&&a.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),n.headers=C.concat(i,o);const c=[];let f=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(f=f&&h.synchronous,c.unshift(h.fulfilled,h.rejected))});const d=[];this.interceptors.response.forEach(function(h){d.push(h.fulfilled,h.rejected)});let l,u=0,y;if(!f){const p=[Se.bind(this),void 0];for(p.unshift.apply(p,c),p.push.apply(p,d),y=p.length,l=Promise.resolve(n);u<y;)l=l.then(p[u++],p[u++]);return l}y=c.length;let g=n;for(u=0;u<y;){const p=c[u++],h=c[u++];try{g=p(g)}catch(E){h.call(this,E);break}}try{l=Se.call(this,g)}catch(p){return Promise.reject(p)}for(u=0,y=d.length;u<y;)l=l.then(d[u++],d[u++]);return l}getUri(t){t=P(this.defaults,t);const n=Je(t.baseURL,t.url);return ve(n,t.params,t.paramsSerializer)}}a.forEach(["delete","get","head","options"],function(t){H.prototype[t]=function(n,r){return this.request(P(r||{},{method:t,url:n,data:(r||{}).data}))}});a.forEach(["post","put","patch"],function(t){function n(r){return function(o,i,c){return this.request(P(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}H.prototype[t]=n(),H.prototype[t+"Form"]=n(!0)});const I=H;class fe{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(c=>{r.subscribe(c),o=c}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,c){r.reason||(r.reason=new D(o,i,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new fe(function(s){t=s}),cancel:t}}}const gn=fe;function wn(e){return function(n){return e.apply(null,n)}}function bn(e){return a.isObject(e)&&e.isAxiosError===!0}const te={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};Object.entries(te).forEach(([e,t])=>{te[t]=e});const En=te;function $e(e){const t=new I(e),n=xe(I.prototype.request,t);return a.extend(n,I.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return $e(P(e,s))},n}const b=$e(ue);b.Axios=I;b.CanceledError=D;b.CancelToken=gn;b.isCancel=Me;b.VERSION=We;b.toFormData=z;b.AxiosError=m;b.Cancel=b.CanceledError;b.all=function(t){return Promise.all(t)};b.spread=wn;b.isAxiosError=bn;b.mergeConfig=P;b.AxiosHeaders=C;b.formToJSON=e=>qe(a.isHTMLForm(e)?new FormData(e):e);b.getAdapter=ze.getAdapter;b.HttpStatusCode=En;b.default=b;const Sn={form:"application/x-www-form-urlencoded",json:"application/json",data:"multipart/form-data"},Rn=["put","post","patch"],ne="Local-Request-Id",On=200,An=500;class Ve{axios;settings;records={};isLoading=!1;stopSkipWarn;showLoading;showError;constructor(t={}){this.settings=t.settings||{};const n=R.omit(t,["settings"]);this.axios=b.create(R.merge({headers:{"Content-Type":"application/x-www-form-urlencoded"},timeout:2*60*1e3},n)),this.setupSkipWarn(this.settings),this.showLoading=R.debounce(this.openLoading.bind(this),On),this.showError=R.throttle(this._showError.bind(this),An,{leading:!0,trailing:!1})}setConfig(t={}){this.settings=R.merge(this.settings,t.settings||{});const n=R.omit(t,["settings"]);this.axios.defaults=R.merge(this.axios.defaults,n),this.setupSkipWarn(this.settings)}cancel(t,n="请求已取消"){if(t){const r=this.records[t];if(!r)return;r.source.cancel(n)}else for(const r of Object.values(this.records))r.source.cancel(n)}createHeaders(t,n,r){const s=n.injectHeaders?typeof n.headers=="function"?n.headers(t,r,n):n.headers||{}:{},o={"Content-Type":Sn[n.type||"form"],...r.headers,...s};return n.skipWarn&&(o[ne]=t),o}isJsonType(t){return Object.entries(t).some(([n,r])=>n.toLowerCase()==="content-type"&&String(r).includes("application/json"))}toFormData(t,n="data"){if(t instanceof FormData||t instanceof URLSearchParams)return t;const r=n==="data"?new FormData:new URLSearchParams;return Object.entries(t).forEach(([s,o])=>{r.append(s,o)}),r}createSendData(t,n,r,s){const{type:o,skipWarn:i}=t,{name:c="skipWarn"}=i||{};let{data:f,params:d,method:l="get"}=n;const u=s?{[c]:!0}:{};return Rn.includes(l.toLowerCase())?(f=Object.assign(f||{},u),f=o!=="json"||!this.isJsonType(r)?this.toFormData(f,o):f):d={...f,...d,...u},{data:f,params:d}}createUrl(t){const{url:n,query:r}=t;return r?R.template(n)(r):n}openLoading(t){const{loading:n,showLoading:r}=t;n&&r&&Object.keys(this.records).length>0&&(this.isLoading=!0,r())}closeLoading(t){const{loading:n,hideLoading:r}=t;if(!n)return;this.isLoading=!1;const s=Object.keys(this.records);r&&s.length===0&&(this.isLoading=!1,r())}_showError(t,n){const{failMessage:r,showError:s}=t;if(r&&s){const o=n?.message||n?.msg||"未知错误";s(o,n)}}validResponse(t,n){const{validSuccess:r,validate:s}=t;return r&&s?!!s(n):!0}isSkipWarnResponse(t){return!!t.promise}send(t={},n=!1){const r=R.merge({},this.settings,t.settings||{}),s=R.omit(t,["settings"]),o=R.uuid(!1),i=b.CancelToken.source();this.records[o]={settings:r,config:s,source:i};const c=this.createUrl(s),f=this.createHeaders(o,r,s),{data:d,params:l}=this.createSendData(r,s,f,n);return this.showLoading(r),new Promise((u,y)=>{this.axios({cancelToken:i.token,...s,url:c,headers:f,data:d,params:l}).then(g=>this.isSkipWarnResponse(g)?u(g.promise):this.validResponse(r,g)?u(r.originResponse?g:g.data?.data):(this.showError(r,g.data),y(g.data))).catch(g=>(this.showError(r,g),y(g))).finally(()=>{delete this.records[o],this.closeLoading(r)})})}useResponse(t,n){const{response:r}=this.axios.interceptors,s=r.use(t,n);return()=>r.eject(s)}useRequest(t,n){const{request:r}=this.axios.interceptors,s=r.use(t,n);return()=>r.eject(s)}setupSkipWarn(t){if(this.stopSkipWarn&&(this.stopSkipWarn(),this.stopSkipWarn=void 0),!t.skipWarn)return;const{code:n,executor:r,callback:s,complete:o}=t.skipWarn;this.stopSkipWarn=this.useResponse(i=>{const f=(i.config.headers||{})[ne],d=this.records[f];if(!d)return i;const{data:l}=i;if(!l||typeof l!="object")return i;if(l?.code===n){s&&s(i);const u=new Promise(r).then(()=>this.send({...d.config,settings:d.settings},!0));u.catch(y=>y).finally(()=>{o&&o()}),i.promise=u}return i})}}function Ke(e={}){const t=new Ve(e),n=t.send.bind(t),r=t.cancel.bind(t),s=t.setConfig.bind(t),o=t.useRequest.bind(t),i=t.useResponse.bind(t);return Object.assign(n,{...t,instance:t,send:n,cancel:r,setConfig:s,useRequest:o,useResponse:i})}const Ge=Ke({settings:{injectHeaders:!0,loading:!0,originResponse:!0}});function Xe(e){const t=typeof e=="string"?{url:e}:e;return(n,r)=>Ge.send(R.merge(t,r||{},{data:n}))}function Tn(e){const t={};for(const[n,r]of Object.entries(e))t[n]=Xe(r);return t}const j=typeof window<"u",xn=e=>new Promise((t,n)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>{t(r.result)},r.onerror=s=>{n(s)}}),Cn=e=>j?window.requestAnimationFrame(e):setTimeout(e,16),_n=e=>j?window.cancelAnimationFrame(e):clearTimeout(e);class Qe{options={type:"cache",expired:0,prefix:"__VTJ_"};caches={};types;constructor(t={}){this.types={local:j?window.localStorage:this.caches,session:j?window.sessionStorage:this.caches,cache:this.caches},this.config(t)}config(t={}){this.options=Object.assign(this.options,t)}save(t,n,r={}){const{type:s,expired:o,prefix:i}={...this.options,...r},c=Date.now(),f=i+t,d=this.types[s]||this.caches,l={value:n,timestamp:c,expired:o};d===this.caches?d[f]=l:d.setItem(f,JSON.stringify(l))}get(t,n={}){const{type:r,prefix:s}={...this.options,...n},o=s+t,i=this.types[r]||this.caches;let c;if(i===this.caches)c=i[o];else{const y=i.getItem(o);y&&(c=JSON.parse(y))}if(!c)return null;const{value:f,timestamp:d,expired:l}=c;return l>0&&d+l<Date.now()?(this.remove(t,n),null):f}remove(t,n={}){const{type:r,prefix:s}={...this.options,...n},o=this.types[r]||this.caches,i=s+t;o===this.caches?delete o[i]:o.removeItem(i)}clear(t={}){const{type:n}={...this.options,...t},r=this.types[n]||this.caches;r===this.caches?this.caches={}:r.clear()}}const Pn=new Qe;var jn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ye(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var re={exports:{}};(function(e,t){(function(n,r){r(t,e)})(jn,function(n,r){var s={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null};function o(){return"jsonp_"+Date.now()+"_"+Math.ceil(Math.random()*1e5)}function i(d){try{delete window[d]}catch{window[d]=void 0}}function c(d){var l=document.getElementById(d);l&&document.getElementsByTagName("head")[0].removeChild(l)}function f(d){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],u=d,y=l.timeout||s.timeout,g=l.jsonpCallback||s.jsonpCallback,p=void 0;return new Promise(function(h,E){var w=l.jsonpCallbackFunction||o(),O=g+"_"+w;window[w]=function($){h({ok:!0,json:function(){return Promise.resolve($)}}),p&&clearTimeout(p),c(O),i(w)},u+=u.indexOf("?")===-1?"?":"&";var S=document.createElement("script");S.setAttribute("src",""+u+g+"="+w),l.charset&&S.setAttribute("charset",l.charset),l.nonce&&S.setAttribute("nonce",l.nonce),l.referrerPolicy&&S.setAttribute("referrerPolicy",l.referrerPolicy),l.crossorigin&&S.setAttribute("crossorigin","true"),S.id=O,document.getElementsByTagName("head")[0].appendChild(S),p=setTimeout(function(){E(new Error("JSONP request to "+d+" timed out")),i(w),c(O),window[w]=function(){i(w)}},y),S.onerror=function(){E(new Error("JSONP request to "+d+" failed")),i(w),c(O),p&&clearTimeout(p)}})}r.exports=f})})(re,re.exports);var Nn=re.exports;const Ln=Ye(Nn);function Fn(e){if(j){const{protocol:t,host:n,pathname:r}=location;return`${t}//${n}${e?r:""}`}else return null}function kn(e=""){const t=e.match(R.rURL);return t?t[0]:""}function Ze(e){const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push([n,encodeURIComponent(e[n])].join("="));return t.join("&")}function se(e,t,n){const r={};e=(e||location.search).replace(/^[^]*\?/,""),t=t||"&",n=n||"=";let s;const o=new RegExp("(?:^|\\"+t+")([^\\"+n+"\\"+t+"]+)(?:\\"+n+"([^\\"+t+"]*))?","g");for(;(s=o.exec(e))!==null;)s[1]!==e&&(r[decodeURIComponent(s[1])]=decodeURIComponent(s[2]||""));return r}function et(e,t){t=typeof t=="string"?se(t):t;const n=e.split("?")[0],r=se(e),s=Object.assign({},r,t),o=Ze(s);return o?[n,o].join("?"):e}const Dn=Object.freeze(Object.defineProperty({__proto__:null,append:et,getCurrentHost:Fn,getHost:kn,parse:se,stringify:Ze},Symbol.toStringTag,{value:"Module"}));async function Un(e,t={}){const{query:n={}}=t;e.includes("${")&&(e=R.template(e)(n||{}));const r=et(e,n);return await(await Ln(r,t)).json()}var Bn=function(t,n,r){var s=document.head||document.getElementsByTagName("head")[0],o=document.createElement("script");typeof n=="function"&&(r=n,n={}),n=n||{},r=r||function(){},o.type=n.type||"text/javascript",o.charset=n.charset||"utf8",o.async="async"in n?!!n.async:!0,o.src=t,n.attrs&&vn(o,n.attrs),n.text&&(o.text=""+n.text);var i="onload"in o?Ae:In;i(o,r),o.onload||Ae(o,r),s.appendChild(o)};function vn(e,t){for(var n in t)e.setAttribute(n,t[n])}function Ae(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function In(e,t){e.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,t(null,e))}}const Hn=Ye(Bn);function qn(e,t={}){return new Promise((n,r)=>{const{library:s}=t;Hn(e,t,(o,i)=>{o?r(o):n(s?window[s]:void 0)})})}const Te={debug:-1,log:0,info:0,warn:1,error:2},Mn=function(e,t,n,r){return function(...s){if(t&&Te[t]<=Te[e]&&console[e].apply&&(r==="*"||n.startsWith(r)))return console[e].apply(console,Jn(s,n))}};function Jn(e,t){return t!=="*"&&(typeof e[0]=="string"?e[0]=`[${t}] ${e[0]}`:e=["["+t+"]"].concat(e)),e}function zn(e,t){if(!e)return{targetLevel:t.level,targetBizName:t.bizName};if(~e.indexOf(":")){const n=e.split(":");return{targetLevel:n[0],targetBizName:n[1]}}return{targetLevel:e,targetBizName:"*"}}const Wn={level:"warn",bizName:"*"};class tt{config;options;constructor(t){this.options={...Wn,...t};const n=typeof location<"u"?location:{},r=(/__(?:logConf|logLevel)__=([^#/&]*)/.exec(n.href)||[])[1];this.config=zn(r,t)}_log(t){const{targetLevel:n,targetBizName:r}=this.config,{bizName:s}=this.options;return Mn(t,n,s,r)}debug(...t){return this._log("debug")(...t)}log(...t){return this._log("log")(...t)}info(...t){return this._log("info")(...t)}warn(...t){return this._log("warn")(...t)}error(...t){return this._log("error")(...t)}}function nt(e){return new tt(e)}const $n=nt({level:"log",bizName:"VTJ"});/*! js-cookie v3.0.5 | MIT */function U(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var Vn={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function oe(e,t){function n(s,o,i){if(!(typeof document>"u")){i=U({},t,i),typeof i.expires=="number"&&(i.expires=new Date(Date.now()+i.expires*864e5)),i.expires&&(i.expires=i.expires.toUTCString()),s=encodeURIComponent(s).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var f in i)i[f]&&(c+="; "+f,i[f]!==!0&&(c+="="+i[f].split(";")[0]));return document.cookie=s+"="+e.write(o,s)+c}}function r(s){if(!(typeof document>"u"||arguments.length&&!s)){for(var o=document.cookie?document.cookie.split("; "):[],i={},c=0;c<o.length;c++){var f=o[c].split("="),d=f.slice(1).join("=");try{var l=decodeURIComponent(f[0]);if(i[l]=e.read(d,l),s===l)break}catch{}}return s?i[s]:i}}return Object.create({set:n,get:r,remove:function(s,o){n(s,"",U({},o,{expires:-1}))},withAttributes:function(s){return oe(this.converter,U({},this.attributes,s))},withConverter:function(s){return oe(U({},this.converter,s),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var de=oe(Vn,{path:"/"});function Kn(e,t,n){de.set(e,t,n)}function Gn(e){return de.get(e)}function Xn(e,t){de.remove(e,t)}const Qn=Object.freeze(Object.defineProperty({__proto__:null,get:Gn,remove:Xn,set:Kn},Symbol.toStringTag,{value:"Module"}));exports.LOCAL_REQUEST_ID=ne;exports.Logger=tt;exports.Request=Ve;exports.Storage=Qe;exports.VTJ_UTILS_VERSION=rt;exports.axios=b;exports.cAF=_n;exports.cookie=Qn;exports.createApi=Xe;exports.createApis=Tn;exports.createRequest=Ke;exports.fileToBase64=xn;exports.getLogger=nt;exports.isClient=j;exports.jsonp=Un;exports.loadScript=qn;exports.logger=$n;exports.rAF=Cn;exports.request=Ge;exports.storage=Pn;exports.url=Dn;Object.keys(R).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>R[e]})});
|
|
7
|
+
*/const cn="0.7.27";/**
|
|
8
|
+
* @vue/shared v3.4.21
|
|
9
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
10
|
+
* @license MIT
|
|
11
|
+
**/function un(e,t){const n=new Set(e.split(","));return t?r=>n.has(r.toLowerCase()):r=>n.has(r)}const ln=Object.prototype.hasOwnProperty,re=(e,t)=>ln.call(e,t),F=Array.isArray,Y=e=>dt(e)==="[object Map]",fn=e=>typeof e=="string",ae=e=>typeof e=="symbol",ce=e=>e!==null&&typeof e=="object",dn=Object.prototype.toString,dt=e=>dn.call(e),hn=e=>dt(e).slice(8,-1),Fe=e=>fn(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,M=(e,t)=>!Object.is(e,t);let pn;function mn(e,t=pn){t&&t.active&&t.effects.push(e)}let I;class gn{constructor(t,n,r,s){this.fn=t,this.trigger=n,this.scheduler=r,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,mn(this,s)}get dirty(){if(this._dirtyLevel===2||this._dirtyLevel===3){this._dirtyLevel=1,mt();for(let t=0;t<this._depsLength;t++){const n=this.deps[t];if(n.computed&&(yn(n.computed),this._dirtyLevel>=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),gt()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=j,n=I;try{return j=!0,I=this,this._runnings++,$e(this),this.fn()}finally{Ke(this),this._runnings--,I=n,j=t}}stop(){var t;this.active&&($e(this),Ke(this),(t=this.onStop)==null||t.call(this),this.active=!1)}}function yn(e){return e.value}function $e(e){e._trackId++,e._depsLength=0}function Ke(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)ht(e.deps[t],e);e.deps.length=e._depsLength}}function ht(e,t){const n=e.get(t);n!==void 0&&t._trackId!==n&&(e.delete(t),e.size===0&&e.cleanup())}let j=!0,Ee=0;const pt=[];function mt(){pt.push(j),j=!1}function gt(){const e=pt.pop();j=e===void 0?!0:e}function Ie(){Ee++}function De(){for(Ee--;!Ee&&Se.length;)Se.shift()()}function yt(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const r=e.deps[e._depsLength];r!==t?(r&&ht(r,e),e.deps[e._depsLength++]=t):e._depsLength++}}const Se=[];function wt(e,t,n){Ie();for(const r of e.keys()){let s;r._dirtyLevel<t&&(s??(s=e.get(r)===r._trackId))&&(r._shouldSchedule||(r._shouldSchedule=r._dirtyLevel===0),r._dirtyLevel=t),r._shouldSchedule&&(s??(s=e.get(r)===r._trackId))&&(r.trigger(),(!r._runnings||r.allowRecurse)&&r._dirtyLevel!==2&&(r._shouldSchedule=!1,r.scheduler&&Se.push(r.scheduler)))}De()}const bt=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},Re=new WeakMap,D=Symbol(""),Oe=Symbol("");function A(e,t,n){if(j&&I){let r=Re.get(e);r||Re.set(e,r=new Map);let s=r.get(n);s||r.set(n,s=bt(()=>r.delete(n))),yt(I,s)}}function N(e,t,n,r,s,o){const i=Re.get(e);if(!i)return;let a=[];if(t==="clear")a=[...i.values()];else if(n==="length"&&F(e)){const f=Number(r);i.forEach((d,l)=>{(l==="length"||!ae(l)&&l>=f)&&a.push(d)})}else switch(n!==void 0&&a.push(i.get(n)),t){case"add":F(e)?Fe(n)&&a.push(i.get("length")):(a.push(i.get(D)),Y(e)&&a.push(i.get(Oe)));break;case"delete":F(e)||(a.push(i.get(D)),Y(e)&&a.push(i.get(Oe)));break;case"set":Y(e)&&a.push(i.get(D));break}Ie();for(const f of a)f&&wt(f,4);De()}const wn=un("__proto__,__v_isRef,__isVue"),_t=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ae)),Ve=bn();function bn(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=y(this);for(let o=0,i=this.length;o<i;o++)A(r,"get",o+"");const s=r[t](...n);return s===-1||s===!1?r[t](...n.map(y)):s}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){mt(),Ie();const r=y(this)[t].apply(this,n);return De(),gt(),r}}),e}function _n(e){const t=y(this);return A(t,"has",e),t.hasOwnProperty(e)}class Et{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){const s=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return o;if(n==="__v_raw")return r===(s?o?Nn:Ot:o?jn:Rt).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const i=F(t);if(!s){if(i&&re(Ve,n))return Reflect.get(Ve,n,r);if(n==="hasOwnProperty")return _n}const a=Reflect.get(t,n,r);return(ae(n)?_t.has(n):wn(n))||(s||A(t,"get",n),o)?a:oe(a)?i&&Fe(n)?a:a.value:ce(a)?s?At(a):Tt(a):a}}class En extends Et{constructor(t=!1){super(!1,t)}set(t,n,r,s){let o=t[n];if(!this._isShallow){const f=se(o);if(!Ct(r)&&!se(r)&&(o=y(o),r=y(r)),!F(t)&&oe(o)&&!oe(r))return f?!1:(o.value=r,!0)}const i=F(t)&&Fe(n)?Number(n)<t.length:re(t,n),a=Reflect.set(t,n,r,s);return t===y(s)&&(i?M(r,o)&&N(t,"set",n,r):N(t,"add",n,r)),a}deleteProperty(t,n){const r=re(t,n);t[n];const s=Reflect.deleteProperty(t,n);return s&&r&&N(t,"delete",n,void 0),s}has(t,n){const r=Reflect.has(t,n);return(!ae(n)||!_t.has(n))&&A(t,"has",n),r}ownKeys(t){return A(t,"iterate",F(t)?"length":D),Reflect.ownKeys(t)}}class Sn extends Et{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Rn=new En,On=new Sn,Ue=e=>e,ue=e=>Reflect.getPrototypeOf(e);function $(e,t,n=!1,r=!1){e=e.__v_raw;const s=y(e),o=y(t);n||(M(t,o)&&A(s,"get",t),A(s,"get",o));const{has:i}=ue(s),a=r?Ue:n?Be:q;if(i.call(s,t))return a(e.get(t));if(i.call(s,o))return a(e.get(o));e!==s&&e.get(t)}function K(e,t=!1){const n=this.__v_raw,r=y(n),s=y(e);return t||(M(e,s)&&A(r,"has",e),A(r,"has",s)),e===s?n.has(e):n.has(e)||n.has(s)}function V(e,t=!1){return e=e.__v_raw,!t&&A(y(e),"iterate",D),Reflect.get(e,"size",e)}function Ge(e){e=y(e);const t=y(this);return ue(t).has.call(t,e)||(t.add(e),N(t,"add",e,e)),this}function Xe(e,t){t=y(t);const n=y(this),{has:r,get:s}=ue(n);let o=r.call(n,e);o||(e=y(e),o=r.call(n,e));const i=s.call(n,e);return n.set(e,t),o?M(t,i)&&N(n,"set",e,t):N(n,"add",e,t),this}function Qe(e){const t=y(this),{has:n,get:r}=ue(t);let s=n.call(t,e);s||(e=y(e),s=n.call(t,e)),r&&r.call(t,e);const o=t.delete(e);return s&&N(t,"delete",e,void 0),o}function Ye(){const e=y(this),t=e.size!==0,n=e.clear();return t&&N(e,"clear",void 0,void 0),n}function G(e,t){return function(r,s){const o=this,i=o.__v_raw,a=y(i),f=t?Ue:e?Be:q;return!e&&A(a,"iterate",D),i.forEach((d,l)=>r.call(s,f(d),f(l),o))}}function X(e,t,n){return function(...r){const s=this.__v_raw,o=y(s),i=Y(o),a=e==="entries"||e===Symbol.iterator&&i,f=e==="keys"&&i,d=s[e](...r),l=n?Ue:t?Be:q;return!t&&A(o,"iterate",f?Oe:D),{next(){const{value:u,done:g}=d.next();return g?{value:u,done:g}:{value:a?[l(u[0]),l(u[1])]:l(u),done:g}},[Symbol.iterator](){return this}}}}function L(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Tn(){const e={get(o){return $(this,o)},get size(){return V(this)},has:K,add:Ge,set:Xe,delete:Qe,clear:Ye,forEach:G(!1,!1)},t={get(o){return $(this,o,!1,!0)},get size(){return V(this)},has:K,add:Ge,set:Xe,delete:Qe,clear:Ye,forEach:G(!1,!0)},n={get(o){return $(this,o,!0)},get size(){return V(this,!0)},has(o){return K.call(this,o,!0)},add:L("add"),set:L("set"),delete:L("delete"),clear:L("clear"),forEach:G(!0,!1)},r={get(o){return $(this,o,!0,!0)},get size(){return V(this,!0)},has(o){return K.call(this,o,!0)},add:L("add"),set:L("set"),delete:L("delete"),clear:L("clear"),forEach:G(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=X(o,!1,!1),n[o]=X(o,!0,!1),t[o]=X(o,!1,!0),r[o]=X(o,!0,!0)}),[e,n,t,r]}const[An,xn,Cn,Pn]=Tn();function St(e,t){const n=t?e?Pn:Cn:e?xn:An;return(r,s,o)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?r:Reflect.get(re(n,s)&&s in r?n:r,s,o)}const Ln={get:St(!1,!1)},vn={get:St(!0,!1)},Rt=new WeakMap,jn=new WeakMap,Ot=new WeakMap,Nn=new WeakMap;function Fn(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function In(e){return e.__v_skip||!Object.isExtensible(e)?0:Fn(hn(e))}function Tt(e){return se(e)?e:xt(e,!1,Rn,Ln,Rt)}function At(e){return xt(e,!0,On,vn,Ot)}function xt(e,t,n,r,s){if(!ce(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=s.get(e);if(o)return o;const i=In(e);if(i===0)return e;const a=new Proxy(e,i===2?r:n);return s.set(e,a),a}function se(e){return!!(e&&e.__v_isReadonly)}function Ct(e){return!!(e&&e.__v_isShallow)}function y(e){const t=e&&e.__v_raw;return t?y(t):e}const q=e=>ce(e)?Tt(e):e,Be=e=>ce(e)?At(e):e;class Dn{constructor(t,n,r,s){this.getter=t,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new gn(()=>t(this._value),()=>Z(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=r}get value(){const t=y(this);return(!t._cacheable||t.effect.dirty)&&M(t._value,t._value=t.effect.run())&&Z(t,4),Pt(t),t.effect._dirtyLevel>=2&&Z(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function Pt(e){var t;j&&I&&(e=y(e),yt(I,(t=e.dep)!=null?t:e.dep=bt(()=>e.dep=void 0,e instanceof Dn?e:void 0)))}function Z(e,t=4,n){e=y(e);const r=e.dep;r&&wt(r,t)}function oe(e){return!!(e&&e.__v_isRef===!0)}function ge(e){return Un(e,!1)}function Un(e,t){return oe(e)?e:new Bn(e,t)}class Bn{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:y(t),this._value=n?t:q(t)}get value(){return Pt(this),this._value}set value(t){const n=this.__v_isShallow||Ct(t)||se(t);t=n?t:y(t),M(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:q(t),Z(this,4))}}function Lt(e,t){return function(){return e.apply(t,arguments)}}const{toString:Mn}=Object.prototype,{getPrototypeOf:Me}=Object,le=(e=>t=>{const n=Mn.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),C=e=>(e=e.toLowerCase(),t=>le(t)===e),fe=e=>t=>typeof t===e,{isArray:k}=Array,z=fe("undefined");function kn(e){return e!==null&&!z(e)&&e.constructor!==null&&!z(e.constructor)&&T(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const vt=C("ArrayBuffer");function Hn(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&vt(e.buffer),t}const qn=fe("string"),T=fe("function"),jt=fe("number"),de=e=>e!==null&&typeof e=="object",zn=e=>e===!0||e===!1,ee=e=>{if(le(e)!=="object")return!1;const t=Me(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Wn=C("Date"),Jn=C("File"),$n=C("Blob"),Kn=C("FileList"),Vn=e=>de(e)&&T(e.pipe),Gn=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||T(e.append)&&((t=le(e))==="formdata"||t==="object"&&T(e.toString)&&e.toString()==="[object FormData]"))},Xn=C("URLSearchParams"),Qn=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function W(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),k(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(r=0;r<i;r++)a=o[r],t.call(null,e[a],a,e)}}function Nt(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const Ft=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,It=e=>!z(e)&&e!==Ft;function Te(){const{caseless:e}=It(this)&&this||{},t={},n=(r,s)=>{const o=e&&Nt(t,s)||s;ee(t[o])&&ee(r)?t[o]=Te(t[o],r):ee(r)?t[o]=Te({},r):k(r)?t[o]=r.slice():t[o]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&W(arguments[r],n);return t}const Yn=(e,t,n,{allOwnKeys:r}={})=>(W(t,(s,o)=>{n&&T(s)?e[o]=Lt(s,n):e[o]=s},{allOwnKeys:r}),e),Zn=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),er=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},tr=(e,t,n,r)=>{let s,o,i;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=n!==!1&&Me(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},nr=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},rr=e=>{if(!e)return null;if(k(e))return e;let t=e.length;if(!jt(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},sr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Me(Uint8Array)),or=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},ir=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},ar=C("HTMLFormElement"),cr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Ze=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ur=C("RegExp"),Dt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};W(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},lr=e=>{Dt(e,(t,n)=>{if(T(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(T(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},fr=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return k(e)?r(e):r(String(e).split(t)),n},dr=()=>{},hr=(e,t)=>(e=+e,Number.isFinite(e)?e:t),ye="abcdefghijklmnopqrstuvwxyz",et="0123456789",Ut={DIGIT:et,ALPHA:ye,ALPHA_DIGIT:ye+ye.toUpperCase()+et},pr=(e=16,t=Ut.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function mr(e){return!!(e&&T(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const gr=e=>{const t=new Array(10),n=(r,s)=>{if(de(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const o=k(r)?[]:{};return W(r,(i,a)=>{const f=n(i,s+1);!z(f)&&(o[a]=f)}),t[s]=void 0,o}}return r};return n(e,0)},yr=C("AsyncFunction"),wr=e=>e&&(de(e)||T(e))&&T(e.then)&&T(e.catch),c={isArray:k,isArrayBuffer:vt,isBuffer:kn,isFormData:Gn,isArrayBufferView:Hn,isString:qn,isNumber:jt,isBoolean:zn,isObject:de,isPlainObject:ee,isUndefined:z,isDate:Wn,isFile:Jn,isBlob:$n,isRegExp:ur,isFunction:T,isStream:Vn,isURLSearchParams:Xn,isTypedArray:sr,isFileList:Kn,forEach:W,merge:Te,extend:Yn,trim:Qn,stripBOM:Zn,inherits:er,toFlatObject:tr,kindOf:le,kindOfTest:C,endsWith:nr,toArray:rr,forEachEntry:or,matchAll:ir,isHTMLForm:ar,hasOwnProperty:Ze,hasOwnProp:Ze,reduceDescriptors:Dt,freezeMethods:lr,toObjectSet:fr,toCamelCase:cr,noop:dr,toFiniteNumber:hr,findKey:Nt,global:Ft,isContextDefined:It,ALPHABET:Ut,generateString:pr,isSpecCompliantForm:mr,toJSONObject:gr,isAsyncFn:yr,isThenable:wr};function m(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s)}c.inherits(m,Error,{toJSON:function(){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:c.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Bt=m.prototype,Mt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Mt[e]={value:e}});Object.defineProperties(m,Mt);Object.defineProperty(Bt,"isAxiosError",{value:!0});m.from=(e,t,n,r,s,o)=>{const i=Object.create(Bt);return c.toFlatObject(e,i,function(f){return f!==Error.prototype},a=>a!=="isAxiosError"),m.call(i,e.message,t,n,r,s),i.cause=e,i.name=e.name,o&&Object.assign(i,o),i};const br=null;function Ae(e){return c.isPlainObject(e)||c.isArray(e)}function kt(e){return c.endsWith(e,"[]")?e.slice(0,-2):e}function tt(e,t,n){return e?e.concat(t).map(function(s,o){return s=kt(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function _r(e){return c.isArray(e)&&!e.some(Ae)}const Er=c.toFlatObject(c,{},null,function(t){return/^is[A-Z]/.test(t)});function he(e,t,n){if(!c.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=c.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,E){return!c.isUndefined(E[p])});const r=n.metaTokens,s=n.visitor||l,o=n.dots,i=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(t);if(!c.isFunction(s))throw new TypeError("visitor must be a function");function d(h){if(h===null)return"";if(c.isDate(h))return h.toISOString();if(!f&&c.isBlob(h))throw new m("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(h)||c.isTypedArray(h)?f&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function l(h,p,E){let b=h;if(h&&!E&&typeof h=="object"){if(c.endsWith(p,"{}"))p=r?p:p.slice(0,-2),h=JSON.stringify(h);else if(c.isArray(h)&&_r(h)||(c.isFileList(h)||c.endsWith(p,"[]"))&&(b=c.toArray(h)))return p=kt(p),b.forEach(function(S,me){!(c.isUndefined(S)||S===null)&&t.append(i===!0?tt([p],me,o):i===null?p:p+"[]",d(S))}),!1}return Ae(h)?!0:(t.append(tt(E,p,o),d(h)),!1)}const u=[],g=Object.assign(Er,{defaultVisitor:l,convertValue:d,isVisitable:Ae});function w(h,p){if(!c.isUndefined(h)){if(u.indexOf(h)!==-1)throw Error("Circular reference detected in "+p.join("."));u.push(h),c.forEach(h,function(b,O){(!(c.isUndefined(b)||b===null)&&s.call(t,b,c.isString(O)?O.trim():O,p,g))===!0&&w(b,p?p.concat(O):[O])}),u.pop()}}if(!c.isObject(e))throw new TypeError("data must be an object");return w(e),t}function nt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function ke(e,t){this._pairs=[],e&&he(e,this,t)}const Ht=ke.prototype;Ht.append=function(t,n){this._pairs.push([t,n])};Ht.toString=function(t){const n=t?function(r){return t.call(this,r,nt)}:nt;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Sr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function qt(e,t,n){if(!t)return e;const r=n&&n.encode||Sr,s=n&&n.serialize;let o;if(s?o=s(t,n):o=c.isURLSearchParams(t)?t.toString():new ke(t,n).toString(r),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class rt{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){c.forEach(this.handlers,function(r){r!==null&&t(r)})}}const zt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Rr=typeof URLSearchParams<"u"?URLSearchParams:ke,Or=typeof FormData<"u"?FormData:null,Tr=typeof Blob<"u"?Blob:null,Ar={isBrowser:!0,classes:{URLSearchParams:Rr,FormData:Or,Blob:Tr},protocols:["http","https","file","blob","url","data"]},Wt=typeof window<"u"&&typeof document<"u",xr=(e=>Wt&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),Cr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Pr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Wt,hasStandardBrowserEnv:xr,hasStandardBrowserWebWorkerEnv:Cr},Symbol.toStringTag,{value:"Module"})),x={...Pr,...Ar};function Lr(e,t){return he(e,new x.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,o){return x.isNode&&c.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function vr(e){return c.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function jr(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],t[o]=e[o];return t}function Jt(e){function t(n,r,s,o){let i=n[o++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),f=o>=n.length;return i=!i&&c.isArray(s)?s.length:i,f?(c.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!a):((!s[i]||!c.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&c.isArray(s[i])&&(s[i]=jr(s[i])),!a)}if(c.isFormData(e)&&c.isFunction(e.entries)){const n={};return c.forEachEntry(e,(r,s)=>{t(vr(r),s,n,0)}),n}return null}function Nr(e,t,n){if(c.isString(e))try{return(t||JSON.parse)(e),c.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const He={transitional:zt,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=c.isObject(t);if(o&&c.isHTMLForm(t)&&(t=new FormData(t)),c.isFormData(t))return s?JSON.stringify(Jt(t)):t;if(c.isArrayBuffer(t)||c.isBuffer(t)||c.isStream(t)||c.isFile(t)||c.isBlob(t))return t;if(c.isArrayBufferView(t))return t.buffer;if(c.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Lr(t,this.formSerializer).toString();if((a=c.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return he(a?{"files[]":t}:t,f&&new f,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),Nr(t)):t}],transformResponse:[function(t){const n=this.transitional||He.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(t&&c.isString(t)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(a){if(i)throw a.name==="SyntaxError"?m.from(a,m.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:x.classes.FormData,Blob:x.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],e=>{He.headers[e]={}});const qe=He,Fr=c.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"]),Ir=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
12
|
+
`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&Fr[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},st=Symbol("internals");function H(e){return e&&String(e).trim().toLowerCase()}function te(e){return e===!1||e==null?e:c.isArray(e)?e.map(te):String(e)}function Dr(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}const Ur=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function we(e,t,n,r,s){if(c.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!c.isString(t)){if(c.isString(r))return t.indexOf(r)!==-1;if(c.isRegExp(r))return r.test(t)}}function Br(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Mr(e,t){const n=c.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}class pe{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(a,f,d){const l=H(f);if(!l)throw new Error("header name must be a non-empty string");const u=c.findKey(s,l);(!u||s[u]===void 0||d===!0||d===void 0&&s[u]!==!1)&&(s[u||f]=te(a))}const i=(a,f)=>c.forEach(a,(d,l)=>o(d,l,f));return c.isPlainObject(t)||t instanceof this.constructor?i(t,n):c.isString(t)&&(t=t.trim())&&!Ur(t)?i(Ir(t),n):t!=null&&o(n,t,r),this}get(t,n){if(t=H(t),t){const r=c.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return Dr(s);if(c.isFunction(n))return n.call(this,s,r);if(c.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=H(t),t){const r=c.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||we(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=H(i),i){const a=c.findKey(r,i);a&&(!n||we(r,r[a],a,n))&&(delete r[a],s=!0)}}return c.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||we(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return c.forEach(this,(s,o)=>{const i=c.findKey(r,o);if(i){n[i]=te(s),delete n[o];return}const a=t?Br(o):String(o).trim();a!==o&&delete n[o],n[a]=te(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return c.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&c.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
13
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[st]=this[st]={accessors:{}}).accessors,s=this.prototype;function o(i){const a=H(i);r[a]||(Mr(s,i),r[a]=!0)}return c.isArray(t)?t.forEach(o):o(t),this}}pe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);c.reduceDescriptors(pe.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});c.freezeMethods(pe);const P=pe;function be(e,t){const n=this||qe,r=t||n,s=P.from(r.headers);let o=r.data;return c.forEach(e,function(a){o=a.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function $t(e){return!!(e&&e.__CANCEL__)}function J(e,t,n){m.call(this,e??"canceled",m.ERR_CANCELED,t,n),this.name="CanceledError"}c.inherits(J,m,{__CANCEL__:!0});function kr(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new m("Request failed with status code "+n.status,[m.ERR_BAD_REQUEST,m.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Hr=x.hasStandardBrowserEnv?{write(e,t,n,r,s,o){const i=[e+"="+encodeURIComponent(t)];c.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),c.isString(r)&&i.push("path="+r),c.isString(s)&&i.push("domain="+s),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function qr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function zr(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Kt(e,t){return e&&!qr(t)?zr(e,t):t}const Wr=x.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function s(o){let i=o;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=s(window.location.href),function(i){const a=c.isString(i)?s(i):i;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function Jr(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function $r(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(f){const d=Date.now(),l=r[o];i||(i=d),n[s]=f,r[s]=d;let u=o,g=0;for(;u!==s;)g+=n[u++],u=u%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),d-i<t)return;const w=l&&d-l;return w?Math.round(g*1e3/w):void 0}}function ot(e,t){let n=0;const r=$r(50,250);return s=>{const o=s.loaded,i=s.lengthComputable?s.total:void 0,a=o-n,f=r(a),d=o<=i;n=o;const l={loaded:o,total:i,progress:i?o/i:void 0,bytes:a,rate:f||void 0,estimated:f&&i&&d?(i-o)/f:void 0,event:s};l[t?"download":"upload"]=!0,e(l)}}const Kr=typeof XMLHttpRequest<"u",Vr=Kr&&function(e){return new Promise(function(n,r){let s=e.data;const o=P.from(e.headers).normalize();let{responseType:i,withXSRFToken:a}=e,f;function d(){e.cancelToken&&e.cancelToken.unsubscribe(f),e.signal&&e.signal.removeEventListener("abort",f)}let l;if(c.isFormData(s)){if(x.hasStandardBrowserEnv||x.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if((l=o.getContentType())!==!1){const[p,...E]=l?l.split(";").map(b=>b.trim()).filter(Boolean):[];o.setContentType([p||"multipart/form-data",...E].join("; "))}}let u=new XMLHttpRequest;if(e.auth){const p=e.auth.username||"",E=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(p+":"+E))}const g=Kt(e.baseURL,e.url);u.open(e.method.toUpperCase(),qt(g,e.params,e.paramsSerializer),!0),u.timeout=e.timeout;function w(){if(!u)return;const p=P.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),b={data:!i||i==="text"||i==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:p,config:e,request:u};kr(function(S){n(S),d()},function(S){r(S),d()},b),u=null}if("onloadend"in u?u.onloadend=w:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(w)},u.onabort=function(){u&&(r(new m("Request aborted",m.ECONNABORTED,e,u)),u=null)},u.onerror=function(){r(new m("Network Error",m.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let E=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const b=e.transitional||zt;e.timeoutErrorMessage&&(E=e.timeoutErrorMessage),r(new m(E,b.clarifyTimeoutError?m.ETIMEDOUT:m.ECONNABORTED,e,u)),u=null},x.hasStandardBrowserEnv&&(a&&c.isFunction(a)&&(a=a(e)),a||a!==!1&&Wr(g))){const p=e.xsrfHeaderName&&e.xsrfCookieName&&Hr.read(e.xsrfCookieName);p&&o.set(e.xsrfHeaderName,p)}s===void 0&&o.setContentType(null),"setRequestHeader"in u&&c.forEach(o.toJSON(),function(E,b){u.setRequestHeader(b,E)}),c.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),i&&i!=="json"&&(u.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&u.addEventListener("progress",ot(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",ot(e.onUploadProgress)),(e.cancelToken||e.signal)&&(f=p=>{u&&(r(!p||p.type?new J(null,e,u):p),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(f),e.signal&&(e.signal.aborted?f():e.signal.addEventListener("abort",f)));const h=Jr(g);if(h&&x.protocols.indexOf(h)===-1){r(new m("Unsupported protocol "+h+":",m.ERR_BAD_REQUEST,e));return}u.send(s||null)})},xe={http:br,xhr:Vr};c.forEach(xe,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const it=e=>`- ${e}`,Gr=e=>c.isFunction(e)||e===null||e===!1,Vt={getAdapter:e=>{e=c.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let o=0;o<t;o++){n=e[o];let i;if(r=n,!Gr(n)&&(r=xe[(i=String(n)).toLowerCase()],r===void 0))throw new m(`Unknown adapter '${i}'`);if(r)break;s[i||"#"+o]=r}if(!r){const o=Object.entries(s).map(([a,f])=>`adapter ${a} `+(f===!1?"is not supported by the environment":"is not available in the build"));let i=t?o.length>1?`since :
|
|
14
|
+
`+o.map(it).join(`
|
|
15
|
+
`):" "+it(o[0]):"as no adapter specified";throw new m("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:xe};function _e(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new J(null,e)}function at(e){return _e(e),e.headers=P.from(e.headers),e.data=be.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Vt.getAdapter(e.adapter||qe.adapter)(e).then(function(r){return _e(e),r.data=be.call(e,e.transformResponse,r),r.headers=P.from(r.headers),r},function(r){return $t(r)||(_e(e),r&&r.response&&(r.response.data=be.call(e,e.transformResponse,r.response),r.response.headers=P.from(r.response.headers))),Promise.reject(r)})}const ct=e=>e instanceof P?{...e}:e;function U(e,t){t=t||{};const n={};function r(d,l,u){return c.isPlainObject(d)&&c.isPlainObject(l)?c.merge.call({caseless:u},d,l):c.isPlainObject(l)?c.merge({},l):c.isArray(l)?l.slice():l}function s(d,l,u){if(c.isUndefined(l)){if(!c.isUndefined(d))return r(void 0,d,u)}else return r(d,l,u)}function o(d,l){if(!c.isUndefined(l))return r(void 0,l)}function i(d,l){if(c.isUndefined(l)){if(!c.isUndefined(d))return r(void 0,d)}else return r(void 0,l)}function a(d,l,u){if(u in t)return r(d,l);if(u in e)return r(void 0,d)}const f={url:o,method:o,data:o,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,responseEncoding:i,validateStatus:a,headers:(d,l)=>s(ct(d),ct(l),!0)};return c.forEach(Object.keys(Object.assign({},e,t)),function(l){const u=f[l]||s,g=u(e[l],t[l],l);c.isUndefined(g)&&u!==a||(n[l]=g)}),n}const Gt="1.6.8",ze={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ze[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ut={};ze.transitional=function(t,n,r){function s(o,i){return"[Axios v"+Gt+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,a)=>{if(t===!1)throw new m(s(i," has been removed"+(n?" in "+n:"")),m.ERR_DEPRECATED);return n&&!ut[i]&&(ut[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,a):!0}};function Xr(e,t,n){if(typeof e!="object")throw new m("options must be an object",m.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const a=e[o],f=a===void 0||i(a,o,e);if(f!==!0)throw new m("option "+o+" must be "+f,m.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new m("Unknown option "+o,m.ERR_BAD_OPTION)}}const Ce={assertOptions:Xr,validators:ze},v=Ce.validators;class ie{constructor(t){this.defaults=t,this.interceptors={request:new rt,response:new rt}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
16
|
+
`+o):r.stack=o}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=U(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&Ce.assertOptions(r,{silentJSONParsing:v.transitional(v.boolean),forcedJSONParsing:v.transitional(v.boolean),clarifyTimeoutError:v.transitional(v.boolean)},!1),s!=null&&(c.isFunction(s)?n.paramsSerializer={serialize:s}:Ce.assertOptions(s,{encode:v.function,serialize:v.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&c.merge(o.common,o[n.method]);o&&c.forEach(["delete","get","head","post","put","patch","common"],h=>{delete o[h]}),n.headers=P.concat(i,o);const a=[];let f=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(f=f&&p.synchronous,a.unshift(p.fulfilled,p.rejected))});const d=[];this.interceptors.response.forEach(function(p){d.push(p.fulfilled,p.rejected)});let l,u=0,g;if(!f){const h=[at.bind(this),void 0];for(h.unshift.apply(h,a),h.push.apply(h,d),g=h.length,l=Promise.resolve(n);u<g;)l=l.then(h[u++],h[u++]);return l}g=a.length;let w=n;for(u=0;u<g;){const h=a[u++],p=a[u++];try{w=h(w)}catch(E){p.call(this,E);break}}try{l=at.call(this,w)}catch(h){return Promise.reject(h)}for(u=0,g=d.length;u<g;)l=l.then(d[u++],d[u++]);return l}getUri(t){t=U(this.defaults,t);const n=Kt(t.baseURL,t.url);return qt(n,t.params,t.paramsSerializer)}}c.forEach(["delete","get","head","options"],function(t){ie.prototype[t]=function(n,r){return this.request(U(r||{},{method:t,url:n,data:(r||{}).data}))}});c.forEach(["post","put","patch"],function(t){function n(r){return function(o,i,a){return this.request(U(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}ie.prototype[t]=n(),ie.prototype[t+"Form"]=n(!0)});const ne=ie;class We{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(a=>{r.subscribe(a),o=a}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,a){r.reason||(r.reason=new J(o,i,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new We(function(s){t=s}),cancel:t}}}const Qr=We;function Yr(e){return function(n){return e.apply(null,n)}}function Zr(e){return c.isObject(e)&&e.isAxiosError===!0}const Pe={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};Object.entries(Pe).forEach(([e,t])=>{Pe[t]=e});const es=Pe;function Xt(e){const t=new ne(e),n=Lt(ne.prototype.request,t);return c.extend(n,ne.prototype,t,{allOwnKeys:!0}),c.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Xt(U(e,s))},n}const _=Xt(qe);_.Axios=ne;_.CanceledError=J;_.CancelToken=Qr;_.isCancel=$t;_.VERSION=Gt;_.toFormData=he;_.AxiosError=m;_.Cancel=_.CanceledError;_.all=function(t){return Promise.all(t)};_.spread=Yr;_.isAxiosError=Zr;_.mergeConfig=U;_.AxiosHeaders=P;_.formToJSON=e=>Jt(c.isHTMLForm(e)?new FormData(e):e);_.getAdapter=Vt.getAdapter;_.HttpStatusCode=es;_.default=_;const ts={form:"application/x-www-form-urlencoded",json:"application/json",data:"multipart/form-data"},ns=["put","post","patch"],Le="Local-Request-Id",rs=200,ss=500;class Qt{axios;settings;records={};isLoading=!1;stopSkipWarn;showLoading;showError;constructor(t={}){this.settings=t.settings||{};const n=R.omit(t,["settings"]);this.axios=_.create(R.merge({headers:{"Content-Type":"application/x-www-form-urlencoded"},timeout:2*60*1e3},n)),this.setupSkipWarn(this.settings),this.showLoading=R.debounce(this.openLoading.bind(this),rs),this.showError=R.throttle(this._showError.bind(this),ss,{leading:!0,trailing:!1})}setConfig(t={}){this.settings=R.merge(this.settings,t.settings||{});const n=R.omit(t,["settings"]);this.axios.defaults=R.merge(this.axios.defaults,n),this.setupSkipWarn(this.settings)}cancel(t,n="请求已取消"){if(t){const r=this.records[t];if(!r)return;r.source.cancel(n)}else for(const r of Object.values(this.records))r.source.cancel(n)}createHeaders(t,n,r){const s=n.injectHeaders?typeof n.headers=="function"?n.headers(t,r,n):n.headers||{}:{},o={"Content-Type":ts[n.type||"form"],...r.headers,...s};return n.skipWarn&&(o[Le]=t),o}isJsonType(t){return Object.entries(t).some(([n,r])=>n.toLowerCase()==="content-type"&&String(r).includes("application/json"))}toFormData(t,n="data"){if(t instanceof FormData||t instanceof URLSearchParams)return t;const r=n==="data"?new FormData:new URLSearchParams;return Object.entries(t).forEach(([s,o])=>{r.append(s,o)}),r}createSendData(t,n,r,s){const{type:o,skipWarn:i}=t,{name:a="skipWarn"}=i||{};let{data:f,params:d,method:l="get"}=n;const u=s?{[a]:!0}:{};return ns.includes(l.toLowerCase())?(f=Object.assign(f||{},u),f=o!=="json"||!this.isJsonType(r)?this.toFormData(f,o):f):d={...f,...d,...u},{data:f,params:d}}createUrl(t){const{url:n,query:r}=t;return r?R.template(n)(r):n}openLoading(t){const{loading:n,showLoading:r}=t;n&&r&&Object.keys(this.records).length>0&&(this.isLoading=!0,r())}closeLoading(t){const{loading:n,hideLoading:r}=t;if(!n)return;this.isLoading=!1;const s=Object.keys(this.records);r&&s.length===0&&(this.isLoading=!1,r())}_showError(t,n){const{failMessage:r,showError:s}=t;if(r&&s){const o=n?.message||n?.msg||"未知错误";s(o,n)}}validResponse(t,n){const{validSuccess:r,validate:s}=t;return r&&s?!!s(n):!0}isSkipWarnResponse(t){return!!t.promise}send(t={},n=!1){const r=R.merge({},this.settings,t.settings||{}),s=R.omit(t,["settings"]),o=R.uuid(!1),i=_.CancelToken.source();this.records[o]={settings:r,config:s,source:i};const a=this.createUrl(s),f=this.createHeaders(o,r,s),{data:d,params:l}=this.createSendData(r,s,f,n);return this.showLoading(r),new Promise((u,g)=>{this.axios({cancelToken:i.token,...s,url:a,headers:f,data:d,params:l}).then(w=>this.isSkipWarnResponse(w)?u(w.promise):this.validResponse(r,w)?u(r.originResponse?w:w.data?.data):(this.showError(r,w.data),g(w.data))).catch(w=>(this.showError(r,w),g(w))).finally(()=>{delete this.records[o],this.closeLoading(r)})})}useResponse(t,n){const{response:r}=this.axios.interceptors,s=r.use(t,n);return()=>r.eject(s)}useRequest(t,n){const{request:r}=this.axios.interceptors,s=r.use(t,n);return()=>r.eject(s)}setupSkipWarn(t){if(this.stopSkipWarn&&(this.stopSkipWarn(),this.stopSkipWarn=void 0),!t.skipWarn)return;const{code:n,executor:r,callback:s,complete:o}=t.skipWarn;this.stopSkipWarn=this.useResponse(i=>{const f=(i.config.headers||{})[Le],d=this.records[f];if(!d)return i;const{data:l}=i;if(!l||typeof l!="object")return i;if(l?.code===n){s&&s(i);const u=new Promise(r).then(()=>this.send({...d.config,settings:d.settings},!0));u.catch(g=>g).finally(()=>{o&&o()}),i.promise=u}return i})}}function Yt(e={}){const t=new Qt(e),n=t.send.bind(t),r=t.cancel.bind(t),s=t.setConfig.bind(t),o=t.useRequest.bind(t),i=t.useResponse.bind(t);return Object.assign(n,{...t,instance:t,send:n,cancel:r,setConfig:s,useRequest:o,useResponse:i})}const Zt=Yt({settings:{injectHeaders:!0,loading:!0,originResponse:!0}});function en(e){const t=typeof e=="string"?{url:e}:e;return(n,r)=>Zt.send(R.merge(t,r||{},{data:n}))}function os(e){const t={};for(const[n,r]of Object.entries(e))t[n]=en(r);return t}function is(e,t){const n=ge(null),r=ge(),s=ge(!0);return e.then(o=>{n.value=t?t(o):o}).catch(o=>{r.value=o}).finally(()=>{s.value=!1}),{data:n,error:r,loading:s}}const B=typeof window<"u",as=e=>new Promise((t,n)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>{t(r.result)},r.onerror=s=>{n(s)}}),cs=e=>B?window.requestAnimationFrame(e):setTimeout(e,16),us=e=>B?window.cancelAnimationFrame(e):clearTimeout(e);class tn{options={type:"cache",expired:0,prefix:"__VTJ_"};caches={};types;constructor(t={}){this.types={local:B?window.localStorage:this.caches,session:B?window.sessionStorage:this.caches,cache:this.caches},this.config(t)}config(t={}){this.options=Object.assign(this.options,t)}save(t,n,r={}){const{type:s,expired:o,prefix:i}={...this.options,...r},a=Date.now(),f=i+t,d=this.types[s]||this.caches,l={value:n,timestamp:a,expired:o};d===this.caches?d[f]=l:d.setItem(f,JSON.stringify(l))}get(t,n={}){const{type:r,prefix:s}={...this.options,...n},o=s+t,i=this.types[r]||this.caches;let a;if(i===this.caches)a=i[o];else{const g=i.getItem(o);g&&(a=JSON.parse(g))}if(!a)return null;const{value:f,timestamp:d,expired:l}=a;return l>0&&d+l<Date.now()?(this.remove(t,n),null):f}remove(t,n={}){const{type:r,prefix:s}={...this.options,...n},o=this.types[r]||this.caches,i=s+t;o===this.caches?delete o[i]:o.removeItem(i)}clear(t={}){const{type:n}={...this.options,...t},r=this.types[n]||this.caches;r===this.caches?this.caches={}:r.clear()}}const ls=new tn;var fs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ve={exports:{}};(function(e,t){(function(n,r){r(t,e)})(fs,function(n,r){var s={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null};function o(){return"jsonp_"+Date.now()+"_"+Math.ceil(Math.random()*1e5)}function i(d){try{delete window[d]}catch{window[d]=void 0}}function a(d){var l=document.getElementById(d);l&&document.getElementsByTagName("head")[0].removeChild(l)}function f(d){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],u=d,g=l.timeout||s.timeout,w=l.jsonpCallback||s.jsonpCallback,h=void 0;return new Promise(function(p,E){var b=l.jsonpCallbackFunction||o(),O=w+"_"+b;window[b]=function(me){p({ok:!0,json:function(){return Promise.resolve(me)}}),h&&clearTimeout(h),a(O),i(b)},u+=u.indexOf("?")===-1?"?":"&";var S=document.createElement("script");S.setAttribute("src",""+u+w+"="+b),l.charset&&S.setAttribute("charset",l.charset),l.nonce&&S.setAttribute("nonce",l.nonce),l.referrerPolicy&&S.setAttribute("referrerPolicy",l.referrerPolicy),l.crossorigin&&S.setAttribute("crossorigin","true"),S.id=O,document.getElementsByTagName("head")[0].appendChild(S),h=setTimeout(function(){E(new Error("JSONP request to "+d+" timed out")),i(b),a(O),window[b]=function(){i(b)}},g),S.onerror=function(){E(new Error("JSONP request to "+d+" failed")),i(b),a(O),h&&clearTimeout(h)}})}r.exports=f})})(ve,ve.exports);var ds=ve.exports;const hs=nn(ds);function ps(e){if(B){const{protocol:t,host:n,pathname:r}=location;return`${t}//${n}${e?r:""}`}else return null}function ms(e=""){const t=e.match(R.rURL);return t?t[0]:""}function rn(e){const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push([n,encodeURIComponent(e[n])].join("="));return t.join("&")}function je(e,t,n){const r={};e=(e||location.search).replace(/^[^]*\?/,""),t=t||"&",n=n||"=";let s;const o=new RegExp("(?:^|\\"+t+")([^\\"+n+"\\"+t+"]+)(?:\\"+n+"([^\\"+t+"]*))?","g");for(;(s=o.exec(e))!==null;)s[1]!==e&&(r[decodeURIComponent(s[1])]=decodeURIComponent(s[2]||""));return r}function sn(e,t){t=typeof t=="string"?je(t):t;const n=e.split("?")[0],r=je(e),s=Object.assign({},r,t),o=rn(s);return o?[n,o].join("?"):e}const gs=Object.freeze(Object.defineProperty({__proto__:null,append:sn,getCurrentHost:ps,getHost:ms,parse:je,stringify:rn},Symbol.toStringTag,{value:"Module"}));async function ys(e,t={}){const{query:n={}}=t;e.includes("${")&&(e=R.template(e)(n||{}));const r=sn(e,n);return await(await hs(r,t)).json()}var ws=function(t,n,r){var s=document.head||document.getElementsByTagName("head")[0],o=document.createElement("script");typeof n=="function"&&(r=n,n={}),n=n||{},r=r||function(){},o.type=n.type||"text/javascript",o.charset=n.charset||"utf8",o.async="async"in n?!!n.async:!0,o.src=t,n.attrs&&bs(o,n.attrs),n.text&&(o.text=""+n.text);var i="onload"in o?lt:_s;i(o,r),o.onload||lt(o,r),s.appendChild(o)};function bs(e,t){for(var n in t)e.setAttribute(n,t[n])}function lt(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function _s(e,t){e.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,t(null,e))}}const Es=nn(ws);function Ss(e,t={}){return new Promise((n,r)=>{const{library:s}=t;Es(e,t,(o,i)=>{o?r(o):n(s?window[s]:void 0)})})}const ft={debug:-1,log:0,info:0,warn:1,error:2},Rs=function(e,t,n,r){return function(...s){if(t&&ft[t]<=ft[e]&&console[e].apply&&(r==="*"||n.startsWith(r)))return console[e].apply(console,Os(s,n))}};function Os(e,t){return t!=="*"&&(typeof e[0]=="string"?e[0]=`[${t}] ${e[0]}`:e=["["+t+"]"].concat(e)),e}function Ts(e,t){if(!e)return{targetLevel:t.level,targetBizName:t.bizName};if(~e.indexOf(":")){const n=e.split(":");return{targetLevel:n[0],targetBizName:n[1]}}return{targetLevel:e,targetBizName:"*"}}const As={level:"warn",bizName:"*"};class on{config;options;constructor(t){this.options={...As,...t};const n=typeof location<"u"?location:{},r=(/__(?:logConf|logLevel)__=([^#/&]*)/.exec(n.href)||[])[1];this.config=Ts(r,t)}_log(t){const{targetLevel:n,targetBizName:r}=this.config,{bizName:s}=this.options;return Rs(t,n,s,r)}debug(...t){return this._log("debug")(...t)}log(...t){return this._log("log")(...t)}info(...t){return this._log("info")(...t)}warn(...t){return this._log("warn")(...t)}error(...t){return this._log("error")(...t)}}function an(e){return new on(e)}const xs=an({level:"log",bizName:"VTJ"});/*! js-cookie v3.0.5 | MIT */function Q(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var Cs={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Ne(e,t){function n(s,o,i){if(!(typeof document>"u")){i=Q({},t,i),typeof i.expires=="number"&&(i.expires=new Date(Date.now()+i.expires*864e5)),i.expires&&(i.expires=i.expires.toUTCString()),s=encodeURIComponent(s).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var f in i)i[f]&&(a+="; "+f,i[f]!==!0&&(a+="="+i[f].split(";")[0]));return document.cookie=s+"="+e.write(o,s)+a}}function r(s){if(!(typeof document>"u"||arguments.length&&!s)){for(var o=document.cookie?document.cookie.split("; "):[],i={},a=0;a<o.length;a++){var f=o[a].split("="),d=f.slice(1).join("=");try{var l=decodeURIComponent(f[0]);if(i[l]=e.read(d,l),s===l)break}catch{}}return s?i[s]:i}}return Object.create({set:n,get:r,remove:function(s,o){n(s,"",Q({},o,{expires:-1}))},withAttributes:function(s){return Ne(this.converter,Q({},this.attributes,s))},withConverter:function(s){return Ne(Q({},this.converter,s),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Je=Ne(Cs,{path:"/"});function Ps(e,t,n){Je.set(e,t,n)}function Ls(e){return Je.get(e)}function vs(e,t){Je.remove(e,t)}const js=Object.freeze(Object.defineProperty({__proto__:null,get:Ls,remove:vs,set:Ps},Symbol.toStringTag,{value:"Module"}));exports.LOCAL_REQUEST_ID=Le;exports.Logger=on;exports.Request=Qt;exports.Storage=tn;exports.VTJ_UTILS_VERSION=cn;exports.axios=_;exports.cAF=us;exports.cookie=js;exports.createApi=en;exports.createApis=os;exports.createRequest=Yt;exports.fileToBase64=as;exports.getLogger=an;exports.isClient=B;exports.jsonp=ys;exports.loadScript=Ss;exports.logger=xs;exports.rAF=cs;exports.request=Zt;exports.storage=ls;exports.url=gs;exports.useApi=is;Object.keys(R).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>R[e]})});
|