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