@vtj/utils 0.17.5 → 0.17.7
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 -8
- package/dist/index.iife.js +5 -5
- package/dist/index.mjs +1603 -1365
- package/dist/index.umd.js +5 -5
- package/package.json +3 -3
- package/types/request.d.ts +2 -2
- package/types/version.d.ts +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var Gt=Object.defineProperty;var Qt=(t,e,n)=>e in t?Gt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var N=(t,e,n)=>Qt(t,typeof e!="symbol"?e+"":e,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("@vtj/base"),Te=require("vue");(function(){if(typeof window>"u"||typeof EventTarget>"u")return;const t=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(e,n,r){typeof r!="boolean"&&(r=r||{},r.passive=!1),t.call(this,e,n,r)}})();/**!
|
|
2
2
|
* Copyright (c) 2026, VTJ.PRO All rights reserved.
|
|
3
3
|
* @name @vtj/utils
|
|
4
4
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
5
|
-
* @version 0.17.
|
|
5
|
+
* @version 0.17.7
|
|
6
6
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
7
|
-
*/const Ht="0.17.5";function ct(t,e){return function(){return t.apply(e,arguments)}}const{toString:$t}=Object.prototype,{getPrototypeOf:Ce}=Object,{iterator:ce,toStringTag:lt}=Symbol,le=(t=>e=>{const n=$t.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),F=t=>(t=t.toLowerCase(),e=>le(e)===t),ue=t=>e=>typeof e===t,{isArray:J}=Array,H=ue("undefined");function K(t){return t!==null&&!H(t)&&t.constructor!==null&&!H(t.constructor)&&_(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const ut=F("ArrayBuffer");function Jt(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&ut(t.buffer),e}const Wt=ue("string"),_=ue("function"),ft=ue("number"),X=t=>t!==null&&typeof t=="object",zt=t=>t===!0||t===!1,oe=t=>{if(le(t)!=="object")return!1;const e=Ce(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(lt in t)&&!(ce in t)},Vt=t=>{if(!X(t)||K(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Kt=F("Date"),Xt=F("File"),Gt=t=>!!(t&&typeof t.uri<"u"),Qt=t=>t&&typeof t.getParts<"u",Yt=F("Blob"),Zt=F("FileList"),en=t=>X(t)&&_(t.pipe);function tn(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const He=tn(),$e=typeof He.FormData<"u"?He.FormData:void 0,nn=t=>{let e;return t&&($e&&t instanceof $e||_(t.append)&&((e=le(t))==="formdata"||e==="object"&&_(t.toString)&&t.toString()==="[object FormData]"))},rn=F("URLSearchParams"),[on,sn,an,cn]=["ReadableStream","Request","Response","Headers"].map(F),ln=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function G(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,o;if(typeof t!="object"&&(t=[t]),J(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{if(K(t))return;const s=n?Object.getOwnPropertyNames(t):Object.keys(t),i=s.length;let a;for(r=0;r<i;r++)a=s[r],e.call(null,t[a],a,t)}}function dt(t,e){if(K(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,o;for(;r-- >0;)if(o=n[r],e===o.toLowerCase())return o;return null}const v=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,pt=t=>!H(t)&&t!==v;function Ee(){const{caseless:t,skipUndefined:e}=pt(this)&&this||{},n={},r=(o,s)=>{if(s==="__proto__"||s==="constructor"||s==="prototype")return;const i=t&&dt(n,s)||s;oe(n[i])&&oe(o)?n[i]=Ee(n[i],o):oe(o)?n[i]=Ee({},o):J(o)?n[i]=o.slice():(!e||!H(o))&&(n[i]=o)};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&G(arguments[o],r);return n}const un=(t,e,n,{allOwnKeys:r}={})=>(G(e,(o,s)=>{n&&_(o)?Object.defineProperty(t,s,{value:ct(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,s,{value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),t),fn=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),dn=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},pn=(t,e,n,r)=>{let o,s,i;const a={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),s=o.length;s-- >0;)i=o[s],(!r||r(i,t,e))&&!a[i]&&(e[i]=t[i],a[i]=!0);t=n!==!1&&Ce(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},hn=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},mn=t=>{if(!t)return null;if(J(t))return t;let e=t.length;if(!ft(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},gn=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Ce(Uint8Array)),yn=(t,e)=>{const r=(t&&t[ce]).call(t);let o;for(;(o=r.next())&&!o.done;){const s=o.value;e.call(t,s[0],s[1])}},wn=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},bn=F("HTMLFormElement"),Rn=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Je=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),En=F("RegExp"),ht=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};G(n,(o,s)=>{let i;(i=e(o,s,t))!==!1&&(r[s]=i||o)}),Object.defineProperties(t,r)},Sn=t=>{ht(t,(e,n)=>{if(_(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(_(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},On=(t,e)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return J(t)?r(t):r(String(t).split(e)),n},Tn=()=>{},An=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function xn(t){return!!(t&&_(t.append)&&t[lt]==="FormData"&&t[ce])}const _n=t=>{const e=new Array(10),n=(r,o)=>{if(X(r)){if(e.indexOf(r)>=0)return;if(K(r))return r;if(!("toJSON"in r)){e[o]=r;const s=J(r)?[]:{};return G(r,(i,a)=>{const f=n(i,o+1);!H(f)&&(s[a]=f)}),e[o]=void 0,s}}return r};return n(t,0)},Cn=F("AsyncFunction"),Pn=t=>t&&(X(t)||_(t))&&_(t.then)&&_(t.catch),mt=((t,e)=>t?setImmediate:e?((n,r)=>(v.addEventListener("message",({source:o,data:s})=>{o===v&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),v.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",_(v.postMessage)),Ln=typeof queueMicrotask<"u"?queueMicrotask.bind(v):typeof process<"u"&&process.nextTick||mt,Un=t=>t!=null&&_(t[ce]),c={isArray:J,isArrayBuffer:ut,isBuffer:K,isFormData:nn,isArrayBufferView:Jt,isString:Wt,isNumber:ft,isBoolean:zt,isObject:X,isPlainObject:oe,isEmptyObject:Vt,isReadableStream:on,isRequest:sn,isResponse:an,isHeaders:cn,isUndefined:H,isDate:Kt,isFile:Xt,isReactNativeBlob:Gt,isReactNative:Qt,isBlob:Yt,isRegExp:En,isFunction:_,isStream:en,isURLSearchParams:rn,isTypedArray:gn,isFileList:Zt,forEach:G,merge:Ee,extend:un,trim:ln,stripBOM:fn,inherits:dn,toFlatObject:pn,kindOf:le,kindOfTest:F,endsWith:hn,toArray:mn,forEachEntry:yn,matchAll:wn,isHTMLForm:bn,hasOwnProperty:Je,hasOwnProp:Je,reduceDescriptors:ht,freezeMethods:Sn,toObjectSet:On,toCamelCase:Rn,noop:Tn,toFiniteNumber:An,findKey:dt,global:v,isContextDefined:pt,isSpecCompliantForm:xn,toJSONObject:_n,isAsyncFn:Cn,isThenable:Pn,setImmediate:mt,asap:Ln,isIterable:Un};let g=class gt extends Error{static from(e,n,r,o,s,i){const a=new gt(e.message,n||e.code,r,o,s);return a.cause=e,a.name=e.name,e.status!=null&&a.status==null&&(a.status=e.status),i&&Object.assign(a,i),a}constructor(e,n,r,o,s){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),s&&(this.response=s,this.status=s.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:c.toJSONObject(this.config),code:this.code,status:this.status}}};g.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";g.ERR_BAD_OPTION="ERR_BAD_OPTION";g.ECONNABORTED="ECONNABORTED";g.ETIMEDOUT="ETIMEDOUT";g.ERR_NETWORK="ERR_NETWORK";g.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";g.ERR_DEPRECATED="ERR_DEPRECATED";g.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";g.ERR_BAD_REQUEST="ERR_BAD_REQUEST";g.ERR_CANCELED="ERR_CANCELED";g.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";g.ERR_INVALID_URL="ERR_INVALID_URL";const Nn=null;function Se(t){return c.isPlainObject(t)||c.isArray(t)}function yt(t){return c.endsWith(t,"[]")?t.slice(0,-2):t}function ge(t,e,n){return t?t.concat(e).map(function(o,s){return o=yt(o),!n&&s?"["+o+"]":o}).join(n?".":""):e}function Fn(t){return c.isArray(t)&&!t.some(Se)}const jn=c.toFlatObject(c,{},null,function(e){return/^is[A-Z]/.test(e)});function fe(t,e,n){if(!c.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=c.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,p){return!c.isUndefined(p[m])});const r=n.metaTokens,o=n.visitor||l,s=n.dots,i=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(e);if(!c.isFunction(o))throw new TypeError("visitor must be a function");function u(d){if(d===null)return"";if(c.isDate(d))return d.toISOString();if(c.isBoolean(d))return d.toString();if(!f&&c.isBlob(d))throw new g("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(d)||c.isTypedArray(d)?f&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function l(d,m,p){let w=d;if(c.isReactNative(e)&&c.isReactNativeBlob(d))return e.append(ge(p,m,s),u(d)),!1;if(d&&!p&&typeof d=="object"){if(c.endsWith(m,"{}"))m=r?m:m.slice(0,-2),d=JSON.stringify(d);else if(c.isArray(d)&&Fn(d)||(c.isFileList(d)||c.endsWith(m,"[]"))&&(w=c.toArray(d)))return m=yt(m),w.forEach(function(b,T){!(c.isUndefined(b)||b===null)&&e.append(i===!0?ge([m],T,s):i===null?m:m+"[]",u(b))}),!1}return Se(d)?!0:(e.append(ge(p,m,s),u(d)),!1)}const h=[],y=Object.assign(jn,{defaultVisitor:l,convertValue:u,isVisitable:Se});function R(d,m){if(!c.isUndefined(d)){if(h.indexOf(d)!==-1)throw Error("Circular reference detected in "+m.join("."));h.push(d),c.forEach(d,function(w,O){(!(c.isUndefined(w)||w===null)&&o.call(e,w,c.isString(O)?O.trim():O,m,y))===!0&&R(w,m?m.concat(O):[O])}),h.pop()}}if(!c.isObject(t))throw new TypeError("data must be an object");return R(t),e}function We(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function Pe(t,e){this._pairs=[],t&&fe(t,this,e)}const wt=Pe.prototype;wt.append=function(e,n){this._pairs.push([e,n])};wt.toString=function(e){const n=e?function(r){return e.call(this,r,We)}:We;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Dn(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function bt(t,e,n){if(!e)return t;const r=n&&n.encode||Dn,o=c.isFunction(n)?{serialize:n}:n,s=o&&o.serialize;let i;if(s?i=s(e,o):i=c.isURLSearchParams(e)?e.toString():new Pe(e,o).toString(r),i){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class ze{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){c.forEach(this.handlers,function(r){r!==null&&e(r)})}}const Le={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},kn=typeof URLSearchParams<"u"?URLSearchParams:Pe,Bn=typeof FormData<"u"?FormData:null,vn=typeof Blob<"u"?Blob:null,In={isBrowser:!0,classes:{URLSearchParams:kn,FormData:Bn,Blob:vn},protocols:["http","https","file","blob","url","data"]},Ue=typeof window<"u"&&typeof document<"u",Oe=typeof navigator=="object"&&navigator||void 0,qn=Ue&&(!Oe||["ReactNative","NativeScript","NS"].indexOf(Oe.product)<0),Mn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Hn=Ue&&window.location.href||"http://localhost",$n=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ue,hasStandardBrowserEnv:qn,hasStandardBrowserWebWorkerEnv:Mn,navigator:Oe,origin:Hn},Symbol.toStringTag,{value:"Module"})),A={...$n,...In};function Jn(t,e){return fe(t,new A.classes.URLSearchParams,{visitor:function(n,r,o,s){return A.isNode&&c.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...e})}function Wn(t){return c.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function zn(t){const e={},n=Object.keys(t);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],e[s]=t[s];return e}function Rt(t){function e(n,r,o,s){let i=n[s++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),f=s>=n.length;return i=!i&&c.isArray(o)?o.length:i,f?(c.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!a):((!o[i]||!c.isObject(o[i]))&&(o[i]=[]),e(n,r,o[i],s)&&c.isArray(o[i])&&(o[i]=zn(o[i])),!a)}if(c.isFormData(t)&&c.isFunction(t.entries)){const n={};return c.forEachEntry(t,(r,o)=>{e(Wn(r),o,n,0)}),n}return null}function Vn(t,e,n){if(c.isString(t))try{return(e||JSON.parse)(t),c.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const Q={transitional:Le,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=c.isObject(e);if(s&&c.isHTMLForm(e)&&(e=new FormData(e)),c.isFormData(e))return o?JSON.stringify(Rt(e)):e;if(c.isArrayBuffer(e)||c.isBuffer(e)||c.isStream(e)||c.isFile(e)||c.isBlob(e)||c.isReadableStream(e))return e;if(c.isArrayBufferView(e))return e.buffer;if(c.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Jn(e,this.formSerializer).toString();if((a=c.isFileList(e))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return fe(a?{"files[]":e}:e,f&&new f,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),Vn(e)):e}],transformResponse:[function(e){const n=this.transitional||Q.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(c.isResponse(e)||c.isReadableStream(e))return e;if(e&&c.isString(e)&&(r&&!this.responseType||o)){const i=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(e,this.parseReviver)}catch(a){if(i)throw a.name==="SyntaxError"?g.from(a,g.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:A.classes.FormData,Blob:A.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],t=>{Q.headers[t]={}});const Kn=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"]),Xn=t=>{const e={};let n,r,o;return t&&t.split(`
|
|
8
|
-
`).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||e[n]&&
|
|
9
|
-
`)}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,...n){const r=new this(e);return n.forEach(o=>r.set(o)),r}static accessor(e){const r=(this[Ve]=this[Ve]={accessors:{}}).accessors,o=this.prototype;function s(i){const a=z(i);r[a]||(Zn(o,i),r[a]=!0)}return c.isArray(e)?e.forEach(s):s(e),this}};C.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);c.reduceDescriptors(C.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});c.freezeMethods(C);function we(t,e){const n=this||Q,r=e||n,o=C.from(r.headers);let s=r.data;return c.forEach(t,function(a){s=a.call(n,s,o.normalize(),e?e.status:void 0)}),o.normalize(),s}function Et(t){return!!(t&&t.__CANCEL__)}let Y=class extends g{constructor(e,n,r){super(e??"canceled",g.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function St(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new g("Request failed with status code "+n.status,[g.ERR_BAD_REQUEST,g.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function er(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function tr(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o=0,s=0,i;return e=e!==void 0?e:1e3,function(f){const u=Date.now(),l=r[s];i||(i=u),n[o]=f,r[o]=u;let h=s,y=0;for(;h!==o;)y+=n[h++],h=h%t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),u-i<e)return;const R=l&&u-l;return R?Math.round(y*1e3/R):void 0}}function nr(t,e){let n=0,r=1e3/e,o,s;const i=(u,l=Date.now())=>{n=l,o=null,s&&(clearTimeout(s),s=null),t(...u)};return[(...u)=>{const l=Date.now(),h=l-n;h>=r?i(u,l):(o=u,s||(s=setTimeout(()=>{s=null,i(o)},r-h)))},()=>o&&i(o)]}const ae=(t,e,n=3)=>{let r=0;const o=tr(50,250);return nr(s=>{const i=s.loaded,a=s.lengthComputable?s.total:void 0,f=i-r,u=o(f),l=i<=a;r=i;const h={loaded:i,total:a,progress:a?i/a:void 0,bytes:f,rate:u||void 0,estimated:u&&a&&l?(a-i)/u:void 0,event:s,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(h)},n)},Ke=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Xe=t=>(...e)=>c.asap(()=>t(...e)),rr=A.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,A.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(A.origin),A.navigator&&/(msie|trident)/i.test(A.navigator.userAgent)):()=>!0,or=A.hasStandardBrowserEnv?{write(t,e,n,r,o,s,i){if(typeof document>"u")return;const a=[`${t}=${encodeURIComponent(e)}`];c.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),c.isString(r)&&a.push(`path=${r}`),c.isString(o)&&a.push(`domain=${o}`),s===!0&&a.push("secure"),c.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function sr(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function ir(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Ot(t,e,n){let r=!sr(e);return t&&(r||n==!1)?ir(t,e):e}const Ge=t=>t instanceof C?{...t}:t;function q(t,e){e=e||{};const n={};function r(u,l,h,y){return c.isPlainObject(u)&&c.isPlainObject(l)?c.merge.call({caseless:y},u,l):c.isPlainObject(l)?c.merge({},l):c.isArray(l)?l.slice():l}function o(u,l,h,y){if(c.isUndefined(l)){if(!c.isUndefined(u))return r(void 0,u,h,y)}else return r(u,l,h,y)}function s(u,l){if(!c.isUndefined(l))return r(void 0,l)}function i(u,l){if(c.isUndefined(l)){if(!c.isUndefined(u))return r(void 0,u)}else return r(void 0,l)}function a(u,l,h){if(h in e)return r(u,l);if(h in t)return r(void 0,u)}const f={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(u,l,h)=>o(Ge(u),Ge(l),h,!0)};return c.forEach(Object.keys({...t,...e}),function(l){if(l==="__proto__"||l==="constructor"||l==="prototype")return;const h=c.hasOwnProp(f,l)?f[l]:o,y=h(t[l],e[l],l);c.isUndefined(y)&&h!==a||(n[l]=y)}),n}const Tt=t=>{const e=q({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:a}=e;if(e.headers=i=C.from(i),e.url=bt(Ot(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),c.isFormData(n)){if(A.hasStandardBrowserEnv||A.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(c.isFunction(n.getHeaders)){const f=n.getHeaders(),u=["content-type","content-length"];Object.entries(f).forEach(([l,h])=>{u.includes(l.toLowerCase())&&i.set(l,h)})}}if(A.hasStandardBrowserEnv&&(r&&c.isFunction(r)&&(r=r(e)),r||r!==!1&&rr(e.url))){const f=o&&s&&or.read(s);f&&i.set(o,f)}return e},ar=typeof XMLHttpRequest<"u",cr=ar&&function(t){return new Promise(function(n,r){const o=Tt(t);let s=o.data;const i=C.from(o.headers).normalize();let{responseType:a,onUploadProgress:f,onDownloadProgress:u}=o,l,h,y,R,d;function m(){R&&R(),d&&d(),o.cancelToken&&o.cancelToken.unsubscribe(l),o.signal&&o.signal.removeEventListener("abort",l)}let p=new XMLHttpRequest;p.open(o.method.toUpperCase(),o.url,!0),p.timeout=o.timeout;function w(){if(!p)return;const b=C.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),L={data:!a||a==="text"||a==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:b,config:t,request:p};St(function(U){n(U),m()},function(U){r(U),m()},L),p=null}"onloadend"in p?p.onloadend=w:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(w)},p.onabort=function(){p&&(r(new g("Request aborted",g.ECONNABORTED,t,p)),p=null)},p.onerror=function(T){const L=T&&T.message?T.message:"Network Error",k=new g(L,g.ERR_NETWORK,t,p);k.event=T||null,r(k),p=null},p.ontimeout=function(){let T=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const L=o.transitional||Le;o.timeoutErrorMessage&&(T=o.timeoutErrorMessage),r(new g(T,L.clarifyTimeoutError?g.ETIMEDOUT:g.ECONNABORTED,t,p)),p=null},s===void 0&&i.setContentType(null),"setRequestHeader"in p&&c.forEach(i.toJSON(),function(T,L){p.setRequestHeader(L,T)}),c.isUndefined(o.withCredentials)||(p.withCredentials=!!o.withCredentials),a&&a!=="json"&&(p.responseType=o.responseType),u&&([y,d]=ae(u,!0),p.addEventListener("progress",y)),f&&p.upload&&([h,R]=ae(f),p.upload.addEventListener("progress",h),p.upload.addEventListener("loadend",R)),(o.cancelToken||o.signal)&&(l=b=>{p&&(r(!b||b.type?new Y(null,t,p):b),p.abort(),p=null)},o.cancelToken&&o.cancelToken.subscribe(l),o.signal&&(o.signal.aborted?l():o.signal.addEventListener("abort",l)));const O=er(o.url);if(O&&A.protocols.indexOf(O)===-1){r(new g("Unsupported protocol "+O+":",g.ERR_BAD_REQUEST,t));return}p.send(s||null)})},lr=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,o;const s=function(u){if(!o){o=!0,a();const l=u instanceof Error?u:this.reason;r.abort(l instanceof g?l:new Y(l instanceof Error?l.message:l))}};let i=e&&setTimeout(()=>{i=null,s(new g(`timeout of ${e}ms exceeded`,g.ETIMEDOUT))},e);const a=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),t=null)};t.forEach(u=>u.addEventListener("abort",s));const{signal:f}=r;return f.unsubscribe=()=>c.asap(a),f}},ur=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,o;for(;r<n;)o=r+e,yield t.slice(r,o),r=o},fr=async function*(t,e){for await(const n of dr(t))yield*ur(n,e)},dr=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Qe=(t,e,n,r)=>{const o=fr(t,e);let s=0,i,a=f=>{i||(i=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:u,value:l}=await o.next();if(u){a(),f.close();return}let h=l.byteLength;if(n){let y=s+=h;n(y)}f.enqueue(new Uint8Array(l))}catch(u){throw a(u),u}},cancel(f){return a(f),o.return()}},{highWaterMark:2})},Ye=64*1024,{isFunction:ne}=c,pr=(({Request:t,Response:e})=>({Request:t,Response:e}))(c.global),{ReadableStream:Ze,TextEncoder:et}=c.global,tt=(t,...e)=>{try{return!!t(...e)}catch{return!1}},hr=t=>{t=c.merge.call({skipUndefined:!0},pr,t);const{fetch:e,Request:n,Response:r}=t,o=e?ne(e):typeof fetch=="function",s=ne(n),i=ne(r);if(!o)return!1;const a=o&&ne(Ze),f=o&&(typeof et=="function"?(d=>m=>d.encode(m))(new et):async d=>new Uint8Array(await new n(d).arrayBuffer())),u=s&&a&&tt(()=>{let d=!1;const m=new n(A.origin,{body:new Ze,method:"POST",get duplex(){return d=!0,"half"}}).headers.has("Content-Type");return d&&!m}),l=i&&a&&tt(()=>c.isReadableStream(new r("").body)),h={stream:l&&(d=>d.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!h[d]&&(h[d]=(m,p)=>{let w=m&&m[d];if(w)return w.call(m);throw new g(`Response type '${d}' is not supported`,g.ERR_NOT_SUPPORT,p)})});const y=async d=>{if(d==null)return 0;if(c.isBlob(d))return d.size;if(c.isSpecCompliantForm(d))return(await new n(A.origin,{method:"POST",body:d}).arrayBuffer()).byteLength;if(c.isArrayBufferView(d)||c.isArrayBuffer(d))return d.byteLength;if(c.isURLSearchParams(d)&&(d=d+""),c.isString(d))return(await f(d)).byteLength},R=async(d,m)=>{const p=c.toFiniteNumber(d.getContentLength());return p??y(m)};return async d=>{let{url:m,method:p,data:w,signal:O,cancelToken:b,timeout:T,onDownloadProgress:L,onUploadProgress:k,responseType:U,headers:pe,withCredentials:Z="same-origin",fetchOptions:ke}=Tt(d),Be=e||fetch;U=U?(U+"").toLowerCase():"text";let ee=lr([O,b&&b.toAbortSignal()],T),W=null;const B=ee&&ee.unsubscribe&&(()=>{ee.unsubscribe()});let ve;try{if(k&&u&&p!=="get"&&p!=="head"&&(ve=await R(pe,w))!==0){let D=new n(m,{method:"POST",body:w,duplex:"half"}),M;if(c.isFormData(w)&&(M=D.headers.get("content-type"))&&pe.setContentType(M),D.body){const[he,te]=Ke(ve,ae(Xe(k)));w=Qe(D.body,Ye,he,te)}}c.isString(Z)||(Z=Z?"include":"omit");const x=s&&"credentials"in n.prototype,Ie={...ke,signal:ee,method:p.toUpperCase(),headers:pe.normalize().toJSON(),body:w,duplex:"half",credentials:x?Z:void 0};W=s&&new n(m,Ie);let j=await(s?Be(W,ke):Be(m,Ie));const qe=l&&(U==="stream"||U==="response");if(l&&(L||qe&&B)){const D={};["status","statusText","headers"].forEach(Me=>{D[Me]=j[Me]});const M=c.toFiniteNumber(j.headers.get("content-length")),[he,te]=L&&Ke(M,ae(Xe(L),!0))||[];j=new r(Qe(j.body,Ye,he,()=>{te&&te(),B&&B()}),D)}U=U||"text";let It=await h[c.findKey(h,U)||"text"](j,d);return!qe&&B&&B(),await new Promise((D,M)=>{St(D,M,{data:It,headers:C.from(j.headers),status:j.status,statusText:j.statusText,config:d,request:W})})}catch(x){throw B&&B(),x&&x.name==="TypeError"&&/Load failed|fetch/i.test(x.message)?Object.assign(new g("Network Error",g.ERR_NETWORK,d,W,x&&x.response),{cause:x.cause||x}):g.from(x,x&&x.code,d,W,x&&x.response)}}},mr=new Map,At=t=>{let e=t&&t.env||{};const{fetch:n,Request:r,Response:o}=e,s=[r,o,n];let i=s.length,a=i,f,u,l=mr;for(;a--;)f=s[a],u=l.get(f),u===void 0&&l.set(f,u=a?new Map:hr(e)),l=u;return u};At();const Ne={http:Nn,xhr:cr,fetch:{get:At}};c.forEach(Ne,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const nt=t=>`- ${t}`,gr=t=>c.isFunction(t)||t===null||t===!1;function yr(t,e){t=c.isArray(t)?t:[t];const{length:n}=t;let r,o;const s={};for(let i=0;i<n;i++){r=t[i];let a;if(o=r,!gr(r)&&(o=Ne[(a=String(r)).toLowerCase()],o===void 0))throw new g(`Unknown adapter '${a}'`);if(o&&(c.isFunction(o)||(o=o.get(e))))break;s[a||"#"+i]=o}if(!o){const i=Object.entries(s).map(([f,u])=>`adapter ${f} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=n?i.length>1?`since :
|
|
10
|
-
`+i.map(
|
|
11
|
-
`):" "+
|
|
12
|
-
`+s):r.stack=s}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=q(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&ie.assertOptions(r,{silentJSONParsing:N.transitional(N.boolean),forcedJSONParsing:N.transitional(N.boolean),clarifyTimeoutError:N.transitional(N.boolean),legacyInterceptorReqResOrdering:N.transitional(N.boolean)},!1),o!=null&&(c.isFunction(o)?n.paramsSerializer={serialize:o}:ie.assertOptions(o,{encode:N.function,serialize:N.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ie.assertOptions(n,{baseUrl:N.spelling("baseURL"),withXsrfToken:N.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&c.merge(s.common,s[n.method]);s&&c.forEach(["delete","get","head","post","put","patch","common"],d=>{delete s[d]}),n.headers=C.concat(i,s);const a=[];let f=!0;this.interceptors.request.forEach(function(m){if(typeof m.runWhen=="function"&&m.runWhen(n)===!1)return;f=f&&m.synchronous;const p=n.transitional||Le;p&&p.legacyInterceptorReqResOrdering?a.unshift(m.fulfilled,m.rejected):a.push(m.fulfilled,m.rejected)});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let l,h=0,y;if(!f){const d=[rt.bind(this),void 0];for(d.unshift(...a),d.push(...u),y=d.length,l=Promise.resolve(n);h<y;)l=l.then(d[h++],d[h++]);return l}y=a.length;let R=n;for(;h<y;){const d=a[h++],m=a[h++];try{R=d(R)}catch(p){m.call(this,p);break}}try{l=rt.call(this,R)}catch(d){return Promise.reject(d)}for(h=0,y=u.length;h<y;)l=l.then(u[h++],u[h++]);return l}getUri(e){e=q(this.defaults,e);const n=Ot(e.baseURL,e.url,e.allowAbsoluteUrls);return bt(n,e.params,e.paramsSerializer)}};c.forEach(["delete","get","head","options"],function(e){I.prototype[e]=function(n,r){return this.request(q(r||{},{method:e,url:n,data:(r||{}).data}))}});c.forEach(["post","put","patch"],function(e){function n(r){return function(s,i,a){return this.request(q(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}I.prototype[e]=n(),I.prototype[e+"Form"]=n(!0)});let br=class Ct{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(o=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const i=new Promise(a=>{r.subscribe(a),s=a}).then(o);return i.cancel=function(){r.unsubscribe(s)},i},e(function(s,i,a){r.reason||(r.reason=new Y(s,i,a),n(r.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;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Ct(function(o){e=o}),cancel:e}}};function Rr(t){return function(n){return t.apply(null,n)}}function Er(t){return c.isObject(t)&&t.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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Te).forEach(([t,e])=>{Te[e]=t});function Pt(t){const e=new I(t),n=ct(I.prototype.request,e);return c.extend(n,I.prototype,e,{allOwnKeys:!0}),c.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return Pt(q(t,o))},n}const E=Pt(Q);E.Axios=I;E.CanceledError=Y;E.CancelToken=br;E.isCancel=Et;E.VERSION=_t;E.toFormData=fe;E.AxiosError=g;E.Cancel=E.CanceledError;E.all=function(e){return Promise.all(e)};E.spread=Rr;E.isAxiosError=Er;E.mergeConfig=q;E.AxiosHeaders=C;E.formToJSON=t=>Rt(c.isHTMLForm(t)?new FormData(t):t);E.getAdapter=xt.getAdapter;E.HttpStatusCode=Te;E.default=E;const{Axios:po,AxiosError:ho,CanceledError:mo,isCancel:go,CancelToken:yo,VERSION:wo,all:bo,Cancel:Ro,isAxiosError:Eo,spread:So,toFormData:Oo,AxiosHeaders:To,HttpStatusCode:Ao,formToJSON:xo,getAdapter:_o,mergeConfig:Co}=E,Sr={form:"application/x-www-form-urlencoded",json:"application/json",data:"multipart/form-data"},Or=["put","post","patch"],Ae="Local-Request-Id",Tr=100,Ar=300,xr="/api/proxy";class Lt{constructor(e={}){P(this,"axios");P(this,"settings");P(this,"records",{});P(this,"isLoading",!1);P(this,"stopSkipWarn");P(this,"showLoading");P(this,"showError");this.settings=Object.assign({type:"form"},e.settings||{});const n=S.omit(e,["settings","query"]);this.axios=E.create(S.merge({headers:{"Content-Type":"application/x-www-form-urlencoded"},timeout:120*1e3},n)),this.setupSkipWarn(this.settings),this.showLoading=S.debounce(this.openLoading.bind(this),Tr),this.showError=S.throttle(this._showError.bind(this),Ar,{leading:!0,trailing:!1})}setConfig(e={}){this.settings=S.merge(this.settings,e.settings||{});const n=S.omit(e,["settings","query"]);this.axios.defaults=S.merge(this.axios.defaults,n),this.setupSkipWarn(this.settings)}cancel(e,n="请求已取消"){if(e){const r=this.records[e];if(!r)return;r.source.cancel(n)}else for(const r of Object.values(this.records))r.source.cancel(n)}createHeaders(e,n,r){const o=n.injectHeaders?typeof n.headers=="function"?n.headers(e,r,n):n.headers||{}:{},s={"Content-Type":Sr[n.type||"form"],...r.headers,...o};return n.skipWarn&&(s[Ae]=e),s}isJsonType(e){return Object.entries(e).some(([n,r])=>n.toLowerCase()==="content-type"&&String(r).includes("application/json"))}toFormData(e,n="data"){if(e instanceof FormData||e instanceof URLSearchParams)return e;const r=n==="data"?new FormData:new URLSearchParams;return Object.entries(e).forEach(([o,s])=>{r.append(o,s)}),r}createSendData(e,n,r,o,s={}){const{type:i,skipWarn:a}=e,{name:f="skipWarn"}=a||{};let{data:u,params:l={},method:h="get"}=n;const y=o?{[f]:!0}:{};return Or.includes(h.toLowerCase())?(u=Object.assign(u||{},y),u=i!=="json"||!this.isJsonType(r)?this.toFormData(u,i):u,l={...s}):i==="form"?l={...u||{},...s,...y}:(u&&(i!=="json"||!this.isJsonType(r))&&(u=this.toFormData(u,i)),l={...s,...y}),{data:u,params:l}}createUrl(e){let{url:n,params:r}=e;if(n){let o=S.isUrl(n)?new URL(n).origin:"";const s=o?n.replace(o,""):n;try{const i=S.pathToRegexpCompile(s,{encode:encodeURIComponent});return o+i(r||{})}catch{console.warn("createUrl","pathToRegexpCompile error",n)}}return n}createProxy(e,n,r){if(!e.proxy)return{url:n,headers:r};const o=e.proxyPath||xr,{protocol:s,host:i}=location||{},a=S.isUrl(n)?n:`${s}//${i}${n}`;return r.Target=a,{url:o,headers:r}}openLoading(e){const{loading:n,showLoading:r}=e;n&&r&&Object.keys(this.records).length>0&&(this.isLoading=!0,r())}closeLoading(e){const{hideLoading:n}=e;this.isLoading=!1;const r=Object.keys(this.records);n&&r.length===0&&(this.isLoading=!1,n())}_showError(e,n){const{failMessage:r,showError:o}=e;if(r&&o){const s=n?.response?.data,i=s?.message||s?.msg||n?.message||n?.msg||"未知错误";o(i,n)}}validResponse(e,n){const{validSuccess:r,validate:o}=e;return r&&o?!!o(n):!0}isSkipWarnResponse(e){return!!e.promise}send(e={},n=!1){const r=S.merge({},this.settings,e.settings||{}),o=e.query||{},s=S.omit(e,["settings","query"]),i=S.uuid(!1),a=E.CancelToken.source();this.records[i]={settings:r,config:s,source:a};const f=this.createUrl(s)||"",u=this.createHeaders(i,r,s),{url:l,headers:h}=this.createProxy(r,f,u),{data:y,params:R}=this.createSendData(r,s,h,n,o);return this.showLoading(r),new Promise((d,m)=>{this.axios({cancelToken:a.token,...s,url:l,headers:h,data:y,params:R}).then(p=>this.isSkipWarnResponse(p)?d(p.promise):this.validResponse(r,p)?d(r.originResponse?p:p.data?.data):(this.showError(r,p.data),m(p.data))).catch(p=>(this.showError(r,p),m(p))).finally(()=>{delete this.records[i],this.closeLoading(r)})})}useResponse(e,n){const{response:r}=this.axios.interceptors,o=r.use(e,n);return()=>r.eject(o)}useRequest(e,n){const{request:r}=this.axios.interceptors,o=r.use(e,n);return()=>r.eject(o)}setupSkipWarn(e){if(this.stopSkipWarn&&(this.stopSkipWarn(),this.stopSkipWarn=void 0),!e.skipWarn)return;const{code:n,executor:r,callback:o,complete:s}=e.skipWarn;this.stopSkipWarn=this.useResponse(i=>{const f=(i.config.headers||{})[Ae],u=this.records[f];if(!u)return i;const{data:l}=i;if(!l||typeof l!="object")return i;if(l?.code===n){o&&o(i);const h=new Promise(r).then(()=>this.send({...u.config,settings:u.settings},!0));h.catch(y=>y).finally(()=>{s&&s()}),i.promise=h}return i})}}function Ut(t={}){const e=new Lt(t),n=e.send.bind(e),r=e.cancel.bind(e),o=e.setConfig.bind(e),s=e.useRequest.bind(e),i=e.useResponse.bind(e);return Object.assign(n,{...e,instance:e,send:n,cancel:r,setConfig:o,useRequest:s,useResponse:i})}const Fe=Ut({settings:{injectHeaders:!0,loading:!0,originResponse:!0}});function Nt(t,e=Fe){const n=typeof t=="string"?{url:t}:t;return(r,o)=>e.send(S.merge({},n,o||{},{data:r}))}function _r(t,e=Fe){const n={};for(const[r,o]of Object.entries(t))n[r]=Nt(o,e);return n}function Cr(t,e){const n=me.ref(null),r=me.ref(),o=me.ref(!0),s=()=>{o.value=!0,r.value=void 0,(typeof t=="function"?t():t).then(a=>{n.value=e?e(a):a}).catch(a=>{r.value=a}).finally(()=>{o.value=!1})};return s(),{data:n,error:r,loading:o,reload:s}}const $=typeof window<"u",Pr=t=>new Promise((e,n)=>{const r=new FileReader;r.readAsDataURL(t),r.onload=()=>{e(r.result)},r.onerror=o=>{n(o)}});function Lr(t){const e={};return t?(t.forEach((n,r)=>{e[r]=typeof n=="string"?decodeURIComponent(n):n}),e):{}}function Ur(t){const e=t.split(","),n=e[0].match(/:(.*?);/)?.[1],r=atob(e[1]);let o=r.length;const s=new Uint8Array(o);for(;o--;)s[o]=r.charCodeAt(o);return new Blob([s],{type:n})}function Nr(t,e){const n=t;return n.lastModified=Date.now(),n.lastModifiedDate=new Date,n.name=e,n}const Fr=t=>$?window.requestAnimationFrame(t):setTimeout(t,16),jr=t=>$?window.cancelAnimationFrame(t):clearTimeout(t);class Ft{constructor(e={}){P(this,"options",{type:"cache",expired:0,prefix:"__VTJ_"});P(this,"caches",{});P(this,"types");this.types={local:$?window.localStorage:this.caches,session:$?window.sessionStorage:this.caches,cache:this.caches},this.config(e)}config(e={}){this.options=Object.assign(this.options,e)}save(e,n,r={}){const{type:o,expired:s,prefix:i}={...this.options,...r},a=Date.now(),f=i+e,u=this.types[o]||this.caches,l={value:n,timestamp:a,expired:s};u===this.caches?u[f]=l:u.setItem(f,JSON.stringify(l))}get(e,n={}){const{type:r,prefix:o}={...this.options,...n},s=o+e,i=this.types[r]||this.caches;let a;if(i===this.caches)a=i[s];else{const y=i.getItem(s);if(y)try{a=JSON.parse(y)}catch(R){console.warn("[Storage] JSON.parse",R)}}if(!a)return null;const{value:f,timestamp:u,expired:l}=a;return l>0&&u+l<Date.now()?(this.remove(e,n),null):f}remove(e,n={}){const{type:r,prefix:o}={...this.options,...n},s=this.types[r]||this.caches,i=o+e;s===this.caches?delete s[i]:s.removeItem(i)}clear(e={}){const{type:n}={...this.options,...e},r=this.types[n]||this.caches;r===this.caches?this.caches={}:r.clear()}}const Dr=new Ft;function jt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var V={exports:{}},kr=V.exports,st;function Br(){return st||(st=1,(function(t,e){(function(n,r){r(e,t)})(kr,function(n,r){var o={timeout:5e3,jsonpCallback:"callback"};function s(){return"jsonp_"+Date.now()+"_"+Math.ceil(Math.random()*1e5)}function i(u){try{delete window[u]}catch{window[u]=void 0}}function a(u){var l=document.getElementById(u);l&&document.getElementsByTagName("head")[0].removeChild(l)}function f(u){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],h=u,y=l.timeout||o.timeout,R=l.jsonpCallback||o.jsonpCallback,d=void 0;return new Promise(function(m,p){var w=l.jsonpCallbackFunction||s(),O=R+"_"+w;window[w]=function(T){m({ok:!0,json:function(){return Promise.resolve(T)}}),d&&clearTimeout(d),a(O),i(w)},h+=h.indexOf("?")===-1?"?":"&";var b=document.createElement("script");b.setAttribute("src",""+h+R+"="+w),l.charset&&b.setAttribute("charset",l.charset),l.nonce&&b.setAttribute("nonce",l.nonce),l.referrerPolicy&&b.setAttribute("referrerPolicy",l.referrerPolicy),l.crossorigin&&b.setAttribute("crossorigin","true"),b.id=O,document.getElementsByTagName("head")[0].appendChild(b),d=setTimeout(function(){p(new Error("JSONP request to "+u+" timed out")),i(w),a(O),window[w]=function(){i(w)}},y),b.onerror=function(){p(new Error("JSONP request to "+u+" failed")),i(w),a(O),d&&clearTimeout(d)}})}r.exports=f})})(V,V.exports)),V.exports}var vr=Br();const Ir=jt(vr);function qr(t){if($){const{protocol:e,host:n,pathname:r}=location;return`${e}//${n}${t?r:""}`}else return null}function Mr(t=""){const e=t.match(S.rURL);return e?e[0]:""}function Dt(t){const e=[];for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push([n,encodeURIComponent(t[n])].join("="));return e.join("&")}function xe(t,e,n){const r={};t=(t||location.search).replace(/^[^]*\?/,""),e=e||"&",n=n||"=";let o;const s=new RegExp("(?:^|\\"+e+")([^\\"+n+"\\"+e+"]+)(?:\\"+n+"([^\\"+e+"]*))?","g");for(;(o=s.exec(t))!==null;)o[1]!==t&&(r[decodeURIComponent(o[1])]=decodeURIComponent(o[2]||""));return r}function kt(t,e){e=typeof e=="string"?xe(e):e;const n=t.split("?")[0],r=xe(t),o=Object.assign({},r,e),s=Dt(o);return s?[n,s].join("?"):t}const Hr=Object.freeze(Object.defineProperty({__proto__:null,append:kt,getCurrentHost:qr,getHost:Mr,parse:xe,stringify:Dt},Symbol.toStringTag,{value:"Module"}));async function $r(t,e={}){const{query:n={}}=e;t.includes("${")&&(t=S.template(t)(n||{}));const r=kt(t,n);return await(await Ir(r,e)).json()}var Re,it;function Jr(){if(it)return Re;it=1,Re=function(o,s,i){var a=document.head||document.getElementsByTagName("head")[0],f=document.createElement("script");typeof s=="function"&&(i=s,s={}),s=s||{},i=i||function(){},f.type=s.type||"text/javascript",f.charset=s.charset||"utf8",f.async="async"in s?!!s.async:!0,f.src=o,s.attrs&&t(f,s.attrs),s.text&&(f.text=""+s.text);var u="onload"in f?e:n;u(f,i),f.onload||e(f,i),a.appendChild(f)};function t(r,o){for(var s in o)r.setAttribute(s,o[s])}function e(r,o){r.onload=function(){this.onerror=this.onload=null,o(null,r)},r.onerror=function(){this.onerror=this.onload=null,o(new Error("Failed to load "+this.src),r)}}function n(r,o){r.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,o(null,r))}}return Re}var Wr=Jr();const zr=jt(Wr);function Vr(t,e={}){return new Promise((n,r)=>{const{library:o}=e;zr(t,e,(s,i)=>{s?r(s):n(o?window[o]:void 0)})})}const at={debug:-1,log:0,info:0,warn:1,error:2},Kr=function(t,e,n,r){return function(...o){if(e&&at[e]<=at[t]&&console[t].apply&&(r==="*"||n.startsWith(r)))return console[t].apply(console,Xr(o,n))}};function Xr(t,e){return e!=="*"&&(typeof t[0]=="string"?t[0]=`[${e}] ${t[0]}`:t=["["+e+"]"].concat(t)),t}function Gr(t,e){if(!t)return{targetLevel:e.level,targetBizName:e.bizName};if(~t.indexOf(":")){const n=t.split(":");return{targetLevel:n[0],targetBizName:n[1]}}return{targetLevel:t,targetBizName:"*"}}const Qr={level:"warn",bizName:"*"};class Bt{constructor(e){P(this,"config");P(this,"options");this.options={...Qr,...e};const n=typeof location<"u"?location:{},r=(/__(?:logConf|logLevel)__=([^#/&]*)/.exec(n.href)||[])[1];this.config=Gr(r,e)}_log(e){const{targetLevel:n,targetBizName:r}=this.config,{bizName:o}=this.options;return Kr(e,n,o,r)}debug(...e){return this._log("debug")(...e)}log(...e){return this._log("log")(...e)}info(...e){return this._log("info")(...e)}warn(...e){return this._log("warn")(...e)}error(...e){return this._log("error")(...e)}}function vt(t){return new Bt(t)}const Yr=vt({level:"log",bizName:"VTJ"});/*! js-cookie v3.0.8 | MIT */function re(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)r!=="__proto__"&&(t[r]=n[r])}return t}var Zr={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function _e(t,e){function n(o,s,i){if(!(typeof document>"u")){i=re({},e,i),typeof i.expires=="number"&&(i.expires=new Date(Date.now()+i.expires*864e5)),i.expires&&(i.expires=i.expires.toUTCString()),o=encodeURIComponent(o).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=o+"="+t.write(s,o)+a}}function r(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var s=document.cookie?document.cookie.split("; "):[],i={},a=0;a<s.length;a++){var f=s[a].split("="),u=f.slice(1).join("=");try{var l=decodeURIComponent(f[0]);if(l in i||(i[l]=t.read(u,l)),o===l)break}catch{}}return o?i[o]:i}}return Object.create({set:n,get:r,remove:function(o,s){n(o,"",re({},s,{expires:-1}))},withAttributes:function(o){return _e(this.converter,re({},this.attributes,o))},withConverter:function(o){return _e(re({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var je=_e(Zr,{path:"/"});function eo(t,e,n){je.set(t,e,n)}function to(t){return je.get(t)}function no(t,e){je.remove(t,e)}const ro=Object.freeze(Object.defineProperty({__proto__:null,get:to,remove:no,set:eo},Symbol.toStringTag,{value:"Module"}));function oo(t,e=""){const n=document.createElement("a");n.download=e,n.href=t,n.target="_blank",n.click()}function De(t,e="",n){const r=new Blob([t],{type:n}),o=document.createElement("a");o.download=e,o.style.display="none",o.href=URL.createObjectURL(r),o.click(),URL.revokeObjectURL(o.href)}async function so(t,e="",n){return fetch(t,{credentials:"include"}).then(async r=>{const o=await r.blob();return De(o,e,n),o})}function io(t,e=""){const n=JSON.stringify(t);De(n,e,"application/json")}function ao(){const t=navigator.userAgent;let e="Unknown",n="Unknown",r="Unknown",o="Unknown",s=!1;if(/Windows NT/i.test(t)){e="Windows";const a={"12.0":"12","11.0":"11","10.0":"10","6.3":"8.1","6.2":"8","6.1":"7","6.0":"Vista","5.2":"XP 64-bit","5.1":"XP"},f=t.match(/Windows NT (\d+\.\d+)/);f&&(n=a[f[1]]||f[1])}else if(/Mac OS X/i.test(t)){e="Mac OS";const a=t.match(/Mac OS X (\d+[._]\d+[._]?\d*)/);a&&(n=a[1].replace(/_/g,"."))}else if(/(iPhone|iPad|iPod)/i.test(t)){e="iOS";const a=t.match(/OS (\d+[_\.]\d+[_\.]?\d*)/);a&&(n=a[1].replace(/_/g,"."))}else if(/Android/i.test(t)){e="Android";const a=t.match(/Android (\d+\.\d+)/);a&&(n=a[1])}else/Linux/i.test(t)&&(e="Linux");const i=t.match(/(Edge|Edg|Edga|EdgA)\/(\d+)/i);if(i)r="Microsoft Edge",o=i[2];else{const a=t.match(/Firefox\/(\d+)/i);if(a)r="Firefox",o=a[1];else{const f=t.match(/(Opera|OPR)\/(\d+)/i);if(f)r="Opera",o=f[2];else{const u=t.match(/Chrome\/(\d+)/i);if(u)r="Chrome",o=u[1];else{const l=t.match(/Version\/(\d+\.\d+)/i);if(l&&/Safari/i.test(t))r="Safari",o=l[1];else{const h=t.match(/(MSIE |Trident.*rv:)(\d+)/i);h&&(r="Internet Explorer",o=h[2])}}}}}return s=/(iPhone|iPod|iPad|Android|Windows Phone|Mobile)/i.test(t)||["iOS","Android"].includes(e),/(iPad|Tablet|Android(?!.*Mobile))/i.test(t)&&(s=!0),{os:e,osVersion:n,browser:r,browserVersion:o,isMobile:s}}exports.LOCAL_REQUEST_ID=Ae;exports.Logger=Bt;exports.Request=Lt;exports.Storage=Ft;exports.VTJ_UTILS_VERSION=Ht;exports.axios=E;exports.blobToFile=Nr;exports.cAF=jr;exports.cookie=ro;exports.createApi=Nt;exports.createApis=_r;exports.createRequest=Ut;exports.dataURLtoBlob=Ur;exports.downloadBlob=De;exports.downloadJson=io;exports.downloadRemoteFile=so;exports.downloadUrl=oo;exports.fileToBase64=Pr;exports.formDataToJson=Lr;exports.getClientInfo=ao;exports.getLogger=vt;exports.isClient=$;exports.jsonp=$r;exports.loadScript=Vr;exports.logger=Yr;exports.rAF=Fr;exports.request=Fe;exports.storage=Dr;exports.url=Hr;exports.useApi=Cr;Object.keys(S).forEach(t=>{t!=="default"&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:()=>S[t]})});
|
|
7
|
+
*/const Yt="0.17.7";function yt(t,e){return function(){return t.apply(e,arguments)}}const{toString:Zt}=Object.prototype,{getPrototypeOf:ye}=Object,{iterator:we,toStringTag:wt}=Symbol,be=(t=>e=>{const n=Zt.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),F=t=>(t=t.toLowerCase(),e=>be(e)===t),Ee=t=>e=>typeof e===t,{isArray:Q}=Array,X=Ee("undefined");function re(t){return t!==null&&!X(t)&&t.constructor!==null&&!X(t.constructor)&&P(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const bt=F("ArrayBuffer");function en(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&bt(t.buffer),e}const tn=Ee("string"),P=Ee("function"),Et=Ee("number"),oe=t=>t!==null&&typeof t=="object",nn=t=>t===!0||t===!1,pe=t=>{if(be(t)!=="object")return!1;const e=ye(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(wt in t)&&!(we in t)},rn=t=>{if(!oe(t)||re(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},on=F("Date"),sn=F("File"),an=t=>!!(t&&typeof t.uri<"u"),cn=t=>t&&typeof t.getParts<"u",ln=F("Blob"),un=F("FileList"),fn=t=>oe(t)&&P(t.pipe);function dn(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const et=dn(),tt=typeof et.FormData<"u"?et.FormData:void 0,pn=t=>{if(!t)return!1;if(tt&&t instanceof tt)return!0;const e=ye(t);if(!e||e===Object.prototype||!P(t.append))return!1;const n=be(t);return n==="formdata"||n==="object"&&P(t.toString)&&t.toString()==="[object FormData]"},hn=F("URLSearchParams"),[mn,gn,yn,wn]=["ReadableStream","Request","Response","Headers"].map(F),bn=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function se(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,o;if(typeof t!="object"&&(t=[t]),Q(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{if(re(t))return;const s=n?Object.getOwnPropertyNames(t):Object.keys(t),i=s.length;let a;for(r=0;r<i;r++)a=s[r],e.call(null,t[a],a,t)}}function Rt(t,e){if(re(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,o;for(;r-- >0;)if(o=n[r],e===o.toLowerCase())return o;return null}const z=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ot=t=>!X(t)&&t!==z;function De(...t){const{caseless:e,skipUndefined:n}=Ot(this)&&this||{},r={},o=(s,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const a=e&&Rt(r,i)||i,l=Ue(r,a)?r[a]:void 0;pe(l)&&pe(s)?r[a]=De(l,s):pe(s)?r[a]=De({},s):Q(s)?r[a]=s.slice():(!n||!X(s))&&(r[a]=s)};for(let s=0,i=t.length;s<i;s++)t[s]&&se(t[s],o);return r}const En=(t,e,n,{allOwnKeys:r}={})=>(se(e,(o,s)=>{n&&P(o)?Object.defineProperty(t,s,{__proto__:null,value:yt(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,s,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),t),Rn=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),On=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),Object.defineProperty(t.prototype,"constructor",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{__proto__:null,value:e.prototype}),n&&Object.assign(t.prototype,n)},Sn=(t,e,n,r)=>{let o,s,i;const a={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),s=o.length;s-- >0;)i=o[s],(!r||r(i,t,e))&&!a[i]&&(e[i]=t[i],a[i]=!0);t=n!==!1&&ye(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},_n=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},An=t=>{if(!t)return null;if(Q(t))return t;let e=t.length;if(!Et(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Tn=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&ye(Uint8Array)),xn=(t,e)=>{const r=(t&&t[we]).call(t);let o;for(;(o=r.next())&&!o.done;){const s=o.value;e.call(t,s[0],s[1])}},Cn=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Pn=F("HTMLFormElement"),Ln=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Ue=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Nn=F("RegExp"),St=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};se(n,(o,s)=>{let i;(i=e(o,s,t))!==!1&&(r[s]=i||o)}),Object.defineProperties(t,r)},Dn=t=>{St(t,(e,n)=>{if(P(t)&&["arguments","caller","callee"].includes(n))return!1;const r=t[n];if(P(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Un=(t,e)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return Q(t)?r(t):r(String(t).split(e)),n},Fn=()=>{},jn=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function kn(t){return!!(t&&P(t.append)&&t[wt]==="FormData"&&t[we])}const Bn=t=>{const e=new WeakSet,n=r=>{if(oe(r)){if(e.has(r))return;if(re(r))return r;if(!("toJSON"in r)){e.add(r);const o=Q(r)?[]:{};return se(r,(s,i)=>{const a=n(s);!X(a)&&(o[i]=a)}),e.delete(r),o}}return r};return n(t)},vn=F("AsyncFunction"),In=t=>t&&(oe(t)||P(t))&&P(t.then)&&P(t.catch),_t=((t,e)=>t?setImmediate:e?((n,r)=>(z.addEventListener("message",({source:o,data:s})=>{o===z&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),z.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",P(z.postMessage)),qn=typeof queueMicrotask<"u"?queueMicrotask.bind(z):typeof process<"u"&&process.nextTick||_t,Mn=t=>t!=null&&P(t[we]),c={isArray:Q,isArrayBuffer:bt,isBuffer:re,isFormData:pn,isArrayBufferView:en,isString:tn,isNumber:Et,isBoolean:nn,isObject:oe,isPlainObject:pe,isEmptyObject:rn,isReadableStream:mn,isRequest:gn,isResponse:yn,isHeaders:wn,isUndefined:X,isDate:on,isFile:sn,isReactNativeBlob:an,isReactNative:cn,isBlob:ln,isRegExp:Nn,isFunction:P,isStream:fn,isURLSearchParams:hn,isTypedArray:Tn,isFileList:un,forEach:se,merge:De,extend:En,trim:bn,stripBOM:Rn,inherits:On,toFlatObject:Sn,kindOf:be,kindOfTest:F,endsWith:_n,toArray:An,forEachEntry:xn,matchAll:Cn,isHTMLForm:Pn,hasOwnProperty:Ue,hasOwnProp:Ue,reduceDescriptors:St,freezeMethods:Dn,toObjectSet:Un,toCamelCase:Ln,noop:Fn,toFiniteNumber:jn,findKey:Rt,global:z,isContextDefined:Ot,isSpecCompliantForm:kn,toJSONObject:Bn,isAsyncFn:vn,isThenable:In,setImmediate:_t,asap:qn,isIterable:Mn},Hn=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"]),Jn=t=>{const e={};let n,r,o;return t&&t.split(`
|
|
8
|
+
`).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||e[n]&&Hn[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e};function zn(t){let e=0,n=t.length;for(;e<n;){const r=t.charCodeAt(e);if(r!==9&&r!==32)break;e+=1}for(;n>e;){const r=t.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return e===0&&n===t.length?t:t.slice(e,n)}const $n=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Wn=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function qe(t,e){return c.isArray(t)?t.map(n=>qe(n,e)):zn(String(t).replace(e,""))}const Vn=t=>qe(t,$n),Kn=t=>qe(t,Wn);function At(t){const e=Object.create(null);return c.forEach(t.toJSON(),(n,r)=>{e[r]=Kn(n)}),e}const nt=Symbol("internals");function te(t){return t&&String(t).trim().toLowerCase()}function he(t){return t===!1||t==null?t:c.isArray(t)?t.map(he):Vn(String(t))}function Xn(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const Gn=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function xe(t,e,n,r,o){if(c.isFunction(r))return r.call(this,e,n);if(o&&(e=n),!!c.isString(e)){if(c.isString(r))return e.indexOf(r)!==-1;if(c.isRegExp(r))return r.test(e)}}function Qn(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Yn(t,e){const n=c.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{__proto__:null,value:function(o,s,i){return this[r].call(this,e,o,s,i)},configurable:!0})})}let C=class{constructor(e){e&&this.set(e)}set(e,n,r){const o=this;function s(a,l,f){const u=te(l);if(!u)throw new Error("header name must be a non-empty string");const p=c.findKey(o,u);(!p||o[p]===void 0||f===!0||f===void 0&&o[p]!==!1)&&(o[p||l]=he(a))}const i=(a,l)=>c.forEach(a,(f,u)=>s(f,u,l));if(c.isPlainObject(e)||e instanceof this.constructor)i(e,n);else if(c.isString(e)&&(e=e.trim())&&!Gn(e))i(Jn(e),n);else if(c.isObject(e)&&c.isIterable(e)){let a={},l,f;for(const u of e){if(!c.isArray(u))throw TypeError("Object iterator must return a key-value pair");a[f=u[0]]=(l=a[f])?c.isArray(l)?[...l,u[1]]:[l,u[1]]:u[1]}i(a,n)}else e!=null&&s(n,e,r);return this}get(e,n){if(e=te(e),e){const r=c.findKey(this,e);if(r){const o=this[r];if(!n)return o;if(n===!0)return Xn(o);if(c.isFunction(n))return n.call(this,o,r);if(c.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=te(e),e){const r=c.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||xe(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let o=!1;function s(i){if(i=te(i),i){const a=c.findKey(r,i);a&&(!n||xe(r,r[a],a,n))&&(delete r[a],o=!0)}}return c.isArray(e)?e.forEach(s):s(e),o}clear(e){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const s=n[r];(!e||xe(this,this[s],s,e,!0))&&(delete this[s],o=!0)}return o}normalize(e){const n=this,r={};return c.forEach(this,(o,s)=>{const i=c.findKey(r,s);if(i){n[i]=he(o),delete n[s];return}const a=e?Qn(s):String(s).trim();a!==s&&delete n[s],n[a]=he(o),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return c.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=e&&c.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
|
|
9
|
+
`)}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,...n){const r=new this(e);return n.forEach(o=>r.set(o)),r}static accessor(e){const r=(this[nt]=this[nt]={accessors:{}}).accessors,o=this.prototype;function s(i){const a=te(i);r[a]||(Yn(o,i),r[a]=!0)}return c.isArray(e)?e.forEach(s):s(e),this}};C.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);c.reduceDescriptors(C.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});c.freezeMethods(C);const Zn="[REDACTED ****]";function er(t){if(c.hasOwnProp(t,"toJSON"))return!0;let e=Object.getPrototypeOf(t);for(;e&&e!==Object.prototype;){if(c.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}function tr(t,e){const n=new Set(e.map(s=>String(s).toLowerCase())),r=[],o=s=>{if(s===null||typeof s!="object"||c.isBuffer(s))return s;if(r.indexOf(s)!==-1)return;s instanceof C&&(s=s.toJSON()),r.push(s);let i;if(c.isArray(s))i=[],s.forEach((a,l)=>{const f=o(a);c.isUndefined(f)||(i[l]=f)});else{if(!c.isPlainObject(s)&&er(s))return r.pop(),s;i=Object.create(null);for(const[a,l]of Object.entries(s)){const f=n.has(a.toLowerCase())?Zn:o(l);c.isUndefined(f)||(i[a]=f)}}return r.pop(),i};return o(t)}let g=class Tt extends Error{static from(e,n,r,o,s,i){const a=new Tt(e.message,n||e.code,r,o,s);return a.cause=e,a.name=e.name,e.status!=null&&a.status==null&&(a.status=e.status),i&&Object.assign(a,i),a}constructor(e,n,r,o,s){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),s&&(this.response=s,this.status=s.status)}toJSON(){const e=this.config,n=e&&c.hasOwnProp(e,"redact")?e.redact:void 0,r=c.isArray(n)&&n.length>0?tr(e,n):c.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:r,code:this.code,status:this.status}}};g.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";g.ERR_BAD_OPTION="ERR_BAD_OPTION";g.ECONNABORTED="ECONNABORTED";g.ETIMEDOUT="ETIMEDOUT";g.ECONNREFUSED="ECONNREFUSED";g.ERR_NETWORK="ERR_NETWORK";g.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";g.ERR_DEPRECATED="ERR_DEPRECATED";g.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";g.ERR_BAD_REQUEST="ERR_BAD_REQUEST";g.ERR_CANCELED="ERR_CANCELED";g.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";g.ERR_INVALID_URL="ERR_INVALID_URL";g.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const nr=null;function Fe(t){return c.isPlainObject(t)||c.isArray(t)}function xt(t){return c.endsWith(t,"[]")?t.slice(0,-2):t}function Ce(t,e,n){return t?t.concat(e).map(function(o,s){return o=xt(o),!n&&s?"["+o+"]":o}).join(n?".":""):e}function rr(t){return c.isArray(t)&&!t.some(Fe)}const or=c.toFlatObject(c,{},null,function(e){return/^is[A-Z]/.test(e)});function Re(t,e,n){if(!c.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=c.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(d,m){return!c.isUndefined(m[d])});const r=n.metaTokens,o=n.visitor||p,s=n.dots,i=n.indexes,a=n.Blob||typeof Blob<"u"&&Blob,l=n.maxDepth===void 0?100:n.maxDepth,f=a&&c.isSpecCompliantForm(e);if(!c.isFunction(o))throw new TypeError("visitor must be a function");function u(h){if(h===null)return"";if(c.isDate(h))return h.toISOString();if(c.isBoolean(h))return h.toString();if(!f&&c.isBlob(h))throw new g("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 p(h,d,m){let O=h;if(c.isReactNative(e)&&c.isReactNativeBlob(h))return e.append(Ce(m,d,s),u(h)),!1;if(h&&!m&&typeof h=="object"){if(c.endsWith(d,"{}"))d=r?d:d.slice(0,-2),h=JSON.stringify(h);else if(c.isArray(h)&&rr(h)||(c.isFileList(h)||c.endsWith(d,"[]"))&&(O=c.toArray(h)))return d=xt(d),O.forEach(function(R,L){!(c.isUndefined(R)||R===null)&&e.append(i===!0?Ce([d],L,s):i===null?d:d+"[]",u(R))}),!1}return Fe(h)?!0:(e.append(Ce(m,d,s),u(h)),!1)}const y=[],w=Object.assign(or,{defaultVisitor:p,convertValue:u,isVisitable:Fe});function b(h,d,m=0){if(!c.isUndefined(h)){if(m>l)throw new g("Object is too deeply nested ("+m+" levels). Max depth: "+l,g.ERR_FORM_DATA_DEPTH_EXCEEDED);if(y.indexOf(h)!==-1)throw Error("Circular reference detected in "+d.join("."));y.push(h),c.forEach(h,function(E,R){(!(c.isUndefined(E)||E===null)&&o.call(e,E,c.isString(R)?R.trim():R,d,w))===!0&&b(E,d?d.concat(R):[R],m+1)}),y.pop()}}if(!c.isObject(t))throw new TypeError("data must be an object");return b(t),e}function rt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(r){return e[r]})}function Me(t,e){this._pairs=[],t&&Re(t,this,e)}const Ct=Me.prototype;Ct.append=function(e,n){this._pairs.push([e,n])};Ct.toString=function(e){const n=e?function(r){return e.call(this,r,rt)}:rt;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function sr(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Pt(t,e,n){if(!e)return t;const r=n&&n.encode||sr,o=c.isFunction(n)?{serialize:n}:n,s=o&&o.serialize;let i;if(s?i=s(e,o):i=c.isURLSearchParams(e)?e.toString():new Me(e,o).toString(r),i){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class ot{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){c.forEach(this.handlers,function(r){r!==null&&e(r)})}}const He={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},ir=typeof URLSearchParams<"u"?URLSearchParams:Me,ar=typeof FormData<"u"?FormData:null,cr=typeof Blob<"u"?Blob:null,lr={isBrowser:!0,classes:{URLSearchParams:ir,FormData:ar,Blob:cr},protocols:["http","https","file","blob","url","data"]},Je=typeof window<"u"&&typeof document<"u",je=typeof navigator=="object"&&navigator||void 0,ur=Je&&(!je||["ReactNative","NativeScript","NS"].indexOf(je.product)<0),fr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",dr=Je&&window.location.href||"http://localhost",pr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Je,hasStandardBrowserEnv:ur,hasStandardBrowserWebWorkerEnv:fr,navigator:je,origin:dr},Symbol.toStringTag,{value:"Module"})),x={...pr,...lr};function hr(t,e){return Re(t,new x.classes.URLSearchParams,{visitor:function(n,r,o,s){return x.isNode&&c.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...e})}function mr(t){return c.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function gr(t){const e={},n=Object.keys(t);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],e[s]=t[s];return e}function Lt(t){function e(n,r,o,s){let i=n[s++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),l=s>=n.length;return i=!i&&c.isArray(o)?o.length:i,l?(c.hasOwnProp(o,i)?o[i]=c.isArray(o[i])?o[i].concat(r):[o[i],r]:o[i]=r,!a):((!c.hasOwnProp(o,i)||!c.isObject(o[i]))&&(o[i]=[]),e(n,r,o[i],s)&&c.isArray(o[i])&&(o[i]=gr(o[i])),!a)}if(c.isFormData(t)&&c.isFunction(t.entries)){const n={};return c.forEachEntry(t,(r,o)=>{e(mr(r),o,n,0)}),n}return null}const K=(t,e)=>t!=null&&c.hasOwnProp(t,e)?t[e]:void 0;function yr(t,e,n){if(c.isString(t))try{return(e||JSON.parse)(t),c.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const ie={transitional:He,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=c.isObject(e);if(s&&c.isHTMLForm(e)&&(e=new FormData(e)),c.isFormData(e))return o?JSON.stringify(Lt(e)):e;if(c.isArrayBuffer(e)||c.isBuffer(e)||c.isStream(e)||c.isFile(e)||c.isBlob(e)||c.isReadableStream(e))return e;if(c.isArrayBufferView(e))return e.buffer;if(c.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(s){const l=K(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return hr(e,l).toString();if((a=c.isFileList(e))||r.indexOf("multipart/form-data")>-1){const f=K(this,"env"),u=f&&f.FormData;return Re(a?{"files[]":e}:e,u&&new u,l)}}return s||o?(n.setContentType("application/json",!1),yr(e)):e}],transformResponse:[function(e){const n=K(this,"transitional")||ie.transitional,r=n&&n.forcedJSONParsing,o=K(this,"responseType"),s=o==="json";if(c.isResponse(e)||c.isReadableStream(e))return e;if(e&&c.isString(e)&&(r&&!o||s)){const a=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(e,K(this,"parseReviver"))}catch(l){if(a)throw l.name==="SyntaxError"?g.from(l,g.ERR_BAD_RESPONSE,this,null,K(this,"response")):l}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:x.classes.FormData,Blob:x.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch","query"],t=>{ie.headers[t]={}});function Pe(t,e){const n=this||ie,r=e||n,o=C.from(r.headers);let s=r.data;return c.forEach(t,function(a){s=a.call(n,s,o.normalize(),e?e.status:void 0)}),o.normalize(),s}function Nt(t){return!!(t&&t.__CANCEL__)}let ae=class extends g{constructor(e,n,r){super(e??"canceled",g.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Dt(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new g("Request failed with status code "+n.status,n.status>=400&&n.status<500?g.ERR_BAD_REQUEST:g.ERR_BAD_RESPONSE,n.config,n.request,n))}function wr(t){const e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return e&&e[1]||""}function br(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o=0,s=0,i;return e=e!==void 0?e:1e3,function(l){const f=Date.now(),u=r[s];i||(i=f),n[o]=l,r[o]=f;let p=s,y=0;for(;p!==o;)y+=n[p++],p=p%t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),f-i<e)return;const w=u&&f-u;return w?Math.round(y*1e3/w):void 0}}function Er(t,e){let n=0,r=1e3/e,o,s;const i=(f,u=Date.now())=>{n=u,o=null,s&&(clearTimeout(s),s=null),t(...f)};return[(...f)=>{const u=Date.now(),p=u-n;p>=r?i(f,u):(o=f,s||(s=setTimeout(()=>{s=null,i(o)},r-p)))},()=>o&&i(o)]}const ge=(t,e,n=3)=>{let r=0;const o=br(50,250);return Er(s=>{if(!s||typeof s.loaded!="number")return;const i=s.loaded,a=s.lengthComputable?s.total:void 0,l=a!=null?Math.min(i,a):i,f=Math.max(0,l-r),u=o(f);r=Math.max(r,l);const p={loaded:l,total:a,progress:a?l/a:void 0,bytes:f,rate:u||void 0,estimated:u&&a?(a-l)/u:void 0,event:s,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(p)},n)},st=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},it=t=>(...e)=>c.asap(()=>t(...e)),Rr=x.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,x.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(x.origin),x.navigator&&/(msie|trident)/i.test(x.navigator.userAgent)):()=>!0,Or=x.hasStandardBrowserEnv?{write(t,e,n,r,o,s,i){if(typeof document>"u")return;const a=[`${t}=${encodeURIComponent(e)}`];c.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),c.isString(r)&&a.push(`path=${r}`),c.isString(o)&&a.push(`domain=${o}`),s===!0&&a.push("secure"),c.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.split(";");for(let n=0;n<e.length;n++){const r=e[n].replace(/^\s+/,""),o=r.indexOf("=");if(o!==-1&&r.slice(0,o)===t)return decodeURIComponent(r.slice(o+1))}return null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Sr(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function _r(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Ut(t,e,n){let r=!Sr(e);return t&&(r||n===!1)?_r(t,e):e}const at=t=>t instanceof C?{...t}:t;function W(t,e){e=e||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(f,u,p,y){return c.isPlainObject(f)&&c.isPlainObject(u)?c.merge.call({caseless:y},f,u):c.isPlainObject(u)?c.merge({},u):c.isArray(u)?u.slice():u}function o(f,u,p,y){if(c.isUndefined(u)){if(!c.isUndefined(f))return r(void 0,f,p,y)}else return r(f,u,p,y)}function s(f,u){if(!c.isUndefined(u))return r(void 0,u)}function i(f,u){if(c.isUndefined(u)){if(!c.isUndefined(f))return r(void 0,f)}else return r(void 0,u)}function a(f,u,p){if(c.hasOwnProp(e,p))return r(f,u);if(c.hasOwnProp(t,p))return r(void 0,f)}const l={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,allowedSocketPaths:i,responseEncoding:i,validateStatus:a,headers:(f,u,p)=>o(at(f),at(u),p,!0)};return c.forEach(Object.keys({...t,...e}),function(u){if(u==="__proto__"||u==="constructor"||u==="prototype")return;const p=c.hasOwnProp(l,u)?l[u]:o,y=c.hasOwnProp(t,u)?t[u]:void 0,w=c.hasOwnProp(e,u)?e[u]:void 0,b=p(y,w,u);c.isUndefined(b)&&p!==a||(n[u]=b)}),n}const Ar=["content-type","content-length"];function Tr(t,e,n){if(n!=="content-only"){t.set(e);return}Object.entries(e).forEach(([r,o])=>{Ar.includes(r.toLowerCase())&&t.set(r,o)})}const xr=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,n)=>String.fromCharCode(parseInt(n,16))),Ft=t=>{const e=W({},t),n=y=>c.hasOwnProp(e,y)?e[y]:void 0,r=n("data");let o=n("withXSRFToken");const s=n("xsrfHeaderName"),i=n("xsrfCookieName");let a=n("headers");const l=n("auth"),f=n("baseURL"),u=n("allowAbsoluteUrls"),p=n("url");if(e.headers=a=C.from(a),e.url=Pt(Ut(f,p,u),t.params,t.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?xr(l.password):""))),c.isFormData(r)&&(x.hasStandardBrowserEnv||x.hasStandardBrowserWebWorkerEnv?a.setContentType(void 0):c.isFunction(r.getHeaders)&&Tr(a,r.getHeaders(),n("formDataHeaderPolicy"))),x.hasStandardBrowserEnv&&(c.isFunction(o)&&(o=o(e)),o===!0||o==null&&Rr(e.url))){const w=s&&i&&Or.read(i);w&&a.set(s,w)}return e},Cr=typeof XMLHttpRequest<"u",Pr=Cr&&function(t){return new Promise(function(n,r){const o=Ft(t);let s=o.data;const i=C.from(o.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:f}=o,u,p,y,w,b;function h(){w&&w(),b&&b(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let d=new XMLHttpRequest;d.open(o.method.toUpperCase(),o.url,!0),d.timeout=o.timeout;function m(){if(!d)return;const E=C.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),L={data:!a||a==="text"||a==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:E,config:t,request:d};Dt(function(Y){n(Y),h()},function(Y){r(Y),h()},L),d=null}"onloadend"in d?d.onloadend=m:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.startsWith("file:"))||setTimeout(m)},d.onabort=function(){d&&(r(new g("Request aborted",g.ECONNABORTED,t,d)),h(),d=null)},d.onerror=function(R){const L=R&&R.message?R.message:"Network Error",M=new g(L,g.ERR_NETWORK,t,d);M.event=R||null,r(M),h(),d=null},d.ontimeout=function(){let R=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const L=o.transitional||He;o.timeoutErrorMessage&&(R=o.timeoutErrorMessage),r(new g(R,L.clarifyTimeoutError?g.ETIMEDOUT:g.ECONNABORTED,t,d)),h(),d=null},s===void 0&&i.setContentType(null),"setRequestHeader"in d&&c.forEach(At(i),function(R,L){d.setRequestHeader(L,R)}),c.isUndefined(o.withCredentials)||(d.withCredentials=!!o.withCredentials),a&&a!=="json"&&(d.responseType=o.responseType),f&&([y,b]=ge(f,!0),d.addEventListener("progress",y)),l&&d.upload&&([p,w]=ge(l),d.upload.addEventListener("progress",p),d.upload.addEventListener("loadend",w)),(o.cancelToken||o.signal)&&(u=E=>{d&&(r(!E||E.type?new ae(null,t,d):E),d.abort(),h(),d=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const O=wr(o.url);if(O&&!x.protocols.includes(O)){r(new g("Unsupported protocol "+O+":",g.ERR_BAD_REQUEST,t));return}d.send(s||null)})},Lr=(t,e)=>{if(t=t?t.filter(Boolean):[],!e&&!t.length)return;const n=new AbortController;let r=!1;const o=function(l){if(!r){r=!0,i();const f=l instanceof Error?l:this.reason;n.abort(f instanceof g?f:new ae(f instanceof Error?f.message:f))}};let s=e&&setTimeout(()=>{s=null,o(new g(`timeout of ${e}ms exceeded`,g.ETIMEDOUT))},e);const i=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),t=null)};t.forEach(l=>l.addEventListener("abort",o));const{signal:a}=n;return a.unsubscribe=()=>c.asap(i),a},Nr=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,o;for(;r<n;)o=r+e,yield t.slice(r,o),r=o},Dr=async function*(t,e){for await(const n of Ur(t))yield*Nr(n,e)},Ur=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},ct=(t,e,n,r)=>{const o=Dr(t,e);let s=0,i,a=l=>{i||(i=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:f,value:u}=await o.next();if(f){a(),l.close();return}let p=u.byteLength;if(n){let y=s+=p;n(y)}l.enqueue(new Uint8Array(u))}catch(f){throw a(f),f}},cancel(l){return a(l),o.return()}},{highWaterMark:2})};function Fr(t){if(!t||typeof t!="string"||!t.startsWith("data:"))return 0;const e=t.indexOf(",");if(e<0)return 0;const n=t.slice(5,e),r=t.slice(e+1);if(/;base64/i.test(n)){let i=r.length;const a=r.length;for(let w=0;w<a;w++)if(r.charCodeAt(w)===37&&w+2<a){const b=r.charCodeAt(w+1),h=r.charCodeAt(w+2);(b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102)&&(h>=48&&h<=57||h>=65&&h<=70||h>=97&&h<=102)&&(i-=2,w+=2)}let l=0,f=a-1;const u=w=>w>=2&&r.charCodeAt(w-2)===37&&r.charCodeAt(w-1)===51&&(r.charCodeAt(w)===68||r.charCodeAt(w)===100);f>=0&&(r.charCodeAt(f)===61?(l++,f--):u(f)&&(l++,f-=3)),l===1&&f>=0&&(r.charCodeAt(f)===61||u(f))&&l++;const y=Math.floor(i/4)*3-(l||0);return y>0?y:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let s=0;for(let i=0,a=r.length;i<a;i++){const l=r.charCodeAt(i);if(l<128)s+=1;else if(l<2048)s+=2;else if(l>=55296&&l<=56319&&i+1<a){const f=r.charCodeAt(i+1);f>=56320&&f<=57343?(s+=4,i++):s+=3}else s+=3}return s}const ze="1.16.1",lt=64*1024,{isFunction:fe}=c,ut=(t,...e)=>{try{return!!t(...e)}catch{return!1}},jr=t=>{const e=c.global!==void 0&&c.global!==null?c.global:globalThis,{ReadableStream:n,TextEncoder:r}=e;t=c.merge.call({skipUndefined:!0},{Request:e.Request,Response:e.Response},t);const{fetch:o,Request:s,Response:i}=t,a=o?fe(o):typeof fetch=="function",l=fe(s),f=fe(i);if(!a)return!1;const u=a&&fe(n),p=a&&(typeof r=="function"?(m=>O=>m.encode(O))(new r):async m=>new Uint8Array(await new s(m).arrayBuffer())),y=l&&u&&ut(()=>{let m=!1;const O=new s(x.origin,{body:new n,method:"POST",get duplex(){return m=!0,"half"}}),E=O.headers.has("Content-Type");return O.body!=null&&O.body.cancel(),m&&!E}),w=f&&u&&ut(()=>c.isReadableStream(new i("").body)),b={stream:w&&(m=>m.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!b[m]&&(b[m]=(O,E)=>{let R=O&&O[m];if(R)return R.call(O);throw new g(`Response type '${m}' is not supported`,g.ERR_NOT_SUPPORT,E)})});const h=async m=>{if(m==null)return 0;if(c.isBlob(m))return m.size;if(c.isSpecCompliantForm(m))return(await new s(x.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(c.isArrayBufferView(m)||c.isArrayBuffer(m))return m.byteLength;if(c.isURLSearchParams(m)&&(m=m+""),c.isString(m))return(await p(m)).byteLength},d=async(m,O)=>{const E=c.toFiniteNumber(m.getContentLength());return E??h(O)};return async m=>{let{url:O,method:E,data:R,signal:L,cancelToken:M,timeout:Y,onDownloadProgress:Se,onUploadProgress:Xe,responseType:v,headers:H,withCredentials:ce="same-origin",fetchOptions:Ge,maxContentLength:j,maxBodyLength:_e}=Ft(m);const Z=c.isNumber(j)&&j>-1,Kt=c.isNumber(_e)&&_e>-1;let Qe=o||fetch;v=v?(v+"").toLowerCase():"text";let I=Lr([L,M&&M.toAbortSignal()],Y),D=null;const J=I&&I.unsubscribe&&(()=>{I.unsubscribe()});let Ye;try{if(Z&&typeof O=="string"&&O.startsWith("data:")&&Fr(O)>j)throw new g("maxContentLength size of "+j+" exceeded",g.ERR_BAD_RESPONSE,m,D);if(Kt&&E!=="get"&&E!=="head"){const S=await d(H,R);if(typeof S=="number"&&isFinite(S)&&S>_e)throw new g("Request body larger than maxBodyLength limit",g.ERR_BAD_REQUEST,m,D)}if(Xe&&y&&E!=="get"&&E!=="head"&&(Ye=await d(H,R))!==0){let S=new s(O,{method:"POST",body:R,duplex:"half"}),V;if(c.isFormData(R)&&(V=S.headers.get("content-type"))&&H.setContentType(V),S.body){const[le,ue]=st(Ye,ge(it(Xe)));R=ct(S.body,lt,le,ue)}}c.isString(ce)||(ce=ce?"include":"omit");const T=l&&"credentials"in s.prototype;if(c.isFormData(R)){const S=H.getContentType();S&&/^multipart\/form-data/i.test(S)&&!/boundary=/i.test(S)&&H.delete("content-type")}H.set("User-Agent","axios/"+ze,!1);const q={...Ge,signal:I,method:E.toUpperCase(),headers:At(H.normalize()),body:R,duplex:"half",credentials:T?ce:void 0};D=l&&new s(O,q);let k=await(l?Qe(D,Ge):Qe(O,q));if(Z){const S=c.toFiniteNumber(k.headers.get("content-length"));if(S!=null&&S>j)throw new g("maxContentLength size of "+j+" exceeded",g.ERR_BAD_RESPONSE,m,D)}const Ae=w&&(v==="stream"||v==="response");if(w&&k.body&&(Se||Z||Ae&&J)){const S={};["status","statusText","headers"].forEach(ee=>{S[ee]=k[ee]});const V=c.toFiniteNumber(k.headers.get("content-length")),[le,ue]=Se&&st(V,ge(it(Se),!0))||[];let Ze=0;const Xt=ee=>{if(Z&&(Ze=ee,Ze>j))throw new g("maxContentLength size of "+j+" exceeded",g.ERR_BAD_RESPONSE,m,D);le&&le(ee)};k=new i(ct(k.body,lt,Xt,()=>{ue&&ue(),J&&J()}),S)}v=v||"text";let B=await b[c.findKey(b,v)||"text"](k,m);if(Z&&!w&&!Ae){let S;if(B!=null&&(typeof B.byteLength=="number"?S=B.byteLength:typeof B.size=="number"?S=B.size:typeof B=="string"&&(S=typeof r=="function"?new r().encode(B).byteLength:B.length)),typeof S=="number"&&S>j)throw new g("maxContentLength size of "+j+" exceeded",g.ERR_BAD_RESPONSE,m,D)}return!Ae&&J&&J(),await new Promise((S,V)=>{Dt(S,V,{data:B,headers:C.from(k.headers),status:k.status,statusText:k.statusText,config:m,request:D})})}catch(T){if(J&&J(),I&&I.aborted&&I.reason instanceof g){const q=I.reason;throw q.config=m,D&&(q.request=D),T!==q&&(q.cause=T),q}throw T&&T.name==="TypeError"&&/Load failed|fetch/i.test(T.message)?Object.assign(new g("Network Error",g.ERR_NETWORK,m,D,T&&T.response),{cause:T.cause||T}):g.from(T,T&&T.code,m,D,T&&T.response)}}},kr=new Map,jt=t=>{let e=t&&t.env||{};const{fetch:n,Request:r,Response:o}=e,s=[r,o,n];let i=s.length,a=i,l,f,u=kr;for(;a--;)l=s[a],f=u.get(l),f===void 0&&u.set(l,f=a?new Map:jr(e)),u=f;return f};jt();const $e={http:nr,xhr:Pr,fetch:{get:jt}};c.forEach($e,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:e})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:e})}});const ft=t=>`- ${t}`,Br=t=>c.isFunction(t)||t===null||t===!1;function vr(t,e){t=c.isArray(t)?t:[t];const{length:n}=t;let r,o;const s={};for(let i=0;i<n;i++){r=t[i];let a;if(o=r,!Br(r)&&(o=$e[(a=String(r)).toLowerCase()],o===void 0))throw new g(`Unknown adapter '${a}'`);if(o&&(c.isFunction(o)||(o=o.get(e))))break;s[a||"#"+i]=o}if(!o){const i=Object.entries(s).map(([l,f])=>`adapter ${l} `+(f===!1?"is not supported by the environment":"is not available in the build"));let a=n?i.length>1?`since :
|
|
10
|
+
`+i.map(ft).join(`
|
|
11
|
+
`):" "+ft(i[0]):"as no adapter specified";throw new g("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return o}const kt={getAdapter:vr,adapters:$e};function Le(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ae(null,t)}function dt(t){return Le(t),t.headers=C.from(t.headers),t.data=Pe.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),kt.getAdapter(t.adapter||ie.adapter,t)(t).then(function(r){Le(t),t.response=r;try{r.data=Pe.call(t,t.transformResponse,r)}finally{delete t.response}return r.headers=C.from(r.headers),r},function(r){if(!Nt(r)&&(Le(t),r&&r.response)){t.response=r.response;try{r.response.data=Pe.call(t,t.transformResponse,r.response)}finally{delete t.response}r.response.headers=C.from(r.response.headers)}return Promise.reject(r)})}const Oe={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Oe[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const pt={};Oe.transitional=function(e,n,r){function o(s,i){return"[Axios v"+ze+"] Transitional option '"+s+"'"+i+(r?". "+r:"")}return(s,i,a)=>{if(e===!1)throw new g(o(i," has been removed"+(n?" in "+n:"")),g.ERR_DEPRECATED);return n&&!pt[i]&&(pt[i]=!0,console.warn(o(i," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,i,a):!0}};Oe.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function Ir(t,e,n){if(typeof t!="object")throw new g("options must be an object",g.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const s=r[o],i=Object.prototype.hasOwnProperty.call(e,s)?e[s]:void 0;if(i){const a=t[s],l=a===void 0||i(a,s,t);if(l!==!0)throw new g("option "+s+" must be "+l,g.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new g("Unknown option "+s,g.ERR_BAD_OPTION)}}const me={assertOptions:Ir,validators:Oe},U=me.validators;let $=class{constructor(e){this.defaults=e||{},this.interceptors={request:new ot,response:new ot}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const s=(()=>{if(!o.stack)return"";const i=o.stack.indexOf(`
|
|
12
|
+
`);return i===-1?"":o.stack.slice(i+1)})();try{if(!r.stack)r.stack=s;else if(s){const i=s.indexOf(`
|
|
13
|
+
`),a=i===-1?-1:s.indexOf(`
|
|
14
|
+
`,i+1),l=a===-1?"":s.slice(a+1);String(r.stack).endsWith(l)||(r.stack+=`
|
|
15
|
+
`+s)}}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=W(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&me.assertOptions(r,{silentJSONParsing:U.transitional(U.boolean),forcedJSONParsing:U.transitional(U.boolean),clarifyTimeoutError:U.transitional(U.boolean),legacyInterceptorReqResOrdering:U.transitional(U.boolean)},!1),o!=null&&(c.isFunction(o)?n.paramsSerializer={serialize:o}:me.assertOptions(o,{encode:U.function,serialize:U.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),me.assertOptions(n,{baseUrl:U.spelling("baseURL"),withXsrfToken:U.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&c.merge(s.common,s[n.method]);s&&c.forEach(["delete","get","head","post","put","patch","query","common"],b=>{delete s[b]}),n.headers=C.concat(i,s);const a=[];let l=!0;this.interceptors.request.forEach(function(h){if(typeof h.runWhen=="function"&&h.runWhen(n)===!1)return;l=l&&h.synchronous;const d=n.transitional||He;d&&d.legacyInterceptorReqResOrdering?a.unshift(h.fulfilled,h.rejected):a.push(h.fulfilled,h.rejected)});const f=[];this.interceptors.response.forEach(function(h){f.push(h.fulfilled,h.rejected)});let u,p=0,y;if(!l){const b=[dt.bind(this),void 0];for(b.unshift(...a),b.push(...f),y=b.length,u=Promise.resolve(n);p<y;)u=u.then(b[p++],b[p++]);return u}y=a.length;let w=n;for(;p<y;){const b=a[p++],h=a[p++];try{w=b(w)}catch(d){h.call(this,d);break}}try{u=dt.call(this,w)}catch(b){return Promise.reject(b)}for(p=0,y=f.length;p<y;)u=u.then(f[p++],f[p++]);return u}getUri(e){e=W(this.defaults,e);const n=Ut(e.baseURL,e.url,e.allowAbsoluteUrls);return Pt(n,e.params,e.paramsSerializer)}};c.forEach(["delete","get","head","options"],function(e){$.prototype[e]=function(n,r){return this.request(W(r||{},{method:e,url:n,data:(r||{}).data}))}});c.forEach(["post","put","patch","query"],function(e){function n(r){return function(s,i,a){return this.request(W(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}$.prototype[e]=n(),e!=="query"&&($.prototype[e+"Form"]=n(!0))});let qr=class Bt{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(o=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const i=new Promise(a=>{r.subscribe(a),s=a}).then(o);return i.cancel=function(){r.unsubscribe(s)},i},e(function(s,i,a){r.reason||(r.reason=new ae(s,i,a),n(r.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;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Bt(function(o){e=o}),cancel:e}}};function Mr(t){return function(n){return t.apply(null,n)}}function Hr(t){return c.isObject(t)&&t.isAxiosError===!0}const ke={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(ke).forEach(([t,e])=>{ke[e]=t});function vt(t){const e=new $(t),n=yt($.prototype.request,e);return c.extend(n,$.prototype,e,{allOwnKeys:!0}),c.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return vt(W(t,o))},n}const _=vt(ie);_.Axios=$;_.CanceledError=ae;_.CancelToken=qr;_.isCancel=Nt;_.VERSION=ze;_.toFormData=Re;_.AxiosError=g;_.Cancel=_.CanceledError;_.all=function(e){return Promise.all(e)};_.spread=Mr;_.isAxiosError=Hr;_.mergeConfig=W;_.AxiosHeaders=C;_.formToJSON=t=>Lt(c.isHTMLForm(t)?new FormData(t):t);_.getAdapter=kt.getAdapter;_.HttpStatusCode=ke;_.default=_;const{Axios:Fo,AxiosError:jo,CanceledError:ko,isCancel:Bo,CancelToken:vo,VERSION:Io,all:qo,Cancel:Mo,isAxiosError:Ho,spread:Jo,toFormData:zo,AxiosHeaders:$o,HttpStatusCode:Wo,formToJSON:Vo,getAdapter:Ko,mergeConfig:Xo,create:Go}=_,Jr={form:"application/x-www-form-urlencoded",json:"application/json",data:"multipart/form-data"},zr=["put","post","patch"],Be="Local-Request-Id",$r=100,Wr=300,Vr="/api/proxy";class It{constructor(e={}){N(this,"axios");N(this,"settings");N(this,"records",{});N(this,"isLoading",!1);N(this,"stopSkipWarn");N(this,"showLoading");N(this,"showError");this.settings=Object.assign({type:"form"},e.settings||{});const n=A.omit(e,["settings","query"]);this.axios=_.create(A.merge({headers:{"Content-Type":"application/x-www-form-urlencoded"},timeout:120*1e3},n)),this.setupSkipWarn(this.settings),this.showLoading=A.debounce(this.openLoading.bind(this),$r),this.showError=A.throttle(this._showError.bind(this),Wr,{leading:!0,trailing:!1})}setConfig(e={}){this.settings=A.merge(this.settings,e.settings||{});const n=A.omit(e,["settings","query"]);this.axios.defaults=A.merge(this.axios.defaults,n),this.setupSkipWarn(this.settings)}cancel(e,n="请求已取消"){if(e){const r=this.records[e];if(!r)return;r.source.cancel(n)}else for(const r of Object.values(this.records))r.source.cancel(n)}createHeaders(e,n,r){const o=n.injectHeaders?typeof n.headers=="function"?n.headers(e,r,n):n.headers||{}:{},s={"Content-Type":Jr[n.type||"form"],...r.headers,...o};return n.skipWarn&&(s[Be]=e),s}isJsonType(e){return Object.entries(e).some(([n,r])=>n.toLowerCase()==="content-type"&&String(r).includes("application/json"))}toFormData(e,n="data"){if(e instanceof FormData||e instanceof URLSearchParams)return e;const r=n==="data"?new FormData:new URLSearchParams;return Object.entries(e).forEach(([o,s])=>{r.append(o,s)}),r}createSendData(e,n,r,o,s={}){const{type:i,skipWarn:a}=e,{name:l="skipWarn"}=a||{};let{data:f,params:u={},method:p="get"}=n;const y=o?{[l]:!0}:{};return zr.includes(p.toLowerCase())?(f=Object.assign(f||{},y),f=i!=="json"||!this.isJsonType(r)?this.toFormData(f,i):f,u={...s}):i==="form"?u={...f||{},...s,...y}:(f&&(i!=="json"||!this.isJsonType(r))&&(f=this.toFormData(f,i)),u={...s,...y}),{data:f,params:u}}createUrl(e){let{url:n,params:r}=e;if(n){let o=A.isUrl(n)?new URL(n).origin:"";const s=o?n.replace(o,""):n;try{const i=A.pathToRegexpCompile(s,{encode:encodeURIComponent});return o+i(r||{})}catch{console.warn("createUrl","pathToRegexpCompile error",n)}}return n}createProxy(e,n,r){if(!e.proxy)return{url:n,headers:r};const o=e.proxyPath||Vr,{protocol:s,host:i}=location||{},a=A.isUrl(n)?n:`${s}//${i}${n}`;return r.Target=a,{url:o,headers:r}}openLoading(e){const{loading:n,showLoading:r}=e;n&&r&&Object.keys(this.records).length>0&&(this.isLoading=!0,r())}closeLoading(e){const{hideLoading:n}=e;this.isLoading=!1;const r=Object.keys(this.records);n&&r.length===0&&(this.isLoading=!1,n())}_showError(e,n){const{failMessage:r,showError:o}=e;if(r&&o){const s=n?.response?.data,i=s?.message||s?.msg||n?.message||n?.msg||"未知错误";o(i,n)}}validResponse(e,n){const{validSuccess:r,validate:o}=e;return r&&o?!!o(n):!0}isSkipWarnResponse(e){return!!e.promise}send(e={},n=!1){const r=A.merge({},this.settings,e.settings||{}),o=e.query||{},s=A.omit(e,["settings","query"]),i=A.uuid(!1),a=_.CancelToken.source();this.records[i]={settings:r,config:s,source:a};const l=this.createUrl(s)||"",f=this.createHeaders(i,r,s),{url:u,headers:p}=this.createProxy(r,l,f),{data:y,params:w}=this.createSendData(r,s,p,n,o);return this.showLoading(r),new Promise((b,h)=>{this.axios({cancelToken:a.token,...s,url:u,headers:p,data:y,params:w}).then(d=>this.isSkipWarnResponse(d)?b(d.promise):this.validResponse(r,d)?b(r.originResponse?d:d.data?.data):(this.showError(r,d.data),h(d.data))).catch(d=>(this.showError(r,d),h(d))).finally(()=>{delete this.records[i],this.closeLoading(r)})})}useResponse(e,n){const{response:r}=this.axios.interceptors,o=r.use(e,n);return()=>r.eject(o)}useRequest(e,n){const{request:r}=this.axios.interceptors,o=r.use(e,n);return()=>r.eject(o)}setupSkipWarn(e){if(this.stopSkipWarn&&(this.stopSkipWarn(),this.stopSkipWarn=void 0),!e.skipWarn)return;const{code:n,executor:r,callback:o,complete:s}=e.skipWarn;this.stopSkipWarn=this.useResponse(i=>{const l=(i.config.headers||{})[Be],f=this.records[l];if(!f)return i;const{data:u}=i;if(!u||typeof u!="object")return i;if(u?.code===n){o&&o(i);const p=new Promise(r).then(()=>this.send({...f.config,settings:f.settings},!0));p.catch(y=>y).finally(()=>{s&&s()}),i.promise=p}return i})}}function qt(t={}){const e=new It(t),n=e.send.bind(e),r=e.cancel.bind(e),o=e.setConfig.bind(e),s=e.useRequest.bind(e),i=e.useResponse.bind(e);return Object.assign(n,{...e,instance:e,send:n,cancel:r,setConfig:o,useRequest:s,useResponse:i})}const We=qt({settings:{injectHeaders:!0,loading:!0,originResponse:!0}});function Mt(t,e=We){const n=typeof t=="string"?{url:t}:t;return(r,o)=>e.send(A.merge({},n,o||{},{data:r}))}function Kr(t,e=We){const n={};for(const[r,o]of Object.entries(t))n[r]=Mt(o,e);return n}function Xr(t,e){const n=Te.ref(null),r=Te.ref(),o=Te.ref(!0),s=()=>{o.value=!0,r.value=void 0,(typeof t=="function"?t():t).then(a=>{n.value=e?e(a):a}).catch(a=>{r.value=a}).finally(()=>{o.value=!1})};return s(),{data:n,error:r,loading:o,reload:s}}const G=typeof window<"u",Gr=t=>new Promise((e,n)=>{const r=new FileReader;r.readAsDataURL(t),r.onload=()=>{e(r.result)},r.onerror=o=>{n(o)}});function Qr(t){const e={};return t?(t.forEach((n,r)=>{e[r]=typeof n=="string"?decodeURIComponent(n):n}),e):{}}function Yr(t){const e=t.split(","),n=e[0].match(/:(.*?);/)?.[1],r=atob(e[1]);let o=r.length;const s=new Uint8Array(o);for(;o--;)s[o]=r.charCodeAt(o);return new Blob([s],{type:n})}function Zr(t,e){const n=t;return n.lastModified=Date.now(),n.lastModifiedDate=new Date,n.name=e,n}const eo=t=>G?window.requestAnimationFrame(t):setTimeout(t,16),to=t=>G?window.cancelAnimationFrame(t):clearTimeout(t);class Ht{constructor(e={}){N(this,"options",{type:"cache",expired:0,prefix:"__VTJ_"});N(this,"caches",{});N(this,"types");this.types={local:G?window.localStorage:this.caches,session:G?window.sessionStorage:this.caches,cache:this.caches},this.config(e)}config(e={}){this.options=Object.assign(this.options,e)}save(e,n,r={}){const{type:o,expired:s,prefix:i}={...this.options,...r},a=Date.now(),l=i+e,f=this.types[o]||this.caches,u={value:n,timestamp:a,expired:s};f===this.caches?f[l]=u:f.setItem(l,JSON.stringify(u))}get(e,n={}){const{type:r,prefix:o}={...this.options,...n},s=o+e,i=this.types[r]||this.caches;let a;if(i===this.caches)a=i[s];else{const y=i.getItem(s);if(y)try{a=JSON.parse(y)}catch(w){console.warn("[Storage] JSON.parse",w)}}if(!a)return null;const{value:l,timestamp:f,expired:u}=a;return u>0&&f+u<Date.now()?(this.remove(e,n),null):l}remove(e,n={}){const{type:r,prefix:o}={...this.options,...n},s=this.types[r]||this.caches,i=o+e;s===this.caches?delete s[i]:s.removeItem(i)}clear(e={}){const{type:n}={...this.options,...e},r=this.types[n]||this.caches;r===this.caches?this.caches={}:r.clear()}}const no=new Ht;function Jt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ne={exports:{}},ro=ne.exports,ht;function oo(){return ht||(ht=1,(function(t,e){(function(n,r){r(e,t)})(ro,function(n,r){var o={timeout:5e3,jsonpCallback:"callback"};function s(){return"jsonp_"+Date.now()+"_"+Math.ceil(Math.random()*1e5)}function i(f){try{delete window[f]}catch{window[f]=void 0}}function a(f){var u=document.getElementById(f);u&&document.getElementsByTagName("head")[0].removeChild(u)}function l(f){var u=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],p=f,y=u.timeout||o.timeout,w=u.jsonpCallback||o.jsonpCallback,b=void 0;return new Promise(function(h,d){var m=u.jsonpCallbackFunction||s(),O=w+"_"+m;window[m]=function(R){h({ok:!0,json:function(){return Promise.resolve(R)}}),b&&clearTimeout(b),a(O),i(m)},p+=p.indexOf("?")===-1?"?":"&";var E=document.createElement("script");E.setAttribute("src",""+p+w+"="+m),u.charset&&E.setAttribute("charset",u.charset),u.nonce&&E.setAttribute("nonce",u.nonce),u.referrerPolicy&&E.setAttribute("referrerPolicy",u.referrerPolicy),u.crossorigin&&E.setAttribute("crossorigin","true"),E.id=O,document.getElementsByTagName("head")[0].appendChild(E),b=setTimeout(function(){d(new Error("JSONP request to "+f+" timed out")),i(m),a(O),window[m]=function(){i(m)}},y),E.onerror=function(){d(new Error("JSONP request to "+f+" failed")),i(m),a(O),b&&clearTimeout(b)}})}r.exports=l})})(ne,ne.exports)),ne.exports}var so=oo();const io=Jt(so);function ao(t){if(G){const{protocol:e,host:n,pathname:r}=location;return`${e}//${n}${t?r:""}`}else return null}function co(t=""){const e=t.match(A.rURL);return e?e[0]:""}function zt(t){const e=[];for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push([n,encodeURIComponent(t[n])].join("="));return e.join("&")}function ve(t,e,n){const r={};t=(t||location.search).replace(/^[^]*\?/,""),e=e||"&",n=n||"=";let o;const s=new RegExp("(?:^|\\"+e+")([^\\"+n+"\\"+e+"]+)(?:\\"+n+"([^\\"+e+"]*))?","g");for(;(o=s.exec(t))!==null;)o[1]!==t&&(r[decodeURIComponent(o[1])]=decodeURIComponent(o[2]||""));return r}function $t(t,e){e=typeof e=="string"?ve(e):e;const n=t.split("?")[0],r=ve(t),o=Object.assign({},r,e),s=zt(o);return s?[n,s].join("?"):t}const lo=Object.freeze(Object.defineProperty({__proto__:null,append:$t,getCurrentHost:ao,getHost:co,parse:ve,stringify:zt},Symbol.toStringTag,{value:"Module"}));async function uo(t,e={}){const{query:n={}}=e;t.includes("${")&&(t=A.template(t)(n||{}));const r=$t(t,n);return await(await io(r,e)).json()}var Ne,mt;function fo(){if(mt)return Ne;mt=1,Ne=function(o,s,i){var a=document.head||document.getElementsByTagName("head")[0],l=document.createElement("script");typeof s=="function"&&(i=s,s={}),s=s||{},i=i||function(){},l.type=s.type||"text/javascript",l.charset=s.charset||"utf8",l.async="async"in s?!!s.async:!0,l.src=o,s.attrs&&t(l,s.attrs),s.text&&(l.text=""+s.text);var f="onload"in l?e:n;f(l,i),l.onload||e(l,i),a.appendChild(l)};function t(r,o){for(var s in o)r.setAttribute(s,o[s])}function e(r,o){r.onload=function(){this.onerror=this.onload=null,o(null,r)},r.onerror=function(){this.onerror=this.onload=null,o(new Error("Failed to load "+this.src),r)}}function n(r,o){r.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,o(null,r))}}return Ne}var po=fo();const ho=Jt(po);function mo(t,e={}){return new Promise((n,r)=>{const{library:o}=e;ho(t,e,(s,i)=>{s?r(s):n(o?window[o]:void 0)})})}const gt={debug:-1,log:0,info:0,warn:1,error:2},go=function(t,e,n,r){return function(...o){if(e&>[e]<=gt[t]&&console[t].apply&&(r==="*"||n.startsWith(r)))return console[t].apply(console,yo(o,n))}};function yo(t,e){return e!=="*"&&(typeof t[0]=="string"?t[0]=`[${e}] ${t[0]}`:t=["["+e+"]"].concat(t)),t}function wo(t,e){if(!t)return{targetLevel:e.level,targetBizName:e.bizName};if(~t.indexOf(":")){const n=t.split(":");return{targetLevel:n[0],targetBizName:n[1]}}return{targetLevel:t,targetBizName:"*"}}const bo={level:"warn",bizName:"*"};class Wt{constructor(e){N(this,"config");N(this,"options");this.options={...bo,...e};const n=typeof location<"u"?location:{},r=(/__(?:logConf|logLevel)__=([^#/&]*)/.exec(n.href)||[])[1];this.config=wo(r,e)}_log(e){const{targetLevel:n,targetBizName:r}=this.config,{bizName:o}=this.options;return go(e,n,o,r)}debug(...e){return this._log("debug")(...e)}log(...e){return this._log("log")(...e)}info(...e){return this._log("info")(...e)}warn(...e){return this._log("warn")(...e)}error(...e){return this._log("error")(...e)}}function Vt(t){return new Wt(t)}const Eo=Vt({level:"log",bizName:"VTJ"});/*! js-cookie v3.0.8 | MIT */function de(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)r!=="__proto__"&&(t[r]=n[r])}return t}var Ro={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Ie(t,e){function n(o,s,i){if(!(typeof document>"u")){i=de({},e,i),typeof i.expires=="number"&&(i.expires=new Date(Date.now()+i.expires*864e5)),i.expires&&(i.expires=i.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in i)i[l]&&(a+="; "+l,i[l]!==!0&&(a+="="+i[l].split(";")[0]));return document.cookie=o+"="+t.write(s,o)+a}}function r(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var s=document.cookie?document.cookie.split("; "):[],i={},a=0;a<s.length;a++){var l=s[a].split("="),f=l.slice(1).join("=");try{var u=decodeURIComponent(l[0]);if(u in i||(i[u]=t.read(f,u)),o===u)break}catch{}}return o?i[o]:i}}return Object.create({set:n,get:r,remove:function(o,s){n(o,"",de({},s,{expires:-1}))},withAttributes:function(o){return Ie(this.converter,de({},this.attributes,o))},withConverter:function(o){return Ie(de({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var Ve=Ie(Ro,{path:"/"});function Oo(t,e,n){Ve.set(t,e,n)}function So(t){return Ve.get(t)}function _o(t,e){Ve.remove(t,e)}const Ao=Object.freeze(Object.defineProperty({__proto__:null,get:So,remove:_o,set:Oo},Symbol.toStringTag,{value:"Module"}));function To(t,e=""){const n=document.createElement("a");n.download=e,n.href=t,n.target="_blank",n.click()}function Ke(t,e="",n){const r=new Blob([t],{type:n}),o=document.createElement("a");o.download=e,o.style.display="none",o.href=URL.createObjectURL(r),o.click(),URL.revokeObjectURL(o.href)}async function xo(t,e="",n){return fetch(t,{credentials:"include"}).then(async r=>{const o=await r.blob();return Ke(o,e,n),o})}function Co(t,e=""){const n=JSON.stringify(t);Ke(n,e,"application/json")}function Po(){const t=navigator.userAgent;let e="Unknown",n="Unknown",r="Unknown",o="Unknown",s=!1;if(/Windows NT/i.test(t)){e="Windows";const a={"12.0":"12","11.0":"11","10.0":"10","6.3":"8.1","6.2":"8","6.1":"7","6.0":"Vista","5.2":"XP 64-bit","5.1":"XP"},l=t.match(/Windows NT (\d+\.\d+)/);l&&(n=a[l[1]]||l[1])}else if(/Mac OS X/i.test(t)){e="Mac OS";const a=t.match(/Mac OS X (\d+[._]\d+[._]?\d*)/);a&&(n=a[1].replace(/_/g,"."))}else if(/(iPhone|iPad|iPod)/i.test(t)){e="iOS";const a=t.match(/OS (\d+[_\.]\d+[_\.]?\d*)/);a&&(n=a[1].replace(/_/g,"."))}else if(/Android/i.test(t)){e="Android";const a=t.match(/Android (\d+\.\d+)/);a&&(n=a[1])}else/Linux/i.test(t)&&(e="Linux");const i=t.match(/(Edge|Edg|Edga|EdgA)\/(\d+)/i);if(i)r="Microsoft Edge",o=i[2];else{const a=t.match(/Firefox\/(\d+)/i);if(a)r="Firefox",o=a[1];else{const l=t.match(/(Opera|OPR)\/(\d+)/i);if(l)r="Opera",o=l[2];else{const f=t.match(/Chrome\/(\d+)/i);if(f)r="Chrome",o=f[1];else{const u=t.match(/Version\/(\d+\.\d+)/i);if(u&&/Safari/i.test(t))r="Safari",o=u[1];else{const p=t.match(/(MSIE |Trident.*rv:)(\d+)/i);p&&(r="Internet Explorer",o=p[2])}}}}}return s=/(iPhone|iPod|iPad|Android|Windows Phone|Mobile)/i.test(t)||["iOS","Android"].includes(e),/(iPad|Tablet|Android(?!.*Mobile))/i.test(t)&&(s=!0),{os:e,osVersion:n,browser:r,browserVersion:o,isMobile:s}}exports.LOCAL_REQUEST_ID=Be;exports.Logger=Wt;exports.Request=It;exports.Storage=Ht;exports.VTJ_UTILS_VERSION=Yt;exports.axios=_;exports.blobToFile=Zr;exports.cAF=to;exports.cookie=Ao;exports.createApi=Mt;exports.createApis=Kr;exports.createRequest=qt;exports.dataURLtoBlob=Yr;exports.downloadBlob=Ke;exports.downloadJson=Co;exports.downloadRemoteFile=xo;exports.downloadUrl=To;exports.fileToBase64=Gr;exports.formDataToJson=Qr;exports.getClientInfo=Po;exports.getLogger=Vt;exports.isClient=G;exports.jsonp=uo;exports.loadScript=mo;exports.logger=Eo;exports.rAF=eo;exports.request=We;exports.storage=no;exports.url=lo;exports.useApi=Xr;Object.keys(A).forEach(t=>{t!=="default"&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:()=>A[t]})});
|