best-unit 1.2.14 → 1.2.16
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/best-unit.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function Jn(){console.log("npm package test!!!")}function Vn(){console.log("Current time:",new Date().toISOString())}function en(e,t){return function(){return e.apply(t,arguments)}}const{toString:Gn}=Object.prototype,{getPrototypeOf:lt}=Object,{iterator:Ie,toStringTag:tn}=Symbol,Ne=(e=>t=>{const n=Gn.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),W=e=>(e=e.toLowerCase(),t=>Ne(t)===e),De=e=>t=>typeof t===e,{isArray:se}=Array,fe=De("undefined");function Kn(e){return e!==null&&!fe(e)&&e.constructor!==null&&!fe(e.constructor)&&H(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const nn=W("ArrayBuffer");function Xn(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&nn(e.buffer),t}const Zn=De("string"),H=De("function"),rn=De("number"),ze=e=>e!==null&&typeof e=="object",Qn=e=>e===!0||e===!1,Ee=e=>{if(Ne(e)!=="object")return!1;const t=lt(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(tn in e)&&!(Ie in e)},Yn=W("Date"),er=W("File"),tr=W("Blob"),nr=W("FileList"),rr=e=>ze(e)&&H(e.pipe),or=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||H(e.append)&&((t=Ne(e))==="formdata"||t==="object"&&H(e.toString)&&e.toString()==="[object FormData]"))},ir=W("URLSearchParams"),[sr,ar,lr,cr]=["ReadableStream","Request","Response","Headers"].map(W),ur=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function _e(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),se(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),i=s.length;let a;for(r=0;r<i;r++)a=s[r],t.call(null,e[a],a,e)}}function on(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Y=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,sn=e=>!fe(e)&&e!==Y;function Ze(){const{caseless:e}=sn(this)&&this||{},t={},n=(r,o)=>{const s=e&&on(t,o)||o;Ee(t[s])&&Ee(r)?t[s]=Ze(t[s],r):Ee(r)?t[s]=Ze({},r):se(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&_e(arguments[r],n);return t}const dr=(e,t,n,{allOwnKeys:r}={})=>(_e(t,(o,s)=>{n&&H(o)?e[s]=en(o,n):e[s]=o},{allOwnKeys:r}),e),fr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),pr=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},hr=(e,t,n,r)=>{let o,s,i;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],(!r||r(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=n!==!1&<(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},mr=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},_r=e=>{if(!e)return null;if(se(e))return e;let t=e.length;if(!rn(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},br=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&<(Uint8Array)),gr=(e,t)=>{const r=(e&&e[Ie]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},yr=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},xr=W("HTMLFormElement"),Sr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),gt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),wr=W("RegExp"),an=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};_e(n,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(r[s]=i||o)}),Object.defineProperties(e,r)},Lr=e=>{an(e,(t,n)=>{if(H(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(H(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Ar=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return se(e)?r(e):r(String(e).split(t)),n},Er=()=>{},vr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function kr(e){return!!(e&&H(e.append)&&e[tn]==="FormData"&&e[Ie])}const Tr=e=>{const t=new Array(10),n=(r,o)=>{if(ze(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=se(r)?[]:{};return _e(r,(i,a)=>{const u=n(i,o+1);!fe(u)&&(s[a]=u)}),t[o]=void 0,s}}return r};return n(e,0)},Cr=W("AsyncFunction"),Rr=e=>e&&(ze(e)||H(e))&&H(e.then)&&H(e.catch),ln=((e,t)=>e?setImmediate:t?((n,r)=>(Y.addEventListener("message",({source:o,data:s})=>{o===Y&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Y.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",H(Y.postMessage)),Mr=typeof queueMicrotask<"u"?queueMicrotask.bind(Y):typeof process<"u"&&process.nextTick||ln,Fr=e=>e!=null&&H(e[Ie]),p={isArray:se,isArrayBuffer:nn,isBuffer:Kn,isFormData:or,isArrayBufferView:Xn,isString:Zn,isNumber:rn,isBoolean:Qn,isObject:ze,isPlainObject:Ee,isReadableStream:sr,isRequest:ar,isResponse:lr,isHeaders:cr,isUndefined:fe,isDate:Yn,isFile:er,isBlob:tr,isRegExp:wr,isFunction:H,isStream:rr,isURLSearchParams:ir,isTypedArray:br,isFileList:nr,forEach:_e,merge:Ze,extend:dr,trim:ur,stripBOM:fr,inherits:pr,toFlatObject:hr,kindOf:Ne,kindOfTest:W,endsWith:mr,toArray:_r,forEachEntry:gr,matchAll:yr,isHTMLForm:xr,hasOwnProperty:gt,hasOwnProp:gt,reduceDescriptors:an,freezeMethods:Lr,toObjectSet:Ar,toCamelCase:Sr,noop:Er,toFiniteNumber:vr,findKey:on,global:Y,isContextDefined:sn,isSpecCompliantForm:kr,toJSONObject:Tr,isAsyncFn:Cr,isThenable:Rr,setImmediate:ln,asap:Mr,isIterable:Fr};function L(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}p.inherits(L,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:p.toJSONObject(this.config),code:this.code,status:this.status}}});const cn=L.prototype,un={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{un[e]={value:e}});Object.defineProperties(L,un);Object.defineProperty(cn,"isAxiosError",{value:!0});L.from=(e,t,n,r,o,s)=>{const i=Object.create(cn);return p.toFlatObject(e,i,function(u){return u!==Error.prototype},a=>a!=="isAxiosError"),L.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const Br=null;function Qe(e){return p.isPlainObject(e)||p.isArray(e)}function dn(e){return p.endsWith(e,"[]")?e.slice(0,-2):e}function yt(e,t,n){return e?e.concat(t).map(function(o,s){return o=dn(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function Or(e){return p.isArray(e)&&!e.some(Qe)}const Pr=p.toFlatObject(p,{},null,function(t){return/^is[A-Z]/.test(t)});function Ue(e,t,n){if(!p.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=p.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,b){return!p.isUndefined(b[y])});const r=n.metaTokens,o=n.visitor||d,s=n.dots,i=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&p.isSpecCompliantForm(t);if(!p.isFunction(o))throw new TypeError("visitor must be a function");function l(g){if(g===null)return"";if(p.isDate(g))return g.toISOString();if(p.isBoolean(g))return g.toString();if(!u&&p.isBlob(g))throw new L("Blob is not supported. Use a Buffer instead.");return p.isArrayBuffer(g)||p.isTypedArray(g)?u&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function d(g,y,b){let x=g;if(g&&!b&&typeof g=="object"){if(p.endsWith(y,"{}"))y=r?y:y.slice(0,-2),g=JSON.stringify(g);else if(p.isArray(g)&&Or(g)||(p.isFileList(g)||p.endsWith(y,"[]"))&&(x=p.toArray(g)))return y=dn(y),x.forEach(function(w,T){!(p.isUndefined(w)||w===null)&&t.append(i===!0?yt([y],T,s):i===null?y:y+"[]",l(w))}),!1}return Qe(g)?!0:(t.append(yt(b,y,s),l(g)),!1)}const c=[],_=Object.assign(Pr,{defaultVisitor:d,convertValue:l,isVisitable:Qe});function h(g,y){if(!p.isUndefined(g)){if(c.indexOf(g)!==-1)throw Error("Circular reference detected in "+y.join("."));c.push(g),p.forEach(g,function(x,S){(!(p.isUndefined(x)||x===null)&&o.call(t,x,p.isString(S)?S.trim():S,y,_))===!0&&h(x,y?y.concat(S):[S])}),c.pop()}}if(!p.isObject(e))throw new TypeError("data must be an object");return h(e),t}function xt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function ct(e,t){this._pairs=[],e&&Ue(e,this,t)}const fn=ct.prototype;fn.append=function(t,n){this._pairs.push([t,n])};fn.toString=function(t){const n=t?function(r){return t.call(this,r,xt)}:xt;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Ir(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function pn(e,t,n){if(!t)return e;const r=n&&n.encode||Ir;p.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let s;if(o?s=o(t,n):s=p.isURLSearchParams(t)?t.toString():new ct(t,n).toString(r),s){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class St{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){p.forEach(this.handlers,function(r){r!==null&&t(r)})}}const hn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Nr=typeof URLSearchParams<"u"?URLSearchParams:ct,Dr=typeof FormData<"u"?FormData:null,zr=typeof Blob<"u"?Blob:null,Ur={isBrowser:!0,classes:{URLSearchParams:Nr,FormData:Dr,Blob:zr},protocols:["http","https","file","blob","url","data"]},ut=typeof window<"u"&&typeof document<"u",Ye=typeof navigator=="object"&&navigator||void 0,Hr=ut&&(!Ye||["ReactNative","NativeScript","NS"].indexOf(Ye.product)<0),$r=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",jr=ut&&window.location.href||"http://localhost",Wr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ut,hasStandardBrowserEnv:Hr,hasStandardBrowserWebWorkerEnv:$r,navigator:Ye,origin:jr},Symbol.toStringTag,{value:"Module"})),N={...Wr,...Ur};function qr(e,t){return Ue(e,new N.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return N.isNode&&p.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function Jr(e){return p.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Vr(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}function mn(e){function t(n,r,o,s){let i=n[s++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),u=s>=n.length;return i=!i&&p.isArray(o)?o.length:i,u?(p.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!a):((!o[i]||!p.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],s)&&p.isArray(o[i])&&(o[i]=Vr(o[i])),!a)}if(p.isFormData(e)&&p.isFunction(e.entries)){const n={};return p.forEachEntry(e,(r,o)=>{t(Jr(r),o,n,0)}),n}return null}function Gr(e,t,n){if(p.isString(e))try{return(t||JSON.parse)(e),p.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const be={transitional:hn,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=p.isObject(t);if(s&&p.isHTMLForm(t)&&(t=new FormData(t)),p.isFormData(t))return o?JSON.stringify(mn(t)):t;if(p.isArrayBuffer(t)||p.isBuffer(t)||p.isStream(t)||p.isFile(t)||p.isBlob(t)||p.isReadableStream(t))return t;if(p.isArrayBufferView(t))return t.buffer;if(p.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return qr(t,this.formSerializer).toString();if((a=p.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Ue(a?{"files[]":t}:t,u&&new u,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),Gr(t)):t}],transformResponse:[function(t){const n=this.transitional||be.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(p.isResponse(t)||p.isReadableStream(t))return t;if(t&&p.isString(t)&&(r&&!this.responseType||o)){const i=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(a){if(i)throw a.name==="SyntaxError"?L.from(a,L.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:N.classes.FormData,Blob:N.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};p.forEach(["delete","get","head","post","put","patch"],e=>{be.headers[e]={}});const Kr=p.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"]),Xr=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
2
|
-
`).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||t[n]&&
|
|
3
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[wt]=this[wt]={accessors:{}}).accessors,o=this.prototype;function s(i){const a=ue(i);r[a]||(eo(o,i),r[a]=!0)}return p.isArray(t)?t.forEach(s):s(t),this}};$.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);p.reduceDescriptors($.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});p.freezeMethods($);function Ge(e,t){const n=this||be,r=t||n,o=$.from(r.headers);let s=r.data;return p.forEach(e,function(a){s=a.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function _n(e){return!!(e&&e.__CANCEL__)}function ae(e,t,n){L.call(this,e??"canceled",L.ERR_CANCELED,t,n),this.name="CanceledError"}p.inherits(ae,L,{__CANCEL__:!0});function bn(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new L("Request failed with status code "+n.status,[L.ERR_BAD_REQUEST,L.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function to(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function no(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,s=0,i;return t=t!==void 0?t:1e3,function(u){const l=Date.now(),d=r[s];i||(i=l),n[o]=u,r[o]=l;let c=s,_=0;for(;c!==o;)_+=n[c++],c=c%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-i<t)return;const h=d&&l-d;return h?Math.round(_*1e3/h):void 0}}function ro(e,t){let n=0,r=1e3/t,o,s;const i=(l,d=Date.now())=>{n=d,o=null,s&&(clearTimeout(s),s=null),e.apply(null,l)};return[(...l)=>{const d=Date.now(),c=d-n;c>=r?i(l,d):(o=l,s||(s=setTimeout(()=>{s=null,i(o)},r-c)))},()=>o&&i(o)]}const Me=(e,t,n=3)=>{let r=0;const o=no(50,250);return ro(s=>{const i=s.loaded,a=s.lengthComputable?s.total:void 0,u=i-r,l=o(u),d=i<=a;r=i;const c={loaded:i,total:a,progress:a?i/a:void 0,bytes:u,rate:l||void 0,estimated:l&&a&&d?(a-i)/l:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(c)},n)},Lt=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},At=e=>(...t)=>p.asap(()=>e(...t)),oo=N.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,N.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(N.origin),N.navigator&&/(msie|trident)/i.test(N.navigator.userAgent)):()=>!0,io=N.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const i=[e+"="+encodeURIComponent(t)];p.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),p.isString(r)&&i.push("path="+r),p.isString(o)&&i.push("domain="+o),s===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function so(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ao(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function gn(e,t,n){let r=!so(t);return e&&(r||n==!1)?ao(e,t):t}const Et=e=>e instanceof $?{...e}:e;function te(e,t){t=t||{};const n={};function r(l,d,c,_){return p.isPlainObject(l)&&p.isPlainObject(d)?p.merge.call({caseless:_},l,d):p.isPlainObject(d)?p.merge({},d):p.isArray(d)?d.slice():d}function o(l,d,c,_){if(p.isUndefined(d)){if(!p.isUndefined(l))return r(void 0,l,c,_)}else return r(l,d,c,_)}function s(l,d){if(!p.isUndefined(d))return r(void 0,d)}function i(l,d){if(p.isUndefined(d)){if(!p.isUndefined(l))return r(void 0,l)}else return r(void 0,d)}function a(l,d,c){if(c in t)return r(l,d);if(c in e)return r(void 0,l)}const u={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:(l,d,c)=>o(Et(l),Et(d),c,!0)};return p.forEach(Object.keys(Object.assign({},e,t)),function(d){const c=u[d]||o,_=c(e[d],t[d],d);p.isUndefined(_)&&c!==a||(n[d]=_)}),n}const yn=e=>{const t=te({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:a}=t;t.headers=i=$.from(i),t.url=pn(gn(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let u;if(p.isFormData(n)){if(N.hasStandardBrowserEnv||N.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((u=i.getContentType())!==!1){const[l,...d]=u?u.split(";").map(c=>c.trim()).filter(Boolean):[];i.setContentType([l||"multipart/form-data",...d].join("; "))}}if(N.hasStandardBrowserEnv&&(r&&p.isFunction(r)&&(r=r(t)),r||r!==!1&&oo(t.url))){const l=o&&s&&io.read(s);l&&i.set(o,l)}return t},lo=typeof XMLHttpRequest<"u",co=lo&&function(e){return new Promise(function(n,r){const o=yn(e);let s=o.data;const i=$.from(o.headers).normalize();let{responseType:a,onUploadProgress:u,onDownloadProgress:l}=o,d,c,_,h,g;function y(){h&&h(),g&&g(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let b=new XMLHttpRequest;b.open(o.method.toUpperCase(),o.url,!0),b.timeout=o.timeout;function x(){if(!b)return;const w=$.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),O={data:!a||a==="text"||a==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:w,config:e,request:b};bn(function(q){n(q),y()},function(q){r(q),y()},O),b=null}"onloadend"in b?b.onloadend=x:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(x)},b.onabort=function(){b&&(r(new L("Request aborted",L.ECONNABORTED,e,b)),b=null)},b.onerror=function(){r(new L("Network Error",L.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let T=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const O=o.transitional||hn;o.timeoutErrorMessage&&(T=o.timeoutErrorMessage),r(new L(T,O.clarifyTimeoutError?L.ETIMEDOUT:L.ECONNABORTED,e,b)),b=null},s===void 0&&i.setContentType(null),"setRequestHeader"in b&&p.forEach(i.toJSON(),function(T,O){b.setRequestHeader(O,T)}),p.isUndefined(o.withCredentials)||(b.withCredentials=!!o.withCredentials),a&&a!=="json"&&(b.responseType=o.responseType),l&&([_,g]=Me(l,!0),b.addEventListener("progress",_)),u&&b.upload&&([c,h]=Me(u),b.upload.addEventListener("progress",c),b.upload.addEventListener("loadend",h)),(o.cancelToken||o.signal)&&(d=w=>{b&&(r(!w||w.type?new ae(null,e,b):w),b.abort(),b=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const S=to(o.url);if(S&&N.protocols.indexOf(S)===-1){r(new L("Unsupported protocol "+S+":",L.ERR_BAD_REQUEST,e));return}b.send(s||null)})},uo=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const s=function(l){if(!o){o=!0,a();const d=l instanceof Error?l:this.reason;r.abort(d instanceof L?d:new ae(d instanceof Error?d.message:d))}};let i=t&&setTimeout(()=>{i=null,s(new L(`timeout ${t} of ms exceeded`,L.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>l.addEventListener("abort",s));const{signal:u}=r;return u.unsubscribe=()=>p.asap(a),u}},fo=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},po=async function*(e,t){for await(const n of ho(e))yield*fo(n,t)},ho=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},vt=(e,t,n,r)=>{const o=po(e,t);let s=0,i,a=u=>{i||(i=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:l,value:d}=await o.next();if(l){a(),u.close();return}let c=d.byteLength;if(n){let _=s+=c;n(_)}u.enqueue(new Uint8Array(d))}catch(l){throw a(l),l}},cancel(u){return a(u),o.return()}},{highWaterMark:2})},He=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",xn=He&&typeof ReadableStream=="function",mo=He&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Sn=(e,...t)=>{try{return!!e(...t)}catch{return!1}},_o=xn&&Sn(()=>{let e=!1;const t=new Request(N.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),kt=64*1024,et=xn&&Sn(()=>p.isReadableStream(new Response("").body)),Fe={stream:et&&(e=>e.body)};He&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Fe[t]&&(Fe[t]=p.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new L(`Response type '${t}' is not supported`,L.ERR_NOT_SUPPORT,r)})})})(new Response);const bo=async e=>{if(e==null)return 0;if(p.isBlob(e))return e.size;if(p.isSpecCompliantForm(e))return(await new Request(N.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(p.isArrayBufferView(e)||p.isArrayBuffer(e))return e.byteLength;if(p.isURLSearchParams(e)&&(e=e+""),p.isString(e))return(await mo(e)).byteLength},go=async(e,t)=>{const n=p.toFiniteNumber(e.getContentLength());return n??bo(t)},yo=He&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:u,responseType:l,headers:d,withCredentials:c="same-origin",fetchOptions:_}=yn(e);l=l?(l+"").toLowerCase():"text";let h=uo([o,s&&s.toAbortSignal()],i),g;const y=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let b;try{if(u&&_o&&n!=="get"&&n!=="head"&&(b=await go(d,r))!==0){let O=new Request(t,{method:"POST",body:r,duplex:"half"}),z;if(p.isFormData(r)&&(z=O.headers.get("content-type"))&&d.setContentType(z),O.body){const[q,K]=Lt(b,Me(At(u)));r=vt(O.body,kt,q,K)}}p.isString(c)||(c=c?"include":"omit");const x="credentials"in Request.prototype;g=new Request(t,{..._,signal:h,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:x?c:void 0});let S=await fetch(g,_);const w=et&&(l==="stream"||l==="response");if(et&&(a||w&&y)){const O={};["status","statusText","headers"].forEach(X=>{O[X]=S[X]});const z=p.toFiniteNumber(S.headers.get("content-length")),[q,K]=a&&Lt(z,Me(At(a),!0))||[];S=new Response(vt(S.body,kt,q,()=>{K&&K(),y&&y()}),O)}l=l||"text";let T=await Fe[p.findKey(Fe,l)||"text"](S,e);return!w&&y&&y(),await new Promise((O,z)=>{bn(O,z,{data:T,headers:$.from(S.headers),status:S.status,statusText:S.statusText,config:e,request:g})})}catch(x){throw y&&y(),x&&x.name==="TypeError"&&/Load failed|fetch/i.test(x.message)?Object.assign(new L("Network Error",L.ERR_NETWORK,e,g),{cause:x.cause||x}):L.from(x,x&&x.code,e,g)}}),tt={http:Br,xhr:co,fetch:yo};p.forEach(tt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Tt=e=>`- ${e}`,xo=e=>p.isFunction(e)||e===null||e===!1,wn={getAdapter:e=>{e=p.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;s<t;s++){n=e[s];let i;if(r=n,!xo(n)&&(r=tt[(i=String(n)).toLowerCase()],r===void 0))throw new L(`Unknown adapter '${i}'`);if(r)break;o[i||"#"+s]=r}if(!r){const s=Object.entries(o).map(([a,u])=>`adapter ${a} `+(u===!1?"is not supported by the environment":"is not available in the build"));let i=t?s.length>1?`since :
|
|
4
|
-
`+s.map(
|
|
5
|
-
`):" "+
|
|
6
|
-
`+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=te(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&ke.assertOptions(r,{silentJSONParsing:V.transitional(V.boolean),forcedJSONParsing:V.transitional(V.boolean),clarifyTimeoutError:V.transitional(V.boolean)},!1),o!=null&&(p.isFunction(o)?n.paramsSerializer={serialize:o}:ke.assertOptions(o,{encode:V.function,serialize:V.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ke.assertOptions(n,{baseUrl:V.spelling("baseURL"),withXsrfToken:V.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&p.merge(s.common,s[n.method]);s&&p.forEach(["delete","get","head","post","put","patch","common"],g=>{delete s[g]}),n.headers=$.concat(i,s);const a=[];let u=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(u=u&&y.synchronous,a.unshift(y.fulfilled,y.rejected))});const l=[];this.interceptors.response.forEach(function(y){l.push(y.fulfilled,y.rejected)});let d,c=0,_;if(!u){const g=[Ct.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,l),_=g.length,d=Promise.resolve(n);c<_;)d=d.then(g[c++],g[c++]);return d}_=a.length;let h=n;for(c=0;c<_;){const g=a[c++],y=a[c++];try{h=g(h)}catch(b){y.call(this,b);break}}try{d=Ct.call(this,h)}catch(g){return Promise.reject(g)}for(c=0,_=l.length;c<_;)d=d.then(l[c++],l[c++]);return d}getUri(t){t=te(this.defaults,t);const n=gn(t.baseURL,t.url,t.allowAbsoluteUrls);return pn(n,t.params,t.paramsSerializer)}};p.forEach(["delete","get","head","options"],function(t){ee.prototype[t]=function(n,r){return this.request(te(r||{},{method:t,url:n,data:(r||{}).data}))}});p.forEach(["post","put","patch"],function(t){function n(r){return function(s,i,a){return this.request(te(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}ee.prototype[t]=n(),ee.prototype[t+"Form"]=n(!0)});let wo=class An{constructor(t){if(typeof t!="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},t(function(s,i,a){r.reason||(r.reason=new ae(s,i,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new An(function(o){t=o}),cancel:t}}};function Lo(e){return function(n){return e.apply(null,n)}}function Ao(e){return p.isObject(e)&&e.isAxiosError===!0}const nt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(nt).forEach(([e,t])=>{nt[t]=e});function En(e){const t=new ee(e),n=en(ee.prototype.request,t);return p.extend(n,ee.prototype,t,{allOwnKeys:!0}),p.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return En(te(e,o))},n}const F=En(be);F.Axios=ee;F.CanceledError=ae;F.CancelToken=wo;F.isCancel=_n;F.VERSION=Ln;F.toFormData=Ue;F.AxiosError=L;F.Cancel=F.CanceledError;F.all=function(t){return Promise.all(t)};F.spread=Lo;F.isAxiosError=Ao;F.mergeConfig=te;F.AxiosHeaders=$;F.formToJSON=e=>mn(p.isHTMLForm(e)?new FormData(e):e);F.getAdapter=wn.getAdapter;F.HttpStatusCode=nt;F.default=F;const{Axios:Ci,AxiosError:Ri,CanceledError:Mi,isCancel:Fi,CancelToken:Bi,VERSION:Oi,all:Pi,Cancel:Ii,isAxiosError:Ni,spread:Di,toFormData:zi,AxiosHeaders:Ui,HttpStatusCode:Hi,formToJSON:$i,getAdapter:ji,mergeConfig:Wi}=F;var ge,v,vn,Q,Mt,kn,Tn,Cn,dt,rt,ot,pe={},Rn=[],Eo=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,je=Array.isArray;function G(e,t){for(var n in t)e[n]=t[n];return e}function ft(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function oe(e,t,n){var r,o,s,i={};for(s in t)s=="key"?r=t[s]:s=="ref"?o=t[s]:i[s]=t[s];if(arguments.length>2&&(i.children=arguments.length>3?ge.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)i[s]===void 0&&(i[s]=e.defaultProps[s]);return de(e,i,r,o,null)}function de(e,t,n,r,o){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++vn,__i:-1,__u:0};return o==null&&v.vnode!=null&&v.vnode(s),s}function ne(e){return e.children}function Te(e,t){this.props=e,this.context=t}function ie(e,t){if(t==null)return e.__?ie(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?ie(e):null}function Mn(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Mn(e)}}function Ft(e){(!e.__d&&(e.__d=!0)&&Q.push(e)&&!Be.__r++||Mt!=v.debounceRendering)&&((Mt=v.debounceRendering)||kn)(Be)}function Be(){for(var e,t,n,r,o,s,i,a=1;Q.length;)Q.length>a&&Q.sort(Tn),e=Q.shift(),a=Q.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,s=[],i=[],t.__P&&((n=G({},r)).__v=r.__v+1,v.vnode&&v.vnode(n),pt(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,s,o??ie(r),!!(32&r.__u),i),n.__v=r.__v,n.__.__k[n.__i]=n,On(s,n,i),n.__e!=o&&Mn(n)));Be.__r=0}function Fn(e,t,n,r,o,s,i,a,u,l,d){var c,_,h,g,y,b,x=r&&r.__k||Rn,S=t.length;for(u=vo(n,t,x,u,S),c=0;c<S;c++)(h=n.__k[c])!=null&&(_=h.__i==-1?pe:x[h.__i]||pe,h.__i=c,b=pt(e,h,_,o,s,i,a,u,l,d),g=h.__e,h.ref&&_.ref!=h.ref&&(_.ref&&ht(_.ref,null,h),d.push(h.ref,h.__c||g,h)),y==null&&g!=null&&(y=g),4&h.__u||_.__k===h.__k?u=Bn(h,u,e):typeof h.type=="function"&&b!==void 0?u=b:g&&(u=g.nextSibling),h.__u&=-7);return n.__e=y,u}function vo(e,t,n,r,o){var s,i,a,u,l,d=n.length,c=d,_=0;for(e.__k=new Array(o),s=0;s<o;s++)(i=t[s])!=null&&typeof i!="boolean"&&typeof i!="function"?(u=s+_,(i=e.__k[s]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?de(null,i,null,null,null):je(i)?de(ne,{children:i},null,null,null):i.constructor==null&&i.__b>0?de(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=e,i.__b=e.__b+1,a=null,(l=i.__i=ko(i,n,u,c))!=-1&&(c--,(a=n[l])&&(a.__u|=2)),a==null||a.__v==null?(l==-1&&(o>d?_--:o<d&&_++),typeof i.type!="function"&&(i.__u|=4)):l!=u&&(l==u-1?_--:l==u+1?_++:(l>u?_--:_++,i.__u|=4))):e.__k[s]=null;if(c)for(s=0;s<d;s++)(a=n[s])!=null&&(2&a.__u)==0&&(a.__e==r&&(r=ie(a)),In(a,a));return r}function Bn(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=Bn(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=ie(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function ko(e,t,n,r){var o,s,i=e.key,a=e.type,u=t[n];if(u===null&&e.key==null||u&&i==u.key&&a==u.type&&(2&u.__u)==0)return n;if(r>(u!=null&&(2&u.__u)==0?1:0))for(o=n-1,s=n+1;o>=0||s<t.length;){if(o>=0){if((u=t[o])&&(2&u.__u)==0&&i==u.key&&a==u.type)return o;o--}if(s<t.length){if((u=t[s])&&(2&u.__u)==0&&i==u.key&&a==u.type)return s;s++}}return-1}function Bt(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Eo.test(t)?n:n+"px"}function ye(e,t,n,r,o){var s,i;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Bt(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||Bt(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")s=t!=(t=t.replace(Cn,"$1")),i=t.toLowerCase(),t=i in e||t=="onFocusOut"||t=="onFocusIn"?i.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r?n.u=r.u:(n.u=dt,e.addEventListener(t,s?ot:rt,s)):e.removeEventListener(t,s?ot:rt,s);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function Ot(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=dt++;else if(t.t<n.u)return;return n(v.event?v.event(t):t)}}}function pt(e,t,n,r,o,s,i,a,u,l){var d,c,_,h,g,y,b,x,S,w,T,O,z,q,K,X,Je,J=t.type;if(t.constructor!=null)return null;128&n.__u&&(u=!!(32&n.__u),s=[a=t.__e=n.__e]),(d=v.__b)&&d(t);e:if(typeof J=="function")try{if(x=t.props,S="prototype"in J&&J.prototype.render,w=(d=J.contextType)&&r[d.__c],T=d?w?w.props.value:d.__:r,n.__c?b=(c=t.__c=n.__c).__=c.__E:(S?t.__c=c=new J(x,T):(t.__c=c=new Te(x,T),c.constructor=J,c.render=Co),w&&w.sub(c),c.props=x,c.state||(c.state={}),c.context=T,c.__n=r,_=c.__d=!0,c.__h=[],c._sb=[]),S&&c.__s==null&&(c.__s=c.state),S&&J.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=G({},c.__s)),G(c.__s,J.getDerivedStateFromProps(x,c.__s))),h=c.props,g=c.state,c.__v=t,_)S&&J.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),S&&c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(S&&J.getDerivedStateFromProps==null&&x!==h&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(x,T),!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(x,c.__s,T)===!1||t.__v==n.__v){for(t.__v!=n.__v&&(c.props=x,c.state=c.__s,c.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(ce){ce&&(ce.__=t)}),O=0;O<c._sb.length;O++)c.__h.push(c._sb[O]);c._sb=[],c.__h.length&&i.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(x,c.__s,T),S&&c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(h,g,y)})}if(c.context=T,c.props=x,c.__P=e,c.__e=!1,z=v.__r,q=0,S){for(c.state=c.__s,c.__d=!1,z&&z(t),d=c.render(c.props,c.state,c.context),K=0;K<c._sb.length;K++)c.__h.push(c._sb[K]);c._sb=[]}else do c.__d=!1,z&&z(t),d=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++q<25);c.state=c.__s,c.getChildContext!=null&&(r=G(G({},r),c.getChildContext())),S&&!_&&c.getSnapshotBeforeUpdate!=null&&(y=c.getSnapshotBeforeUpdate(h,g)),X=d,d!=null&&d.type===ne&&d.key==null&&(X=Pn(d.props.children)),a=Fn(e,je(X)?X:[X],t,n,r,o,s,i,a,u,l),c.base=t.__e,t.__u&=-161,c.__h.length&&i.push(c),b&&(c.__E=c.__=null)}catch(ce){if(t.__v=null,u||s!=null)if(ce.then){for(t.__u|=u?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;s[s.indexOf(a)]=null,t.__e=a}else for(Je=s.length;Je--;)ft(s[Je]);else t.__e=n.__e,t.__k=n.__k;v.__e(ce,t,n)}else s==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=To(n.__e,t,n,r,o,s,i,u,l);return(d=v.diffed)&&d(t),128&t.__u?void 0:a}function On(e,t,n){for(var r=0;r<n.length;r++)ht(n[r],n[++r],n[++r]);v.__c&&v.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(s){s.call(o)})}catch(s){v.__e(s,o.__v)}})}function Pn(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:je(e)?e.map(Pn):G({},e)}function To(e,t,n,r,o,s,i,a,u){var l,d,c,_,h,g,y,b=n.props,x=t.props,S=t.type;if(S=="svg"?o="http://www.w3.org/2000/svg":S=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),s!=null){for(l=0;l<s.length;l++)if((h=s[l])&&"setAttribute"in h==!!S&&(S?h.localName==S:h.nodeType==3)){e=h,s[l]=null;break}}if(e==null){if(S==null)return document.createTextNode(x);e=document.createElementNS(o,S,x.is&&x),a&&(v.__m&&v.__m(t,s),a=!1),s=null}if(S==null)b===x||a&&e.data==x||(e.data=x);else{if(s=s&&ge.call(e.childNodes),b=n.props||pe,!a&&s!=null)for(b={},l=0;l<e.attributes.length;l++)b[(h=e.attributes[l]).name]=h.value;for(l in b)if(h=b[l],l!="children"){if(l=="dangerouslySetInnerHTML")c=h;else if(!(l in x)){if(l=="value"&&"defaultValue"in x||l=="checked"&&"defaultChecked"in x)continue;ye(e,l,null,h,o)}}for(l in x)h=x[l],l=="children"?_=h:l=="dangerouslySetInnerHTML"?d=h:l=="value"?g=h:l=="checked"?y=h:a&&typeof h!="function"||b[l]===h||ye(e,l,h,b[l],o);if(d)a||c&&(d.__html==c.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(c&&(e.innerHTML=""),Fn(t.type=="template"?e.content:e,je(_)?_:[_],t,n,r,S=="foreignObject"?"http://www.w3.org/1999/xhtml":o,s,i,s?s[0]:n.__k&&ie(n,0),a,u),s!=null)for(l=s.length;l--;)ft(s[l]);a||(l="value",S=="progress"&&g==null?e.removeAttribute("value"):g!=null&&(g!==e[l]||S=="progress"&&!g||S=="option"&&g!=b[l])&&ye(e,l,g,b[l],o),l="checked",y!=null&&y!=e[l]&&ye(e,l,y,b[l],o))}return e}function ht(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(o){v.__e(o,n)}}function In(e,t,n){var r,o;if(v.unmount&&v.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||ht(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){v.__e(s,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&In(r[o],t,n||typeof e.type!="function");n||ft(e.__e),e.__c=e.__=e.__e=void 0}function Co(e,t,n){return this.constructor(e,n)}function We(e,t,n){var r,o,s,i;t==document&&(t=document.documentElement),v.__&&v.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,s=[],i=[],pt(t,e=(!r&&n||t).__k=oe(ne,null,[e]),o||pe,pe,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?ge.call(t.childNodes):null,s,!r&&n?n:o?o.__e:t.firstChild,r,i),On(s,e,i)}function Nn(e,t){We(e,t,Nn)}function Dn(e,t,n){var r,o,s,i,a=G({},e.props);for(s in e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)s=="key"?r=t[s]:s=="ref"?o=t[s]:a[s]=t[s]===void 0&&i!=null?i[s]:t[s];return arguments.length>2&&(a.children=arguments.length>3?ge.call(arguments,2):n),de(e.type,a,r||e.key,o||e.ref,null)}ge=Rn.slice,v={__e:function(e,t,n,r){for(var o,s,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((s=o.constructor)&&s.getDerivedStateFromError!=null&&(o.setState(s.getDerivedStateFromError(e)),i=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(a){e=a}throw e}},vn=0,Te.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=G({},this.state),typeof e=="function"&&(e=e(G({},n),this.props)),e&&G(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ft(this))},Te.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ft(this))},Te.prototype.render=ne,Q=[],kn=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Tn=function(e,t){return e.__v.__b-t.__v.__b},Be.__r=0,Cn=/(PointerCapture)$|Capture$/i,dt=0,rt=Ot(!1),ot=Ot(!0);var Ro=0;function m(e,t,n,r,o,s){t||(t={});var i,a,u=t;if("ref"in u)for(a in u={},t)a=="ref"?i=t[a]:u[a]=t[a];var l={type:e,props:u,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Ro,__i:-1,__u:0,__source:o,__self:s};if(typeof e=="function"&&(i=e.defaultProps))for(a in i)u[a]===void 0&&(u[a]=i[a]);return v.vnode&&v.vnode(l),l}var he,M,Xe,Pt,Oe=0,zn=[],B=v,It=B.__b,Nt=B.__r,Dt=B.diffed,zt=B.__c,Ut=B.unmount,Ht=B.__;function mt(e,t){B.__h&&B.__h(M,e,Oe||t),Oe=0;var n=M.__H||(M.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function D(e){return Oe=1,Mo(Hn,e)}function Mo(e,t,n){var r=mt(he++,2);if(r.t=e,!r.__c&&(r.__=[Hn(void 0,t),function(a){var u=r.__N?r.__N[0]:r.__[0],l=r.t(u,a);u!==l&&(r.__N=[l,r.__[1]],r.__c.setState({}))}],r.__c=M,!M.__f)){var o=function(a,u,l){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(_){return!!_.__c});if(d.every(function(_){return!_.__N}))return!s||s.call(this,a,u,l);var c=r.__c.props!==a;return d.forEach(function(_){if(_.__N){var h=_.__[0];_.__=_.__N,_.__N=void 0,h!==_.__[0]&&(c=!0)}}),s&&s.call(this,a,u,l)||c};M.__f=!0;var s=M.shouldComponentUpdate,i=M.componentWillUpdate;M.componentWillUpdate=function(a,u,l){if(this.__e){var d=s;s=void 0,o(a,u,l),s=d}i&&i.call(this,a,u,l)},M.shouldComponentUpdate=o}return r.__N||r.__}function me(e,t){var n=mt(he++,3);!B.__s&&Un(n.__H,t)&&(n.__=e,n.u=t,M.__H.__h.push(n))}function Pe(e){return Oe=5,Fo(function(){return{current:e}},[])}function Fo(e,t){var n=mt(he++,7);return Un(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Bo(){for(var e;e=zn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Ce),e.__H.__h.forEach(it),e.__H.__h=[]}catch(t){e.__H.__h=[],B.__e(t,e.__v)}}B.__b=function(e){M=null,It&&It(e)},B.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ht&&Ht(e,t)},B.__r=function(e){Nt&&Nt(e),he=0;var t=(M=e.__c).__H;t&&(Xe===M?(t.__h=[],M.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(Ce),t.__h.forEach(it),t.__h=[],he=0)),Xe=M},B.diffed=function(e){Dt&&Dt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(zn.push(t)!==1&&Pt===B.requestAnimationFrame||((Pt=B.requestAnimationFrame)||Oo)(Bo)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Xe=M=null},B.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Ce),n.__h=n.__h.filter(function(r){return!r.__||it(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],B.__e(r,n.__v)}}),zt&&zt(e,t)},B.unmount=function(e){Ut&&Ut(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Ce(r)}catch(o){t=o}}),n.__H=void 0,t&&B.__e(t,n.__v))};var $t=typeof requestAnimationFrame=="function";function Oo(e){var t,n=function(){clearTimeout(r),$t&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);$t&&(t=requestAnimationFrame(n))}function Ce(e){var t=M,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),M=t}function it(e){var t=M;e.__c=e.__(),M=t}function Un(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Hn(e,t){return typeof t=="function"?t(e):t}var qe=(e=>(e.ZH="zh",e.EN="en",e))(qe||{}),j=(e=>(e.WHITE="white",e.DARK="dark",e))(j||{}),re=(e=>(e.DEV="dev",e.DEVELOPMENT="development",e.TEST="test",e.PROD="prod",e.PRODUCTION="production",e))(re||{}),f=(e=>(e.SMALL="small",e.MEDIUM="medium",e))(f||{});const jt={white:{background:"#fff",border:"#d9d9d9",color:"#222",boxShadow:"0 6px 16px rgba(0, 0, 0, 0.12)",closeColor:"#999"},dark:{background:"#23262F",border:"#444C5C",color:"#F5F6FA",boxShadow:"0 6px 16px rgba(0,0,0,0.32)",closeColor:"#B5B8BE"}};function Po(){return k("theme")===j.WHITE?jt.white:jt.dark}class Io{parseArg(t){return typeof t=="string"?{content:t}:t}show(t,n){const{content:r,duration:o,closable:s}=this.parseArg(n),i=Po(),a=document.createElement("div");if(a.style.cssText=`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function Wn(){console.log("npm package test!!!")}function qn(){console.log("Current time:",new Date().toISOString())}function Qt(e,t){return function(){return e.apply(t,arguments)}}const{toString:Jn}=Object.prototype,{getPrototypeOf:at}=Object,{iterator:Pe,toStringTag:Yt}=Symbol,Ie=(e=>t=>{const n=Jn.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),j=e=>(e=e.toLowerCase(),t=>Ie(t)===e),Ne=e=>t=>typeof t===e,{isArray:ie}=Array,de=Ne("undefined");function Vn(e){return e!==null&&!de(e)&&e.constructor!==null&&!de(e.constructor)&&U(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const en=j("ArrayBuffer");function Gn(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&en(e.buffer),t}const Kn=Ne("string"),U=Ne("function"),tn=Ne("number"),De=e=>e!==null&&typeof e=="object",Xn=e=>e===!0||e===!1,Ae=e=>{if(Ie(e)!=="object")return!1;const t=at(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Yt in e)&&!(Pe in e)},Zn=j("Date"),Qn=j("File"),Yn=j("Blob"),er=j("FileList"),tr=e=>De(e)&&U(e.pipe),nr=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||U(e.append)&&((t=Ie(e))==="formdata"||t==="object"&&U(e.toString)&&e.toString()==="[object FormData]"))},rr=j("URLSearchParams"),[or,ir,sr,ar]=["ReadableStream","Request","Response","Headers"].map(j),lr=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function me(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),ie(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),i=s.length;let a;for(r=0;r<i;r++)a=s[r],t.call(null,e[a],a,e)}}function nn(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Q=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,rn=e=>!de(e)&&e!==Q;function Xe(){const{caseless:e}=rn(this)&&this||{},t={},n=(r,o)=>{const s=e&&nn(t,o)||o;Ae(t[s])&&Ae(r)?t[s]=Xe(t[s],r):Ae(r)?t[s]=Xe({},r):ie(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&me(arguments[r],n);return t}const cr=(e,t,n,{allOwnKeys:r}={})=>(me(t,(o,s)=>{n&&U(o)?e[s]=Qt(o,n):e[s]=o},{allOwnKeys:r}),e),ur=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),dr=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},fr=(e,t,n,r)=>{let o,s,i;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],(!r||r(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=n!==!1&&at(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},pr=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},hr=e=>{if(!e)return null;if(ie(e))return e;let t=e.length;if(!tn(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},mr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&at(Uint8Array)),_r=(e,t)=>{const r=(e&&e[Pe]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},br=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},gr=j("HTMLFormElement"),yr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),bt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),xr=j("RegExp"),on=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};me(n,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(r[s]=i||o)}),Object.defineProperties(e,r)},Sr=e=>{on(e,(t,n)=>{if(U(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(U(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},wr=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return ie(e)?r(e):r(String(e).split(t)),n},Lr=()=>{},Ar=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Er(e){return!!(e&&U(e.append)&&e[Yt]==="FormData"&&e[Pe])}const vr=e=>{const t=new Array(10),n=(r,o)=>{if(De(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=ie(r)?[]:{};return me(r,(i,a)=>{const u=n(i,o+1);!de(u)&&(s[a]=u)}),t[o]=void 0,s}}return r};return n(e,0)},kr=j("AsyncFunction"),Tr=e=>e&&(De(e)||U(e))&&U(e.then)&&U(e.catch),sn=((e,t)=>e?setImmediate:t?((n,r)=>(Q.addEventListener("message",({source:o,data:s})=>{o===Q&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Q.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",U(Q.postMessage)),Cr=typeof queueMicrotask<"u"?queueMicrotask.bind(Q):typeof process<"u"&&process.nextTick||sn,Rr=e=>e!=null&&U(e[Pe]),p={isArray:ie,isArrayBuffer:en,isBuffer:Vn,isFormData:nr,isArrayBufferView:Gn,isString:Kn,isNumber:tn,isBoolean:Xn,isObject:De,isPlainObject:Ae,isReadableStream:or,isRequest:ir,isResponse:sr,isHeaders:ar,isUndefined:de,isDate:Zn,isFile:Qn,isBlob:Yn,isRegExp:xr,isFunction:U,isStream:tr,isURLSearchParams:rr,isTypedArray:mr,isFileList:er,forEach:me,merge:Xe,extend:cr,trim:lr,stripBOM:ur,inherits:dr,toFlatObject:fr,kindOf:Ie,kindOfTest:j,endsWith:pr,toArray:hr,forEachEntry:_r,matchAll:br,isHTMLForm:gr,hasOwnProperty:bt,hasOwnProp:bt,reduceDescriptors:on,freezeMethods:Sr,toObjectSet:wr,toCamelCase:yr,noop:Lr,toFiniteNumber:Ar,findKey:nn,global:Q,isContextDefined:rn,isSpecCompliantForm:Er,toJSONObject:vr,isAsyncFn:kr,isThenable:Tr,setImmediate:sn,asap:Cr,isIterable:Rr};function L(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}p.inherits(L,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:p.toJSONObject(this.config),code:this.code,status:this.status}}});const an=L.prototype,ln={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{ln[e]={value:e}});Object.defineProperties(L,ln);Object.defineProperty(an,"isAxiosError",{value:!0});L.from=(e,t,n,r,o,s)=>{const i=Object.create(an);return p.toFlatObject(e,i,function(u){return u!==Error.prototype},a=>a!=="isAxiosError"),L.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const Mr=null;function Ze(e){return p.isPlainObject(e)||p.isArray(e)}function cn(e){return p.endsWith(e,"[]")?e.slice(0,-2):e}function gt(e,t,n){return e?e.concat(t).map(function(o,s){return o=cn(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function Fr(e){return p.isArray(e)&&!e.some(Ze)}const Br=p.toFlatObject(p,{},null,function(t){return/^is[A-Z]/.test(t)});function ze(e,t,n){if(!p.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=p.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,b){return!p.isUndefined(b[y])});const r=n.metaTokens,o=n.visitor||d,s=n.dots,i=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&p.isSpecCompliantForm(t);if(!p.isFunction(o))throw new TypeError("visitor must be a function");function l(g){if(g===null)return"";if(p.isDate(g))return g.toISOString();if(p.isBoolean(g))return g.toString();if(!u&&p.isBlob(g))throw new L("Blob is not supported. Use a Buffer instead.");return p.isArrayBuffer(g)||p.isTypedArray(g)?u&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function d(g,y,b){let x=g;if(g&&!b&&typeof g=="object"){if(p.endsWith(y,"{}"))y=r?y:y.slice(0,-2),g=JSON.stringify(g);else if(p.isArray(g)&&Fr(g)||(p.isFileList(g)||p.endsWith(y,"[]"))&&(x=p.toArray(g)))return y=cn(y),x.forEach(function(w,k){!(p.isUndefined(w)||w===null)&&t.append(i===!0?gt([y],k,s):i===null?y:y+"[]",l(w))}),!1}return Ze(g)?!0:(t.append(gt(b,y,s),l(g)),!1)}const c=[],_=Object.assign(Br,{defaultVisitor:d,convertValue:l,isVisitable:Ze});function h(g,y){if(!p.isUndefined(g)){if(c.indexOf(g)!==-1)throw Error("Circular reference detected in "+y.join("."));c.push(g),p.forEach(g,function(x,S){(!(p.isUndefined(x)||x===null)&&o.call(t,x,p.isString(S)?S.trim():S,y,_))===!0&&h(x,y?y.concat(S):[S])}),c.pop()}}if(!p.isObject(e))throw new TypeError("data must be an object");return h(e),t}function yt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function lt(e,t){this._pairs=[],e&&ze(e,this,t)}const un=lt.prototype;un.append=function(t,n){this._pairs.push([t,n])};un.toString=function(t){const n=t?function(r){return t.call(this,r,yt)}:yt;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Or(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function dn(e,t,n){if(!t)return e;const r=n&&n.encode||Or;p.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let s;if(o?s=o(t,n):s=p.isURLSearchParams(t)?t.toString():new lt(t,n).toString(r),s){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class xt{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){p.forEach(this.handlers,function(r){r!==null&&t(r)})}}const fn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Pr=typeof URLSearchParams<"u"?URLSearchParams:lt,Ir=typeof FormData<"u"?FormData:null,Nr=typeof Blob<"u"?Blob:null,Dr={isBrowser:!0,classes:{URLSearchParams:Pr,FormData:Ir,Blob:Nr},protocols:["http","https","file","blob","url","data"]},ct=typeof window<"u"&&typeof document<"u",Qe=typeof navigator=="object"&&navigator||void 0,zr=ct&&(!Qe||["ReactNative","NativeScript","NS"].indexOf(Qe.product)<0),Ur=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Hr=ct&&window.location.href||"http://localhost",$r=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ct,hasStandardBrowserEnv:zr,hasStandardBrowserWebWorkerEnv:Ur,navigator:Qe,origin:Hr},Symbol.toStringTag,{value:"Module"})),I={...$r,...Dr};function jr(e,t){return ze(e,new I.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return I.isNode&&p.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function Wr(e){return p.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function qr(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}function pn(e){function t(n,r,o,s){let i=n[s++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),u=s>=n.length;return i=!i&&p.isArray(o)?o.length:i,u?(p.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!a):((!o[i]||!p.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],s)&&p.isArray(o[i])&&(o[i]=qr(o[i])),!a)}if(p.isFormData(e)&&p.isFunction(e.entries)){const n={};return p.forEachEntry(e,(r,o)=>{t(Wr(r),o,n,0)}),n}return null}function Jr(e,t,n){if(p.isString(e))try{return(t||JSON.parse)(e),p.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const _e={transitional:fn,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=p.isObject(t);if(s&&p.isHTMLForm(t)&&(t=new FormData(t)),p.isFormData(t))return o?JSON.stringify(pn(t)):t;if(p.isArrayBuffer(t)||p.isBuffer(t)||p.isStream(t)||p.isFile(t)||p.isBlob(t)||p.isReadableStream(t))return t;if(p.isArrayBufferView(t))return t.buffer;if(p.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return jr(t,this.formSerializer).toString();if((a=p.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return ze(a?{"files[]":t}:t,u&&new u,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),Jr(t)):t}],transformResponse:[function(t){const n=this.transitional||_e.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(p.isResponse(t)||p.isReadableStream(t))return t;if(t&&p.isString(t)&&(r&&!this.responseType||o)){const i=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(a){if(i)throw a.name==="SyntaxError"?L.from(a,L.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:I.classes.FormData,Blob:I.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};p.forEach(["delete","get","head","post","put","patch"],e=>{_e.headers[e]={}});const Vr=p.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"]),Gr=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
2
|
+
`).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||t[n]&&Vr[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},St=Symbol("internals");function ce(e){return e&&String(e).trim().toLowerCase()}function Ee(e){return e===!1||e==null?e:p.isArray(e)?e.map(Ee):String(e)}function Kr(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Xr=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Je(e,t,n,r,o){if(p.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!p.isString(t)){if(p.isString(r))return t.indexOf(r)!==-1;if(p.isRegExp(r))return r.test(t)}}function Zr(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Qr(e,t){const n=p.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,s,i){return this[r].call(this,t,o,s,i)},configurable:!0})})}let H=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(a,u,l){const d=ce(u);if(!d)throw new Error("header name must be a non-empty string");const c=p.findKey(o,d);(!c||o[c]===void 0||l===!0||l===void 0&&o[c]!==!1)&&(o[c||u]=Ee(a))}const i=(a,u)=>p.forEach(a,(l,d)=>s(l,d,u));if(p.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(p.isString(t)&&(t=t.trim())&&!Xr(t))i(Gr(t),n);else if(p.isObject(t)&&p.isIterable(t)){let a={},u,l;for(const d of t){if(!p.isArray(d))throw TypeError("Object iterator must return a key-value pair");a[l=d[0]]=(u=a[l])?p.isArray(u)?[...u,d[1]]:[u,d[1]]:d[1]}i(a,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=ce(t),t){const r=p.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Kr(o);if(p.isFunction(n))return n.call(this,o,r);if(p.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ce(t),t){const r=p.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Je(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(i){if(i=ce(i),i){const a=p.findKey(r,i);a&&(!n||Je(r,r[a],a,n))&&(delete r[a],o=!0)}}return p.isArray(t)?t.forEach(s):s(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const s=n[r];(!t||Je(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return p.forEach(this,(o,s)=>{const i=p.findKey(r,s);if(i){n[i]=Ee(o),delete n[s];return}const a=t?Zr(s):String(s).trim();a!==s&&delete n[s],n[a]=Ee(o),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return p.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&p.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
3
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[St]=this[St]={accessors:{}}).accessors,o=this.prototype;function s(i){const a=ce(i);r[a]||(Qr(o,i),r[a]=!0)}return p.isArray(t)?t.forEach(s):s(t),this}};H.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);p.reduceDescriptors(H.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});p.freezeMethods(H);function Ve(e,t){const n=this||_e,r=t||n,o=H.from(r.headers);let s=r.data;return p.forEach(e,function(a){s=a.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function hn(e){return!!(e&&e.__CANCEL__)}function se(e,t,n){L.call(this,e??"canceled",L.ERR_CANCELED,t,n),this.name="CanceledError"}p.inherits(se,L,{__CANCEL__:!0});function mn(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new L("Request failed with status code "+n.status,[L.ERR_BAD_REQUEST,L.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Yr(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function eo(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,s=0,i;return t=t!==void 0?t:1e3,function(u){const l=Date.now(),d=r[s];i||(i=l),n[o]=u,r[o]=l;let c=s,_=0;for(;c!==o;)_+=n[c++],c=c%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-i<t)return;const h=d&&l-d;return h?Math.round(_*1e3/h):void 0}}function to(e,t){let n=0,r=1e3/t,o,s;const i=(l,d=Date.now())=>{n=d,o=null,s&&(clearTimeout(s),s=null),e.apply(null,l)};return[(...l)=>{const d=Date.now(),c=d-n;c>=r?i(l,d):(o=l,s||(s=setTimeout(()=>{s=null,i(o)},r-c)))},()=>o&&i(o)]}const Re=(e,t,n=3)=>{let r=0;const o=eo(50,250);return to(s=>{const i=s.loaded,a=s.lengthComputable?s.total:void 0,u=i-r,l=o(u),d=i<=a;r=i;const c={loaded:i,total:a,progress:a?i/a:void 0,bytes:u,rate:l||void 0,estimated:l&&a&&d?(a-i)/l:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(c)},n)},wt=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Lt=e=>(...t)=>p.asap(()=>e(...t)),no=I.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,I.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(I.origin),I.navigator&&/(msie|trident)/i.test(I.navigator.userAgent)):()=>!0,ro=I.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const i=[e+"="+encodeURIComponent(t)];p.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),p.isString(r)&&i.push("path="+r),p.isString(o)&&i.push("domain="+o),s===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function oo(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function io(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function _n(e,t,n){let r=!oo(t);return e&&(r||n==!1)?io(e,t):t}const At=e=>e instanceof H?{...e}:e;function ee(e,t){t=t||{};const n={};function r(l,d,c,_){return p.isPlainObject(l)&&p.isPlainObject(d)?p.merge.call({caseless:_},l,d):p.isPlainObject(d)?p.merge({},d):p.isArray(d)?d.slice():d}function o(l,d,c,_){if(p.isUndefined(d)){if(!p.isUndefined(l))return r(void 0,l,c,_)}else return r(l,d,c,_)}function s(l,d){if(!p.isUndefined(d))return r(void 0,d)}function i(l,d){if(p.isUndefined(d)){if(!p.isUndefined(l))return r(void 0,l)}else return r(void 0,d)}function a(l,d,c){if(c in t)return r(l,d);if(c in e)return r(void 0,l)}const u={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:(l,d,c)=>o(At(l),At(d),c,!0)};return p.forEach(Object.keys(Object.assign({},e,t)),function(d){const c=u[d]||o,_=c(e[d],t[d],d);p.isUndefined(_)&&c!==a||(n[d]=_)}),n}const bn=e=>{const t=ee({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:a}=t;t.headers=i=H.from(i),t.url=dn(_n(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let u;if(p.isFormData(n)){if(I.hasStandardBrowserEnv||I.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((u=i.getContentType())!==!1){const[l,...d]=u?u.split(";").map(c=>c.trim()).filter(Boolean):[];i.setContentType([l||"multipart/form-data",...d].join("; "))}}if(I.hasStandardBrowserEnv&&(r&&p.isFunction(r)&&(r=r(t)),r||r!==!1&&no(t.url))){const l=o&&s&&ro.read(s);l&&i.set(o,l)}return t},so=typeof XMLHttpRequest<"u",ao=so&&function(e){return new Promise(function(n,r){const o=bn(e);let s=o.data;const i=H.from(o.headers).normalize();let{responseType:a,onUploadProgress:u,onDownloadProgress:l}=o,d,c,_,h,g;function y(){h&&h(),g&&g(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let b=new XMLHttpRequest;b.open(o.method.toUpperCase(),o.url,!0),b.timeout=o.timeout;function x(){if(!b)return;const w=H.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),B={data:!a||a==="text"||a==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:w,config:e,request:b};mn(function(W){n(W),y()},function(W){r(W),y()},B),b=null}"onloadend"in b?b.onloadend=x:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(x)},b.onabort=function(){b&&(r(new L("Request aborted",L.ECONNABORTED,e,b)),b=null)},b.onerror=function(){r(new L("Network Error",L.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let k=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const B=o.transitional||fn;o.timeoutErrorMessage&&(k=o.timeoutErrorMessage),r(new L(k,B.clarifyTimeoutError?L.ETIMEDOUT:L.ECONNABORTED,e,b)),b=null},s===void 0&&i.setContentType(null),"setRequestHeader"in b&&p.forEach(i.toJSON(),function(k,B){b.setRequestHeader(B,k)}),p.isUndefined(o.withCredentials)||(b.withCredentials=!!o.withCredentials),a&&a!=="json"&&(b.responseType=o.responseType),l&&([_,g]=Re(l,!0),b.addEventListener("progress",_)),u&&b.upload&&([c,h]=Re(u),b.upload.addEventListener("progress",c),b.upload.addEventListener("loadend",h)),(o.cancelToken||o.signal)&&(d=w=>{b&&(r(!w||w.type?new se(null,e,b):w),b.abort(),b=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const S=Yr(o.url);if(S&&I.protocols.indexOf(S)===-1){r(new L("Unsupported protocol "+S+":",L.ERR_BAD_REQUEST,e));return}b.send(s||null)})},lo=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const s=function(l){if(!o){o=!0,a();const d=l instanceof Error?l:this.reason;r.abort(d instanceof L?d:new se(d instanceof Error?d.message:d))}};let i=t&&setTimeout(()=>{i=null,s(new L(`timeout ${t} of ms exceeded`,L.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>l.addEventListener("abort",s));const{signal:u}=r;return u.unsubscribe=()=>p.asap(a),u}},co=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},uo=async function*(e,t){for await(const n of fo(e))yield*co(n,t)},fo=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Et=(e,t,n,r)=>{const o=uo(e,t);let s=0,i,a=u=>{i||(i=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:l,value:d}=await o.next();if(l){a(),u.close();return}let c=d.byteLength;if(n){let _=s+=c;n(_)}u.enqueue(new Uint8Array(d))}catch(l){throw a(l),l}},cancel(u){return a(u),o.return()}},{highWaterMark:2})},Ue=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",gn=Ue&&typeof ReadableStream=="function",po=Ue&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),yn=(e,...t)=>{try{return!!e(...t)}catch{return!1}},ho=gn&&yn(()=>{let e=!1;const t=new Request(I.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),vt=64*1024,Ye=gn&&yn(()=>p.isReadableStream(new Response("").body)),Me={stream:Ye&&(e=>e.body)};Ue&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Me[t]&&(Me[t]=p.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new L(`Response type '${t}' is not supported`,L.ERR_NOT_SUPPORT,r)})})})(new Response);const mo=async e=>{if(e==null)return 0;if(p.isBlob(e))return e.size;if(p.isSpecCompliantForm(e))return(await new Request(I.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(p.isArrayBufferView(e)||p.isArrayBuffer(e))return e.byteLength;if(p.isURLSearchParams(e)&&(e=e+""),p.isString(e))return(await po(e)).byteLength},_o=async(e,t)=>{const n=p.toFiniteNumber(e.getContentLength());return n??mo(t)},bo=Ue&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:u,responseType:l,headers:d,withCredentials:c="same-origin",fetchOptions:_}=bn(e);l=l?(l+"").toLowerCase():"text";let h=lo([o,s&&s.toAbortSignal()],i),g;const y=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let b;try{if(u&&ho&&n!=="get"&&n!=="head"&&(b=await _o(d,r))!==0){let B=new Request(t,{method:"POST",body:r,duplex:"half"}),D;if(p.isFormData(r)&&(D=B.headers.get("content-type"))&&d.setContentType(D),B.body){const[W,G]=wt(b,Re(Lt(u)));r=Et(B.body,vt,W,G)}}p.isString(c)||(c=c?"include":"omit");const x="credentials"in Request.prototype;g=new Request(t,{..._,signal:h,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:x?c:void 0});let S=await fetch(g,_);const w=Ye&&(l==="stream"||l==="response");if(Ye&&(a||w&&y)){const B={};["status","statusText","headers"].forEach(K=>{B[K]=S[K]});const D=p.toFiniteNumber(S.headers.get("content-length")),[W,G]=a&&wt(D,Re(Lt(a),!0))||[];S=new Response(Et(S.body,vt,W,()=>{G&&G(),y&&y()}),B)}l=l||"text";let k=await Me[p.findKey(Me,l)||"text"](S,e);return!w&&y&&y(),await new Promise((B,D)=>{mn(B,D,{data:k,headers:H.from(S.headers),status:S.status,statusText:S.statusText,config:e,request:g})})}catch(x){throw y&&y(),x&&x.name==="TypeError"&&/Load failed|fetch/i.test(x.message)?Object.assign(new L("Network Error",L.ERR_NETWORK,e,g),{cause:x.cause||x}):L.from(x,x&&x.code,e,g)}}),et={http:Mr,xhr:ao,fetch:bo};p.forEach(et,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const kt=e=>`- ${e}`,go=e=>p.isFunction(e)||e===null||e===!1,xn={getAdapter:e=>{e=p.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;s<t;s++){n=e[s];let i;if(r=n,!go(n)&&(r=et[(i=String(n)).toLowerCase()],r===void 0))throw new L(`Unknown adapter '${i}'`);if(r)break;o[i||"#"+s]=r}if(!r){const s=Object.entries(o).map(([a,u])=>`adapter ${a} `+(u===!1?"is not supported by the environment":"is not available in the build"));let i=t?s.length>1?`since :
|
|
4
|
+
`+s.map(kt).join(`
|
|
5
|
+
`):" "+kt(s[0]):"as no adapter specified";throw new L("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:et};function Ge(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new se(null,e)}function Tt(e){return Ge(e),e.headers=H.from(e.headers),e.data=Ve.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),xn.getAdapter(e.adapter||_e.adapter)(e).then(function(r){return Ge(e),r.data=Ve.call(e,e.transformResponse,r),r.headers=H.from(r.headers),r},function(r){return hn(r)||(Ge(e),r&&r.response&&(r.response.data=Ve.call(e,e.transformResponse,r.response),r.response.headers=H.from(r.response.headers))),Promise.reject(r)})}const Sn="1.10.0",He={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{He[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Ct={};He.transitional=function(t,n,r){function o(s,i){return"[Axios v"+Sn+"] Transitional option '"+s+"'"+i+(r?". "+r:"")}return(s,i,a)=>{if(t===!1)throw new L(o(i," has been removed"+(n?" in "+n:"")),L.ERR_DEPRECATED);return n&&!Ct[i]&&(Ct[i]=!0,console.warn(o(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,i,a):!0}};He.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function yo(e,t,n){if(typeof e!="object")throw new L("options must be an object",L.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],i=t[s];if(i){const a=e[s],u=a===void 0||i(a,s,e);if(u!==!0)throw new L("option "+s+" must be "+u,L.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new L("Unknown option "+s,L.ERR_BAD_OPTION)}}const ve={assertOptions:yo,validators:He},J=ve.validators;let Y=class{constructor(t){this.defaults=t||{},this.interceptors={request:new xt,response:new xt}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const s=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
6
|
+
`+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ee(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&ve.assertOptions(r,{silentJSONParsing:J.transitional(J.boolean),forcedJSONParsing:J.transitional(J.boolean),clarifyTimeoutError:J.transitional(J.boolean)},!1),o!=null&&(p.isFunction(o)?n.paramsSerializer={serialize:o}:ve.assertOptions(o,{encode:J.function,serialize:J.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ve.assertOptions(n,{baseUrl:J.spelling("baseURL"),withXsrfToken:J.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&p.merge(s.common,s[n.method]);s&&p.forEach(["delete","get","head","post","put","patch","common"],g=>{delete s[g]}),n.headers=H.concat(i,s);const a=[];let u=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(u=u&&y.synchronous,a.unshift(y.fulfilled,y.rejected))});const l=[];this.interceptors.response.forEach(function(y){l.push(y.fulfilled,y.rejected)});let d,c=0,_;if(!u){const g=[Tt.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,l),_=g.length,d=Promise.resolve(n);c<_;)d=d.then(g[c++],g[c++]);return d}_=a.length;let h=n;for(c=0;c<_;){const g=a[c++],y=a[c++];try{h=g(h)}catch(b){y.call(this,b);break}}try{d=Tt.call(this,h)}catch(g){return Promise.reject(g)}for(c=0,_=l.length;c<_;)d=d.then(l[c++],l[c++]);return d}getUri(t){t=ee(this.defaults,t);const n=_n(t.baseURL,t.url,t.allowAbsoluteUrls);return dn(n,t.params,t.paramsSerializer)}};p.forEach(["delete","get","head","options"],function(t){Y.prototype[t]=function(n,r){return this.request(ee(r||{},{method:t,url:n,data:(r||{}).data}))}});p.forEach(["post","put","patch"],function(t){function n(r){return function(s,i,a){return this.request(ee(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}Y.prototype[t]=n(),Y.prototype[t+"Form"]=n(!0)});let xo=class wn{constructor(t){if(typeof t!="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},t(function(s,i,a){r.reason||(r.reason=new se(s,i,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new wn(function(o){t=o}),cancel:t}}};function So(e){return function(n){return e.apply(null,n)}}function wo(e){return p.isObject(e)&&e.isAxiosError===!0}const tt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(tt).forEach(([e,t])=>{tt[t]=e});function Ln(e){const t=new Y(e),n=Qt(Y.prototype.request,t);return p.extend(n,Y.prototype,t,{allOwnKeys:!0}),p.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Ln(ee(e,o))},n}const M=Ln(_e);M.Axios=Y;M.CanceledError=se;M.CancelToken=xo;M.isCancel=hn;M.VERSION=Sn;M.toFormData=ze;M.AxiosError=L;M.Cancel=M.CanceledError;M.all=function(t){return Promise.all(t)};M.spread=So;M.isAxiosError=wo;M.mergeConfig=ee;M.AxiosHeaders=H;M.formToJSON=e=>pn(p.isHTMLForm(e)?new FormData(e):e);M.getAdapter=xn.getAdapter;M.HttpStatusCode=tt;M.default=M;const{Axios:Ti,AxiosError:Ci,CanceledError:Ri,isCancel:Mi,CancelToken:Fi,VERSION:Bi,all:Oi,Cancel:Pi,isAxiosError:Ii,spread:Ni,toFormData:Di,AxiosHeaders:zi,HttpStatusCode:Ui,formToJSON:Hi,getAdapter:$i,mergeConfig:ji}=M;var be,E,An,Z,Rt,En,vn,kn,ut,nt,rt,fe={},Tn=[],Lo=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,$e=Array.isArray;function V(e,t){for(var n in t)e[n]=t[n];return e}function dt(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function re(e,t,n){var r,o,s,i={};for(s in t)s=="key"?r=t[s]:s=="ref"?o=t[s]:i[s]=t[s];if(arguments.length>2&&(i.children=arguments.length>3?be.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)i[s]===void 0&&(i[s]=e.defaultProps[s]);return ue(e,i,r,o,null)}function ue(e,t,n,r,o){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++An,__i:-1,__u:0};return o==null&&E.vnode!=null&&E.vnode(s),s}function te(e){return e.children}function ke(e,t){this.props=e,this.context=t}function oe(e,t){if(t==null)return e.__?oe(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?oe(e):null}function Cn(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Cn(e)}}function Mt(e){(!e.__d&&(e.__d=!0)&&Z.push(e)&&!Fe.__r++||Rt!=E.debounceRendering)&&((Rt=E.debounceRendering)||En)(Fe)}function Fe(){for(var e,t,n,r,o,s,i,a=1;Z.length;)Z.length>a&&Z.sort(vn),e=Z.shift(),a=Z.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,s=[],i=[],t.__P&&((n=V({},r)).__v=r.__v+1,E.vnode&&E.vnode(n),ft(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,s,o??oe(r),!!(32&r.__u),i),n.__v=r.__v,n.__.__k[n.__i]=n,Fn(s,n,i),n.__e!=o&&Cn(n)));Fe.__r=0}function Rn(e,t,n,r,o,s,i,a,u,l,d){var c,_,h,g,y,b,x=r&&r.__k||Tn,S=t.length;for(u=Ao(n,t,x,u,S),c=0;c<S;c++)(h=n.__k[c])!=null&&(_=h.__i==-1?fe:x[h.__i]||fe,h.__i=c,b=ft(e,h,_,o,s,i,a,u,l,d),g=h.__e,h.ref&&_.ref!=h.ref&&(_.ref&&pt(_.ref,null,h),d.push(h.ref,h.__c||g,h)),y==null&&g!=null&&(y=g),4&h.__u||_.__k===h.__k?u=Mn(h,u,e):typeof h.type=="function"&&b!==void 0?u=b:g&&(u=g.nextSibling),h.__u&=-7);return n.__e=y,u}function Ao(e,t,n,r,o){var s,i,a,u,l,d=n.length,c=d,_=0;for(e.__k=new Array(o),s=0;s<o;s++)(i=t[s])!=null&&typeof i!="boolean"&&typeof i!="function"?(u=s+_,(i=e.__k[s]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?ue(null,i,null,null,null):$e(i)?ue(te,{children:i},null,null,null):i.constructor==null&&i.__b>0?ue(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=e,i.__b=e.__b+1,a=null,(l=i.__i=Eo(i,n,u,c))!=-1&&(c--,(a=n[l])&&(a.__u|=2)),a==null||a.__v==null?(l==-1&&(o>d?_--:o<d&&_++),typeof i.type!="function"&&(i.__u|=4)):l!=u&&(l==u-1?_--:l==u+1?_++:(l>u?_--:_++,i.__u|=4))):e.__k[s]=null;if(c)for(s=0;s<d;s++)(a=n[s])!=null&&(2&a.__u)==0&&(a.__e==r&&(r=oe(a)),On(a,a));return r}function Mn(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=Mn(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=oe(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Eo(e,t,n,r){var o,s,i=e.key,a=e.type,u=t[n];if(u===null&&e.key==null||u&&i==u.key&&a==u.type&&(2&u.__u)==0)return n;if(r>(u!=null&&(2&u.__u)==0?1:0))for(o=n-1,s=n+1;o>=0||s<t.length;){if(o>=0){if((u=t[o])&&(2&u.__u)==0&&i==u.key&&a==u.type)return o;o--}if(s<t.length){if((u=t[s])&&(2&u.__u)==0&&i==u.key&&a==u.type)return s;s++}}return-1}function Ft(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Lo.test(t)?n:n+"px"}function ge(e,t,n,r,o){var s,i;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Ft(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||Ft(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")s=t!=(t=t.replace(kn,"$1")),i=t.toLowerCase(),t=i in e||t=="onFocusOut"||t=="onFocusIn"?i.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r?n.u=r.u:(n.u=ut,e.addEventListener(t,s?rt:nt,s)):e.removeEventListener(t,s?rt:nt,s);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function Bt(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=ut++;else if(t.t<n.u)return;return n(E.event?E.event(t):t)}}}function ft(e,t,n,r,o,s,i,a,u,l){var d,c,_,h,g,y,b,x,S,w,k,B,D,W,G,K,qe,q=t.type;if(t.constructor!=null)return null;128&n.__u&&(u=!!(32&n.__u),s=[a=t.__e=n.__e]),(d=E.__b)&&d(t);e:if(typeof q=="function")try{if(x=t.props,S="prototype"in q&&q.prototype.render,w=(d=q.contextType)&&r[d.__c],k=d?w?w.props.value:d.__:r,n.__c?b=(c=t.__c=n.__c).__=c.__E:(S?t.__c=c=new q(x,k):(t.__c=c=new ke(x,k),c.constructor=q,c.render=ko),w&&w.sub(c),c.props=x,c.state||(c.state={}),c.context=k,c.__n=r,_=c.__d=!0,c.__h=[],c._sb=[]),S&&c.__s==null&&(c.__s=c.state),S&&q.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=V({},c.__s)),V(c.__s,q.getDerivedStateFromProps(x,c.__s))),h=c.props,g=c.state,c.__v=t,_)S&&q.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),S&&c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(S&&q.getDerivedStateFromProps==null&&x!==h&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(x,k),!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(x,c.__s,k)===!1||t.__v==n.__v){for(t.__v!=n.__v&&(c.props=x,c.state=c.__s,c.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(le){le&&(le.__=t)}),B=0;B<c._sb.length;B++)c.__h.push(c._sb[B]);c._sb=[],c.__h.length&&i.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(x,c.__s,k),S&&c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(h,g,y)})}if(c.context=k,c.props=x,c.__P=e,c.__e=!1,D=E.__r,W=0,S){for(c.state=c.__s,c.__d=!1,D&&D(t),d=c.render(c.props,c.state,c.context),G=0;G<c._sb.length;G++)c.__h.push(c._sb[G]);c._sb=[]}else do c.__d=!1,D&&D(t),d=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++W<25);c.state=c.__s,c.getChildContext!=null&&(r=V(V({},r),c.getChildContext())),S&&!_&&c.getSnapshotBeforeUpdate!=null&&(y=c.getSnapshotBeforeUpdate(h,g)),K=d,d!=null&&d.type===te&&d.key==null&&(K=Bn(d.props.children)),a=Rn(e,$e(K)?K:[K],t,n,r,o,s,i,a,u,l),c.base=t.__e,t.__u&=-161,c.__h.length&&i.push(c),b&&(c.__E=c.__=null)}catch(le){if(t.__v=null,u||s!=null)if(le.then){for(t.__u|=u?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;s[s.indexOf(a)]=null,t.__e=a}else for(qe=s.length;qe--;)dt(s[qe]);else t.__e=n.__e,t.__k=n.__k;E.__e(le,t,n)}else s==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=vo(n.__e,t,n,r,o,s,i,u,l);return(d=E.diffed)&&d(t),128&t.__u?void 0:a}function Fn(e,t,n){for(var r=0;r<n.length;r++)pt(n[r],n[++r],n[++r]);E.__c&&E.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(s){s.call(o)})}catch(s){E.__e(s,o.__v)}})}function Bn(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:$e(e)?e.map(Bn):V({},e)}function vo(e,t,n,r,o,s,i,a,u){var l,d,c,_,h,g,y,b=n.props,x=t.props,S=t.type;if(S=="svg"?o="http://www.w3.org/2000/svg":S=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),s!=null){for(l=0;l<s.length;l++)if((h=s[l])&&"setAttribute"in h==!!S&&(S?h.localName==S:h.nodeType==3)){e=h,s[l]=null;break}}if(e==null){if(S==null)return document.createTextNode(x);e=document.createElementNS(o,S,x.is&&x),a&&(E.__m&&E.__m(t,s),a=!1),s=null}if(S==null)b===x||a&&e.data==x||(e.data=x);else{if(s=s&&be.call(e.childNodes),b=n.props||fe,!a&&s!=null)for(b={},l=0;l<e.attributes.length;l++)b[(h=e.attributes[l]).name]=h.value;for(l in b)if(h=b[l],l!="children"){if(l=="dangerouslySetInnerHTML")c=h;else if(!(l in x)){if(l=="value"&&"defaultValue"in x||l=="checked"&&"defaultChecked"in x)continue;ge(e,l,null,h,o)}}for(l in x)h=x[l],l=="children"?_=h:l=="dangerouslySetInnerHTML"?d=h:l=="value"?g=h:l=="checked"?y=h:a&&typeof h!="function"||b[l]===h||ge(e,l,h,b[l],o);if(d)a||c&&(d.__html==c.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(c&&(e.innerHTML=""),Rn(t.type=="template"?e.content:e,$e(_)?_:[_],t,n,r,S=="foreignObject"?"http://www.w3.org/1999/xhtml":o,s,i,s?s[0]:n.__k&&oe(n,0),a,u),s!=null)for(l=s.length;l--;)dt(s[l]);a||(l="value",S=="progress"&&g==null?e.removeAttribute("value"):g!=null&&(g!==e[l]||S=="progress"&&!g||S=="option"&&g!=b[l])&&ge(e,l,g,b[l],o),l="checked",y!=null&&y!=e[l]&&ge(e,l,y,b[l],o))}return e}function pt(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(o){E.__e(o,n)}}function On(e,t,n){var r,o;if(E.unmount&&E.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||pt(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){E.__e(s,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&On(r[o],t,n||typeof e.type!="function");n||dt(e.__e),e.__c=e.__=e.__e=void 0}function ko(e,t,n){return this.constructor(e,n)}function je(e,t,n){var r,o,s,i;t==document&&(t=document.documentElement),E.__&&E.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,s=[],i=[],ft(t,e=(!r&&n||t).__k=re(te,null,[e]),o||fe,fe,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?be.call(t.childNodes):null,s,!r&&n?n:o?o.__e:t.firstChild,r,i),Fn(s,e,i)}function Pn(e,t){je(e,t,Pn)}function In(e,t,n){var r,o,s,i,a=V({},e.props);for(s in e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)s=="key"?r=t[s]:s=="ref"?o=t[s]:a[s]=t[s]===void 0&&i!=null?i[s]:t[s];return arguments.length>2&&(a.children=arguments.length>3?be.call(arguments,2):n),ue(e.type,a,r||e.key,o||e.ref,null)}be=Tn.slice,E={__e:function(e,t,n,r){for(var o,s,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((s=o.constructor)&&s.getDerivedStateFromError!=null&&(o.setState(s.getDerivedStateFromError(e)),i=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(a){e=a}throw e}},An=0,ke.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=V({},this.state),typeof e=="function"&&(e=e(V({},n),this.props)),e&&V(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Mt(this))},ke.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Mt(this))},ke.prototype.render=te,Z=[],En=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,vn=function(e,t){return e.__v.__b-t.__v.__b},Fe.__r=0,kn=/(PointerCapture)$|Capture$/i,ut=0,nt=Bt(!1),rt=Bt(!0);var To=0;function m(e,t,n,r,o,s){t||(t={});var i,a,u=t;if("ref"in u)for(a in u={},t)a=="ref"?i=t[a]:u[a]=t[a];var l={type:e,props:u,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--To,__i:-1,__u:0,__source:o,__self:s};if(typeof e=="function"&&(i=e.defaultProps))for(a in i)u[a]===void 0&&(u[a]=i[a]);return E.vnode&&E.vnode(l),l}var pe,R,Ke,Ot,Be=0,Nn=[],F=E,Pt=F.__b,It=F.__r,Nt=F.diffed,Dt=F.__c,zt=F.unmount,Ut=F.__;function ht(e,t){F.__h&&F.__h(R,e,Be||t),Be=0;var n=R.__H||(R.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function N(e){return Be=1,Co(zn,e)}function Co(e,t,n){var r=ht(pe++,2);if(r.t=e,!r.__c&&(r.__=[zn(void 0,t),function(a){var u=r.__N?r.__N[0]:r.__[0],l=r.t(u,a);u!==l&&(r.__N=[l,r.__[1]],r.__c.setState({}))}],r.__c=R,!R.__f)){var o=function(a,u,l){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(_){return!!_.__c});if(d.every(function(_){return!_.__N}))return!s||s.call(this,a,u,l);var c=r.__c.props!==a;return d.forEach(function(_){if(_.__N){var h=_.__[0];_.__=_.__N,_.__N=void 0,h!==_.__[0]&&(c=!0)}}),s&&s.call(this,a,u,l)||c};R.__f=!0;var s=R.shouldComponentUpdate,i=R.componentWillUpdate;R.componentWillUpdate=function(a,u,l){if(this.__e){var d=s;s=void 0,o(a,u,l),s=d}i&&i.call(this,a,u,l)},R.shouldComponentUpdate=o}return r.__N||r.__}function he(e,t){var n=ht(pe++,3);!F.__s&&Dn(n.__H,t)&&(n.__=e,n.u=t,R.__H.__h.push(n))}function Oe(e){return Be=5,Ro(function(){return{current:e}},[])}function Ro(e,t){var n=ht(pe++,7);return Dn(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Mo(){for(var e;e=Nn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Te),e.__H.__h.forEach(ot),e.__H.__h=[]}catch(t){e.__H.__h=[],F.__e(t,e.__v)}}F.__b=function(e){R=null,Pt&&Pt(e)},F.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ut&&Ut(e,t)},F.__r=function(e){It&&It(e),pe=0;var t=(R=e.__c).__H;t&&(Ke===R?(t.__h=[],R.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(Te),t.__h.forEach(ot),t.__h=[],pe=0)),Ke=R},F.diffed=function(e){Nt&&Nt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Nn.push(t)!==1&&Ot===F.requestAnimationFrame||((Ot=F.requestAnimationFrame)||Fo)(Mo)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Ke=R=null},F.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Te),n.__h=n.__h.filter(function(r){return!r.__||ot(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],F.__e(r,n.__v)}}),Dt&&Dt(e,t)},F.unmount=function(e){zt&&zt(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Te(r)}catch(o){t=o}}),n.__H=void 0,t&&F.__e(t,n.__v))};var Ht=typeof requestAnimationFrame=="function";function Fo(e){var t,n=function(){clearTimeout(r),Ht&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Ht&&(t=requestAnimationFrame(n))}function Te(e){var t=R,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),R=t}function ot(e){var t=R;e.__c=e.__(),R=t}function Dn(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function zn(e,t){return typeof t=="function"?t(e):t}var We=(e=>(e.ZH="zh",e.EN="en",e))(We||{}),$=(e=>(e.WHITE="white",e.DARK="dark",e))($||{}),ne=(e=>(e.DEV="dev",e.DEVELOPMENT="development",e.TEST="test",e.PROD="prod",e.PRODUCTION="production",e))(ne||{}),f=(e=>(e.SMALL="small",e.MEDIUM="medium",e))(f||{});const $t={white:{background:"#fff",border:"#d9d9d9",color:"#222",boxShadow:"0 6px 16px rgba(0, 0, 0, 0.12)",closeColor:"#999"},dark:{background:"#23262F",border:"#444C5C",color:"#F5F6FA",boxShadow:"0 6px 16px rgba(0,0,0,0.32)",closeColor:"#B5B8BE"}};function Bo(){return v("theme")===$.WHITE?$t.white:$t.dark}class Oo{parseArg(t){return typeof t=="string"?{content:t}:t}show(t,n){const{content:r,duration:o,closable:s}=this.parseArg(n),i=Bo(),a=document.createElement("div");if(a.style.cssText=`
|
|
7
7
|
position: fixed;
|
|
8
8
|
top: 20px;
|
|
9
9
|
left: 50%;
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
padding: 4px;
|
|
43
43
|
color: ${i.closeColor};
|
|
44
44
|
font-size: 12px;
|
|
45
|
-
`,l.onclick=()=>{document.body.removeChild(a)},a.appendChild(l)}document.body.appendChild(a),o!==0&&setTimeout(()=>{document.body.contains(a)&&document.body.removeChild(a)},o||3e3)}success(t){this.show("success",t)}error(t){this.show("error",t)}warning(t){this.show("warning",t)}info(t){this.show("info",t)}}const
|
|
45
|
+
`,l.onclick=()=>{document.body.removeChild(a)},a.appendChild(l)}document.body.appendChild(a),o!==0&&setTimeout(()=>{document.body.contains(a)&&document.body.removeChild(a)},o||3e3)}success(t){this.show("success",t)}error(t){this.show("error",t)}warning(t){this.show("warning",t)}info(t){this.show("info",t)}}const it=new Oo;function Po(e={}){const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");console.log("fundUnitParams",t);const{env:n}=t;let r;switch(n){case ne.DEV:case ne.DEVELOPMENT:r="/api";break;case ne.TEST:r="https://fund.bestfulfill.tech/api/sdk";break;case ne.PROD:case ne.PRODUCTION:default:r="https://fund.bestfulfill.com/api/sdk";break}const{baseURL:o=r,timeout:s=1e4,onError:i}=e,a=M.create({baseURL:o,timeout:s});return a.interceptors.request.use(u=>{const{token:l,locale:d}=t;return u.headers={...u.headers,Authorization:l,"x-locale":d===We.ZH?"zh-CN":"en-US"},u}),a.interceptors.response.use(u=>{if(u.data&&u.data.code===0)return u.data;const l=u.data?.msg||u.data?.message||"未知错误";return it.error(l),i&&i(l,u),Promise.reject(u.data||{message:"未知错误"})},u=>{const l=u.response?.data?.msg||u.response?.data?.message||u.message||"网络请求失败";return it.error(l),i&&i(l,u),Promise.reject(u)}),a}let Ce=null;function ae(){return Ce||(Ce=Po()),Ce}function Io(){Ce=null}function Un(){const e=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return ae().get("/balance",{params:{merchant_id:e.merchantId,biz_type:e.bizType,fund_balance_id:e.fundBalanceId}}).then(t=>{const n=t.data,r={fundBalanceId:n.fund_balance_id,merchantId:n.merchant_id,bizType:n.biz_type,currency:n.currency,totalAmount:n.total_amount,frozenAmount:n.frozen_amount,creditLimit:n.credit_config?.credit_limit,creditUsed:n.credit_used,isCredit:!!n.credit_config,availableAmount:n.available_amount,pendingAmount:n.pending_amount,status:n.status,createdAt:n.created_at};return sessionStorage.setItem("balanceData",JSON.stringify(r)),r})}const No=async()=>ae().get("/all-dicts",{}).then(e=>(sessionStorage.setItem("all_dicts",JSON.stringify(e.data)),e.data||{})),Do=async(e,t)=>ae().post("/oss/upload",e,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:n=>{if(n.total){const r=Math.round(n.loaded*100/n.total);t&&t(r)}}}).then(n=>n.data?.url||""),zo=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),n={merchant_id:Number(t.merchantId),biz_type:t.bizType,fund_balance_id:t.fundBalanceId,source_operator:t.userId?String(t.userId):void 0,transfer_no:e.transferNo,transfer_channel:e.transferChannel,voucher_urls:e.voucherUrls};return ae().post("/offline/recharge/create",n,{})},Uo=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),n={merchant_id:Number(t.merchantId),biz_type:t.bizType,fund_balance_id:t.fundBalanceId,source_operator:t.userId?String(t.userId):void 0,amount:e.amount,currency:e.currency,recharge_channel:e.rechargeChannel,return_url:window.location.href};return ae().post("/online/recharge/create",n,{}).then(r=>r.data.redirect_url)},Ho=async e=>ae().get("/calc-payment-amount",{params:e}).then(t=>t.data.payment_amount);async function $o(){let e=JSON.parse(sessionStorage.getItem("balanceData")||"{}");return e&&Object.keys(e).length>0||(e=await Un()),e}function jo(e){const{merchant_id:t,biz_type:n,fund_balance_id:r,user_id:o,theme:s=$.WHITE,locale:i=We.ZH,env:a,size:u,themeConfig:l}=e,d="Bearer "+e.token;return sessionStorage.setItem("fund_unit_params",JSON.stringify({merchantId:t,bizType:n,fundBalanceId:r,userId:o,token:d,theme:s,locale:i,env:a,size:u,themeConfig:l})),Io(),No(),{token:d,merchantId:t,bizType:n,fundBalanceId:r,userId:o,theme:s,locale:i,env:a,size:u}}function v(e){const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");if(!e)return t;if(Array.isArray(e)){const n={};return e.forEach(r=>{n[r]=t[r]}),n}return t[e]}function Hn(){const e=new CustomEvent("refresh-balance",{detail:{},bubbles:!0,composed:!0});document.dispatchEvent(e)}const Wo={"/api":{target:"https://fund.bestfulfill.tech/api/sdk",changeOrigin:!0,rewrite:e=>e.replace(/^\/api/,""),secure:!1}},ye=v("size"),xe={white:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:ye===f.SMALL?"6px 10px":"8px 16px",cursor:"pointer",fontSize:ye===f.SMALL?12:16,fontWeight:600},dark:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:ye===f.SMALL?"6px 10px":"8px 16px",cursor:"pointer",fontSize:ye===f.SMALL?12:16,fontWeight:600}};function qo(e){const t=v("theme"),n=v("themeConfig"),r=t===$.WHITE;let o=e;return!o&&n&&(o=(r?n.white:n.dark)?.color),r?{...xe.white,background:o||xe.white.background}:{...xe.dark,background:o||xe.dark.background}}function $n({onClick:e,color:t,children:n}){const r=qo(t);return m("button",{style:r,onClick:e,type:"button",children:n})}const Jo={余额详情:"余额详情",真实金额:"真实金额",冻结金额:"冻结金额",信用额度:"信用额度",已用额度:"已用额度",可用余额:"可用余额",暂无数据:"暂无数据","金额需在1到999999.99之间":"金额需在1到999999.99之间","充值 / 转账":"充值 / 转账",在线充值:"在线充值",线下转账:"线下转账",充值币种:"充值币种",充值金额:"充值金额",支付平台:"支付平台",请选择充值币种:"请选择充值币种",请输入充值金额:"请输入充值金额",请选择支付平台:"请选择支付平台","需要收取手续费,实际支付金额约为:":"需要收取手续费,实际支付金额约为:","提交失败,请重试":"提交失败,请重试","提交中...":"提交中...",去支付:"去支付",取消:"取消",关闭:"关闭",第三方支付平台:"第三方支付平台",交易ID:"交易ID",请输入转账交易ID:"请输入转账交易ID",上传文件:"上传文件",请上传转账凭证:"请上传转账凭证",离线充值创建成功:"离线充值创建成功","加载中...":"加载中...",错误:"错误",成功:"成功",必填:"必填","充值/转账":"充值/转账",切换为暗黑主题:"切换为暗黑主题",切换为白色主题:"切换为白色主题",点击或拖拽文件到此处上传:"点击或拖拽文件到此处上传","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传",个文件:"个文件","正在上传...":"正在上传...",已上传:"已上传",移除:"移除"};function Vo(e){return Jo[e]||e}const Go={余额详情:"Balance Details",真实金额:"Real Balance",冻结金额:"Frozen Amount",信用额度:"Credit Limit",已用额度:"Credit Used",可用余额:"Available Balance",暂无数据:"No Data","金额需在1到999999.99之间":"Amount must be between 1 and 999999.99","充值 / 转账":"Recharge / Transfer",在线充值:"Online Recharge",线下转账:"Offline Transfer",充值币种:"Recharge Currency",充值金额:"Recharge Amount",支付平台:"Payment Platform",请选择充值币种:"Please select recharge currency",请输入充值金额:"Please enter recharge amount",请选择支付平台:"Please select payment platform","需要收取手续费,实际支付金额约为:":"requires a handling fee, the actual payment amount is approximately: ","提交失败,请重试":"Submit failed, please try again","提交中...":"Submitting...",去支付:"Go to Pay",取消:"Cancel",关闭:"Close",第三方支付平台:"Third-party Payment Platform",交易ID:"Transaction ID",请输入转账交易ID:"Please enter transfer transaction ID",上传文件:"Upload Files",请上传转账凭证:"Please upload transfer voucher",离线充值创建成功:"Offline recharge created successfully","加载中...":"Loading...",错误:"Error",成功:"Success",必填:"Required","充值/转账":"Recharge/Transfer",切换为暗黑主题:"Switch to Dark Theme",切换为白色主题:"Switch to Light Theme",点击或拖拽文件到此处上传:"Click or drag files here to upload","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"Supports JPG, PNG, PDF formats, single file not exceeding 20MB, maximum",个文件:"files can be uploaded","正在上传...":"Uploading...",已上传:"Uploaded",移除:"Remove"};function Ko(e){return Go[e]||e}function Xo(){return JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").locale||We.ZH}function A(e){return Xo()==="zh"?Vo(e):Ko(e)}const jt={white:{trigger:{background:"#fff",color:"#222",border:"1px solid #d9d9d9"},triggerDisabled:{background:"#f5f5f5",color:"#bfbfbf",border:"1px solid #f0f0f0"},triggerError:{background:"#fff",color:"#222",border:"1px solid #ff4d4f"},dropdown:{background:"#fff",border:"1px solid #d9d9d9",color:"#222"},option:(e,t,n)=>({color:t?"#bfbfbf":e?"#1890ff":"#222",background:e?"#e6f7ff":n&&!t||t?"#f5f5f5":"#fff"}),placeholder:{color:"#bfbfbf"},scrollbarThumb:"#e5e5e5",scrollbarTrack:"#f5f5f5",boxShadow:"0 2px 8px rgba(0,0,0,0.08)"},dark:{trigger:{background:"#23262F",color:"#fff",border:"1px solid #374151"},triggerDisabled:{background:"#23262F",color:"#666",border:"1px solid #374151"},triggerError:{background:"#23262F",color:"#fff",border:"1px solid #ff4d4f"},dropdown:{background:"#23262F",border:"1px solid #374151",color:"#fff"},option:(e,t,n)=>({color:t?"#666":e?"#00E8C6":"#fff",background:e?"#23262F":n&&!t?"#333843":"#23262F"}),placeholder:{color:"#666"},scrollbarThumb:"#444C5C",scrollbarTrack:"#23262F",boxShadow:"0 2px 8px rgba(0,0,0,0.32)"}};function Zo(){const e=v("theme"),t=v("themeConfig"),n=e===$.WHITE,r=n?jt.white:jt.dark;if(t){const o=n?t.white:t.dark;if(o?.color)return{...r,option:(s,i,a)=>({...r.option(s,i,a),color:i?r.option(s,i,a).color:s?o.color:r.option(s,i,a).color})}}return r}const z=v("size"),st=({value:e,onChange:t,options:n,placeholder:r,style:o,error:s,disabled:i,dropdownStyle:a,className:u,dropdownClassName:l,children:d})=>{const[c,_]=N(!1),h=Oe(null),[g,y]=N(null),b=Zo();he(()=>{if(!c)return;const w=k=>{h.current&&!h.current.contains(k.target)&&_(!1)};return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[c]);const x=n.find(w=>w.value===e),S=()=>s?b.triggerError:i?b.triggerDisabled:b.trigger;return m("div",{ref:h,className:u,style:{position:"relative",...o},children:[m("style",{children:`
|
|
46
46
|
.custom-select-dropdown {
|
|
47
47
|
scrollbar-width: thin;
|
|
48
48
|
scrollbar-color: ${b.scrollbarThumb} ${b.scrollbarTrack};
|
|
49
49
|
}
|
|
50
50
|
.custom-select-dropdown::-webkit-scrollbar {
|
|
51
|
-
width: ${
|
|
51
|
+
width: ${z===f.SMALL?6:8}px;
|
|
52
52
|
}
|
|
53
53
|
.custom-select-dropdown::-webkit-scrollbar-thumb {
|
|
54
54
|
border-radius: 4px;
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
.custom-select-dropdown::-webkit-scrollbar-track {
|
|
58
58
|
background: ${b.scrollbarTrack};
|
|
59
59
|
}
|
|
60
|
-
`}),m("div",{onClick:()=>!i&&_(w=>!w),style:{minHeight:U===f.SMALL?32:40,borderRadius:6,display:"flex",alignItems:"center",padding:U===f.SMALL?"0 10px":"0 12px",fontSize:U===f.SMALL?12:15,cursor:i?"not-allowed":"pointer",boxSizing:"border-box",transition:"border 0.2s",opacity:i?.6:1,width:"100%",...S(),...o},tabIndex:0,children:[m("span",{style:{flex:1},children:x?x.label:m("span",{style:b.placeholder,children:r||"请选择"})}),m("span",{style:{marginLeft:8,display:"flex",alignItems:"center"},children:m("svg",{width:U===f.SMALL?16:20,height:U===f.SMALL?16:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m("path",{d:"M6 8L10 12L14 8",stroke:"#bfbfbf","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})})})]}),c&&!i&&m("div",{className:`custom-select-dropdown${l?" "+l:""}`,style:{position:"absolute",left:0,right:0,top:U===f.SMALL?32:44,zIndex:10,borderRadius:6,boxShadow:b.boxShadow,maxHeight:U===f.SMALL?160:220,overflowY:"auto",...b.dropdown,...a},children:[n.length===0&&m("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:U===f.SMALL?80:120,width:"100%",userSelect:"none"},children:[m("svg",{width:U===f.SMALL?48:64,height:U===f.SMALL?32:41,viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg",children:[m("title",{children:A("暂无数据")}),m("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd",children:[m("ellipse",{fill:"#f5f5f5",cx:"32",cy:"33",rx:"32",ry:"7"}),m("g",{fillRule:"nonzero",stroke:"#d9d9d9",children:[m("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),m("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:"#fafafa"})]})]})]}),m("div",{style:{marginTop:8,color:"#bfbfbf",fontSize:U===f.SMALL?12:15},children:A("暂无数据")})]}),n.map((w,T)=>m("div",{onClick:()=>{w.disabled||(_(!1),t?.(w.value))},onMouseEnter:()=>y(T),onMouseLeave:()=>y(null),style:{padding:U===f.SMALL?"6px 10px":"10px 16px",fontSize:U===f.SMALL?12:15,cursor:w.disabled?"not-allowed":"pointer",fontWeight:e===w.value?600:400,opacity:w.disabled?.6:1,...b.option(e===w.value,!!w.disabled,g===T)},children:w.label},w.value))]}),d]})},C=k("size"),qt={white:{label:{marginBottom:C===f.SMALL?4:8,fontSize:C===f.SMALL?12:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:C===f.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:C===f.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:C===f.SMALL?12:13,marginTop:C===f.SMALL?2:4,textAlign:"left"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:C===f.SMALL?"6px 16px":"8px 24px",fontSize:C===f.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:C===f.SMALL?"6px 16px":"8px 24px",fontSize:C===f.SMALL?12:15,cursor:"pointer",fontWeight:600},feeTip:{marginBottom:24,padding:C===f.SMALL?"8px 10px":"12px 16px",background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:6,fontSize:C===f.SMALL?12:14,color:"#52c41a"}},dark:{label:{marginBottom:C===f.SMALL?6:8,fontSize:C===f.SMALL?12:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:C===f.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:C===f.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:C===f.SMALL?12:13,marginTop:C===f.SMALL?2:4,textAlign:"left"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:C===f.SMALL?"6px 16px":"8px 24px",fontSize:C===f.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:C===f.SMALL?"6px 16px":"8px 24px",fontSize:C===f.SMALL?12:15,cursor:"pointer",fontWeight:600},feeTip:{marginBottom:C===f.SMALL?16:24,padding:C===f.SMALL?"8px 10px":"12px 16px",background:"#1a1a1a",border:"1px solid #333",borderRadius:6,fontSize:C===f.SMALL?12:14,color:"#52c41a"}}};function ei(){const e=k("theme"),t=k("themeConfig"),n=e===j.WHITE,r=n?qt.white:qt.dark;if(t){const o=n?t.white:t.dark;if(o?.color)return{...r,buttonSubmit:{...r.buttonSubmit,background:o.color}}}return r}function ti(e){return e=e.replace(/[^\d.]/g,""),e=e.replace(/\.(?=.*\.)/g,""),e=e.replace(/^(\d+)(\.\d{0,2})?.*$/,"$1$2"),e=e.replace(/^0+(\d)/,"$1"),e.startsWith(".")&&(e="0"+e),e}function ni(e){if(!e)return"";const t=parseFloat(e);return isNaN(t)?"":t.toFixed(2)}const ri=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}"),s=o?.currency||[],i=o?.channel?.filter(_=>_.payment_support)||[],[a,u]=D(""),[l,d]=D(!1),c=ei();return me(()=>{e.currency&&e.amount&&e.rechargeChannel?jo({channel:e.rechargeChannel,amount:e.amount,currency:e.currency}).then(_=>{u(_),d(!0)}).catch(_=>{console.error("计算支付金额失败:",_),d(!1)}):d(!1)},[e.currency,e.amount,e.rechargeChannel]),m(ne,{children:[m("div",{style:{marginBottom:18},children:[m("div",{style:c.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",A("充值币种")]}),m(at,{value:e.currency,onChange:_=>{t(h=>({...h,currency:_}))},options:s?.map(_=>({value:_.value,label:_.label})),placeholder:A("请选择充值币种")})]}),m("div",{style:{marginBottom:18},children:[m("div",{style:c.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",A("充值金额")]}),m("input",{type:"text",placeholder:A("请输入充值金额"),value:e.amount,onInput:_=>{let h=_.target.value;h=ti(h);let g="";if(h&&!h.endsWith(".")){let y=parseFloat(h);if(!isNaN(y)&&(y<1&&(y=1),y>999999.99&&(y=999999.99),h=y.toString(),/\./.test(_.target.value))){const b=_.target.value.split(".")[1];b!==void 0&&b.length>0&&(h=y.toFixed(Math.min(b.length,2)))}}t(y=>({...y,amount:h,amountError:g}))},onBlur:_=>{let h=_.target.value;h=ni(h),t(g=>({...g,amount:h,amountError:""}))},style:{...c.input,...e.amountError?c.inputError:{}}}),e.amountError&&m("div",{style:c.error,children:e.amountError})]}),m("div",{style:{marginBottom:24},children:[m("div",{style:c.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",A("支付平台")]}),m(at,{value:e.rechargeChannel,onChange:_=>{t(h=>({...h,rechargeChannel:_,rechargeChannelError:_?"":h.rechargeChannelError}))},options:i?.map(_=>({value:_.value,label:_.label})),placeholder:A("请选择支付平台")}),e.rechargeChannelError&&m("div",{style:c.error,children:e.rechargeChannelError})]}),l&&a&&m("div",{style:c.feeTip,children:[i.find(_=>_.value===e.rechargeChannel)?.label||e.rechargeChannel,A("需要收取手续费,实际支付金额约为:"),"$",a]}),e.error&&m("div",{style:{color:"#ff4d4f",marginBottom:12},children:e.error}),m("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[m("button",{type:"button",onClick:n,style:c.buttonCancel,children:A("取消")}),m("button",{type:"submit",disabled:r,style:c.buttonSubmit,children:A(r?"提交中...":"去支付")})]})]})},P=k("size"),Jt={white:{container:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:P===f.SMALL?16:24,textAlign:"center",cursor:"pointer",minHeight:P===f.SMALL?80:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:P===f.SMALL?12:15},fileItem:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:P===f.SMALL?"8px 10px":"12px 16px",marginBottom:8,fontSize:P===f.SMALL?12:15,color:"#222",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:P===f.SMALL?"6px 10px":"4px 14px",fontSize:P===f.SMALL?12:15,marginLeft:P===f.SMALL?8:16,cursor:"pointer"}},dark:{container:{border:"1.5px dashed #444C5C",borderRadius:8,background:"#181A20",padding:P===f.SMALL?16:24,textAlign:"center",cursor:"pointer",minHeight:P===f.SMALL?80:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:P===f.SMALL?12:15},fileItem:{display:"flex",alignItems:"center",background:"#23262F",borderRadius:8,padding:P===f.SMALL?"8px 10px":"12px 16px",marginBottom:8,fontSize:P===f.SMALL?12:15,color:"#fff",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:P===f.SMALL?"6px 10px":"4px 14px",fontSize:P===f.SMALL?12:15,marginLeft:P===f.SMALL?8:16,cursor:"pointer"}}};function oi(){return k("theme")===j.WHITE?Jt.white:Jt.dark}const Z=k("size"),ii=({value:e=[],onChange:t,maxCount:n=10,accept:r=".jpg,.jpeg,.png,.pdf",multiple:o=!0,disabled:s=!1})=>{const i=Pe(null),[a,u]=D(!1),[l,d]=D(0),c=oi(),_=async g=>{const y=Array.from(g.target.files).slice(0,n);if(!y.length)return;u(!0);const b=[];for(let x=0;x<y.length;x++){d(0);const S=new FormData;S.append("file",y[x]);try{const w=await Uo(S,T=>d(T));w&&b.push(w)}catch{}}u(!1),d(0),t?.([...e,...b]),i.current&&(i.current.value="")},h=g=>{const y=e.filter((b,x)=>x!==g);t?.(y)};return m("div",{children:[m("div",{style:{...c.container,cursor:s?"not-allowed":c.container.cursor,opacity:s?.6:1},onClick:()=>!s&&i.current?.click(),children:[m("div",{style:{fontSize:Z===f.SMALL?32:48,marginBottom:Z===f.SMALL?8:12},children:"📁"}),m("div",{style:{color:"#222",fontSize:Z===f.SMALL?12:15,marginBottom:Z===f.SMALL?4:8},children:A("点击或拖拽文件到此处上传")}),m("div",{style:{color:"#999",fontSize:Z===f.SMALL?12:13},children:[A("支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传")," ",n," ",A("个文件")]}),m("input",{ref:i,type:"file",multiple:o,accept:r,style:{display:"none"},onChange:_,disabled:s}),a&&m("div",{style:{marginTop:Z===f.SMALL?8:12,color:"#1677ff"},children:[A("正在上传...")," ",l,"%"]})]}),e&&e.length>0&&m("div",{style:{marginTop:Z===f.SMALL?8:12},children:e.map((g,y)=>m("div",{style:c.fileItem,children:[m("div",{style:{display:"flex",alignItems:"center",flex:1},children:m("span",{style:{fontWeight:500,wordBreak:"break-all"},children:g.split("/").pop()})}),m("button",{type:"button",onClick:b=>{b.stopPropagation(),h(y)},style:c.removeBtn,disabled:s,children:A("移除")})]},g))})]})},E=k("size"),Vt={white:{label:{marginBottom:E===f.SMALL?6:8,fontSize:E===f.SMALL?12:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:E===f.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:E===f.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:E===f.SMALL?"8px 10px":"10px 12px",borderRadius:6,border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:E===f.SMALL?12:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},upload:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:E===f.SMALL?12:24,textAlign:"center",cursor:"pointer",minHeight:E===f.SMALL?80:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:E===f.SMALL?12:15},uploadError:{border:"1px dashed #ff4d4f"},fileItem:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:E===f.SMALL?"8px 10px":"12px 16px",marginBottom:E===f.SMALL?6:8,fontSize:E===f.SMALL?12:15,color:"#222",justifyContent:"space-between"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:E===f.SMALL?"6px 18px":"8px 24px",cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:E===f.SMALL?"6px 18px":"8px 24px",cursor:"pointer",fontWeight:600},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:E===f.SMALL?"6px 18px":"4px 14px",fontSize:E===f.SMALL?12:15,marginLeft:E===f.SMALL?8:16,cursor:"pointer"},error:{color:"#ff4d4f",fontSize:E===f.SMALL?12:13,marginTop:E===f.SMALL?2:4,textAlign:"left"}},dark:{label:{marginBottom:E===f.SMALL?4:8,fontSize:E===f.SMALL?12:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:E===f.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:E===f.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:E===f.SMALL?"8px 10px":"10px 12px",borderRadius:6,border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:E===f.SMALL?12:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},upload:{border:"1px dashed #374151",borderRadius:8,background:"#181A20",padding:E===f.SMALL?12:24,textAlign:"center",cursor:"pointer",minHeight:E===f.SMALL?80:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:E===f.SMALL?12:14},uploadError:{border:"1px dashed #ff4d4f"},fileItem:{display:"flex",alignItems:"center",background:"#23262F",borderRadius:8,padding:E===f.SMALL?"8px 10px":"12px 16px",marginBottom:E===f.SMALL?6:8,fontSize:E===f.SMALL?12:15,color:"#fff",justifyContent:"space-between"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:E===f.SMALL?"6px 18px":"8px 24px",fontSize:E===f.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:E===f.SMALL?"6px 18px":"8px 24px",fontSize:E===f.SMALL?12:14,cursor:"pointer",fontWeight:600},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:E===f.SMALL?"6px 18px":"4px 14px",fontSize:E===f.SMALL?12:15,marginLeft:E===f.SMALL?8:16,cursor:"pointer"},error:{color:"#ff4d4f",fontSize:E===f.SMALL?12:13,marginTop:E===f.SMALL?2:4,textAlign:"left"}}};function si(){const e=k("theme"),t=k("themeConfig"),n=e===j.WHITE,r=n?Vt.white:Vt.dark;if(console.log(t,"themeConfig"),t){const o=n?t.white:t.dark;if(o?.color)return{...r,buttonSubmit:{...r.buttonSubmit,background:o.color}}}return r}const ai=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}");console.log(o,"allDicts");const s=o?.channel||[],i=si();return m("form",{onSubmit:async u=>{u.preventDefault();let l=!0;t(d=>({...d,platformError:"",transactionIdError:"",filesError:""})),e.platform||(t(d=>({...d,platformError:A("请选择支付平台")})),l=!1),e.transactionId.trim()||(t(d=>({...d,transactionIdError:A("请输入转账交易ID")})),l=!1),(!e.files||e.files.length===0)&&(t(d=>({...d,filesError:A("请上传转账凭证")})),l=!1),l&&(await Ho({transferChannel:e.platform,transferNo:e.transactionId,voucherUrls:e.files}),n(),st.success(A("离线充值创建成功")))},children:[m("div",{style:{marginBottom:18},children:[m("div",{style:i.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",A("第三方支付平台")]}),m(at,{value:e.platform,onChange:u=>{t(l=>({...l,platform:u,platformError:u?"":l.platformError}))},options:[...s?.map(u=>({value:u.value,label:u.label}))],placeholder:A("请选择支付平台")}),e.platformError&&m("div",{style:i.error,children:e.platformError})]}),m("div",{style:{marginBottom:18},children:[m("div",{style:i.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",A("交易ID")]}),m("input",{type:"text",placeholder:A("请输入转账交易ID"),value:e.transactionId,maxLength:200,onInput:u=>{let l=u.target.value;l.length>200&&(l=l.slice(0,200)),t(d=>({...d,transactionId:l,transactionIdError:l?"":d.transactionIdError}))},style:{...i.input,...e.transactionIdError?i.inputError:{}}}),e.transactionIdError&&m("div",{style:i.error,children:e.transactionIdError})]}),m("div",{style:{marginBottom:24},children:[m("div",{style:i.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",A("上传文件")]}),m(ii,{value:e.files,onChange:u=>t(l=>({...l,files:u,filesError:""})),maxCount:10,accept:".jpg,.jpeg,.png,.pdf",multiple:!0}),e.filesError&&m("div",{style:i.error,children:e.filesError})]}),m("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[m("button",{type:"button",onClick:n,style:i.buttonCancel,children:A("取消")}),m("button",{type:"submit",disabled:r,style:i.buttonSubmit,children:A("确定")})]})]})},I=k("size"),Gt={white:{mask:"rgba(0, 0, 0, 0.45)",modalBg:"#fff",modalColor:"#222",modalBoxShadow:"0 6px 16px rgba(0, 0, 0, 0.12)",closeBtn:{position:"absolute",top:"16px",right:"16px",background:"none",border:"none",fontSize:I===f.SMALL?16:24,cursor:"pointer",color:"#999",padding:"0",width:I===f.SMALL?16:24,height:I===f.SMALL?16:24,display:"flex",alignItems:"center",justifyContent:"center"},title:{fontSize:I===f.SMALL?16:18,fontWeight:"600",marginBottom:I===f.SMALL?16:24,color:"#222"},tabBtn:(e,t)=>({flex:1,padding:I===f.SMALL?"8px 10px":"12px 16px",background:e?"#1890ff":"transparent",color:e?"#fff":"#666",border:"1px solid #d9d9d9",borderRight:t?"none":"1px solid #d9d9d9",cursor:"pointer",fontSize:I===f.SMALL?12:14,fontWeight:e?"600":"400",borderRadius:t?"6px 0 0 6px":"0 6px 6px 0"})},dark:{mask:"rgba(0, 0, 0, 0.65)",modalBg:"#23262F",modalColor:"#F5F6FA",modalBoxShadow:"0 6px 16px rgba(0,0,0,0.32)",closeBtn:{position:"absolute",top:I===f.SMALL?"12px":"16px",right:I===f.SMALL?"12px":"16px",background:"none",border:"none",fontSize:I===f.SMALL?16:24,cursor:"pointer",color:"#B5B8BE",padding:"0",width:I===f.SMALL?16:24,height:I===f.SMALL?16:24,display:"flex",alignItems:"center",justifyContent:"center"},title:{fontSize:I===f.SMALL?16:18,fontWeight:"600",marginBottom:I===f.SMALL?16:24,color:"#F5F6FA"},tabBtn:(e,t)=>({flex:1,padding:I===f.SMALL?"8px 10px":"12px 16px",background:e?"#00E8C6":"transparent",color:e?"#fff":"#B5B8BE",border:"1px solid #444C5C",borderRight:t?"none":"1px solid #444C5C",cursor:"pointer",fontSize:I===f.SMALL?12:14,fontWeight:e?"600":"400",borderRadius:t?"6px 0 0 6px":"0 6px 6px 0"})}};function li(){return k("theme")===j.WHITE?Gt.white:Gt.dark}const we=k("size");function ci({visible:e,onClose:t,title:n,children:r,width:o=we===f.SMALL?300:400,maxWidth:s=we===f.SMALL?300:400,showClose:i=!0,maskClosable:a=!0}){const[u,l]=D(!1),d=li(),c=h=>{h.target===h.currentTarget?l(!0):l(!1)},_=h=>{h.target===h.currentTarget&&u&&a&&t(),l(!1)};return e?m("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:d.mask,display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999},onMouseDown:c,onMouseUp:_,children:m("div",{style:{background:d.modalBg,padding:we===f.SMALL?24:32,borderRadius:we===f.SMALL?8:12,minWidth:o,maxWidth:s,color:d.modalColor,boxShadow:d.modalBoxShadow,position:"relative"},onClick:h=>h.stopPropagation(),children:[i&&m("button",{type:"button",onClick:t,style:d.closeBtn,"aria-label":"关闭",children:"×"}),n&&m("div",{style:d.title,children:n}),r]})}):null}const Le=k("size"),Kt={white:{tabBtn:(e,t)=>({flex:1,background:e?"#fff":"#F7F8FA",color:e?"#1890ff":"#222",border:"none",borderRadius:t?"8px 0 0 8px":"0 8px 8px 0",fontWeight:e?600:400,fontSize:Le===f.SMALL?12:16,height:Le===f.SMALL?32:48,boxShadow:e?"0 2px 8px 0 rgba(20,20,20,0.04)":"none",outline:"none",cursor:"pointer",borderRight:t?"1px solid #F0F1F3":void 0,borderLeft:t?void 0:"1px solid #F0F1F3",transition:"all 0.2s"})},dark:{tabBtn:(e,t)=>({flex:1,background:e?"#23262F":"#181A20",color:e?"#00E8C6":"#fff",border:"none",borderRadius:t?"8px 0 0 8px":"0 8px 8px 0",fontWeight:e?600:400,fontSize:Le===f.SMALL?12:16,height:Le===f.SMALL?32:48,boxShadow:e?"0 2px 8px 0 rgba(20,20,20,0.10)":"none",outline:"none",cursor:"pointer",borderRight:t?"1px solid #23262F":void 0,borderLeft:t?void 0:"1px solid #23262F",transition:"all 0.2s"})}};function ui(){const e=k("theme"),t=k("themeConfig"),n=e===j.WHITE,r=n?Kt.white:Kt.dark;if(t){const o=n?t.white:t.dark;if(o?.color)return{...r,tabBtn:(s,i)=>({...r.tabBtn(s,i),color:s?o.color:r.tabBtn(s,i).color})}}return r}const di=k("size");function fi({visible:e,onClose:t,onSubmit:n}){const[r,o]=D({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),[s,i]=D({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1}),[a,u]=D("online"),l=ui();me(()=>{e||(u("online"),o({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),i({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1}))},[e]);const d=async c=>{c.preventDefault();let _=!0;if(o(h=>({...h,amountError:"",rechargeChannelError:""})),r.amount.trim()||(o(h=>({...h,amountError:A("请输入充值金额")})),_=!1),r.rechargeChannel||(o(h=>({...h,rechargeChannelError:A("请选择支付平台")})),_=!1),!!_){o(h=>({...h,loading:!0,error:""}));try{await n({amount:r.amount,rechargeChannel:r.rechargeChannel,currency:r.currency}),t()}catch{o(h=>({...h,error:A("提交失败,请重试")}))}finally{o(h=>({...h,loading:!1}))}}};return m(ci,{visible:e,onClose:t,title:A("充值 / 转账"),children:[m("div",{style:{display:"flex",marginBottom:di===f.SMALL?16:28},children:[m("button",{type:"button",onClick:()=>u("online"),style:l.tabBtn(a==="online",!0),children:A("在线充值")}),m("button",{type:"button",onClick:()=>u("offline"),style:l.tabBtn(a==="offline",!1),children:A("线下转账")})]}),a==="online"?m("form",{onSubmit:d,children:m(ri,{formState:r,setFormState:o,onClose:t,loading:r.loading})}):m(ai,{formState:s,setFormState:i,onClose:t,loading:s.loading})]})}function _t(){return(_t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var pi=["context","children"];function hi(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(r,o){if(r==null)return{};var s,i,a={},u=Object.keys(r);for(i=0;i<u.length;i++)o.indexOf(s=u[i])>=0||(a[s]=r[s]);return a}(e,pi);return Dn(t,n)}function mi(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=oe(hi,_t({},this._props,{context:e.detail.context}),function t(n,r){if(n.nodeType===3)return n.data;if(n.nodeType!==1)return null;var o=[],s={},i=0,a=n.attributes,u=n.childNodes;for(i=a.length;i--;)a[i].name!=="slot"&&(s[a[i].name]=a[i].value,s[qn(a[i].name)]=a[i].value);for(i=u.length;i--;){var l=t(u[i],null),d=u[i].slot;d?s[d]=oe(Xt,{name:d},l):o[i]=l}var c=r?oe(Xt,null,o):o;return oe(r||n.nodeName.toLowerCase(),s,c)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?Nn:We)(this._vdom,this._root)}function qn(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function _i(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[qn(e)]=n,this._vdom=Dn(this._vdom,r),We(this._vdom,this._root)}}function bi(){We(this._vdom=null,this._root)}function Xt(e,t){var n=this;return oe("slot",_t({},e,{ref:function(r){r?(n.ref=r,n._listener||(n._listener=function(o){o.stopPropagation(),o.detail.context=t},r.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function bt(e,t,n,r){function o(){var s=Reflect.construct(HTMLElement,[],o);return s._vdomComponent=e,s._root=r&&r.shadow?s.attachShadow({mode:r.mode||"open"}):s,s}return(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=mi,o.prototype.attributeChangedCallback=_i,o.prototype.disconnectedCallback=bi,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach(function(s){Object.defineProperty(o.prototype,s,{get:function(){return this._vdom.props[s]},set:function(i){this._vdom?this.attributeChangedCallback(s,null,i):(this._props||(this._props={}),this._props[s]=i,this.connectedCallback());var a=typeof i;i!=null&&a!=="string"&&a!=="boolean"&&a!=="number"||this.setAttribute(s,i)}})}),customElements.define(t||e.tagName||e.displayName||e.name,o)}function gi(){const[e,t]=D(!1),n=async r=>{const o=await $o({amount:r.amount,currency:r.currency,rechargeChannel:r.rechargeChannel});window.open(o,"_blank")};return m("div",{children:[m(Wn,{onClick:()=>t(!0),children:A("充值/转账")}),m(fi,{visible:e,onClose:()=>t(!1),onSubmit:n})]})}bt(gi,"best-recharge",["theme"],{shadow:!1});const Zt={white:{popover:{background:"#fff",color:"#222",boxShadow:"0 4px 16px rgba(0,0,0,0.12)",border:"none"},arrow:{top:"#fff",bottom:"#fff",left:"#fff",right:"#fff"}},dark:{popover:{background:"#23262F",color:"#fff",boxShadow:"0 4px 16px rgba(0,0,0,0.32)",border:"1px solid #444C5C"},arrow:{top:"#23262F",bottom:"#23262F",left:"#23262F",right:"#23262F"}}};function yi(){return k("theme")===j.WHITE?Zt.white:Zt.dark}const xi=({popover:e,children:t,popoverWidth:n=300,popoverMinWidth:r=200,offsetY:o=16,offsetX:s=16,popoverPosition:i="top"})=>{const[a,u]=D(!1),[l,d]=D(i),c=Pe(null),_=Pe(null),h=yi(),g=()=>{if(_.current&&(clearTimeout(_.current),_.current=null),i==="top"||i==="bottom")if(c.current){const S=c.current.getBoundingClientRect();i==="top"&&S.top<100?d("bottom"):i==="bottom"&&window.innerHeight-S.bottom<100?d("top"):d(i)}else d(i);else d(i);u(!0)},y=()=>{_.current=window.setTimeout(()=>{u(!1)},120)};let b={position:"absolute",zIndex:999,borderRadius:6,fontSize:15,minWidth:r,width:n,padding:"8px 14px",pointerEvents:"auto",textAlign:"center",animation:"fadeInUp 0.3s",...h.popover},x={position:"absolute",zIndex:11,width:0,height:0};return l==="top"?(b={...b,left:"50%",top:-48,transform:"translateX(-50%)"},x={...x,left:"50%",bottom:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderTop:`8px solid ${h.arrow.top}`}):l==="bottom"?(b={...b,left:"50%",top:"100%",marginTop:o,transform:"translateX(-50%)"},x={...x,left:"50%",top:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderBottom:`8px solid ${h.arrow.bottom}`}):l==="leftTop"?(b={...b,right:"100%",top:0,marginRight:s,transform:"none"},x={...x,right:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderLeft:`8px solid ${h.arrow.left}`}):l==="rightTop"&&(b={...b,left:"100%",top:0,marginLeft:s,transform:"translateY(0)"},x={...x,left:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderRight:`8px solid ${h.arrow.right}`}),m("div",{ref:c,style:{position:"relative",display:"inline-block"},onMouseEnter:g,onMouseLeave:y,children:[t,a&&m("div",{style:b,onMouseEnter:g,onMouseLeave:y,children:[e,m("div",{style:x})]})]})},R=k("size"),Qt={white:{popoverTitle:{fontSize:R===f.SMALL?12:16,fontWeight:600,color:"#222",marginBottom:R===f.SMALL?12:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:R===f.SMALL?"6px 0":"8px 0",borderBottom:"1px solid #e5e7eb",fontSize:R===f.SMALL?12:15},detailLabel:{display:"flex",alignItems:"center",color:"#6b7280",fontWeight:500},detailDot:e=>({display:"inline-block",width:R===f.SMALL?6:8,height:R===f.SMALL?6:8,borderRadius:"50%",background:e,marginRight:R===f.SMALL?6:8}),detailValue:e=>({color:e,fontWeight:600,fontSize:R===f.SMALL?12:15}),main:{fontSize:R===f.SMALL?18:24,fontWeight:800,color:"#111827",display:"inline-block"},currency:{fontSize:R===f.SMALL?16:18,color:"#6b7280",marginLeft:R===f.SMALL?6:8,fontWeight:600}},dark:{popoverTitle:{fontSize:R===f.SMALL?14:16,fontWeight:600,color:"#fff",marginBottom:R===f.SMALL?14:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:R===f.SMALL?"6px 0":"8px 0",borderBottom:"1px solid #374151",fontSize:R===f.SMALL?12:15},detailLabel:{display:"flex",alignItems:"center",color:"#B5B8BE",fontWeight:500},detailDot:e=>({display:"inline-block",width:R===f.SMALL?6:8,height:R===f.SMALL?6:8,borderRadius:"50%",background:e,marginRight:R===f.SMALL?6:8}),detailValue:e=>({color:e,fontWeight:600,fontSize:R===f.SMALL?12:15}),main:{fontSize:R===f.SMALL?18:24,fontWeight:800,color:"#fff",display:"inline-block"},currency:{fontSize:R===f.SMALL?16:18,color:"#B5B8BE",marginLeft:R===f.SMALL?6:8,fontWeight:600}}};function Si(){return k("theme")===j.WHITE?Qt.white:Qt.dark}function Yt(e){return e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}function wi(e){const[t,n]=D({available:0,currency:"USD",symbol:"$",details:[]}),r=async()=>{try{const i=await $n(),a=[{label:"",value:i.totalAmount,color:"#15b36b",dot:"#15b36b"},{label:"",value:i.frozenAmount,color:"#f59e0b",dot:"#f59e0b"},...i.isCredit?[{label:"",value:i.creditLimit,color:"#1890ff",dot:"#1890ff"},{label:"",value:i.creditUsed,color:"#ff0000",dot:"#ff0000"}]:[],{label:"",value:i.availableAmount,color:"#1890ff",dot:"#15b36b"}],u={available:i.availableAmount,currency:"USD",symbol:"$",details:a};n(u)}catch(i){console.error("获取余额失败:",i)}};me(()=>{r()},[]),me(()=>{const i=()=>{r()};return document.addEventListener("refresh-balance",i),()=>{document.removeEventListener("refresh-balance",i)}},[]);const o=Si(),s=[{label:A("真实金额"),value:t.details[0]?.value||0,color:"#15b36b",dot:"#15b36b"},{label:A("冻结金额"),value:t.details[1]?.value||0,color:"#f59e0b",dot:"#f59e0b"},...t.details.length>4?[{label:A("信用额度"),value:t.details[2]?.value||0,color:"#1890ff",dot:"#1890ff"},{label:A("已用额度"),value:t.details[3]?.value||0,color:"#ff0000",dot:"#ff0000"}]:[],{label:A("可用余额"),value:t.details[t.details.length-1]?.value||0,color:"#1890ff",dot:"#15b36b"}];return m(xi,{popover:m(ne,{children:[m("div",{style:o.popoverTitle,children:A("余额详情")}),s.map(i=>m("div",{style:o.detailRow,children:[m("span",{style:o.detailLabel,children:[m("span",{style:o.detailDot(i.dot)}),i.label]}),m("span",{style:o.detailValue(i.color),children:[t.symbol,Yt(i.value)]})]},i.label))]}),popoverPosition:e.popoverPosition||"bottom",children:m("div",{style:o.main,children:[t.symbol,Yt(t.available),m("span",{style:o.currency,children:t.currency})]})})}bt(wi,"best-statistical-balance");const Ae={white:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,cursor:"pointer",fontWeight:600,transition:"all 0.2s ease"},dark:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,cursor:"pointer",fontWeight:600,transition:"all 0.2s ease"}};function Li(e){return k("theme")===j.WHITE?{...Ae.white,background:e||Ae.white.background}:{...Ae.dark,background:e||Ae.dark.background}}function Ai(e){switch(e){case"small":return{fontSize:"12px",gap:"2px"};case"large":return{fontSize:"18px",gap:"6px"};default:return{fontSize:"14px",gap:"4px"}}}function Ei({color:e,size:t="medium",children:n}){const[r,o]=D(!1),s=Li(e),i=Ai(t),a={...s,...i,display:"flex",alignItems:"center"};return m(ne,{children:[m("style",{children:`
|
|
60
|
+
`}),m("div",{onClick:()=>!i&&_(w=>!w),style:{minHeight:z===f.SMALL?32:40,borderRadius:6,display:"flex",alignItems:"center",padding:z===f.SMALL?"0 10px":"0 12px",fontSize:z===f.SMALL?12:15,cursor:i?"not-allowed":"pointer",boxSizing:"border-box",transition:"border 0.2s",opacity:i?.6:1,width:"100%",...S(),...o},tabIndex:0,children:[m("span",{style:{flex:1},children:x?x.label:m("span",{style:b.placeholder,children:r||"请选择"})}),m("span",{style:{marginLeft:8,display:"flex",alignItems:"center"},children:m("svg",{width:z===f.SMALL?16:20,height:z===f.SMALL?16:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m("path",{d:"M6 8L10 12L14 8",stroke:"#bfbfbf","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})})})]}),c&&!i&&m("div",{className:`custom-select-dropdown${l?" "+l:""}`,style:{position:"absolute",left:0,right:0,top:z===f.SMALL?32:44,zIndex:10,borderRadius:6,boxShadow:b.boxShadow,maxHeight:z===f.SMALL?160:220,overflowY:"auto",...b.dropdown,...a},children:[n.length===0&&m("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:z===f.SMALL?80:120,width:"100%",userSelect:"none"},children:[m("svg",{width:z===f.SMALL?48:64,height:z===f.SMALL?32:41,viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg",children:[m("title",{children:A("暂无数据")}),m("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd",children:[m("ellipse",{fill:"#f5f5f5",cx:"32",cy:"33",rx:"32",ry:"7"}),m("g",{fillRule:"nonzero",stroke:"#d9d9d9",children:[m("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),m("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:"#fafafa"})]})]})]}),m("div",{style:{marginTop:8,color:"#bfbfbf",fontSize:z===f.SMALL?12:15},children:A("暂无数据")})]}),n.map((w,k)=>m("div",{onClick:()=>{w.disabled||(_(!1),t?.(w.value))},onMouseEnter:()=>y(k),onMouseLeave:()=>y(null),style:{padding:z===f.SMALL?"6px 10px":"10px 16px",fontSize:z===f.SMALL?12:15,cursor:w.disabled?"not-allowed":"pointer",fontWeight:e===w.value?600:400,opacity:w.disabled?.6:1,...b.option(e===w.value,!!w.disabled,g===k)},children:w.label},w.value))]}),d]})},T=v("size"),Wt={white:{label:{marginBottom:T===f.SMALL?4:8,fontSize:T===f.SMALL?12:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:T===f.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:T===f.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:T===f.SMALL?12:13,marginTop:T===f.SMALL?2:4,textAlign:"left"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:T===f.SMALL?"6px 16px":"8px 24px",fontSize:T===f.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:T===f.SMALL?"6px 16px":"8px 24px",fontSize:T===f.SMALL?12:15,cursor:"pointer",fontWeight:600},feeTip:{marginBottom:24,padding:T===f.SMALL?"8px 10px":"12px 16px",background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:6,fontSize:T===f.SMALL?12:14,color:"#52c41a"}},dark:{label:{marginBottom:T===f.SMALL?6:8,fontSize:T===f.SMALL?12:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:T===f.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:T===f.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:T===f.SMALL?12:13,marginTop:T===f.SMALL?2:4,textAlign:"left"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:T===f.SMALL?"6px 16px":"8px 24px",fontSize:T===f.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:T===f.SMALL?"6px 16px":"8px 24px",fontSize:T===f.SMALL?12:15,cursor:"pointer",fontWeight:600},feeTip:{marginBottom:T===f.SMALL?16:24,padding:T===f.SMALL?"8px 10px":"12px 16px",background:"#1a1a1a",border:"1px solid #333",borderRadius:6,fontSize:T===f.SMALL?12:14,color:"#52c41a"}}};function Qo(){const e=v("theme"),t=v("themeConfig"),n=e===$.WHITE,r=n?Wt.white:Wt.dark;if(t){const o=n?t.white:t.dark;if(o?.color)return{...r,buttonSubmit:{...r.buttonSubmit,background:o.color}}}return r}function Yo(e){return e=e.replace(/[^\d.]/g,""),e=e.replace(/\.(?=.*\.)/g,""),e=e.replace(/^(\d+)(\.\d{0,2})?.*$/,"$1$2"),e=e.replace(/^0+(\d)/,"$1"),e.startsWith(".")&&(e="0"+e),e}function ei(e){if(!e)return"";const t=parseFloat(e);return isNaN(t)?"":t.toFixed(2)}const ti=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}"),s=o?.currency||[],i=o?.channel?.filter(_=>_.payment_support)||[],[a,u]=N(""),[l,d]=N(!1),c=Qo();return he(()=>{e.currency&&e.amount&&e.rechargeChannel?Ho({channel:e.rechargeChannel,amount:e.amount,currency:e.currency}).then(_=>{u(_),d(!0)}).catch(_=>{console.error("计算支付金额失败:",_),d(!1)}):d(!1)},[e.currency,e.amount,e.rechargeChannel]),m(te,{children:[m("div",{style:{marginBottom:18},children:[m("div",{style:c.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",A("充值币种")]}),m(st,{value:e.currency,onChange:_=>{t(h=>({...h,currency:_}))},options:s?.map(_=>({value:_.value,label:_.label})),placeholder:A("请选择充值币种")})]}),m("div",{style:{marginBottom:18},children:[m("div",{style:c.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",A("充值金额")]}),m("input",{type:"text",placeholder:A("请输入充值金额"),value:e.amount,onInput:_=>{let h=_.target.value;h=Yo(h);let g="";if(h&&!h.endsWith(".")){let y=parseFloat(h);if(!isNaN(y)&&(y<1&&(y=1),y>999999.99&&(y=999999.99),h=y.toString(),/\./.test(_.target.value))){const b=_.target.value.split(".")[1];b!==void 0&&b.length>0&&(h=y.toFixed(Math.min(b.length,2)))}}t(y=>({...y,amount:h,amountError:g}))},onBlur:_=>{let h=_.target.value;h=ei(h),t(g=>({...g,amount:h,amountError:""}))},style:{...c.input,...e.amountError?c.inputError:{}}}),e.amountError&&m("div",{style:c.error,children:e.amountError})]}),m("div",{style:{marginBottom:24},children:[m("div",{style:c.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",A("支付平台")]}),m(st,{value:e.rechargeChannel,onChange:_=>{t(h=>({...h,rechargeChannel:_,rechargeChannelError:_?"":h.rechargeChannelError}))},options:i?.map(_=>({value:_.value,label:_.label})),placeholder:A("请选择支付平台")}),e.rechargeChannelError&&m("div",{style:c.error,children:e.rechargeChannelError})]}),l&&a&&m("div",{style:c.feeTip,children:[i.find(_=>_.value===e.rechargeChannel)?.label||e.rechargeChannel,A("需要收取手续费,实际支付金额约为:"),"$",a]}),e.error&&m("div",{style:{color:"#ff4d4f",marginBottom:12},children:e.error}),m("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[m("button",{type:"button",onClick:n,style:c.buttonCancel,children:A("取消")}),m("button",{type:"submit",disabled:r,style:c.buttonSubmit,children:A(r?"提交中...":"去支付")})]})]})},O=v("size"),qt={white:{container:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:O===f.SMALL?16:24,textAlign:"center",cursor:"pointer",minHeight:O===f.SMALL?80:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:O===f.SMALL?12:15},fileItem:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:O===f.SMALL?"8px 10px":"12px 16px",marginBottom:8,fontSize:O===f.SMALL?12:15,color:"#222",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:O===f.SMALL?"6px 10px":"4px 14px",fontSize:O===f.SMALL?12:15,marginLeft:O===f.SMALL?8:16,cursor:"pointer"}},dark:{container:{border:"1.5px dashed #444C5C",borderRadius:8,background:"#181A20",padding:O===f.SMALL?16:24,textAlign:"center",cursor:"pointer",minHeight:O===f.SMALL?80:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:O===f.SMALL?12:15},fileItem:{display:"flex",alignItems:"center",background:"#23262F",borderRadius:8,padding:O===f.SMALL?"8px 10px":"12px 16px",marginBottom:8,fontSize:O===f.SMALL?12:15,color:"#fff",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:O===f.SMALL?"6px 10px":"4px 14px",fontSize:O===f.SMALL?12:15,marginLeft:O===f.SMALL?8:16,cursor:"pointer"}}};function ni(){return v("theme")===$.WHITE?qt.white:qt.dark}const X=v("size"),ri=({value:e=[],onChange:t,maxCount:n=10,accept:r=".jpg,.jpeg,.png,.pdf",multiple:o=!0,disabled:s=!1})=>{const i=Oe(null),[a,u]=N(!1),[l,d]=N(0),c=ni(),_=async g=>{const y=Array.from(g.target.files).slice(0,n);if(!y.length)return;u(!0);const b=[];for(let x=0;x<y.length;x++){d(0);const S=new FormData;S.append("file",y[x]);try{const w=await Do(S,k=>d(k));w&&b.push(w)}catch{}}u(!1),d(0),t?.([...e,...b]),i.current&&(i.current.value="")},h=g=>{const y=e.filter((b,x)=>x!==g);t?.(y)};return m("div",{children:[m("div",{style:{...c.container,cursor:s?"not-allowed":c.container.cursor,opacity:s?.6:1},onClick:()=>!s&&i.current?.click(),children:[m("div",{style:{fontSize:X===f.SMALL?32:48,marginBottom:X===f.SMALL?8:12},children:"📁"}),m("div",{style:{color:"#222",fontSize:X===f.SMALL?12:15,marginBottom:X===f.SMALL?4:8},children:A("点击或拖拽文件到此处上传")}),m("div",{style:{color:"#999",fontSize:X===f.SMALL?12:13},children:[A("支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传")," ",n," ",A("个文件")]}),m("input",{ref:i,type:"file",multiple:o,accept:r,style:{display:"none"},onChange:_,disabled:s}),a&&m("div",{style:{marginTop:X===f.SMALL?8:12,color:"#1677ff"},children:[A("正在上传...")," ",l,"%"]})]}),e&&e.length>0&&m("div",{style:{marginTop:X===f.SMALL?8:12},children:e.map((g,y)=>m("div",{style:c.fileItem,children:[m("div",{style:{display:"flex",alignItems:"center",flex:1},children:m("span",{style:{fontWeight:500,wordBreak:"break-all"},children:g.split("/").pop()})}),m("button",{type:"button",onClick:b=>{b.stopPropagation(),h(y)},style:c.removeBtn,disabled:s,children:A("移除")})]},g))})]})};function oi(){const e=v("size");return{white:{label:{marginBottom:e===f.SMALL?6:8,fontSize:e===f.SMALL?12:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:e===f.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:e===f.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:e===f.SMALL?"8px 10px":"10px 12px",borderRadius:6,border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:e===f.SMALL?12:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},upload:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:e===f.SMALL?12:24,textAlign:"center",cursor:"pointer",minHeight:e===f.SMALL?80:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===f.SMALL?12:15},uploadError:{border:"1px dashed #ff4d4f"},fileItem:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:e===f.SMALL?"8px 10px":"12px 16px",marginBottom:e===f.SMALL?6:8,fontSize:e===f.SMALL?12:15,color:"#222",justifyContent:"space-between"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:e===f.SMALL?"6px 18px":"8px 24px",cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===f.SMALL?"6px 18px":"8px 24px",cursor:"pointer",fontWeight:600},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===f.SMALL?"6px 18px":"4px 14px",fontSize:e===f.SMALL?12:15,marginLeft:e===f.SMALL?8:16,cursor:"pointer"},error:{color:"#ff4d4f",fontSize:e===f.SMALL?12:13,marginTop:e===f.SMALL?2:4,textAlign:"left"}},dark:{label:{marginBottom:e===f.SMALL?4:8,fontSize:e===f.SMALL?12:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:e===f.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:e===f.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:e===f.SMALL?"8px 10px":"10px 12px",borderRadius:6,border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:e===f.SMALL?12:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},upload:{border:"1px dashed #374151",borderRadius:8,background:"#181A20",padding:e===f.SMALL?12:24,textAlign:"center",cursor:"pointer",minHeight:e===f.SMALL?80:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===f.SMALL?12:14},uploadError:{border:"1px dashed #ff4d4f"},fileItem:{display:"flex",alignItems:"center",background:"#23262F",borderRadius:8,padding:e===f.SMALL?"8px 10px":"12px 16px",marginBottom:e===f.SMALL?6:8,fontSize:e===f.SMALL?12:15,color:"#fff",justifyContent:"space-between"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:e===f.SMALL?"6px 18px":"8px 24px",fontSize:e===f.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:e===f.SMALL?"6px 18px":"8px 24px",fontSize:e===f.SMALL?12:14,cursor:"pointer",fontWeight:600},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===f.SMALL?"6px 18px":"4px 14px",fontSize:e===f.SMALL?12:15,marginLeft:e===f.SMALL?8:16,cursor:"pointer"},error:{color:"#ff4d4f",fontSize:e===f.SMALL?12:13,marginTop:e===f.SMALL?2:4,textAlign:"left"}}}}function ii(){const e=v("theme"),t=v("themeConfig"),n=e===$.WHITE,r=oi(),o=n?r.white:r.dark;if(console.log(t,"themeConfig"),t){const s=n?t.white:t.dark;if(s?.color)return{...o,buttonSubmit:{...o.buttonSubmit,background:s.color}}}return o}const si=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}");console.log(o,"allDicts");const s=o?.channel||[],i=ii();return m("form",{onSubmit:async u=>{u.preventDefault();let l=!0;t(d=>({...d,platformError:"",transactionIdError:"",filesError:""})),e.platform||(t(d=>({...d,platformError:A("请选择支付平台")})),l=!1),e.transactionId.trim()||(t(d=>({...d,transactionIdError:A("请输入转账交易ID")})),l=!1),(!e.files||e.files.length===0)&&(t(d=>({...d,filesError:A("请上传转账凭证")})),l=!1),l&&(await zo({transferChannel:e.platform,transferNo:e.transactionId,voucherUrls:e.files}),n(),it.success(A("离线充值创建成功")))},children:[m("div",{style:{marginBottom:18},children:[m("div",{style:i.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",A("第三方支付平台")]}),m(st,{value:e.platform,onChange:u=>{t(l=>({...l,platform:u,platformError:u?"":l.platformError}))},options:[...s?.map(u=>({value:u.value,label:u.label}))],placeholder:A("请选择支付平台")}),e.platformError&&m("div",{style:i.error,children:e.platformError})]}),m("div",{style:{marginBottom:18},children:[m("div",{style:i.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",A("交易ID")]}),m("input",{type:"text",placeholder:A("请输入转账交易ID"),value:e.transactionId,maxLength:200,onInput:u=>{let l=u.target.value;l.length>200&&(l=l.slice(0,200)),t(d=>({...d,transactionId:l,transactionIdError:l?"":d.transactionIdError}))},style:{...i.input,...e.transactionIdError?i.inputError:{}}}),e.transactionIdError&&m("div",{style:i.error,children:e.transactionIdError})]}),m("div",{style:{marginBottom:24},children:[m("div",{style:i.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",A("上传文件")]}),m(ri,{value:e.files,onChange:u=>t(l=>({...l,files:u,filesError:""})),maxCount:10,accept:".jpg,.jpeg,.png,.pdf",multiple:!0}),e.filesError&&m("div",{style:i.error,children:e.filesError})]}),m("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[m("button",{type:"button",onClick:n,style:i.buttonCancel,children:A("取消")}),m("button",{type:"submit",disabled:r,style:i.buttonSubmit,children:A("确定")})]})]})},P=v("size"),Jt={white:{mask:"rgba(0, 0, 0, 0.45)",modalBg:"#fff",modalColor:"#222",modalBoxShadow:"0 6px 16px rgba(0, 0, 0, 0.12)",closeBtn:{position:"absolute",top:"16px",right:"16px",background:"none",border:"none",fontSize:P===f.SMALL?16:24,cursor:"pointer",color:"#999",padding:"0",width:P===f.SMALL?16:24,height:P===f.SMALL?16:24,display:"flex",alignItems:"center",justifyContent:"center"},title:{fontSize:P===f.SMALL?16:18,fontWeight:"600",marginBottom:P===f.SMALL?16:24,color:"#222"},tabBtn:(e,t)=>({flex:1,padding:P===f.SMALL?"8px 10px":"12px 16px",background:e?"#1890ff":"transparent",color:e?"#fff":"#666",border:"1px solid #d9d9d9",borderRight:t?"none":"1px solid #d9d9d9",cursor:"pointer",fontSize:P===f.SMALL?12:14,fontWeight:e?"600":"400",borderRadius:t?"6px 0 0 6px":"0 6px 6px 0"})},dark:{mask:"rgba(0, 0, 0, 0.65)",modalBg:"#23262F",modalColor:"#F5F6FA",modalBoxShadow:"0 6px 16px rgba(0,0,0,0.32)",closeBtn:{position:"absolute",top:P===f.SMALL?"12px":"16px",right:P===f.SMALL?"12px":"16px",background:"none",border:"none",fontSize:P===f.SMALL?16:24,cursor:"pointer",color:"#B5B8BE",padding:"0",width:P===f.SMALL?16:24,height:P===f.SMALL?16:24,display:"flex",alignItems:"center",justifyContent:"center"},title:{fontSize:P===f.SMALL?16:18,fontWeight:"600",marginBottom:P===f.SMALL?16:24,color:"#F5F6FA"},tabBtn:(e,t)=>({flex:1,padding:P===f.SMALL?"8px 10px":"12px 16px",background:e?"#00E8C6":"transparent",color:e?"#fff":"#B5B8BE",border:"1px solid #444C5C",borderRight:t?"none":"1px solid #444C5C",cursor:"pointer",fontSize:P===f.SMALL?12:14,fontWeight:e?"600":"400",borderRadius:t?"6px 0 0 6px":"0 6px 6px 0"})}};function ai(){return v("theme")===$.WHITE?Jt.white:Jt.dark}const Se=v("size");function li({visible:e,onClose:t,title:n,children:r,width:o=Se===f.SMALL?300:400,maxWidth:s=Se===f.SMALL?300:400,showClose:i=!0,maskClosable:a=!0}){const[u,l]=N(!1),d=ai(),c=h=>{h.target===h.currentTarget?l(!0):l(!1)},_=h=>{h.target===h.currentTarget&&u&&a&&t(),l(!1)};return e?m("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:d.mask,display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999},onMouseDown:c,onMouseUp:_,children:m("div",{style:{background:d.modalBg,padding:Se===f.SMALL?24:32,borderRadius:Se===f.SMALL?8:12,minWidth:o,maxWidth:s,color:d.modalColor,boxShadow:d.modalBoxShadow,position:"relative"},onClick:h=>h.stopPropagation(),children:[i&&m("button",{type:"button",onClick:t,style:d.closeBtn,"aria-label":"关闭",children:"×"}),n&&m("div",{style:d.title,children:n}),r]})}):null}const we=v("size"),Vt={white:{tabBtn:(e,t)=>({flex:1,background:e?"#fff":"#F7F8FA",color:e?"#1890ff":"#222",border:"none",borderRadius:t?"8px 0 0 8px":"0 8px 8px 0",fontWeight:e?600:400,fontSize:we===f.SMALL?12:16,height:we===f.SMALL?32:48,boxShadow:e?"0 2px 8px 0 rgba(20,20,20,0.04)":"none",outline:"none",cursor:"pointer",borderRight:t?"1px solid #F0F1F3":void 0,borderLeft:t?void 0:"1px solid #F0F1F3",transition:"all 0.2s"})},dark:{tabBtn:(e,t)=>({flex:1,background:e?"#23262F":"#181A20",color:e?"#00E8C6":"#fff",border:"none",borderRadius:t?"8px 0 0 8px":"0 8px 8px 0",fontWeight:e?600:400,fontSize:we===f.SMALL?12:16,height:we===f.SMALL?32:48,boxShadow:e?"0 2px 8px 0 rgba(20,20,20,0.10)":"none",outline:"none",cursor:"pointer",borderRight:t?"1px solid #23262F":void 0,borderLeft:t?void 0:"1px solid #23262F",transition:"all 0.2s"})}};function ci(){const e=v("theme"),t=v("themeConfig"),n=e===$.WHITE,r=n?Vt.white:Vt.dark;if(t){const o=n?t.white:t.dark;if(o?.color)return{...r,tabBtn:(s,i)=>({...r.tabBtn(s,i),color:s?o.color:r.tabBtn(s,i).color})}}return r}const ui=v("size");function di({visible:e,onClose:t,onSubmit:n}){const[r,o]=N({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),[s,i]=N({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1}),[a,u]=N("online"),l=ci();he(()=>{e||(u("online"),o({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),i({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1}))},[e]);const d=async c=>{c.preventDefault();let _=!0;if(o(h=>({...h,amountError:"",rechargeChannelError:""})),r.amount.trim()||(o(h=>({...h,amountError:A("请输入充值金额")})),_=!1),r.rechargeChannel||(o(h=>({...h,rechargeChannelError:A("请选择支付平台")})),_=!1),!!_){o(h=>({...h,loading:!0,error:""}));try{await n({amount:r.amount,rechargeChannel:r.rechargeChannel,currency:r.currency}),t()}catch{o(h=>({...h,error:A("提交失败,请重试")}))}finally{o(h=>({...h,loading:!1}))}}};return m(li,{visible:e,onClose:t,title:A("充值 / 转账"),children:[m("div",{style:{display:"flex",marginBottom:ui===f.SMALL?16:28},children:[m("button",{type:"button",onClick:()=>u("online"),style:l.tabBtn(a==="online",!0),children:A("在线充值")}),m("button",{type:"button",onClick:()=>u("offline"),style:l.tabBtn(a==="offline",!1),children:A("线下转账")})]}),a==="online"?m("form",{onSubmit:d,children:m(ti,{formState:r,setFormState:o,onClose:t,loading:r.loading})}):m(si,{formState:s,setFormState:i,onClose:t,loading:s.loading})]})}function mt(){return(mt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var fi=["context","children"];function pi(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(r,o){if(r==null)return{};var s,i,a={},u=Object.keys(r);for(i=0;i<u.length;i++)o.indexOf(s=u[i])>=0||(a[s]=r[s]);return a}(e,fi);return In(t,n)}function hi(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=re(pi,mt({},this._props,{context:e.detail.context}),function t(n,r){if(n.nodeType===3)return n.data;if(n.nodeType!==1)return null;var o=[],s={},i=0,a=n.attributes,u=n.childNodes;for(i=a.length;i--;)a[i].name!=="slot"&&(s[a[i].name]=a[i].value,s[jn(a[i].name)]=a[i].value);for(i=u.length;i--;){var l=t(u[i],null),d=u[i].slot;d?s[d]=re(Gt,{name:d},l):o[i]=l}var c=r?re(Gt,null,o):o;return re(r||n.nodeName.toLowerCase(),s,c)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?Pn:je)(this._vdom,this._root)}function jn(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function mi(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[jn(e)]=n,this._vdom=In(this._vdom,r),je(this._vdom,this._root)}}function _i(){je(this._vdom=null,this._root)}function Gt(e,t){var n=this;return re("slot",mt({},e,{ref:function(r){r?(n.ref=r,n._listener||(n._listener=function(o){o.stopPropagation(),o.detail.context=t},r.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function _t(e,t,n,r){function o(){var s=Reflect.construct(HTMLElement,[],o);return s._vdomComponent=e,s._root=r&&r.shadow?s.attachShadow({mode:r.mode||"open"}):s,s}return(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=hi,o.prototype.attributeChangedCallback=mi,o.prototype.disconnectedCallback=_i,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach(function(s){Object.defineProperty(o.prototype,s,{get:function(){return this._vdom.props[s]},set:function(i){this._vdom?this.attributeChangedCallback(s,null,i):(this._props||(this._props={}),this._props[s]=i,this.connectedCallback());var a=typeof i;i!=null&&a!=="string"&&a!=="boolean"&&a!=="number"||this.setAttribute(s,i)}})}),customElements.define(t||e.tagName||e.displayName||e.name,o)}function bi(){const[e,t]=N(!1),n=async r=>{const o=await Uo({amount:r.amount,currency:r.currency,rechargeChannel:r.rechargeChannel});window.open(o,"_blank")};return m("div",{children:[m($n,{onClick:()=>t(!0),children:A("充值/转账")}),m(di,{visible:e,onClose:()=>t(!1),onSubmit:n})]})}_t(bi,"best-recharge",["theme"],{shadow:!1});const Kt={white:{popover:{background:"#fff",color:"#222",boxShadow:"0 4px 16px rgba(0,0,0,0.12)",border:"none"},arrow:{top:"#fff",bottom:"#fff",left:"#fff",right:"#fff"}},dark:{popover:{background:"#23262F",color:"#fff",boxShadow:"0 4px 16px rgba(0,0,0,0.32)",border:"1px solid #444C5C"},arrow:{top:"#23262F",bottom:"#23262F",left:"#23262F",right:"#23262F"}}};function gi(){return v("theme")===$.WHITE?Kt.white:Kt.dark}const yi=({popover:e,children:t,popoverWidth:n=300,popoverMinWidth:r=200,offsetY:o=16,offsetX:s=16,popoverPosition:i="top"})=>{const[a,u]=N(!1),[l,d]=N(i),c=Oe(null),_=Oe(null),h=gi(),g=()=>{if(_.current&&(clearTimeout(_.current),_.current=null),i==="top"||i==="bottom")if(c.current){const S=c.current.getBoundingClientRect();i==="top"&&S.top<100?d("bottom"):i==="bottom"&&window.innerHeight-S.bottom<100?d("top"):d(i)}else d(i);else d(i);u(!0)},y=()=>{_.current=window.setTimeout(()=>{u(!1)},120)};let b={position:"absolute",zIndex:999,borderRadius:6,fontSize:15,minWidth:r,width:n,padding:"8px 14px",pointerEvents:"auto",textAlign:"center",animation:"fadeInUp 0.3s",...h.popover},x={position:"absolute",zIndex:11,width:0,height:0};return l==="top"?(b={...b,left:"50%",top:-48,transform:"translateX(-50%)"},x={...x,left:"50%",bottom:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderTop:`8px solid ${h.arrow.top}`}):l==="bottom"?(b={...b,left:"50%",top:"100%",marginTop:o,transform:"translateX(-50%)"},x={...x,left:"50%",top:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderBottom:`8px solid ${h.arrow.bottom}`}):l==="leftTop"?(b={...b,right:"100%",top:0,marginRight:s,transform:"none"},x={...x,right:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderLeft:`8px solid ${h.arrow.left}`}):l==="rightTop"&&(b={...b,left:"100%",top:0,marginLeft:s,transform:"translateY(0)"},x={...x,left:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderRight:`8px solid ${h.arrow.right}`}),m("div",{ref:c,style:{position:"relative",display:"inline-block"},onMouseEnter:g,onMouseLeave:y,children:[t,a&&m("div",{style:b,onMouseEnter:g,onMouseLeave:y,children:[e,m("div",{style:x})]})]})},C=v("size"),Xt={white:{popoverTitle:{fontSize:C===f.SMALL?12:16,fontWeight:600,color:"#222",marginBottom:C===f.SMALL?12:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:C===f.SMALL?"6px 0":"8px 0",borderBottom:"1px solid #e5e7eb",fontSize:C===f.SMALL?12:15},detailLabel:{display:"flex",alignItems:"center",color:"#6b7280",fontWeight:500},detailDot:e=>({display:"inline-block",width:C===f.SMALL?6:8,height:C===f.SMALL?6:8,borderRadius:"50%",background:e,marginRight:C===f.SMALL?6:8}),detailValue:e=>({color:e,fontWeight:600,fontSize:C===f.SMALL?12:15}),main:{fontSize:C===f.SMALL?18:24,fontWeight:800,color:"#111827",display:"inline-block"},currency:{fontSize:C===f.SMALL?16:18,color:"#6b7280",marginLeft:C===f.SMALL?6:8,fontWeight:600}},dark:{popoverTitle:{fontSize:C===f.SMALL?14:16,fontWeight:600,color:"#fff",marginBottom:C===f.SMALL?14:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:C===f.SMALL?"6px 0":"8px 0",borderBottom:"1px solid #374151",fontSize:C===f.SMALL?12:15},detailLabel:{display:"flex",alignItems:"center",color:"#B5B8BE",fontWeight:500},detailDot:e=>({display:"inline-block",width:C===f.SMALL?6:8,height:C===f.SMALL?6:8,borderRadius:"50%",background:e,marginRight:C===f.SMALL?6:8}),detailValue:e=>({color:e,fontWeight:600,fontSize:C===f.SMALL?12:15}),main:{fontSize:C===f.SMALL?18:24,fontWeight:800,color:"#fff",display:"inline-block"},currency:{fontSize:C===f.SMALL?16:18,color:"#B5B8BE",marginLeft:C===f.SMALL?6:8,fontWeight:600}}};function xi(){return v("theme")===$.WHITE?Xt.white:Xt.dark}function Zt(e){return e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}function Si(e){const[t,n]=N({available:0,currency:"USD",symbol:"$",details:[]}),r=async()=>{try{const i=await Un(),a=[{label:"",value:i.totalAmount,color:"#15b36b",dot:"#15b36b"},{label:"",value:i.frozenAmount,color:"#f59e0b",dot:"#f59e0b"},...i.isCredit?[{label:"",value:i.creditLimit,color:"#1890ff",dot:"#1890ff"},{label:"",value:i.creditUsed,color:"#ff0000",dot:"#ff0000"}]:[],{label:"",value:i.availableAmount,color:"#1890ff",dot:"#15b36b"}],u={available:i.availableAmount,currency:"USD",symbol:"$",details:a};n(u)}catch(i){console.error("获取余额失败:",i)}};he(()=>{r()},[]),he(()=>{const i=()=>{r()};return document.addEventListener("refresh-balance",i),()=>{document.removeEventListener("refresh-balance",i)}},[]);const o=xi(),s=[{label:A("真实金额"),value:t.details[0]?.value||0,color:"#15b36b",dot:"#15b36b"},{label:A("冻结金额"),value:t.details[1]?.value||0,color:"#f59e0b",dot:"#f59e0b"},...t.details.length>4?[{label:A("信用额度"),value:t.details[2]?.value||0,color:"#1890ff",dot:"#1890ff"},{label:A("已用额度"),value:t.details[3]?.value||0,color:"#ff0000",dot:"#ff0000"}]:[],{label:A("可用余额"),value:t.details[t.details.length-1]?.value||0,color:"#1890ff",dot:"#15b36b"}];return m(yi,{popover:m(te,{children:[m("div",{style:o.popoverTitle,children:A("余额详情")}),s.map(i=>m("div",{style:o.detailRow,children:[m("span",{style:o.detailLabel,children:[m("span",{style:o.detailDot(i.dot)}),i.label]}),m("span",{style:o.detailValue(i.color),children:[t.symbol,Zt(i.value)]})]},i.label))]}),popoverPosition:e.popoverPosition||"bottom",children:m("div",{style:o.main,children:[t.symbol,Zt(t.available),m("span",{style:o.currency,children:t.currency})]})})}_t(Si,"best-statistical-balance");const Le={white:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,cursor:"pointer",fontWeight:600,transition:"all 0.2s ease"},dark:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,cursor:"pointer",fontWeight:600,transition:"all 0.2s ease"}};function wi(e){return v("theme")===$.WHITE?{...Le.white,background:e||Le.white.background}:{...Le.dark,background:e||Le.dark.background}}function Li(e){switch(e){case"small":return{fontSize:"12px",gap:"2px"};case"large":return{fontSize:"18px",gap:"6px"};default:return{fontSize:"14px",gap:"4px"}}}function Ai({color:e,size:t="medium",children:n}){const[r,o]=N(!1),s=wi(e),i=Li(t),a={...s,...i,display:"flex",alignItems:"center"};return m(te,{children:[m("style",{children:`
|
|
61
61
|
@keyframes spin {
|
|
62
62
|
from {
|
|
63
63
|
transform: rotate(0deg);
|
|
@@ -76,4 +76,4 @@
|
|
|
76
76
|
:host {
|
|
77
77
|
display: inline-block;
|
|
78
78
|
}
|
|
79
|
-
`}),m(
|
|
79
|
+
`}),m($n,{onClick:async()=>{o(!0);try{Hn(),await new Promise(d=>setTimeout(d,300))}finally{o(!1)}},color:e,children:m("div",{style:a,children:[m("svg",{className:"refresh-icon",width:t==="small"?"14":t==="large"?"24":"18",height:t==="small"?"14":t==="large"?"24":"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{animation:r?"spin 0.6s linear infinite":"none",transition:"all 0.2s ease"},children:[m("path",{d:"M21 2v6h-6"}),m("path",{d:"M3 12a9 9 0 0 1 15-6.7L21 8"}),m("path",{d:"M3 22v-6h6"}),m("path",{d:"M21 12a9 9 0 0 1-15 6.7L3 16"})]}),n&&m("span",{children:n})]})})]})}_t(Ai,"best-refresh-button",[],{shadow:!0});const Ei=["best-recharge","best-statistical-balance","best-refresh-button"];exports.components=Ei;exports.getBalanceData=$o;exports.initFundUnit=jo;exports.npmTest=Wn;exports.printCurrentTime=qn;exports.refreshBalance=Hn;exports.viteProxy=Wo;
|