best-unit 1.5.3 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function Mn(){console.log("npm package test!!!")}function Rn(){console.log("Current time:",new Date().toISOString())}function Nt(e,t){return function(){return e.apply(t,arguments)}}const{toString:Bn}=Object.prototype,{getPrototypeOf:Ye}=Object,{iterator:ve,toStringTag:zt}=Symbol,ke=(e=>t=>{const n=Bn.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),z=e=>(e=e.toLowerCase(),t=>ke(t)===e),Te=e=>t=>typeof t===e,{isArray:ee}=Array,ie=Te("undefined");function Fn(e){return e!==null&&!ie(e)&&e.constructor!==null&&!ie(e.constructor)&&P(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ut=z("ArrayBuffer");function On(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ut(e.buffer),t}const Pn=Te("string"),P=Te("function"),Ht=Te("number"),Ce=e=>e!==null&&typeof e=="object",In=e=>e===!0||e===!1,me=e=>{if(ke(e)!=="object")return!1;const t=Ye(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(zt in e)&&!(ve in e)},Dn=z("Date"),Nn=z("File"),zn=z("Blob"),Un=z("FileList"),Hn=e=>Ce(e)&&P(e.pipe),jn=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||P(e.append)&&((t=ke(e))==="formdata"||t==="object"&&P(e.toString)&&e.toString()==="[object FormData]"))},$n=z("URLSearchParams"),[Wn,qn,Jn,Vn]=["ReadableStream","Request","Response","Headers"].map(z),Gn=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ce(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),ee(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 jt(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 J=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,$t=e=>!ie(e)&&e!==J;function He(){const{caseless:e}=$t(this)&&this||{},t={},n=(r,o)=>{const s=e&&jt(t,o)||o;me(t[s])&&me(r)?t[s]=He(t[s],r):me(r)?t[s]=He({},r):ee(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&ce(arguments[r],n);return t}const Kn=(e,t,n,{allOwnKeys:r}={})=>(ce(t,(o,s)=>{n&&P(o)?e[s]=Nt(o,n):e[s]=o},{allOwnKeys:r}),e),Xn=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Zn=(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)},Yn=(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&&Ye(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Qn=(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},er=e=>{if(!e)return null;if(ee(e))return e;let t=e.length;if(!Ht(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},tr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ye(Uint8Array)),nr=(e,t)=>{const r=(e&&e[ve]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},rr=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},or=z("HTMLFormElement"),ir=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),lt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),sr=z("RegExp"),Wt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ce(n,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(r[s]=i||o)}),Object.defineProperties(e,r)},ar=e=>{Wt(e,(t,n)=>{if(P(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(P(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+"'")})}})},lr=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return ee(e)?r(e):r(String(e).split(t)),n},cr=()=>{},ur=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function dr(e){return!!(e&&P(e.append)&&e[zt]==="FormData"&&e[ve])}const fr=e=>{const t=new Array(10),n=(r,o)=>{if(Ce(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=ee(r)?[]:{};return ce(r,(i,a)=>{const d=n(i,o+1);!ie(d)&&(s[a]=d)}),t[o]=void 0,s}}return r};return n(e,0)},pr=z("AsyncFunction"),hr=e=>e&&(Ce(e)||P(e))&&P(e.then)&&P(e.catch),qt=((e,t)=>e?setImmediate:t?((n,r)=>(J.addEventListener("message",({source:o,data:s})=>{o===J&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),J.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",P(J.postMessage)),mr=typeof queueMicrotask<"u"?queueMicrotask.bind(J):typeof process<"u"&&process.nextTick||qt,_r=e=>e!=null&&P(e[ve]),p={isArray:ee,isArrayBuffer:Ut,isBuffer:Fn,isFormData:jn,isArrayBufferView:On,isString:Pn,isNumber:Ht,isBoolean:In,isObject:Ce,isPlainObject:me,isReadableStream:Wn,isRequest:qn,isResponse:Jn,isHeaders:Vn,isUndefined:ie,isDate:Dn,isFile:Nn,isBlob:zn,isRegExp:sr,isFunction:P,isStream:Hn,isURLSearchParams:$n,isTypedArray:tr,isFileList:Un,forEach:ce,merge:He,extend:Kn,trim:Gn,stripBOM:Xn,inherits:Zn,toFlatObject:Yn,kindOf:ke,kindOfTest:z,endsWith:Qn,toArray:er,forEachEntry:nr,matchAll:rr,isHTMLForm:or,hasOwnProperty:lt,hasOwnProp:lt,reduceDescriptors:Wt,freezeMethods:ar,toObjectSet:lr,toCamelCase:ir,noop:cr,toFiniteNumber:ur,findKey:jt,global:J,isContextDefined:$t,isSpecCompliantForm:dr,toJSONObject:fr,isAsyncFn:pr,isThenable:hr,setImmediate:qt,asap:mr,isIterable:_r};function A(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(A,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 Jt=A.prototype,Vt={};["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=>{Vt[e]={value:e}});Object.defineProperties(A,Vt);Object.defineProperty(Jt,"isAxiosError",{value:!0});A.from=(e,t,n,r,o,s)=>{const i=Object.create(Jt);return p.toFlatObject(e,i,function(d){return d!==Error.prototype},a=>a!=="isAxiosError"),A.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const gr=null;function je(e){return p.isPlainObject(e)||p.isArray(e)}function Gt(e){return p.endsWith(e,"[]")?e.slice(0,-2):e}function ct(e,t,n){return e?e.concat(t).map(function(o,s){return o=Gt(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function br(e){return p.isArray(e)&&!e.some(je)}const yr=p.toFlatObject(p,{},null,function(t){return/^is[A-Z]/.test(t)});function Me(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||f,s=n.dots,i=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&p.isSpecCompliantForm(t);if(!p.isFunction(o))throw new TypeError("visitor must be a function");function l(_){if(_===null)return"";if(p.isDate(_))return _.toISOString();if(p.isBoolean(_))return _.toString();if(!d&&p.isBlob(_))throw new A("Blob is not supported. Use a Buffer instead.");return p.isArrayBuffer(_)||p.isTypedArray(_)?d&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function f(_,y,b){let x=_;if(_&&!b&&typeof _=="object"){if(p.endsWith(y,"{}"))y=r?y:y.slice(0,-2),_=JSON.stringify(_);else if(p.isArray(_)&&br(_)||(p.isFileList(_)||p.endsWith(y,"[]"))&&(x=p.toArray(_)))return y=Gt(y),x.forEach(function(v,w){!(p.isUndefined(v)||v===null)&&t.append(i===!0?ct([y],w,s):i===null?y:y+"[]",l(v))}),!1}return je(_)?!0:(t.append(ct(b,y,s),l(_)),!1)}const c=[],g=Object.assign(yr,{defaultVisitor:f,convertValue:l,isVisitable:je});function h(_,y){if(!p.isUndefined(_)){if(c.indexOf(_)!==-1)throw Error("Circular reference detected in "+y.join("."));c.push(_),p.forEach(_,function(x,S){(!(p.isUndefined(x)||x===null)&&o.call(t,x,p.isString(S)?S.trim():S,y,g))===!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 ut(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Qe(e,t){this._pairs=[],e&&Me(e,this,t)}const Kt=Qe.prototype;Kt.append=function(t,n){this._pairs.push([t,n])};Kt.toString=function(t){const n=t?function(r){return t.call(this,r,ut)}:ut;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function xr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Xt(e,t,n){if(!t)return e;const r=n&&n.encode||xr;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 Qe(t,n).toString(r),s){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class dt{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 Zt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Sr=typeof URLSearchParams<"u"?URLSearchParams:Qe,Lr=typeof FormData<"u"?FormData:null,wr=typeof Blob<"u"?Blob:null,Ar={isBrowser:!0,classes:{URLSearchParams:Sr,FormData:Lr,Blob:wr},protocols:["http","https","file","blob","url","data"]},et=typeof window<"u"&&typeof document<"u",$e=typeof navigator=="object"&&navigator||void 0,Er=et&&(!$e||["ReactNative","NativeScript","NS"].indexOf($e.product)<0),vr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",kr=et&&window.location.href||"http://localhost",Tr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:et,hasStandardBrowserEnv:Er,hasStandardBrowserWebWorkerEnv:vr,navigator:$e,origin:kr},Symbol.toStringTag,{value:"Module"})),O={...Tr,...Ar};function Cr(e,t){return Me(e,new O.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return O.isNode&&p.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function Mr(e){return p.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Rr(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 Yt(e){function t(n,r,o,s){let i=n[s++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),d=s>=n.length;return i=!i&&p.isArray(o)?o.length:i,d?(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]=Rr(o[i])),!a)}if(p.isFormData(e)&&p.isFunction(e.entries)){const n={};return p.forEachEntry(e,(r,o)=>{t(Mr(r),o,n,0)}),n}return null}function Br(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 ue={transitional:Zt,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(Yt(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 Cr(t,this.formSerializer).toString();if((a=p.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Me(a?{"files[]":t}:t,d&&new d,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),Br(t)):t}],transformResponse:[function(t){const n=this.transitional||ue.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"?A.from(a,A.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:O.classes.FormData,Blob:O.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=>{ue.headers[e]={}});const Fr=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"]),Or=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]&&Fr[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},ft=Symbol("internals");function re(e){return e&&String(e).trim().toLowerCase()}function _e(e){return e===!1||e==null?e:p.isArray(e)?e.map(_e):String(e)}function Pr(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 Ir=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function De(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 Dr(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Nr(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 I=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(a,d,l){const f=re(d);if(!f)throw new Error("header name must be a non-empty string");const c=p.findKey(o,f);(!c||o[c]===void 0||l===!0||l===void 0&&o[c]!==!1)&&(o[c||d]=_e(a))}const i=(a,d)=>p.forEach(a,(l,f)=>s(l,f,d));if(p.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(p.isString(t)&&(t=t.trim())&&!Ir(t))i(Or(t),n);else if(p.isObject(t)&&p.isIterable(t)){let a={},d,l;for(const f of t){if(!p.isArray(f))throw TypeError("Object iterator must return a key-value pair");a[l=f[0]]=(d=a[l])?p.isArray(d)?[...d,f[1]]:[d,f[1]]:f[1]}i(a,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=re(t),t){const r=p.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Pr(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=re(t),t){const r=p.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||De(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(i){if(i=re(i),i){const a=p.findKey(r,i);a&&(!n||De(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||De(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]=_e(o),delete n[s];return}const a=t?Dr(s):String(s).trim();a!==s&&delete n[s],n[a]=_e(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[ft]=this[ft]={accessors:{}}).accessors,o=this.prototype;function s(i){const a=re(i);r[a]||(Nr(o,i),r[a]=!0)}return p.isArray(t)?t.forEach(s):s(t),this}};I.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);p.reduceDescriptors(I.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});p.freezeMethods(I);function Ne(e,t){const n=this||ue,r=t||n,o=I.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 Qt(e){return!!(e&&e.__CANCEL__)}function te(e,t,n){A.call(this,e??"canceled",A.ERR_CANCELED,t,n),this.name="CanceledError"}p.inherits(te,A,{__CANCEL__:!0});function en(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new A("Request failed with status code "+n.status,[A.ERR_BAD_REQUEST,A.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function zr(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Ur(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(d){const l=Date.now(),f=r[s];i||(i=l),n[o]=d,r[o]=l;let c=s,g=0;for(;c!==o;)g+=n[c++],c=c%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-i<t)return;const h=f&&l-f;return h?Math.round(g*1e3/h):void 0}}function Hr(e,t){let n=0,r=1e3/t,o,s;const i=(l,f=Date.now())=>{n=f,o=null,s&&(clearTimeout(s),s=null),e.apply(null,l)};return[(...l)=>{const f=Date.now(),c=f-n;c>=r?i(l,f):(o=l,s||(s=setTimeout(()=>{s=null,i(o)},r-c)))},()=>o&&i(o)]}const Se=(e,t,n=3)=>{let r=0;const o=Ur(50,250);return Hr(s=>{const i=s.loaded,a=s.lengthComputable?s.total:void 0,d=i-r,l=o(d),f=i<=a;r=i;const c={loaded:i,total:a,progress:a?i/a:void 0,bytes:d,rate:l||void 0,estimated:l&&a&&f?(a-i)/l:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(c)},n)},pt=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},ht=e=>(...t)=>p.asap(()=>e(...t)),jr=O.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,O.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(O.origin),O.navigator&&/(msie|trident)/i.test(O.navigator.userAgent)):()=>!0,$r=O.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 Wr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function qr(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function tn(e,t,n){let r=!Wr(t);return e&&(r||n==!1)?qr(e,t):t}const mt=e=>e instanceof I?{...e}:e;function G(e,t){t=t||{};const n={};function r(l,f,c,g){return p.isPlainObject(l)&&p.isPlainObject(f)?p.merge.call({caseless:g},l,f):p.isPlainObject(f)?p.merge({},f):p.isArray(f)?f.slice():f}function o(l,f,c,g){if(p.isUndefined(f)){if(!p.isUndefined(l))return r(void 0,l,c,g)}else return r(l,f,c,g)}function s(l,f){if(!p.isUndefined(f))return r(void 0,f)}function i(l,f){if(p.isUndefined(f)){if(!p.isUndefined(l))return r(void 0,l)}else return r(void 0,f)}function a(l,f,c){if(c in t)return r(l,f);if(c in e)return r(void 0,l)}const d={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,f,c)=>o(mt(l),mt(f),c,!0)};return p.forEach(Object.keys(Object.assign({},e,t)),function(f){const c=d[f]||o,g=c(e[f],t[f],f);p.isUndefined(g)&&c!==a||(n[f]=g)}),n}const nn=e=>{const t=G({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:a}=t;t.headers=i=I.from(i),t.url=Xt(tn(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 d;if(p.isFormData(n)){if(O.hasStandardBrowserEnv||O.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((d=i.getContentType())!==!1){const[l,...f]=d?d.split(";").map(c=>c.trim()).filter(Boolean):[];i.setContentType([l||"multipart/form-data",...f].join("; "))}}if(O.hasStandardBrowserEnv&&(r&&p.isFunction(r)&&(r=r(t)),r||r!==!1&&jr(t.url))){const l=o&&s&&$r.read(s);l&&i.set(o,l)}return t},Jr=typeof XMLHttpRequest<"u",Vr=Jr&&function(e){return new Promise(function(n,r){const o=nn(e);let s=o.data;const i=I.from(o.headers).normalize();let{responseType:a,onUploadProgress:d,onDownloadProgress:l}=o,f,c,g,h,_;function y(){h&&h(),_&&_(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let b=new XMLHttpRequest;b.open(o.method.toUpperCase(),o.url,!0),b.timeout=o.timeout;function x(){if(!b)return;const v=I.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),E={data:!a||a==="text"||a==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:v,config:e,request:b};en(function(D){n(D),y()},function(D){r(D),y()},E),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 A("Request aborted",A.ECONNABORTED,e,b)),b=null)},b.onerror=function(){r(new A("Network Error",A.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let w=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const E=o.transitional||Zt;o.timeoutErrorMessage&&(w=o.timeoutErrorMessage),r(new A(w,E.clarifyTimeoutError?A.ETIMEDOUT:A.ECONNABORTED,e,b)),b=null},s===void 0&&i.setContentType(null),"setRequestHeader"in b&&p.forEach(i.toJSON(),function(w,E){b.setRequestHeader(E,w)}),p.isUndefined(o.withCredentials)||(b.withCredentials=!!o.withCredentials),a&&a!=="json"&&(b.responseType=o.responseType),l&&([g,_]=Se(l,!0),b.addEventListener("progress",g)),d&&b.upload&&([c,h]=Se(d),b.upload.addEventListener("progress",c),b.upload.addEventListener("loadend",h)),(o.cancelToken||o.signal)&&(f=v=>{b&&(r(!v||v.type?new te(null,e,b):v),b.abort(),b=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const S=zr(o.url);if(S&&O.protocols.indexOf(S)===-1){r(new A("Unsupported protocol "+S+":",A.ERR_BAD_REQUEST,e));return}b.send(s||null)})},Gr=(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 f=l instanceof Error?l:this.reason;r.abort(f instanceof A?f:new te(f instanceof Error?f.message:f))}};let i=t&&setTimeout(()=>{i=null,s(new A(`timeout ${t} of ms exceeded`,A.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:d}=r;return d.unsubscribe=()=>p.asap(a),d}},Kr=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},Xr=async function*(e,t){for await(const n of Zr(e))yield*Kr(n,t)},Zr=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()}},_t=(e,t,n,r)=>{const o=Xr(e,t);let s=0,i,a=d=>{i||(i=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:l,value:f}=await o.next();if(l){a(),d.close();return}let c=f.byteLength;if(n){let g=s+=c;n(g)}d.enqueue(new Uint8Array(f))}catch(l){throw a(l),l}},cancel(d){return a(d),o.return()}},{highWaterMark:2})},Re=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",rn=Re&&typeof ReadableStream=="function",Yr=Re&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),on=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Qr=rn&&on(()=>{let e=!1;const t=new Request(O.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),gt=64*1024,We=rn&&on(()=>p.isReadableStream(new Response("").body)),Le={stream:We&&(e=>e.body)};Re&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Le[t]&&(Le[t]=p.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new A(`Response type '${t}' is not supported`,A.ERR_NOT_SUPPORT,r)})})})(new Response);const eo=async e=>{if(e==null)return 0;if(p.isBlob(e))return e.size;if(p.isSpecCompliantForm(e))return(await new Request(O.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 Yr(e)).byteLength},to=async(e,t)=>{const n=p.toFiniteNumber(e.getContentLength());return n??eo(t)},no=Re&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:d,responseType:l,headers:f,withCredentials:c="same-origin",fetchOptions:g}=nn(e);l=l?(l+"").toLowerCase():"text";let h=Gr([o,s&&s.toAbortSignal()],i),_;const y=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let b;try{if(d&&Qr&&n!=="get"&&n!=="head"&&(b=await to(f,r))!==0){let E=new Request(t,{method:"POST",body:r,duplex:"half"}),C;if(p.isFormData(r)&&(C=E.headers.get("content-type"))&&f.setContentType(C),E.body){const[D,$]=pt(b,Se(ht(d)));r=_t(E.body,gt,D,$)}}p.isString(c)||(c=c?"include":"omit");const x="credentials"in Request.prototype;_=new Request(t,{...g,signal:h,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:x?c:void 0});let S=await fetch(_,g);const v=We&&(l==="stream"||l==="response");if(We&&(a||v&&y)){const E={};["status","statusText","headers"].forEach(W=>{E[W]=S[W]});const C=p.toFiniteNumber(S.headers.get("content-length")),[D,$]=a&&pt(C,Se(ht(a),!0))||[];S=new Response(_t(S.body,gt,D,()=>{$&&$(),y&&y()}),E)}l=l||"text";let w=await Le[p.findKey(Le,l)||"text"](S,e);return!v&&y&&y(),await new Promise((E,C)=>{en(E,C,{data:w,headers:I.from(S.headers),status:S.status,statusText:S.statusText,config:e,request:_})})}catch(x){throw y&&y(),x&&x.name==="TypeError"&&/Load failed|fetch/i.test(x.message)?Object.assign(new A("Network Error",A.ERR_NETWORK,e,_),{cause:x.cause||x}):A.from(x,x&&x.code,e,_)}}),qe={http:gr,xhr:Vr,fetch:no};p.forEach(qe,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const bt=e=>`- ${e}`,ro=e=>p.isFunction(e)||e===null||e===!1,sn={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,!ro(n)&&(r=qe[(i=String(n)).toLowerCase()],r===void 0))throw new A(`Unknown adapter '${i}'`);if(r)break;o[i||"#"+s]=r}if(!r){const s=Object.entries(o).map(([a,d])=>`adapter ${a} `+(d===!1?"is not supported by the environment":"is not available in the build"));let i=t?s.length>1?`since :
4
- `+s.map(bt).join(`
5
- `):" "+bt(s[0]):"as no adapter specified";throw new A("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:qe};function ze(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new te(null,e)}function yt(e){return ze(e),e.headers=I.from(e.headers),e.data=Ne.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),sn.getAdapter(e.adapter||ue.adapter)(e).then(function(r){return ze(e),r.data=Ne.call(e,e.transformResponse,r),r.headers=I.from(r.headers),r},function(r){return Qt(r)||(ze(e),r&&r.response&&(r.response.data=Ne.call(e,e.transformResponse,r.response),r.response.headers=I.from(r.response.headers))),Promise.reject(r)})}const an="1.10.0",Be={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Be[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const xt={};Be.transitional=function(t,n,r){function o(s,i){return"[Axios v"+an+"] Transitional option '"+s+"'"+i+(r?". "+r:"")}return(s,i,a)=>{if(t===!1)throw new A(o(i," has been removed"+(n?" in "+n:"")),A.ERR_DEPRECATED);return n&&!xt[i]&&(xt[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}};Be.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function oo(e,t,n){if(typeof e!="object")throw new A("options must be an object",A.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],d=a===void 0||i(a,s,e);if(d!==!0)throw new A("option "+s+" must be "+d,A.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new A("Unknown option "+s,A.ERR_BAD_OPTION)}}const ge={assertOptions:oo,validators:Be},H=ge.validators;let V=class{constructor(t){this.defaults=t||{},this.interceptors={request:new dt,response:new dt}}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=G(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&ge.assertOptions(r,{silentJSONParsing:H.transitional(H.boolean),forcedJSONParsing:H.transitional(H.boolean),clarifyTimeoutError:H.transitional(H.boolean)},!1),o!=null&&(p.isFunction(o)?n.paramsSerializer={serialize:o}:ge.assertOptions(o,{encode:H.function,serialize:H.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ge.assertOptions(n,{baseUrl:H.spelling("baseURL"),withXsrfToken:H.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"],_=>{delete s[_]}),n.headers=I.concat(i,s);const a=[];let d=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(d=d&&y.synchronous,a.unshift(y.fulfilled,y.rejected))});const l=[];this.interceptors.response.forEach(function(y){l.push(y.fulfilled,y.rejected)});let f,c=0,g;if(!d){const _=[yt.bind(this),void 0];for(_.unshift.apply(_,a),_.push.apply(_,l),g=_.length,f=Promise.resolve(n);c<g;)f=f.then(_[c++],_[c++]);return f}g=a.length;let h=n;for(c=0;c<g;){const _=a[c++],y=a[c++];try{h=_(h)}catch(b){y.call(this,b);break}}try{f=yt.call(this,h)}catch(_){return Promise.reject(_)}for(c=0,g=l.length;c<g;)f=f.then(l[c++],l[c++]);return f}getUri(t){t=G(this.defaults,t);const n=tn(t.baseURL,t.url,t.allowAbsoluteUrls);return Xt(n,t.params,t.paramsSerializer)}};p.forEach(["delete","get","head","options"],function(t){V.prototype[t]=function(n,r){return this.request(G(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(G(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}V.prototype[t]=n(),V.prototype[t+"Form"]=n(!0)});let io=class ln{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 te(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 ln(function(o){t=o}),cancel:t}}};function so(e){return function(n){return e.apply(null,n)}}function ao(e){return p.isObject(e)&&e.isAxiosError===!0}const Je={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(Je).forEach(([e,t])=>{Je[t]=e});function cn(e){const t=new V(e),n=Nt(V.prototype.request,t);return p.extend(n,V.prototype,t,{allOwnKeys:!0}),p.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return cn(G(e,o))},n}const R=cn(ue);R.Axios=V;R.CanceledError=te;R.CancelToken=io;R.isCancel=Qt;R.VERSION=an;R.toFormData=Me;R.AxiosError=A;R.Cancel=R.CanceledError;R.all=function(t){return Promise.all(t)};R.spread=so;R.isAxiosError=ao;R.mergeConfig=G;R.AxiosHeaders=I;R.formToJSON=e=>Yt(p.isHTMLForm(e)?new FormData(e):e);R.getAdapter=sn.getAdapter;R.HttpStatusCode=Je;R.default=R;const{Axios:Si,AxiosError:Li,CanceledError:wi,isCancel:Ai,CancelToken:Ei,VERSION:vi,all:ki,Cancel:Ti,isAxiosError:Ci,spread:Mi,toFormData:Ri,AxiosHeaders:Bi,HttpStatusCode:Fi,formToJSON:Oi,getAdapter:Pi,mergeConfig:Ii}=R;var de,T,un,q,St,dn,fn,pn,tt,Ve,Ge,se={},hn=[],lo=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Fe=Array.isArray;function j(e,t){for(var n in t)e[n]=t[n];return e}function nt(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Y(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?de.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 oe(e,i,r,o,null)}function oe(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??++un,__i:-1,__u:0};return o==null&&T.vnode!=null&&T.vnode(s),s}function K(e){return e.children}function be(e,t){this.props=e,this.context=t}function Q(e,t){if(t==null)return e.__?Q(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"?Q(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 Lt(e){(!e.__d&&(e.__d=!0)&&q.push(e)&&!we.__r++||St!=T.debounceRendering)&&((St=T.debounceRendering)||dn)(we)}function we(){for(var e,t,n,r,o,s,i,a=1;q.length;)q.length>a&&q.sort(fn),e=q.shift(),a=q.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,s=[],i=[],t.__P&&((n=j({},r)).__v=r.__v+1,T.vnode&&T.vnode(n),rt(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,s,o??Q(r),!!(32&r.__u),i),n.__v=r.__v,n.__.__k[n.__i]=n,bn(s,n,i),n.__e!=o&&mn(n)));we.__r=0}function _n(e,t,n,r,o,s,i,a,d,l,f){var c,g,h,_,y,b,x=r&&r.__k||hn,S=t.length;for(d=co(n,t,x,d,S),c=0;c<S;c++)(h=n.__k[c])!=null&&(g=h.__i==-1?se:x[h.__i]||se,h.__i=c,b=rt(e,h,g,o,s,i,a,d,l,f),_=h.__e,h.ref&&g.ref!=h.ref&&(g.ref&&ot(g.ref,null,h),f.push(h.ref,h.__c||_,h)),y==null&&_!=null&&(y=_),4&h.__u||g.__k===h.__k?d=gn(h,d,e):typeof h.type=="function"&&b!==void 0?d=b:_&&(d=_.nextSibling),h.__u&=-7);return n.__e=y,d}function co(e,t,n,r,o){var s,i,a,d,l,f=n.length,c=f,g=0;for(e.__k=new Array(o),s=0;s<o;s++)(i=t[s])!=null&&typeof i!="boolean"&&typeof i!="function"?(d=s+g,(i=e.__k[s]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?oe(null,i,null,null,null):Fe(i)?oe(K,{children:i},null,null,null):i.constructor==null&&i.__b>0?oe(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=uo(i,n,d,c))!=-1&&(c--,(a=n[l])&&(a.__u|=2)),a==null||a.__v==null?(l==-1&&(o>f?g--:o<f&&g++),typeof i.type!="function"&&(i.__u|=4)):l!=d&&(l==d-1?g--:l==d+1?g++:(l>d?g--:g++,i.__u|=4))):e.__k[s]=null;if(c)for(s=0;s<f;s++)(a=n[s])!=null&&(2&a.__u)==0&&(a.__e==r&&(r=Q(a)),xn(a,a));return r}function gn(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=gn(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=Q(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function uo(e,t,n,r){var o,s,i=e.key,a=e.type,d=t[n];if(d===null&&e.key==null||d&&i==d.key&&a==d.type&&(2&d.__u)==0)return n;if(r>(d!=null&&(2&d.__u)==0?1:0))for(o=n-1,s=n+1;o>=0||s<t.length;){if(o>=0){if((d=t[o])&&(2&d.__u)==0&&i==d.key&&a==d.type)return o;o--}if(s<t.length){if((d=t[s])&&(2&d.__u)==0&&i==d.key&&a==d.type)return s;s++}}return-1}function wt(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||lo.test(t)?n:n+"px"}function fe(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||wt(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||wt(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")s=t!=(t=t.replace(pn,"$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=tt,e.addEventListener(t,s?Ge:Ve,s)):e.removeEventListener(t,s?Ge:Ve,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 At(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=tt++;else if(t.t<n.u)return;return n(T.event?T.event(t):t)}}}function rt(e,t,n,r,o,s,i,a,d,l){var f,c,g,h,_,y,b,x,S,v,w,E,C,D,$,W,Ie,U=t.type;if(t.constructor!=null)return null;128&n.__u&&(d=!!(32&n.__u),s=[a=t.__e=n.__e]),(f=T.__b)&&f(t);e:if(typeof U=="function")try{if(x=t.props,S="prototype"in U&&U.prototype.render,v=(f=U.contextType)&&r[f.__c],w=f?v?v.props.value:f.__:r,n.__c?b=(c=t.__c=n.__c).__=c.__E:(S?t.__c=c=new U(x,w):(t.__c=c=new be(x,w),c.constructor=U,c.render=po),v&&v.sub(c),c.props=x,c.state||(c.state={}),c.context=w,c.__n=r,g=c.__d=!0,c.__h=[],c._sb=[]),S&&c.__s==null&&(c.__s=c.state),S&&U.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=j({},c.__s)),j(c.__s,U.getDerivedStateFromProps(x,c.__s))),h=c.props,_=c.state,c.__v=t,g)S&&U.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),S&&c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(S&&U.getDerivedStateFromProps==null&&x!==h&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(x,w),!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(x,c.__s,w)===!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(ne){ne&&(ne.__=t)}),E=0;E<c._sb.length;E++)c.__h.push(c._sb[E]);c._sb=[],c.__h.length&&i.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(x,c.__s,w),S&&c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(h,_,y)})}if(c.context=w,c.props=x,c.__P=e,c.__e=!1,C=T.__r,D=0,S){for(c.state=c.__s,c.__d=!1,C&&C(t),f=c.render(c.props,c.state,c.context),$=0;$<c._sb.length;$++)c.__h.push(c._sb[$]);c._sb=[]}else do c.__d=!1,C&&C(t),f=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++D<25);c.state=c.__s,c.getChildContext!=null&&(r=j(j({},r),c.getChildContext())),S&&!g&&c.getSnapshotBeforeUpdate!=null&&(y=c.getSnapshotBeforeUpdate(h,_)),W=f,f!=null&&f.type===K&&f.key==null&&(W=yn(f.props.children)),a=_n(e,Fe(W)?W:[W],t,n,r,o,s,i,a,d,l),c.base=t.__e,t.__u&=-161,c.__h.length&&i.push(c),b&&(c.__E=c.__=null)}catch(ne){if(t.__v=null,d||s!=null)if(ne.then){for(t.__u|=d?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;s[s.indexOf(a)]=null,t.__e=a}else for(Ie=s.length;Ie--;)nt(s[Ie]);else t.__e=n.__e,t.__k=n.__k;T.__e(ne,t,n)}else s==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=fo(n.__e,t,n,r,o,s,i,d,l);return(f=T.diffed)&&f(t),128&t.__u?void 0:a}function bn(e,t,n){for(var r=0;r<n.length;r++)ot(n[r],n[++r],n[++r]);T.__c&&T.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(s){s.call(o)})}catch(s){T.__e(s,o.__v)}})}function yn(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:Fe(e)?e.map(yn):j({},e)}function fo(e,t,n,r,o,s,i,a,d){var l,f,c,g,h,_,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&&(T.__m&&T.__m(t,s),a=!1),s=null}if(S==null)b===x||a&&e.data==x||(e.data=x);else{if(s=s&&de.call(e.childNodes),b=n.props||se,!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;fe(e,l,null,h,o)}}for(l in x)h=x[l],l=="children"?g=h:l=="dangerouslySetInnerHTML"?f=h:l=="value"?_=h:l=="checked"?y=h:a&&typeof h!="function"||b[l]===h||fe(e,l,h,b[l],o);if(f)a||c&&(f.__html==c.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(c&&(e.innerHTML=""),_n(t.type=="template"?e.content:e,Fe(g)?g:[g],t,n,r,S=="foreignObject"?"http://www.w3.org/1999/xhtml":o,s,i,s?s[0]:n.__k&&Q(n,0),a,d),s!=null)for(l=s.length;l--;)nt(s[l]);a||(l="value",S=="progress"&&_==null?e.removeAttribute("value"):_!=null&&(_!==e[l]||S=="progress"&&!_||S=="option"&&_!=b[l])&&fe(e,l,_,b[l],o),l="checked",y!=null&&y!=e[l]&&fe(e,l,y,b[l],o))}return e}function ot(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){T.__e(o,n)}}function xn(e,t,n){var r,o;if(T.unmount&&T.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||ot(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){T.__e(s,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&xn(r[o],t,n||typeof e.type!="function");n||nt(e.__e),e.__c=e.__=e.__e=void 0}function po(e,t,n){return this.constructor(e,n)}function Oe(e,t,n){var r,o,s,i;t==document&&(t=document.documentElement),T.__&&T.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,s=[],i=[],rt(t,e=(!r&&n||t).__k=Y(K,null,[e]),o||se,se,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?de.call(t.childNodes):null,s,!r&&n?n:o?o.__e:t.firstChild,r,i),bn(s,e,i)}function Sn(e,t){Oe(e,t,Sn)}function Ln(e,t,n){var r,o,s,i,a=j({},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?de.call(arguments,2):n),oe(e.type,a,r||e.key,o||e.ref,null)}de=hn.slice,T={__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}},un=0,be.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=j({},this.state),typeof e=="function"&&(e=e(j({},n),this.props)),e&&j(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Lt(this))},be.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Lt(this))},be.prototype.render=K,q=[],dn=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,fn=function(e,t){return e.__v.__b-t.__v.__b},we.__r=0,pn=/(PointerCapture)$|Capture$/i,tt=0,Ve=At(!1),Ge=At(!0);var ho=0;function m(e,t,n,r,o,s){t||(t={});var i,a,d=t;if("ref"in d)for(a in d={},t)a=="ref"?i=t[a]:d[a]=t[a];var l={type:e,props:d,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--ho,__i:-1,__u:0,__source:o,__self:s};if(typeof e=="function"&&(i=e.defaultProps))for(a in i)d[a]===void 0&&(d[a]=i[a]);return T.vnode&&T.vnode(l),l}var ae,M,Ue,Et,Ae=0,wn=[],B=T,vt=B.__b,kt=B.__r,Tt=B.diffed,Ct=B.__c,Mt=B.unmount,Rt=B.__;function it(e,t){B.__h&&B.__h(M,e,Ae||t),Ae=0;var n=M.__H||(M.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function F(e){return Ae=1,mo(En,e)}function mo(e,t,n){var r=it(ae++,2);if(r.t=e,!r.__c&&(r.__=[En(void 0,t),function(a){var d=r.__N?r.__N[0]:r.__[0],l=r.t(d,a);d!==l&&(r.__N=[l,r.__[1]],r.__c.setState({}))}],r.__c=M,!M.__f)){var o=function(a,d,l){if(!r.__c.__H)return!0;var f=r.__c.__H.__.filter(function(g){return!!g.__c});if(f.every(function(g){return!g.__N}))return!s||s.call(this,a,d,l);var c=r.__c.props!==a;return f.forEach(function(g){if(g.__N){var h=g.__[0];g.__=g.__N,g.__N=void 0,h!==g.__[0]&&(c=!0)}}),s&&s.call(this,a,d,l)||c};M.__f=!0;var s=M.shouldComponentUpdate,i=M.componentWillUpdate;M.componentWillUpdate=function(a,d,l){if(this.__e){var f=s;s=void 0,o(a,d,l),s=f}i&&i.call(this,a,d,l)},M.shouldComponentUpdate=o}return r.__N||r.__}function le(e,t){var n=it(ae++,3);!B.__s&&An(n.__H,t)&&(n.__=e,n.u=t,M.__H.__h.push(n))}function Ee(e){return Ae=5,_o(function(){return{current:e}},[])}function _o(e,t){var n=it(ae++,7);return An(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function go(){for(var e;e=wn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ye),e.__H.__h.forEach(Ke),e.__H.__h=[]}catch(t){e.__H.__h=[],B.__e(t,e.__v)}}B.__b=function(e){M=null,vt&&vt(e)},B.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Rt&&Rt(e,t)},B.__r=function(e){kt&&kt(e),ae=0;var t=(M=e.__c).__H;t&&(Ue===M?(t.__h=[],M.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(ye),t.__h.forEach(Ke),t.__h=[],ae=0)),Ue=M},B.diffed=function(e){Tt&&Tt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(wn.push(t)!==1&&Et===B.requestAnimationFrame||((Et=B.requestAnimationFrame)||bo)(go)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Ue=M=null},B.__c=function(e,t){t.some(function(n){try{n.__h.forEach(ye),n.__h=n.__h.filter(function(r){return!r.__||Ke(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],B.__e(r,n.__v)}}),Ct&&Ct(e,t)},B.unmount=function(e){Mt&&Mt(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{ye(r)}catch(o){t=o}}),n.__H=void 0,t&&B.__e(t,n.__v))};var Bt=typeof requestAnimationFrame=="function";function bo(e){var t,n=function(){clearTimeout(r),Bt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Bt&&(t=requestAnimationFrame(n))}function ye(e){var t=M,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),M=t}function Ke(e){var t=M;e.__c=e.__(),M=t}function An(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function En(e,t){return typeof t=="function"?t(e):t}var Pe=(e=>(e.ZH="zh",e.EN="en",e))(Pe||{}),N=(e=>(e.WHITE="white",e.DARK="dark",e))(N||{}),Z=(e=>(e.DEV="dev",e.DEVELOPMENT="development",e.TEST="test",e.PROD="prod",e.PRODUCTION="production",e))(Z||{}),u=(e=>(e.SMALL="small",e.MEDIUM="medium",e))(u||{});const Ft={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 yo(){return k("theme")===N.WHITE?Ft.white:Ft.dark}class xo{parseArg(t){return typeof t=="string"?{content:t}:t}show(t,n){const{content:r,duration:o,closable:s}=this.parseArg(n),i=yo(),a=document.createElement("div");if(a.style.cssText=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var be,R,Kt,Z,_t,Xt,Zt,Qt,ot,Ye,Ge,pe={},en=[],er=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Fe=Array.isArray;function Y(e,t){for(var n in t)e[n]=t[n];return e}function it(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function ie(e,t,n){var r,o,a,i={};for(a in t)a=="key"?r=t[a]:a=="ref"?o=t[a]:i[a]=t[a];if(arguments.length>2&&(i.children=arguments.length>3?be.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)i[a]===void 0&&(i[a]=e.defaultProps[a]);return fe(e,i,r,o,null)}function fe(e,t,n,r,o){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++Kt,__i:-1,__u:0};return o==null&&R.vnode!=null&&R.vnode(a),a}function ne(e){return e.children}function Le(e,t){this.props=e,this.context=t}function ae(e,t){if(t==null)return e.__?ae(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"?ae(e):null}function tn(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 tn(e)}}function St(e){(!e.__d&&(e.__d=!0)&&Z.push(e)&&!ve.__r++||_t!=R.debounceRendering)&&((_t=R.debounceRendering)||Xt)(ve)}function ve(){for(var e,t,n,r,o,a,i,s=1;Z.length;)Z.length>s&&Z.sort(Zt),e=Z.shift(),s=Z.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,a=[],i=[],t.__P&&((n=Y({},r)).__v=r.__v+1,R.vnode&&R.vnode(n),at(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,a,o??ae(r),!!(32&r.__u),i),n.__v=r.__v,n.__.__k[n.__i]=n,on(a,n,i),n.__e!=o&&tn(n)));ve.__r=0}function nn(e,t,n,r,o,a,i,s,f,c,p){var u,h,b,g,x,y,S=r&&r.__k||en,w=t.length;for(f=tr(n,t,S,f,w),u=0;u<w;u++)(b=n.__k[u])!=null&&(h=b.__i==-1?pe:S[b.__i]||pe,b.__i=u,y=at(e,b,h,o,a,i,s,f,c,p),g=b.__e,b.ref&&h.ref!=b.ref&&(h.ref&&st(h.ref,null,b),p.push(b.ref,b.__c||g,b)),x==null&&g!=null&&(x=g),4&b.__u||h.__k===b.__k?f=rn(b,f,e):typeof b.type=="function"&&y!==void 0?f=y:g&&(f=g.nextSibling),b.__u&=-7);return n.__e=x,f}function tr(e,t,n,r,o){var a,i,s,f,c,p=n.length,u=p,h=0;for(e.__k=new Array(o),a=0;a<o;a++)(i=t[a])!=null&&typeof i!="boolean"&&typeof i!="function"?(f=a+h,(i=e.__k[a]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?fe(null,i,null,null,null):Fe(i)?fe(ne,{children:i},null,null,null):i.constructor==null&&i.__b>0?fe(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=e,i.__b=e.__b+1,s=null,(c=i.__i=nr(i,n,f,u))!=-1&&(u--,(s=n[c])&&(s.__u|=2)),s==null||s.__v==null?(c==-1&&(o>p?h--:o<p&&h++),typeof i.type!="function"&&(i.__u|=4)):c!=f&&(c==f-1?h--:c==f+1?h++:(c>f?h--:h++,i.__u|=4))):e.__k[a]=null;if(u)for(a=0;a<p;a++)(s=n[a])!=null&&(2&s.__u)==0&&(s.__e==r&&(r=ae(s)),sn(s,s));return r}function rn(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=rn(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=ae(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function nr(e,t,n,r){var o,a,i=e.key,s=e.type,f=t[n];if(f===null&&e.key==null||f&&i==f.key&&s==f.type&&(2&f.__u)==0)return n;if(r>(f!=null&&(2&f.__u)==0?1:0))for(o=n-1,a=n+1;o>=0||a<t.length;){if(o>=0){if((f=t[o])&&(2&f.__u)==0&&i==f.key&&s==f.type)return o;o--}if(a<t.length){if((f=t[a])&&(2&f.__u)==0&&i==f.key&&s==f.type)return a;a++}}return-1}function Lt(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||er.test(t)?n:n+"px"}function _e(e,t,n,r,o){var a,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||Lt(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||Lt(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")a=t!=(t=t.replace(Qt,"$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+a]=n,n?r?n.u=r.u:(n.u=ot,e.addEventListener(t,a?Ge:Ye,a)):e.removeEventListener(t,a?Ge:Ye,a);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 wt(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=ot++;else if(t.t<n.u)return;return n(R.event?R.event(t):t)}}}function at(e,t,n,r,o,a,i,s,f,c){var p,u,h,b,g,x,y,S,w,M,L,A,T,z,N,$,G,U=t.type;if(t.constructor!=null)return null;128&n.__u&&(f=!!(32&n.__u),a=[s=t.__e=n.__e]),(p=R.__b)&&p(t);e:if(typeof U=="function")try{if(S=t.props,w="prototype"in U&&U.prototype.render,M=(p=U.contextType)&&r[p.__c],L=p?M?M.props.value:p.__:r,n.__c?y=(u=t.__c=n.__c).__=u.__E:(w?t.__c=u=new U(S,L):(t.__c=u=new Le(S,L),u.constructor=U,u.render=or),M&&M.sub(u),u.props=S,u.state||(u.state={}),u.context=L,u.__n=r,h=u.__d=!0,u.__h=[],u._sb=[]),w&&u.__s==null&&(u.__s=u.state),w&&U.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=Y({},u.__s)),Y(u.__s,U.getDerivedStateFromProps(S,u.__s))),b=u.props,g=u.state,u.__v=t,h)w&&U.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),w&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(w&&U.getDerivedStateFromProps==null&&S!==b&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(S,L),!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(S,u.__s,L)===!1||t.__v==n.__v){for(t.__v!=n.__v&&(u.props=S,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(K){K&&(K.__=t)}),A=0;A<u._sb.length;A++)u.__h.push(u._sb[A]);u._sb=[],u.__h.length&&i.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(S,u.__s,L),w&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(b,g,x)})}if(u.context=L,u.props=S,u.__P=e,u.__e=!1,T=R.__r,z=0,w){for(u.state=u.__s,u.__d=!1,T&&T(t),p=u.render(u.props,u.state,u.context),N=0;N<u._sb.length;N++)u.__h.push(u._sb[N]);u._sb=[]}else do u.__d=!1,T&&T(t),p=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++z<25);u.state=u.__s,u.getChildContext!=null&&(r=Y(Y({},r),u.getChildContext())),w&&!h&&u.getSnapshotBeforeUpdate!=null&&(x=u.getSnapshotBeforeUpdate(b,g)),$=p,p!=null&&p.type===ne&&p.key==null&&($=an(p.props.children)),s=nn(e,Fe($)?$:[$],t,n,r,o,a,i,s,f,c),u.base=t.__e,t.__u&=-161,u.__h.length&&i.push(u),y&&(u.__E=u.__=null)}catch(K){if(t.__v=null,f||a!=null)if(K.then){for(t.__u|=f?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__e=s}else for(G=a.length;G--;)it(a[G]);else t.__e=n.__e,t.__k=n.__k;R.__e(K,t,n)}else a==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=rr(n.__e,t,n,r,o,a,i,f,c);return(p=R.diffed)&&p(t),128&t.__u?void 0:s}function on(e,t,n){for(var r=0;r<n.length;r++)st(n[r],n[++r],n[++r]);R.__c&&R.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(a){a.call(o)})}catch(a){R.__e(a,o.__v)}})}function an(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:Fe(e)?e.map(an):Y({},e)}function rr(e,t,n,r,o,a,i,s,f){var c,p,u,h,b,g,x,y=n.props,S=t.props,w=t.type;if(w=="svg"?o="http://www.w3.org/2000/svg":w=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),a!=null){for(c=0;c<a.length;c++)if((b=a[c])&&"setAttribute"in b==!!w&&(w?b.localName==w:b.nodeType==3)){e=b,a[c]=null;break}}if(e==null){if(w==null)return document.createTextNode(S);e=document.createElementNS(o,w,S.is&&S),s&&(R.__m&&R.__m(t,a),s=!1),a=null}if(w==null)y===S||s&&e.data==S||(e.data=S);else{if(a=a&&be.call(e.childNodes),y=n.props||pe,!s&&a!=null)for(y={},c=0;c<e.attributes.length;c++)y[(b=e.attributes[c]).name]=b.value;for(c in y)if(b=y[c],c!="children"){if(c=="dangerouslySetInnerHTML")u=b;else if(!(c in S)){if(c=="value"&&"defaultValue"in S||c=="checked"&&"defaultChecked"in S)continue;_e(e,c,null,b,o)}}for(c in S)b=S[c],c=="children"?h=b:c=="dangerouslySetInnerHTML"?p=b:c=="value"?g=b:c=="checked"?x=b:s&&typeof b!="function"||y[c]===b||_e(e,c,b,y[c],o);if(p)s||u&&(p.__html==u.__html||p.__html==e.innerHTML)||(e.innerHTML=p.__html),t.__k=[];else if(u&&(e.innerHTML=""),nn(t.type=="template"?e.content:e,Fe(h)?h:[h],t,n,r,w=="foreignObject"?"http://www.w3.org/1999/xhtml":o,a,i,a?a[0]:n.__k&&ae(n,0),s,f),a!=null)for(c=a.length;c--;)it(a[c]);s||(c="value",w=="progress"&&g==null?e.removeAttribute("value"):g!=null&&(g!==e[c]||w=="progress"&&!g||w=="option"&&g!=y[c])&&_e(e,c,g,y[c],o),c="checked",x!=null&&x!=e[c]&&_e(e,c,x,y[c],o))}return e}function st(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){R.__e(o,n)}}function sn(e,t,n){var r,o;if(R.unmount&&R.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||st(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(a){R.__e(a,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&sn(r[o],t,n||typeof e.type!="function");n||it(e.__e),e.__c=e.__=e.__e=void 0}function or(e,t,n){return this.constructor(e,n)}function Ie(e,t,n){var r,o,a,i;t==document&&(t=document.documentElement),R.__&&R.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,a=[],i=[],at(t,e=(!r&&n||t).__k=ie(ne,null,[e]),o||pe,pe,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?be.call(t.childNodes):null,a,!r&&n?n:o?o.__e:t.firstChild,r,i),on(a,e,i)}function ln(e,t){Ie(e,t,ln)}function cn(e,t,n){var r,o,a,i,s=Y({},e.props);for(a in e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)a=="key"?r=t[a]:a=="ref"?o=t[a]:s[a]=t[a]===void 0&&i!=null?i[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?be.call(arguments,2):n),fe(e.type,s,r||e.key,o||e.ref,null)}be=en.slice,R={__e:function(e,t,n,r){for(var o,a,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((a=o.constructor)&&a.getDerivedStateFromError!=null&&(o.setState(a.getDerivedStateFromError(e)),i=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(s){e=s}throw e}},Kt=0,Le.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Y({},this.state),typeof e=="function"&&(e=e(Y({},n),this.props)),e&&Y(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),St(this))},Le.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),St(this))},Le.prototype.render=ne,Z=[],Xt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Zt=function(e,t){return e.__v.__b-t.__v.__b},ve.__r=0,Qt=/(PointerCapture)$|Capture$/i,ot=0,Ye=wt(!1),Ge=wt(!0);var ir=0;function d(e,t,n,r,o,a){t||(t={});var i,s,f=t;if("ref"in f)for(s in f={},t)s=="ref"?i=t[s]:f[s]=t[s];var c={type:e,props:f,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--ir,__i:-1,__u:0,__source:o,__self:a};if(typeof e=="function"&&(i=e.defaultProps))for(s in i)f[s]===void 0&&(f[s]=i[s]);return R.vnode&&R.vnode(c),c}var he,F,je,At,Me=0,dn=[],D=R,kt=D.__b,Et=D.__r,Ct=D.diffed,vt=D.__c,Mt=D.unmount,Tt=D.__;function lt(e,t){D.__h&&D.__h(F,e,Me||t),Me=0;var n=F.__H||(F.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function B(e){return Me=1,ar(fn,e)}function ar(e,t,n){var r=lt(he++,2);if(r.t=e,!r.__c&&(r.__=[fn(void 0,t),function(s){var f=r.__N?r.__N[0]:r.__[0],c=r.t(f,s);f!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=F,!F.__f)){var o=function(s,f,c){if(!r.__c.__H)return!0;var p=r.__c.__H.__.filter(function(h){return!!h.__c});if(p.every(function(h){return!h.__N}))return!a||a.call(this,s,f,c);var u=r.__c.props!==s;return p.forEach(function(h){if(h.__N){var b=h.__[0];h.__=h.__N,h.__N=void 0,b!==h.__[0]&&(u=!0)}}),a&&a.call(this,s,f,c)||u};F.__f=!0;var a=F.shouldComponentUpdate,i=F.componentWillUpdate;F.componentWillUpdate=function(s,f,c){if(this.__e){var p=a;a=void 0,o(s,f,c),a=p}i&&i.call(this,s,f,c)},F.shouldComponentUpdate=o}return r.__N||r.__}function q(e,t){var n=lt(he++,3);!D.__s&&un(n.__H,t)&&(n.__=e,n.u=t,F.__H.__h.push(n))}function me(e){return Me=5,sr(function(){return{current:e}},[])}function sr(e,t){var n=lt(he++,7);return un(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function lr(){for(var e;e=dn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(we),e.__H.__h.forEach(Ke),e.__H.__h=[]}catch(t){e.__H.__h=[],D.__e(t,e.__v)}}D.__b=function(e){F=null,kt&&kt(e)},D.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Tt&&Tt(e,t)},D.__r=function(e){Et&&Et(e),he=0;var t=(F=e.__c).__H;t&&(je===F?(t.__h=[],F.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(we),t.__h.forEach(Ke),t.__h=[],he=0)),je=F},D.diffed=function(e){Ct&&Ct(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(dn.push(t)!==1&&At===D.requestAnimationFrame||((At=D.requestAnimationFrame)||cr)(lr)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),je=F=null},D.__c=function(e,t){t.some(function(n){try{n.__h.forEach(we),n.__h=n.__h.filter(function(r){return!r.__||Ke(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],D.__e(r,n.__v)}}),vt&&vt(e,t)},D.unmount=function(e){Mt&&Mt(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{we(r)}catch(o){t=o}}),n.__H=void 0,t&&D.__e(t,n.__v))};var Bt=typeof requestAnimationFrame=="function";function cr(e){var t,n=function(){clearTimeout(r),Bt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Bt&&(t=requestAnimationFrame(n))}function we(e){var t=F,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),F=t}function Ke(e){var t=F;e.__c=e.__(),F=t}function un(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function fn(e,t){return typeof t=="function"?t(e):t}var De=(e=>(e.ZH="zh",e.EN="en",e))(De||{}),O=(e=>(e.WHITE="white",e.DARK="dark",e))(O||{}),oe=(e=>(e.DEV="dev",e.DEVELOPMENT="development",e.TEST="test",e.PROD="prod",e.PRODUCTION="production",e))(oe||{}),l=(e=>(e.SMALL="small",e.MEDIUM="medium",e))(l||{});function pn(e,t){return function(){return e.apply(t,arguments)}}const{toString:dr}=Object.prototype,{getPrototypeOf:ct}=Object,{iterator:Oe,toStringTag:hn}=Symbol,ze=(e=>t=>{const n=dr.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),J=e=>(e=e.toLowerCase(),t=>ze(t)===e),Pe=e=>t=>typeof t===e,{isArray:se}=Array,ge=Pe("undefined");function ur(e){return e!==null&&!ge(e)&&e.constructor!==null&&!ge(e.constructor)&&H(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const mn=J("ArrayBuffer");function fr(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&mn(e.buffer),t}const pr=Pe("string"),H=Pe("function"),gn=Pe("number"),Ne=e=>e!==null&&typeof e=="object",hr=e=>e===!0||e===!1,Ae=e=>{if(ze(e)!=="object")return!1;const t=ct(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(hn in e)&&!(Oe in e)},mr=J("Date"),gr=J("File"),br=J("Blob"),yr=J("FileList"),xr=e=>Ne(e)&&H(e.pipe),_r=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||H(e.append)&&((t=ze(e))==="formdata"||t==="object"&&H(e.toString)&&e.toString()==="[object FormData]"))},Sr=J("URLSearchParams"),[Lr,wr,Ar,kr]=["ReadableStream","Request","Response","Headers"].map(J),Er=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ye(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 a=n?Object.getOwnPropertyNames(e):Object.keys(e),i=a.length;let s;for(r=0;r<i;r++)s=a[r],t.call(null,e[s],s,e)}}function bn(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,yn=e=>!ge(e)&&e!==Q;function Xe(){const{caseless:e}=yn(this)&&this||{},t={},n=(r,o)=>{const a=e&&bn(t,o)||o;Ae(t[a])&&Ae(r)?t[a]=Xe(t[a],r):Ae(r)?t[a]=Xe({},r):se(r)?t[a]=r.slice():t[a]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&ye(arguments[r],n);return t}const Cr=(e,t,n,{allOwnKeys:r}={})=>(ye(t,(o,a)=>{n&&H(o)?e[a]=pn(o,n):e[a]=o},{allOwnKeys:r}),e),vr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Mr=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Tr=(e,t,n,r)=>{let o,a,i;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)i=o[a],(!r||r(i,e,t))&&!s[i]&&(t[i]=e[i],s[i]=!0);e=n!==!1&&ct(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Br=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Rr=e=>{if(!e)return null;if(se(e))return e;let t=e.length;if(!gn(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Fr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ct(Uint8Array)),Ir=(e,t)=>{const r=(e&&e[Oe]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},Dr=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Or=J("HTMLFormElement"),zr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Rt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Pr=J("RegExp"),xn=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ye(n,(o,a)=>{let i;(i=t(o,a,e))!==!1&&(r[a]=i||o)}),Object.defineProperties(e,r)},Nr=e=>{xn(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+"'")})}})},Ur=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return se(e)?r(e):r(String(e).split(t)),n},$r=()=>{},Wr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Hr(e){return!!(e&&H(e.append)&&e[hn]==="FormData"&&e[Oe])}const jr=e=>{const t=new Array(10),n=(r,o)=>{if(Ne(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const a=se(r)?[]:{};return ye(r,(i,s)=>{const f=n(i,o+1);!ge(f)&&(a[s]=f)}),t[o]=void 0,a}}return r};return n(e,0)},qr=J("AsyncFunction"),Jr=e=>e&&(Ne(e)||H(e))&&H(e.then)&&H(e.catch),_n=((e,t)=>e?setImmediate:t?((n,r)=>(Q.addEventListener("message",({source:o,data:a})=>{o===Q&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Q.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",H(Q.postMessage)),Vr=typeof queueMicrotask<"u"?queueMicrotask.bind(Q):typeof process<"u"&&process.nextTick||_n,Yr=e=>e!=null&&H(e[Oe]),m={isArray:se,isArrayBuffer:mn,isBuffer:ur,isFormData:_r,isArrayBufferView:fr,isString:pr,isNumber:gn,isBoolean:hr,isObject:Ne,isPlainObject:Ae,isReadableStream:Lr,isRequest:wr,isResponse:Ar,isHeaders:kr,isUndefined:ge,isDate:mr,isFile:gr,isBlob:br,isRegExp:Pr,isFunction:H,isStream:xr,isURLSearchParams:Sr,isTypedArray:Fr,isFileList:yr,forEach:ye,merge:Xe,extend:Cr,trim:Er,stripBOM:vr,inherits:Mr,toFlatObject:Tr,kindOf:ze,kindOfTest:J,endsWith:Br,toArray:Rr,forEachEntry:Ir,matchAll:Dr,isHTMLForm:Or,hasOwnProperty:Rt,hasOwnProp:Rt,reduceDescriptors:xn,freezeMethods:Nr,toObjectSet:Ur,toCamelCase:zr,noop:$r,toFiniteNumber:Wr,findKey:bn,global:Q,isContextDefined:yn,isSpecCompliantForm:Hr,toJSONObject:jr,isAsyncFn:qr,isThenable:Jr,setImmediate:_n,asap:Vr,isIterable:Yr};function C(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)}m.inherits(C,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:m.toJSONObject(this.config),code:this.code,status:this.status}}});const Sn=C.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(C,Ln);Object.defineProperty(Sn,"isAxiosError",{value:!0});C.from=(e,t,n,r,o,a)=>{const i=Object.create(Sn);return m.toFlatObject(e,i,function(f){return f!==Error.prototype},s=>s!=="isAxiosError"),C.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,a&&Object.assign(i,a),i};const Gr=null;function Ze(e){return m.isPlainObject(e)||m.isArray(e)}function wn(e){return m.endsWith(e,"[]")?e.slice(0,-2):e}function Ft(e,t,n){return e?e.concat(t).map(function(o,a){return o=wn(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function Kr(e){return m.isArray(e)&&!e.some(Ze)}const Xr=m.toFlatObject(m,{},null,function(t){return/^is[A-Z]/.test(t)});function Ue(e,t,n){if(!m.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=m.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,y){return!m.isUndefined(y[x])});const r=n.metaTokens,o=n.visitor||p,a=n.dots,i=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&m.isSpecCompliantForm(t);if(!m.isFunction(o))throw new TypeError("visitor must be a function");function c(g){if(g===null)return"";if(m.isDate(g))return g.toISOString();if(m.isBoolean(g))return g.toString();if(!f&&m.isBlob(g))throw new C("Blob is not supported. Use a Buffer instead.");return m.isArrayBuffer(g)||m.isTypedArray(g)?f&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function p(g,x,y){let S=g;if(g&&!y&&typeof g=="object"){if(m.endsWith(x,"{}"))x=r?x:x.slice(0,-2),g=JSON.stringify(g);else if(m.isArray(g)&&Kr(g)||(m.isFileList(g)||m.endsWith(x,"[]"))&&(S=m.toArray(g)))return x=wn(x),S.forEach(function(M,L){!(m.isUndefined(M)||M===null)&&t.append(i===!0?Ft([x],L,a):i===null?x:x+"[]",c(M))}),!1}return Ze(g)?!0:(t.append(Ft(y,x,a),c(g)),!1)}const u=[],h=Object.assign(Xr,{defaultVisitor:p,convertValue:c,isVisitable:Ze});function b(g,x){if(!m.isUndefined(g)){if(u.indexOf(g)!==-1)throw Error("Circular reference detected in "+x.join("."));u.push(g),m.forEach(g,function(S,w){(!(m.isUndefined(S)||S===null)&&o.call(t,S,m.isString(w)?w.trim():w,x,h))===!0&&b(S,x?x.concat(w):[w])}),u.pop()}}if(!m.isObject(e))throw new TypeError("data must be an object");return b(e),t}function It(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function dt(e,t){this._pairs=[],e&&Ue(e,this,t)}const An=dt.prototype;An.append=function(t,n){this._pairs.push([t,n])};An.toString=function(t){const n=t?function(r){return t.call(this,r,It)}:It;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Zr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function kn(e,t,n){if(!t)return e;const r=n&&n.encode||Zr;m.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let a;if(o?a=o(t,n):a=m.isURLSearchParams(t)?t.toString():new dt(t,n).toString(r),a){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Dt{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){m.forEach(this.handlers,function(r){r!==null&&t(r)})}}const En={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Qr=typeof URLSearchParams<"u"?URLSearchParams:dt,eo=typeof FormData<"u"?FormData:null,to=typeof Blob<"u"?Blob:null,no={isBrowser:!0,classes:{URLSearchParams:Qr,FormData:eo,Blob:to},protocols:["http","https","file","blob","url","data"]},ut=typeof window<"u"&&typeof document<"u",Qe=typeof navigator=="object"&&navigator||void 0,ro=ut&&(!Qe||["ReactNative","NativeScript","NS"].indexOf(Qe.product)<0),oo=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",io=ut&&window.location.href||"http://localhost",ao=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ut,hasStandardBrowserEnv:ro,hasStandardBrowserWebWorkerEnv:oo,navigator:Qe,origin:io},Symbol.toStringTag,{value:"Module"})),P={...ao,...no};function so(e,t){return Ue(e,new P.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,a){return P.isNode&&m.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function lo(e){return m.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function co(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function Cn(e){function t(n,r,o,a){let i=n[a++];if(i==="__proto__")return!0;const s=Number.isFinite(+i),f=a>=n.length;return i=!i&&m.isArray(o)?o.length:i,f?(m.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!s):((!o[i]||!m.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],a)&&m.isArray(o[i])&&(o[i]=co(o[i])),!s)}if(m.isFormData(e)&&m.isFunction(e.entries)){const n={};return m.forEachEntry(e,(r,o)=>{t(lo(r),o,n,0)}),n}return null}function uo(e,t,n){if(m.isString(e))try{return(t||JSON.parse)(e),m.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const xe={transitional:En,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=m.isObject(t);if(a&&m.isHTMLForm(t)&&(t=new FormData(t)),m.isFormData(t))return o?JSON.stringify(Cn(t)):t;if(m.isArrayBuffer(t)||m.isBuffer(t)||m.isStream(t)||m.isFile(t)||m.isBlob(t)||m.isReadableStream(t))return t;if(m.isArrayBufferView(t))return t.buffer;if(m.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return so(t,this.formSerializer).toString();if((s=m.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return Ue(s?{"files[]":t}:t,f&&new f,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),uo(t)):t}],transformResponse:[function(t){const n=this.transitional||xe.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(m.isResponse(t)||m.isReadableStream(t))return t;if(t&&m.isString(t)&&(r&&!this.responseType||o)){const i=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(i)throw s.name==="SyntaxError"?C.from(s,C.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:P.classes.FormData,Blob:P.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};m.forEach(["delete","get","head","post","put","patch"],e=>{xe.headers[e]={}});const fo=m.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"]),po=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]&&fo[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Ot=Symbol("internals");function ue(e){return e&&String(e).trim().toLowerCase()}function ke(e){return e===!1||e==null?e:m.isArray(e)?e.map(ke):String(e)}function ho(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 mo=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function qe(e,t,n,r,o){if(m.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!m.isString(t)){if(m.isString(r))return t.indexOf(r)!==-1;if(m.isRegExp(r))return r.test(t)}}function go(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function bo(e,t){const n=m.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,a,i){return this[r].call(this,t,o,a,i)},configurable:!0})})}let j=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(s,f,c){const p=ue(f);if(!p)throw new Error("header name must be a non-empty string");const u=m.findKey(o,p);(!u||o[u]===void 0||c===!0||c===void 0&&o[u]!==!1)&&(o[u||f]=ke(s))}const i=(s,f)=>m.forEach(s,(c,p)=>a(c,p,f));if(m.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(m.isString(t)&&(t=t.trim())&&!mo(t))i(po(t),n);else if(m.isObject(t)&&m.isIterable(t)){let s={},f,c;for(const p of t){if(!m.isArray(p))throw TypeError("Object iterator must return a key-value pair");s[c=p[0]]=(f=s[c])?m.isArray(f)?[...f,p[1]]:[f,p[1]]:p[1]}i(s,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=ue(t),t){const r=m.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return ho(o);if(m.isFunction(n))return n.call(this,o,r);if(m.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ue(t),t){const r=m.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||qe(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(i){if(i=ue(i),i){const s=m.findKey(r,i);s&&(!n||qe(r,r[s],s,n))&&(delete r[s],o=!0)}}return m.isArray(t)?t.forEach(a):a(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const a=n[r];(!t||qe(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return m.forEach(this,(o,a)=>{const i=m.findKey(r,a);if(i){n[i]=ke(o),delete n[a];return}const s=t?go(a):String(a).trim();s!==a&&delete n[a],n[s]=ke(o),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return m.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&m.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[Ot]=this[Ot]={accessors:{}}).accessors,o=this.prototype;function a(i){const s=ue(i);r[s]||(bo(o,i),r[s]=!0)}return m.isArray(t)?t.forEach(a):a(t),this}};j.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);m.reduceDescriptors(j.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});m.freezeMethods(j);function Je(e,t){const n=this||xe,r=t||n,o=j.from(r.headers);let a=r.data;return m.forEach(e,function(s){a=s.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function vn(e){return!!(e&&e.__CANCEL__)}function le(e,t,n){C.call(this,e??"canceled",C.ERR_CANCELED,t,n),this.name="CanceledError"}m.inherits(le,C,{__CANCEL__:!0});function Mn(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new C("Request failed with status code "+n.status,[C.ERR_BAD_REQUEST,C.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function yo(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function xo(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,i;return t=t!==void 0?t:1e3,function(f){const c=Date.now(),p=r[a];i||(i=c),n[o]=f,r[o]=c;let u=a,h=0;for(;u!==o;)h+=n[u++],u=u%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),c-i<t)return;const b=p&&c-p;return b?Math.round(h*1e3/b):void 0}}function _o(e,t){let n=0,r=1e3/t,o,a;const i=(c,p=Date.now())=>{n=p,o=null,a&&(clearTimeout(a),a=null),e.apply(null,c)};return[(...c)=>{const p=Date.now(),u=p-n;u>=r?i(c,p):(o=c,a||(a=setTimeout(()=>{a=null,i(o)},r-u)))},()=>o&&i(o)]}const Te=(e,t,n=3)=>{let r=0;const o=xo(50,250);return _o(a=>{const i=a.loaded,s=a.lengthComputable?a.total:void 0,f=i-r,c=o(f),p=i<=s;r=i;const u={loaded:i,total:s,progress:s?i/s:void 0,bytes:f,rate:c||void 0,estimated:c&&s&&p?(s-i)/c:void 0,event:a,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(u)},n)},zt=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Pt=e=>(...t)=>m.asap(()=>e(...t)),So=P.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,P.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(P.origin),P.navigator&&/(msie|trident)/i.test(P.navigator.userAgent)):()=>!0,Lo=P.hasStandardBrowserEnv?{write(e,t,n,r,o,a){const i=[e+"="+encodeURIComponent(t)];m.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),m.isString(r)&&i.push("path="+r),m.isString(o)&&i.push("domain="+o),a===!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 wo(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ao(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Tn(e,t,n){let r=!wo(t);return e&&(r||n==!1)?Ao(e,t):t}const Nt=e=>e instanceof j?{...e}:e;function te(e,t){t=t||{};const n={};function r(c,p,u,h){return m.isPlainObject(c)&&m.isPlainObject(p)?m.merge.call({caseless:h},c,p):m.isPlainObject(p)?m.merge({},p):m.isArray(p)?p.slice():p}function o(c,p,u,h){if(m.isUndefined(p)){if(!m.isUndefined(c))return r(void 0,c,u,h)}else return r(c,p,u,h)}function a(c,p){if(!m.isUndefined(p))return r(void 0,p)}function i(c,p){if(m.isUndefined(p)){if(!m.isUndefined(c))return r(void 0,c)}else return r(void 0,p)}function s(c,p,u){if(u in t)return r(c,p);if(u in e)return r(void 0,c)}const f={url:a,method:a,data:a,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:s,headers:(c,p,u)=>o(Nt(c),Nt(p),u,!0)};return m.forEach(Object.keys(Object.assign({},e,t)),function(p){const u=f[p]||o,h=u(e[p],t[p],p);m.isUndefined(h)&&u!==s||(n[p]=h)}),n}const Bn=e=>{const t=te({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:i,auth:s}=t;t.headers=i=j.from(i),t.url=kn(Tn(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&i.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let f;if(m.isFormData(n)){if(P.hasStandardBrowserEnv||P.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((f=i.getContentType())!==!1){const[c,...p]=f?f.split(";").map(u=>u.trim()).filter(Boolean):[];i.setContentType([c||"multipart/form-data",...p].join("; "))}}if(P.hasStandardBrowserEnv&&(r&&m.isFunction(r)&&(r=r(t)),r||r!==!1&&So(t.url))){const c=o&&a&&Lo.read(a);c&&i.set(o,c)}return t},ko=typeof XMLHttpRequest<"u",Eo=ko&&function(e){return new Promise(function(n,r){const o=Bn(e);let a=o.data;const i=j.from(o.headers).normalize();let{responseType:s,onUploadProgress:f,onDownloadProgress:c}=o,p,u,h,b,g;function x(){b&&b(),g&&g(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let y=new XMLHttpRequest;y.open(o.method.toUpperCase(),o.url,!0),y.timeout=o.timeout;function S(){if(!y)return;const M=j.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),A={data:!s||s==="text"||s==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:M,config:e,request:y};Mn(function(z){n(z),x()},function(z){r(z),x()},A),y=null}"onloadend"in y?y.onloadend=S:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(S)},y.onabort=function(){y&&(r(new C("Request aborted",C.ECONNABORTED,e,y)),y=null)},y.onerror=function(){r(new C("Network Error",C.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let L=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const A=o.transitional||En;o.timeoutErrorMessage&&(L=o.timeoutErrorMessage),r(new C(L,A.clarifyTimeoutError?C.ETIMEDOUT:C.ECONNABORTED,e,y)),y=null},a===void 0&&i.setContentType(null),"setRequestHeader"in y&&m.forEach(i.toJSON(),function(L,A){y.setRequestHeader(A,L)}),m.isUndefined(o.withCredentials)||(y.withCredentials=!!o.withCredentials),s&&s!=="json"&&(y.responseType=o.responseType),c&&([h,g]=Te(c,!0),y.addEventListener("progress",h)),f&&y.upload&&([u,b]=Te(f),y.upload.addEventListener("progress",u),y.upload.addEventListener("loadend",b)),(o.cancelToken||o.signal)&&(p=M=>{y&&(r(!M||M.type?new le(null,e,y):M),y.abort(),y=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const w=yo(o.url);if(w&&P.protocols.indexOf(w)===-1){r(new C("Unsupported protocol "+w+":",C.ERR_BAD_REQUEST,e));return}y.send(a||null)})},Co=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const a=function(c){if(!o){o=!0,s();const p=c instanceof Error?c:this.reason;r.abort(p instanceof C?p:new le(p instanceof Error?p.message:p))}};let i=t&&setTimeout(()=>{i=null,a(new C(`timeout ${t} of ms exceeded`,C.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(a):c.removeEventListener("abort",a)}),e=null)};e.forEach(c=>c.addEventListener("abort",a));const{signal:f}=r;return f.unsubscribe=()=>m.asap(s),f}},vo=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},Mo=async function*(e,t){for await(const n of To(e))yield*vo(n,t)},To=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()}},Ut=(e,t,n,r)=>{const o=Mo(e,t);let a=0,i,s=f=>{i||(i=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:c,value:p}=await o.next();if(c){s(),f.close();return}let u=p.byteLength;if(n){let h=a+=u;n(h)}f.enqueue(new Uint8Array(p))}catch(c){throw s(c),c}},cancel(f){return s(f),o.return()}},{highWaterMark:2})},$e=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Rn=$e&&typeof ReadableStream=="function",Bo=$e&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Fn=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Ro=Rn&&Fn(()=>{let e=!1;const t=new Request(P.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),$t=64*1024,et=Rn&&Fn(()=>m.isReadableStream(new Response("").body)),Be={stream:et&&(e=>e.body)};$e&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Be[t]&&(Be[t]=m.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new C(`Response type '${t}' is not supported`,C.ERR_NOT_SUPPORT,r)})})})(new Response);const Fo=async e=>{if(e==null)return 0;if(m.isBlob(e))return e.size;if(m.isSpecCompliantForm(e))return(await new Request(P.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(m.isArrayBufferView(e)||m.isArrayBuffer(e))return e.byteLength;if(m.isURLSearchParams(e)&&(e=e+""),m.isString(e))return(await Bo(e)).byteLength},Io=async(e,t)=>{const n=m.toFiniteNumber(e.getContentLength());return n??Fo(t)},Do=$e&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:a,timeout:i,onDownloadProgress:s,onUploadProgress:f,responseType:c,headers:p,withCredentials:u="same-origin",fetchOptions:h}=Bn(e);c=c?(c+"").toLowerCase():"text";let b=Co([o,a&&a.toAbortSignal()],i),g;const x=b&&b.unsubscribe&&(()=>{b.unsubscribe()});let y;try{if(f&&Ro&&n!=="get"&&n!=="head"&&(y=await Io(p,r))!==0){let A=new Request(t,{method:"POST",body:r,duplex:"half"}),T;if(m.isFormData(r)&&(T=A.headers.get("content-type"))&&p.setContentType(T),A.body){const[z,N]=zt(y,Te(Pt(f)));r=Ut(A.body,$t,z,N)}}m.isString(u)||(u=u?"include":"omit");const S="credentials"in Request.prototype;g=new Request(t,{...h,signal:b,method:n.toUpperCase(),headers:p.normalize().toJSON(),body:r,duplex:"half",credentials:S?u:void 0});let w=await fetch(g,h);const M=et&&(c==="stream"||c==="response");if(et&&(s||M&&x)){const A={};["status","statusText","headers"].forEach($=>{A[$]=w[$]});const T=m.toFiniteNumber(w.headers.get("content-length")),[z,N]=s&&zt(T,Te(Pt(s),!0))||[];w=new Response(Ut(w.body,$t,z,()=>{N&&N(),x&&x()}),A)}c=c||"text";let L=await Be[m.findKey(Be,c)||"text"](w,e);return!M&&x&&x(),await new Promise((A,T)=>{Mn(A,T,{data:L,headers:j.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:g})})}catch(S){throw x&&x(),S&&S.name==="TypeError"&&/Load failed|fetch/i.test(S.message)?Object.assign(new C("Network Error",C.ERR_NETWORK,e,g),{cause:S.cause||S}):C.from(S,S&&S.code,e,g)}}),tt={http:Gr,xhr:Eo,fetch:Do};m.forEach(tt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Wt=e=>`- ${e}`,Oo=e=>m.isFunction(e)||e===null||e===!1,In={getAdapter:e=>{e=m.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let a=0;a<t;a++){n=e[a];let i;if(r=n,!Oo(n)&&(r=tt[(i=String(n)).toLowerCase()],r===void 0))throw new C(`Unknown adapter '${i}'`);if(r)break;o[i||"#"+a]=r}if(!r){const a=Object.entries(o).map(([s,f])=>`adapter ${s} `+(f===!1?"is not supported by the environment":"is not available in the build"));let i=t?a.length>1?`since :
4
+ `+a.map(Wt).join(`
5
+ `):" "+Wt(a[0]):"as no adapter specified";throw new C("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:tt};function Ve(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new le(null,e)}function Ht(e){return Ve(e),e.headers=j.from(e.headers),e.data=Je.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),In.getAdapter(e.adapter||xe.adapter)(e).then(function(r){return Ve(e),r.data=Je.call(e,e.transformResponse,r),r.headers=j.from(r.headers),r},function(r){return vn(r)||(Ve(e),r&&r.response&&(r.response.data=Je.call(e,e.transformResponse,r.response),r.response.headers=j.from(r.response.headers))),Promise.reject(r)})}const Dn="1.10.0",We={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{We[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const jt={};We.transitional=function(t,n,r){function o(a,i){return"[Axios v"+Dn+"] Transitional option '"+a+"'"+i+(r?". "+r:"")}return(a,i,s)=>{if(t===!1)throw new C(o(i," has been removed"+(n?" in "+n:"")),C.ERR_DEPRECATED);return n&&!jt[i]&&(jt[i]=!0,console.warn(o(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,i,s):!0}};We.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function zo(e,t,n){if(typeof e!="object")throw new C("options must be an object",C.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],i=t[a];if(i){const s=e[a],f=s===void 0||i(s,a,e);if(f!==!0)throw new C("option "+a+" must be "+f,C.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new C("Unknown option "+a,C.ERR_BAD_OPTION)}}const Ee={assertOptions:zo,validators:We},V=Ee.validators;let ee=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Dt,response:new Dt}}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 a=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
6
+ `+a):r.stack=a}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:a}=n;r!==void 0&&Ee.assertOptions(r,{silentJSONParsing:V.transitional(V.boolean),forcedJSONParsing:V.transitional(V.boolean),clarifyTimeoutError:V.transitional(V.boolean)},!1),o!=null&&(m.isFunction(o)?n.paramsSerializer={serialize:o}:Ee.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),Ee.assertOptions(n,{baseUrl:V.spelling("baseURL"),withXsrfToken:V.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=a&&m.merge(a.common,a[n.method]);a&&m.forEach(["delete","get","head","post","put","patch","common"],g=>{delete a[g]}),n.headers=j.concat(i,a);const s=[];let f=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(n)===!1||(f=f&&x.synchronous,s.unshift(x.fulfilled,x.rejected))});const c=[];this.interceptors.response.forEach(function(x){c.push(x.fulfilled,x.rejected)});let p,u=0,h;if(!f){const g=[Ht.bind(this),void 0];for(g.unshift.apply(g,s),g.push.apply(g,c),h=g.length,p=Promise.resolve(n);u<h;)p=p.then(g[u++],g[u++]);return p}h=s.length;let b=n;for(u=0;u<h;){const g=s[u++],x=s[u++];try{b=g(b)}catch(y){x.call(this,y);break}}try{p=Ht.call(this,b)}catch(g){return Promise.reject(g)}for(u=0,h=c.length;u<h;)p=p.then(c[u++],c[u++]);return p}getUri(t){t=te(this.defaults,t);const n=Tn(t.baseURL,t.url,t.allowAbsoluteUrls);return kn(n,t.params,t.paramsSerializer)}};m.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}))}});m.forEach(["post","put","patch"],function(t){function n(r){return function(a,i,s){return this.request(te(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}ee.prototype[t]=n(),ee.prototype[t+"Form"]=n(!0)});let Po=class On{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const i=new Promise(s=>{r.subscribe(s),a=s}).then(o);return i.cancel=function(){r.unsubscribe(a)},i},t(function(a,i,s){r.reason||(r.reason=new le(a,i,s),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 On(function(o){t=o}),cancel:t}}};function No(e){return function(n){return e.apply(null,n)}}function Uo(e){return m.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 zn(e){const t=new ee(e),n=pn(ee.prototype.request,t);return m.extend(n,ee.prototype,t,{allOwnKeys:!0}),m.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return zn(te(e,o))},n}const I=zn(xe);I.Axios=ee;I.CanceledError=le;I.CancelToken=Po;I.isCancel=vn;I.VERSION=Dn;I.toFormData=Ue;I.AxiosError=C;I.Cancel=I.CanceledError;I.all=function(t){return Promise.all(t)};I.spread=No;I.isAxiosError=Uo;I.mergeConfig=te;I.AxiosHeaders=j;I.formToJSON=e=>Cn(m.isHTMLForm(e)?new FormData(e):e);I.getAdapter=In.getAdapter;I.HttpStatusCode=nt;I.default=I;const{Axios:aa,AxiosError:sa,CanceledError:la,isCancel:ca,CancelToken:da,VERSION:ua,all:fa,Cancel:pa,isAxiosError:ha,spread:ma,toFormData:ga,AxiosHeaders:ba,HttpStatusCode:ya,formToJSON:xa,getAdapter:_a,mergeConfig:Sa}=I;function $o(e={}){const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");console.log("fundUnitParams",t);const{env:n}=t;let r;switch(n){case oe.DEV:case oe.DEVELOPMENT:r="/api";break;case oe.TEST:r="https://fund.bestfulfill.tech/api/sdk";break;case oe.PROD:case oe.PRODUCTION:default:r="https://fund.bestfulfill.com/api/sdk";break}const{baseURL:o=r,timeout:a=1e4,onError:i}=e,s=I.create({baseURL:o,timeout:a});return s.interceptors.request.use(f=>{const{token:c,locale:p}=t;return f.headers={...f.headers,Authorization:c,"x-locale":p===De.ZH?"zh-CN":"en-US"},f}),s.interceptors.response.use(f=>{if(f.data&&f.data.code===0)return f.data;const c=f.data?.msg||f.data?.message||"未知错误";return Re.error(c),i&&i(c,f),Promise.reject(f.data||{message:"未知错误"})},f=>{const c=f.response?.data?.msg||f.response?.data?.message||f.message||"网络请求失败";return Re.error(c),i&&i(c,f),Promise.reject(f)}),s}let Ce=null;function X(){return Ce||(Ce=$o()),Ce}function Wo(){Ce=null}function Pn(){const e=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return X().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,currBalance:n.curr_balance,pendingAmount:n.pending_amount,status:n.status,createdAt:n.created_at};return sessionStorage.setItem("balanceData",JSON.stringify(r)),r})}const Ho=async()=>X().get("/all-dicts",{}).then(e=>(sessionStorage.setItem("all_dicts",JSON.stringify(e.data)),e.data||{})),jo=async(e,t)=>X().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||""),Nn=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_date:e.transferDate,transfer_channel:e.transferChannel,payer_name:e.payerName,voucher_urls:e.voucherUrls};return X().post("/offline/recharge/create",n,{})},Un=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 X().post("/online/recharge/create",n,{}).then(r=>r.data.redirect_url)},$n=async e=>X().get("/calc-payment-amount",{params:e}).then(t=>{const n=t.data;return{paymentAmount:n.payment_amount,fee:n.fee,currency:n.currency}}),Wn=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return X().get("/channel/info",{params:{code:e.code,biz_type:t.bizType}}).then(n=>n.data?.detail||[])},qo=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return X().get("/offline/channel/map",{params:{currency:e.currency,biz_type:t.bizType}}).then(n=>({onlineChannel:n.data?.online_channels.map(r=>({value:r.value,label:r.label,icon:r.icon}))||[],offlineChannel:n.data?.offline_channels.map(r=>({value:r.value,label:r.label,icon:r.icon}))||[]}))};async function Jo(){return await Pn()}function Vo(e){const{merchant_id:t,biz_type:n,fund_balance_id:r,user_id:o,theme:a=O.WHITE,locale:i=De.ZH,env:s,size:f,themeConfig:c}=e;console.log(e,"InitParams1111");const p="Bearer "+e.token;return sessionStorage.setItem("fund_unit_params",JSON.stringify({merchantId:t,bizType:n,fundBalanceId:r,userId:o,token:p,theme:a,locale:i,env:s,size:f,themeConfig:c})),Wo(),Ho(),{token:p,merchantId:t,bizType:n,fundBalanceId:r,userId:o,theme:a,locale:i,env:s,size:f}}function k(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});window.dispatchEvent(e)}const qt={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 Yo(){return k("theme")===O.WHITE?qt.white:qt.dark}class Go{parseArg(t){return typeof t=="string"?{content:t}:t}show(t,n){const{content:r,duration:o,closable:a}=this.parseArg(n),i=Yo(),s=document.createElement("div");if(s.style.cssText=`
7
7
  position: fixed;
8
8
  top: 20px;
9
9
  left: 50%;
@@ -21,43 +21,61 @@
21
21
  gap: 8px;
22
22
  font-size: 14px;
23
23
  color: ${i.color};
24
- `,t==="error"){const l=document.createElementNS("http://www.w3.org/2000/svg","svg");l.setAttribute("width","16"),l.setAttribute("height","16"),l.setAttribute("viewBox","0 0 16 16"),l.innerHTML=`
24
+ `,t==="error"){const c=document.createElementNS("http://www.w3.org/2000/svg","svg");c.setAttribute("width","16"),c.setAttribute("height","16"),c.setAttribute("viewBox","0 0 16 16"),c.innerHTML=`
25
25
  <circle cx="8" cy="8" r="8" fill="#ff4d4f"/>
26
26
  <path d="M10.5 5.5l-5 5m0-5l5 5" stroke="white" stroke-width="1.5" stroke-linecap="round"/>
27
- `,a.appendChild(l)}if(t==="success"){const l=document.createElementNS("http://www.w3.org/2000/svg","svg");l.setAttribute("width","16"),l.setAttribute("height","16"),l.setAttribute("viewBox","0 0 16 16"),l.innerHTML=`
27
+ `,s.appendChild(c)}if(t==="success"){const c=document.createElementNS("http://www.w3.org/2000/svg","svg");c.setAttribute("width","16"),c.setAttribute("height","16"),c.setAttribute("viewBox","0 0 16 16"),c.innerHTML=`
28
28
  <circle cx="8" cy="8" r="8" fill="#52c41a"/>
29
29
  <path d="M5 8.5l2.2 2.2 3.8-3.4" stroke="white" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
30
- `,a.appendChild(l)}if(t==="warning"){const l=document.createElementNS("http://www.w3.org/2000/svg","svg");l.setAttribute("width","16"),l.setAttribute("height","16"),l.setAttribute("viewBox","0 0 16 16"),l.innerHTML=`
30
+ `,s.appendChild(c)}if(t==="warning"){const c=document.createElementNS("http://www.w3.org/2000/svg","svg");c.setAttribute("width","16"),c.setAttribute("height","16"),c.setAttribute("viewBox","0 0 16 16"),c.innerHTML=`
31
31
  <circle cx="8" cy="8" r="8" fill="#faad14"/>
32
32
  <path d="M8 4.5v5" stroke="white" stroke-width="1.5" stroke-linecap="round"/>
33
33
  <circle cx="8" cy="12.5" r="1" fill="white"/>
34
- `,a.appendChild(l)}if(t==="info"){const l=document.createElementNS("http://www.w3.org/2000/svg","svg");l.setAttribute("width","16"),l.setAttribute("height","16"),l.setAttribute("viewBox","0 0 16 16"),l.innerHTML=`
34
+ `,s.appendChild(c)}if(t==="info"){const c=document.createElementNS("http://www.w3.org/2000/svg","svg");c.setAttribute("width","16"),c.setAttribute("height","16"),c.setAttribute("viewBox","0 0 16 16"),c.innerHTML=`
35
35
  <circle cx="8" cy="8" r="8" fill="#1677ff"/>
36
36
  <rect x="7.25" y="7" width="1.5" height="6" rx="0.75" fill="white"/>
37
37
  <rect x="7.25" y="5" width="1.5" height="1.5" rx="0.75" fill="white"/>
38
- `,a.appendChild(l)}const d=document.createElement("div");if(d.textContent=r,d.style.flex="1",d.style.color=i.color,a.appendChild(d),s){const l=document.createElement("button");l.textContent="✕",l.style.cssText=`
38
+ `,s.appendChild(c)}const f=document.createElement("div");if(f.textContent=r,f.style.flex="1",f.style.color=i.color,s.appendChild(f),a){const c=document.createElement("button");c.textContent="✕",c.style.cssText=`
39
39
  background: none;
40
40
  border: none;
41
41
  cursor: pointer;
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 Xe=new xo;function So(e={}){const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");console.log("fundUnitParams",t);const{env:n}=t;let r;switch(n){case Z.DEV:case Z.DEVELOPMENT:r="/api";break;case Z.TEST:r="https://fund.bestfulfill.tech/api/sdk";break;case Z.PROD:case Z.PRODUCTION:default:r="https://fund.bestfulfill.com/api/sdk";break}const{baseURL:o=r,timeout:s=1e4,onError:i}=e,a=R.create({baseURL:o,timeout:s});return a.interceptors.request.use(d=>{const{token:l,locale:f}=t;return d.headers={...d.headers,Authorization:l,"x-locale":f===Pe.ZH?"zh-CN":"en-US"},d}),a.interceptors.response.use(d=>{if(d.data&&d.data.code===0)return d.data;const l=d.data?.msg||d.data?.message||"未知错误";return Xe.error(l),i&&i(l,d),Promise.reject(d.data||{message:"未知错误"})},d=>{const l=d.response?.data?.msg||d.response?.data?.message||d.message||"网络请求失败";return Xe.error(l),i&&i(l,d),Promise.reject(d)}),a}let xe=null;function X(){return xe||(xe=So()),xe}function Lo(){xe=null}function vn(){const e=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return X().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,currBalance:n.curr_balance,pendingAmount:n.pending_amount,status:n.status,createdAt:n.created_at};return sessionStorage.setItem("balanceData",JSON.stringify(r)),r})}const wo=async()=>X().get("/all-dicts",{}).then(e=>(sessionStorage.setItem("all_dicts",JSON.stringify(e.data)),e.data||{})),Ao=async(e,t)=>X().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||""),Eo=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 X().post("/offline/recharge/create",n,{})},vo=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 X().post("/online/recharge/create",n,{}).then(r=>r.data.redirect_url)},ko=async e=>X().get("/calc-payment-amount",{params:e}).then(t=>{const n=t.data;return{paymentAmount:n.payment_amount,fee:n.fee,currency:n.currency}}),To=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return X().get("/channel/info",{params:{code:e.code,biz_type:t.bizType}}).then(n=>n.data?.detail||[])};async function Co(){return await vn()}function Mo(e){const{merchant_id:t,biz_type:n,fund_balance_id:r,user_id:o,theme:s=N.WHITE,locale:i=Pe.ZH,env:a,size:d,themeConfig:l}=e;console.log(e,"InitParams1111");const f="Bearer "+e.token;return sessionStorage.setItem("fund_unit_params",JSON.stringify({merchantId:t,bizType:n,fundBalanceId:r,userId:o,token:f,theme:s,locale:i,env:a,size:d,themeConfig:l})),Lo(),wo(),{token:f,merchantId:t,bizType:n,fundBalanceId:r,userId:o,theme:s,locale:i,env:a,size:d}}function k(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 kn(){const e=new CustomEvent("refresh-balance",{detail:{},bubbles:!0,composed:!0});window.dispatchEvent(e)}const Ro={"/api":{target:"https://fund.bestfulfill.tech/api/sdk",changeOrigin:!0,rewrite:e=>e.replace(/^\/api/,""),secure:!1}};function Bo(){const e=k("size");return{white:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===u.SMALL?"6px 10px":"8px 16px",cursor:"pointer",fontSize:e===u.SMALL?12:16,fontWeight:600},dark:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:e===u.SMALL?"6px 10px":"8px 16px",cursor:"pointer",fontSize:e===u.SMALL?12:16,fontWeight:600}}}function Fo(e){const t=k("theme"),n=k("themeConfig"),r=t===N.WHITE,o=Bo();let s=e;return!s&&n&&(s=(r?n.white:n.dark)?.color),r?{...o.white,background:s||o.white.background}:{...o.dark,background:s||o.dark.background}}function Tn({onClick:e,color:t,children:n}){const r=Fo(t);return m("button",{style:r,onClick:e,type:"button",children:n})}const Oo={"额外费用说明:您的地区、币种、支付卡类型等因素可能会导致手续费的变动,最终手续费以官方为准。":"额外费用说明:您的地区、币种、支付卡类型等因素可能会导致手续费的变动,最终手续费以官方为准。","手续费约为:":"手续费约为:",确定:"确定",提交成功:"提交成功",余额详情:"余额详情",真实金额:"真实金额",冻结金额:"冻结金额",信用额度:"信用额度",已用额度:"已用额度",可用余额:"可用余额",暂无数据:"暂无数据","金额需在1到999999.99之间":"金额需在1到999999.99之间","充值 / 转账":"充值 / 转账",在线充值:"在线充值",线下转账:"线下转账",充值币种:"充值币种",充值金额:"充值金额",支付平台:"支付平台",请选择充值币种:"请选择充值币种",请输入充值金额:"请输入充值金额",请选择支付平台:"请选择支付平台","需要收取手续费,实际支付金额约为:":"需要收取手续费,实际支付金额约为:","提交失败,请重试":"提交失败,请重试","提交中...":"提交中...",去支付:"去支付",取消:"取消",关闭:"关闭",第三方支付平台:"第三方支付平台",交易ID:"交易ID",请输入转账交易ID:"请输入转账交易ID",上传文件:"上传文件",请上传转账凭证:"请上传转账凭证","加载中...":"加载中...",错误:"错误",成功:"成功",必填:"必填","充值/转账":"充值/转账",切换为暗黑主题:"切换为暗黑主题",切换为白色主题:"切换为白色主题",点击或拖拽文件到此处上传:"点击或拖拽文件到此处上传","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传",个文件:"个文件","正在上传...":"正在上传...",已上传:"已上传",移除:"移除"};function Po(e){return Oo[e]||e}const Io={"额外费用说明:您的地区、币种、支付卡类型等因素可能会导致手续费的变动,最终手续费以官方为准。":"Additional note: Your region, currency, and card type may affect the processing fee; the final fee is determined by the provider.","手续费约为:":"Fee approximately: ",确定:"Confirm",提交成功:"Submit Success",余额详情:"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","加载中...":"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 Do(e){return Io[e]||e}function No(){return JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").locale||Pe.ZH}function L(e){return No()==="zh"?Po(e):Do(e)}const Ot={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=k("theme"),t=k("themeConfig"),n=e===N.WHITE,r=n?Ot.white:Ot.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 Ze=({value:e,onChange:t,options:n,placeholder:r,style:o,error:s,disabled:i,dropdownStyle:a,className:d,dropdownClassName:l,children:f})=>{const[c,g]=F(!1),h=Ee(null),[_,y]=F(null),b=zo(),x=k("size");le(()=>{if(!c)return;const w=E=>{h.current&&!h.current.contains(E.target)&&g(!1)};return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[c]);const S=n.find(w=>w.value===e),v=()=>s?b.triggerError:i?b.triggerDisabled:b.trigger;return m("div",{ref:h,className:d,style:{position:"relative",...o},children:[m("style",{children:`
45
+ `,c.onclick=()=>{document.body.removeChild(s)},s.appendChild(c)}document.body.appendChild(s),o!==0&&setTimeout(()=>{document.body.contains(s)&&document.body.removeChild(s)},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 Re=new Go;function Ko(){console.log("npm package test!!!")}function Xo(){console.log("Current time:",new Date().toISOString())}const Zo={"/api":{target:"https://fund.bestfulfill.tech/api/sdk",changeOrigin:!0,rewrite:e=>e.replace(/^\/api/,""),secure:!1}};function Qo(){const e=k("size");return{white:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 10px":"8px 16px",cursor:"pointer",fontSize:e===l.SMALL?12:16,fontWeight:600},dark:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 10px":"8px 16px",cursor:"pointer",fontSize:e===l.SMALL?12:16,fontWeight:600}}}function ei(e){const t=k("theme"),n=k("themeConfig"),r=t===O.WHITE,o=Qo();let a=e;return!a&&n&&(a=(r?n.white:n.dark)?.color),r?{...o.white,background:a||o.white.background}:{...o.dark,background:a||o.dark.background}}function ft({onClick:e,color:t,children:n}){const r=ei(t);return d("button",{style:r,onClick:e,type:"button",children:n})}const ti={"额外费用说明:您的地区、币种、支付卡类型等因素可能会导致手续费的变动,最终手续费以官方为准。":"额外费用说明:您的地区、币种、支付卡类型等因素可能会导致手续费的变动,最终手续费以官方为准。","手续费约为:":"手续费约为:",确定:"确定",提交成功:"提交成功",余额详情:"余额详情",真实金额:"真实金额",冻结金额:"冻结金额",信用额度:"信用额度",已用额度:"已用额度",可用余额:"可用余额",暂无数据:"暂无数据","金额需在1到999999.99之间":"金额需在1到999999.99之间","充值 / 转账":"充值 / 转账",在线充值:"在线充值",线下转账:"线下转账",充值币种:"充值币种",充值金额:"充值金额",支付平台:"支付平台",请选择充值币种:"请选择充值币种",请输入充值金额:"请输入充值金额",请选择支付平台:"请选择支付平台","需要收取手续费,实际支付金额约为:":"需要收取手续费,实际支付金额约为:","提交失败,请重试":"提交失败,请重试","提交中...":"提交中...",去支付:"去支付",取消:"取消",关闭:"关闭",在线支付:"在线支付",选择支付方式:"选择支付方式",支付方式:"支付方式",付款人名称:"付款人名称",支付币种:"支付币种",支付金额:"支付金额",线上支付:"线上支付",立即支付:"立即支付","请在转账后提交银行回单,否则可能无法及时核验":"请在转账后提交银行回单,否则可能无法及时核验","支付金额须与申请金额一致,请勿多付、少付或分批提交。":"支付金额须与申请金额一致,请勿多付、少付或分批提交。","请妥善保存回单并提供准确的支付时间,否则可能无法核验。":"请妥善保存回单并提供准确的支付时间,否则可能无法核验。","工作时间提交4小时内审核,非工作时间将顺延至下一个工作日。":"工作时间提交4小时内审核,非工作时间将顺延至下一个工作日。","如有问题,请联系平台客服。":"如有问题,请联系平台客服。","预付充值将收取平台服务费,具体以官方为准。":"预付充值将收取平台服务费,具体以官方为准。",银行转账:"银行转账",银行名称:"银行名称",账户持有人:"账户持有人",账户号码:"账户号码","SWIFT/BIC代码":"SWIFT/BIC代码",银行代码:"银行代码",银行地址:"银行地址",复制:"复制",复制成功:"复制成功",确认转账详情:"确认转账详情",转账后提交银行回单提示:"请在转账后提交银行回单,否则可能无法及时核验",温馨提示:"温馨提示",支付金额匹配提醒:"支付金额须与申请金额一致,请勿多付、少付或分批提交。银行回单显示的实际金额为准。请勿重复提交同一笔转账申请。",保存交易回单提醒:"请打印或拍照保存交易回单并提供准确的支付时间,否则无法核验转账。",查看余额提醒:"建议提交成功后4小时查看可用余额。工作时间提交的转账当日处理,非工作时间提交的转账将在下一个工作日处理。",联系客服提醒:"如有问题,请联系客服。",P卡转账延迟提醒:"P卡转账可能会有最多10分钟的延迟,请耐心等待。",平台服务费说明:"预付充值将收取1%的平台服务费,详情请参考",费用政策:"费用政策",详情:"。",返回账户信息:"返回账户信息",请上传银行转账回单:"请上传银行转账回单",点击或拖拽文件到此区域上传:"点击或拖拽文件到此区域上传",转账时间:"转账时间",转账金额:"转账金额",请输入实际转账金额:"请输入实际转账金额",提交审核:"提交审核",请选择转账时间:"请选择转账时间",请输入转账金额:"请输入转账金额",请选择日期:"请选择日期",一月:"一月",二月:"二月",三月:"三月",四月:"四月",五月:"五月",六月:"六月",七月:"七月",八月:"八月",九月:"九月",十月:"十月",十一月:"十一月",十二月:"十二月",日:"日",一:"一",二:"二",三:"三",四:"四",五:"五",六:"六",第三方支付平台:"第三方支付平台",交易ID:"交易ID",请输入转账交易ID:"请输入转账交易ID",上传文件:"上传文件",请上传转账凭证:"请上传转账凭证","加载中...":"加载中...",错误:"错误",成功:"成功",必填:"必填","充值/转账":"充值/转账",切换为暗黑主题:"切换为暗黑主题",切换为白色主题:"切换为白色主题",点击或拖拽文件到此处上传:"点击或拖拽文件到此处上传","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传",个文件:"个文件","正在上传...":"正在上传...",已上传:"已上传",移除:"移除"};function ni(e){return ti[e]||e}const ri={"额外费用说明:您的地区、币种、支付卡类型等因素可能会导致手续费的变动,最终手续费以官方为准。":"Additional note: Your region, currency, and card type may affect the processing fee; the final fee is determined by the provider.","手续费约为:":"Fee approximately: ",确定:"Confirm",提交成功:"Submit Success",余额详情:"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",在线支付:"Online Payment",选择支付方式:"Select Payment Method",支付方式:"Payment Method",付款人名称:"Payer Name",支付币种:"Payment Currency",支付金额:"Payment Amount",线上支付:"Online Payment",立即支付:"Pay Now","请在转账后提交银行回单,否则可能无法及时核验":"Please submit the bank receipt after the transfer, otherwise verification may be delayed","支付金额须与申请金额一致,请勿多付、少付或分批提交。":"The payment amount must match the requested amount exactly. Do not overpay, underpay, or split.","请妥善保存回单并提供准确的支付时间,否则可能无法核验。":"Please keep the receipt and provide the exact payment time; otherwise, verification may fail.","工作时间提交4小时内审核,非工作时间将顺延至下一个工作日。":"Submissions during business hours are reviewed within 4 hours; off-hours will be processed next business day.","如有问题,请联系平台客服。":"If you have any questions, please contact customer service.","预付充值将收取平台服务费,具体以官方为准。":"Prepaid top-ups are subject to a platform service fee; please refer to the official policy.",第三方支付平台:"Third-party Payment Platform",交易ID:"Transaction ID",请输入转账交易ID:"Please enter transfer transaction ID",上传文件:"Upload Files",请上传转账凭证:"Please upload transfer voucher","加载中...":"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",银行转账:"Transfer to Account",银行名称:"Bank Name",账户持有人:"Account Holder Name",账户号码:"Account Number","SWIFT/BIC代码":"SWIFT/BIC Code",银行代码:"Bank Code",银行地址:"Bank Address",复制:"Copy",复制成功:"Copied successfully",确认转账详情:"Confirm Transfer Details",转账后提交银行回单提示:"Please make sure to submit the bank transaction slip after the transfer, otherwise the payment may not be verified in time",温馨提示:"Friendly Reminder",支付金额匹配提醒:"The payment amount must match the transaction amount exactly. Overpayment, underpayment, or installment payments will not be approved. The actual amount shown on the bank receipt shall prevail. Do not submit duplicate applications for the same transfer.",保存交易回单提醒:"Please print or take a photo of the transaction receipt and provide the exact payment time; otherwise, the transfer cannot be verified.",查看余额提醒:"It is recommended to check your available balance 4 hours after successful submission. Transfers submitted during business hours will be processed the same day; those submitted outside business hours will be processed on the next working day.",联系客服提醒:"If you have any questions, please contact customer service.",P卡转账延迟提醒:"P-card transfers may experience a delay of up to 10 minutes. Please wait patiently.",平台服务费说明:"Prepaid top-ups are subject to a 1% platform service fee. Please refer to the",费用政策:"Fee Policy",详情:"for details.",返回账户信息:"Return to Account Information",请上传银行转账回单:"Please upload the bank transfer receipt",点击或拖拽文件到此区域上传:"Click or drag file to this area to upload",转账时间:"Transfer Time",转账金额:"Transfer Amount",请输入实际转账金额:"Please enter the actual transfer amount",提交审核:"Submit for Review",请选择转账时间:"Please select transfer time",请输入转账金额:"Please enter transfer amount",请选择日期:"Please select date",一月:"January",二月:"February",三月:"March",四月:"April",五月:"May",六月:"June",七月:"July",八月:"August",九月:"September",十月:"October",十一月:"November",十二月:"December",日:"Sun",一:"Mon",二:"Tue",三:"Wed",四:"Thu",五:"Fri",六:"Sat"};function oi(e){return ri[e]||e}function ii(){return JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").locale||De.ZH}function _(e){return ii()==="zh"?ni(e):oi(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 ai(){const e=k("theme"),t=k("themeConfig"),n=e===O.WHITE,r=n?Jt.white:Jt.dark;if(t){const o=n?t.white:t.dark;if(o?.color)return{...r,option:(a,i,s)=>({...r.option(a,i,s),color:i?r.option(a,i,s).color:a?o.color:r.option(a,i,s).color})}}return r}const rt=({value:e,onChange:t,options:n,placeholder:r,style:o,error:a,disabled:i,dropdownStyle:s,className:f,dropdownClassName:c,children:p})=>{const[u,h]=B(!1),b=me(null),[g,x]=B(null),y=ai(),S=k("size");q(()=>{if(!u)return;const L=A=>{b.current&&!b.current.contains(A.target)&&h(!1)};return document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)},[u]);const w=n.find(L=>L.value===e),M=()=>a?y.triggerError:i?y.triggerDisabled:y.trigger;return d("div",{ref:b,className:f,style:{position:"relative",...o},children:[d("style",{children:`
46
46
  .custom-select-dropdown {
47
47
  scrollbar-width: thin;
48
- scrollbar-color: ${b.scrollbarThumb} ${b.scrollbarTrack};
48
+ scrollbar-color: ${y.scrollbarThumb} ${y.scrollbarTrack};
49
49
  }
50
50
  .custom-select-dropdown::-webkit-scrollbar {
51
- width: ${x===u.SMALL?6:8}px;
51
+ width: ${S===l.SMALL?6:8}px;
52
52
  }
53
53
  .custom-select-dropdown::-webkit-scrollbar-thumb {
54
54
  border-radius: 4px;
55
- background: ${b.scrollbarThumb};
55
+ background: ${y.scrollbarThumb};
56
56
  }
57
57
  .custom-select-dropdown::-webkit-scrollbar-track {
58
- background: ${b.scrollbarTrack};
58
+ background: ${y.scrollbarTrack};
59
59
  }
60
- `}),m("div",{onClick:()=>!i&&g(w=>!w),style:{minHeight:x===u.SMALL?32:40,borderRadius:6,display:"flex",alignItems:"center",padding:x===u.SMALL?"0 10px":"0 12px",fontSize:x===u.SMALL?12:15,cursor:i?"not-allowed":"pointer",boxSizing:"border-box",transition:"border 0.2s",opacity:i?.6:1,width:"100%",...v(),...o},tabIndex:0,children:[m("span",{style:{flex:1},children:S?S.label:m("span",{style:b.placeholder,children:r||"请选择"})}),m("span",{style:{marginLeft:8,display:"flex",alignItems:"center"},children:m("svg",{width:x===u.SMALL?16:20,height:x===u.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:x===u.SMALL?32:44,zIndex:10,borderRadius:6,boxShadow:b.boxShadow,maxHeight:x===u.SMALL?160:220,overflowY:"auto",...b.dropdown,...a},children:[n.length===0&&m("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:x===u.SMALL?80:120,width:"100%",userSelect:"none"},children:[m("svg",{width:x===u.SMALL?48:64,height:x===u.SMALL?32:41,viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg",children:[m("title",{children:L("暂无数据")}),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:x===u.SMALL?12:15},children:L("暂无数据")})]}),n.map((w,E)=>m("div",{onClick:()=>{w.disabled||(g(!1),t?.(w.value))},onMouseEnter:()=>y(E),onMouseLeave:()=>y(null),style:{padding:x===u.SMALL?"6px 10px":"10px 16px",fontSize:x===u.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,_===E)},children:w.label},w.value))]}),f]})};function Uo(){const e=k("size");return{white:{label:{marginBottom:e===u.SMALL?6:8,fontSize:e===u.SMALL?12:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:e===u.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:e===u.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:e===u.SMALL?12:13,marginTop:e===u.SMALL?2:4,textAlign:"left"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:e===u.SMALL?"6px 16px":"8px 24px",fontSize:e===u.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===u.SMALL?"6px 16px":"8px 24px",fontSize:e===u.SMALL?12:15,cursor:"pointer",fontWeight:600},feeTip:{marginBottom:24,padding:e===u.SMALL?"8px 10px":"12px 16px",background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:6,fontSize:e===u.SMALL?12:14,color:"#52c41a"},feeDetailBox:{marginTop:e===u.SMALL?8:10,marginBottom:e===u.SMALL?16:20,padding:e===u.SMALL?"8px 10px":"12px 16px",background:"#fff",border:"1px solid #E5E6EB",borderRadius:6},feeDetailTitle:{fontSize:e===u.SMALL?12:14,color:"#222",fontWeight:600,marginBottom:e===u.SMALL?6:8},feeAmount:{color:"#F53F3F",marginLeft:4},feeDetailDesc:{fontSize:e===u.SMALL?12:13,color:"#6b7280",lineHeight:1.5}},dark:{label:{marginBottom:e===u.SMALL?6:8,fontSize:e===u.SMALL?12:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:e===u.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:e===u.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:e===u.SMALL?12:13,marginTop:e===u.SMALL?2:4,textAlign:"left"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:e===u.SMALL?"6px 16px":"8px 24px",fontSize:e===u.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:e===u.SMALL?"6px 16px":"8px 24px",fontSize:e===u.SMALL?12:15,cursor:"pointer",fontWeight:600},feeTip:{marginBottom:e===u.SMALL?16:24,padding:e===u.SMALL?"8px 10px":"12px 16px",background:"#1a1a1a",border:"1px solid #333",borderRadius:6,fontSize:e===u.SMALL?12:14,color:"#52c41a"},feeDetailBox:{marginTop:e===u.SMALL?8:10,marginBottom:e===u.SMALL?16:20,padding:e===u.SMALL?"8px 10px":"12px 16px",background:"#23262F",border:"1px solid #374151",borderRadius:6},feeDetailTitle:{fontSize:e===u.SMALL?12:14,color:"#fff",fontWeight:600,marginBottom:e===u.SMALL?6:8},feeAmount:{color:"#FF6B6B",marginLeft:4},feeDetailDesc:{fontSize:e===u.SMALL?12:13,color:"#B5B8BE",lineHeight:1.5}}}}function Ho(){const e=k("theme"),t=k("themeConfig"),n=e===N.WHITE,r=Uo(),o=n?r.white:r.dark;if(t){const s=n?t.white:t.dark;if(s?.color)return{...o,buttonSubmit:{...o.buttonSubmit,background:s.color}}}return o}function jo(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 $o(e){if(!e)return"";const t=parseFloat(e);return isNaN(t)?"":t.toFixed(2)}const Wo=({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,d]=F(""),[l,f]=F(""),[c,g]=F(!1),h=Ho();return le(()=>{e.currency&&e.amount&&e.rechargeChannel?ko({channel:e.rechargeChannel,amount:e.amount,currency:e.currency}).then(_=>{d(_.paymentAmount),f(_.fee),g(!0)}).catch(_=>{console.error("计算支付金额失败:",_),g(!1)}):g(!1)},[e.currency,e.amount,e.rechargeChannel]),m(K,{children:[m("div",{style:{marginBottom:18},children:[m("div",{style:h.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",L("充值币种")]}),m(Ze,{value:e.currency,onChange:_=>{t(y=>({...y,currency:_}))},options:s?.map(_=>({value:_.value,label:_.label})),placeholder:L("请选择充值币种")})]}),m("div",{style:{marginBottom:18},children:[m("div",{style:h.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",L("充值金额")]}),m("input",{type:"text",placeholder:L("请输入充值金额"),value:e.amount,onInput:_=>{let y=_.target.value;y=jo(y);let b="";if(y&&!y.endsWith(".")){let x=parseFloat(y);if(!isNaN(x)&&(x<1&&(x=1),x>999999.99&&(x=999999.99),y=x.toString(),/\./.test(_.target.value))){const S=_.target.value.split(".")[1];S!==void 0&&S.length>0&&(y=x.toFixed(Math.min(S.length,2)))}}t(x=>({...x,amount:y,amountError:b}))},onBlur:_=>{let y=_.target.value;y=$o(y),t(b=>({...b,amount:y,amountError:""}))},style:{...h.input,...e.amountError?h.inputError:{}}}),e.amountError&&m("div",{style:h.error,children:e.amountError})]}),m("div",{style:{marginBottom:24},children:[m("div",{style:h.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",L("支付平台")]}),m(Ze,{value:e.rechargeChannel,onChange:_=>{t(y=>({...y,rechargeChannel:_,rechargeChannelError:_?"":y.rechargeChannelError}))},options:i?.map(_=>({value:_.value,label:_.label})),placeholder:L("请选择支付平台")}),e.rechargeChannelError&&m("div",{style:h.error,children:e.rechargeChannelError})]}),c&&a&&m("div",{style:h.feeTip,children:[i.find(_=>_.value===e.rechargeChannel)?.label||e.rechargeChannel,L("需要收取手续费,实际支付金额约为:"),"$",a]}),c&&a&&m("div",{style:h.feeDetailBox,children:[m("div",{style:h.feeDetailTitle,children:[L("手续费约为:"),m("span",{style:h.feeAmount,children:["$",l]})]}),m("div",{style:h.feeDetailDesc,children:L("额外费用说明:您的地区、币种、支付卡类型等因素可能会导致手续费的变动,最终手续费以官方为准。")})]}),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:h.buttonCancel,children:L("取消")}),m("button",{type:"submit",disabled:r,style:h.buttonSubmit,children:L(r?"提交中...":"去支付")})]})]})};function qo(){const e=k("size");return{white:{container:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:e===u.SMALL?16:24,textAlign:"center",cursor:"pointer",minHeight:e===u.SMALL?80:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===u.SMALL?12:15},fileItem:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:e===u.SMALL?"8px 10px":"12px 16px",marginBottom:8,fontSize:e===u.SMALL?12:15,color:"#222",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===u.SMALL?"6px 10px":"4px 14px",fontSize:e===u.SMALL?12:15,marginLeft:e===u.SMALL?8:16,cursor:"pointer"}},dark:{container:{border:"1.5px dashed #444C5C",borderRadius:8,background:"#181A20",padding:e===u.SMALL?16:24,textAlign:"center",cursor:"pointer",minHeight:e===u.SMALL?80:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===u.SMALL?12:15},fileItem:{display:"flex",alignItems:"center",background:"#23262F",borderRadius:8,padding:e===u.SMALL?"8px 10px":"12px 16px",marginBottom:8,fontSize:e===u.SMALL?12:15,color:"#fff",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===u.SMALL?"6px 10px":"4px 14px",fontSize:e===u.SMALL?12:15,marginLeft:e===u.SMALL?8:16,cursor:"pointer"}}}}function Jo(){const t=k("theme")===N.WHITE,n=qo();return t?n.white:n.dark}const Vo=({value:e=[],onChange:t,maxCount:n=10,accept:r=".jpg,.jpeg,.png,.pdf",multiple:o=!0,disabled:s=!1})=>{const i=k("size"),a=Ee(null),[d,l]=F(!1),[f,c]=F(0),g=Jo(),h=async y=>{const b=Array.from(y.target.files).slice(0,n);if(!b.length)return;l(!0);const x=[];for(let S=0;S<b.length;S++){c(0);const v=new FormData;v.append("file",b[S]);try{const w=await Ao(v,E=>c(E));w&&x.push(w)}catch{}}l(!1),c(0),t?.([...e,...x]),a.current&&(a.current.value="")},_=y=>{const b=e.filter((x,S)=>S!==y);t?.(b)};return m("div",{children:[m("div",{style:{...g.container,cursor:s?"not-allowed":g.container.cursor,opacity:s?.6:1},onClick:()=>!s&&a.current?.click(),children:[m("div",{style:{fontSize:i===u.SMALL?32:48,marginBottom:i===u.SMALL?8:12},children:"📁"}),m("div",{style:{color:"#222",fontSize:i===u.SMALL?12:15,marginBottom:i===u.SMALL?4:8},children:L("点击或拖拽文件到此处上传")}),m("div",{style:{color:"#999",fontSize:i===u.SMALL?12:13},children:[L("支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传")," ",n," ",L("个文件")]}),m("input",{ref:a,type:"file",multiple:o,accept:r,style:{display:"none"},onChange:h,disabled:s}),d&&m("div",{style:{marginTop:i===u.SMALL?8:12,color:"#1677ff"},children:[L("正在上传...")," ",f,"%"]})]}),e&&e.length>0&&m("div",{style:{marginTop:i===u.SMALL?8:12},children:e.map((y,b)=>m("div",{style:g.fileItem,children:[m("div",{style:{display:"flex",alignItems:"center",flex:1},children:m("span",{style:{fontWeight:500,wordBreak:"break-all"},children:y.split("/").pop()})}),m("button",{type:"button",onClick:x=>{x.stopPropagation(),_(b)},style:g.removeBtn,disabled:s,children:L("移除")})]},y))})]})};function Go(){const e=k("size");return{white:{label:{marginBottom:e===u.SMALL?6:8,fontSize:e===u.SMALL?12:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:e===u.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:e===u.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:e===u.SMALL?"8px 10px":"10px 12px",borderRadius:6,border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:e===u.SMALL?12:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},upload:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:e===u.SMALL?12:24,textAlign:"center",cursor:"pointer",minHeight:e===u.SMALL?100:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===u.SMALL?12:15},uploadError:{border:"1px dashed #ff4d4f"},fileItem:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:e===u.SMALL?"8px 10px":"12px 16px",marginBottom:e===u.SMALL?6:8,fontSize:e===u.SMALL?12:15,color:"#222",justifyContent:"space-between"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:e===u.SMALL?"6px 18px":"8px 24px",cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===u.SMALL?"6px 18px":"8px 24px",cursor:"pointer",fontWeight:600},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===u.SMALL?"6px 18px":"4px 14px",fontSize:e===u.SMALL?12:15,marginLeft:e===u.SMALL?8:16,cursor:"pointer"},error:{color:"#ff4d4f",fontSize:e===u.SMALL?12:13,marginTop:e===u.SMALL?2:4,textAlign:"left"},channelInfoBox:{marginTop:e===u.SMALL?8:10,padding:e===u.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#F7F8FA",border:"1px solid #E5E6EB"},channelInfoItem:{color:"#222",fontSize:e===u.SMALL?12:13,lineHeight:1.6,wordBreak:"break-all"}},dark:{label:{marginBottom:e===u.SMALL?4:8,fontSize:e===u.SMALL?12:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:e===u.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:e===u.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:e===u.SMALL?"8px 10px":"10px 12px",borderRadius:6,border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:e===u.SMALL?12:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},upload:{border:"1px dashed #374151",borderRadius:8,background:"#181A20",padding:e===u.SMALL?12:24,textAlign:"center",cursor:"pointer",minHeight:e===u.SMALL?100:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===u.SMALL?12:14},uploadError:{border:"1px dashed #ff4d4f"},fileItem:{display:"flex",alignItems:"center",background:"#23262F",borderRadius:8,padding:e===u.SMALL?"8px 10px":"12px 16px",marginBottom:e===u.SMALL?6:8,fontSize:e===u.SMALL?12:15,color:"#fff",justifyContent:"space-between"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:e===u.SMALL?"6px 18px":"8px 24px",fontSize:e===u.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:e===u.SMALL?"6px 18px":"8px 24px",fontSize:e===u.SMALL?12:14,cursor:"pointer",fontWeight:600},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===u.SMALL?"6px 18px":"4px 14px",fontSize:e===u.SMALL?12:15,marginLeft:e===u.SMALL?8:16,cursor:"pointer"},error:{color:"#ff4d4f",fontSize:e===u.SMALL?12:13,marginTop:e===u.SMALL?2:4,textAlign:"left"},channelInfoBox:{marginTop:e===u.SMALL?8:10,padding:e===u.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#23262F",border:"1px solid #374151"},channelInfoItem:{color:"#fff",fontSize:e===u.SMALL?12:13,lineHeight:1.6,wordBreak:"break-all"}}}}function Ko(){const e=k("theme"),t=k("themeConfig"),n=e===N.WHITE,r=Go(),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 Xo=({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=Ko(),[a,d]=F([]),l=async c=>{c.preventDefault();let g=!0;t(h=>({...h,platformError:"",transactionIdError:"",filesError:""})),e.platform||(t(h=>({...h,platformError:L("请选择支付平台")})),g=!1),e.transactionId.trim()||(t(h=>({...h,transactionIdError:L("请输入转账交易ID")})),g=!1),(!e.files||e.files.length===0)&&(t(h=>({...h,filesError:L("请上传转账凭证")})),g=!1),g&&(await Eo({transferChannel:e.platform,transferNo:e.transactionId,voucherUrls:e.files}),n(),Xe.success(L("提交成功")))};function f(c){t(g=>({...g,platform:c,platformError:c?"":g.platformError})),To({code:c}).then(g=>{d(Array.isArray(g)?g:g?[String(g)]:[])})}return m("form",{onSubmit:l,children:[m("div",{style:{marginBottom:18},children:[m("div",{style:i.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",L("第三方支付平台")]}),m(Ze,{value:e.platform,onChange:c=>{f(c)},options:[...s?.map(c=>({value:c.value,label:c.label}))],placeholder:L("请选择支付平台")}),e.platformError&&m("div",{style:i.error,children:e.platformError}),a.length>0&&m("div",{style:i.channelInfoBox,children:a.map((c,g)=>m("div",{style:i.channelInfoItem,children:c},g))})]}),m("div",{style:{marginBottom:18},children:[m("div",{style:i.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",L("交易ID")]}),m("input",{type:"text",placeholder:L("请输入转账交易ID"),value:e.transactionId,maxLength:200,onInput:c=>{let g=c.target.value;g.length>200&&(g=g.slice(0,200)),t(h=>({...h,transactionId:g,transactionIdError:g?"":h.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:"*"})," ",L("上传文件")]}),m(Vo,{value:e.files,onChange:c=>t(g=>({...g,files:c,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:L("取消")}),m("button",{type:"submit",disabled:r,style:i.buttonSubmit,children:L("确定")})]})]})};function Zo(){const e=k("size");return{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:e===u.SMALL?16:24,cursor:"pointer",color:"#999",padding:"0",width:e===u.SMALL?16:24,height:e===u.SMALL?16:24,display:"flex",alignItems:"center",justifyContent:"center"},title:{fontSize:e===u.SMALL?16:18,fontWeight:"600",marginBottom:e===u.SMALL?16:24,color:"#222"},tabBtn:(t,n)=>({flex:1,padding:e===u.SMALL?"8px 10px":"12px 16px",background:t?"#1890ff":"transparent",color:t?"#fff":"#666",border:"1px solid #d9d9d9",borderRight:n?"none":"1px solid #d9d9d9",cursor:"pointer",fontSize:e===u.SMALL?12:14,fontWeight:t?"600":"400",borderRadius:n?"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:e===u.SMALL?"12px":"16px",right:e===u.SMALL?"12px":"16px",background:"none",border:"none",fontSize:e===u.SMALL?16:24,cursor:"pointer",color:"#B5B8BE",padding:"0",width:e===u.SMALL?16:24,height:e===u.SMALL?16:24,display:"flex",alignItems:"center",justifyContent:"center"},title:{fontSize:e===u.SMALL?16:18,fontWeight:"600",marginBottom:e===u.SMALL?16:24,color:"#F5F6FA"},tabBtn:(t,n)=>({flex:1,padding:e===u.SMALL?"8px 10px":"12px 16px",background:t?"#00E8C6":"transparent",color:t?"#fff":"#B5B8BE",border:"1px solid #444C5C",borderRight:n?"none":"1px solid #444C5C",cursor:"pointer",fontSize:e===u.SMALL?12:14,fontWeight:t?"600":"400",borderRadius:n?"6px 0 0 6px":"0 6px 6px 0"})}}}function Yo(){const t=k("theme")===N.WHITE,n=Zo();return t?n.white:n.dark}const pe=k("size");function Qo({visible:e,onClose:t,title:n,children:r,width:o=pe===u.SMALL?300:400,maxWidth:s=pe===u.SMALL?300:400,showClose:i=!0,maskClosable:a=!0}){const[d,l]=F(!1),f=Yo(),c=h=>{h.target===h.currentTarget?l(!0):l(!1)},g=h=>{h.target===h.currentTarget&&d&&a&&t(),l(!1)};return e?m("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:f.mask,display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999},onMouseDown:c,onMouseUp:g,children:m("div",{style:{background:f.modalBg,padding:pe===u.SMALL?24:32,borderRadius:pe===u.SMALL?8:12,minWidth:o,maxWidth:s,color:f.modalColor,boxShadow:f.modalBoxShadow,position:"relative"},onClick:h=>h.stopPropagation(),children:[i&&m("button",{type:"button",onClick:t,style:f.closeBtn,"aria-label":"关闭",children:"×"}),n&&m("div",{style:f.title,children:n}),r]})}):null}function ei(){const e=k("size");return{white:{tabBtn:(t,n)=>({flex:1,background:t?"#fff":"#F7F8FA",color:t?"#1890ff":"#222",border:"1px solid #F0F1F3",borderRadius:n?"8px 0 0 8px":"0 8px 8px 0",fontWeight:500,fontSize:e===u.SMALL?12:16,height:e===u.SMALL?32:48,boxShadow:t?"0 2px 8px 0 rgba(20,20,20,0.04)":"none",outline:"none",cursor:"pointer"})},dark:{tabBtn:(t,n)=>({flex:1,background:t?"#23262F":"#181A20",color:t?"#00E8C6":"#fff",border:"1px solid #444C5C",borderRadius:n?"8px 0 0 8px":"0 8px 8px 0",fontWeight:500,fontSize:e===u.SMALL?12:16,height:e===u.SMALL?32:48,boxShadow:t?"0 2px 8px 0 rgba(20,20,20,0.10)":"none",outline:"none",cursor:"pointer"})}}}function ti(){const e=k("theme"),t=k("themeConfig"),n=e===N.WHITE,r=ei(),o=n?r.white:r.dark;if(t){const s=n?t.white:t.dark;if(s?.color)return{...o,tabBtn:(i,a)=>({...o.tabBtn(i,a),color:i?s.color:o.tabBtn(i,a).color})}}return o}const ni=k("size");function ri({visible:e,onClose:t,onSubmit:n}){const[r,o]=F({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),[s,i]=F({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1}),[a,d]=F("online"),l=ti();le(()=>{e||(d("online"),o({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),i({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1}))},[e]);const f=async c=>{c.preventDefault();let g=!0;if(o(h=>({...h,amountError:"",rechargeChannelError:""})),r.amount.trim()||(o(h=>({...h,amountError:L("请输入充值金额")})),g=!1),r.rechargeChannel||(o(h=>({...h,rechargeChannelError:L("请选择支付平台")})),g=!1),!!g){o(h=>({...h,loading:!0,error:""}));try{await n({amount:r.amount,rechargeChannel:r.rechargeChannel,currency:r.currency}),t()}catch{o(h=>({...h,error:L("提交失败,请重试")}))}finally{o(h=>({...h,loading:!1}))}}};return m(Qo,{visible:e,onClose:t,title:L("充值 / 转账"),children:[m("div",{style:{display:"flex",marginBottom:ni===u.SMALL?16:28},children:[m("button",{type:"button",onClick:()=>d("online"),style:l.tabBtn(a==="online",!0),children:L("在线充值")}),m("button",{type:"button",onClick:()=>d("offline"),style:l.tabBtn(a==="offline",!1),children:L("线下转账")})]}),m("div",{style:{display:a==="online"?"block":"none"},children:m("form",{onSubmit:f,children:m(Wo,{formState:r,setFormState:o,onClose:t,loading:r.loading})})}),m("div",{style:{display:a==="offline"?"block":"none"},children:m(Xo,{formState:s,setFormState:i,onClose:t,loading:s.loading})})]})}function st(){return(st=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 oi=["context","children"];function ii(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(r,o){if(r==null)return{};var s,i,a={},d=Object.keys(r);for(i=0;i<d.length;i++)o.indexOf(s=d[i])>=0||(a[s]=r[s]);return a}(e,oi);return Ln(t,n)}function si(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=Y(ii,st({},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,d=n.childNodes;for(i=a.length;i--;)a[i].name!=="slot"&&(s[a[i].name]=a[i].value,s[Cn(a[i].name)]=a[i].value);for(i=d.length;i--;){var l=t(d[i],null),f=d[i].slot;f?s[f]=Y(Pt,{name:f},l):o[i]=l}var c=r?Y(Pt,null,o):o;return Y(r||n.nodeName.toLowerCase(),s,c)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?Sn:Oe)(this._vdom,this._root)}function Cn(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function ai(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[Cn(e)]=n,this._vdom=Ln(this._vdom,r),Oe(this._vdom,this._root)}}function li(){Oe(this._vdom=null,this._root)}function Pt(e,t){var n=this;return Y("slot",st({},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 at(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=si,o.prototype.attributeChangedCallback=ai,o.prototype.disconnectedCallback=li,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 ci(){const[e,t]=F(!1),n=async r=>{const o=await vo({amount:r.amount,currency:r.currency,rechargeChannel:r.rechargeChannel});window.open(o,"_blank")};return m("div",{children:[m(Tn,{onClick:()=>t(!0),children:L("充值/转账")}),m(ri,{visible:e,onClose:()=>t(!1),onSubmit:n})]})}at(ci,"best-recharge",["theme"],{shadow:!1});const It={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 ui(){return k("theme")===N.WHITE?It.white:It.dark}const di=({popover:e,children:t,popoverWidth:n,popoverMinWidth:r,offsetY:o,offsetX:s,popoverPosition:i="top"})=>{const a=k("size"),d=n??(a===u.SMALL?200:300),l=r??(a===u.SMALL?150:200),f=o??(a===u.SMALL?8:16),c=s??(a===u.SMALL?8:16),[g,h]=F(!1),[_,y]=F(i),b=Ee(null),x=Ee(null),S=ui(),v=()=>{if(x.current&&(clearTimeout(x.current),x.current=null),i==="top"||i==="bottom")if(b.current){const D=b.current.getBoundingClientRect();i==="top"&&D.top<100?y("bottom"):i==="bottom"&&window.innerHeight-D.bottom<100?y("top"):y(i)}else y(i);else y(i);h(!0)},w=()=>{x.current=window.setTimeout(()=>{h(!1)},120)};let E={position:"absolute",zIndex:999,borderRadius:6,fontSize:a===u.SMALL?12:15,minWidth:l,width:d,padding:a===u.SMALL?"6px 12px":"8px 14px",pointerEvents:"auto",textAlign:"center",animation:"fadeInUp 0.3s",...S.popover},C={position:"absolute",zIndex:11,width:0,height:0};return _==="top"?(E={...E,left:"50%",top:-48,transform:"translateX(-50%)"},C={...C,left:"50%",bottom:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderTop:`8px solid ${S.arrow.top}`}):_==="bottom"?(E={...E,left:"50%",top:"100%",marginTop:f,transform:"translateX(-50%)"},C={...C,left:"50%",top:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderBottom:`8px solid ${S.arrow.bottom}`}):_==="leftTop"?(E={...E,right:"100%",top:0,marginRight:c,transform:"none"},C={...C,right:-8,top:a===u.SMALL?8:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderLeft:`8px solid ${S.arrow.left}`}):_==="rightTop"&&(E={...E,left:"100%",top:0,marginLeft:c,transform:"translateY(0)"},C={...C,left:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderRight:`8px solid ${S.arrow.right}`}),m("div",{ref:b,style:{position:"relative",display:"inline-block"},onMouseEnter:v,onMouseLeave:w,children:[t,g&&m("div",{style:E,onMouseEnter:v,onMouseLeave:w,children:[e,m("div",{style:C})]})]})};function fi(){const e=k("size");return{white:{popoverTitle:{fontSize:e===u.SMALL?12:16,fontWeight:600,color:"#222",marginBottom:e===u.SMALL?12:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:e===u.SMALL?"6px 0":"8px 0",borderBottom:"1px solid #e5e7eb",fontSize:e===u.SMALL?12:15},detailLabel:{display:"flex",alignItems:"center",color:"#6b7280",fontWeight:500},detailDot:t=>({display:"inline-block",width:e===u.SMALL?6:8,height:e===u.SMALL?6:8,borderRadius:"50%",background:t,marginRight:e===u.SMALL?6:8}),detailValue:t=>({color:t,fontWeight:600,fontSize:e===u.SMALL?12:15}),main:{fontSize:e===u.SMALL?18:24,fontWeight:800,color:"#111827",display:"inline-block"},currency:{fontSize:e===u.SMALL?16:18,color:"#6b7280",marginLeft:e===u.SMALL?6:8,fontWeight:600}},dark:{popoverTitle:{fontSize:e===u.SMALL?14:16,fontWeight:600,color:"#fff",marginBottom:e===u.SMALL?14:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:e===u.SMALL?"6px 0":"8px 0",borderBottom:"1px solid #374151",fontSize:e===u.SMALL?12:15},detailLabel:{display:"flex",alignItems:"center",color:"#B5B8BE",fontWeight:500},detailDot:t=>({display:"inline-block",width:e===u.SMALL?6:8,height:e===u.SMALL?6:8,borderRadius:"50%",background:t,marginRight:e===u.SMALL?6:8}),detailValue:t=>({color:t,fontWeight:600,fontSize:e===u.SMALL?12:15}),main:{fontSize:e===u.SMALL?18:24,fontWeight:800,color:"#fff",display:"inline-block"},currency:{fontSize:e===u.SMALL?16:18,color:"#B5B8BE",marginLeft:e===u.SMALL?6:8,fontWeight:600}}}}function pi(){const t=k("theme")===N.WHITE,n=fi();return t?n.white:n.dark}function Dt(e){return e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}function hi(e){const[t,n]=F({currBalance:0,currency:"USD",details:[]}),r=async()=>{try{const i=await vn(),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"}],d={currBalance:i.currBalance,currency:"USD",symbol:"$",details:a};n(d)}catch(i){console.error("获取余额失败:",i)}};le(()=>{r()},[]),le(()=>{const i=()=>{r()};return window.addEventListener("refresh-balance",i),()=>{window.removeEventListener("refresh-balance",i)}},[]);const o=pi(),s=[{label:L("真实金额"),value:t.details[0]?.value||0,color:"#15b36b",dot:"#15b36b"},{label:L("冻结金额"),value:t.details[1]?.value||0,color:"#f59e0b",dot:"#f59e0b"},...t.details.length>4?[{label:L("信用额度"),value:t.details[2]?.value||0,color:"#1890ff",dot:"#1890ff"},{label:L("已用额度"),value:t.details[3]?.value||0,color:"#ff0000",dot:"#ff0000"}]:[],{label:L("可用余额"),value:t.details[4]?.value||0,color:"#1890ff",dot:"#15b36b"}];return m(di,{popover:m(K,{children:[m("div",{style:o.popoverTitle,children:L("余额详情")}),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:Dt(i.value)})]},i.label))]}),popoverPosition:e.popoverPosition||"bottom",children:m("div",{style:o.main,children:[Dt(t.currBalance),m("span",{style:o.currency,children:t.currency})]})})}at(hi,"best-statistical-balance");const he={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 mi(e){return k("theme")===N.WHITE?{...he.white,background:e||he.white.background}:{...he.dark,background:e||he.dark.background}}function _i(e){switch(e){case"small":return{fontSize:"12px",gap:"2px"};case"large":return{fontSize:"18px",gap:"6px"};default:return{fontSize:"14px",gap:"4px"}}}function gi({color:e,size:t="medium",children:n}){const[r,o]=F(!1),s=mi(e),i=_i(t),a={...s,...i,display:"flex",alignItems:"center"};return m(K,{children:[m("style",{children:`
60
+ `}),d("div",{onClick:()=>!i&&h(L=>!L),style:{minHeight:S===l.SMALL?32:40,borderRadius:6,display:"flex",alignItems:"center",padding:S===l.SMALL?"0 10px":"0 12px",fontSize:S===l.SMALL?12:15,cursor:i?"not-allowed":"pointer",boxSizing:"border-box",transition:"border 0.2s",opacity:i?.6:1,width:"100%",...M(),...o},tabIndex:0,children:[d("span",{style:{flex:1},children:w?w.label:d("span",{style:y.placeholder,children:r||"请选择"})}),d("span",{style:{marginLeft:8,display:"flex",alignItems:"center"},children:d("svg",{width:S===l.SMALL?16:20,height:S===l.SMALL?16:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M6 8L10 12L14 8",stroke:"#bfbfbf","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})})})]}),u&&!i&&d("div",{className:`custom-select-dropdown${c?" "+c:""}`,style:{position:"absolute",left:0,right:0,top:S===l.SMALL?32:44,zIndex:10,borderRadius:6,boxShadow:y.boxShadow,maxHeight:S===l.SMALL?160:220,overflowY:"auto",...y.dropdown,...s},children:[n.length===0&&d("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:S===l.SMALL?80:120,width:"100%",userSelect:"none"},children:[d("svg",{width:S===l.SMALL?48:64,height:S===l.SMALL?32:41,viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg",children:[d("title",{children:_("暂无数据")}),d("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd",children:[d("ellipse",{fill:"#f5f5f5",cx:"32",cy:"33",rx:"32",ry:"7"}),d("g",{fillRule:"nonzero",stroke:"#d9d9d9",children:[d("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"}),d("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"})]})]})]}),d("div",{style:{marginTop:8,color:"#bfbfbf",fontSize:S===l.SMALL?12:15},children:_("暂无数据")})]}),n.map((L,A)=>d("div",{onClick:()=>{L.disabled||(h(!1),t?.(L.value))},onMouseEnter:()=>x(A),onMouseLeave:()=>x(null),style:{padding:S===l.SMALL?"6px 10px":"10px 16px",fontSize:S===l.SMALL?12:15,cursor:L.disabled?"not-allowed":"pointer",fontWeight:e===L.value?600:400,opacity:L.disabled?.6:1,...y.option(e===L.value,!!L.disabled,g===A)},children:L.label},L.value))]}),p]})};function si(){const e=k("size");return{white:{label:{marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:e===l.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:e===l.SMALL?2:4,textAlign:"left"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:e===l.SMALL?"6px 16px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 16px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer",fontWeight:600},feeTip:{marginBottom:24,padding:e===l.SMALL?"8px 10px":"12px 16px",background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:6,fontSize:e===l.SMALL?12:14,color:"#52c41a"},feeDetailBox:{marginTop:e===l.SMALL?8:10,marginBottom:e===l.SMALL?16:20,padding:e===l.SMALL?"8px 10px":"12px 16px",background:"#fff",border:"1px solid #E5E6EB",borderRadius:6},feeDetailTitle:{fontSize:e===l.SMALL?12:14,color:"#222",fontWeight:600,marginBottom:e===l.SMALL?6:8},feeAmount:{color:"#F53F3F",marginLeft:4},feeDetailDesc:{fontSize:e===l.SMALL?12:13,color:"#6b7280",lineHeight:1.5}},dark:{label:{marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:e===l.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:e===l.SMALL?2:4,textAlign:"left"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 16px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 16px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer",fontWeight:600},feeTip:{marginBottom:e===l.SMALL?16:24,padding:e===l.SMALL?"8px 10px":"12px 16px",background:"#1a1a1a",border:"1px solid #333",borderRadius:6,fontSize:e===l.SMALL?12:14,color:"#52c41a"},feeDetailBox:{marginTop:e===l.SMALL?8:10,marginBottom:e===l.SMALL?16:20,padding:e===l.SMALL?"8px 10px":"12px 16px",background:"#23262F",border:"1px solid #374151",borderRadius:6},feeDetailTitle:{fontSize:e===l.SMALL?12:14,color:"#fff",fontWeight:600,marginBottom:e===l.SMALL?6:8},feeAmount:{color:"#FF6B6B",marginLeft:4},feeDetailDesc:{fontSize:e===l.SMALL?12:13,color:"#B5B8BE",lineHeight:1.5}}}}function li(){const e=k("theme"),t=k("themeConfig"),n=e===O.WHITE,r=si(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,buttonSubmit:{...o.buttonSubmit,background:a.color}}}return o}function ci(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 di(e){if(!e)return"";const t=parseFloat(e);return isNaN(t)?"":t.toFixed(2)}const ui=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}"),a=o?.currency||[],i=o?.channel?.filter(g=>g.payment_support)||[],[s,f]=B(""),[c,p]=B(""),[u,h]=B(!1),b=li();return q(()=>{e.currency&&e.amount&&e.rechargeChannel?$n({channel:e.rechargeChannel,amount:e.amount,currency:e.currency}).then(g=>{f(g.paymentAmount),p(g.fee),h(!0)}).catch(g=>{console.error("计算支付金额失败:",g),h(!1)}):h(!1)},[e.currency,e.amount,e.rechargeChannel]),d(ne,{children:[d("div",{style:{marginBottom:18},children:[d("div",{style:b.label,children:[d("span",{style:{color:"#F53F3F"},children:"*"})," ",_("充值币种")]}),d(rt,{value:e.currency,onChange:g=>{t(x=>({...x,currency:g}))},options:a?.map(g=>({value:g.value,label:g.label})),placeholder:_("请选择充值币种")})]}),d("div",{style:{marginBottom:18},children:[d("div",{style:b.label,children:[d("span",{style:{color:"#F53F3F"},children:"*"})," ",_("充值金额")]}),d("input",{type:"text",placeholder:_("请输入充值金额"),value:e.amount,onInput:g=>{let x=g.target.value;x=ci(x);let y="";if(x&&!x.endsWith(".")){let S=parseFloat(x);if(!isNaN(S)&&(S<1&&(S=1),S>999999.99&&(S=999999.99),x=S.toString(),/\./.test(g.target.value))){const w=g.target.value.split(".")[1];w!==void 0&&w.length>0&&(x=S.toFixed(Math.min(w.length,2)))}}t(S=>({...S,amount:x,amountError:y}))},onBlur:g=>{let x=g.target.value;x=di(x),t(y=>({...y,amount:x,amountError:""}))},style:{...b.input,...e.amountError?b.inputError:{}}}),e.amountError&&d("div",{style:b.error,children:e.amountError})]}),d("div",{style:{marginBottom:24},children:[d("div",{style:b.label,children:[d("span",{style:{color:"#F53F3F"},children:"*"})," ",_("支付平台")]}),d(rt,{value:e.rechargeChannel,onChange:g=>{t(x=>({...x,rechargeChannel:g,rechargeChannelError:g?"":x.rechargeChannelError}))},options:i?.map(g=>({value:g.value,label:g.label})),placeholder:_("请选择支付平台")}),e.rechargeChannelError&&d("div",{style:b.error,children:e.rechargeChannelError})]}),u&&s&&d("div",{style:b.feeTip,children:[i.find(g=>g.value===e.rechargeChannel)?.label||e.rechargeChannel,_("需要收取手续费,实际支付金额约为:"),"$",s]}),u&&s&&d("div",{style:b.feeDetailBox,children:[d("div",{style:b.feeDetailTitle,children:[_("手续费约为:"),d("span",{style:b.feeAmount,children:["$",c]})]}),d("div",{style:b.feeDetailDesc,children:_("额外费用说明:您的地区、币种、支付卡类型等因素可能会导致手续费的变动,最终手续费以官方为准。")})]}),e.error&&d("div",{style:{color:"#ff4d4f",marginBottom:12},children:e.error}),d("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[d("button",{type:"button",onClick:n,style:b.buttonCancel,children:_("取消")}),d("button",{type:"submit",disabled:r,style:b.buttonSubmit,children:_(r?"提交中...":"去支付")})]})]})};function fi(){const e=k("size");return{white:{container:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:e===l.SMALL?16:24,textAlign:"center",cursor:"pointer",minHeight:e===l.SMALL?80:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===l.SMALL?12:15},fileItem:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:e===l.SMALL?"8px 10px":"12px 16px",marginBottom:8,fontSize:e===l.SMALL?12:15,color:"#222",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 10px":"4px 14px",fontSize:e===l.SMALL?12:15,marginLeft:e===l.SMALL?8:16,cursor:"pointer"}},dark:{container:{border:"1.5px dashed #444C5C",borderRadius:8,background:"#181A20",padding:e===l.SMALL?16:24,textAlign:"center",cursor:"pointer",minHeight:e===l.SMALL?80:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===l.SMALL?12:15},fileItem:{display:"flex",alignItems:"center",background:"#23262F",borderRadius:8,padding:e===l.SMALL?"8px 10px":"12px 16px",marginBottom:8,fontSize:e===l.SMALL?12:15,color:"#fff",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 10px":"4px 14px",fontSize:e===l.SMALL?12:15,marginLeft:e===l.SMALL?8:16,cursor:"pointer"}}}}function pi(){const t=k("theme")===O.WHITE,n=fi();return t?n.white:n.dark}const jn=({value:e=[],onChange:t,maxCount:n=10,accept:r=".jpg,.jpeg,.png,.pdf",multiple:o=!0,disabled:a=!1})=>{const i=k("size"),s=me(null),[f,c]=B(!1),[p,u]=B(0),h=pi(),b=async x=>{const y=Array.from(x.target.files).slice(0,n);if(!y.length)return;c(!0);const S=[];for(let w=0;w<y.length;w++){u(0);const M=new FormData;M.append("file",y[w]);try{const L=await jo(M,A=>u(A));L&&S.push(L)}catch{}}c(!1),u(0),t?.([...e,...S]),s.current&&(s.current.value="")},g=x=>{const y=e.filter((S,w)=>w!==x);t?.(y)};return d("div",{children:[d("div",{style:{...h.container,cursor:a?"not-allowed":h.container.cursor,opacity:a?.6:1},onClick:()=>!a&&s.current?.click(),children:[d("div",{style:{fontSize:i===l.SMALL?32:48,marginBottom:i===l.SMALL?8:12},children:"📁"}),d("div",{style:{color:"#222",fontSize:i===l.SMALL?12:15,marginBottom:i===l.SMALL?4:8},children:_("点击或拖拽文件到此处上传")}),d("div",{style:{color:"#999",fontSize:i===l.SMALL?12:13},children:[_("支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传")," ",n," ",_("个文件")]}),d("input",{ref:s,type:"file",multiple:o,accept:r,style:{display:"none"},onChange:b,disabled:a}),f&&d("div",{style:{marginTop:i===l.SMALL?8:12,color:"#1677ff"},children:[_("正在上传...")," ",p,"%"]})]}),e&&e.length>0&&d("div",{style:{marginTop:i===l.SMALL?8:12},children:e.map((x,y)=>d("div",{style:h.fileItem,children:[d("div",{style:{display:"flex",alignItems:"center",flex:1},children:d("span",{style:{fontWeight:500,wordBreak:"break-all"},children:x.split("/").pop()})}),d("button",{type:"button",onClick:S=>{S.stopPropagation(),g(y)},style:h.removeBtn,disabled:a,children:_("移除")})]},x))})]})};function hi(){const e=k("size");return{white:{label:{marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:e===l.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:e===l.SMALL?12:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},upload:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:e===l.SMALL?12:24,textAlign:"center",cursor:"pointer",minHeight:e===l.SMALL?100:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===l.SMALL?12:15},uploadError:{border:"1px dashed #ff4d4f"},fileItem:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:e===l.SMALL?"8px 10px":"12px 16px",marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:15,color:"#222",justifyContent:"space-between"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:e===l.SMALL?"6px 18px":"8px 24px",cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"8px 24px",cursor:"pointer",fontWeight:600},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"4px 14px",fontSize:e===l.SMALL?12:15,marginLeft:e===l.SMALL?8:16,cursor:"pointer"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:e===l.SMALL?2:4,textAlign:"left"},channelInfoBox:{marginTop:e===l.SMALL?8:10,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#F7F8FA",border:"1px solid #E5E6EB"},channelInfoItem:{color:"#222",fontSize:e===l.SMALL?12:13,lineHeight:1.6,wordBreak:"break-all"}},dark:{label:{marginBottom:e===l.SMALL?4:8,fontSize:e===l.SMALL?12:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:e===l.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:e===l.SMALL?12:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},upload:{border:"1px dashed #374151",borderRadius:8,background:"#181A20",padding:e===l.SMALL?12:24,textAlign:"center",cursor:"pointer",minHeight:e===l.SMALL?100:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===l.SMALL?12:14},uploadError:{border:"1px dashed #ff4d4f"},fileItem:{display:"flex",alignItems:"center",background:"#23262F",borderRadius:8,padding:e===l.SMALL?"8px 10px":"12px 16px",marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:15,color:"#fff",justifyContent:"space-between"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"8px 24px",fontSize:e===l.SMALL?12:14,cursor:"pointer",fontWeight:600},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"4px 14px",fontSize:e===l.SMALL?12:15,marginLeft:e===l.SMALL?8:16,cursor:"pointer"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:e===l.SMALL?2:4,textAlign:"left"},channelInfoBox:{marginTop:e===l.SMALL?8:10,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#23262F",border:"1px solid #374151"},channelInfoItem:{color:"#fff",fontSize:e===l.SMALL?12:13,lineHeight:1.6,wordBreak:"break-all"}}}}function mi(){const e=k("theme"),t=k("themeConfig"),n=e===O.WHITE,r=hi(),o=n?r.white:r.dark;if(console.log(t,"themeConfig"),t){const a=n?t.white:t.dark;if(a?.color)return{...o,buttonSubmit:{...o.buttonSubmit,background:a.color}}}return o}const gi=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}");console.log(o,"allDicts");const a=o?.channel||[],i=mi(),[s,f]=B([]),c=async u=>{u.preventDefault();let h=!0;t(b=>({...b,platformError:"",transactionIdError:"",filesError:""})),e.platform||(t(b=>({...b,platformError:_("请选择支付平台")})),h=!1),e.transactionId.trim()||(t(b=>({...b,transactionIdError:_("请输入转账交易ID")})),h=!1),(!e.files||e.files.length===0)&&(t(b=>({...b,filesError:_("请上传转账凭证")})),h=!1),h&&(await Nn({transferChannel:e.platform,transferNo:e.transactionId,voucherUrls:e.files}),n(),Re.success(_("提交成功")))};function p(u){t(h=>({...h,platform:u,platformError:u?"":h.platformError})),Wn({code:u}).then(h=>{f(Array.isArray(h)?h:h?[String(h)]:[])})}return d("form",{onSubmit:c,children:[d("div",{style:{marginBottom:18},children:[d("div",{style:i.label,children:[d("span",{style:{color:"#F53F3F"},children:"*"})," ",_("第三方支付平台")]}),d(rt,{value:e.platform,onChange:u=>{p(u)},options:[...a?.map(u=>({value:u.value,label:u.label}))],placeholder:_("请选择支付平台")}),e.platformError&&d("div",{style:i.error,children:e.platformError}),s.length>0&&d("div",{style:i.channelInfoBox,children:s.map((u,h)=>d("div",{style:i.channelInfoItem,children:u},h))})]}),d("div",{style:{marginBottom:18},children:[d("div",{style:i.label,children:[d("span",{style:{color:"#F53F3F"},children:"*"})," ",_("交易ID")]}),d("input",{type:"text",placeholder:_("请输入转账交易ID"),value:e.transactionId,maxLength:200,onInput:u=>{let h=u.target.value;h.length>200&&(h=h.slice(0,200)),t(b=>({...b,transactionId:h,transactionIdError:h?"":b.transactionIdError}))},style:{...i.input,...e.transactionIdError?i.inputError:{}}}),e.transactionIdError&&d("div",{style:i.error,children:e.transactionIdError})]}),d("div",{style:{marginBottom:24},children:[d("div",{style:i.label,children:[d("span",{style:{color:"#F53F3F"},children:"*"})," ",_("上传文件")]}),d(jn,{value:e.files,onChange:u=>t(h=>({...h,files:u,filesError:""})),maxCount:10,accept:".jpg,.jpeg,.png,.pdf",multiple:!0}),e.filesError&&d("div",{style:i.error,children:e.filesError})]}),d("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[d("button",{type:"button",onClick:n,style:i.buttonCancel,children:_("取消")}),d("button",{type:"submit",disabled:r,style:i.buttonSubmit,children:_("确定")})]})]})};function bi(){const e=k("size");return{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:e===l.SMALL?16:24,cursor:"pointer",color:"#999",padding:"0",width:e===l.SMALL?16:24,height:e===l.SMALL?16:24,display:"flex",alignItems:"center",justifyContent:"center"},title:{fontSize:e===l.SMALL?16:18,fontWeight:"600",marginBottom:e===l.SMALL?16:24,color:"#222"},headerBorder:"#f0f0f0",scrollbarClass:"light-scrollbar",scrollbarThumbColor:"#d1d5db",scrollbarThumbHoverColor:"#9ca3af",tabBtn:(t,n)=>({flex:1,padding:e===l.SMALL?"8px 10px":"12px 16px",background:t?"#1890ff":"transparent",color:t?"#fff":"#666",border:"1px solid #d9d9d9",borderRight:n?"none":"1px solid #d9d9d9",cursor:"pointer",fontSize:e===l.SMALL?12:14,fontWeight:t?"600":"400",borderRadius:n?"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:e===l.SMALL?"12px":"16px",right:e===l.SMALL?"12px":"16px",background:"none",border:"none",fontSize:e===l.SMALL?16:24,cursor:"pointer",color:"#B5B8BE",padding:"0",width:e===l.SMALL?16:24,height:e===l.SMALL?16:24,display:"flex",alignItems:"center",justifyContent:"center"},title:{fontSize:e===l.SMALL?16:18,fontWeight:"600",marginBottom:e===l.SMALL?16:24,color:"#F5F6FA"},headerBorder:"#374151",scrollbarClass:"dark-scrollbar",scrollbarThumbColor:"#4B5563",scrollbarThumbHoverColor:"#6B7280",tabBtn:(t,n)=>({flex:1,padding:e===l.SMALL?"8px 10px":"12px 16px",background:t?"#00E8C6":"transparent",color:t?"#fff":"#B5B8BE",border:"1px solid #444C5C",borderRight:n?"none":"1px solid #444C5C",cursor:"pointer",fontSize:e===l.SMALL?12:14,fontWeight:t?"600":"400",borderRadius:n?"6px 0 0 6px":"0 6px 6px 0"})}}}function yi(){const t=k("theme")===O.WHITE,n=bi();return t?n.white:n.dark}const re=k("size");function xi(e){const t=`modal-scrollbar-${e.scrollbarClass}`;if(document.getElementById(t))return t;const n=document.createElement("style");return n.id=t,n.textContent=`
61
+ .${e.scrollbarClass} {
62
+ scrollbar-width: thin;
63
+ scrollbar-color: ${e.scrollbarThumbColor} transparent;
64
+ }
65
+ .${e.scrollbarClass}::-webkit-scrollbar {
66
+ width: 6px;
67
+ }
68
+ .${e.scrollbarClass}::-webkit-scrollbar-track {
69
+ background: transparent;
70
+ }
71
+ .${e.scrollbarClass}::-webkit-scrollbar-thumb {
72
+ background: ${e.scrollbarThumbColor};
73
+ border-radius: 3px;
74
+ }
75
+ .${e.scrollbarClass}::-webkit-scrollbar-thumb:hover {
76
+ background: ${e.scrollbarThumbHoverColor};
77
+ }
78
+ `,document.head.appendChild(n),t}function qn({visible:e,onClose:t,title:n,children:r,width:o=re===l.SMALL?300:400,maxWidth:a=re===l.SMALL?300:400,showClose:i=!0,maskClosable:s=!0}){const[f,c]=B(!1),p=yi();q(()=>{xi(p)},[p]);const u=b=>{b.target===b.currentTarget?c(!0):c(!1)},h=b=>{b.target===b.currentTarget&&f&&s&&t(),c(!1)};return e?d("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:p.mask,display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999},onMouseDown:u,onMouseUp:h,children:d("div",{style:{background:p.modalBg,borderRadius:re===l.SMALL?8:12,minWidth:o,maxWidth:a,color:p.modalColor,boxShadow:p.modalBoxShadow,position:"relative",width:typeof o=="string"?o:`${o}px`,maxHeight:"90vh",display:"flex",flexDirection:"column"},onClick:b=>b.stopPropagation(),children:[d("div",{style:{position:"sticky",top:0,background:p.modalBg,borderRadius:re===l.SMALL?"8px 8px 0 0":"12px 12px 0 0",padding:re===l.SMALL?"24px 24px 0 24px":"32px 32px 0 32px",zIndex:1,borderBottom:`1px solid ${p.headerBorder}`},children:[i&&d("button",{type:"button",onClick:t,style:p.closeBtn,"aria-label":"关闭",children:"×"}),n&&d("div",{style:p.title,children:n})]}),d("div",{className:`modal-content ${p.scrollbarClass}`,style:{flex:1,overflowY:"auto",padding:re===l.SMALL?"16px 24px 24px 24px":"20px 32px 32px 32px"},children:r})]})}):null}function _i(){const e=k("size");return{white:{tabBtn:(t,n)=>({flex:1,background:t?"#fff":"#F7F8FA",color:t?"#1890ff":"#222",border:"1px solid #F0F1F3",borderRadius:n?"8px 0 0 8px":"0 8px 8px 0",fontWeight:500,fontSize:e===l.SMALL?12:16,height:e===l.SMALL?32:48,boxShadow:t?"0 2px 8px 0 rgba(20,20,20,0.04)":"none",outline:"none",cursor:"pointer"})},dark:{tabBtn:(t,n)=>({flex:1,background:t?"#23262F":"#181A20",color:t?"#00E8C6":"#fff",border:"1px solid #444C5C",borderRadius:n?"8px 0 0 8px":"0 8px 8px 0",fontWeight:500,fontSize:e===l.SMALL?12:16,height:e===l.SMALL?32:48,boxShadow:t?"0 2px 8px 0 rgba(20,20,20,0.10)":"none",outline:"none",cursor:"pointer"})}}}function Si(){const e=k("theme"),t=k("themeConfig"),n=e===O.WHITE,r=_i(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,tabBtn:(i,s)=>({...o.tabBtn(i,s),color:i?a.color:o.tabBtn(i,s).color})}}return o}const Li=k("size");function wi({visible:e,onClose:t,onSubmit:n}){const[r,o]=B({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),[a,i]=B({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1}),[s,f]=B("online"),c=Si();q(()=>{e||(f("online"),o({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),i({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1}))},[e]);const p=async u=>{u.preventDefault();let h=!0;if(o(b=>({...b,amountError:"",rechargeChannelError:""})),r.amount.trim()||(o(b=>({...b,amountError:_("请输入充值金额")})),h=!1),r.rechargeChannel||(o(b=>({...b,rechargeChannelError:_("请选择支付平台")})),h=!1),!!h){o(b=>({...b,loading:!0,error:""}));try{await n({amount:r.amount,rechargeChannel:r.rechargeChannel,currency:r.currency}),t()}catch{o(b=>({...b,error:_("提交失败,请重试")}))}finally{o(b=>({...b,loading:!1}))}}};return d(qn,{visible:e,onClose:t,title:_("充值 / 转账"),children:[d("div",{style:{display:"flex",marginBottom:Li===l.SMALL?16:28},children:[d("button",{type:"button",onClick:()=>f("online"),style:c.tabBtn(s==="online",!0),children:_("在线充值")}),d("button",{type:"button",onClick:()=>f("offline"),style:c.tabBtn(s==="offline",!1),children:_("线下转账")})]}),d("div",{style:{display:s==="online"?"block":"none"},children:d("form",{onSubmit:p,children:d(ui,{formState:r,setFormState:o,onClose:t,loading:r.loading})})}),d("div",{style:{display:s==="offline"?"block":"none"},children:d(gi,{formState:a,setFormState:i,onClose:t,loading:a.loading})})]})}function pt(){return(pt=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 Ai=["context","children"];function ki(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(r,o){if(r==null)return{};var a,i,s={},f=Object.keys(r);for(i=0;i<f.length;i++)o.indexOf(a=f[i])>=0||(s[a]=r[a]);return s}(e,Ai);return cn(t,n)}function Ei(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=ie(ki,pt({},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=[],a={},i=0,s=n.attributes,f=n.childNodes;for(i=s.length;i--;)s[i].name!=="slot"&&(a[s[i].name]=s[i].value,a[Jn(s[i].name)]=s[i].value);for(i=f.length;i--;){var c=t(f[i],null),p=f[i].slot;p?a[p]=ie(Vt,{name:p},c):o[i]=c}var u=r?ie(Vt,null,o):o;return ie(r||n.nodeName.toLowerCase(),a,u)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?ln:Ie)(this._vdom,this._root)}function Jn(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function Ci(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[Jn(e)]=n,this._vdom=cn(this._vdom,r),Ie(this._vdom,this._root)}}function vi(){Ie(this._vdom=null,this._root)}function Vt(e,t){var n=this;return ie("slot",pt({},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 He(e,t,n,r){function o(){var a=Reflect.construct(HTMLElement,[],o);return a._vdomComponent=e,a._root=r&&r.shadow?a.attachShadow({mode:r.mode||"open"}):a,a}return(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=Ei,o.prototype.attributeChangedCallback=Ci,o.prototype.disconnectedCallback=vi,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach(function(a){Object.defineProperty(o.prototype,a,{get:function(){return this._vdom.props[a]},set:function(i){this._vdom?this.attributeChangedCallback(a,null,i):(this._props||(this._props={}),this._props[a]=i,this.connectedCallback());var s=typeof i;i!=null&&s!=="string"&&s!=="boolean"&&s!=="number"||this.setAttribute(a,i)}})}),customElements.define(t||e.tagName||e.displayName||e.name,o)}function Mi(){const[e,t]=B(!1),n=async r=>{const o=await Un({amount:r.amount,currency:r.currency,rechargeChannel:r.rechargeChannel});window.open(o,"_blank")};return d("div",{children:[d(ft,{onClick:()=>t(!0),children:_("充值/转账")}),d(wi,{visible:e,onClose:()=>t(!1),onSubmit:n})]})}He(Mi,"best-recharge",["theme"],{shadow:!1});function Ti(){const e=k("size"),t={wrapper:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:e===l.SMALL?12:20,alignItems:"start",minWidth:880,"@media (max-width: 1020px)":{gridTemplateColumns:"1fr",gap:16,minWidth:"auto",width:"100%"}},fieldLabel:{fontSize:e===l.SMALL?12:13,marginBottom:6,fontWeight:500,textAlign:"left"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,outline:"none",border:"1px solid",boxSizing:"border-box",paddingRight:e===l.SMALL?48:64},inputError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",marginTop:6,fontSize:e===l.SMALL?12:13},inputWrapper:{position:"relative"},inputSuffix:{padding:"0 8px",fontSize:e===l.SMALL?12:13,opacity:.8},inputSuffixAbs:{position:"absolute",top:0,right:e===l.SMALL?10:12,height:"100%",display:"flex",alignItems:"center",color:"#999",pointerEvents:"none",fontSize:e===l.SMALL?12:13},blockTitle:{fontSize:e===l.SMALL?16:18,fontWeight:700,marginBottom:e===l.SMALL?12:16,textAlign:"left",display:"flex",alignItems:"center",gap:8},subTitle:{marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?8:10,fontWeight:600,textAlign:"left"},titleBar:{width:3,height:e===l.SMALL?16:20,background:"#1890ff",borderRadius:2},methodList:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,"@media (max-width: 600px)":{gridTemplateColumns:"1fr",gap:8}},bankList:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,"@media (max-width: 600px)":{gridTemplateColumns:"1fr",gap:8}}};return{white:{...t,left:{background:"#fff",borderRadius:8,padding:16,border:"1px solid #E5E6EB"},right:{background:"#fff",borderRadius:8,padding:16},currencyRow:{display:"flex",gap:10,flexWrap:"wrap","@media (max-width: 480px)":{gap:8}},currencyItem:n=>({padding:"6px 12px",borderRadius:6,border:`1px solid ${n?"#1890ff":"#E5E6EB"}`,color:n?"#1890ff":"#222",background:n?"#EEF7FF":"#fff",cursor:"pointer"}),input:{...t.input,border:"1px solid #E5E6EB",background:"#fff",color:"#222"},payButton:{width:"100%",marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?12:16,background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"8px 12px":"12px 16px",fontWeight:600,cursor:"pointer"},methodItem:n=>({padding:"10px 12px",textAlign:"left",borderRadius:8,border:`1px solid ${n?"#1890ff":"#F0F1F3"}`,background:n?"#EEF7FF":"#F7F8FA",cursor:"pointer"}),bankItem:{padding:"10px 12px",borderRadius:8,border:"1px solid #F0F1F3",background:"#F7F8FA",textAlign:"left"},noticeBox:{marginTop:e===l.SMALL?8:12,marginBottom:e===l.SMALL?12:16,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#FFF7E6",border:"1px solid #FFE7BA",color:"#AD6800",fontSize:e===l.SMALL?12:13},reminderTitle:{fontWeight:600,margin:"6px 0",textAlign:"left"},reminderList:{margin:0,paddingLeft:18,color:"#6b7280",lineHeight:1.6,textAlign:"left"}},dark:{...t,left:{background:"#181A20",borderRadius:8,padding:16,border:"1px solid #2B2E38"},right:{background:"#181A20",borderRadius:8,padding:16,border:"1px solid #2B2E38"},currencyRow:{display:"flex",gap:10,flexWrap:"wrap","@media (max-width: 480px)":{gap:8}},currencyItem:n=>({padding:"6px 12px",borderRadius:6,border:`1px solid ${n?"#00E8C6":"#374151"}`,color:n?"#00E8C6":"#fff",background:n?"#0F2824":"#23262F",cursor:"pointer"}),input:{...t.input,border:"1px solid #374151",background:"#23262F",color:"#fff"},payButton:{width:"100%",marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?12:16,background:"#00E8C6",color:"#111",border:"none",borderRadius:6,padding:e===l.SMALL?"8px 12px":"12px 16px",fontWeight:700,cursor:"pointer"},methodItem:n=>({padding:"10px 12px",textAlign:"left",borderRadius:8,border:`1px solid ${n?"#00E8C6":"#374151"}`,background:n?"#0F2824":"#23262F",color:"#fff",cursor:"pointer"}),bankItem:{padding:"10px 12px",borderRadius:8,border:"1px solid #374151",background:"#23262F",textAlign:"left",color:"#fff"},noticeBox:{marginTop:e===l.SMALL?8:12,marginBottom:e===l.SMALL?12:16,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#2A1F0F",border:"1px solid #5C3E12",color:"#F4E3C1",fontSize:e===l.SMALL?12:13},reminderTitle:{fontWeight:600,margin:"6px 0",textAlign:"left",color:"#fff"},reminderList:{margin:0,paddingLeft:18,color:"#B5B8BE",lineHeight:1.6,textAlign:"left"}}}}function Bi(){const e=k("theme"),t=k("themeConfig"),n=e===O.WHITE,r=Ti(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,payButton:{...o.payButton,background:a.color},currencyItem:i=>({...o.currencyItem(i),border:`1px solid ${i?a.color:n?"#E5E6EB":"#374151"}`,color:i?a.color:n?"#222":"#fff"}),methodItem:i=>({...o.methodItem(i),border:`1px solid ${i?a.color:n?"#F0F1F3":"#374151"}`})}}return o}function Ri(){const e=k("size"),t={left:{background:"#fff",borderRadius:8,padding:16,border:"1px solid #E5E6EB"},blockTitle:{fontSize:e===l.SMALL?16:18,fontWeight:700,marginBottom:e===l.SMALL?12:16,textAlign:"left",display:"flex",alignItems:"center",gap:8},titleBar:{width:3,height:e===l.SMALL?16:20,background:"#1890ff",borderRadius:2},fieldLabel:{fontSize:e===l.SMALL?14:16,marginBottom:6,fontWeight:500,textAlign:"left"},required:{color:"#ff4d4f",marginRight:4},currencyRow:{display:"flex",gap:10,flexWrap:"wrap","@media (max-width: 600px)":{gap:8}},currencyItem:n=>({padding:"6px 12px",borderRadius:6,border:`1px solid ${n?"#1890ff":"#E5E6EB"}`,color:n?"#1890ff":"#222",background:n?"#EEF7FF":"#fff",cursor:"pointer"}),inputWrapper:{position:"relative"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,outline:"none",border:"1px solid",boxSizing:"border-box",paddingRight:e===l.SMALL?48:64},inputError:{border:"1px solid #ff4d4f"},inputSuffixAbs:{position:"absolute",top:0,right:e===l.SMALL?10:12,height:"100%",display:"flex",alignItems:"center",color:"#999",pointerEvents:"none",fontSize:e===l.SMALL?12:13},subTitle:{fontSize:e===l.SMALL?12:14,marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?8:10,textAlign:"left"},methodList:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,"@media (max-width: 600px)":{gridTemplateColumns:"1fr",gap:8}},methodItem:n=>({padding:"12px 16px",textAlign:"left",borderRadius:10,border:`1px solid ${n?"#1890ff":"#F0F1F3"}`,background:n?"#EEF7FF":"#F7F8FA",cursor:"pointer",display:"flex",alignItems:"center",gap:8,minHeight:44}),channelIcon:{width:22,height:22,objectFit:"contain",marginRight:8,display:"inline-block"},bankList:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,"@media (max-width: 600px)":{gridTemplateColumns:"1fr",gap:8}},bankItem:n=>({padding:"12px 16px",borderRadius:10,border:`1px solid ${n?"#1890ff":"#F0F1F3"}`,background:n?"#EEF7FF":"#F7F8FA",textAlign:"left",cursor:"pointer",display:"flex",alignItems:"center",gap:8,minHeight:44}),error:{color:"#ff4d4f",marginTop:6,fontSize:e===l.SMALL?12:13}};return{white:{...t,input:{...t.input,border:"1px solid #E5E6EB",background:"#fff",color:"#222"}},dark:{...t,left:{background:"#181A20",borderRadius:8,padding:16,border:"1px solid #2B2E38"},titleBar:{...t.titleBar,background:"#00E8C6"},currencyItem:n=>({padding:"6px 12px",borderRadius:6,border:`1px solid ${n?"#00E8C6":"#374151"}`,color:n?"#00E8C6":"#fff",background:n?"#0F2824":"#23262F",cursor:"pointer"}),input:{...t.input,border:"1px solid #374151",background:"#23262F",color:"#fff"},methodItem:n=>({padding:"10px 12px",textAlign:"left",borderRadius:8,border:`1px solid ${n?"#00E8C6":"#374151"}`,background:n?"#0F2824":"#23262F",color:"#fff",cursor:"pointer"}),bankItem:n=>({padding:"10px 12px",borderRadius:8,border:`1px solid ${n?"#00E8C6":"#374151"}`,background:n?"#0F2824":"#23262F",textAlign:"left",color:"#fff",cursor:"pointer"})}}}function Fi(){const e=k("theme"),t=k("themeConfig"),n=e===O.WHITE,r=Ri(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,titleBar:{...o.titleBar,background:a.color},currencyItem:i=>({...o.currencyItem(i),border:`1px solid ${i?a.color:n?"#E5E6EB":"#374151"}`,color:i?a.color:n?"#222":"#fff"}),methodItem:i=>({...o.methodItem(i),border:`1px solid ${i?a.color:n?"#F0F1F3":"#374151"}`}),bankItem:i=>({...o.bankItem(i),border:`1px solid ${i?a.color:n?"#F0F1F3":"#374151"}`})}}return o}function Ii({onChannelChange:e,onAmountChange:t,onCurrencyChange:n,initialAmount:r="",initialCurrency:o="USD",initialPaymentType:a="online",amountError:i=""}){const s=Fi(),c=JSON.parse(sessionStorage.getItem("all_dicts")||"{}")?.currency||[],[p,u]=B([]),[h,b]=B([]),[g,x]=B({currency:o,amount:r,onlineChannel:"",bankChannel:"",paymentType:a,amountError:""});q(()=>{qo({currency:g.currency}).then(L=>{const A=L.onlineChannel||[],T=L.offlineChannel||[];u(A),b(T);const z=A.length>0,N=T?.[0]?.value||"",$=A?.[0]?.value||"",G=z?a:"bank",U=G==="online"?$:N;x(K=>({...K,onlineChannel:$,bankChannel:N,paymentType:G})),U&&e(U,G)})},[g.currency]);function y(L){return L=L.replace(/[^\d.]/g,""),L=L.replace(/\.(?=.*\.)/g,""),L=L.replace(/^(\d+)(\.\d{0,2})?.*$/,"$1$2"),L=L.replace(/^0+(\d)/,"$1"),L.startsWith(".")&&(L="0"+L),L}const S=L=>{x(A=>({...A,currency:L})),n(L)},w=L=>{const A=y(L);x(T=>({...T,amount:A,amountError:""})),t(A)},M=(L,A)=>{x(T=>({...T,[A==="online"?"onlineChannel":"bankChannel"]:L,paymentType:A})),e(L,A)};return d("div",{style:s.left,children:[d("div",{style:s.blockTitle,children:[d("span",{style:s.titleBar}),_("选择支付方式")]}),d("div",{style:s.fieldLabel,children:_("支付币种")}),d("div",{style:s.currencyRow,children:(c||[]).slice(0,4).map(L=>d("button",{type:"button",onClick:()=>S(L.value),style:s.currencyItem(g.currency===L.value),children:L.label}))}),d("div",{style:{height:12}}),d("div",{style:s.fieldLabel,children:[d("span",{style:s.required,children:"*"}),_("支付金额")]}),d("div",{style:s.inputWrapper,children:[d("input",{type:"text",placeholder:_("请输入充值金额"),value:g.amount,onInput:L=>{w(L.target.value)},style:{...s.input,...i?s.inputError:{}}}),d("div",{style:s.inputSuffixAbs,children:g.currency})]}),i&&d("div",{style:s.error,children:i}),d("div",{style:{height:20}}),d("div",{style:s.fieldLabel,children:_("支付方式")}),p.length>0&&d("div",{children:[d("div",{style:s.subTitle,children:_("线上支付")}),d("div",{style:s.methodList,children:p.map(L=>d("button",{type:"button",onClick:()=>M(L.value,"online"),style:s.methodItem(g.onlineChannel===L.value&&g.paymentType==="online"),children:[L.icon&&d("img",{src:L.icon,alt:L.label,style:s.channelIcon}),L.label]}))})]}),d("div",{style:s.subTitle,children:_("银行转账")}),d("div",{style:s.bankList,children:h.map(L=>d("button",{type:"button",onClick:()=>M(L.value,"bank"),style:s.bankItem(g.bankChannel===L.value&&g.paymentType==="bank"),children:[L.icon&&d("img",{src:L.icon,alt:L.label,style:s.channelIcon}),L.label]}))})]})}function Di(){const e=k("size"),t={right:{background:"#fff",borderRadius:8,padding:16},blockTitle:{fontSize:e===l.SMALL?16:18,fontWeight:700,marginBottom:e===l.SMALL?12:16,textAlign:"left",display:"flex",alignItems:"center",gap:8},titleBar:{width:3,height:e===l.SMALL?16:20,background:"#1890ff",borderRadius:2},inputWrapper:{position:"relative"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,outline:"none",border:"1px solid",boxSizing:"border-box",paddingRight:e===l.SMALL?48:64},inputError:{border:"1px solid #ff4d4f"},disabled:{backgroundColor:"#f5f5f5",color:"#999",cursor:"not-allowed"},disabledDark:{backgroundColor:"#1A1D23",color:"#6B7280",cursor:"not-allowed",border:"1px solid #374151"},inputSuffixAbs:{position:"absolute",top:0,right:e===l.SMALL?10:12,height:"100%",display:"flex",alignItems:"center",color:"#999",pointerEvents:"none",fontSize:e===l.SMALL?12:13},payButton:{width:"100%",marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?12:16,background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"8px 12px":"12px 16px",fontWeight:600,cursor:"pointer"},noticeBox:{marginTop:e===l.SMALL?8:12,marginBottom:e===l.SMALL?12:16,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#FFF7E6",border:"1px solid #FFE7BA",color:"#AD6800",fontSize:e===l.SMALL?12:13},calcBox:{marginTop:e===l.SMALL?8:12,marginBottom:e===l.SMALL?8:12,color:"#666",textAlign:"left",lineHeight:1.6,fontSize:e===l.SMALL?12:13},calcLine:{marginBottom:4},calcAmount:{color:"#ff4d4f",fontWeight:700,margin:"0 4px"},reminderTitle:{fontWeight:600,margin:"6px 0",textAlign:"left"},reminderList:{margin:0,paddingLeft:18,color:"#6b7280",lineHeight:1.6,textAlign:"left",listStyleType:"disc",listStylePosition:"outside"},listItem:{listStyleType:"disc",listStylePosition:"outside"},error:{color:"#ff4d4f",marginTop:6,fontSize:e===l.SMALL?12:13}};return{white:{...t,input:{...t.input,border:"1px solid #E5E6EB",background:"#fff",color:"#222"}},dark:{...t,right:{background:"#181A20",borderRadius:8,padding:16,border:"1px solid #2B2E38"},titleBar:{...t.titleBar,background:"#00E8C6"},input:{...t.input,border:"1px solid #374151",background:"#23262F",color:"#fff"},payButton:{...t.payButton,background:"#00E8C6",color:"#111",fontWeight:700},noticeBox:{...t.noticeBox,background:"#2A1F0F",border:"1px solid #5C3E12",color:"#F4E3C1"},reminderTitle:{...t.reminderTitle,color:"#fff"},reminderList:{...t.reminderList,color:"#B5B8BE"}}}}function Oi(){const e=k("theme"),t=k("themeConfig"),n=e===O.WHITE,r=Di(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,payButton:{...o.payButton,background:a.color},titleBar:{...o.titleBar,background:a.color}}}return o}function zi({onSubmit:e,amount:t,currency:n,channel:r,loading:o=!1,error:a="",onAmountError:i}){const s=Oi(),f=s.right.background==="#181A20",[c,p]=B({amount:t,currency:n,channel:r,loading:o,error:a,amountError:""}),[u,h]=B(null);q(()=>{p(x=>({...x,amount:t,currency:n,channel:r,loading:o,error:a}));const g=setTimeout(()=>{t&&r&&n?$n({channel:r,amount:t,currency:n}).then(x=>h(x)).catch(()=>h(null)):h(null)},300);return()=>clearTimeout(g)},[t,n,r,o,a]);const b=async g=>{g&&g.preventDefault();let x=!0;if(t.trim()||(x=!1,i?.(_("请输入充值金额"))),r||(x=!1,p(y=>({...y,error:_("请选择支付平台")}))),!!x){p(y=>({...y,loading:!0,error:""}));try{await e({amount:t,currency:n,rechargeChannel:r})}finally{p(y=>({...y,loading:!1}))}}};return d("div",{style:s.right,children:[d("div",{style:s.blockTitle,children:[d("span",{style:s.titleBar}),_("在线支付")]}),d("form",{onSubmit:b,children:[d("div",{style:s.inputWrapper,children:[d("input",{type:"text",placeholder:_("支付金额"),value:c.amount,readOnly:!0,disabled:!0,style:{...s.input,...f?s.disabledDark:s.disabled,width:"100%"}}),d("div",{style:s.inputSuffixAbs,children:c.currency})]}),d("button",{type:"submit",disabled:c.loading,style:s.payButton,children:c.loading?_("提交中..."):_("立即支付")})]}),u&&d("div",{style:s.calcBox,children:[d("div",{style:s.calcLine,children:[_("预计支付金额约为:"),d("span",{style:s.calcAmount,children:`$${u.paymentAmount}`}),u.currency]}),d("div",{style:s.calcLine,children:[_("手续费约为:"),d("span",{style:s.calcAmount,children:`$${u.fee}`}),u.currency]}),d("div",{children:_("注:地区/币种/卡类型可能影响手续费,最终以平台为准。")})]}),d("div",{style:s.noticeBox,children:_("请在转账后提交银行回单,否则可能无法及时核验")}),d("div",{style:s.reminderTitle,children:_("温馨提示")}),d("ul",{style:s.reminderList,children:[d("li",{children:_("支付金额须与申请金额一致,请勿多付、少付或分批提交。")}),d("li",{children:_("请妥善保存回单并提供准确的支付时间,否则可能无法核验。")}),d("li",{children:_("工作时间提交4小时内审核,非工作时间将顺延至下一个工作日。")}),d("li",{children:_("如有问题,请联系平台客服。")}),d("li",{children:_("预付充值将收取平台服务费,具体以官方为准。")})]}),c.error&&d("div",{style:s.error,children:c.error})]})}function Pi(){const e=k("size"),t={container:{background:"#fff",borderRadius:8,padding:e===l.SMALL?16:20,width:"100%",maxWidth:"100%",boxSizing:"border-box","@media (max-width: 1020px)":{padding:e===l.SMALL?12:16}},header:{marginBottom:e===l.SMALL?20:24},backButton:{display:"flex",alignItems:"center",gap:8,background:"none",border:"none",color:"#1890ff",cursor:"pointer",fontSize:e===l.SMALL?14:16,fontWeight:500},backIcon:{fontSize:e===l.SMALL?16:18},uploadSection:{marginBottom:e===l.SMALL?24:32},uploadArea:{border:"2px dashed #D9D9D9",borderRadius:8,padding:e===l.SMALL?"40px 20px":"60px 30px",textAlign:"center",cursor:"pointer",background:"#FAFAFA",transition:"all 0.3s ease",width:"100%",boxSizing:"border-box","@media (max-width: 600px)":{padding:e===l.SMALL?"30px 15px":"40px 20px"}},uploadIcon:{fontSize:e===l.SMALL?48:64,marginBottom:e===l.SMALL?12:16},uploadTitle:{fontSize:e===l.SMALL?16:18,fontWeight:600,color:"#222",marginBottom:e===l.SMALL?8:12},uploadHint:{fontSize:e===l.SMALL?13:14,color:"#999"},hiddenInput:{display:"none"},fileList:{marginTop:e===l.SMALL?12:16},fileItem:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:e===l.SMALL?"8px 12px":"10px 16px",background:"#F5F5F5",borderRadius:6,marginBottom:8},fileName:{fontSize:e===l.SMALL?13:14,color:"#222"},removeButton:{background:"#ff4d4f",color:"#fff",border:"none",borderRadius:"50%",width:20,height:20,cursor:"pointer",fontSize:12,display:"flex",alignItems:"center",justifyContent:"center"},fieldSection:{marginBottom:e===l.SMALL?20:24},fieldLabel:{display:"block",fontSize:e===l.SMALL?14:16,fontWeight:500,color:"#222",marginBottom:e===l.SMALL?8:12},required:{color:"#ff4d4f",marginRight:4},inputWrapper:{position:"relative"},input:{width:"100%",padding:e===l.SMALL?"10px 12px":"12px 16px",borderRadius:6,border:"1px solid #D9D9D9",outline:"none",fontSize:e===l.SMALL?14:16,boxSizing:"border-box"},inputError:{border:"1px solid #ff4d4f"},disabled:{backgroundColor:"#f5f5f5",color:"#999",cursor:"not-allowed"},disabledDark:{backgroundColor:"#1A1D23",color:"#6B7280",cursor:"not-allowed",border:"1px solid #374151"},calendarIcon:{position:"absolute",right:e===l.SMALL?12:16,top:"50%",transform:"translateY(-50%)",fontSize:e===l.SMALL?16:18,pointerEvents:"none"},currencySuffix:{position:"absolute",right:e===l.SMALL?12:16,top:"50%",transform:"translateY(-50%)",fontSize:e===l.SMALL?14:16,color:"#999",pointerEvents:"none"},buttonSection:{display:"flex",gap:e===l.SMALL?12:16,marginTop:e===l.SMALL?32:40,width:"100%",boxSizing:"border-box","@media (max-width: 600px)":{flexDirection:"column",gap:e===l.SMALL?8:12}},cancelButton:{flex:1,padding:e===l.SMALL?"10px 16px":"12px 20px",borderRadius:6,border:"1px solid #D9D9D9",background:"#fff",color:"#222",fontSize:e===l.SMALL?14:16,fontWeight:500,cursor:"pointer",minWidth:0,boxSizing:"border-box"},submitButton:{flex:1,padding:e===l.SMALL?"10px 16px":"12px 20px",borderRadius:6,border:"none",background:"#1890ff",color:"#fff",fontSize:e===l.SMALL?14:16,fontWeight:600,cursor:"pointer",minWidth:0,boxSizing:"border-box"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:6}};return{white:{...t},dark:{...t,container:{...t.container,background:"#181A20",border:"1px solid #2B2E38"},backButton:{...t.backButton,color:"#00E8C6"},uploadArea:{...t.uploadArea,border:"2px dashed #374151",background:"#23262F"},uploadTitle:{...t.uploadTitle,color:"#fff"},uploadHint:{...t.uploadHint,color:"#B5B8BE"},fileItem:{...t.fileItem,background:"#2B2E38"},fileName:{...t.fileName,color:"#fff"},fieldLabel:{...t.fieldLabel,color:"#fff"},input:{...t.input,border:"1px solid #374151",background:"#23262F",color:"#fff"},calendarIcon:{...t.calendarIcon,color:"#B5B8BE"},currencySuffix:{...t.currencySuffix,color:"#B5B8BE"},cancelButton:{...t.cancelButton,border:"1px solid #374151",background:"#23262F",color:"#fff"},submitButton:{...t.submitButton,background:"#00E8C6",color:"#111"}}}}function Ni(){const e=k("theme"),t=k("themeConfig"),n=e===O.WHITE,r=Pi(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,backButton:{...o.backButton,color:a.color},submitButton:{...o.submitButton,background:a.color}}}return o}function Ui(){const e=k("theme"),t=k("themeConfig"),n={container:{position:"relative",display:"inline-block"},input:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 12px",border:"1px solid #d9d9d9",borderRadius:"6px",backgroundColor:"#fff",cursor:"pointer",transition:"all 0.3s",outline:"none",fontSize:"14px",lineHeight:"1.5715",color:"rgba(0, 0, 0, 0.85)"},inputText:{flex:1,textAlign:"left",color:"rgba(0, 0, 0, 0.85)"},calendarIcon:{fontSize:"16px",color:"rgba(0, 0, 0, 0.45)",marginLeft:"8px"},disabled:{backgroundColor:"#f5f5f5",color:"rgba(0, 0, 0, 0.25)",cursor:"not-allowed"},panel:{position:"absolute",top:"100%",left:0,zIndex:1050,backgroundColor:"#fff",border:"1px solid #d9d9d9",borderRadius:"6px",boxShadow:"0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05)",padding:"8px",minWidth:"280px",marginTop:"4px"},header:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 0",marginBottom:"8px"},navButton:{display:"flex",alignItems:"center",justifyContent:"center",width:"24px",height:"24px",border:"none",backgroundColor:"transparent",cursor:"pointer",borderRadius:"4px",fontSize:"16px",color:"rgba(0, 0, 0, 0.45)",transition:"all 0.3s"},monthYear:{fontSize:"16px",fontWeight:500,color:"rgba(0, 0, 0, 0.85)"},weekHeader:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:"4px",marginBottom:"8px"},weekDay:{display:"flex",alignItems:"center",justifyContent:"center",height:"32px",fontSize:"14px",fontWeight:500,color:"rgba(0, 0, 0, 0.85)"},calendarGrid:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:"4px"},dayButton:{display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",border:"none",backgroundColor:"transparent",cursor:"pointer",borderRadius:"4px",fontSize:"14px",transition:"all 0.3s",color:"rgba(0, 0, 0, 0.85)"},dayCurrentMonth:{color:"rgba(0, 0, 0, 0.85)"},dayOtherMonth:{color:"rgba(0, 0, 0, 0.25)"},dayToday:{fontWeight:600,color:"#1890ff"},daySelected:{backgroundColor:"#1890ff",color:"#fff"},yearPicker:{maxHeight:"200px",overflowY:"auto",marginBottom:"8px",border:"1px solid #f0f0f0",borderRadius:"4px",padding:"8px"},yearGrid:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"4px"},yearButton:{display:"flex",alignItems:"center",justifyContent:"center",padding:"6px 8px",border:"none",backgroundColor:"transparent",cursor:"pointer",borderRadius:"4px",fontSize:"14px",transition:"all 0.3s",color:"rgba(0, 0, 0, 0.85)"},yearSelected:{backgroundColor:"#1890ff",color:"#fff"},small:{padding:"4px 8px",fontSize:"12px"},middle:{padding:"8px 12px",fontSize:"14px"},large:{padding:"12px 16px",fontSize:"16px"}},r={white:{...n,input:{...n.input,border:"1px solid #d9d9d9",backgroundColor:"#fff",color:"rgba(0, 0, 0, 0.85)"},inputText:{...n.inputText,color:"rgba(0, 0, 0, 0.85)"},calendarIcon:{...n.calendarIcon,color:"rgba(0, 0, 0, 0.45)"},disabled:{...n.disabled,backgroundColor:"#f5f5f5",color:"rgba(0, 0, 0, 0.25)"},panel:{...n.panel,backgroundColor:"#fff",border:"1px solid #d9d9d9"},navButton:{...n.navButton,color:"rgba(0, 0, 0, 0.45)"},monthYear:{...n.monthYear,color:"rgba(0, 0, 0, 0.85)"},weekDay:{...n.weekDay,color:"rgba(0, 0, 0, 0.85)"},dayButton:{...n.dayButton,color:"rgba(0, 0, 0, 0.85)"},dayCurrentMonth:{...n.dayCurrentMonth,color:"rgba(0, 0, 0, 0.85)"},dayOtherMonth:{...n.dayOtherMonth,color:"rgba(0, 0, 0, 0.25)"},dayToday:{...n.dayToday,color:"#1890ff"},daySelected:{...n.daySelected,backgroundColor:"#1890ff",color:"#fff"},yearPicker:{...n.yearPicker,border:"1px solid #f0f0f0"},yearButton:{...n.yearButton,color:"rgba(0, 0, 0, 0.85)"},yearSelected:{...n.yearSelected,backgroundColor:"#1890ff",color:"#fff"}},dark:{...n,input:{...n.input,border:"1px solid #434343",backgroundColor:"#141414",color:"rgba(255, 255, 255, 0.85)"},inputText:{...n.inputText,color:"rgba(255, 255, 255, 0.85)"},calendarIcon:{...n.calendarIcon,color:"rgba(255, 255, 255, 0.45)"},disabled:{...n.disabled,backgroundColor:"#262626",color:"rgba(255, 255, 255, 0.25)"},panel:{...n.panel,backgroundColor:"#141414",border:"1px solid #434343"},navButton:{...n.navButton,color:"rgba(255, 255, 255, 0.45)"},monthYear:{...n.monthYear,color:"rgba(255, 255, 255, 0.85)"},weekDay:{...n.weekDay,color:"rgba(255, 255, 255, 0.85)"},dayButton:{...n.dayButton,color:"rgba(255, 255, 255, 0.85)"},dayCurrentMonth:{...n.dayCurrentMonth,color:"rgba(255, 255, 255, 0.85)"},dayOtherMonth:{...n.dayOtherMonth,color:"rgba(255, 255, 255, 0.25)"},dayToday:{...n.dayToday,color:"#00E8C6"},daySelected:{...n.daySelected,backgroundColor:"#00E8C6",color:"#111"},yearPicker:{...n.yearPicker,border:"1px solid #434343"},yearButton:{...n.yearButton,color:"rgba(255, 255, 255, 0.85)"},yearSelected:{...n.yearSelected,backgroundColor:"#00E8C6",color:"#111"}}},o=r[e]||r.white,a=t?.[e]?.color;return a&&(o.dayToday.color=a,o.daySelected.backgroundColor=a,o.yearSelected.backgroundColor=a,e==="dark"&&(o.daySelected.color="#111",o.yearSelected.color="#111")),o}function $i(){return Ui()}function Wi({value:e="",placeholder:t=_("请选择日期"),disabled:n=!1,size:r="middle",onChange:o,onFocus:a,onBlur:i,className:s="",style:f={}}){const c=$i(),[p,u]=B(!1),[h,b]=B(e),[g,x]=B(new Date),[y,S]=B(!1),w=me(null),M=E=>{if(!E)return"";const v=new Date(E);return`${v.getFullYear()}-${String(v.getMonth()+1).padStart(2,"0")}-${String(v.getDate()).padStart(2,"0")}`},L=(E,v)=>new Date(E,v+1,0).getDate(),A=(E,v)=>new Date(E,v,1).getDay(),T=()=>{const E=g.getFullYear(),v=g.getMonth(),ce=L(E,v),Gn=A(E,v),de=[],ht=v===0?11:v-1,mt=v===0?E-1:E,gt=L(mt,ht);for(let W=Gn-1;W>=0;W--)de.push({date:gt-W,isCurrentMonth:!1,isToday:!1,isSelected:!1,fullDate:`${mt}-${String(ht+1).padStart(2,"0")}-${String(gt-W).padStart(2,"0")}`});const Kn=new Date,bt=h?new Date(h):null;for(let W=1;W<=ce;W++){const yt=`${E}-${String(v+1).padStart(2,"0")}-${String(W).padStart(2,"0")}`,xt=new Date(yt);de.push({date:W,isCurrentMonth:!0,isToday:xt.toDateString()===Kn.toDateString(),isSelected:bt&&xt.toDateString()===bt.toDateString(),fullDate:yt})}const Xn=v===11?0:v+1,Zn=v===11?E+1:E,Qn=42-de.length;for(let W=1;W<=Qn;W++)de.push({date:W,isCurrentMonth:!1,isToday:!1,isSelected:!1,fullDate:`${Zn}-${String(Xn+1).padStart(2,"0")}-${String(W).padStart(2,"0")}`});return de},z=E=>{b(E),u(!1),o?.(E)},N=E=>{const v=new Date(g);E==="prev"?v.setMonth(v.getMonth()-1):v.setMonth(v.getMonth()+1),x(v)},$=E=>{const v=new Date(g);E==="prev"?v.setFullYear(v.getFullYear()-1):v.setFullYear(v.getFullYear()+1),x(v)},G=E=>{const v=new Date(g);v.setFullYear(E),x(v),S(!1)},U=()=>{const E=new Date().getFullYear(),v=[];for(let ce=E-50;ce<=E+50;ce++)v.push(ce);return v};q(()=>{const E=v=>{w.current&&!w.current.contains(v.target)&&u(!1)};if(p)return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[p]);const K=T(),Vn=[_("一月"),_("二月"),_("三月"),_("四月"),_("五月"),_("六月"),_("七月"),_("八月"),_("九月"),_("十月"),_("十一月"),_("十二月")],Yn=[_("日"),_("一"),_("二"),_("三"),_("四"),_("五"),_("六")];return d("div",{ref:w,className:`date-picker-container ${s}`,style:{...c.container,...f},children:[d("div",{style:{...c.input,...c[r],...n?c.disabled:{}},onClick:()=>!n&&u(!p),onFocus:a,onBlur:i,children:[d("span",{style:c.inputText,children:h?M(h):t}),d("span",{style:c.calendarIcon,children:"📅"})]}),p&&d("div",{style:c.panel,children:[d("div",{style:c.header,children:[d("button",{type:"button",style:c.navButton,onClick:()=>$("prev"),children:"‹‹"}),d("button",{type:"button",style:c.navButton,onClick:()=>N("prev"),children:"‹"}),d("span",{style:c.monthYear,onClick:()=>S(!y),children:[g.getFullYear(),"年",Vn[g.getMonth()]]}),d("button",{type:"button",style:c.navButton,onClick:()=>N("next"),children:"›"}),d("button",{type:"button",style:c.navButton,onClick:()=>$("next"),children:"››"})]}),y&&d("div",{style:c.yearPicker,children:d("div",{style:c.yearGrid,children:U().map(E=>d("button",{type:"button",style:{...c.yearButton,...E===g.getFullYear()?c.yearSelected:{}},onClick:()=>G(E),children:E},E))})}),d("div",{style:c.weekHeader,children:Yn.map(E=>d("div",{style:c.weekDay,children:E},E))}),d("div",{style:c.calendarGrid,children:K.map((E,v)=>d("button",{type:"button",style:{...c.dayButton,...E.isCurrentMonth?c.dayCurrentMonth:c.dayOtherMonth,...E.isToday?c.dayToday:{},...E.isSelected?c.daySelected:{}},onClick:()=>z(E.fullDate),disabled:n,children:E.date},v))})]})]})}function Hi({onBack:e,onCancel:t,currency:n="USD",amount:r="",channel:o="",onAmountError:a}){const i=Ni(),s=i.container.background==="#181A20",[f,c]=B({urls:[],transferTime:"",transferAmount:r,transactionId:"",payerName:"",filesError:"",timeError:"",amountError:"",transactionIdError:"",payerNameError:""});q(()=>{c(u=>({...u,transferAmount:r}))},[r]);const p=async()=>{let u=!0;if(f.urls.length===0&&(u=!1,c(h=>({...h,filesError:_("请上传银行转账回单")}))),f.transferTime||(u=!1,c(h=>({...h,timeError:_("请选择转账时间")}))),r.trim()||(u=!1,a?.(_("请输入充值金额"))),f.transactionId.trim()||(u=!1,c(h=>({...h,transactionIdError:_("请输入转账交易ID")}))),f.payerName.trim()||(u=!1,c(h=>({...h,payerNameError:_("请输入付款人名称")}))),!!u)try{await Nn({transferDate:f.transferTime,transferNo:f.transactionId,transferChannel:o,voucherUrls:f.urls,payerName:f.payerName}),Re.success(_("提交成功")),t()}finally{c(h=>({...h,loading:!1}))}};return d("div",{style:i.container,children:[d("div",{style:i.header,children:d("button",{type:"button",onClick:e,style:i.backButton,children:[d("span",{style:i.backIcon,children:"←"}),_("返回账户信息")]})}),d("div",{style:i.uploadSection,children:[d(jn,{value:f.urls,onChange:u=>{c(h=>({...h,urls:u,filesError:""}))},maxCount:10,accept:"image/*,.pdf",multiple:!0}),f.filesError&&d("div",{style:i.error,children:f.filesError})]}),d("div",{style:i.fieldSection,children:[d("label",{style:i.fieldLabel,children:[d("span",{style:i.required,children:"*"}),_("转账时间")]}),d(Wi,{value:f.transferTime,placeholder:_("请选择转账时间"),onChange:u=>{c(h=>({...h,transferTime:u,timeError:""}))},style:{width:"100%"}}),f.timeError&&d("div",{style:i.error,children:f.timeError})]}),d("div",{style:i.fieldSection,children:[d("label",{style:i.fieldLabel,children:_("转账金额")}),d("div",{style:i.inputWrapper,children:[d("input",{type:"text",placeholder:_("请输入实际转账金额"),value:f.transferAmount,readOnly:!0,disabled:!0,style:{...i.input,...s?i.disabledDark:i.disabled}}),d("span",{style:i.currencySuffix,children:n})]})]}),d("div",{style:i.fieldSection,children:[d("label",{style:i.fieldLabel,children:[d("span",{style:i.required,children:"*"}),_("交易ID")]}),d("input",{type:"text",placeholder:_("请输入转账交易ID"),value:f.transactionId,onChange:u=>{c(h=>({...h,transactionId:u.target.value,transactionIdError:""}))},style:{...i.input,...f.transactionIdError?i.inputError:{}}}),f.transactionIdError&&d("div",{style:i.error,children:f.transactionIdError})]}),d("div",{style:i.fieldSection,children:[d("label",{style:i.fieldLabel,children:[d("span",{style:i.required,children:"*"}),_("付款人名称")]}),d("input",{type:"text",placeholder:_("请输入付款人名称"),value:f.payerName,onChange:u=>{c(h=>({...h,payerName:u.target.value,payerNameError:""}))},style:{...i.input,...f.payerNameError?i.inputError:{}}}),f.payerNameError&&d("div",{style:i.error,children:f.payerNameError})]}),d("div",{style:i.buttonSection,children:[d("button",{type:"button",onClick:t,style:i.cancelButton,children:_("取消")}),d("button",{type:"button",onClick:p,style:i.submitButton,children:_("提交审核")})]})]})}function ji(){const e=k("size"),t={container:{background:"#fff",borderRadius:8,padding:e===l.SMALL?16:20,width:"100%",maxWidth:"100%",boxSizing:"border-box","@media (max-width: 1020px)":{maxWidth:"100%",margin:0,padding:e===l.SMALL?12:16},"@media (min-width: 1021px)":{maxWidth:600,margin:"0 auto"}},header:{fontSize:e===l.SMALL?16:18,fontWeight:700,marginBottom:e===l.SMALL?16:20,textAlign:"left",display:"flex",alignItems:"center",gap:8},titleBar:{width:3,height:e===l.SMALL?16:20,background:"#1890ff",borderRadius:2},bankDetails:{marginBottom:e===l.SMALL?20:24},detailCard:{marginTop:12,marginBottom:12,border:"1px solid #f0f0f0",borderRadius:8,background:"#fafafa",overflow:"hidden"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:e===l.SMALL?"8px 0":"10px 0",borderBottom:"1px solid #f0f0f0",width:"100%",boxSizing:"border-box","@media (max-width: 600px)":{flexDirection:"column",alignItems:"flex-start",gap:4}},label:{fontSize:e===l.SMALL?13:14,color:"#666",fontWeight:500,minWidth:120,"@media (max-width: 600px)":{minWidth:"auto",marginBottom:2}},value:{fontSize:e===l.SMALL?13:14,color:"#222",fontWeight:500,textAlign:"right",flex:1,"@media (max-width: 600px)":{textAlign:"left",flex:"none",width:"100%"}},valueWithCopy:{display:"flex",alignItems:"center",gap:8,flex:1,justifyContent:"flex-end",minWidth:0,"@media (max-width: 600px)":{flex:"none",width:"100%",justifyContent:"flex-start"}},row:{display:"flex",alignItems:"center",padding:"10px 12px",borderBottom:"1px solid #ededed"},rowLast:{borderBottom:"none"},rowAlt:{background:"#fafafa"},labelMuted:{fontSize:e===l.SMALL?13:14,color:"#8c8c8c",fontWeight:500,flex:.4},valueStrong:{fontSize:e===l.SMALL?13:14,color:"#111",textAlign:"right",flex:.6,wordBreak:"break-all"},copyButton:{padding:e===l.SMALL?"4px 8px":"6px 12px",fontSize:e===l.SMALL?11:12,background:"#1890ff",color:"#fff",border:"none",borderRadius:4,cursor:"pointer",fontWeight:500,flexShrink:0,whiteSpace:"nowrap"},confirmButton:{width:"100%",marginBottom:e===l.SMALL?16:20,background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"12px 16px":"14px 20px",fontWeight:600,cursor:"pointer",fontSize:e===l.SMALL?14:16},noticeBox:{marginBottom:e===l.SMALL?16:20,padding:e===l.SMALL?"10px 12px":"12px 16px",borderRadius:6,background:"#FFF7E6",border:"1px solid #FFE7BA",color:"#AD6800",fontSize:e===l.SMALL?12:13,lineHeight:1.5},reminderTitle:{fontWeight:600,marginBottom:e===l.SMALL?8:12,textAlign:"left",fontSize:e===l.SMALL?14:16},reminderList:{margin:0,paddingLeft:18,color:"#666",lineHeight:1.6,textAlign:"left",fontSize:e===l.SMALL?12:13},link:{color:"#1890ff",textDecoration:"none",fontWeight:500}};return{white:{...t},dark:{...t,container:{...t.container,background:"#181A20",border:"1px solid #2B2E38"},titleBar:{...t.titleBar,background:"#00E8C6"},label:{...t.label,color:"#B5B8BE"},value:{...t.value,color:"#fff"},copyButton:{...t.copyButton,background:"#00E8C6",color:"#111"},confirmButton:{...t.confirmButton,background:"#00E8C6",color:"#111"},noticeBox:{...t.noticeBox,background:"#2A1F0F",border:"1px solid #5C3E12",color:"#F4E3C1"},reminderTitle:{...t.reminderTitle,color:"#fff"},reminderList:{...t.reminderList,color:"#B5B8BE"},link:{...t.link,color:"#00E8C6"}}}}function qi(){const e=k("theme"),t=k("themeConfig"),n=e===O.WHITE,r=ji(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,titleBar:{...o.titleBar,background:a.color},copyButton:{...o.copyButton,background:a.color},confirmButton:{...o.confirmButton,background:a.color},link:{...o.link,color:a.color}}}return o}function Ji({onConfirm:e,channelCode:t}){const n=qi(),[r,o]=B([]);return q(()=>{if(!t)return;let a=!0;return Wn({code:t}).then(i=>{if(a){if(Array.isArray(i)){o(i.map(s=>String(s)));return}if(i&&typeof i=="object"){const s=[];Object.keys(i).forEach(f=>{const c=i[f];s.push(`${f}: ${c}`)}),o(s);return}o(i?[String(i)]:[])}}).catch(()=>o([])),()=>{a=!1}},[t]),d("div",{style:n.container,children:[d("div",{style:n.header,children:[d("span",{style:n.titleBar}),_("银行转账")]}),r.length>0&&d("div",{style:n.detailCard,children:r.map((a,i)=>{const s=String(a).split(":"),f=s.shift()?.trim()||"",c=s.join(":").trim();return d("div",{style:{...n.row,...i===r.length-1?n.rowLast:{},...i%2===1?n.rowAlt:{}},children:[d("div",{style:n.labelMuted,children:f}),d("div",{style:n.valueStrong,children:c||"-"})]},i)})}),d("button",{type:"button",onClick:e,style:n.confirmButton,children:_("确认转账详情")}),d("div",{style:n.noticeBox,children:_("转账后提交银行回单提示")}),d("div",{style:n.reminderTitle,children:_("温馨提示")}),d("ul",{style:n.reminderList,children:[d("li",{children:_("支付金额匹配提醒")}),d("li",{children:_("保存交易回单提醒")}),d("li",{children:_("查看余额提醒")}),d("li",{children:_("联系客服提醒")}),d("li",{children:_("P卡转账延迟提醒")}),d("li",{children:[_("平台服务费说明")," ",d("a",{href:"#",style:n.link,children:_("费用政策")})," ",_("详情")]})]})]})}function Vi({visible:e,onClose:t,onSubmit:n}){const r=Bi(),[o,a]=B(!1),[i,s]=B({currency:"USD",amount:"",channel:"",paymentType:"online",loading:!1,error:"",amountError:"",channelError:"",showOfflineUpload:!1});q(()=>{const x=()=>{a(window.innerWidth<=1020)};return x(),window.addEventListener("resize",x),()=>window.removeEventListener("resize",x)},[]),q(()=>{e||s({currency:"USD",amount:"",channel:"",paymentType:"online",loading:!1,error:"",amountError:"",channelError:"",showOfflineUpload:!1})},[e]);const f=(x,y)=>{s(S=>({...S,channel:x,paymentType:y,channelError:""}))},c=x=>{s(y=>({...y,amount:x,amountError:""}))},p=x=>{s(y=>({...y,amountError:x}))},u=x=>{s(y=>({...y,currency:x}))},h=async x=>{s(y=>({...y,loading:!0,error:""}));try{await n(x),t()}catch{s(y=>({...y,error:_("提交失败,请重试")}))}finally{s(y=>({...y,loading:!1}))}},b=()=>{console.log("用户确认银行转账详情"),s(x=>({...x,showOfflineUpload:!0}))},g=()=>{s(x=>({...x,showOfflineUpload:!1}))};return d(qn,{visible:e,onClose:t,title:_("在线支付"),width:o?"95%":960,maxWidth:o?"95%":1e3,children:d("div",{style:{...r.wrapper,...o?{gridTemplateColumns:"1fr",gap:16,minWidth:"auto"}:{}},children:[d(Ii,{onChannelChange:f,onAmountChange:c,onCurrencyChange:u,initialAmount:i.amount,initialCurrency:i.currency,initialPaymentType:i.paymentType,amountError:i.amountError}),i.paymentType==="online"?d(zi,{onSubmit:h,amount:i.amount,currency:i.currency,channel:i.channel,loading:i.loading,error:i.error,onAmountError:p}):i.showOfflineUpload?d(Hi,{onBack:g,onCancel:t,currency:i.currency,amount:i.amount,channel:i.channel,onAmountError:p}):d(Ji,{onConfirm:b,channelCode:i.channel})]})})}function Yi(){const[e,t]=B(!1),n=async r=>{const o=await Un({amount:r.amount,currency:r.currency,rechargeChannel:r.rechargeChannel});window.open(o,"_blank")};return d("div",{children:[d(ft,{onClick:()=>t(!0),children:_("在线支付")}),d(Vi,{visible:e,onClose:()=>t(!1),onSubmit:n})]})}He(Yi,"best-payment",["theme"],{shadow:!1});const Yt={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 k("theme")===O.WHITE?Yt.white:Yt.dark}const Ki=({popover:e,children:t,popoverWidth:n,popoverMinWidth:r,offsetY:o,offsetX:a,popoverPosition:i="top"})=>{const s=k("size"),f=n??(s===l.SMALL?200:300),c=r??(s===l.SMALL?150:200),p=o??(s===l.SMALL?8:16),u=a??(s===l.SMALL?8:16),[h,b]=B(!1),[g,x]=B(i),y=me(null),S=me(null),w=Gi(),M=()=>{if(S.current&&(clearTimeout(S.current),S.current=null),i==="top"||i==="bottom")if(y.current){const z=y.current.getBoundingClientRect();i==="top"&&z.top<100?x("bottom"):i==="bottom"&&window.innerHeight-z.bottom<100?x("top"):x(i)}else x(i);else x(i);b(!0)},L=()=>{S.current=window.setTimeout(()=>{b(!1)},120)};let A={position:"absolute",zIndex:999,borderRadius:6,fontSize:s===l.SMALL?12:15,minWidth:c,width:f,padding:s===l.SMALL?"6px 12px":"8px 14px",pointerEvents:"auto",textAlign:"center",animation:"fadeInUp 0.3s",...w.popover},T={position:"absolute",zIndex:11,width:0,height:0};return g==="top"?(A={...A,left:"50%",top:-48,transform:"translateX(-50%)"},T={...T,left:"50%",bottom:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderTop:`8px solid ${w.arrow.top}`}):g==="bottom"?(A={...A,left:"50%",top:"100%",marginTop:p,transform:"translateX(-50%)"},T={...T,left:"50%",top:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderBottom:`8px solid ${w.arrow.bottom}`}):g==="leftTop"?(A={...A,right:"100%",top:0,marginRight:u,transform:"none"},T={...T,right:-8,top:s===l.SMALL?8:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderLeft:`8px solid ${w.arrow.left}`}):g==="rightTop"&&(A={...A,left:"100%",top:0,marginLeft:u,transform:"translateY(0)"},T={...T,left:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderRight:`8px solid ${w.arrow.right}`}),d("div",{ref:y,style:{position:"relative",display:"inline-block"},onMouseEnter:M,onMouseLeave:L,children:[t,h&&d("div",{style:A,onMouseEnter:M,onMouseLeave:L,children:[e,d("div",{style:T})]})]})};function Xi(){const e=k("size");return{white:{popoverTitle:{fontSize:e===l.SMALL?12:16,fontWeight:600,color:"#222",marginBottom:e===l.SMALL?12:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:e===l.SMALL?"6px 0":"8px 0",borderBottom:"1px solid #e5e7eb",fontSize:e===l.SMALL?12:15},detailLabel:{display:"flex",alignItems:"center",color:"#6b7280",fontWeight:500},detailDot:t=>({display:"inline-block",width:e===l.SMALL?6:8,height:e===l.SMALL?6:8,borderRadius:"50%",background:t,marginRight:e===l.SMALL?6:8}),detailValue:t=>({color:t,fontWeight:600,fontSize:e===l.SMALL?12:15}),main:{fontSize:e===l.SMALL?18:24,fontWeight:800,color:"#111827",display:"inline-block"},currency:{fontSize:e===l.SMALL?16:18,color:"#6b7280",marginLeft:e===l.SMALL?6:8,fontWeight:600}},dark:{popoverTitle:{fontSize:e===l.SMALL?14:16,fontWeight:600,color:"#fff",marginBottom:e===l.SMALL?14:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:e===l.SMALL?"6px 0":"8px 0",borderBottom:"1px solid #374151",fontSize:e===l.SMALL?12:15},detailLabel:{display:"flex",alignItems:"center",color:"#B5B8BE",fontWeight:500},detailDot:t=>({display:"inline-block",width:e===l.SMALL?6:8,height:e===l.SMALL?6:8,borderRadius:"50%",background:t,marginRight:e===l.SMALL?6:8}),detailValue:t=>({color:t,fontWeight:600,fontSize:e===l.SMALL?12:15}),main:{fontSize:e===l.SMALL?18:24,fontWeight:800,color:"#fff",display:"inline-block"},currency:{fontSize:e===l.SMALL?16:18,color:"#B5B8BE",marginLeft:e===l.SMALL?6:8,fontWeight:600}}}}function Zi(){const t=k("theme")===O.WHITE,n=Xi();return t?n.white:n.dark}function Gt(e){return e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}function Qi(e){const[t,n]=B({currBalance:0,currency:"USD",details:[]}),r=async()=>{try{const i=await Pn(),s=[{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"}],f={currBalance:i.currBalance,currency:"USD",symbol:"$",details:s};n(f)}catch(i){console.error("获取余额失败:",i)}};q(()=>{r()},[]),q(()=>{const i=()=>{r()};return window.addEventListener("refresh-balance",i),()=>{window.removeEventListener("refresh-balance",i)}},[]);const o=Zi(),a=[{label:_("真实金额"),value:t.details[0]?.value||0,color:"#15b36b",dot:"#15b36b"},{label:_("冻结金额"),value:t.details[1]?.value||0,color:"#f59e0b",dot:"#f59e0b"},...t.details.length>4?[{label:_("信用额度"),value:t.details[2]?.value||0,color:"#1890ff",dot:"#1890ff"},{label:_("已用额度"),value:t.details[3]?.value||0,color:"#ff0000",dot:"#ff0000"}]:[],{label:_("可用余额"),value:t.details[4]?.value||0,color:"#1890ff",dot:"#15b36b"}];return d(Ki,{popover:d(ne,{children:[d("div",{style:o.popoverTitle,children:_("余额详情")}),a.map(i=>d("div",{style:o.detailRow,children:[d("span",{style:o.detailLabel,children:[d("span",{style:o.detailDot(i.dot)}),i.label]}),d("span",{style:o.detailValue(i.color),children:Gt(i.value)})]},i.label))]}),popoverPosition:e.popoverPosition||"bottom",children:d("div",{style:o.main,children:[Gt(t.currBalance),d("span",{style:o.currency,children:t.currency})]})})}He(Qi,"best-statistical-balance");const Se={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 ea(e){return k("theme")===O.WHITE?{...Se.white,background:e||Se.white.background}:{...Se.dark,background:e||Se.dark.background}}function ta(e){switch(e){case"small":return{fontSize:"12px",gap:"2px"};case"large":return{fontSize:"18px",gap:"6px"};default:return{fontSize:"14px",gap:"4px"}}}function na({color:e,size:t="medium",children:n}){const[r,o]=B(!1),a=ea(e),i=ta(t),s={...a,...i,display:"flex",alignItems:"center"};return d(ne,{children:[d("style",{children:`
61
79
  @keyframes spin {
62
80
  from {
63
81
  transform: rotate(0deg);
@@ -76,4 +94,4 @@
76
94
  :host {
77
95
  display: inline-block;
78
96
  }
79
- `}),m(Tn,{onClick:async()=>{o(!0);try{kn(),await new Promise(f=>setTimeout(f,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})]})})]})}at(gi,"best-refresh-button",[],{shadow:!0});const bi=["best-recharge","best-statistical-balance","best-refresh-button"];exports.components=bi;exports.getBalanceData=Co;exports.initFundUnit=Mo;exports.npmTest=Mn;exports.printCurrentTime=Rn;exports.refreshBalance=kn;exports.viteProxy=Ro;
97
+ `}),d(ft,{onClick:async()=>{o(!0);try{Hn(),await new Promise(p=>setTimeout(p,300))}finally{o(!1)}},color:e,children:d("div",{style:s,children:[d("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:[d("path",{d:"M21 2v6h-6"}),d("path",{d:"M3 12a9 9 0 0 1 15-6.7L21 8"}),d("path",{d:"M3 22v-6h6"}),d("path",{d:"M21 12a9 9 0 0 1-15 6.7L3 16"})]}),n&&d("span",{children:n})]})})]})}He(na,"best-refresh-button",[],{shadow:!0});const ra=["best-recharge","best-payment","best-statistical-balance","best-refresh-button"];exports.components=ra;exports.getBalanceData=Jo;exports.initFundUnit=Vo;exports.npmTest=Ko;exports.printCurrentTime=Xo;exports.refreshBalance=Hn;exports.viteProxy=Zo;