best-unit 2.0.2 → 2.0.4
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 +13 -13
- package/dist/best-unit.js +1225 -1173
- package/package.json +1 -1
- package/src/api/index.ts +28 -1
- package/src/components/business/payment-sdk/index.tsx +1 -1
- package/src/components/business/payment-sdk/offline-detail/theme.tsx +2 -2
- package/src/components/business/payment-sdk/offline-payment/theme.tsx +30 -29
- package/src/components/business/payment-sdk/online-payment/index.tsx +11 -5
- package/src/components/business/payment-sdk/payment-dialog/index.tsx +1 -1
- package/src/components/business/payment-sdk/select-payment/index.tsx +51 -1
- package/src/components/business/payment-sdk/select-payment/theme.tsx +8 -0
- package/src/components/common/upload/index.tsx +10 -9
- package/src/image/date.svg +1 -0
- package/src/image/upload.svg +1 -0
- package/src/local/en.ts +3 -1
- package/src/local/zh.ts +3 -1
package/dist/best-unit.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var be,R,Kt,Z,_t,Xt,Zt,Qt,ot,Ye,Ge,pe={},en=[],er=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Fe=Array.isArray;function Y(e,t){for(var n in t)e[n]=t[n];return e}function it(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function ie(e,t,n){var r,o,a,i={};for(a in t)a=="key"?r=t[a]:a=="ref"?o=t[a]:i[a]=t[a];if(arguments.length>2&&(i.children=arguments.length>3?be.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)i[a]===void 0&&(i[a]=e.defaultProps[a]);return fe(e,i,r,o,null)}function fe(e,t,n,r,o){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++Kt,__i:-1,__u:0};return o==null&&R.vnode!=null&&R.vnode(a),a}function ne(e){return e.children}function Le(e,t){this.props=e,this.context=t}function ae(e,t){if(t==null)return e.__?ae(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?ae(e):null}function tn(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return tn(e)}}function St(e){(!e.__d&&(e.__d=!0)&&Z.push(e)&&!ve.__r++||_t!=R.debounceRendering)&&((_t=R.debounceRendering)||Xt)(ve)}function ve(){for(var e,t,n,r,o,a,i,s=1;Z.length;)Z.length>s&&Z.sort(Zt),e=Z.shift(),s=Z.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,a=[],i=[],t.__P&&((n=Y({},r)).__v=r.__v+1,R.vnode&&R.vnode(n),at(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,a,o??ae(r),!!(32&r.__u),i),n.__v=r.__v,n.__.__k[n.__i]=n,on(a,n,i),n.__e!=o&&tn(n)));ve.__r=0}function nn(e,t,n,r,o,a,i,s,f,c,p){var u,h,b,g,x,y,S=r&&r.__k||en,w=t.length;for(f=tr(n,t,S,f,w),u=0;u<w;u++)(b=n.__k[u])!=null&&(h=b.__i==-1?pe:S[b.__i]||pe,b.__i=u,y=at(e,b,h,o,a,i,s,f,c,p),g=b.__e,b.ref&&h.ref!=b.ref&&(h.ref&&st(h.ref,null,b),p.push(b.ref,b.__c||g,b)),x==null&&g!=null&&(x=g),4&b.__u||h.__k===b.__k?f=rn(b,f,e):typeof b.type=="function"&&y!==void 0?f=y:g&&(f=g.nextSibling),b.__u&=-7);return n.__e=x,f}function tr(e,t,n,r,o){var a,i,s,f,c,p=n.length,u=p,h=0;for(e.__k=new Array(o),a=0;a<o;a++)(i=t[a])!=null&&typeof i!="boolean"&&typeof i!="function"?(f=a+h,(i=e.__k[a]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?fe(null,i,null,null,null):Fe(i)?fe(ne,{children:i},null,null,null):i.constructor==null&&i.__b>0?fe(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=e,i.__b=e.__b+1,s=null,(c=i.__i=nr(i,n,f,u))!=-1&&(u--,(s=n[c])&&(s.__u|=2)),s==null||s.__v==null?(c==-1&&(o>p?h--:o<p&&h++),typeof i.type!="function"&&(i.__u|=4)):c!=f&&(c==f-1?h--:c==f+1?h++:(c>f?h--:h++,i.__u|=4))):e.__k[a]=null;if(u)for(a=0;a<p;a++)(s=n[a])!=null&&(2&s.__u)==0&&(s.__e==r&&(r=ae(s)),sn(s,s));return r}function rn(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=rn(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=ae(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function nr(e,t,n,r){var o,a,i=e.key,s=e.type,f=t[n];if(f===null&&e.key==null||f&&i==f.key&&s==f.type&&(2&f.__u)==0)return n;if(r>(f!=null&&(2&f.__u)==0?1:0))for(o=n-1,a=n+1;o>=0||a<t.length;){if(o>=0){if((f=t[o])&&(2&f.__u)==0&&i==f.key&&s==f.type)return o;o--}if(a<t.length){if((f=t[a])&&(2&f.__u)==0&&i==f.key&&s==f.type)return a;a++}}return-1}function Lt(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||er.test(t)?n:n+"px"}function _e(e,t,n,r,o){var a,i;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Lt(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||Lt(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")a=t!=(t=t.replace(Qt,"$1")),i=t.toLowerCase(),t=i in e||t=="onFocusOut"||t=="onFocusIn"?i.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r?n.u=r.u:(n.u=ot,e.addEventListener(t,a?Ge:Ye,a)):e.removeEventListener(t,a?Ge:Ye,a);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function wt(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=ot++;else if(t.t<n.u)return;return n(R.event?R.event(t):t)}}}function at(e,t,n,r,o,a,i,s,f,c){var p,u,h,b,g,x,y,S,w,M,L,A,T,z,N,$,G,U=t.type;if(t.constructor!=null)return null;128&n.__u&&(f=!!(32&n.__u),a=[s=t.__e=n.__e]),(p=R.__b)&&p(t);e:if(typeof U=="function")try{if(S=t.props,w="prototype"in U&&U.prototype.render,M=(p=U.contextType)&&r[p.__c],L=p?M?M.props.value:p.__:r,n.__c?y=(u=t.__c=n.__c).__=u.__E:(w?t.__c=u=new U(S,L):(t.__c=u=new Le(S,L),u.constructor=U,u.render=or),M&&M.sub(u),u.props=S,u.state||(u.state={}),u.context=L,u.__n=r,h=u.__d=!0,u.__h=[],u._sb=[]),w&&u.__s==null&&(u.__s=u.state),w&&U.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=Y({},u.__s)),Y(u.__s,U.getDerivedStateFromProps(S,u.__s))),b=u.props,g=u.state,u.__v=t,h)w&&U.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),w&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(w&&U.getDerivedStateFromProps==null&&S!==b&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(S,L),!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(S,u.__s,L)===!1||t.__v==n.__v){for(t.__v!=n.__v&&(u.props=S,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(K){K&&(K.__=t)}),A=0;A<u._sb.length;A++)u.__h.push(u._sb[A]);u._sb=[],u.__h.length&&i.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(S,u.__s,L),w&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(b,g,x)})}if(u.context=L,u.props=S,u.__P=e,u.__e=!1,T=R.__r,z=0,w){for(u.state=u.__s,u.__d=!1,T&&T(t),p=u.render(u.props,u.state,u.context),N=0;N<u._sb.length;N++)u.__h.push(u._sb[N]);u._sb=[]}else do u.__d=!1,T&&T(t),p=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++z<25);u.state=u.__s,u.getChildContext!=null&&(r=Y(Y({},r),u.getChildContext())),w&&!h&&u.getSnapshotBeforeUpdate!=null&&(x=u.getSnapshotBeforeUpdate(b,g)),$=p,p!=null&&p.type===ne&&p.key==null&&($=an(p.props.children)),s=nn(e,Fe($)?$:[$],t,n,r,o,a,i,s,f,c),u.base=t.__e,t.__u&=-161,u.__h.length&&i.push(u),y&&(u.__E=u.__=null)}catch(K){if(t.__v=null,f||a!=null)if(K.then){for(t.__u|=f?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__e=s}else for(G=a.length;G--;)it(a[G]);else t.__e=n.__e,t.__k=n.__k;R.__e(K,t,n)}else a==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=rr(n.__e,t,n,r,o,a,i,f,c);return(p=R.diffed)&&p(t),128&t.__u?void 0:s}function on(e,t,n){for(var r=0;r<n.length;r++)st(n[r],n[++r],n[++r]);R.__c&&R.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(a){a.call(o)})}catch(a){R.__e(a,o.__v)}})}function an(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:Fe(e)?e.map(an):Y({},e)}function rr(e,t,n,r,o,a,i,s,f){var c,p,u,h,b,g,x,y=n.props,S=t.props,w=t.type;if(w=="svg"?o="http://www.w3.org/2000/svg":w=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),a!=null){for(c=0;c<a.length;c++)if((b=a[c])&&"setAttribute"in b==!!w&&(w?b.localName==w:b.nodeType==3)){e=b,a[c]=null;break}}if(e==null){if(w==null)return document.createTextNode(S);e=document.createElementNS(o,w,S.is&&S),s&&(R.__m&&R.__m(t,a),s=!1),a=null}if(w==null)y===S||s&&e.data==S||(e.data=S);else{if(a=a&&be.call(e.childNodes),y=n.props||pe,!s&&a!=null)for(y={},c=0;c<e.attributes.length;c++)y[(b=e.attributes[c]).name]=b.value;for(c in y)if(b=y[c],c!="children"){if(c=="dangerouslySetInnerHTML")u=b;else if(!(c in S)){if(c=="value"&&"defaultValue"in S||c=="checked"&&"defaultChecked"in S)continue;_e(e,c,null,b,o)}}for(c in S)b=S[c],c=="children"?h=b:c=="dangerouslySetInnerHTML"?p=b:c=="value"?g=b:c=="checked"?x=b:s&&typeof b!="function"||y[c]===b||_e(e,c,b,y[c],o);if(p)s||u&&(p.__html==u.__html||p.__html==e.innerHTML)||(e.innerHTML=p.__html),t.__k=[];else if(u&&(e.innerHTML=""),nn(t.type=="template"?e.content:e,Fe(h)?h:[h],t,n,r,w=="foreignObject"?"http://www.w3.org/1999/xhtml":o,a,i,a?a[0]:n.__k&&ae(n,0),s,f),a!=null)for(c=a.length;c--;)it(a[c]);s||(c="value",w=="progress"&&g==null?e.removeAttribute("value"):g!=null&&(g!==e[c]||w=="progress"&&!g||w=="option"&&g!=y[c])&&_e(e,c,g,y[c],o),c="checked",x!=null&&x!=e[c]&&_e(e,c,x,y[c],o))}return e}function st(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(o){R.__e(o,n)}}function sn(e,t,n){var r,o;if(R.unmount&&R.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||st(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(a){R.__e(a,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&sn(r[o],t,n||typeof e.type!="function");n||it(e.__e),e.__c=e.__=e.__e=void 0}function or(e,t,n){return this.constructor(e,n)}function Ie(e,t,n){var r,o,a,i;t==document&&(t=document.documentElement),R.__&&R.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,a=[],i=[],at(t,e=(!r&&n||t).__k=ie(ne,null,[e]),o||pe,pe,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?be.call(t.childNodes):null,a,!r&&n?n:o?o.__e:t.firstChild,r,i),on(a,e,i)}function ln(e,t){Ie(e,t,ln)}function cn(e,t,n){var r,o,a,i,s=Y({},e.props);for(a in e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)a=="key"?r=t[a]:a=="ref"?o=t[a]:s[a]=t[a]===void 0&&i!=null?i[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?be.call(arguments,2):n),fe(e.type,s,r||e.key,o||e.ref,null)}be=en.slice,R={__e:function(e,t,n,r){for(var o,a,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((a=o.constructor)&&a.getDerivedStateFromError!=null&&(o.setState(a.getDerivedStateFromError(e)),i=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(s){e=s}throw e}},Kt=0,Le.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Y({},this.state),typeof e=="function"&&(e=e(Y({},n),this.props)),e&&Y(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),St(this))},Le.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),St(this))},Le.prototype.render=ne,Z=[],Xt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Zt=function(e,t){return e.__v.__b-t.__v.__b},ve.__r=0,Qt=/(PointerCapture)$|Capture$/i,ot=0,Ye=wt(!1),Ge=wt(!0);var ir=0;function d(e,t,n,r,o,a){t||(t={});var i,s,f=t;if("ref"in f)for(s in f={},t)s=="ref"?i=t[s]:f[s]=t[s];var c={type:e,props:f,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--ir,__i:-1,__u:0,__source:o,__self:a};if(typeof e=="function"&&(i=e.defaultProps))for(s in i)f[s]===void 0&&(f[s]=i[s]);return R.vnode&&R.vnode(c),c}var he,F,je,At,Me=0,dn=[],D=R,kt=D.__b,Et=D.__r,Ct=D.diffed,vt=D.__c,Mt=D.unmount,Tt=D.__;function lt(e,t){D.__h&&D.__h(F,e,Me||t),Me=0;var n=F.__H||(F.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function B(e){return Me=1,ar(fn,e)}function ar(e,t,n){var r=lt(he++,2);if(r.t=e,!r.__c&&(r.__=[fn(void 0,t),function(s){var f=r.__N?r.__N[0]:r.__[0],c=r.t(f,s);f!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=F,!F.__f)){var o=function(s,f,c){if(!r.__c.__H)return!0;var p=r.__c.__H.__.filter(function(h){return!!h.__c});if(p.every(function(h){return!h.__N}))return!a||a.call(this,s,f,c);var u=r.__c.props!==s;return p.forEach(function(h){if(h.__N){var b=h.__[0];h.__=h.__N,h.__N=void 0,b!==h.__[0]&&(u=!0)}}),a&&a.call(this,s,f,c)||u};F.__f=!0;var a=F.shouldComponentUpdate,i=F.componentWillUpdate;F.componentWillUpdate=function(s,f,c){if(this.__e){var p=a;a=void 0,o(s,f,c),a=p}i&&i.call(this,s,f,c)},F.shouldComponentUpdate=o}return r.__N||r.__}function q(e,t){var n=lt(he++,3);!D.__s&&un(n.__H,t)&&(n.__=e,n.u=t,F.__H.__h.push(n))}function me(e){return Me=5,sr(function(){return{current:e}},[])}function sr(e,t){var n=lt(he++,7);return un(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function lr(){for(var e;e=dn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(we),e.__H.__h.forEach(Ke),e.__H.__h=[]}catch(t){e.__H.__h=[],D.__e(t,e.__v)}}D.__b=function(e){F=null,kt&&kt(e)},D.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Tt&&Tt(e,t)},D.__r=function(e){Et&&Et(e),he=0;var t=(F=e.__c).__H;t&&(je===F?(t.__h=[],F.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(we),t.__h.forEach(Ke),t.__h=[],he=0)),je=F},D.diffed=function(e){Ct&&Ct(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(dn.push(t)!==1&&At===D.requestAnimationFrame||((At=D.requestAnimationFrame)||cr)(lr)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),je=F=null},D.__c=function(e,t){t.some(function(n){try{n.__h.forEach(we),n.__h=n.__h.filter(function(r){return!r.__||Ke(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],D.__e(r,n.__v)}}),vt&&vt(e,t)},D.unmount=function(e){Mt&&Mt(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{we(r)}catch(o){t=o}}),n.__H=void 0,t&&D.__e(t,n.__v))};var Bt=typeof requestAnimationFrame=="function";function cr(e){var t,n=function(){clearTimeout(r),Bt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Bt&&(t=requestAnimationFrame(n))}function we(e){var t=F,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),F=t}function Ke(e){var t=F;e.__c=e.__(),F=t}function un(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function fn(e,t){return typeof t=="function"?t(e):t}var De=(e=>(e.ZH="zh",e.EN="en",e))(De||{}),O=(e=>(e.WHITE="white",e.DARK="dark",e))(O||{}),oe=(e=>(e.DEV="dev",e.DEVELOPMENT="development",e.TEST="test",e.PROD="prod",e.PRODUCTION="production",e))(oe||{}),l=(e=>(e.SMALL="small",e.MEDIUM="medium",e))(l||{});function pn(e,t){return function(){return e.apply(t,arguments)}}const{toString:dr}=Object.prototype,{getPrototypeOf:ct}=Object,{iterator:Oe,toStringTag:hn}=Symbol,ze=(e=>t=>{const n=dr.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),J=e=>(e=e.toLowerCase(),t=>ze(t)===e),Pe=e=>t=>typeof t===e,{isArray:se}=Array,ge=Pe("undefined");function ur(e){return e!==null&&!ge(e)&&e.constructor!==null&&!ge(e.constructor)&&H(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const mn=J("ArrayBuffer");function fr(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&mn(e.buffer),t}const pr=Pe("string"),H=Pe("function"),gn=Pe("number"),Ne=e=>e!==null&&typeof e=="object",hr=e=>e===!0||e===!1,Ae=e=>{if(ze(e)!=="object")return!1;const t=ct(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(hn in e)&&!(Oe in e)},mr=J("Date"),gr=J("File"),br=J("Blob"),yr=J("FileList"),xr=e=>Ne(e)&&H(e.pipe),_r=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||H(e.append)&&((t=ze(e))==="formdata"||t==="object"&&H(e.toString)&&e.toString()==="[object FormData]"))},Sr=J("URLSearchParams"),[Lr,wr,Ar,kr]=["ReadableStream","Request","Response","Headers"].map(J),Er=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ye(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),se(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),i=a.length;let s;for(r=0;r<i;r++)s=a[r],t.call(null,e[s],s,e)}}function bn(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Q=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,yn=e=>!ge(e)&&e!==Q;function Xe(){const{caseless:e}=yn(this)&&this||{},t={},n=(r,o)=>{const a=e&&bn(t,o)||o;Ae(t[a])&&Ae(r)?t[a]=Xe(t[a],r):Ae(r)?t[a]=Xe({},r):se(r)?t[a]=r.slice():t[a]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&ye(arguments[r],n);return t}const Cr=(e,t,n,{allOwnKeys:r}={})=>(ye(t,(o,a)=>{n&&H(o)?e[a]=pn(o,n):e[a]=o},{allOwnKeys:r}),e),vr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Mr=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Tr=(e,t,n,r)=>{let o,a,i;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)i=o[a],(!r||r(i,e,t))&&!s[i]&&(t[i]=e[i],s[i]=!0);e=n!==!1&&ct(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Br=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Rr=e=>{if(!e)return null;if(se(e))return e;let t=e.length;if(!gn(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Fr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ct(Uint8Array)),Ir=(e,t)=>{const r=(e&&e[Oe]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},Dr=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Or=J("HTMLFormElement"),zr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Rt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Pr=J("RegExp"),xn=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ye(n,(o,a)=>{let i;(i=t(o,a,e))!==!1&&(r[a]=i||o)}),Object.defineProperties(e,r)},Nr=e=>{xn(e,(t,n)=>{if(H(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(H(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Ur=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return se(e)?r(e):r(String(e).split(t)),n},$r=()=>{},Wr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Hr(e){return!!(e&&H(e.append)&&e[hn]==="FormData"&&e[Oe])}const jr=e=>{const t=new Array(10),n=(r,o)=>{if(Ne(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const a=se(r)?[]:{};return ye(r,(i,s)=>{const f=n(i,o+1);!ge(f)&&(a[s]=f)}),t[o]=void 0,a}}return r};return n(e,0)},qr=J("AsyncFunction"),Jr=e=>e&&(Ne(e)||H(e))&&H(e.then)&&H(e.catch),_n=((e,t)=>e?setImmediate:t?((n,r)=>(Q.addEventListener("message",({source:o,data:a})=>{o===Q&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Q.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",H(Q.postMessage)),Vr=typeof queueMicrotask<"u"?queueMicrotask.bind(Q):typeof process<"u"&&process.nextTick||_n,Yr=e=>e!=null&&H(e[Oe]),m={isArray:se,isArrayBuffer:mn,isBuffer:ur,isFormData:_r,isArrayBufferView:fr,isString:pr,isNumber:gn,isBoolean:hr,isObject:Ne,isPlainObject:Ae,isReadableStream:Lr,isRequest:wr,isResponse:Ar,isHeaders:kr,isUndefined:ge,isDate:mr,isFile:gr,isBlob:br,isRegExp:Pr,isFunction:H,isStream:xr,isURLSearchParams:Sr,isTypedArray:Fr,isFileList:yr,forEach:ye,merge:Xe,extend:Cr,trim:Er,stripBOM:vr,inherits:Mr,toFlatObject:Tr,kindOf:ze,kindOfTest:J,endsWith:Br,toArray:Rr,forEachEntry:Ir,matchAll:Dr,isHTMLForm:Or,hasOwnProperty:Rt,hasOwnProp:Rt,reduceDescriptors:xn,freezeMethods:Nr,toObjectSet:Ur,toCamelCase:zr,noop:$r,toFiniteNumber:Wr,findKey:bn,global:Q,isContextDefined:yn,isSpecCompliantForm:Hr,toJSONObject:jr,isAsyncFn:qr,isThenable:Jr,setImmediate:_n,asap:Vr,isIterable:Yr};function C(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}m.inherits(C,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:m.toJSONObject(this.config),code:this.code,status:this.status}}});const Sn=C.prototype,Ln={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Ln[e]={value:e}});Object.defineProperties(C,Ln);Object.defineProperty(Sn,"isAxiosError",{value:!0});C.from=(e,t,n,r,o,a)=>{const i=Object.create(Sn);return m.toFlatObject(e,i,function(f){return f!==Error.prototype},s=>s!=="isAxiosError"),C.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,a&&Object.assign(i,a),i};const Gr=null;function Ze(e){return m.isPlainObject(e)||m.isArray(e)}function wn(e){return m.endsWith(e,"[]")?e.slice(0,-2):e}function Ft(e,t,n){return e?e.concat(t).map(function(o,a){return o=wn(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function Kr(e){return m.isArray(e)&&!e.some(Ze)}const Xr=m.toFlatObject(m,{},null,function(t){return/^is[A-Z]/.test(t)});function Ue(e,t,n){if(!m.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=m.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,y){return!m.isUndefined(y[x])});const r=n.metaTokens,o=n.visitor||p,a=n.dots,i=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&m.isSpecCompliantForm(t);if(!m.isFunction(o))throw new TypeError("visitor must be a function");function c(g){if(g===null)return"";if(m.isDate(g))return g.toISOString();if(m.isBoolean(g))return g.toString();if(!f&&m.isBlob(g))throw new C("Blob is not supported. Use a Buffer instead.");return m.isArrayBuffer(g)||m.isTypedArray(g)?f&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function p(g,x,y){let S=g;if(g&&!y&&typeof g=="object"){if(m.endsWith(x,"{}"))x=r?x:x.slice(0,-2),g=JSON.stringify(g);else if(m.isArray(g)&&Kr(g)||(m.isFileList(g)||m.endsWith(x,"[]"))&&(S=m.toArray(g)))return x=wn(x),S.forEach(function(M,L){!(m.isUndefined(M)||M===null)&&t.append(i===!0?Ft([x],L,a):i===null?x:x+"[]",c(M))}),!1}return Ze(g)?!0:(t.append(Ft(y,x,a),c(g)),!1)}const u=[],h=Object.assign(Xr,{defaultVisitor:p,convertValue:c,isVisitable:Ze});function b(g,x){if(!m.isUndefined(g)){if(u.indexOf(g)!==-1)throw Error("Circular reference detected in "+x.join("."));u.push(g),m.forEach(g,function(S,w){(!(m.isUndefined(S)||S===null)&&o.call(t,S,m.isString(w)?w.trim():w,x,h))===!0&&b(S,x?x.concat(w):[w])}),u.pop()}}if(!m.isObject(e))throw new TypeError("data must be an object");return b(e),t}function It(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function dt(e,t){this._pairs=[],e&&Ue(e,this,t)}const An=dt.prototype;An.append=function(t,n){this._pairs.push([t,n])};An.toString=function(t){const n=t?function(r){return t.call(this,r,It)}:It;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Zr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function kn(e,t,n){if(!t)return e;const r=n&&n.encode||Zr;m.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let a;if(o?a=o(t,n):a=m.isURLSearchParams(t)?t.toString():new dt(t,n).toString(r),a){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Dt{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){m.forEach(this.handlers,function(r){r!==null&&t(r)})}}const En={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Qr=typeof URLSearchParams<"u"?URLSearchParams:dt,eo=typeof FormData<"u"?FormData:null,to=typeof Blob<"u"?Blob:null,no={isBrowser:!0,classes:{URLSearchParams:Qr,FormData:eo,Blob:to},protocols:["http","https","file","blob","url","data"]},ut=typeof window<"u"&&typeof document<"u",Qe=typeof navigator=="object"&&navigator||void 0,ro=ut&&(!Qe||["ReactNative","NativeScript","NS"].indexOf(Qe.product)<0),oo=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",io=ut&&window.location.href||"http://localhost",ao=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ut,hasStandardBrowserEnv:ro,hasStandardBrowserWebWorkerEnv:oo,navigator:Qe,origin:io},Symbol.toStringTag,{value:"Module"})),P={...ao,...no};function so(e,t){return Ue(e,new P.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,a){return P.isNode&&m.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function lo(e){return m.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function co(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function Cn(e){function t(n,r,o,a){let i=n[a++];if(i==="__proto__")return!0;const s=Number.isFinite(+i),f=a>=n.length;return i=!i&&m.isArray(o)?o.length:i,f?(m.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!s):((!o[i]||!m.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],a)&&m.isArray(o[i])&&(o[i]=co(o[i])),!s)}if(m.isFormData(e)&&m.isFunction(e.entries)){const n={};return m.forEachEntry(e,(r,o)=>{t(lo(r),o,n,0)}),n}return null}function uo(e,t,n){if(m.isString(e))try{return(t||JSON.parse)(e),m.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const xe={transitional:En,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=m.isObject(t);if(a&&m.isHTMLForm(t)&&(t=new FormData(t)),m.isFormData(t))return o?JSON.stringify(Cn(t)):t;if(m.isArrayBuffer(t)||m.isBuffer(t)||m.isStream(t)||m.isFile(t)||m.isBlob(t)||m.isReadableStream(t))return t;if(m.isArrayBufferView(t))return t.buffer;if(m.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return so(t,this.formSerializer).toString();if((s=m.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return Ue(s?{"files[]":t}:t,f&&new f,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),uo(t)):t}],transformResponse:[function(t){const n=this.transitional||xe.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(m.isResponse(t)||m.isReadableStream(t))return t;if(t&&m.isString(t)&&(r&&!this.responseType||o)){const i=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(i)throw s.name==="SyntaxError"?C.from(s,C.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:P.classes.FormData,Blob:P.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};m.forEach(["delete","get","head","post","put","patch"],e=>{xe.headers[e]={}});const fo=m.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),po=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
2
|
-
`).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||t[n]&&fo[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},
|
|
3
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[Ot]=this[Ot]={accessors:{}}).accessors,o=this.prototype;function a(i){const s=ue(i);r[s]||(bo(o,i),r[s]=!0)}return m.isArray(t)?t.forEach(a):a(t),this}};j.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);m.reduceDescriptors(j.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});m.freezeMethods(j);function Je(e,t){const n=this||xe,r=t||n,o=j.from(r.headers);let a=r.data;return m.forEach(e,function(s){a=s.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function vn(e){return!!(e&&e.__CANCEL__)}function le(e,t,n){C.call(this,e??"canceled",C.ERR_CANCELED,t,n),this.name="CanceledError"}m.inherits(le,C,{__CANCEL__:!0});function Mn(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new C("Request failed with status code "+n.status,[C.ERR_BAD_REQUEST,C.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function yo(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function xo(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,i;return t=t!==void 0?t:1e3,function(f){const c=Date.now(),p=r[a];i||(i=c),n[o]=f,r[o]=c;let u=a,h=0;for(;u!==o;)h+=n[u++],u=u%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),c-i<t)return;const b=p&&c-p;return b?Math.round(h*1e3/b):void 0}}function _o(e,t){let n=0,r=1e3/t,o,a;const i=(c,p=Date.now())=>{n=p,o=null,a&&(clearTimeout(a),a=null),e.apply(null,c)};return[(...c)=>{const p=Date.now(),u=p-n;u>=r?i(c,p):(o=c,a||(a=setTimeout(()=>{a=null,i(o)},r-u)))},()=>o&&i(o)]}const Te=(e,t,n=3)=>{let r=0;const o=xo(50,250);return _o(a=>{const i=a.loaded,s=a.lengthComputable?a.total:void 0,f=i-r,c=o(f),p=i<=s;r=i;const u={loaded:i,total:s,progress:s?i/s:void 0,bytes:f,rate:c||void 0,estimated:c&&s&&p?(s-i)/c:void 0,event:a,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(u)},n)},zt=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Pt=e=>(...t)=>m.asap(()=>e(...t)),So=P.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,P.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(P.origin),P.navigator&&/(msie|trident)/i.test(P.navigator.userAgent)):()=>!0,Lo=P.hasStandardBrowserEnv?{write(e,t,n,r,o,a){const i=[e+"="+encodeURIComponent(t)];m.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),m.isString(r)&&i.push("path="+r),m.isString(o)&&i.push("domain="+o),a===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function wo(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ao(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Tn(e,t,n){let r=!wo(t);return e&&(r||n==!1)?Ao(e,t):t}const Nt=e=>e instanceof j?{...e}:e;function te(e,t){t=t||{};const n={};function r(c,p,u,h){return m.isPlainObject(c)&&m.isPlainObject(p)?m.merge.call({caseless:h},c,p):m.isPlainObject(p)?m.merge({},p):m.isArray(p)?p.slice():p}function o(c,p,u,h){if(m.isUndefined(p)){if(!m.isUndefined(c))return r(void 0,c,u,h)}else return r(c,p,u,h)}function a(c,p){if(!m.isUndefined(p))return r(void 0,p)}function i(c,p){if(m.isUndefined(p)){if(!m.isUndefined(c))return r(void 0,c)}else return r(void 0,p)}function s(c,p,u){if(u in t)return r(c,p);if(u in e)return r(void 0,c)}const f={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:s,headers:(c,p,u)=>o(Nt(c),Nt(p),u,!0)};return m.forEach(Object.keys(Object.assign({},e,t)),function(p){const u=f[p]||o,h=u(e[p],t[p],p);m.isUndefined(h)&&u!==s||(n[p]=h)}),n}const Bn=e=>{const t=te({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:i,auth:s}=t;t.headers=i=j.from(i),t.url=kn(Tn(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&i.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let f;if(m.isFormData(n)){if(P.hasStandardBrowserEnv||P.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((f=i.getContentType())!==!1){const[c,...p]=f?f.split(";").map(u=>u.trim()).filter(Boolean):[];i.setContentType([c||"multipart/form-data",...p].join("; "))}}if(P.hasStandardBrowserEnv&&(r&&m.isFunction(r)&&(r=r(t)),r||r!==!1&&So(t.url))){const c=o&&a&&Lo.read(a);c&&i.set(o,c)}return t},ko=typeof XMLHttpRequest<"u",Eo=ko&&function(e){return new Promise(function(n,r){const o=Bn(e);let a=o.data;const i=j.from(o.headers).normalize();let{responseType:s,onUploadProgress:f,onDownloadProgress:c}=o,p,u,h,b,g;function x(){b&&b(),g&&g(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let y=new XMLHttpRequest;y.open(o.method.toUpperCase(),o.url,!0),y.timeout=o.timeout;function S(){if(!y)return;const M=j.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),A={data:!s||s==="text"||s==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:M,config:e,request:y};Mn(function(z){n(z),x()},function(z){r(z),x()},A),y=null}"onloadend"in y?y.onloadend=S:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(S)},y.onabort=function(){y&&(r(new C("Request aborted",C.ECONNABORTED,e,y)),y=null)},y.onerror=function(){r(new C("Network Error",C.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let L=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const A=o.transitional||En;o.timeoutErrorMessage&&(L=o.timeoutErrorMessage),r(new C(L,A.clarifyTimeoutError?C.ETIMEDOUT:C.ECONNABORTED,e,y)),y=null},a===void 0&&i.setContentType(null),"setRequestHeader"in y&&m.forEach(i.toJSON(),function(L,A){y.setRequestHeader(A,L)}),m.isUndefined(o.withCredentials)||(y.withCredentials=!!o.withCredentials),s&&s!=="json"&&(y.responseType=o.responseType),c&&([h,g]=Te(c,!0),y.addEventListener("progress",h)),f&&y.upload&&([u,b]=Te(f),y.upload.addEventListener("progress",u),y.upload.addEventListener("loadend",b)),(o.cancelToken||o.signal)&&(p=M=>{y&&(r(!M||M.type?new le(null,e,y):M),y.abort(),y=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const w=yo(o.url);if(w&&P.protocols.indexOf(w)===-1){r(new C("Unsupported protocol "+w+":",C.ERR_BAD_REQUEST,e));return}y.send(a||null)})},Co=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const a=function(c){if(!o){o=!0,s();const p=c instanceof Error?c:this.reason;r.abort(p instanceof C?p:new le(p instanceof Error?p.message:p))}};let i=t&&setTimeout(()=>{i=null,a(new C(`timeout ${t} of ms exceeded`,C.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(a):c.removeEventListener("abort",a)}),e=null)};e.forEach(c=>c.addEventListener("abort",a));const{signal:f}=r;return f.unsubscribe=()=>m.asap(s),f}},vo=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},Mo=async function*(e,t){for await(const n of To(e))yield*vo(n,t)},To=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Ut=(e,t,n,r)=>{const o=Mo(e,t);let a=0,i,s=f=>{i||(i=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:c,value:p}=await o.next();if(c){s(),f.close();return}let u=p.byteLength;if(n){let h=a+=u;n(h)}f.enqueue(new Uint8Array(p))}catch(c){throw s(c),c}},cancel(f){return s(f),o.return()}},{highWaterMark:2})},$e=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Rn=$e&&typeof ReadableStream=="function",Bo=$e&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Fn=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Ro=Rn&&Fn(()=>{let e=!1;const t=new Request(P.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),$t=64*1024,et=Rn&&Fn(()=>m.isReadableStream(new Response("").body)),Be={stream:et&&(e=>e.body)};$e&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Be[t]&&(Be[t]=m.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new C(`Response type '${t}' is not supported`,C.ERR_NOT_SUPPORT,r)})})})(new Response);const Fo=async e=>{if(e==null)return 0;if(m.isBlob(e))return e.size;if(m.isSpecCompliantForm(e))return(await new Request(P.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(m.isArrayBufferView(e)||m.isArrayBuffer(e))return e.byteLength;if(m.isURLSearchParams(e)&&(e=e+""),m.isString(e))return(await Bo(e)).byteLength},Io=async(e,t)=>{const n=m.toFiniteNumber(e.getContentLength());return n??Fo(t)},Do=$e&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:a,timeout:i,onDownloadProgress:s,onUploadProgress:f,responseType:c,headers:p,withCredentials:u="same-origin",fetchOptions:h}=Bn(e);c=c?(c+"").toLowerCase():"text";let b=Co([o,a&&a.toAbortSignal()],i),g;const x=b&&b.unsubscribe&&(()=>{b.unsubscribe()});let y;try{if(f&&Ro&&n!=="get"&&n!=="head"&&(y=await Io(p,r))!==0){let A=new Request(t,{method:"POST",body:r,duplex:"half"}),T;if(m.isFormData(r)&&(T=A.headers.get("content-type"))&&p.setContentType(T),A.body){const[z,N]=zt(y,Te(Pt(f)));r=Ut(A.body,$t,z,N)}}m.isString(u)||(u=u?"include":"omit");const S="credentials"in Request.prototype;g=new Request(t,{...h,signal:b,method:n.toUpperCase(),headers:p.normalize().toJSON(),body:r,duplex:"half",credentials:S?u:void 0});let w=await fetch(g,h);const M=et&&(c==="stream"||c==="response");if(et&&(s||M&&x)){const A={};["status","statusText","headers"].forEach($=>{A[$]=w[$]});const T=m.toFiniteNumber(w.headers.get("content-length")),[z,N]=s&&zt(T,Te(Pt(s),!0))||[];w=new Response(Ut(w.body,$t,z,()=>{N&&N(),x&&x()}),A)}c=c||"text";let L=await Be[m.findKey(Be,c)||"text"](w,e);return!M&&x&&x(),await new Promise((A,T)=>{Mn(A,T,{data:L,headers:j.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:g})})}catch(S){throw x&&x(),S&&S.name==="TypeError"&&/Load failed|fetch/i.test(S.message)?Object.assign(new C("Network Error",C.ERR_NETWORK,e,g),{cause:S.cause||S}):C.from(S,S&&S.code,e,g)}}),tt={http:Gr,xhr:Eo,fetch:Do};m.forEach(tt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Wt=e=>`- ${e}`,Oo=e=>m.isFunction(e)||e===null||e===!1,In={getAdapter:e=>{e=m.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let a=0;a<t;a++){n=e[a];let i;if(r=n,!Oo(n)&&(r=tt[(i=String(n)).toLowerCase()],r===void 0))throw new C(`Unknown adapter '${i}'`);if(r)break;o[i||"#"+a]=r}if(!r){const a=Object.entries(o).map(([s,f])=>`adapter ${s} `+(f===!1?"is not supported by the environment":"is not available in the build"));let i=t?a.length>1?`since :
|
|
4
|
-
`+a.map(
|
|
5
|
-
`):" "+
|
|
6
|
-
`+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=te(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&Ee.assertOptions(r,{silentJSONParsing:V.transitional(V.boolean),forcedJSONParsing:V.transitional(V.boolean),clarifyTimeoutError:V.transitional(V.boolean)},!1),o!=null&&(m.isFunction(o)?n.paramsSerializer={serialize:o}:Ee.assertOptions(o,{encode:V.function,serialize:V.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ee.assertOptions(n,{baseUrl:V.spelling("baseURL"),withXsrfToken:V.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=a&&m.merge(a.common,a[n.method]);a&&m.forEach(["delete","get","head","post","put","patch","common"],g=>{delete a[g]}),n.headers=j.concat(i,a);const s=[];let f=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(n)===!1||(f=f&&x.synchronous,s.unshift(x.fulfilled,x.rejected))});const c=[];this.interceptors.response.forEach(function(x){c.push(x.fulfilled,x.rejected)});let p,u=0,h;if(!f){const g=[Ht.bind(this),void 0];for(g.unshift.apply(g,s),g.push.apply(g,c),h=g.length,p=Promise.resolve(n);u<h;)p=p.then(g[u++],g[u++]);return p}h=s.length;let b=n;for(u=0;u<h;){const g=s[u++],x=s[u++];try{b=g(b)}catch(y){x.call(this,y);break}}try{p=Ht.call(this,b)}catch(g){return Promise.reject(g)}for(u=0,h=c.length;u<h;)p=p.then(c[u++],c[u++]);return p}getUri(t){t=te(this.defaults,t);const n=Tn(t.baseURL,t.url,t.allowAbsoluteUrls);return kn(n,t.params,t.paramsSerializer)}};m.forEach(["delete","get","head","options"],function(t){ee.prototype[t]=function(n,r){return this.request(te(r||{},{method:t,url:n,data:(r||{}).data}))}});m.forEach(["post","put","patch"],function(t){function n(r){return function(a,i,s){return this.request(te(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}ee.prototype[t]=n(),ee.prototype[t+"Form"]=n(!0)});let Po=class On{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const i=new Promise(s=>{r.subscribe(s),a=s}).then(o);return i.cancel=function(){r.unsubscribe(a)},i},t(function(a,i,s){r.reason||(r.reason=new le(a,i,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new On(function(o){t=o}),cancel:t}}};function No(e){return function(n){return e.apply(null,n)}}function Uo(e){return m.isObject(e)&&e.isAxiosError===!0}const nt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(nt).forEach(([e,t])=>{nt[t]=e});function zn(e){const t=new ee(e),n=pn(ee.prototype.request,t);return m.extend(n,ee.prototype,t,{allOwnKeys:!0}),m.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return zn(te(e,o))},n}const I=zn(xe);I.Axios=ee;I.CanceledError=le;I.CancelToken=Po;I.isCancel=vn;I.VERSION=Dn;I.toFormData=Ue;I.AxiosError=C;I.Cancel=I.CanceledError;I.all=function(t){return Promise.all(t)};I.spread=No;I.isAxiosError=Uo;I.mergeConfig=te;I.AxiosHeaders=j;I.formToJSON=e=>Cn(m.isHTMLForm(e)?new FormData(e):e);I.getAdapter=In.getAdapter;I.HttpStatusCode=nt;I.default=I;const{Axios:aa,AxiosError:sa,CanceledError:la,isCancel:ca,CancelToken:da,VERSION:ua,all:fa,Cancel:pa,isAxiosError:ha,spread:ma,toFormData:ga,AxiosHeaders:ba,HttpStatusCode:ya,formToJSON:xa,getAdapter:_a,mergeConfig:Sa}=I;function $o(e={}){const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");console.log("fundUnitParams",t);const{env:n}=t;let r;switch(n){case oe.DEV:case oe.DEVELOPMENT:r="/api";break;case oe.TEST:r="https://fund.bestfulfill.tech/api/sdk";break;case oe.PROD:case oe.PRODUCTION:default:r="https://fund.bestfulfill.com/api/sdk";break}const{baseURL:o=r,timeout:a=1e4,onError:i}=e,s=I.create({baseURL:o,timeout:a});return s.interceptors.request.use(f=>{const{token:c,locale:p}=t;return f.headers={...f.headers,Authorization:c,"x-locale":p===De.ZH?"zh-CN":"en-US"},f}),s.interceptors.response.use(f=>{if(f.data&&f.data.code===0)return f.data;const c=f.data?.msg||f.data?.message||"未知错误";return Re.error(c),i&&i(c,f),Promise.reject(f.data||{message:"未知错误"})},f=>{const c=f.response?.data?.msg||f.response?.data?.message||f.message||"网络请求失败";return Re.error(c),i&&i(c,f),Promise.reject(f)}),s}let Ce=null;function X(){return Ce||(Ce=$o()),Ce}function Wo(){Ce=null}function Pn(){const e=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return X().get("/balance",{params:{merchant_id:e.merchantId,biz_type:e.bizType,fund_balance_id:e.fundBalanceId}}).then(t=>{const n=t.data,r={fundBalanceId:n.fund_balance_id,merchantId:n.merchant_id,bizType:n.biz_type,currency:n.currency,totalAmount:n.total_amount,frozenAmount:n.frozen_amount,creditLimit:n.credit_config?.credit_limit,creditUsed:n.credit_used,isCredit:!!n.credit_config,availableAmount:n.available_amount,currBalance:n.curr_balance,pendingAmount:n.pending_amount,status:n.status,createdAt:n.created_at};return sessionStorage.setItem("balanceData",JSON.stringify(r)),r})}const Ho=async()=>X().get("/all-dicts",{}).then(e=>(sessionStorage.setItem("all_dicts",JSON.stringify(e.data)),e.data||{})),jo=async(e,t)=>X().post("/oss/upload",e,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:n=>{if(n.total){const r=Math.round(n.loaded*100/n.total);t&&t(r)}}}).then(n=>n.data?.url||""),Nn=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),n={merchant_id:Number(t.merchantId),biz_type:t.bizType,fund_balance_id:t.fundBalanceId,source_operator:t.userId?String(t.userId):void 0,transfer_no:e.transferNo,transfer_date:e.transferDate,transfer_channel:e.transferChannel,payer_name:e.payerName,voucher_urls:e.voucherUrls};return X().post("/offline/recharge/create",n,{})},Un=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),n={merchant_id:Number(t.merchantId),biz_type:t.bizType,fund_balance_id:t.fundBalanceId,source_operator:t.userId?String(t.userId):void 0,amount:e.amount,currency:e.currency,recharge_channel:e.rechargeChannel,return_url:window.location.href};return X().post("/online/recharge/create",n,{}).then(r=>r.data.redirect_url)},$n=async e=>X().get("/calc-payment-amount",{params:e}).then(t=>{const n=t.data;return{paymentAmount:n.payment_amount,fee:n.fee,currency:n.currency}}),Wn=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return X().get("/channel/info",{params:{code:e.code,biz_type:t.bizType}}).then(n=>n.data?.detail||[])},qo=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return X().get("/offline/channel/map",{params:{currency:e.currency,biz_type:t.bizType}}).then(n=>({onlineChannel:n.data?.online_channels.map(r=>({value:r.value,label:r.label,icon:r.icon}))||[],offlineChannel:n.data?.offline_channels.map(r=>({value:r.value,label:r.label,icon:r.icon}))||[]}))};async function Jo(){return await Pn()}function Vo(e){const{merchant_id:t,biz_type:n,fund_balance_id:r,user_id:o,theme:a=O.WHITE,locale:i=De.ZH,env:s,size:f,themeConfig:c}=e;console.log(e,"InitParams1111");const p="Bearer "+e.token;return sessionStorage.setItem("fund_unit_params",JSON.stringify({merchantId:t,bizType:n,fundBalanceId:r,userId:o,token:p,theme:a,locale:i,env:s,size:f,themeConfig:c})),Wo(),Ho(),{token:p,merchantId:t,bizType:n,fundBalanceId:r,userId:o,theme:a,locale:i,env:s,size:f}}function k(e){const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");if(!e)return t;if(Array.isArray(e)){const n={};return e.forEach(r=>{n[r]=t[r]}),n}return t[e]}function Hn(){const e=new CustomEvent("refresh-balance",{detail:{},bubbles:!0,composed:!0});window.dispatchEvent(e)}const qt={white:{background:"#fff",border:"#d9d9d9",color:"#222",boxShadow:"0 6px 16px rgba(0, 0, 0, 0.12)",closeColor:"#999"},dark:{background:"#23262F",border:"#444C5C",color:"#F5F6FA",boxShadow:"0 6px 16px rgba(0,0,0,0.32)",closeColor:"#B5B8BE"}};function Yo(){return k("theme")===O.WHITE?qt.white:qt.dark}class Go{parseArg(t){return typeof t=="string"?{content:t}:t}show(t,n){const{content:r,duration:o,closable:a}=this.parseArg(n),i=Yo(),s=document.createElement("div");if(s.style.cssText=`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var ye,F,Zt,Z,Lt,Qt,en,tn,at,Ke,Xe,me={},nn=[],er=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,De=Array.isArray;function K(e,t){for(var n in t)e[n]=t[n];return e}function st(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function ie(e,t,n){var r,o,a,i={};for(a in t)a=="key"?r=t[a]:a=="ref"?o=t[a]:i[a]=t[a];if(arguments.length>2&&(i.children=arguments.length>3?ye.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)i[a]===void 0&&(i[a]=e.defaultProps[a]);return he(e,i,r,o,null)}function he(e,t,n,r,o){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++Zt,__i:-1,__u:0};return o==null&&F.vnode!=null&&F.vnode(a),a}function ne(e){return e.children}function Ae(e,t){this.props=e,this.context=t}function ae(e,t){if(t==null)return e.__?ae(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?ae(e):null}function rn(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 rn(e)}}function wt(e){(!e.__d&&(e.__d=!0)&&Z.push(e)&&!Me.__r++||Lt!=F.debounceRendering)&&((Lt=F.debounceRendering)||Qt)(Me)}function Me(){for(var e,t,n,r,o,a,i,s=1;Z.length;)Z.length>s&&Z.sort(en),e=Z.shift(),s=Z.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,a=[],i=[],t.__P&&((n=K({},r)).__v=r.__v+1,F.vnode&&F.vnode(n),lt(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,a,o??ae(r),!!(32&r.__u),i),n.__v=r.__v,n.__.__k[n.__i]=n,sn(a,n,i),n.__e!=o&&rn(n)));Me.__r=0}function on(e,t,n,r,o,a,i,s,f,c,p){var u,m,y,h,x,b,S=r&&r.__k||nn,L=t.length;for(f=tr(n,t,S,f,L),u=0;u<L;u++)(y=n.__k[u])!=null&&(m=y.__i==-1?me:S[y.__i]||me,y.__i=u,b=lt(e,y,m,o,a,i,s,f,c,p),h=y.__e,y.ref&&m.ref!=y.ref&&(m.ref&&ct(m.ref,null,y),p.push(y.ref,y.__c||h,y)),x==null&&h!=null&&(x=h),4&y.__u||m.__k===y.__k?f=an(y,f,e):typeof y.type=="function"&&b!==void 0?f=b:h&&(f=h.nextSibling),y.__u&=-7);return n.__e=x,f}function tr(e,t,n,r,o){var a,i,s,f,c,p=n.length,u=p,m=0;for(e.__k=new Array(o),a=0;a<o;a++)(i=t[a])!=null&&typeof i!="boolean"&&typeof i!="function"?(f=a+m,(i=e.__k[a]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?he(null,i,null,null,null):De(i)?he(ne,{children:i},null,null,null):i.constructor==null&&i.__b>0?he(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=e,i.__b=e.__b+1,s=null,(c=i.__i=nr(i,n,f,u))!=-1&&(u--,(s=n[c])&&(s.__u|=2)),s==null||s.__v==null?(c==-1&&(o>p?m--:o<p&&m++),typeof i.type!="function"&&(i.__u|=4)):c!=f&&(c==f-1?m--:c==f+1?m++:(c>f?m--:m++,i.__u|=4))):e.__k[a]=null;if(u)for(a=0;a<p;a++)(s=n[a])!=null&&(2&s.__u)==0&&(s.__e==r&&(r=ae(s)),cn(s,s));return r}function an(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=an(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=ae(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function nr(e,t,n,r){var o,a,i=e.key,s=e.type,f=t[n];if(f===null&&e.key==null||f&&i==f.key&&s==f.type&&(2&f.__u)==0)return n;if(r>(f!=null&&(2&f.__u)==0?1:0))for(o=n-1,a=n+1;o>=0||a<t.length;){if(o>=0){if((f=t[o])&&(2&f.__u)==0&&i==f.key&&s==f.type)return o;o--}if(a<t.length){if((f=t[a])&&(2&f.__u)==0&&i==f.key&&s==f.type)return a;a++}}return-1}function At(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||er.test(t)?n:n+"px"}function Le(e,t,n,r,o){var a,i;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||At(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||At(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")a=t!=(t=t.replace(tn,"$1")),i=t.toLowerCase(),t=i in e||t=="onFocusOut"||t=="onFocusIn"?i.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r?n.u=r.u:(n.u=at,e.addEventListener(t,a?Xe:Ke,a)):e.removeEventListener(t,a?Xe:Ke,a);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function kt(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=at++;else if(t.t<n.u)return;return n(F.event?F.event(t):t)}}}function lt(e,t,n,r,o,a,i,s,f,c){var p,u,m,y,h,x,b,S,L,M,A,T,R,P,w,I,J,$=t.type;if(t.constructor!=null)return null;128&n.__u&&(f=!!(32&n.__u),a=[s=t.__e=n.__e]),(p=F.__b)&&p(t);e:if(typeof $=="function")try{if(S=t.props,L="prototype"in $&&$.prototype.render,M=(p=$.contextType)&&r[p.__c],A=p?M?M.props.value:p.__:r,n.__c?b=(u=t.__c=n.__c).__=u.__E:(L?t.__c=u=new $(S,A):(t.__c=u=new Ae(S,A),u.constructor=$,u.render=or),M&&M.sub(u),u.props=S,u.state||(u.state={}),u.context=A,u.__n=r,m=u.__d=!0,u.__h=[],u._sb=[]),L&&u.__s==null&&(u.__s=u.state),L&&$.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=K({},u.__s)),K(u.__s,$.getDerivedStateFromProps(S,u.__s))),y=u.props,h=u.state,u.__v=t,m)L&&$.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),L&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(L&&$.getDerivedStateFromProps==null&&S!==y&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(S,A),!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(S,u.__s,A)===!1||t.__v==n.__v){for(t.__v!=n.__v&&(u.props=S,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(Y){Y&&(Y.__=t)}),T=0;T<u._sb.length;T++)u.__h.push(u._sb[T]);u._sb=[],u.__h.length&&i.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(S,u.__s,A),L&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(y,h,x)})}if(u.context=A,u.props=S,u.__P=e,u.__e=!1,R=F.__r,P=0,L){for(u.state=u.__s,u.__d=!1,R&&R(t),p=u.render(u.props,u.state,u.context),w=0;w<u._sb.length;w++)u.__h.push(u._sb[w]);u._sb=[]}else do u.__d=!1,R&&R(t),p=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++P<25);u.state=u.__s,u.getChildContext!=null&&(r=K(K({},r),u.getChildContext())),L&&!m&&u.getSnapshotBeforeUpdate!=null&&(x=u.getSnapshotBeforeUpdate(y,h)),I=p,p!=null&&p.type===ne&&p.key==null&&(I=ln(p.props.children)),s=on(e,De(I)?I:[I],t,n,r,o,a,i,s,f,c),u.base=t.__e,t.__u&=-161,u.__h.length&&i.push(u),b&&(u.__E=u.__=null)}catch(Y){if(t.__v=null,f||a!=null)if(Y.then){for(t.__u|=f?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__e=s}else for(J=a.length;J--;)st(a[J]);else t.__e=n.__e,t.__k=n.__k;F.__e(Y,t,n)}else a==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=rr(n.__e,t,n,r,o,a,i,f,c);return(p=F.diffed)&&p(t),128&t.__u?void 0:s}function sn(e,t,n){for(var r=0;r<n.length;r++)ct(n[r],n[++r],n[++r]);F.__c&&F.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(a){a.call(o)})}catch(a){F.__e(a,o.__v)}})}function ln(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:De(e)?e.map(ln):K({},e)}function rr(e,t,n,r,o,a,i,s,f){var c,p,u,m,y,h,x,b=n.props,S=t.props,L=t.type;if(L=="svg"?o="http://www.w3.org/2000/svg":L=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),a!=null){for(c=0;c<a.length;c++)if((y=a[c])&&"setAttribute"in y==!!L&&(L?y.localName==L:y.nodeType==3)){e=y,a[c]=null;break}}if(e==null){if(L==null)return document.createTextNode(S);e=document.createElementNS(o,L,S.is&&S),s&&(F.__m&&F.__m(t,a),s=!1),a=null}if(L==null)b===S||s&&e.data==S||(e.data=S);else{if(a=a&&ye.call(e.childNodes),b=n.props||me,!s&&a!=null)for(b={},c=0;c<e.attributes.length;c++)b[(y=e.attributes[c]).name]=y.value;for(c in b)if(y=b[c],c!="children"){if(c=="dangerouslySetInnerHTML")u=y;else if(!(c in S)){if(c=="value"&&"defaultValue"in S||c=="checked"&&"defaultChecked"in S)continue;Le(e,c,null,y,o)}}for(c in S)y=S[c],c=="children"?m=y:c=="dangerouslySetInnerHTML"?p=y:c=="value"?h=y:c=="checked"?x=y:s&&typeof y!="function"||b[c]===y||Le(e,c,y,b[c],o);if(p)s||u&&(p.__html==u.__html||p.__html==e.innerHTML)||(e.innerHTML=p.__html),t.__k=[];else if(u&&(e.innerHTML=""),on(t.type=="template"?e.content:e,De(m)?m:[m],t,n,r,L=="foreignObject"?"http://www.w3.org/1999/xhtml":o,a,i,a?a[0]:n.__k&&ae(n,0),s,f),a!=null)for(c=a.length;c--;)st(a[c]);s||(c="value",L=="progress"&&h==null?e.removeAttribute("value"):h!=null&&(h!==e[c]||L=="progress"&&!h||L=="option"&&h!=b[c])&&Le(e,c,h,b[c],o),c="checked",x!=null&&x!=e[c]&&Le(e,c,x,b[c],o))}return e}function ct(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){F.__e(o,n)}}function cn(e,t,n){var r,o;if(F.unmount&&F.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||ct(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(a){F.__e(a,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&cn(r[o],t,n||typeof e.type!="function");n||st(e.__e),e.__c=e.__=e.__e=void 0}function or(e,t,n){return this.constructor(e,n)}function ze(e,t,n){var r,o,a,i;t==document&&(t=document.documentElement),F.__&&F.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,a=[],i=[],lt(t,e=(!r&&n||t).__k=ie(ne,null,[e]),o||me,me,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?ye.call(t.childNodes):null,a,!r&&n?n:o?o.__e:t.firstChild,r,i),sn(a,e,i)}function dn(e,t){ze(e,t,dn)}function un(e,t,n){var r,o,a,i,s=K({},e.props);for(a in e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)a=="key"?r=t[a]:a=="ref"?o=t[a]:s[a]=t[a]===void 0&&i!=null?i[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?ye.call(arguments,2):n),he(e.type,s,r||e.key,o||e.ref,null)}ye=nn.slice,F={__e:function(e,t,n,r){for(var o,a,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((a=o.constructor)&&a.getDerivedStateFromError!=null&&(o.setState(a.getDerivedStateFromError(e)),i=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(s){e=s}throw e}},Zt=0,Ae.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=K({},this.state),typeof e=="function"&&(e=e(K({},n),this.props)),e&&K(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),wt(this))},Ae.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),wt(this))},Ae.prototype.render=ne,Z=[],Qt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,en=function(e,t){return e.__v.__b-t.__v.__b},Me.__r=0,tn=/(PointerCapture)$|Capture$/i,at=0,Ke=kt(!1),Xe=kt(!0);var ir=0;function d(e,t,n,r,o,a){t||(t={});var i,s,f=t;if("ref"in f)for(s in f={},t)s=="ref"?i=t[s]:f[s]=t[s];var c={type:e,props:f,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--ir,__i:-1,__u:0,__source:o,__self:a};if(typeof e=="function"&&(i=e.defaultProps))for(s in i)f[s]===void 0&&(f[s]=i[s]);return F.vnode&&F.vnode(c),c}var ge,D,Je,Et,Be=0,fn=[],O=F,Ct=O.__b,vt=O.__r,Tt=O.diffed,Mt=O.__c,Bt=O.unmount,Rt=O.__;function dt(e,t){O.__h&&O.__h(D,e,Be||t),Be=0;var n=D.__H||(D.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function B(e){return Be=1,ar(hn,e)}function ar(e,t,n){var r=dt(ge++,2);if(r.t=e,!r.__c&&(r.__=[hn(void 0,t),function(s){var f=r.__N?r.__N[0]:r.__[0],c=r.t(f,s);f!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=D,!D.__f)){var o=function(s,f,c){if(!r.__c.__H)return!0;var p=r.__c.__H.__.filter(function(m){return!!m.__c});if(p.every(function(m){return!m.__N}))return!a||a.call(this,s,f,c);var u=r.__c.props!==s;return p.forEach(function(m){if(m.__N){var y=m.__[0];m.__=m.__N,m.__N=void 0,y!==m.__[0]&&(u=!0)}}),a&&a.call(this,s,f,c)||u};D.__f=!0;var a=D.shouldComponentUpdate,i=D.componentWillUpdate;D.componentWillUpdate=function(s,f,c){if(this.__e){var p=a;a=void 0,o(s,f,c),a=p}i&&i.call(this,s,f,c)},D.shouldComponentUpdate=o}return r.__N||r.__}function q(e,t){var n=dt(ge++,3);!O.__s&&pn(n.__H,t)&&(n.__=e,n.u=t,D.__H.__h.push(n))}function se(e){return Be=5,sr(function(){return{current:e}},[])}function sr(e,t){var n=dt(ge++,7);return pn(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function lr(){for(var e;e=fn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ke),e.__H.__h.forEach(Ze),e.__H.__h=[]}catch(t){e.__H.__h=[],O.__e(t,e.__v)}}O.__b=function(e){D=null,Ct&&Ct(e)},O.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Rt&&Rt(e,t)},O.__r=function(e){vt&&vt(e),ge=0;var t=(D=e.__c).__H;t&&(Je===D?(t.__h=[],D.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(ke),t.__h.forEach(Ze),t.__h=[],ge=0)),Je=D},O.diffed=function(e){Tt&&Tt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(fn.push(t)!==1&&Et===O.requestAnimationFrame||((Et=O.requestAnimationFrame)||cr)(lr)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Je=D=null},O.__c=function(e,t){t.some(function(n){try{n.__h.forEach(ke),n.__h=n.__h.filter(function(r){return!r.__||Ze(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],O.__e(r,n.__v)}}),Mt&&Mt(e,t)},O.unmount=function(e){Bt&&Bt(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{ke(r)}catch(o){t=o}}),n.__H=void 0,t&&O.__e(t,n.__v))};var Ft=typeof requestAnimationFrame=="function";function cr(e){var t,n=function(){clearTimeout(r),Ft&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Ft&&(t=requestAnimationFrame(n))}function ke(e){var t=D,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),D=t}function Ze(e){var t=D;e.__c=e.__(),D=t}function pn(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function hn(e,t){return typeof t=="function"?t(e):t}var Oe=(e=>(e.ZH="zh",e.EN="en",e))(Oe||{}),N=(e=>(e.WHITE="white",e.DARK="dark",e))(N||{}),oe=(e=>(e.DEV="dev",e.DEVELOPMENT="development",e.TEST="test",e.PROD="prod",e.PRODUCTION="production",e))(oe||{}),l=(e=>(e.SMALL="small",e.MEDIUM="medium",e))(l||{});function mn(e,t){return function(){return e.apply(t,arguments)}}const{toString:dr}=Object.prototype,{getPrototypeOf:ut}=Object,{iterator:Pe,toStringTag:gn}=Symbol,Ne=(e=>t=>{const n=dr.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),V=e=>(e=e.toLowerCase(),t=>Ne(t)===e),Ue=e=>t=>typeof t===e,{isArray:le}=Array,be=Ue("undefined");function ur(e){return e!==null&&!be(e)&&e.constructor!==null&&!be(e.constructor)&&H(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const bn=V("ArrayBuffer");function fr(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&bn(e.buffer),t}const pr=Ue("string"),H=Ue("function"),yn=Ue("number"),$e=e=>e!==null&&typeof e=="object",hr=e=>e===!0||e===!1,Ee=e=>{if(Ne(e)!=="object")return!1;const t=ut(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(gn in e)&&!(Pe in e)},mr=V("Date"),gr=V("File"),br=V("Blob"),yr=V("FileList"),xr=e=>$e(e)&&H(e.pipe),_r=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||H(e.append)&&((t=Ne(e))==="formdata"||t==="object"&&H(e.toString)&&e.toString()==="[object FormData]"))},Sr=V("URLSearchParams"),[Lr,wr,Ar,kr]=["ReadableStream","Request","Response","Headers"].map(V),Er=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function xe(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),le(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),i=a.length;let s;for(r=0;r<i;r++)s=a[r],t.call(null,e[s],s,e)}}function xn(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,_n=e=>!be(e)&&e!==Q;function Qe(){const{caseless:e}=_n(this)&&this||{},t={},n=(r,o)=>{const a=e&&xn(t,o)||o;Ee(t[a])&&Ee(r)?t[a]=Qe(t[a],r):Ee(r)?t[a]=Qe({},r):le(r)?t[a]=r.slice():t[a]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&xe(arguments[r],n);return t}const Cr=(e,t,n,{allOwnKeys:r}={})=>(xe(t,(o,a)=>{n&&H(o)?e[a]=mn(o,n):e[a]=o},{allOwnKeys:r}),e),vr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Tr=(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)},Mr=(e,t,n,r)=>{let o,a,i;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)i=o[a],(!r||r(i,e,t))&&!s[i]&&(t[i]=e[i],s[i]=!0);e=n!==!1&&ut(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Br=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Rr=e=>{if(!e)return null;if(le(e))return e;let t=e.length;if(!yn(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Fr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ut(Uint8Array)),Ir=(e,t)=>{const r=(e&&e[Pe]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},Dr=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},zr=V("HTMLFormElement"),Or=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),Pr=V("RegExp"),Sn=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};xe(n,(o,a)=>{let i;(i=t(o,a,e))!==!1&&(r[a]=i||o)}),Object.defineProperties(e,r)},Nr=e=>{Sn(e,(t,n)=>{if(H(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(H(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Ur=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return le(e)?r(e):r(String(e).split(t)),n},$r=()=>{},Wr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Hr(e){return!!(e&&H(e.append)&&e[gn]==="FormData"&&e[Pe])}const jr=e=>{const t=new Array(10),n=(r,o)=>{if($e(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const a=le(r)?[]:{};return xe(r,(i,s)=>{const f=n(i,o+1);!be(f)&&(a[s]=f)}),t[o]=void 0,a}}return r};return n(e,0)},qr=V("AsyncFunction"),Jr=e=>e&&($e(e)||H(e))&&H(e.then)&&H(e.catch),Ln=((e,t)=>e?setImmediate:t?((n,r)=>(Q.addEventListener("message",({source:o,data:a})=>{o===Q&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Q.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",H(Q.postMessage)),Vr=typeof queueMicrotask<"u"?queueMicrotask.bind(Q):typeof process<"u"&&process.nextTick||Ln,Yr=e=>e!=null&&H(e[Pe]),g={isArray:le,isArrayBuffer:bn,isBuffer:ur,isFormData:_r,isArrayBufferView:fr,isString:pr,isNumber:yn,isBoolean:hr,isObject:$e,isPlainObject:Ee,isReadableStream:Lr,isRequest:wr,isResponse:Ar,isHeaders:kr,isUndefined:be,isDate:mr,isFile:gr,isBlob:br,isRegExp:Pr,isFunction:H,isStream:xr,isURLSearchParams:Sr,isTypedArray:Fr,isFileList:yr,forEach:xe,merge:Qe,extend:Cr,trim:Er,stripBOM:vr,inherits:Tr,toFlatObject:Mr,kindOf:Ne,kindOfTest:V,endsWith:Br,toArray:Rr,forEachEntry:Ir,matchAll:Dr,isHTMLForm:zr,hasOwnProperty:It,hasOwnProp:It,reduceDescriptors:Sn,freezeMethods:Nr,toObjectSet:Ur,toCamelCase:Or,noop:$r,toFiniteNumber:Wr,findKey:xn,global:Q,isContextDefined:_n,isSpecCompliantForm:Hr,toJSONObject:jr,isAsyncFn:qr,isThenable:Jr,setImmediate:Ln,asap:Vr,isIterable:Yr};function C(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}g.inherits(C,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:g.toJSONObject(this.config),code:this.code,status:this.status}}});const wn=C.prototype,An={};["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=>{An[e]={value:e}});Object.defineProperties(C,An);Object.defineProperty(wn,"isAxiosError",{value:!0});C.from=(e,t,n,r,o,a)=>{const i=Object.create(wn);return g.toFlatObject(e,i,function(f){return f!==Error.prototype},s=>s!=="isAxiosError"),C.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,a&&Object.assign(i,a),i};const Gr=null;function et(e){return g.isPlainObject(e)||g.isArray(e)}function kn(e){return g.endsWith(e,"[]")?e.slice(0,-2):e}function Dt(e,t,n){return e?e.concat(t).map(function(o,a){return o=kn(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function Kr(e){return g.isArray(e)&&!e.some(et)}const Xr=g.toFlatObject(g,{},null,function(t){return/^is[A-Z]/.test(t)});function We(e,t,n){if(!g.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=g.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,b){return!g.isUndefined(b[x])});const r=n.metaTokens,o=n.visitor||p,a=n.dots,i=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&g.isSpecCompliantForm(t);if(!g.isFunction(o))throw new TypeError("visitor must be a function");function c(h){if(h===null)return"";if(g.isDate(h))return h.toISOString();if(g.isBoolean(h))return h.toString();if(!f&&g.isBlob(h))throw new C("Blob is not supported. Use a Buffer instead.");return g.isArrayBuffer(h)||g.isTypedArray(h)?f&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function p(h,x,b){let S=h;if(h&&!b&&typeof h=="object"){if(g.endsWith(x,"{}"))x=r?x:x.slice(0,-2),h=JSON.stringify(h);else if(g.isArray(h)&&Kr(h)||(g.isFileList(h)||g.endsWith(x,"[]"))&&(S=g.toArray(h)))return x=kn(x),S.forEach(function(M,A){!(g.isUndefined(M)||M===null)&&t.append(i===!0?Dt([x],A,a):i===null?x:x+"[]",c(M))}),!1}return et(h)?!0:(t.append(Dt(b,x,a),c(h)),!1)}const u=[],m=Object.assign(Xr,{defaultVisitor:p,convertValue:c,isVisitable:et});function y(h,x){if(!g.isUndefined(h)){if(u.indexOf(h)!==-1)throw Error("Circular reference detected in "+x.join("."));u.push(h),g.forEach(h,function(S,L){(!(g.isUndefined(S)||S===null)&&o.call(t,S,g.isString(L)?L.trim():L,x,m))===!0&&y(S,x?x.concat(L):[L])}),u.pop()}}if(!g.isObject(e))throw new TypeError("data must be an object");return y(e),t}function zt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function ft(e,t){this._pairs=[],e&&We(e,this,t)}const En=ft.prototype;En.append=function(t,n){this._pairs.push([t,n])};En.toString=function(t){const n=t?function(r){return t.call(this,r,zt)}:zt;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Zr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Cn(e,t,n){if(!t)return e;const r=n&&n.encode||Zr;g.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let a;if(o?a=o(t,n):a=g.isURLSearchParams(t)?t.toString():new ft(t,n).toString(r),a){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Ot{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){g.forEach(this.handlers,function(r){r!==null&&t(r)})}}const vn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Qr=typeof URLSearchParams<"u"?URLSearchParams:ft,eo=typeof FormData<"u"?FormData:null,to=typeof Blob<"u"?Blob:null,no={isBrowser:!0,classes:{URLSearchParams:Qr,FormData:eo,Blob:to},protocols:["http","https","file","blob","url","data"]},pt=typeof window<"u"&&typeof document<"u",tt=typeof navigator=="object"&&navigator||void 0,ro=pt&&(!tt||["ReactNative","NativeScript","NS"].indexOf(tt.product)<0),oo=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",io=pt&&window.location.href||"http://localhost",ao=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:pt,hasStandardBrowserEnv:ro,hasStandardBrowserWebWorkerEnv:oo,navigator:tt,origin:io},Symbol.toStringTag,{value:"Module"})),U={...ao,...no};function so(e,t){return We(e,new U.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,a){return U.isNode&&g.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function lo(e){return g.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function co(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function Tn(e){function t(n,r,o,a){let i=n[a++];if(i==="__proto__")return!0;const s=Number.isFinite(+i),f=a>=n.length;return i=!i&&g.isArray(o)?o.length:i,f?(g.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!s):((!o[i]||!g.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],a)&&g.isArray(o[i])&&(o[i]=co(o[i])),!s)}if(g.isFormData(e)&&g.isFunction(e.entries)){const n={};return g.forEachEntry(e,(r,o)=>{t(lo(r),o,n,0)}),n}return null}function uo(e,t,n){if(g.isString(e))try{return(t||JSON.parse)(e),g.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const _e={transitional:vn,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=g.isObject(t);if(a&&g.isHTMLForm(t)&&(t=new FormData(t)),g.isFormData(t))return o?JSON.stringify(Tn(t)):t;if(g.isArrayBuffer(t)||g.isBuffer(t)||g.isStream(t)||g.isFile(t)||g.isBlob(t)||g.isReadableStream(t))return t;if(g.isArrayBufferView(t))return t.buffer;if(g.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return so(t,this.formSerializer).toString();if((s=g.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return We(s?{"files[]":t}:t,f&&new f,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),uo(t)):t}],transformResponse:[function(t){const n=this.transitional||_e.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(g.isResponse(t)||g.isReadableStream(t))return t;if(t&&g.isString(t)&&(r&&!this.responseType||o)){const i=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(i)throw s.name==="SyntaxError"?C.from(s,C.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:U.classes.FormData,Blob:U.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};g.forEach(["delete","get","head","post","put","patch"],e=>{_e.headers[e]={}});const fo=g.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),po=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
2
|
+
`).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||t[n]&&fo[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Pt=Symbol("internals");function pe(e){return e&&String(e).trim().toLowerCase()}function Ce(e){return e===!1||e==null?e:g.isArray(e)?e.map(Ce):String(e)}function ho(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const mo=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ve(e,t,n,r,o){if(g.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!g.isString(t)){if(g.isString(r))return t.indexOf(r)!==-1;if(g.isRegExp(r))return r.test(t)}}function go(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function bo(e,t){const n=g.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,a,i){return this[r].call(this,t,o,a,i)},configurable:!0})})}let j=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(s,f,c){const p=pe(f);if(!p)throw new Error("header name must be a non-empty string");const u=g.findKey(o,p);(!u||o[u]===void 0||c===!0||c===void 0&&o[u]!==!1)&&(o[u||f]=Ce(s))}const i=(s,f)=>g.forEach(s,(c,p)=>a(c,p,f));if(g.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(g.isString(t)&&(t=t.trim())&&!mo(t))i(po(t),n);else if(g.isObject(t)&&g.isIterable(t)){let s={},f,c;for(const p of t){if(!g.isArray(p))throw TypeError("Object iterator must return a key-value pair");s[c=p[0]]=(f=s[c])?g.isArray(f)?[...f,p[1]]:[f,p[1]]:p[1]}i(s,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=pe(t),t){const r=g.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return ho(o);if(g.isFunction(n))return n.call(this,o,r);if(g.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=pe(t),t){const r=g.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ve(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(i){if(i=pe(i),i){const s=g.findKey(r,i);s&&(!n||Ve(r,r[s],s,n))&&(delete r[s],o=!0)}}return g.isArray(t)?t.forEach(a):a(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const a=n[r];(!t||Ve(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return g.forEach(this,(o,a)=>{const i=g.findKey(r,a);if(i){n[i]=Ce(o),delete n[a];return}const s=t?go(a):String(a).trim();s!==a&&delete n[a],n[s]=Ce(o),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return g.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&g.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[Pt]=this[Pt]={accessors:{}}).accessors,o=this.prototype;function a(i){const s=pe(i);r[s]||(bo(o,i),r[s]=!0)}return g.isArray(t)?t.forEach(a):a(t),this}};j.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);g.reduceDescriptors(j.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});g.freezeMethods(j);function Ye(e,t){const n=this||_e,r=t||n,o=j.from(r.headers);let a=r.data;return g.forEach(e,function(s){a=s.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function Mn(e){return!!(e&&e.__CANCEL__)}function ce(e,t,n){C.call(this,e??"canceled",C.ERR_CANCELED,t,n),this.name="CanceledError"}g.inherits(ce,C,{__CANCEL__:!0});function Bn(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new C("Request failed with status code "+n.status,[C.ERR_BAD_REQUEST,C.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function yo(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function xo(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,i;return t=t!==void 0?t:1e3,function(f){const c=Date.now(),p=r[a];i||(i=c),n[o]=f,r[o]=c;let u=a,m=0;for(;u!==o;)m+=n[u++],u=u%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),c-i<t)return;const y=p&&c-p;return y?Math.round(m*1e3/y):void 0}}function _o(e,t){let n=0,r=1e3/t,o,a;const i=(c,p=Date.now())=>{n=p,o=null,a&&(clearTimeout(a),a=null),e.apply(null,c)};return[(...c)=>{const p=Date.now(),u=p-n;u>=r?i(c,p):(o=c,a||(a=setTimeout(()=>{a=null,i(o)},r-u)))},()=>o&&i(o)]}const Re=(e,t,n=3)=>{let r=0;const o=xo(50,250);return _o(a=>{const i=a.loaded,s=a.lengthComputable?a.total:void 0,f=i-r,c=o(f),p=i<=s;r=i;const u={loaded:i,total:s,progress:s?i/s:void 0,bytes:f,rate:c||void 0,estimated:c&&s&&p?(s-i)/c:void 0,event:a,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(u)},n)},Nt=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ut=e=>(...t)=>g.asap(()=>e(...t)),So=U.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,U.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(U.origin),U.navigator&&/(msie|trident)/i.test(U.navigator.userAgent)):()=>!0,Lo=U.hasStandardBrowserEnv?{write(e,t,n,r,o,a){const i=[e+"="+encodeURIComponent(t)];g.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),g.isString(r)&&i.push("path="+r),g.isString(o)&&i.push("domain="+o),a===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function wo(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ao(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Rn(e,t,n){let r=!wo(t);return e&&(r||n==!1)?Ao(e,t):t}const $t=e=>e instanceof j?{...e}:e;function te(e,t){t=t||{};const n={};function r(c,p,u,m){return g.isPlainObject(c)&&g.isPlainObject(p)?g.merge.call({caseless:m},c,p):g.isPlainObject(p)?g.merge({},p):g.isArray(p)?p.slice():p}function o(c,p,u,m){if(g.isUndefined(p)){if(!g.isUndefined(c))return r(void 0,c,u,m)}else return r(c,p,u,m)}function a(c,p){if(!g.isUndefined(p))return r(void 0,p)}function i(c,p){if(g.isUndefined(p)){if(!g.isUndefined(c))return r(void 0,c)}else return r(void 0,p)}function s(c,p,u){if(u in t)return r(c,p);if(u in e)return r(void 0,c)}const f={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:s,headers:(c,p,u)=>o($t(c),$t(p),u,!0)};return g.forEach(Object.keys(Object.assign({},e,t)),function(p){const u=f[p]||o,m=u(e[p],t[p],p);g.isUndefined(m)&&u!==s||(n[p]=m)}),n}const Fn=e=>{const t=te({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:i,auth:s}=t;t.headers=i=j.from(i),t.url=Cn(Rn(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&i.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let f;if(g.isFormData(n)){if(U.hasStandardBrowserEnv||U.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((f=i.getContentType())!==!1){const[c,...p]=f?f.split(";").map(u=>u.trim()).filter(Boolean):[];i.setContentType([c||"multipart/form-data",...p].join("; "))}}if(U.hasStandardBrowserEnv&&(r&&g.isFunction(r)&&(r=r(t)),r||r!==!1&&So(t.url))){const c=o&&a&&Lo.read(a);c&&i.set(o,c)}return t},ko=typeof XMLHttpRequest<"u",Eo=ko&&function(e){return new Promise(function(n,r){const o=Fn(e);let a=o.data;const i=j.from(o.headers).normalize();let{responseType:s,onUploadProgress:f,onDownloadProgress:c}=o,p,u,m,y,h;function x(){y&&y(),h&&h(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let b=new XMLHttpRequest;b.open(o.method.toUpperCase(),o.url,!0),b.timeout=o.timeout;function S(){if(!b)return;const M=j.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),T={data:!s||s==="text"||s==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:M,config:e,request:b};Bn(function(P){n(P),x()},function(P){r(P),x()},T),b=null}"onloadend"in b?b.onloadend=S:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(S)},b.onabort=function(){b&&(r(new C("Request aborted",C.ECONNABORTED,e,b)),b=null)},b.onerror=function(){r(new C("Network Error",C.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let A=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const T=o.transitional||vn;o.timeoutErrorMessage&&(A=o.timeoutErrorMessage),r(new C(A,T.clarifyTimeoutError?C.ETIMEDOUT:C.ECONNABORTED,e,b)),b=null},a===void 0&&i.setContentType(null),"setRequestHeader"in b&&g.forEach(i.toJSON(),function(A,T){b.setRequestHeader(T,A)}),g.isUndefined(o.withCredentials)||(b.withCredentials=!!o.withCredentials),s&&s!=="json"&&(b.responseType=o.responseType),c&&([m,h]=Re(c,!0),b.addEventListener("progress",m)),f&&b.upload&&([u,y]=Re(f),b.upload.addEventListener("progress",u),b.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(p=M=>{b&&(r(!M||M.type?new ce(null,e,b):M),b.abort(),b=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const L=yo(o.url);if(L&&U.protocols.indexOf(L)===-1){r(new C("Unsupported protocol "+L+":",C.ERR_BAD_REQUEST,e));return}b.send(a||null)})},Co=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const a=function(c){if(!o){o=!0,s();const p=c instanceof Error?c:this.reason;r.abort(p instanceof C?p:new ce(p instanceof Error?p.message:p))}};let i=t&&setTimeout(()=>{i=null,a(new C(`timeout ${t} of ms exceeded`,C.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(a):c.removeEventListener("abort",a)}),e=null)};e.forEach(c=>c.addEventListener("abort",a));const{signal:f}=r;return f.unsubscribe=()=>g.asap(s),f}},vo=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},To=async function*(e,t){for await(const n of Mo(e))yield*vo(n,t)},Mo=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()}},Wt=(e,t,n,r)=>{const o=To(e,t);let a=0,i,s=f=>{i||(i=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:c,value:p}=await o.next();if(c){s(),f.close();return}let u=p.byteLength;if(n){let m=a+=u;n(m)}f.enqueue(new Uint8Array(p))}catch(c){throw s(c),c}},cancel(f){return s(f),o.return()}},{highWaterMark:2})},He=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",In=He&&typeof ReadableStream=="function",Bo=He&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Dn=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Ro=In&&Dn(()=>{let e=!1;const t=new Request(U.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Ht=64*1024,nt=In&&Dn(()=>g.isReadableStream(new Response("").body)),Fe={stream:nt&&(e=>e.body)};He&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Fe[t]&&(Fe[t]=g.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new C(`Response type '${t}' is not supported`,C.ERR_NOT_SUPPORT,r)})})})(new Response);const Fo=async e=>{if(e==null)return 0;if(g.isBlob(e))return e.size;if(g.isSpecCompliantForm(e))return(await new Request(U.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(g.isArrayBufferView(e)||g.isArrayBuffer(e))return e.byteLength;if(g.isURLSearchParams(e)&&(e=e+""),g.isString(e))return(await Bo(e)).byteLength},Io=async(e,t)=>{const n=g.toFiniteNumber(e.getContentLength());return n??Fo(t)},Do=He&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:a,timeout:i,onDownloadProgress:s,onUploadProgress:f,responseType:c,headers:p,withCredentials:u="same-origin",fetchOptions:m}=Fn(e);c=c?(c+"").toLowerCase():"text";let y=Co([o,a&&a.toAbortSignal()],i),h;const x=y&&y.unsubscribe&&(()=>{y.unsubscribe()});let b;try{if(f&&Ro&&n!=="get"&&n!=="head"&&(b=await Io(p,r))!==0){let T=new Request(t,{method:"POST",body:r,duplex:"half"}),R;if(g.isFormData(r)&&(R=T.headers.get("content-type"))&&p.setContentType(R),T.body){const[P,w]=Nt(b,Re(Ut(f)));r=Wt(T.body,Ht,P,w)}}g.isString(u)||(u=u?"include":"omit");const S="credentials"in Request.prototype;h=new Request(t,{...m,signal:y,method:n.toUpperCase(),headers:p.normalize().toJSON(),body:r,duplex:"half",credentials:S?u:void 0});let L=await fetch(h,m);const M=nt&&(c==="stream"||c==="response");if(nt&&(s||M&&x)){const T={};["status","statusText","headers"].forEach(I=>{T[I]=L[I]});const R=g.toFiniteNumber(L.headers.get("content-length")),[P,w]=s&&Nt(R,Re(Ut(s),!0))||[];L=new Response(Wt(L.body,Ht,P,()=>{w&&w(),x&&x()}),T)}c=c||"text";let A=await Fe[g.findKey(Fe,c)||"text"](L,e);return!M&&x&&x(),await new Promise((T,R)=>{Bn(T,R,{data:A,headers:j.from(L.headers),status:L.status,statusText:L.statusText,config:e,request:h})})}catch(S){throw x&&x(),S&&S.name==="TypeError"&&/Load failed|fetch/i.test(S.message)?Object.assign(new C("Network Error",C.ERR_NETWORK,e,h),{cause:S.cause||S}):C.from(S,S&&S.code,e,h)}}),rt={http:Gr,xhr:Eo,fetch:Do};g.forEach(rt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const jt=e=>`- ${e}`,zo=e=>g.isFunction(e)||e===null||e===!1,zn={getAdapter:e=>{e=g.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let a=0;a<t;a++){n=e[a];let i;if(r=n,!zo(n)&&(r=rt[(i=String(n)).toLowerCase()],r===void 0))throw new C(`Unknown adapter '${i}'`);if(r)break;o[i||"#"+a]=r}if(!r){const a=Object.entries(o).map(([s,f])=>`adapter ${s} `+(f===!1?"is not supported by the environment":"is not available in the build"));let i=t?a.length>1?`since :
|
|
4
|
+
`+a.map(jt).join(`
|
|
5
|
+
`):" "+jt(a[0]):"as no adapter specified";throw new C("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:rt};function Ge(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ce(null,e)}function qt(e){return Ge(e),e.headers=j.from(e.headers),e.data=Ye.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),zn.getAdapter(e.adapter||_e.adapter)(e).then(function(r){return Ge(e),r.data=Ye.call(e,e.transformResponse,r),r.headers=j.from(r.headers),r},function(r){return Mn(r)||(Ge(e),r&&r.response&&(r.response.data=Ye.call(e,e.transformResponse,r.response),r.response.headers=j.from(r.response.headers))),Promise.reject(r)})}const On="1.10.0",je={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{je[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Jt={};je.transitional=function(t,n,r){function o(a,i){return"[Axios v"+On+"] Transitional option '"+a+"'"+i+(r?". "+r:"")}return(a,i,s)=>{if(t===!1)throw new C(o(i," has been removed"+(n?" in "+n:"")),C.ERR_DEPRECATED);return n&&!Jt[i]&&(Jt[i]=!0,console.warn(o(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,i,s):!0}};je.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Oo(e,t,n){if(typeof e!="object")throw new C("options must be an object",C.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],i=t[a];if(i){const s=e[a],f=s===void 0||i(s,a,e);if(f!==!0)throw new C("option "+a+" must be "+f,C.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new C("Unknown option "+a,C.ERR_BAD_OPTION)}}const ve={assertOptions:Oo,validators:je},G=ve.validators;let ee=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Ot,response:new Ot}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const a=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
6
|
+
`+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=te(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&ve.assertOptions(r,{silentJSONParsing:G.transitional(G.boolean),forcedJSONParsing:G.transitional(G.boolean),clarifyTimeoutError:G.transitional(G.boolean)},!1),o!=null&&(g.isFunction(o)?n.paramsSerializer={serialize:o}:ve.assertOptions(o,{encode:G.function,serialize:G.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ve.assertOptions(n,{baseUrl:G.spelling("baseURL"),withXsrfToken:G.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=a&&g.merge(a.common,a[n.method]);a&&g.forEach(["delete","get","head","post","put","patch","common"],h=>{delete a[h]}),n.headers=j.concat(i,a);const s=[];let f=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(n)===!1||(f=f&&x.synchronous,s.unshift(x.fulfilled,x.rejected))});const c=[];this.interceptors.response.forEach(function(x){c.push(x.fulfilled,x.rejected)});let p,u=0,m;if(!f){const h=[qt.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,c),m=h.length,p=Promise.resolve(n);u<m;)p=p.then(h[u++],h[u++]);return p}m=s.length;let y=n;for(u=0;u<m;){const h=s[u++],x=s[u++];try{y=h(y)}catch(b){x.call(this,b);break}}try{p=qt.call(this,y)}catch(h){return Promise.reject(h)}for(u=0,m=c.length;u<m;)p=p.then(c[u++],c[u++]);return p}getUri(t){t=te(this.defaults,t);const n=Rn(t.baseURL,t.url,t.allowAbsoluteUrls);return Cn(n,t.params,t.paramsSerializer)}};g.forEach(["delete","get","head","options"],function(t){ee.prototype[t]=function(n,r){return this.request(te(r||{},{method:t,url:n,data:(r||{}).data}))}});g.forEach(["post","put","patch"],function(t){function n(r){return function(a,i,s){return this.request(te(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}ee.prototype[t]=n(),ee.prototype[t+"Form"]=n(!0)});let Po=class Pn{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const i=new Promise(s=>{r.subscribe(s),a=s}).then(o);return i.cancel=function(){r.unsubscribe(a)},i},t(function(a,i,s){r.reason||(r.reason=new ce(a,i,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Pn(function(o){t=o}),cancel:t}}};function No(e){return function(n){return e.apply(null,n)}}function Uo(e){return g.isObject(e)&&e.isAxiosError===!0}const ot={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(ot).forEach(([e,t])=>{ot[t]=e});function Nn(e){const t=new ee(e),n=mn(ee.prototype.request,t);return g.extend(n,ee.prototype,t,{allOwnKeys:!0}),g.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Nn(te(e,o))},n}const z=Nn(_e);z.Axios=ee;z.CanceledError=ce;z.CancelToken=Po;z.isCancel=Mn;z.VERSION=On;z.toFormData=We;z.AxiosError=C;z.Cancel=z.CanceledError;z.all=function(t){return Promise.all(t)};z.spread=No;z.isAxiosError=Uo;z.mergeConfig=te;z.AxiosHeaders=j;z.formToJSON=e=>Tn(g.isHTMLForm(e)?new FormData(e):e);z.getAdapter=zn.getAdapter;z.HttpStatusCode=ot;z.default=z;const{Axios:la,AxiosError:ca,CanceledError:da,isCancel:ua,CancelToken:fa,VERSION:pa,all:ha,Cancel:ma,isAxiosError:ga,spread:ba,toFormData:ya,AxiosHeaders:xa,HttpStatusCode:_a,formToJSON:Sa,getAdapter:La,mergeConfig:wa}=z;function $o(e={}){const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");console.log("fundUnitParams",t);const{env:n}=t;let r;switch(n){case oe.DEV:case oe.DEVELOPMENT:r="/api";break;case oe.TEST:r="https://fund.bestfulfill.tech/api/sdk";break;case oe.PROD:case oe.PRODUCTION:default:r="https://fund.bestfulfill.com/api/sdk";break}const{baseURL:o=r,timeout:a=1e4,onError:i}=e,s=z.create({baseURL:o,timeout:a});return s.interceptors.request.use(f=>{const{token:c,locale:p}=t;return f.headers={...f.headers,Authorization:c,"x-locale":p===Oe.ZH?"zh-CN":"en-US"},f}),s.interceptors.response.use(f=>{if(f.data&&f.data.code===0)return f.data;const c=f.data?.msg||f.data?.message||"未知错误";return Ie.error(c),i&&i(c,f),Promise.reject(f.data||{message:"未知错误"})},f=>{const c=f.response?.data?.msg||f.response?.data?.message||f.message||"网络请求失败";return Ie.error(c),i&&i(c,f),Promise.reject(f)}),s}let Te=null;function X(){return Te||(Te=$o()),Te}function Wo(){Te=null}function Un(){const e=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return X().get("/balance",{params:{merchant_id:e.merchantId,biz_type:e.bizType,fund_balance_id:e.fundBalanceId}}).then(t=>{const n=t.data,r={fundBalanceId:n.fund_balance_id,merchantId:n.merchant_id,bizType:n.biz_type,currency:n.currency,totalAmount:n.total_amount,frozenAmount:n.frozen_amount,creditLimit:n.credit_config?.credit_limit,creditUsed:n.credit_used,isCredit:!!n.credit_config,availableAmount:n.available_amount,currBalance:n.curr_balance,pendingAmount:n.pending_amount,status:n.status,createdAt:n.created_at};return sessionStorage.setItem("balanceData",JSON.stringify(r)),r})}const Ho=async()=>X().get("/all-dicts",{}).then(e=>(sessionStorage.setItem("all_dicts",JSON.stringify(e.data)),e.data||{})),jo=async(e,t)=>X().post("/oss/upload",e,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:n=>{if(n.total){const r=Math.round(n.loaded*100/n.total);t&&t(r)}}}).then(n=>n.data?.url||""),$n=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),n={merchant_id:Number(t.merchantId),biz_type:t.bizType,fund_balance_id:t.fundBalanceId,source_operator:t.userId?String(t.userId):void 0,transfer_no:e.transferNo,transfer_date:e.transferDate,transfer_channel:e.transferChannel,payer_name:e.payerName,voucher_urls:e.voucherUrls};return X().post("/offline/recharge/create",n,{})},Wn=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),n={merchant_id:Number(t.merchantId),biz_type:t.bizType,fund_balance_id:t.fundBalanceId,source_operator:t.userId?String(t.userId):void 0,amount:e.amount,currency:e.currency,recharge_channel:e.rechargeChannel,return_url:window.location.href};return X().post("/online/recharge/create",n,{}).then(r=>r.data.redirect_url)},Hn=async e=>X().get("/calc-payment-amount",{params:e}).then(t=>{const n=t.data;return{paymentAmount:n.payment_amount,fee:n.fee,currency:n.currency}}),jn=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return X().get("/channel/info",{params:{code:e.code,biz_type:t.bizType}}).then(n=>n.data?.detail||[])},qo=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return X().get("/offline/channel/map",{params:{currency:e.currency,biz_type:t.bizType}}).then(n=>({onlineChannel:n.data?.online_channels.map(r=>({value:r.value,label:r.label,icon:r.icon}))||[],offlineChannel:n.data?.offline_channels.map(r=>({value:r.value,label:r.label,icon:r.icon}))||[]}))},Jo=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return X().post("/business_exchange_rate/calculate",{fund_balance_id:t.fundBalanceId,merchant_id:t.merchantId,biz_type:t.bizType,amount:e.amount,payment_currency:e.currency}).then(n=>({amount:n.data.amount,exchangeRate:n.data.exchange_rate,currency:n.data.currency,consistent:n.data.consistent}))};async function Vo(){return await Un()}function Yo(e){const{merchant_id:t,biz_type:n,fund_balance_id:r,user_id:o,theme:a=N.WHITE,locale:i=Oe.ZH,env:s,size:f,themeConfig:c}=e;console.log(e,"InitParams1111");const p="Bearer "+e.token;return sessionStorage.setItem("fund_unit_params",JSON.stringify({merchantId:t,bizType:n,fundBalanceId:r,userId:o,token:p,theme:a,locale:i,env:s,size:f,themeConfig:c})),Wo(),Ho(),{token:p,merchantId:t,bizType:n,fundBalanceId:r,userId:o,theme:a,locale:i,env:s,size:f}}function E(e){const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");if(!e)return t;if(Array.isArray(e)){const n={};return e.forEach(r=>{n[r]=t[r]}),n}return t[e]}function qn(){const e=new CustomEvent("refresh-balance",{detail:{},bubbles:!0,composed:!0});window.dispatchEvent(e)}const Vt={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 Go(){return E("theme")===N.WHITE?Vt.white:Vt.dark}class Ko{parseArg(t){return typeof t=="string"?{content:t}:t}show(t,n){const{content:r,duration:o,closable:a}=this.parseArg(n),i=Go(),s=document.createElement("div");if(s.style.cssText=`
|
|
7
7
|
position: fixed;
|
|
8
8
|
top: 20px;
|
|
9
9
|
left: 50%;
|
|
@@ -42,22 +42,22 @@
|
|
|
42
42
|
padding: 4px;
|
|
43
43
|
color: ${i.closeColor};
|
|
44
44
|
font-size: 12px;
|
|
45
|
-
`,c.onclick=()=>{document.body.removeChild(s)},s.appendChild(c)}document.body.appendChild(s),o!==0&&setTimeout(()=>{document.body.contains(s)&&document.body.removeChild(s)},o||3e3)}success(t){this.show("success",t)}error(t){this.show("error",t)}warning(t){this.show("warning",t)}info(t){this.show("info",t)}}const
|
|
45
|
+
`,c.onclick=()=>{document.body.removeChild(s)},s.appendChild(c)}document.body.appendChild(s),o!==0&&setTimeout(()=>{document.body.contains(s)&&document.body.removeChild(s)},o||3e3)}success(t){this.show("success",t)}error(t){this.show("error",t)}warning(t){this.show("warning",t)}info(t){this.show("info",t)}}const Ie=new Ko;function Xo(){console.log("npm package test!!!")}function Zo(){console.log("Current time:",new Date().toISOString())}const Qo={"/api":{target:"https://fund.bestfulfill.tech/api/sdk",changeOrigin:!0,rewrite:e=>e.replace(/^\/api/,""),secure:!1}};function ei(){const e=E("size");return{white:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 10px":"8px 16px",cursor:"pointer",fontSize:e===l.SMALL?12:16,fontWeight:600},dark:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 10px":"8px 16px",cursor:"pointer",fontSize:e===l.SMALL?12:16,fontWeight:600}}}function ti(e){const t=E("theme"),n=E("themeConfig"),r=t===N.WHITE,o=ei();let a=e;return!a&&n&&(a=(r?n.white:n.dark)?.color),r?{...o.white,background:a||o.white.background}:{...o.dark,background:a||o.dark.background}}function ht({onClick:e,color:t,children:n}){const r=ti(t);return d("button",{style:r,onClick:e,type:"button",children:n})}const ni={"额外费用说明:您的地区、币种、支付卡类型等因素可能会导致手续费的变动,最终手续费以官方为准。":"额外费用说明:您的地区、币种、支付卡类型等因素可能会导致手续费的变动,最终手续费以官方为准。","预计支付金额约为:":"预计支付金额约为:","注:地区/币种/卡类型可能影响手续费,最终以平台为准。":"注:地区/币种/卡类型可能影响手续费,最终以平台为准。",确定:"确定",提交成功:"提交成功",余额详情:"余额详情",真实金额:"真实金额",冻结金额:"冻结金额",信用额度:"信用额度",已用额度:"已用额度",可用余额:"可用余额",暂无数据:"暂无数据","金额需在1到999999.99之间":"金额需在1到999999.99之间","充值 / 转账":"充值 / 转账",在线充值:"在线充值",线下转账:"线下转账",充值币种:"充值币种",充值金额:"充值金额",支付平台:"支付平台",请选择充值币种:"请选择充值币种",请输入充值金额:"请输入充值金额",请选择支付平台:"请选择支付平台","需要收取手续费,实际支付金额约为:":"需要收取手续费,实际支付金额约为:","提交失败,请重试":"提交失败,请重试","提交中...":"提交中...",去支付:"去支付",取消:"取消",关闭:"关闭",在线支付:"在线支付",选择支付方式:"选择支付方式",支付方式:"支付方式",付款人名称:"付款人名称",支付币种:"支付币种",支付金额:"支付金额",线上支付:"线上支付",立即支付:"立即支付","请在转账后提交银行回单,否则可能无法及时核验":"请在转账后提交银行回单,否则可能无法及时核验","支付金额须与申请金额一致,请勿多付、少付或分批提交。":"支付金额须与申请金额一致,请勿多付、少付或分批提交。","请妥善保存回单并提供准确的支付时间,否则可能无法核验。":"请妥善保存回单并提供准确的支付时间,否则可能无法核验。","工作时间提交4小时内审核,非工作时间将顺延至下一个工作日。":"工作时间提交4小时内审核,非工作时间将顺延至下一个工作日。","如有问题,请联系平台客服。":"如有问题,请联系平台客服。","预付充值将收取平台服务费,具体以官方为准。":"预付充值将收取平台服务费,具体以官方为准。",银行转账:"银行转账",银行名称:"银行名称",账户持有人:"账户持有人",账户号码:"账户号码","SWIFT/BIC代码":"SWIFT/BIC代码",银行代码:"银行代码",银行地址:"银行地址",复制:"复制",复制成功:"复制成功",确认转账详情:"确认转账详情",转账后提交银行回单提示:"请在转账后提交银行回单,否则可能无法及时核验",温馨提示:"温馨提示",支付金额匹配提醒:"支付金额须与申请金额一致,请勿多付、少付或分批提交。银行回单显示的实际金额为准。请勿重复提交同一笔转账申请。",保存交易回单提醒:"请打印或拍照保存交易回单并提供准确的支付时间,否则无法核验转账。",查看余额提醒:"建议提交成功后4小时查看可用余额。工作时间提交的转账当日处理,非工作时间提交的转账将在下一个工作日处理。",联系客服提醒:"如有问题,请联系客服。",P卡转账延迟提醒:"P卡转账可能会有最多10分钟的延迟,请耐心等待。",平台服务费说明:"预付充值将收取1%的平台服务费,详情请参考",费用政策:"费用政策",详情:"。",返回账户信息:"返回账户信息",请上传银行转账回单:"请上传银行转账回单",点击或拖拽文件到此区域上传:"点击或拖拽文件到此区域上传",转账时间:"转账时间",转账金额:"转账金额",请输入实际转账金额:"请输入实际转账金额",提交审核:"提交审核",请选择转账时间:"请选择转账时间",请输入转账金额:"请输入转账金额",请选择日期:"请选择日期",一月:"一月",二月:"二月",三月:"三月",四月:"四月",五月:"五月",六月:"六月",七月:"七月",八月:"八月",九月:"九月",十月:"十月",十一月:"十一月",十二月:"十二月",日:"日",一:"一",二:"二",三:"三",四:"四",五:"五",六:"六",第三方支付平台:"第三方支付平台",交易ID:"交易ID",请输入转账交易ID:"请输入转账交易ID",上传文件:"上传文件",请上传转账凭证:"请上传转账凭证","加载中...":"加载中...",错误:"错误",成功:"成功",必填:"必填","充值/转账":"充值/转账",切换为暗黑主题:"切换为暗黑主题",切换为白色主题:"切换为白色主题",点击或拖拽文件到此处上传:"点击或拖拽文件到此处上传","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传",个文件:"个文件","正在上传...":"正在上传...",已上传:"已上传",移除:"移除"};function ri(e){return ni[e]||e}const oi={"额外费用说明:您的地区、币种、支付卡类型等因素可能会导致手续费的变动,最终手续费以官方为准。":"Additional note: Your region, currency, and card type may affect the processing fee; the final fee is determined by the provider.","预计支付金额约为:":"Estimated payment amount is approximately: ","注:地区/币种/卡类型可能影响手续费,最终以平台为准。":"Note: Region/currency/card type may affect handling fees, subject to the platform.",确定:"Confirm",提交成功:"Submit Success",余额详情:"Balance Details",真实金额:"Real Balance",冻结金额:"Frozen Amount",信用额度:"Credit Limit",已用额度:"Credit Used",可用余额:"Available Balance",暂无数据:"No Data","金额需在1到999999.99之间":"Amount must be between 1 and 999999.99","充值 / 转账":"Recharge / Transfer",在线充值:"Online Recharge",线下转账:"Offline Transfer",充值币种:"Recharge Currency",充值金额:"Recharge Amount",支付平台:"Payment Platform",请选择充值币种:"Please select recharge currency",请输入充值金额:"Please enter recharge amount",请选择支付平台:"Please select payment platform","需要收取手续费,实际支付金额约为:":"requires a handling fee, the actual payment amount is approximately: ","提交失败,请重试":"Submit failed, please try again","提交中...":"Submitting...",去支付:"Go to Pay",取消:"Cancel",关闭:"Close",在线支付:"Online Payment",选择支付方式:"Select Payment Method",支付方式:"Payment Method",付款人名称:"Payer Name",支付币种:"Payment Currency",支付金额:"Payment Amount",线上支付:"Online Payment",立即支付:"Pay Now","请在转账后提交银行回单,否则可能无法及时核验":"Please submit the bank receipt after the transfer, otherwise verification may be delayed","支付金额须与申请金额一致,请勿多付、少付或分批提交。":"The payment amount must match the requested amount exactly. Do not overpay, underpay, or split.","请妥善保存回单并提供准确的支付时间,否则可能无法核验。":"Please keep the receipt and provide the exact payment time; otherwise, verification may fail.","工作时间提交4小时内审核,非工作时间将顺延至下一个工作日。":"Submissions during business hours are reviewed within 4 hours; off-hours will be processed next business day.","如有问题,请联系平台客服。":"If you have any questions, please contact customer service.","预付充值将收取平台服务费,具体以官方为准。":"Prepaid top-ups are subject to a platform service fee; please refer to the official policy.",第三方支付平台:"Third-party Payment Platform",交易ID:"Transaction ID",请输入转账交易ID:"Please enter transfer transaction ID",上传文件:"Upload Files",请上传转账凭证:"Please upload transfer voucher","加载中...":"Loading...",错误:"Error",成功:"Success",必填:"Required","充值/转账":"Recharge/Transfer",切换为暗黑主题:"Switch to Dark Theme",切换为白色主题:"Switch to Light Theme",点击或拖拽文件到此处上传:"Click or drag files here to upload","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"Supports JPG, PNG, PDF formats, single file not exceeding 20MB, maximum",个文件:"files can be uploaded","正在上传...":"Uploading...",已上传:"Uploaded",移除:"Remove",银行转账:"Transfer to Account",银行名称:"Bank Name",账户持有人:"Account Holder Name",账户号码:"Account Number","SWIFT/BIC代码":"SWIFT/BIC Code",银行代码:"Bank Code",银行地址:"Bank Address",复制:"Copy",复制成功:"Copied successfully",确认转账详情:"Confirm Transfer Details",转账后提交银行回单提示:"Please make sure to submit the bank transaction slip after the transfer, otherwise the payment may not be verified in time",温馨提示:"Friendly Reminder",支付金额匹配提醒:"The payment amount must match the transaction amount exactly. Overpayment, underpayment, or installment payments will not be approved. The actual amount shown on the bank receipt shall prevail. Do not submit duplicate applications for the same transfer.",保存交易回单提醒:"Please print or take a photo of the transaction receipt and provide the exact payment time; otherwise, the transfer cannot be verified.",查看余额提醒:"It is recommended to check your available balance 4 hours after successful submission. Transfers submitted during business hours will be processed the same day; those submitted outside business hours will be processed on the next working day.",联系客服提醒:"If you have any questions, please contact customer service.",P卡转账延迟提醒:"P-card transfers may experience a delay of up to 10 minutes. Please wait patiently.",平台服务费说明:"Prepaid top-ups are subject to a 1% platform service fee. Please refer to the",费用政策:"Fee Policy",详情:"for details.",返回账户信息:"Return to Account Information",请上传银行转账回单:"Please upload the bank transfer receipt",点击或拖拽文件到此区域上传:"Click or drag file to this area to upload",转账时间:"Transfer Time",转账金额:"Transfer Amount",请输入实际转账金额:"Please enter the actual transfer amount",提交审核:"Submit for Review",请选择转账时间:"Please select transfer time",请输入转账金额:"Please enter transfer amount",请选择日期:"Please select date",一月:"January",二月:"February",三月:"March",四月:"April",五月:"May",六月:"June",七月:"July",八月:"August",九月:"September",十月:"October",十一月:"November",十二月:"December",日:"Sun",一:"Mon",二:"Tue",三:"Wed",四:"Thu",五:"Fri",六:"Sat"};function ii(e){return oi[e]||e}function ai(){return JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").locale||Oe.ZH}function _(e){return ai()==="zh"?ri(e):ii(e)}const Yt={white:{trigger:{background:"#fff",color:"#222",border:"1px solid #d9d9d9"},triggerDisabled:{background:"#f5f5f5",color:"#bfbfbf",border:"1px solid #f0f0f0"},triggerError:{background:"#fff",color:"#222",border:"1px solid #ff4d4f"},dropdown:{background:"#fff",border:"1px solid #d9d9d9",color:"#222"},option:(e,t,n)=>({color:t?"#bfbfbf":e?"#1890ff":"#222",background:e?"#e6f7ff":n&&!t||t?"#f5f5f5":"#fff"}),placeholder:{color:"#bfbfbf"},scrollbarThumb:"#e5e5e5",scrollbarTrack:"#f5f5f5",boxShadow:"0 2px 8px rgba(0,0,0,0.08)"},dark:{trigger:{background:"#23262F",color:"#fff",border:"1px solid #374151"},triggerDisabled:{background:"#23262F",color:"#666",border:"1px solid #374151"},triggerError:{background:"#23262F",color:"#fff",border:"1px solid #ff4d4f"},dropdown:{background:"#23262F",border:"1px solid #374151",color:"#fff"},option:(e,t,n)=>({color:t?"#666":e?"#00E8C6":"#fff",background:e?"#23262F":n&&!t?"#333843":"#23262F"}),placeholder:{color:"#666"},scrollbarThumb:"#444C5C",scrollbarTrack:"#23262F",boxShadow:"0 2px 8px rgba(0,0,0,0.32)"}};function si(){const e=E("theme"),t=E("themeConfig"),n=e===N.WHITE,r=n?Yt.white:Yt.dark;if(t){const o=n?t.white:t.dark;if(o?.color)return{...r,option:(a,i,s)=>({...r.option(a,i,s),color:i?r.option(a,i,s).color:a?o.color:r.option(a,i,s).color})}}return r}const it=({value:e,onChange:t,options:n,placeholder:r,style:o,error:a,disabled:i,dropdownStyle:s,className:f,dropdownClassName:c,children:p})=>{const[u,m]=B(!1),y=se(null),[h,x]=B(null),b=si(),S=E("size");q(()=>{if(!u)return;const A=T=>{y.current&&!y.current.contains(T.target)&&m(!1)};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[u]);const L=n.find(A=>A.value===e),M=()=>a?b.triggerError:i?b.triggerDisabled:b.trigger;return d("div",{ref:y,className:f,style:{position:"relative",...o},children:[d("style",{children:`
|
|
46
46
|
.custom-select-dropdown {
|
|
47
47
|
scrollbar-width: thin;
|
|
48
|
-
scrollbar-color: ${
|
|
48
|
+
scrollbar-color: ${b.scrollbarThumb} ${b.scrollbarTrack};
|
|
49
49
|
}
|
|
50
50
|
.custom-select-dropdown::-webkit-scrollbar {
|
|
51
51
|
width: ${S===l.SMALL?6:8}px;
|
|
52
52
|
}
|
|
53
53
|
.custom-select-dropdown::-webkit-scrollbar-thumb {
|
|
54
54
|
border-radius: 4px;
|
|
55
|
-
background: ${
|
|
55
|
+
background: ${b.scrollbarThumb};
|
|
56
56
|
}
|
|
57
57
|
.custom-select-dropdown::-webkit-scrollbar-track {
|
|
58
|
-
background: ${
|
|
58
|
+
background: ${b.scrollbarTrack};
|
|
59
59
|
}
|
|
60
|
-
`}),d("div",{onClick:()=>!i&&h(L=>!L),style:{minHeight:S===l.SMALL?32:40,borderRadius:6,display:"flex",alignItems:"center",padding:S===l.SMALL?"0 10px":"0 12px",fontSize:S===l.SMALL?12:15,cursor:i?"not-allowed":"pointer",boxSizing:"border-box",transition:"border 0.2s",opacity:i?.6:1,width:"100%",...M(),...o},tabIndex:0,children:[d("span",{style:{flex:1},children:w?w.label:d("span",{style:y.placeholder,children:r||"请选择"})}),d("span",{style:{marginLeft:8,display:"flex",alignItems:"center"},children:d("svg",{width:S===l.SMALL?16:20,height:S===l.SMALL?16:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M6 8L10 12L14 8",stroke:"#bfbfbf","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})})})]}),u&&!i&&d("div",{className:`custom-select-dropdown${c?" "+c:""}`,style:{position:"absolute",left:0,right:0,top:S===l.SMALL?32:44,zIndex:10,borderRadius:6,boxShadow:y.boxShadow,maxHeight:S===l.SMALL?160:220,overflowY:"auto",...y.dropdown,...s},children:[n.length===0&&d("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:S===l.SMALL?80:120,width:"100%",userSelect:"none"},children:[d("svg",{width:S===l.SMALL?48:64,height:S===l.SMALL?32:41,viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg",children:[d("title",{children:_("暂无数据")}),d("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd",children:[d("ellipse",{fill:"#f5f5f5",cx:"32",cy:"33",rx:"32",ry:"7"}),d("g",{fillRule:"nonzero",stroke:"#d9d9d9",children:[d("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),d("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:"#fafafa"})]})]})]}),d("div",{style:{marginTop:8,color:"#bfbfbf",fontSize:S===l.SMALL?12:15},children:_("暂无数据")})]}),n.map((L,A)=>d("div",{onClick:()=>{L.disabled||(h(!1),t?.(L.value))},onMouseEnter:()=>x(A),onMouseLeave:()=>x(null),style:{padding:S===l.SMALL?"6px 10px":"10px 16px",fontSize:S===l.SMALL?12:15,cursor:L.disabled?"not-allowed":"pointer",fontWeight:e===L.value?600:400,opacity:L.disabled?.6:1,...y.option(e===L.value,!!L.disabled,g===A)},children:L.label},L.value))]}),p]})};function si(){const e=k("size");return{white:{label:{marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:e===l.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:e===l.SMALL?2:4,textAlign:"left"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:e===l.SMALL?"6px 16px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 16px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer",fontWeight:600},feeTip:{marginBottom:24,padding:e===l.SMALL?"8px 10px":"12px 16px",background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:6,fontSize:e===l.SMALL?12:14,color:"#52c41a"},feeDetailBox:{marginTop:e===l.SMALL?8:10,marginBottom:e===l.SMALL?16:20,padding:e===l.SMALL?"8px 10px":"12px 16px",background:"#fff",border:"1px solid #E5E6EB",borderRadius:6},feeDetailTitle:{fontSize:e===l.SMALL?12:14,color:"#222",fontWeight:600,marginBottom:e===l.SMALL?6:8},feeAmount:{color:"#F53F3F",marginLeft:4},feeDetailDesc:{fontSize:e===l.SMALL?12:13,color:"#6b7280",lineHeight:1.5}},dark:{label:{marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:e===l.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:e===l.SMALL?2:4,textAlign:"left"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 16px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 16px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer",fontWeight:600},feeTip:{marginBottom:e===l.SMALL?16:24,padding:e===l.SMALL?"8px 10px":"12px 16px",background:"#1a1a1a",border:"1px solid #333",borderRadius:6,fontSize:e===l.SMALL?12:14,color:"#52c41a"},feeDetailBox:{marginTop:e===l.SMALL?8:10,marginBottom:e===l.SMALL?16:20,padding:e===l.SMALL?"8px 10px":"12px 16px",background:"#23262F",border:"1px solid #374151",borderRadius:6},feeDetailTitle:{fontSize:e===l.SMALL?12:14,color:"#fff",fontWeight:600,marginBottom:e===l.SMALL?6:8},feeAmount:{color:"#FF6B6B",marginLeft:4},feeDetailDesc:{fontSize:e===l.SMALL?12:13,color:"#B5B8BE",lineHeight:1.5}}}}function li(){const e=k("theme"),t=k("themeConfig"),n=e===O.WHITE,r=si(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,buttonSubmit:{...o.buttonSubmit,background:a.color}}}return o}function ci(e){return e=e.replace(/[^\d.]/g,""),e=e.replace(/\.(?=.*\.)/g,""),e=e.replace(/^(\d+)(\.\d{0,2})?.*$/,"$1$2"),e=e.replace(/^0+(\d)/,"$1"),e.startsWith(".")&&(e="0"+e),e}function di(e){if(!e)return"";const t=parseFloat(e);return isNaN(t)?"":t.toFixed(2)}const ui=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}"),a=o?.currency||[],i=o?.channel?.filter(g=>g.payment_support)||[],[s,f]=B(""),[c,p]=B(""),[u,h]=B(!1),b=li();return q(()=>{e.currency&&e.amount&&e.rechargeChannel?$n({channel:e.rechargeChannel,amount:e.amount,currency:e.currency}).then(g=>{f(g.paymentAmount),p(g.fee),h(!0)}).catch(g=>{console.error("计算支付金额失败:",g),h(!1)}):h(!1)},[e.currency,e.amount,e.rechargeChannel]),d(ne,{children:[d("div",{style:{marginBottom:18},children:[d("div",{style:b.label,children:[d("span",{style:{color:"#F53F3F"},children:"*"})," ",_("充值币种")]}),d(rt,{value:e.currency,onChange:g=>{t(x=>({...x,currency:g}))},options:a?.map(g=>({value:g.value,label:g.label})),placeholder:_("请选择充值币种")})]}),d("div",{style:{marginBottom:18},children:[d("div",{style:b.label,children:[d("span",{style:{color:"#F53F3F"},children:"*"})," ",_("充值金额")]}),d("input",{type:"text",placeholder:_("请输入充值金额"),value:e.amount,onInput:g=>{let x=g.target.value;x=ci(x);let y="";if(x&&!x.endsWith(".")){let S=parseFloat(x);if(!isNaN(S)&&(S<1&&(S=1),S>999999.99&&(S=999999.99),x=S.toString(),/\./.test(g.target.value))){const w=g.target.value.split(".")[1];w!==void 0&&w.length>0&&(x=S.toFixed(Math.min(w.length,2)))}}t(S=>({...S,amount:x,amountError:y}))},onBlur:g=>{let x=g.target.value;x=di(x),t(y=>({...y,amount:x,amountError:""}))},style:{...b.input,...e.amountError?b.inputError:{}}}),e.amountError&&d("div",{style:b.error,children:e.amountError})]}),d("div",{style:{marginBottom:24},children:[d("div",{style:b.label,children:[d("span",{style:{color:"#F53F3F"},children:"*"})," ",_("支付平台")]}),d(rt,{value:e.rechargeChannel,onChange:g=>{t(x=>({...x,rechargeChannel:g,rechargeChannelError:g?"":x.rechargeChannelError}))},options:i?.map(g=>({value:g.value,label:g.label})),placeholder:_("请选择支付平台")}),e.rechargeChannelError&&d("div",{style:b.error,children:e.rechargeChannelError})]}),u&&s&&d("div",{style:b.feeTip,children:[i.find(g=>g.value===e.rechargeChannel)?.label||e.rechargeChannel,_("需要收取手续费,实际支付金额约为:"),"$",s]}),u&&s&&d("div",{style:b.feeDetailBox,children:[d("div",{style:b.feeDetailTitle,children:[_("手续费约为:"),d("span",{style:b.feeAmount,children:["$",c]})]}),d("div",{style:b.feeDetailDesc,children:_("额外费用说明:您的地区、币种、支付卡类型等因素可能会导致手续费的变动,最终手续费以官方为准。")})]}),e.error&&d("div",{style:{color:"#ff4d4f",marginBottom:12},children:e.error}),d("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[d("button",{type:"button",onClick:n,style:b.buttonCancel,children:_("取消")}),d("button",{type:"submit",disabled:r,style:b.buttonSubmit,children:_(r?"提交中...":"去支付")})]})]})};function fi(){const e=k("size");return{white:{container:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:e===l.SMALL?16:24,textAlign:"center",cursor:"pointer",minHeight:e===l.SMALL?80:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===l.SMALL?12:15},fileItem:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:e===l.SMALL?"8px 10px":"12px 16px",marginBottom:8,fontSize:e===l.SMALL?12:15,color:"#222",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 10px":"4px 14px",fontSize:e===l.SMALL?12:15,marginLeft:e===l.SMALL?8:16,cursor:"pointer"}},dark:{container:{border:"1.5px dashed #444C5C",borderRadius:8,background:"#181A20",padding:e===l.SMALL?16:24,textAlign:"center",cursor:"pointer",minHeight:e===l.SMALL?80:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===l.SMALL?12:15},fileItem:{display:"flex",alignItems:"center",background:"#23262F",borderRadius:8,padding:e===l.SMALL?"8px 10px":"12px 16px",marginBottom:8,fontSize:e===l.SMALL?12:15,color:"#fff",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 10px":"4px 14px",fontSize:e===l.SMALL?12:15,marginLeft:e===l.SMALL?8:16,cursor:"pointer"}}}}function pi(){const t=k("theme")===O.WHITE,n=fi();return t?n.white:n.dark}const jn=({value:e=[],onChange:t,maxCount:n=10,accept:r=".jpg,.jpeg,.png,.pdf",multiple:o=!0,disabled:a=!1})=>{const i=k("size"),s=me(null),[f,c]=B(!1),[p,u]=B(0),h=pi(),b=async x=>{const y=Array.from(x.target.files).slice(0,n);if(!y.length)return;c(!0);const S=[];for(let w=0;w<y.length;w++){u(0);const M=new FormData;M.append("file",y[w]);try{const L=await jo(M,A=>u(A));L&&S.push(L)}catch{}}c(!1),u(0),t?.([...e,...S]),s.current&&(s.current.value="")},g=x=>{const y=e.filter((S,w)=>w!==x);t?.(y)};return d("div",{children:[d("div",{style:{...h.container,cursor:a?"not-allowed":h.container.cursor,opacity:a?.6:1},onClick:()=>!a&&s.current?.click(),children:[d("div",{style:{fontSize:i===l.SMALL?32:48,marginBottom:i===l.SMALL?8:12},children:"📁"}),d("div",{style:{color:"#222",fontSize:i===l.SMALL?12:15,marginBottom:i===l.SMALL?4:8},children:_("点击或拖拽文件到此处上传")}),d("div",{style:{color:"#999",fontSize:i===l.SMALL?12:13},children:[_("支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传")," ",n," ",_("个文件")]}),d("input",{ref:s,type:"file",multiple:o,accept:r,style:{display:"none"},onChange:b,disabled:a}),f&&d("div",{style:{marginTop:i===l.SMALL?8:12,color:"#1677ff"},children:[_("正在上传...")," ",p,"%"]})]}),e&&e.length>0&&d("div",{style:{marginTop:i===l.SMALL?8:12},children:e.map((x,y)=>d("div",{style:h.fileItem,children:[d("div",{style:{display:"flex",alignItems:"center",flex:1},children:d("span",{style:{fontWeight:500,wordBreak:"break-all"},children:x.split("/").pop()})}),d("button",{type:"button",onClick:S=>{S.stopPropagation(),g(y)},style:h.removeBtn,disabled:a,children:_("移除")})]},x))})]})};function hi(){const e=k("size");return{white:{label:{marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:e===l.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:e===l.SMALL?12:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},upload:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:e===l.SMALL?12:24,textAlign:"center",cursor:"pointer",minHeight:e===l.SMALL?100:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===l.SMALL?12:15},uploadError:{border:"1px dashed #ff4d4f"},fileItem:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:e===l.SMALL?"8px 10px":"12px 16px",marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:15,color:"#222",justifyContent:"space-between"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:e===l.SMALL?"6px 18px":"8px 24px",cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"8px 24px",cursor:"pointer",fontWeight:600},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"4px 14px",fontSize:e===l.SMALL?12:15,marginLeft:e===l.SMALL?8:16,cursor:"pointer"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:e===l.SMALL?2:4,textAlign:"left"},channelInfoBox:{marginTop:e===l.SMALL?8:10,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#F7F8FA",border:"1px solid #E5E6EB"},channelInfoItem:{color:"#222",fontSize:e===l.SMALL?12:13,lineHeight:1.6,wordBreak:"break-all"}},dark:{label:{marginBottom:e===l.SMALL?4:8,fontSize:e===l.SMALL?12:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:e===l.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:e===l.SMALL?12:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},upload:{border:"1px dashed #374151",borderRadius:8,background:"#181A20",padding:e===l.SMALL?12:24,textAlign:"center",cursor:"pointer",minHeight:e===l.SMALL?100:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===l.SMALL?12:14},uploadError:{border:"1px dashed #ff4d4f"},fileItem:{display:"flex",alignItems:"center",background:"#23262F",borderRadius:8,padding:e===l.SMALL?"8px 10px":"12px 16px",marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:15,color:"#fff",justifyContent:"space-between"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"8px 24px",fontSize:e===l.SMALL?12:14,cursor:"pointer",fontWeight:600},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"4px 14px",fontSize:e===l.SMALL?12:15,marginLeft:e===l.SMALL?8:16,cursor:"pointer"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:e===l.SMALL?2:4,textAlign:"left"},channelInfoBox:{marginTop:e===l.SMALL?8:10,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#23262F",border:"1px solid #374151"},channelInfoItem:{color:"#fff",fontSize:e===l.SMALL?12:13,lineHeight:1.6,wordBreak:"break-all"}}}}function mi(){const e=k("theme"),t=k("themeConfig"),n=e===O.WHITE,r=hi(),o=n?r.white:r.dark;if(console.log(t,"themeConfig"),t){const a=n?t.white:t.dark;if(a?.color)return{...o,buttonSubmit:{...o.buttonSubmit,background:a.color}}}return o}const gi=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}");console.log(o,"allDicts");const a=o?.channel||[],i=mi(),[s,f]=B([]),c=async u=>{u.preventDefault();let h=!0;t(b=>({...b,platformError:"",transactionIdError:"",filesError:""})),e.platform||(t(b=>({...b,platformError:_("请选择支付平台")})),h=!1),e.transactionId.trim()||(t(b=>({...b,transactionIdError:_("请输入转账交易ID")})),h=!1),(!e.files||e.files.length===0)&&(t(b=>({...b,filesError:_("请上传转账凭证")})),h=!1),h&&(await Nn({transferChannel:e.platform,transferNo:e.transactionId,voucherUrls:e.files}),n(),Re.success(_("提交成功")))};function p(u){t(h=>({...h,platform:u,platformError:u?"":h.platformError})),Wn({code:u}).then(h=>{f(Array.isArray(h)?h:h?[String(h)]:[])})}return d("form",{onSubmit:c,children:[d("div",{style:{marginBottom:18},children:[d("div",{style:i.label,children:[d("span",{style:{color:"#F53F3F"},children:"*"})," ",_("第三方支付平台")]}),d(rt,{value:e.platform,onChange:u=>{p(u)},options:[...a?.map(u=>({value:u.value,label:u.label}))],placeholder:_("请选择支付平台")}),e.platformError&&d("div",{style:i.error,children:e.platformError}),s.length>0&&d("div",{style:i.channelInfoBox,children:s.map((u,h)=>d("div",{style:i.channelInfoItem,children:u},h))})]}),d("div",{style:{marginBottom:18},children:[d("div",{style:i.label,children:[d("span",{style:{color:"#F53F3F"},children:"*"})," ",_("交易ID")]}),d("input",{type:"text",placeholder:_("请输入转账交易ID"),value:e.transactionId,maxLength:200,onInput:u=>{let h=u.target.value;h.length>200&&(h=h.slice(0,200)),t(b=>({...b,transactionId:h,transactionIdError:h?"":b.transactionIdError}))},style:{...i.input,...e.transactionIdError?i.inputError:{}}}),e.transactionIdError&&d("div",{style:i.error,children:e.transactionIdError})]}),d("div",{style:{marginBottom:24},children:[d("div",{style:i.label,children:[d("span",{style:{color:"#F53F3F"},children:"*"})," ",_("上传文件")]}),d(jn,{value:e.files,onChange:u=>t(h=>({...h,files:u,filesError:""})),maxCount:10,accept:".jpg,.jpeg,.png,.pdf",multiple:!0}),e.filesError&&d("div",{style:i.error,children:e.filesError})]}),d("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[d("button",{type:"button",onClick:n,style:i.buttonCancel,children:_("取消")}),d("button",{type:"submit",disabled:r,style:i.buttonSubmit,children:_("确定")})]})]})};function bi(){const e=k("size");return{white:{mask:"rgba(0, 0, 0, 0.45)",modalBg:"#fff",modalColor:"#222",modalBoxShadow:"0 6px 16px rgba(0, 0, 0, 0.12)",closeBtn:{position:"absolute",top:"16px",right:"16px",background:"none",border:"none",fontSize:e===l.SMALL?16:24,cursor:"pointer",color:"#999",padding:"0",width:e===l.SMALL?16:24,height:e===l.SMALL?16:24,display:"flex",alignItems:"center",justifyContent:"center"},title:{fontSize:e===l.SMALL?16:18,fontWeight:"600",marginBottom:e===l.SMALL?16:24,color:"#222"},headerBorder:"#f0f0f0",scrollbarClass:"light-scrollbar",scrollbarThumbColor:"#d1d5db",scrollbarThumbHoverColor:"#9ca3af",tabBtn:(t,n)=>({flex:1,padding:e===l.SMALL?"8px 10px":"12px 16px",background:t?"#1890ff":"transparent",color:t?"#fff":"#666",border:"1px solid #d9d9d9",borderRight:n?"none":"1px solid #d9d9d9",cursor:"pointer",fontSize:e===l.SMALL?12:14,fontWeight:t?"600":"400",borderRadius:n?"6px 0 0 6px":"0 6px 6px 0"})},dark:{mask:"rgba(0, 0, 0, 0.65)",modalBg:"#23262F",modalColor:"#F5F6FA",modalBoxShadow:"0 6px 16px rgba(0,0,0,0.32)",closeBtn:{position:"absolute",top:e===l.SMALL?"12px":"16px",right:e===l.SMALL?"12px":"16px",background:"none",border:"none",fontSize:e===l.SMALL?16:24,cursor:"pointer",color:"#B5B8BE",padding:"0",width:e===l.SMALL?16:24,height:e===l.SMALL?16:24,display:"flex",alignItems:"center",justifyContent:"center"},title:{fontSize:e===l.SMALL?16:18,fontWeight:"600",marginBottom:e===l.SMALL?16:24,color:"#F5F6FA"},headerBorder:"#374151",scrollbarClass:"dark-scrollbar",scrollbarThumbColor:"#4B5563",scrollbarThumbHoverColor:"#6B7280",tabBtn:(t,n)=>({flex:1,padding:e===l.SMALL?"8px 10px":"12px 16px",background:t?"#00E8C6":"transparent",color:t?"#fff":"#B5B8BE",border:"1px solid #444C5C",borderRight:n?"none":"1px solid #444C5C",cursor:"pointer",fontSize:e===l.SMALL?12:14,fontWeight:t?"600":"400",borderRadius:n?"6px 0 0 6px":"0 6px 6px 0"})}}}function yi(){const t=k("theme")===O.WHITE,n=bi();return t?n.white:n.dark}const re=k("size");function xi(e){const t=`modal-scrollbar-${e.scrollbarClass}`;if(document.getElementById(t))return t;const n=document.createElement("style");return n.id=t,n.textContent=`
|
|
60
|
+
`}),d("div",{onClick:()=>!i&&m(A=>!A),style:{minHeight:S===l.SMALL?32:40,borderRadius:6,display:"flex",alignItems:"center",padding:S===l.SMALL?"0 10px":"0 12px",fontSize:S===l.SMALL?12:15,cursor:i?"not-allowed":"pointer",boxSizing:"border-box",transition:"border 0.2s",opacity:i?.6:1,width:"100%",...M(),...o},tabIndex:0,children:[d("span",{style:{flex:1},children:L?L.label:d("span",{style:b.placeholder,children:r||"请选择"})}),d("span",{style:{marginLeft:8,display:"flex",alignItems:"center"},children:d("svg",{width:S===l.SMALL?16:20,height:S===l.SMALL?16:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M6 8L10 12L14 8",stroke:"#bfbfbf","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})})})]}),u&&!i&&d("div",{className:`custom-select-dropdown${c?" "+c:""}`,style:{position:"absolute",left:0,right:0,top:S===l.SMALL?32:44,zIndex:10,borderRadius:6,boxShadow:b.boxShadow,maxHeight:S===l.SMALL?160:220,overflowY:"auto",...b.dropdown,...s},children:[n.length===0&&d("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:S===l.SMALL?80:120,width:"100%",userSelect:"none"},children:[d("svg",{width:S===l.SMALL?48:64,height:S===l.SMALL?32:41,viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg",children:[d("title",{children:_("暂无数据")}),d("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd",children:[d("ellipse",{fill:"#f5f5f5",cx:"32",cy:"33",rx:"32",ry:"7"}),d("g",{fillRule:"nonzero",stroke:"#d9d9d9",children:[d("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),d("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:"#fafafa"})]})]})]}),d("div",{style:{marginTop:8,color:"#bfbfbf",fontSize:S===l.SMALL?12:15},children:_("暂无数据")})]}),n.map((A,T)=>d("div",{onClick:()=>{A.disabled||(m(!1),t?.(A.value))},onMouseEnter:()=>x(T),onMouseLeave:()=>x(null),style:{padding:S===l.SMALL?"6px 10px":"10px 16px",fontSize:S===l.SMALL?12:15,cursor:A.disabled?"not-allowed":"pointer",fontWeight:e===A.value?600:400,opacity:A.disabled?.6:1,...b.option(e===A.value,!!A.disabled,h===T)},children:A.label},A.value))]}),p]})};function li(){const e=E("size");return{white:{label:{marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:e===l.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:e===l.SMALL?2:4,textAlign:"left"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:e===l.SMALL?"6px 16px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 16px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer",fontWeight:600},feeTip:{marginBottom:24,padding:e===l.SMALL?"8px 10px":"12px 16px",background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:6,fontSize:e===l.SMALL?12:14,color:"#52c41a"},feeDetailBox:{marginTop:e===l.SMALL?8:10,marginBottom:e===l.SMALL?16:20,padding:e===l.SMALL?"8px 10px":"12px 16px",background:"#fff",border:"1px solid #E5E6EB",borderRadius:6},feeDetailTitle:{fontSize:e===l.SMALL?12:14,color:"#222",fontWeight:600,marginBottom:e===l.SMALL?6:8},feeAmount:{color:"#F53F3F",marginLeft:4},feeDetailDesc:{fontSize:e===l.SMALL?12:13,color:"#6b7280",lineHeight:1.5}},dark:{label:{marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:e===l.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:e===l.SMALL?2:4,textAlign:"left"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 16px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 16px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer",fontWeight:600},feeTip:{marginBottom:e===l.SMALL?16:24,padding:e===l.SMALL?"8px 10px":"12px 16px",background:"#1a1a1a",border:"1px solid #333",borderRadius:6,fontSize:e===l.SMALL?12:14,color:"#52c41a"},feeDetailBox:{marginTop:e===l.SMALL?8:10,marginBottom:e===l.SMALL?16:20,padding:e===l.SMALL?"8px 10px":"12px 16px",background:"#23262F",border:"1px solid #374151",borderRadius:6},feeDetailTitle:{fontSize:e===l.SMALL?12:14,color:"#fff",fontWeight:600,marginBottom:e===l.SMALL?6:8},feeAmount:{color:"#FF6B6B",marginLeft:4},feeDetailDesc:{fontSize:e===l.SMALL?12:13,color:"#B5B8BE",lineHeight:1.5}}}}function ci(){const e=E("theme"),t=E("themeConfig"),n=e===N.WHITE,r=li(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,buttonSubmit:{...o.buttonSubmit,background:a.color}}}return o}function di(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 ui(e){if(!e)return"";const t=parseFloat(e);return isNaN(t)?"":t.toFixed(2)}const fi=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}"),a=o?.currency||[],i=o?.channel?.filter(h=>h.payment_support)||[],[s,f]=B(""),[c,p]=B(""),[u,m]=B(!1),y=ci();return q(()=>{e.currency&&e.amount&&e.rechargeChannel?Hn({channel:e.rechargeChannel,amount:e.amount,currency:e.currency}).then(h=>{f(h.paymentAmount),p(h.fee),m(!0)}).catch(h=>{console.error("计算支付金额失败:",h),m(!1)}):m(!1)},[e.currency,e.amount,e.rechargeChannel]),d(ne,{children:[d("div",{style:{marginBottom:18},children:[d("div",{style:y.label,children:[d("span",{style:{color:"#F53F3F"},children:"*"})," ",_("充值币种")]}),d(it,{value:e.currency,onChange:h=>{t(x=>({...x,currency:h}))},options:a?.map(h=>({value:h.value,label:h.label})),placeholder:_("请选择充值币种")})]}),d("div",{style:{marginBottom:18},children:[d("div",{style:y.label,children:[d("span",{style:{color:"#F53F3F"},children:"*"})," ",_("充值金额")]}),d("input",{type:"text",placeholder:_("请输入充值金额"),value:e.amount,onInput:h=>{let x=h.target.value;x=di(x);let b="";if(x&&!x.endsWith(".")){let S=parseFloat(x);if(!isNaN(S)&&(S<1&&(S=1),S>999999.99&&(S=999999.99),x=S.toString(),/\./.test(h.target.value))){const L=h.target.value.split(".")[1];L!==void 0&&L.length>0&&(x=S.toFixed(Math.min(L.length,2)))}}t(S=>({...S,amount:x,amountError:b}))},onBlur:h=>{let x=h.target.value;x=ui(x),t(b=>({...b,amount:x,amountError:""}))},style:{...y.input,...e.amountError?y.inputError:{}}}),e.amountError&&d("div",{style:y.error,children:e.amountError})]}),d("div",{style:{marginBottom:24},children:[d("div",{style:y.label,children:[d("span",{style:{color:"#F53F3F"},children:"*"})," ",_("支付平台")]}),d(it,{value:e.rechargeChannel,onChange:h=>{t(x=>({...x,rechargeChannel:h,rechargeChannelError:h?"":x.rechargeChannelError}))},options:i?.map(h=>({value:h.value,label:h.label})),placeholder:_("请选择支付平台")}),e.rechargeChannelError&&d("div",{style:y.error,children:e.rechargeChannelError})]}),u&&s&&d("div",{style:y.feeTip,children:[i.find(h=>h.value===e.rechargeChannel)?.label||e.rechargeChannel,_("需要收取手续费,实际支付金额约为:"),"$",s]}),u&&s&&d("div",{style:y.feeDetailBox,children:[d("div",{style:y.feeDetailTitle,children:[_("手续费约为:"),d("span",{style:y.feeAmount,children:["$",c]})]}),d("div",{style:y.feeDetailDesc,children:_("额外费用说明:您的地区、币种、支付卡类型等因素可能会导致手续费的变动,最终手续费以官方为准。")})]}),e.error&&d("div",{style:{color:"#ff4d4f",marginBottom:12},children:e.error}),d("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[d("button",{type:"button",onClick:n,style:y.buttonCancel,children:_("取消")}),d("button",{type:"submit",disabled:r,style:y.buttonSubmit,children:_(r?"提交中...":"去支付")})]})]})};function pi(){const e=E("size");return{white:{container:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:e===l.SMALL?16:24,textAlign:"center",cursor:"pointer",minHeight:e===l.SMALL?80:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===l.SMALL?12:15},fileItem:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:e===l.SMALL?"8px 10px":"12px 16px",marginBottom:8,fontSize:e===l.SMALL?12:15,color:"#222",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 10px":"4px 14px",fontSize:e===l.SMALL?12:15,marginLeft:e===l.SMALL?8:16,cursor:"pointer"}},dark:{container:{border:"1.5px dashed #444C5C",borderRadius:8,background:"#181A20",padding:e===l.SMALL?16:24,textAlign:"center",cursor:"pointer",minHeight:e===l.SMALL?80:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===l.SMALL?12:15},fileItem:{display:"flex",alignItems:"center",background:"#23262F",borderRadius:8,padding:e===l.SMALL?"8px 10px":"12px 16px",marginBottom:8,fontSize:e===l.SMALL?12:15,color:"#fff",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 10px":"4px 14px",fontSize:e===l.SMALL?12:15,marginLeft:e===l.SMALL?8:16,cursor:"pointer"}}}}function hi(){const t=E("theme")===N.WHITE,n=pi();return t?n.white:n.dark}const mi="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1760084964886'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='7145'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M519.224889%20451.498667a9.102222%209.102222%200%200%200-14.421333%200l-128%20161.962666a9.102222%209.102222%200%200%200%207.224888%2014.734223h84.451556v277.048888c0%205.006222%204.096%209.102222%209.130667%209.102223h68.551111a9.159111%209.159111%200%200%200%209.159111-9.102223v-276.935111H640a9.102222%209.102222%200%200%200%207.224889-14.734222l-128-162.076444z'%20p-id='7146'%20fill='%231677ff'%3e%3c/path%3e%3cpath%20d='M854.186667%20345.742222C801.848889%20207.644444%20668.444444%20109.511111%20512.227556%20109.511111S222.634667%20207.559111%20170.296889%20345.6A228.693333%20228.693333%200%200%200%200%20566.670222a228.494222%20228.494222%200%200%200%20228.465778%20228.579556h45.795555a9.159111%209.159111%200%200%200%209.159111-9.159111v-68.551111a9.159111%209.159111%200%200%200-9.130666-9.159112H228.465778a140.885333%20140.885333%200%200%201-101.717334-43.064888%20141.653333%20141.653333%200%200%201-39.879111-103.537778%20140.600889%20140.600889%200%200%201%2029.923556-82.403556%20143.217778%20143.217778%200%200%201%2075.548444-49.948444l43.320889-11.320889%2015.872-41.813333a280.632889%20280.632889%200%200%201%20100.693334-129.479112%20276.707556%20276.707556%200%200%201%20160-50.545777c57.742222%200%20113.038222%2017.493333%20160%2050.517333a280.832%20280.832%200%200%201%20100.693333%20129.479111l15.758222%2041.728%2043.207111%2011.434667a142.364444%20142.364444%200%200%201%20105.244445%20137.244444c0%2037.831111-14.734222%2073.500444-41.472%20100.238222a140.572444%20140.572444%200%200%201-100.124445%2041.472h-45.795555a9.159111%209.159111%200%200%200-9.159111%209.159112v68.551111c0%205.034667%204.096%209.159111%209.130666%209.159111h45.824A228.494222%20228.494222%200%200%200%201024%20566.641778a228.608%20228.608%200%200%200-169.813333-220.899556z'%20p-id='7147'%20fill='%231677ff'%3e%3c/path%3e%3c/svg%3e",Jn=({value:e=[],onChange:t,maxCount:n=10,accept:r=".jpg,.jpeg,.png,.pdf",multiple:o=!0,disabled:a=!1})=>{const i=E("size"),s=se(null),[f,c]=B(!1),[p,u]=B(0),m=hi(),y=async x=>{const b=Array.from(x.target.files).slice(0,n);if(!b.length)return;c(!0);const S=[];for(let L=0;L<b.length;L++){u(0);const M=new FormData;M.append("file",b[L]);try{const A=await jo(M,T=>u(T));A&&S.push(A)}catch{}}c(!1),u(0),t?.([...e,...S]),s.current&&(s.current.value="")},h=x=>{const b=e.filter((S,L)=>L!==x);t?.(b)};return d("div",{children:[d("div",{style:{...m.container,cursor:a?"not-allowed":m.container.cursor,opacity:a?.6:1},onClick:()=>!a&&s.current?.click(),children:[d("img",{src:mi,alt:"upload",style:{width:i===l.SMALL?40:48,height:i===l.SMALL?40:48,marginBottom:i===l.SMALL?8:12}}),d("div",{style:{color:"#222",fontSize:i===l.SMALL?13:16,marginBottom:i===l.SMALL?4:8},children:_("Please upload the bank transfer receipt")}),d("div",{style:{color:"#999",fontSize:i===l.SMALL?12:13},children:_("Click or drag file to this area to upload")}),d("input",{ref:s,type:"file",multiple:o,accept:r,style:{display:"none"},onChange:y,disabled:a}),f&&d("div",{style:{marginTop:i===l.SMALL?8:12,color:"#1677ff"},children:[_("正在上传...")," ",p,"%"]})]}),e&&e.length>0&&d("div",{style:{marginTop:i===l.SMALL?8:12},children:e.map((x,b)=>d("div",{style:m.fileItem,children:[d("div",{style:{display:"flex",alignItems:"center",flex:1},children:d("span",{style:{fontWeight:500,wordBreak:"break-all"},children:x.split("/").pop()})}),d("button",{type:"button",onClick:S=>{S.stopPropagation(),h(b)},style:m.removeBtn,disabled:a,children:_("移除")})]},x))})]})};function gi(){const e=E("size");return{white:{label:{marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:e===l.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:e===l.SMALL?12:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},upload:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:e===l.SMALL?12:24,textAlign:"center",cursor:"pointer",minHeight:e===l.SMALL?100:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===l.SMALL?12:15},uploadError:{border:"1px dashed #ff4d4f"},fileItem:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:e===l.SMALL?"8px 10px":"12px 16px",marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:15,color:"#222",justifyContent:"space-between"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:e===l.SMALL?"6px 18px":"8px 24px",cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"8px 24px",cursor:"pointer",fontWeight:600},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"4px 14px",fontSize:e===l.SMALL?12:15,marginLeft:e===l.SMALL?8:16,cursor:"pointer"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:e===l.SMALL?2:4,textAlign:"left"},channelInfoBox:{marginTop:e===l.SMALL?8:10,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#F7F8FA",border:"1px solid #E5E6EB"},channelInfoItem:{color:"#222",fontSize:e===l.SMALL?12:13,lineHeight:1.6,wordBreak:"break-all"}},dark:{label:{marginBottom:e===l.SMALL?4:8,fontSize:e===l.SMALL?12:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:e===l.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:e===l.SMALL?12:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},upload:{border:"1px dashed #374151",borderRadius:8,background:"#181A20",padding:e===l.SMALL?12:24,textAlign:"center",cursor:"pointer",minHeight:e===l.SMALL?100:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===l.SMALL?12:14},uploadError:{border:"1px dashed #ff4d4f"},fileItem:{display:"flex",alignItems:"center",background:"#23262F",borderRadius:8,padding:e===l.SMALL?"8px 10px":"12px 16px",marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:15,color:"#fff",justifyContent:"space-between"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"8px 24px",fontSize:e===l.SMALL?12:14,cursor:"pointer",fontWeight:600},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"4px 14px",fontSize:e===l.SMALL?12:15,marginLeft:e===l.SMALL?8:16,cursor:"pointer"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:e===l.SMALL?2:4,textAlign:"left"},channelInfoBox:{marginTop:e===l.SMALL?8:10,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#23262F",border:"1px solid #374151"},channelInfoItem:{color:"#fff",fontSize:e===l.SMALL?12:13,lineHeight:1.6,wordBreak:"break-all"}}}}function bi(){const e=E("theme"),t=E("themeConfig"),n=e===N.WHITE,r=gi(),o=n?r.white:r.dark;if(console.log(t,"themeConfig"),t){const a=n?t.white:t.dark;if(a?.color)return{...o,buttonSubmit:{...o.buttonSubmit,background:a.color}}}return o}const yi=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}");console.log(o,"allDicts");const a=o?.channel||[],i=bi(),[s,f]=B([]),c=async u=>{u.preventDefault();let m=!0;t(y=>({...y,platformError:"",transactionIdError:"",filesError:""})),e.platform||(t(y=>({...y,platformError:_("请选择支付平台")})),m=!1),e.transactionId.trim()||(t(y=>({...y,transactionIdError:_("请输入转账交易ID")})),m=!1),(!e.files||e.files.length===0)&&(t(y=>({...y,filesError:_("请上传转账凭证")})),m=!1),m&&(await $n({transferChannel:e.platform,transferNo:e.transactionId,voucherUrls:e.files}),n(),Ie.success(_("提交成功")))};function p(u){t(m=>({...m,platform:u,platformError:u?"":m.platformError})),jn({code:u}).then(m=>{f(Array.isArray(m)?m:m?[String(m)]:[])})}return d("form",{onSubmit:c,children:[d("div",{style:{marginBottom:18},children:[d("div",{style:i.label,children:[d("span",{style:{color:"#F53F3F"},children:"*"})," ",_("第三方支付平台")]}),d(it,{value:e.platform,onChange:u=>{p(u)},options:[...a?.map(u=>({value:u.value,label:u.label}))],placeholder:_("请选择支付平台")}),e.platformError&&d("div",{style:i.error,children:e.platformError}),s.length>0&&d("div",{style:i.channelInfoBox,children:s.map((u,m)=>d("div",{style:i.channelInfoItem,children:u},m))})]}),d("div",{style:{marginBottom:18},children:[d("div",{style:i.label,children:[d("span",{style:{color:"#F53F3F"},children:"*"})," ",_("交易ID")]}),d("input",{type:"text",placeholder:_("请输入转账交易ID"),value:e.transactionId,maxLength:200,onInput:u=>{let m=u.target.value;m.length>200&&(m=m.slice(0,200)),t(y=>({...y,transactionId:m,transactionIdError:m?"":y.transactionIdError}))},style:{...i.input,...e.transactionIdError?i.inputError:{}}}),e.transactionIdError&&d("div",{style:i.error,children:e.transactionIdError})]}),d("div",{style:{marginBottom:24},children:[d("div",{style:i.label,children:[d("span",{style:{color:"#F53F3F"},children:"*"})," ",_("上传文件")]}),d(Jn,{value:e.files,onChange:u=>t(m=>({...m,files:u,filesError:""})),maxCount:10,accept:".jpg,.jpeg,.png,.pdf",multiple:!0}),e.filesError&&d("div",{style:i.error,children:e.filesError})]}),d("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[d("button",{type:"button",onClick:n,style:i.buttonCancel,children:_("取消")}),d("button",{type:"submit",disabled:r,style:i.buttonSubmit,children:_("确定")})]})]})};function xi(){const e=E("size");return{white:{mask:"rgba(0, 0, 0, 0.45)",modalBg:"#fff",modalColor:"#222",modalBoxShadow:"0 6px 16px rgba(0, 0, 0, 0.12)",closeBtn:{position:"absolute",top:"16px",right:"16px",background:"none",border:"none",fontSize:e===l.SMALL?16:24,cursor:"pointer",color:"#999",padding:"0",width:e===l.SMALL?16:24,height:e===l.SMALL?16:24,display:"flex",alignItems:"center",justifyContent:"center"},title:{fontSize:e===l.SMALL?16:18,fontWeight:"600",marginBottom:e===l.SMALL?16:24,color:"#222"},headerBorder:"#f0f0f0",scrollbarClass:"light-scrollbar",scrollbarThumbColor:"#d1d5db",scrollbarThumbHoverColor:"#9ca3af",tabBtn:(t,n)=>({flex:1,padding:e===l.SMALL?"8px 10px":"12px 16px",background:t?"#1890ff":"transparent",color:t?"#fff":"#666",border:"1px solid #d9d9d9",borderRight:n?"none":"1px solid #d9d9d9",cursor:"pointer",fontSize:e===l.SMALL?12:14,fontWeight:t?"600":"400",borderRadius:n?"6px 0 0 6px":"0 6px 6px 0"})},dark:{mask:"rgba(0, 0, 0, 0.65)",modalBg:"#23262F",modalColor:"#F5F6FA",modalBoxShadow:"0 6px 16px rgba(0,0,0,0.32)",closeBtn:{position:"absolute",top:e===l.SMALL?"12px":"16px",right:e===l.SMALL?"12px":"16px",background:"none",border:"none",fontSize:e===l.SMALL?16:24,cursor:"pointer",color:"#B5B8BE",padding:"0",width:e===l.SMALL?16:24,height:e===l.SMALL?16:24,display:"flex",alignItems:"center",justifyContent:"center"},title:{fontSize:e===l.SMALL?16:18,fontWeight:"600",marginBottom:e===l.SMALL?16:24,color:"#F5F6FA"},headerBorder:"#374151",scrollbarClass:"dark-scrollbar",scrollbarThumbColor:"#4B5563",scrollbarThumbHoverColor:"#6B7280",tabBtn:(t,n)=>({flex:1,padding:e===l.SMALL?"8px 10px":"12px 16px",background:t?"#00E8C6":"transparent",color:t?"#fff":"#B5B8BE",border:"1px solid #444C5C",borderRight:n?"none":"1px solid #444C5C",cursor:"pointer",fontSize:e===l.SMALL?12:14,fontWeight:t?"600":"400",borderRadius:n?"6px 0 0 6px":"0 6px 6px 0"})}}}function _i(){const t=E("theme")===N.WHITE,n=xi();return t?n.white:n.dark}const re=E("size");function Si(e){const t=`modal-scrollbar-${e.scrollbarClass}`;if(document.getElementById(t))return t;const n=document.createElement("style");return n.id=t,n.textContent=`
|
|
61
61
|
.${e.scrollbarClass} {
|
|
62
62
|
scrollbar-width: thin;
|
|
63
63
|
scrollbar-color: ${e.scrollbarThumbColor} transparent;
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
.${e.scrollbarClass}::-webkit-scrollbar-thumb:hover {
|
|
76
76
|
background: ${e.scrollbarThumbHoverColor};
|
|
77
77
|
}
|
|
78
|
-
`,document.head.appendChild(n),t}function qn({visible:e,onClose:t,title:n,children:r,width:o=re===l.SMALL?300:400,maxWidth:a=re===l.SMALL?300:400,showClose:i=!0,maskClosable:s=!0}){const[f,c]=B(!1),p=yi();q(()=>{xi(p)},[p]);const u=b=>{b.target===b.currentTarget?c(!0):c(!1)},h=b=>{b.target===b.currentTarget&&f&&s&&t(),c(!1)};return e?d("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:p.mask,display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999},onMouseDown:u,onMouseUp:h,children:d("div",{style:{background:p.modalBg,borderRadius:re===l.SMALL?8:12,minWidth:o,maxWidth:a,color:p.modalColor,boxShadow:p.modalBoxShadow,position:"relative",width:typeof o=="string"?o:`${o}px`,maxHeight:"90vh",display:"flex",flexDirection:"column"},onClick:b=>b.stopPropagation(),children:[d("div",{style:{position:"sticky",top:0,background:p.modalBg,borderRadius:re===l.SMALL?"8px 8px 0 0":"12px 12px 0 0",padding:re===l.SMALL?"24px 24px 0 24px":"32px 32px 0 32px",zIndex:1,borderBottom:`1px solid ${p.headerBorder}`},children:[i&&d("button",{type:"button",onClick:t,style:p.closeBtn,"aria-label":"关闭",children:"×"}),n&&d("div",{style:p.title,children:n})]}),d("div",{className:`modal-content ${p.scrollbarClass}`,style:{flex:1,overflowY:"auto",padding:re===l.SMALL?"16px 24px 24px 24px":"20px 32px 32px 32px"},children:r})]})}):null}function _i(){const e=k("size");return{white:{tabBtn:(t,n)=>({flex:1,background:t?"#fff":"#F7F8FA",color:t?"#1890ff":"#222",border:"1px solid #F0F1F3",borderRadius:n?"8px 0 0 8px":"0 8px 8px 0",fontWeight:500,fontSize:e===l.SMALL?12:16,height:e===l.SMALL?32:48,boxShadow:t?"0 2px 8px 0 rgba(20,20,20,0.04)":"none",outline:"none",cursor:"pointer"})},dark:{tabBtn:(t,n)=>({flex:1,background:t?"#23262F":"#181A20",color:t?"#00E8C6":"#fff",border:"1px solid #444C5C",borderRadius:n?"8px 0 0 8px":"0 8px 8px 0",fontWeight:500,fontSize:e===l.SMALL?12:16,height:e===l.SMALL?32:48,boxShadow:t?"0 2px 8px 0 rgba(20,20,20,0.10)":"none",outline:"none",cursor:"pointer"})}}}function Si(){const e=k("theme"),t=k("themeConfig"),n=e===O.WHITE,r=_i(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,tabBtn:(i,s)=>({...o.tabBtn(i,s),color:i?a.color:o.tabBtn(i,s).color})}}return o}const Li=k("size");function wi({visible:e,onClose:t,onSubmit:n}){const[r,o]=B({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),[a,i]=B({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1}),[s,f]=B("online"),c=Si();q(()=>{e||(f("online"),o({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),i({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1}))},[e]);const p=async u=>{u.preventDefault();let h=!0;if(o(b=>({...b,amountError:"",rechargeChannelError:""})),r.amount.trim()||(o(b=>({...b,amountError:_("请输入充值金额")})),h=!1),r.rechargeChannel||(o(b=>({...b,rechargeChannelError:_("请选择支付平台")})),h=!1),!!h){o(b=>({...b,loading:!0,error:""}));try{await n({amount:r.amount,rechargeChannel:r.rechargeChannel,currency:r.currency}),t()}catch{o(b=>({...b,error:_("提交失败,请重试")}))}finally{o(b=>({...b,loading:!1}))}}};return d(qn,{visible:e,onClose:t,title:_("充值 / 转账"),children:[d("div",{style:{display:"flex",marginBottom:Li===l.SMALL?16:28},children:[d("button",{type:"button",onClick:()=>f("online"),style:c.tabBtn(s==="online",!0),children:_("在线充值")}),d("button",{type:"button",onClick:()=>f("offline"),style:c.tabBtn(s==="offline",!1),children:_("线下转账")})]}),d("div",{style:{display:s==="online"?"block":"none"},children:d("form",{onSubmit:p,children:d(ui,{formState:r,setFormState:o,onClose:t,loading:r.loading})})}),d("div",{style:{display:s==="offline"?"block":"none"},children:d(gi,{formState:a,setFormState:i,onClose:t,loading:a.loading})})]})}function pt(){return(pt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ai=["context","children"];function ki(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(r,o){if(r==null)return{};var a,i,s={},f=Object.keys(r);for(i=0;i<f.length;i++)o.indexOf(a=f[i])>=0||(s[a]=r[a]);return s}(e,Ai);return cn(t,n)}function Ei(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=ie(ki,pt({},this._props,{context:e.detail.context}),function t(n,r){if(n.nodeType===3)return n.data;if(n.nodeType!==1)return null;var o=[],a={},i=0,s=n.attributes,f=n.childNodes;for(i=s.length;i--;)s[i].name!=="slot"&&(a[s[i].name]=s[i].value,a[Jn(s[i].name)]=s[i].value);for(i=f.length;i--;){var c=t(f[i],null),p=f[i].slot;p?a[p]=ie(Vt,{name:p},c):o[i]=c}var u=r?ie(Vt,null,o):o;return ie(r||n.nodeName.toLowerCase(),a,u)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?ln:Ie)(this._vdom,this._root)}function Jn(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function Ci(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[Jn(e)]=n,this._vdom=cn(this._vdom,r),Ie(this._vdom,this._root)}}function vi(){Ie(this._vdom=null,this._root)}function Vt(e,t){var n=this;return ie("slot",pt({},e,{ref:function(r){r?(n.ref=r,n._listener||(n._listener=function(o){o.stopPropagation(),o.detail.context=t},r.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function He(e,t,n,r){function o(){var a=Reflect.construct(HTMLElement,[],o);return a._vdomComponent=e,a._root=r&&r.shadow?a.attachShadow({mode:r.mode||"open"}):a,a}return(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=Ei,o.prototype.attributeChangedCallback=Ci,o.prototype.disconnectedCallback=vi,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach(function(a){Object.defineProperty(o.prototype,a,{get:function(){return this._vdom.props[a]},set:function(i){this._vdom?this.attributeChangedCallback(a,null,i):(this._props||(this._props={}),this._props[a]=i,this.connectedCallback());var s=typeof i;i!=null&&s!=="string"&&s!=="boolean"&&s!=="number"||this.setAttribute(a,i)}})}),customElements.define(t||e.tagName||e.displayName||e.name,o)}function Mi(){const[e,t]=B(!1),n=async r=>{const o=await Un({amount:r.amount,currency:r.currency,rechargeChannel:r.rechargeChannel});window.open(o,"_blank")};return d("div",{children:[d(ft,{onClick:()=>t(!0),children:_("充值/转账")}),d(wi,{visible:e,onClose:()=>t(!1),onSubmit:n})]})}He(Mi,"best-recharge",["theme"],{shadow:!1});function Ti(){const e=k("size"),t={wrapper:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:e===l.SMALL?12:20,alignItems:"start",minWidth:880,"@media (max-width: 1020px)":{gridTemplateColumns:"1fr",gap:16,minWidth:"auto",width:"100%"}},fieldLabel:{fontSize:e===l.SMALL?12:13,marginBottom:6,fontWeight:500,textAlign:"left"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,outline:"none",border:"1px solid",boxSizing:"border-box",paddingRight:e===l.SMALL?48:64},inputError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",marginTop:6,fontSize:e===l.SMALL?12:13},inputWrapper:{position:"relative"},inputSuffix:{padding:"0 8px",fontSize:e===l.SMALL?12:13,opacity:.8},inputSuffixAbs:{position:"absolute",top:0,right:e===l.SMALL?10:12,height:"100%",display:"flex",alignItems:"center",color:"#999",pointerEvents:"none",fontSize:e===l.SMALL?12:13},blockTitle:{fontSize:e===l.SMALL?16:18,fontWeight:700,marginBottom:e===l.SMALL?12:16,textAlign:"left",display:"flex",alignItems:"center",gap:8},subTitle:{marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?8:10,fontWeight:600,textAlign:"left"},titleBar:{width:3,height:e===l.SMALL?16:20,background:"#1890ff",borderRadius:2},methodList:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,"@media (max-width: 600px)":{gridTemplateColumns:"1fr",gap:8}},bankList:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,"@media (max-width: 600px)":{gridTemplateColumns:"1fr",gap:8}}};return{white:{...t,left:{background:"#fff",borderRadius:8,padding:16,border:"1px solid #E5E6EB"},right:{background:"#fff",borderRadius:8,padding:16},currencyRow:{display:"flex",gap:10,flexWrap:"wrap","@media (max-width: 480px)":{gap:8}},currencyItem:n=>({padding:"6px 12px",borderRadius:6,border:`1px solid ${n?"#1890ff":"#E5E6EB"}`,color:n?"#1890ff":"#222",background:n?"#EEF7FF":"#fff",cursor:"pointer"}),input:{...t.input,border:"1px solid #E5E6EB",background:"#fff",color:"#222"},payButton:{width:"100%",marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?12:16,background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"8px 12px":"12px 16px",fontWeight:600,cursor:"pointer"},methodItem:n=>({padding:"10px 12px",textAlign:"left",borderRadius:8,border:`1px solid ${n?"#1890ff":"#F0F1F3"}`,background:n?"#EEF7FF":"#F7F8FA",cursor:"pointer"}),bankItem:{padding:"10px 12px",borderRadius:8,border:"1px solid #F0F1F3",background:"#F7F8FA",textAlign:"left"},noticeBox:{marginTop:e===l.SMALL?8:12,marginBottom:e===l.SMALL?12:16,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#FFF7E6",border:"1px solid #FFE7BA",color:"#AD6800",fontSize:e===l.SMALL?12:13},reminderTitle:{fontWeight:600,margin:"6px 0",textAlign:"left"},reminderList:{margin:0,paddingLeft:18,color:"#6b7280",lineHeight:1.6,textAlign:"left"}},dark:{...t,left:{background:"#181A20",borderRadius:8,padding:16,border:"1px solid #2B2E38"},right:{background:"#181A20",borderRadius:8,padding:16,border:"1px solid #2B2E38"},currencyRow:{display:"flex",gap:10,flexWrap:"wrap","@media (max-width: 480px)":{gap:8}},currencyItem:n=>({padding:"6px 12px",borderRadius:6,border:`1px solid ${n?"#00E8C6":"#374151"}`,color:n?"#00E8C6":"#fff",background:n?"#0F2824":"#23262F",cursor:"pointer"}),input:{...t.input,border:"1px solid #374151",background:"#23262F",color:"#fff"},payButton:{width:"100%",marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?12:16,background:"#00E8C6",color:"#111",border:"none",borderRadius:6,padding:e===l.SMALL?"8px 12px":"12px 16px",fontWeight:700,cursor:"pointer"},methodItem:n=>({padding:"10px 12px",textAlign:"left",borderRadius:8,border:`1px solid ${n?"#00E8C6":"#374151"}`,background:n?"#0F2824":"#23262F",color:"#fff",cursor:"pointer"}),bankItem:{padding:"10px 12px",borderRadius:8,border:"1px solid #374151",background:"#23262F",textAlign:"left",color:"#fff"},noticeBox:{marginTop:e===l.SMALL?8:12,marginBottom:e===l.SMALL?12:16,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#2A1F0F",border:"1px solid #5C3E12",color:"#F4E3C1",fontSize:e===l.SMALL?12:13},reminderTitle:{fontWeight:600,margin:"6px 0",textAlign:"left",color:"#fff"},reminderList:{margin:0,paddingLeft:18,color:"#B5B8BE",lineHeight:1.6,textAlign:"left"}}}}function Bi(){const e=k("theme"),t=k("themeConfig"),n=e===O.WHITE,r=Ti(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,payButton:{...o.payButton,background:a.color},currencyItem:i=>({...o.currencyItem(i),border:`1px solid ${i?a.color:n?"#E5E6EB":"#374151"}`,color:i?a.color:n?"#222":"#fff"}),methodItem:i=>({...o.methodItem(i),border:`1px solid ${i?a.color:n?"#F0F1F3":"#374151"}`})}}return o}function Ri(){const e=k("size"),t={left:{background:"#fff",borderRadius:8,padding:16,border:"1px solid #E5E6EB"},blockTitle:{fontSize:e===l.SMALL?16:18,fontWeight:700,marginBottom:e===l.SMALL?12:16,textAlign:"left",display:"flex",alignItems:"center",gap:8},titleBar:{width:3,height:e===l.SMALL?16:20,background:"#1890ff",borderRadius:2},fieldLabel:{fontSize:e===l.SMALL?14:16,marginBottom:6,fontWeight:500,textAlign:"left"},required:{color:"#ff4d4f",marginRight:4},currencyRow:{display:"flex",gap:10,flexWrap:"wrap","@media (max-width: 600px)":{gap:8}},currencyItem:n=>({padding:"6px 12px",borderRadius:6,border:`1px solid ${n?"#1890ff":"#E5E6EB"}`,color:n?"#1890ff":"#222",background:n?"#EEF7FF":"#fff",cursor:"pointer"}),inputWrapper:{position:"relative"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,outline:"none",border:"1px solid",boxSizing:"border-box",paddingRight:e===l.SMALL?48:64},inputError:{border:"1px solid #ff4d4f"},inputSuffixAbs:{position:"absolute",top:0,right:e===l.SMALL?10:12,height:"100%",display:"flex",alignItems:"center",color:"#999",pointerEvents:"none",fontSize:e===l.SMALL?12:13},subTitle:{fontSize:e===l.SMALL?12:14,marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?8:10,textAlign:"left"},methodList:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,"@media (max-width: 600px)":{gridTemplateColumns:"1fr",gap:8}},methodItem:n=>({padding:"12px 16px",textAlign:"left",borderRadius:10,border:`1px solid ${n?"#1890ff":"#F0F1F3"}`,background:n?"#EEF7FF":"#F7F8FA",cursor:"pointer",display:"flex",alignItems:"center",gap:8,minHeight:44}),channelIcon:{width:22,height:22,objectFit:"contain",marginRight:8,display:"inline-block"},bankList:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,"@media (max-width: 600px)":{gridTemplateColumns:"1fr",gap:8}},bankItem:n=>({padding:"12px 16px",borderRadius:10,border:`1px solid ${n?"#1890ff":"#F0F1F3"}`,background:n?"#EEF7FF":"#F7F8FA",textAlign:"left",cursor:"pointer",display:"flex",alignItems:"center",gap:8,minHeight:44}),error:{color:"#ff4d4f",marginTop:6,fontSize:e===l.SMALL?12:13}};return{white:{...t,input:{...t.input,border:"1px solid #E5E6EB",background:"#fff",color:"#222"}},dark:{...t,left:{background:"#181A20",borderRadius:8,padding:16,border:"1px solid #2B2E38"},titleBar:{...t.titleBar,background:"#00E8C6"},currencyItem:n=>({padding:"6px 12px",borderRadius:6,border:`1px solid ${n?"#00E8C6":"#374151"}`,color:n?"#00E8C6":"#fff",background:n?"#0F2824":"#23262F",cursor:"pointer"}),input:{...t.input,border:"1px solid #374151",background:"#23262F",color:"#fff"},methodItem:n=>({padding:"10px 12px",textAlign:"left",borderRadius:8,border:`1px solid ${n?"#00E8C6":"#374151"}`,background:n?"#0F2824":"#23262F",color:"#fff",cursor:"pointer"}),bankItem:n=>({padding:"10px 12px",borderRadius:8,border:`1px solid ${n?"#00E8C6":"#374151"}`,background:n?"#0F2824":"#23262F",textAlign:"left",color:"#fff",cursor:"pointer"})}}}function Fi(){const e=k("theme"),t=k("themeConfig"),n=e===O.WHITE,r=Ri(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,titleBar:{...o.titleBar,background:a.color},currencyItem:i=>({...o.currencyItem(i),border:`1px solid ${i?a.color:n?"#E5E6EB":"#374151"}`,color:i?a.color:n?"#222":"#fff"}),methodItem:i=>({...o.methodItem(i),border:`1px solid ${i?a.color:n?"#F0F1F3":"#374151"}`}),bankItem:i=>({...o.bankItem(i),border:`1px solid ${i?a.color:n?"#F0F1F3":"#374151"}`})}}return o}function Ii({onChannelChange:e,onAmountChange:t,onCurrencyChange:n,initialAmount:r="",initialCurrency:o="USD",initialPaymentType:a="online",amountError:i=""}){const s=Fi(),c=JSON.parse(sessionStorage.getItem("all_dicts")||"{}")?.currency||[],[p,u]=B([]),[h,b]=B([]),[g,x]=B({currency:o,amount:r,onlineChannel:"",bankChannel:"",paymentType:a,amountError:""});q(()=>{qo({currency:g.currency}).then(L=>{const A=L.onlineChannel||[],T=L.offlineChannel||[];u(A),b(T);const z=A.length>0,N=T?.[0]?.value||"",$=A?.[0]?.value||"",G=z?a:"bank",U=G==="online"?$:N;x(K=>({...K,onlineChannel:$,bankChannel:N,paymentType:G})),U&&e(U,G)})},[g.currency]);function y(L){return L=L.replace(/[^\d.]/g,""),L=L.replace(/\.(?=.*\.)/g,""),L=L.replace(/^(\d+)(\.\d{0,2})?.*$/,"$1$2"),L=L.replace(/^0+(\d)/,"$1"),L.startsWith(".")&&(L="0"+L),L}const S=L=>{x(A=>({...A,currency:L})),n(L)},w=L=>{const A=y(L);x(T=>({...T,amount:A,amountError:""})),t(A)},M=(L,A)=>{x(T=>({...T,[A==="online"?"onlineChannel":"bankChannel"]:L,paymentType:A})),e(L,A)};return d("div",{style:s.left,children:[d("div",{style:s.blockTitle,children:[d("span",{style:s.titleBar}),_("选择支付方式")]}),d("div",{style:s.fieldLabel,children:_("支付币种")}),d("div",{style:s.currencyRow,children:(c||[]).slice(0,4).map(L=>d("button",{type:"button",onClick:()=>S(L.value),style:s.currencyItem(g.currency===L.value),children:L.label}))}),d("div",{style:{height:12}}),d("div",{style:s.fieldLabel,children:[d("span",{style:s.required,children:"*"}),_("支付金额")]}),d("div",{style:s.inputWrapper,children:[d("input",{type:"text",placeholder:_("请输入充值金额"),value:g.amount,onInput:L=>{w(L.target.value)},style:{...s.input,...i?s.inputError:{}}}),d("div",{style:s.inputSuffixAbs,children:g.currency})]}),i&&d("div",{style:s.error,children:i}),d("div",{style:{height:20}}),d("div",{style:s.fieldLabel,children:_("支付方式")}),p.length>0&&d("div",{children:[d("div",{style:s.subTitle,children:_("线上支付")}),d("div",{style:s.methodList,children:p.map(L=>d("button",{type:"button",onClick:()=>M(L.value,"online"),style:s.methodItem(g.onlineChannel===L.value&&g.paymentType==="online"),children:[L.icon&&d("img",{src:L.icon,alt:L.label,style:s.channelIcon}),L.label]}))})]}),d("div",{style:s.subTitle,children:_("银行转账")}),d("div",{style:s.bankList,children:h.map(L=>d("button",{type:"button",onClick:()=>M(L.value,"bank"),style:s.bankItem(g.bankChannel===L.value&&g.paymentType==="bank"),children:[L.icon&&d("img",{src:L.icon,alt:L.label,style:s.channelIcon}),L.label]}))})]})}function Di(){const e=k("size"),t={right:{background:"#fff",borderRadius:8,padding:16},blockTitle:{fontSize:e===l.SMALL?16:18,fontWeight:700,marginBottom:e===l.SMALL?12:16,textAlign:"left",display:"flex",alignItems:"center",gap:8},titleBar:{width:3,height:e===l.SMALL?16:20,background:"#1890ff",borderRadius:2},inputWrapper:{position:"relative"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,outline:"none",border:"1px solid",boxSizing:"border-box",paddingRight:e===l.SMALL?48:64},inputError:{border:"1px solid #ff4d4f"},disabled:{backgroundColor:"#f5f5f5",color:"#999",cursor:"not-allowed"},disabledDark:{backgroundColor:"#1A1D23",color:"#6B7280",cursor:"not-allowed",border:"1px solid #374151"},inputSuffixAbs:{position:"absolute",top:0,right:e===l.SMALL?10:12,height:"100%",display:"flex",alignItems:"center",color:"#999",pointerEvents:"none",fontSize:e===l.SMALL?12:13},payButton:{width:"100%",marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?12:16,background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"8px 12px":"12px 16px",fontWeight:600,cursor:"pointer"},noticeBox:{marginTop:e===l.SMALL?8:12,marginBottom:e===l.SMALL?12:16,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#FFF7E6",border:"1px solid #FFE7BA",color:"#AD6800",fontSize:e===l.SMALL?12:13},calcBox:{marginTop:e===l.SMALL?8:12,marginBottom:e===l.SMALL?8:12,color:"#666",textAlign:"left",lineHeight:1.6,fontSize:e===l.SMALL?12:13},calcLine:{marginBottom:4},calcAmount:{color:"#ff4d4f",fontWeight:700,margin:"0 4px"},reminderTitle:{fontWeight:600,margin:"6px 0",textAlign:"left"},reminderList:{margin:0,paddingLeft:18,color:"#6b7280",lineHeight:1.6,textAlign:"left",listStyleType:"disc",listStylePosition:"outside"},listItem:{listStyleType:"disc",listStylePosition:"outside"},error:{color:"#ff4d4f",marginTop:6,fontSize:e===l.SMALL?12:13}};return{white:{...t,input:{...t.input,border:"1px solid #E5E6EB",background:"#fff",color:"#222"}},dark:{...t,right:{background:"#181A20",borderRadius:8,padding:16,border:"1px solid #2B2E38"},titleBar:{...t.titleBar,background:"#00E8C6"},input:{...t.input,border:"1px solid #374151",background:"#23262F",color:"#fff"},payButton:{...t.payButton,background:"#00E8C6",color:"#111",fontWeight:700},noticeBox:{...t.noticeBox,background:"#2A1F0F",border:"1px solid #5C3E12",color:"#F4E3C1"},reminderTitle:{...t.reminderTitle,color:"#fff"},reminderList:{...t.reminderList,color:"#B5B8BE"}}}}function Oi(){const e=k("theme"),t=k("themeConfig"),n=e===O.WHITE,r=Di(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,payButton:{...o.payButton,background:a.color},titleBar:{...o.titleBar,background:a.color}}}return o}function zi({onSubmit:e,amount:t,currency:n,channel:r,loading:o=!1,error:a="",onAmountError:i}){const s=Oi(),f=s.right.background==="#181A20",[c,p]=B({amount:t,currency:n,channel:r,loading:o,error:a,amountError:""}),[u,h]=B(null);q(()=>{p(x=>({...x,amount:t,currency:n,channel:r,loading:o,error:a}));const g=setTimeout(()=>{t&&r&&n?$n({channel:r,amount:t,currency:n}).then(x=>h(x)).catch(()=>h(null)):h(null)},300);return()=>clearTimeout(g)},[t,n,r,o,a]);const b=async g=>{g&&g.preventDefault();let x=!0;if(t.trim()||(x=!1,i?.(_("请输入充值金额"))),r||(x=!1,p(y=>({...y,error:_("请选择支付平台")}))),!!x){p(y=>({...y,loading:!0,error:""}));try{await e({amount:t,currency:n,rechargeChannel:r})}finally{p(y=>({...y,loading:!1}))}}};return d("div",{style:s.right,children:[d("div",{style:s.blockTitle,children:[d("span",{style:s.titleBar}),_("在线支付")]}),d("form",{onSubmit:b,children:[d("div",{style:s.inputWrapper,children:[d("input",{type:"text",placeholder:_("支付金额"),value:c.amount,readOnly:!0,disabled:!0,style:{...s.input,...f?s.disabledDark:s.disabled,width:"100%"}}),d("div",{style:s.inputSuffixAbs,children:c.currency})]}),d("button",{type:"submit",disabled:c.loading,style:s.payButton,children:c.loading?_("提交中..."):_("立即支付")})]}),u&&d("div",{style:s.calcBox,children:[d("div",{style:s.calcLine,children:[_("预计支付金额约为:"),d("span",{style:s.calcAmount,children:`$${u.paymentAmount}`}),u.currency]}),d("div",{style:s.calcLine,children:[_("手续费约为:"),d("span",{style:s.calcAmount,children:`$${u.fee}`}),u.currency]}),d("div",{children:_("注:地区/币种/卡类型可能影响手续费,最终以平台为准。")})]}),d("div",{style:s.noticeBox,children:_("请在转账后提交银行回单,否则可能无法及时核验")}),d("div",{style:s.reminderTitle,children:_("温馨提示")}),d("ul",{style:s.reminderList,children:[d("li",{children:_("支付金额须与申请金额一致,请勿多付、少付或分批提交。")}),d("li",{children:_("请妥善保存回单并提供准确的支付时间,否则可能无法核验。")}),d("li",{children:_("工作时间提交4小时内审核,非工作时间将顺延至下一个工作日。")}),d("li",{children:_("如有问题,请联系平台客服。")}),d("li",{children:_("预付充值将收取平台服务费,具体以官方为准。")})]}),c.error&&d("div",{style:s.error,children:c.error})]})}function Pi(){const e=k("size"),t={container:{background:"#fff",borderRadius:8,padding:e===l.SMALL?16:20,width:"100%",maxWidth:"100%",boxSizing:"border-box","@media (max-width: 1020px)":{padding:e===l.SMALL?12:16}},header:{marginBottom:e===l.SMALL?20:24},backButton:{display:"flex",alignItems:"center",gap:8,background:"none",border:"none",color:"#1890ff",cursor:"pointer",fontSize:e===l.SMALL?14:16,fontWeight:500},backIcon:{fontSize:e===l.SMALL?16:18},uploadSection:{marginBottom:e===l.SMALL?24:32},uploadArea:{border:"2px dashed #D9D9D9",borderRadius:8,padding:e===l.SMALL?"40px 20px":"60px 30px",textAlign:"center",cursor:"pointer",background:"#FAFAFA",transition:"all 0.3s ease",width:"100%",boxSizing:"border-box","@media (max-width: 600px)":{padding:e===l.SMALL?"30px 15px":"40px 20px"}},uploadIcon:{fontSize:e===l.SMALL?48:64,marginBottom:e===l.SMALL?12:16},uploadTitle:{fontSize:e===l.SMALL?16:18,fontWeight:600,color:"#222",marginBottom:e===l.SMALL?8:12},uploadHint:{fontSize:e===l.SMALL?13:14,color:"#999"},hiddenInput:{display:"none"},fileList:{marginTop:e===l.SMALL?12:16},fileItem:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:e===l.SMALL?"8px 12px":"10px 16px",background:"#F5F5F5",borderRadius:6,marginBottom:8},fileName:{fontSize:e===l.SMALL?13:14,color:"#222"},removeButton:{background:"#ff4d4f",color:"#fff",border:"none",borderRadius:"50%",width:20,height:20,cursor:"pointer",fontSize:12,display:"flex",alignItems:"center",justifyContent:"center"},fieldSection:{marginBottom:e===l.SMALL?20:24},fieldLabel:{display:"block",fontSize:e===l.SMALL?14:16,fontWeight:500,color:"#222",marginBottom:e===l.SMALL?8:12},required:{color:"#ff4d4f",marginRight:4},inputWrapper:{position:"relative"},input:{width:"100%",padding:e===l.SMALL?"10px 12px":"12px 16px",borderRadius:6,border:"1px solid #D9D9D9",outline:"none",fontSize:e===l.SMALL?14:16,boxSizing:"border-box"},inputError:{border:"1px solid #ff4d4f"},disabled:{backgroundColor:"#f5f5f5",color:"#999",cursor:"not-allowed"},disabledDark:{backgroundColor:"#1A1D23",color:"#6B7280",cursor:"not-allowed",border:"1px solid #374151"},calendarIcon:{position:"absolute",right:e===l.SMALL?12:16,top:"50%",transform:"translateY(-50%)",fontSize:e===l.SMALL?16:18,pointerEvents:"none"},currencySuffix:{position:"absolute",right:e===l.SMALL?12:16,top:"50%",transform:"translateY(-50%)",fontSize:e===l.SMALL?14:16,color:"#999",pointerEvents:"none"},buttonSection:{display:"flex",gap:e===l.SMALL?12:16,marginTop:e===l.SMALL?32:40,width:"100%",boxSizing:"border-box","@media (max-width: 600px)":{flexDirection:"column",gap:e===l.SMALL?8:12}},cancelButton:{flex:1,padding:e===l.SMALL?"10px 16px":"12px 20px",borderRadius:6,border:"1px solid #D9D9D9",background:"#fff",color:"#222",fontSize:e===l.SMALL?14:16,fontWeight:500,cursor:"pointer",minWidth:0,boxSizing:"border-box"},submitButton:{flex:1,padding:e===l.SMALL?"10px 16px":"12px 20px",borderRadius:6,border:"none",background:"#1890ff",color:"#fff",fontSize:e===l.SMALL?14:16,fontWeight:600,cursor:"pointer",minWidth:0,boxSizing:"border-box"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:6}};return{white:{...t},dark:{...t,container:{...t.container,background:"#181A20",border:"1px solid #2B2E38"},backButton:{...t.backButton,color:"#00E8C6"},uploadArea:{...t.uploadArea,border:"2px dashed #374151",background:"#23262F"},uploadTitle:{...t.uploadTitle,color:"#fff"},uploadHint:{...t.uploadHint,color:"#B5B8BE"},fileItem:{...t.fileItem,background:"#2B2E38"},fileName:{...t.fileName,color:"#fff"},fieldLabel:{...t.fieldLabel,color:"#fff"},input:{...t.input,border:"1px solid #374151",background:"#23262F",color:"#fff"},calendarIcon:{...t.calendarIcon,color:"#B5B8BE"},currencySuffix:{...t.currencySuffix,color:"#B5B8BE"},cancelButton:{...t.cancelButton,border:"1px solid #374151",background:"#23262F",color:"#fff"},submitButton:{...t.submitButton,background:"#00E8C6",color:"#111"}}}}function Ni(){const e=k("theme"),t=k("themeConfig"),n=e===O.WHITE,r=Pi(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,backButton:{...o.backButton,color:a.color},submitButton:{...o.submitButton,background:a.color}}}return o}function Ui(){const e=k("theme"),t=k("themeConfig"),n={container:{position:"relative",display:"inline-block"},input:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 12px",border:"1px solid #d9d9d9",borderRadius:"6px",backgroundColor:"#fff",cursor:"pointer",transition:"all 0.3s",outline:"none",fontSize:"14px",lineHeight:"1.5715",color:"rgba(0, 0, 0, 0.85)"},inputText:{flex:1,textAlign:"left",color:"rgba(0, 0, 0, 0.85)"},calendarIcon:{fontSize:"16px",color:"rgba(0, 0, 0, 0.45)",marginLeft:"8px"},disabled:{backgroundColor:"#f5f5f5",color:"rgba(0, 0, 0, 0.25)",cursor:"not-allowed"},panel:{position:"absolute",top:"100%",left:0,zIndex:1050,backgroundColor:"#fff",border:"1px solid #d9d9d9",borderRadius:"6px",boxShadow:"0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05)",padding:"8px",minWidth:"280px",marginTop:"4px"},header:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 0",marginBottom:"8px"},navButton:{display:"flex",alignItems:"center",justifyContent:"center",width:"24px",height:"24px",border:"none",backgroundColor:"transparent",cursor:"pointer",borderRadius:"4px",fontSize:"16px",color:"rgba(0, 0, 0, 0.45)",transition:"all 0.3s"},monthYear:{fontSize:"16px",fontWeight:500,color:"rgba(0, 0, 0, 0.85)"},weekHeader:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:"4px",marginBottom:"8px"},weekDay:{display:"flex",alignItems:"center",justifyContent:"center",height:"32px",fontSize:"14px",fontWeight:500,color:"rgba(0, 0, 0, 0.85)"},calendarGrid:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:"4px"},dayButton:{display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",border:"none",backgroundColor:"transparent",cursor:"pointer",borderRadius:"4px",fontSize:"14px",transition:"all 0.3s",color:"rgba(0, 0, 0, 0.85)"},dayCurrentMonth:{color:"rgba(0, 0, 0, 0.85)"},dayOtherMonth:{color:"rgba(0, 0, 0, 0.25)"},dayToday:{fontWeight:600,color:"#1890ff"},daySelected:{backgroundColor:"#1890ff",color:"#fff"},yearPicker:{maxHeight:"200px",overflowY:"auto",marginBottom:"8px",border:"1px solid #f0f0f0",borderRadius:"4px",padding:"8px"},yearGrid:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"4px"},yearButton:{display:"flex",alignItems:"center",justifyContent:"center",padding:"6px 8px",border:"none",backgroundColor:"transparent",cursor:"pointer",borderRadius:"4px",fontSize:"14px",transition:"all 0.3s",color:"rgba(0, 0, 0, 0.85)"},yearSelected:{backgroundColor:"#1890ff",color:"#fff"},small:{padding:"4px 8px",fontSize:"12px"},middle:{padding:"8px 12px",fontSize:"14px"},large:{padding:"12px 16px",fontSize:"16px"}},r={white:{...n,input:{...n.input,border:"1px solid #d9d9d9",backgroundColor:"#fff",color:"rgba(0, 0, 0, 0.85)"},inputText:{...n.inputText,color:"rgba(0, 0, 0, 0.85)"},calendarIcon:{...n.calendarIcon,color:"rgba(0, 0, 0, 0.45)"},disabled:{...n.disabled,backgroundColor:"#f5f5f5",color:"rgba(0, 0, 0, 0.25)"},panel:{...n.panel,backgroundColor:"#fff",border:"1px solid #d9d9d9"},navButton:{...n.navButton,color:"rgba(0, 0, 0, 0.45)"},monthYear:{...n.monthYear,color:"rgba(0, 0, 0, 0.85)"},weekDay:{...n.weekDay,color:"rgba(0, 0, 0, 0.85)"},dayButton:{...n.dayButton,color:"rgba(0, 0, 0, 0.85)"},dayCurrentMonth:{...n.dayCurrentMonth,color:"rgba(0, 0, 0, 0.85)"},dayOtherMonth:{...n.dayOtherMonth,color:"rgba(0, 0, 0, 0.25)"},dayToday:{...n.dayToday,color:"#1890ff"},daySelected:{...n.daySelected,backgroundColor:"#1890ff",color:"#fff"},yearPicker:{...n.yearPicker,border:"1px solid #f0f0f0"},yearButton:{...n.yearButton,color:"rgba(0, 0, 0, 0.85)"},yearSelected:{...n.yearSelected,backgroundColor:"#1890ff",color:"#fff"}},dark:{...n,input:{...n.input,border:"1px solid #434343",backgroundColor:"#141414",color:"rgba(255, 255, 255, 0.85)"},inputText:{...n.inputText,color:"rgba(255, 255, 255, 0.85)"},calendarIcon:{...n.calendarIcon,color:"rgba(255, 255, 255, 0.45)"},disabled:{...n.disabled,backgroundColor:"#262626",color:"rgba(255, 255, 255, 0.25)"},panel:{...n.panel,backgroundColor:"#141414",border:"1px solid #434343"},navButton:{...n.navButton,color:"rgba(255, 255, 255, 0.45)"},monthYear:{...n.monthYear,color:"rgba(255, 255, 255, 0.85)"},weekDay:{...n.weekDay,color:"rgba(255, 255, 255, 0.85)"},dayButton:{...n.dayButton,color:"rgba(255, 255, 255, 0.85)"},dayCurrentMonth:{...n.dayCurrentMonth,color:"rgba(255, 255, 255, 0.85)"},dayOtherMonth:{...n.dayOtherMonth,color:"rgba(255, 255, 255, 0.25)"},dayToday:{...n.dayToday,color:"#00E8C6"},daySelected:{...n.daySelected,backgroundColor:"#00E8C6",color:"#111"},yearPicker:{...n.yearPicker,border:"1px solid #434343"},yearButton:{...n.yearButton,color:"rgba(255, 255, 255, 0.85)"},yearSelected:{...n.yearSelected,backgroundColor:"#00E8C6",color:"#111"}}},o=r[e]||r.white,a=t?.[e]?.color;return a&&(o.dayToday.color=a,o.daySelected.backgroundColor=a,o.yearSelected.backgroundColor=a,e==="dark"&&(o.daySelected.color="#111",o.yearSelected.color="#111")),o}function $i(){return Ui()}function Wi({value:e="",placeholder:t=_("请选择日期"),disabled:n=!1,size:r="middle",onChange:o,onFocus:a,onBlur:i,className:s="",style:f={}}){const c=$i(),[p,u]=B(!1),[h,b]=B(e),[g,x]=B(new Date),[y,S]=B(!1),w=me(null),M=E=>{if(!E)return"";const v=new Date(E);return`${v.getFullYear()}-${String(v.getMonth()+1).padStart(2,"0")}-${String(v.getDate()).padStart(2,"0")}`},L=(E,v)=>new Date(E,v+1,0).getDate(),A=(E,v)=>new Date(E,v,1).getDay(),T=()=>{const E=g.getFullYear(),v=g.getMonth(),ce=L(E,v),Gn=A(E,v),de=[],ht=v===0?11:v-1,mt=v===0?E-1:E,gt=L(mt,ht);for(let W=Gn-1;W>=0;W--)de.push({date:gt-W,isCurrentMonth:!1,isToday:!1,isSelected:!1,fullDate:`${mt}-${String(ht+1).padStart(2,"0")}-${String(gt-W).padStart(2,"0")}`});const Kn=new Date,bt=h?new Date(h):null;for(let W=1;W<=ce;W++){const yt=`${E}-${String(v+1).padStart(2,"0")}-${String(W).padStart(2,"0")}`,xt=new Date(yt);de.push({date:W,isCurrentMonth:!0,isToday:xt.toDateString()===Kn.toDateString(),isSelected:bt&&xt.toDateString()===bt.toDateString(),fullDate:yt})}const Xn=v===11?0:v+1,Zn=v===11?E+1:E,Qn=42-de.length;for(let W=1;W<=Qn;W++)de.push({date:W,isCurrentMonth:!1,isToday:!1,isSelected:!1,fullDate:`${Zn}-${String(Xn+1).padStart(2,"0")}-${String(W).padStart(2,"0")}`});return de},z=E=>{b(E),u(!1),o?.(E)},N=E=>{const v=new Date(g);E==="prev"?v.setMonth(v.getMonth()-1):v.setMonth(v.getMonth()+1),x(v)},$=E=>{const v=new Date(g);E==="prev"?v.setFullYear(v.getFullYear()-1):v.setFullYear(v.getFullYear()+1),x(v)},G=E=>{const v=new Date(g);v.setFullYear(E),x(v),S(!1)},U=()=>{const E=new Date().getFullYear(),v=[];for(let ce=E-50;ce<=E+50;ce++)v.push(ce);return v};q(()=>{const E=v=>{w.current&&!w.current.contains(v.target)&&u(!1)};if(p)return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[p]);const K=T(),Vn=[_("一月"),_("二月"),_("三月"),_("四月"),_("五月"),_("六月"),_("七月"),_("八月"),_("九月"),_("十月"),_("十一月"),_("十二月")],Yn=[_("日"),_("一"),_("二"),_("三"),_("四"),_("五"),_("六")];return d("div",{ref:w,className:`date-picker-container ${s}`,style:{...c.container,...f},children:[d("div",{style:{...c.input,...c[r],...n?c.disabled:{}},onClick:()=>!n&&u(!p),onFocus:a,onBlur:i,children:[d("span",{style:c.inputText,children:h?M(h):t}),d("span",{style:c.calendarIcon,children:"📅"})]}),p&&d("div",{style:c.panel,children:[d("div",{style:c.header,children:[d("button",{type:"button",style:c.navButton,onClick:()=>$("prev"),children:"‹‹"}),d("button",{type:"button",style:c.navButton,onClick:()=>N("prev"),children:"‹"}),d("span",{style:c.monthYear,onClick:()=>S(!y),children:[g.getFullYear(),"年",Vn[g.getMonth()]]}),d("button",{type:"button",style:c.navButton,onClick:()=>N("next"),children:"›"}),d("button",{type:"button",style:c.navButton,onClick:()=>$("next"),children:"››"})]}),y&&d("div",{style:c.yearPicker,children:d("div",{style:c.yearGrid,children:U().map(E=>d("button",{type:"button",style:{...c.yearButton,...E===g.getFullYear()?c.yearSelected:{}},onClick:()=>G(E),children:E},E))})}),d("div",{style:c.weekHeader,children:Yn.map(E=>d("div",{style:c.weekDay,children:E},E))}),d("div",{style:c.calendarGrid,children:K.map((E,v)=>d("button",{type:"button",style:{...c.dayButton,...E.isCurrentMonth?c.dayCurrentMonth:c.dayOtherMonth,...E.isToday?c.dayToday:{},...E.isSelected?c.daySelected:{}},onClick:()=>z(E.fullDate),disabled:n,children:E.date},v))})]})]})}function Hi({onBack:e,onCancel:t,currency:n="USD",amount:r="",channel:o="",onAmountError:a}){const i=Ni(),s=i.container.background==="#181A20",[f,c]=B({urls:[],transferTime:"",transferAmount:r,transactionId:"",payerName:"",filesError:"",timeError:"",amountError:"",transactionIdError:"",payerNameError:""});q(()=>{c(u=>({...u,transferAmount:r}))},[r]);const p=async()=>{let u=!0;if(f.urls.length===0&&(u=!1,c(h=>({...h,filesError:_("请上传银行转账回单")}))),f.transferTime||(u=!1,c(h=>({...h,timeError:_("请选择转账时间")}))),r.trim()||(u=!1,a?.(_("请输入充值金额"))),f.transactionId.trim()||(u=!1,c(h=>({...h,transactionIdError:_("请输入转账交易ID")}))),f.payerName.trim()||(u=!1,c(h=>({...h,payerNameError:_("请输入付款人名称")}))),!!u)try{await Nn({transferDate:f.transferTime,transferNo:f.transactionId,transferChannel:o,voucherUrls:f.urls,payerName:f.payerName}),Re.success(_("提交成功")),t()}finally{c(h=>({...h,loading:!1}))}};return d("div",{style:i.container,children:[d("div",{style:i.header,children:d("button",{type:"button",onClick:e,style:i.backButton,children:[d("span",{style:i.backIcon,children:"←"}),_("返回账户信息")]})}),d("div",{style:i.uploadSection,children:[d(jn,{value:f.urls,onChange:u=>{c(h=>({...h,urls:u,filesError:""}))},maxCount:10,accept:"image/*,.pdf",multiple:!0}),f.filesError&&d("div",{style:i.error,children:f.filesError})]}),d("div",{style:i.fieldSection,children:[d("label",{style:i.fieldLabel,children:[d("span",{style:i.required,children:"*"}),_("转账时间")]}),d(Wi,{value:f.transferTime,placeholder:_("请选择转账时间"),onChange:u=>{c(h=>({...h,transferTime:u,timeError:""}))},style:{width:"100%"}}),f.timeError&&d("div",{style:i.error,children:f.timeError})]}),d("div",{style:i.fieldSection,children:[d("label",{style:i.fieldLabel,children:_("转账金额")}),d("div",{style:i.inputWrapper,children:[d("input",{type:"text",placeholder:_("请输入实际转账金额"),value:f.transferAmount,readOnly:!0,disabled:!0,style:{...i.input,...s?i.disabledDark:i.disabled}}),d("span",{style:i.currencySuffix,children:n})]})]}),d("div",{style:i.fieldSection,children:[d("label",{style:i.fieldLabel,children:[d("span",{style:i.required,children:"*"}),_("交易ID")]}),d("input",{type:"text",placeholder:_("请输入转账交易ID"),value:f.transactionId,onChange:u=>{c(h=>({...h,transactionId:u.target.value,transactionIdError:""}))},style:{...i.input,...f.transactionIdError?i.inputError:{}}}),f.transactionIdError&&d("div",{style:i.error,children:f.transactionIdError})]}),d("div",{style:i.fieldSection,children:[d("label",{style:i.fieldLabel,children:[d("span",{style:i.required,children:"*"}),_("付款人名称")]}),d("input",{type:"text",placeholder:_("请输入付款人名称"),value:f.payerName,onChange:u=>{c(h=>({...h,payerName:u.target.value,payerNameError:""}))},style:{...i.input,...f.payerNameError?i.inputError:{}}}),f.payerNameError&&d("div",{style:i.error,children:f.payerNameError})]}),d("div",{style:i.buttonSection,children:[d("button",{type:"button",onClick:t,style:i.cancelButton,children:_("取消")}),d("button",{type:"button",onClick:p,style:i.submitButton,children:_("提交审核")})]})]})}function ji(){const e=k("size"),t={container:{background:"#fff",borderRadius:8,padding:e===l.SMALL?16:20,width:"100%",maxWidth:"100%",boxSizing:"border-box","@media (max-width: 1020px)":{maxWidth:"100%",margin:0,padding:e===l.SMALL?12:16},"@media (min-width: 1021px)":{maxWidth:600,margin:"0 auto"}},header:{fontSize:e===l.SMALL?16:18,fontWeight:700,marginBottom:e===l.SMALL?16:20,textAlign:"left",display:"flex",alignItems:"center",gap:8},titleBar:{width:3,height:e===l.SMALL?16:20,background:"#1890ff",borderRadius:2},bankDetails:{marginBottom:e===l.SMALL?20:24},detailCard:{marginTop:12,marginBottom:12,border:"1px solid #f0f0f0",borderRadius:8,background:"#fafafa",overflow:"hidden"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:e===l.SMALL?"8px 0":"10px 0",borderBottom:"1px solid #f0f0f0",width:"100%",boxSizing:"border-box","@media (max-width: 600px)":{flexDirection:"column",alignItems:"flex-start",gap:4}},label:{fontSize:e===l.SMALL?13:14,color:"#666",fontWeight:500,minWidth:120,"@media (max-width: 600px)":{minWidth:"auto",marginBottom:2}},value:{fontSize:e===l.SMALL?13:14,color:"#222",fontWeight:500,textAlign:"right",flex:1,"@media (max-width: 600px)":{textAlign:"left",flex:"none",width:"100%"}},valueWithCopy:{display:"flex",alignItems:"center",gap:8,flex:1,justifyContent:"flex-end",minWidth:0,"@media (max-width: 600px)":{flex:"none",width:"100%",justifyContent:"flex-start"}},row:{display:"flex",alignItems:"center",padding:"10px 12px",borderBottom:"1px solid #ededed"},rowLast:{borderBottom:"none"},rowAlt:{background:"#fafafa"},labelMuted:{fontSize:e===l.SMALL?13:14,color:"#8c8c8c",fontWeight:500,flex:.4},valueStrong:{fontSize:e===l.SMALL?13:14,color:"#111",textAlign:"right",flex:.6,wordBreak:"break-all"},copyButton:{padding:e===l.SMALL?"4px 8px":"6px 12px",fontSize:e===l.SMALL?11:12,background:"#1890ff",color:"#fff",border:"none",borderRadius:4,cursor:"pointer",fontWeight:500,flexShrink:0,whiteSpace:"nowrap"},confirmButton:{width:"100%",marginBottom:e===l.SMALL?16:20,background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"12px 16px":"14px 20px",fontWeight:600,cursor:"pointer",fontSize:e===l.SMALL?14:16},noticeBox:{marginBottom:e===l.SMALL?16:20,padding:e===l.SMALL?"10px 12px":"12px 16px",borderRadius:6,background:"#FFF7E6",border:"1px solid #FFE7BA",color:"#AD6800",fontSize:e===l.SMALL?12:13,lineHeight:1.5},reminderTitle:{fontWeight:600,marginBottom:e===l.SMALL?8:12,textAlign:"left",fontSize:e===l.SMALL?14:16},reminderList:{margin:0,paddingLeft:18,color:"#666",lineHeight:1.6,textAlign:"left",fontSize:e===l.SMALL?12:13},link:{color:"#1890ff",textDecoration:"none",fontWeight:500}};return{white:{...t},dark:{...t,container:{...t.container,background:"#181A20",border:"1px solid #2B2E38"},titleBar:{...t.titleBar,background:"#00E8C6"},label:{...t.label,color:"#B5B8BE"},value:{...t.value,color:"#fff"},copyButton:{...t.copyButton,background:"#00E8C6",color:"#111"},confirmButton:{...t.confirmButton,background:"#00E8C6",color:"#111"},noticeBox:{...t.noticeBox,background:"#2A1F0F",border:"1px solid #5C3E12",color:"#F4E3C1"},reminderTitle:{...t.reminderTitle,color:"#fff"},reminderList:{...t.reminderList,color:"#B5B8BE"},link:{...t.link,color:"#00E8C6"}}}}function qi(){const e=k("theme"),t=k("themeConfig"),n=e===O.WHITE,r=ji(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,titleBar:{...o.titleBar,background:a.color},copyButton:{...o.copyButton,background:a.color},confirmButton:{...o.confirmButton,background:a.color},link:{...o.link,color:a.color}}}return o}function Ji({onConfirm:e,channelCode:t}){const n=qi(),[r,o]=B([]);return q(()=>{if(!t)return;let a=!0;return Wn({code:t}).then(i=>{if(a){if(Array.isArray(i)){o(i.map(s=>String(s)));return}if(i&&typeof i=="object"){const s=[];Object.keys(i).forEach(f=>{const c=i[f];s.push(`${f}: ${c}`)}),o(s);return}o(i?[String(i)]:[])}}).catch(()=>o([])),()=>{a=!1}},[t]),d("div",{style:n.container,children:[d("div",{style:n.header,children:[d("span",{style:n.titleBar}),_("银行转账")]}),r.length>0&&d("div",{style:n.detailCard,children:r.map((a,i)=>{const s=String(a).split(":"),f=s.shift()?.trim()||"",c=s.join(":").trim();return d("div",{style:{...n.row,...i===r.length-1?n.rowLast:{},...i%2===1?n.rowAlt:{}},children:[d("div",{style:n.labelMuted,children:f}),d("div",{style:n.valueStrong,children:c||"-"})]},i)})}),d("button",{type:"button",onClick:e,style:n.confirmButton,children:_("确认转账详情")}),d("div",{style:n.noticeBox,children:_("转账后提交银行回单提示")}),d("div",{style:n.reminderTitle,children:_("温馨提示")}),d("ul",{style:n.reminderList,children:[d("li",{children:_("支付金额匹配提醒")}),d("li",{children:_("保存交易回单提醒")}),d("li",{children:_("查看余额提醒")}),d("li",{children:_("联系客服提醒")}),d("li",{children:_("P卡转账延迟提醒")}),d("li",{children:[_("平台服务费说明")," ",d("a",{href:"#",style:n.link,children:_("费用政策")})," ",_("详情")]})]})]})}function Vi({visible:e,onClose:t,onSubmit:n}){const r=Bi(),[o,a]=B(!1),[i,s]=B({currency:"USD",amount:"",channel:"",paymentType:"online",loading:!1,error:"",amountError:"",channelError:"",showOfflineUpload:!1});q(()=>{const x=()=>{a(window.innerWidth<=1020)};return x(),window.addEventListener("resize",x),()=>window.removeEventListener("resize",x)},[]),q(()=>{e||s({currency:"USD",amount:"",channel:"",paymentType:"online",loading:!1,error:"",amountError:"",channelError:"",showOfflineUpload:!1})},[e]);const f=(x,y)=>{s(S=>({...S,channel:x,paymentType:y,channelError:""}))},c=x=>{s(y=>({...y,amount:x,amountError:""}))},p=x=>{s(y=>({...y,amountError:x}))},u=x=>{s(y=>({...y,currency:x}))},h=async x=>{s(y=>({...y,loading:!0,error:""}));try{await n(x),t()}catch{s(y=>({...y,error:_("提交失败,请重试")}))}finally{s(y=>({...y,loading:!1}))}},b=()=>{console.log("用户确认银行转账详情"),s(x=>({...x,showOfflineUpload:!0}))},g=()=>{s(x=>({...x,showOfflineUpload:!1}))};return d(qn,{visible:e,onClose:t,title:_("在线支付"),width:o?"95%":960,maxWidth:o?"95%":1e3,children:d("div",{style:{...r.wrapper,...o?{gridTemplateColumns:"1fr",gap:16,minWidth:"auto"}:{}},children:[d(Ii,{onChannelChange:f,onAmountChange:c,onCurrencyChange:u,initialAmount:i.amount,initialCurrency:i.currency,initialPaymentType:i.paymentType,amountError:i.amountError}),i.paymentType==="online"?d(zi,{onSubmit:h,amount:i.amount,currency:i.currency,channel:i.channel,loading:i.loading,error:i.error,onAmountError:p}):i.showOfflineUpload?d(Hi,{onBack:g,onCancel:t,currency:i.currency,amount:i.amount,channel:i.channel,onAmountError:p}):d(Ji,{onConfirm:b,channelCode:i.channel})]})})}function Yi(){const[e,t]=B(!1),n=async r=>{const o=await Un({amount:r.amount,currency:r.currency,rechargeChannel:r.rechargeChannel});window.open(o,"_blank")};return d("div",{children:[d(ft,{onClick:()=>t(!0),children:_("在线支付")}),d(Vi,{visible:e,onClose:()=>t(!1),onSubmit:n})]})}He(Yi,"best-payment",["theme"],{shadow:!1});const Yt={white:{popover:{background:"#fff",color:"#222",boxShadow:"0 4px 16px rgba(0,0,0,0.12)",border:"none"},arrow:{top:"#fff",bottom:"#fff",left:"#fff",right:"#fff"}},dark:{popover:{background:"#23262F",color:"#fff",boxShadow:"0 4px 16px rgba(0,0,0,0.32)",border:"1px solid #444C5C"},arrow:{top:"#23262F",bottom:"#23262F",left:"#23262F",right:"#23262F"}}};function Gi(){return k("theme")===O.WHITE?Yt.white:Yt.dark}const Ki=({popover:e,children:t,popoverWidth:n,popoverMinWidth:r,offsetY:o,offsetX:a,popoverPosition:i="top"})=>{const s=k("size"),f=n??(s===l.SMALL?200:300),c=r??(s===l.SMALL?150:200),p=o??(s===l.SMALL?8:16),u=a??(s===l.SMALL?8:16),[h,b]=B(!1),[g,x]=B(i),y=me(null),S=me(null),w=Gi(),M=()=>{if(S.current&&(clearTimeout(S.current),S.current=null),i==="top"||i==="bottom")if(y.current){const z=y.current.getBoundingClientRect();i==="top"&&z.top<100?x("bottom"):i==="bottom"&&window.innerHeight-z.bottom<100?x("top"):x(i)}else x(i);else x(i);b(!0)},L=()=>{S.current=window.setTimeout(()=>{b(!1)},120)};let A={position:"absolute",zIndex:999,borderRadius:6,fontSize:s===l.SMALL?12:15,minWidth:c,width:f,padding:s===l.SMALL?"6px 12px":"8px 14px",pointerEvents:"auto",textAlign:"center",animation:"fadeInUp 0.3s",...w.popover},T={position:"absolute",zIndex:11,width:0,height:0};return g==="top"?(A={...A,left:"50%",top:-48,transform:"translateX(-50%)"},T={...T,left:"50%",bottom:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderTop:`8px solid ${w.arrow.top}`}):g==="bottom"?(A={...A,left:"50%",top:"100%",marginTop:p,transform:"translateX(-50%)"},T={...T,left:"50%",top:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderBottom:`8px solid ${w.arrow.bottom}`}):g==="leftTop"?(A={...A,right:"100%",top:0,marginRight:u,transform:"none"},T={...T,right:-8,top:s===l.SMALL?8:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderLeft:`8px solid ${w.arrow.left}`}):g==="rightTop"&&(A={...A,left:"100%",top:0,marginLeft:u,transform:"translateY(0)"},T={...T,left:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderRight:`8px solid ${w.arrow.right}`}),d("div",{ref:y,style:{position:"relative",display:"inline-block"},onMouseEnter:M,onMouseLeave:L,children:[t,h&&d("div",{style:A,onMouseEnter:M,onMouseLeave:L,children:[e,d("div",{style:T})]})]})};function Xi(){const e=k("size");return{white:{popoverTitle:{fontSize:e===l.SMALL?12:16,fontWeight:600,color:"#222",marginBottom:e===l.SMALL?12:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:e===l.SMALL?"6px 0":"8px 0",borderBottom:"1px solid #e5e7eb",fontSize:e===l.SMALL?12:15},detailLabel:{display:"flex",alignItems:"center",color:"#6b7280",fontWeight:500},detailDot:t=>({display:"inline-block",width:e===l.SMALL?6:8,height:e===l.SMALL?6:8,borderRadius:"50%",background:t,marginRight:e===l.SMALL?6:8}),detailValue:t=>({color:t,fontWeight:600,fontSize:e===l.SMALL?12:15}),main:{fontSize:e===l.SMALL?18:24,fontWeight:800,color:"#111827",display:"inline-block"},currency:{fontSize:e===l.SMALL?16:18,color:"#6b7280",marginLeft:e===l.SMALL?6:8,fontWeight:600}},dark:{popoverTitle:{fontSize:e===l.SMALL?14:16,fontWeight:600,color:"#fff",marginBottom:e===l.SMALL?14:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:e===l.SMALL?"6px 0":"8px 0",borderBottom:"1px solid #374151",fontSize:e===l.SMALL?12:15},detailLabel:{display:"flex",alignItems:"center",color:"#B5B8BE",fontWeight:500},detailDot:t=>({display:"inline-block",width:e===l.SMALL?6:8,height:e===l.SMALL?6:8,borderRadius:"50%",background:t,marginRight:e===l.SMALL?6:8}),detailValue:t=>({color:t,fontWeight:600,fontSize:e===l.SMALL?12:15}),main:{fontSize:e===l.SMALL?18:24,fontWeight:800,color:"#fff",display:"inline-block"},currency:{fontSize:e===l.SMALL?16:18,color:"#B5B8BE",marginLeft:e===l.SMALL?6:8,fontWeight:600}}}}function Zi(){const t=k("theme")===O.WHITE,n=Xi();return t?n.white:n.dark}function Gt(e){return e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}function Qi(e){const[t,n]=B({currBalance:0,currency:"USD",details:[]}),r=async()=>{try{const i=await Pn(),s=[{label:"",value:i.totalAmount,color:"#15b36b",dot:"#15b36b"},{label:"",value:i.frozenAmount,color:"#f59e0b",dot:"#f59e0b"},...i.isCredit?[{label:"",value:i.creditLimit,color:"#1890ff",dot:"#1890ff"},{label:"",value:i.creditUsed,color:"#ff0000",dot:"#ff0000"}]:[],{label:"",value:i.availableAmount,color:"#1890ff",dot:"#15b36b"}],f={currBalance:i.currBalance,currency:"USD",symbol:"$",details:s};n(f)}catch(i){console.error("获取余额失败:",i)}};q(()=>{r()},[]),q(()=>{const i=()=>{r()};return window.addEventListener("refresh-balance",i),()=>{window.removeEventListener("refresh-balance",i)}},[]);const o=Zi(),a=[{label:_("真实金额"),value:t.details[0]?.value||0,color:"#15b36b",dot:"#15b36b"},{label:_("冻结金额"),value:t.details[1]?.value||0,color:"#f59e0b",dot:"#f59e0b"},...t.details.length>4?[{label:_("信用额度"),value:t.details[2]?.value||0,color:"#1890ff",dot:"#1890ff"},{label:_("已用额度"),value:t.details[3]?.value||0,color:"#ff0000",dot:"#ff0000"}]:[],{label:_("可用余额"),value:t.details[4]?.value||0,color:"#1890ff",dot:"#15b36b"}];return d(Ki,{popover:d(ne,{children:[d("div",{style:o.popoverTitle,children:_("余额详情")}),a.map(i=>d("div",{style:o.detailRow,children:[d("span",{style:o.detailLabel,children:[d("span",{style:o.detailDot(i.dot)}),i.label]}),d("span",{style:o.detailValue(i.color),children:Gt(i.value)})]},i.label))]}),popoverPosition:e.popoverPosition||"bottom",children:d("div",{style:o.main,children:[Gt(t.currBalance),d("span",{style:o.currency,children:t.currency})]})})}He(Qi,"best-statistical-balance");const Se={white:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,cursor:"pointer",fontWeight:600,transition:"all 0.2s ease"},dark:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,cursor:"pointer",fontWeight:600,transition:"all 0.2s ease"}};function ea(e){return k("theme")===O.WHITE?{...Se.white,background:e||Se.white.background}:{...Se.dark,background:e||Se.dark.background}}function ta(e){switch(e){case"small":return{fontSize:"12px",gap:"2px"};case"large":return{fontSize:"18px",gap:"6px"};default:return{fontSize:"14px",gap:"4px"}}}function na({color:e,size:t="medium",children:n}){const[r,o]=B(!1),a=ea(e),i=ta(t),s={...a,...i,display:"flex",alignItems:"center"};return d(ne,{children:[d("style",{children:`
|
|
78
|
+
`,document.head.appendChild(n),t}function Vn({visible:e,onClose:t,title:n,children:r,width:o=re===l.SMALL?300:400,maxWidth:a=re===l.SMALL?300:400,showClose:i=!0,maskClosable:s=!0}){const[f,c]=B(!1),p=_i();q(()=>{Si(p)},[p]);const u=y=>{y.target===y.currentTarget?c(!0):c(!1)},m=y=>{y.target===y.currentTarget&&f&&s&&t(),c(!1)};return e?d("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:p.mask,display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999},onMouseDown:u,onMouseUp:m,children:d("div",{style:{background:p.modalBg,borderRadius:re===l.SMALL?8:12,minWidth:o,maxWidth:a,color:p.modalColor,boxShadow:p.modalBoxShadow,position:"relative",width:typeof o=="string"?o:`${o}px`,maxHeight:"90vh",display:"flex",flexDirection:"column"},onClick:y=>y.stopPropagation(),children:[d("div",{style:{position:"sticky",top:0,background:p.modalBg,borderRadius:re===l.SMALL?"8px 8px 0 0":"12px 12px 0 0",padding:re===l.SMALL?"24px 24px 0 24px":"32px 32px 0 32px",zIndex:1,borderBottom:`1px solid ${p.headerBorder}`},children:[i&&d("button",{type:"button",onClick:t,style:p.closeBtn,"aria-label":"关闭",children:"×"}),n&&d("div",{style:p.title,children:n})]}),d("div",{className:`modal-content ${p.scrollbarClass}`,style:{flex:1,overflowY:"auto",padding:re===l.SMALL?"16px 24px 24px 24px":"20px 32px 32px 32px"},children:r})]})}):null}function Li(){const e=E("size");return{white:{tabBtn:(t,n)=>({flex:1,background:t?"#fff":"#F7F8FA",color:t?"#1890ff":"#222",border:"1px solid #F0F1F3",borderRadius:n?"8px 0 0 8px":"0 8px 8px 0",fontWeight:500,fontSize:e===l.SMALL?12:16,height:e===l.SMALL?32:48,boxShadow:t?"0 2px 8px 0 rgba(20,20,20,0.04)":"none",outline:"none",cursor:"pointer"})},dark:{tabBtn:(t,n)=>({flex:1,background:t?"#23262F":"#181A20",color:t?"#00E8C6":"#fff",border:"1px solid #444C5C",borderRadius:n?"8px 0 0 8px":"0 8px 8px 0",fontWeight:500,fontSize:e===l.SMALL?12:16,height:e===l.SMALL?32:48,boxShadow:t?"0 2px 8px 0 rgba(20,20,20,0.10)":"none",outline:"none",cursor:"pointer"})}}}function wi(){const e=E("theme"),t=E("themeConfig"),n=e===N.WHITE,r=Li(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,tabBtn:(i,s)=>({...o.tabBtn(i,s),color:i?a.color:o.tabBtn(i,s).color})}}return o}const Ai=E("size");function ki({visible:e,onClose:t,onSubmit:n}){const[r,o]=B({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),[a,i]=B({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1}),[s,f]=B("online"),c=wi();q(()=>{e||(f("online"),o({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),i({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1}))},[e]);const p=async u=>{u.preventDefault();let m=!0;if(o(y=>({...y,amountError:"",rechargeChannelError:""})),r.amount.trim()||(o(y=>({...y,amountError:_("请输入充值金额")})),m=!1),r.rechargeChannel||(o(y=>({...y,rechargeChannelError:_("请选择支付平台")})),m=!1),!!m){o(y=>({...y,loading:!0,error:""}));try{await n({amount:r.amount,rechargeChannel:r.rechargeChannel,currency:r.currency}),t()}catch{o(y=>({...y,error:_("提交失败,请重试")}))}finally{o(y=>({...y,loading:!1}))}}};return d(Vn,{visible:e,onClose:t,title:_("充值 / 转账"),children:[d("div",{style:{display:"flex",marginBottom:Ai===l.SMALL?16:28},children:[d("button",{type:"button",onClick:()=>f("online"),style:c.tabBtn(s==="online",!0),children:_("在线充值")}),d("button",{type:"button",onClick:()=>f("offline"),style:c.tabBtn(s==="offline",!1),children:_("线下转账")})]}),d("div",{style:{display:s==="online"?"block":"none"},children:d("form",{onSubmit:p,children:d(fi,{formState:r,setFormState:o,onClose:t,loading:r.loading})})}),d("div",{style:{display:s==="offline"?"block":"none"},children:d(yi,{formState:a,setFormState:i,onClose:t,loading:a.loading})})]})}function mt(){return(mt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ei=["context","children"];function Ci(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(r,o){if(r==null)return{};var a,i,s={},f=Object.keys(r);for(i=0;i<f.length;i++)o.indexOf(a=f[i])>=0||(s[a]=r[a]);return s}(e,Ei);return un(t,n)}function vi(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=ie(Ci,mt({},this._props,{context:e.detail.context}),function t(n,r){if(n.nodeType===3)return n.data;if(n.nodeType!==1)return null;var o=[],a={},i=0,s=n.attributes,f=n.childNodes;for(i=s.length;i--;)s[i].name!=="slot"&&(a[s[i].name]=s[i].value,a[Yn(s[i].name)]=s[i].value);for(i=f.length;i--;){var c=t(f[i],null),p=f[i].slot;p?a[p]=ie(Gt,{name:p},c):o[i]=c}var u=r?ie(Gt,null,o):o;return ie(r||n.nodeName.toLowerCase(),a,u)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?dn:ze)(this._vdom,this._root)}function Yn(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[Yn(e)]=n,this._vdom=un(this._vdom,r),ze(this._vdom,this._root)}}function Mi(){ze(this._vdom=null,this._root)}function Gt(e,t){var n=this;return ie("slot",mt({},e,{ref:function(r){r?(n.ref=r,n._listener||(n._listener=function(o){o.stopPropagation(),o.detail.context=t},r.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function qe(e,t,n,r){function o(){var a=Reflect.construct(HTMLElement,[],o);return a._vdomComponent=e,a._root=r&&r.shadow?a.attachShadow({mode:r.mode||"open"}):a,a}return(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=vi,o.prototype.attributeChangedCallback=Ti,o.prototype.disconnectedCallback=Mi,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach(function(a){Object.defineProperty(o.prototype,a,{get:function(){return this._vdom.props[a]},set:function(i){this._vdom?this.attributeChangedCallback(a,null,i):(this._props||(this._props={}),this._props[a]=i,this.connectedCallback());var s=typeof i;i!=null&&s!=="string"&&s!=="boolean"&&s!=="number"||this.setAttribute(a,i)}})}),customElements.define(t||e.tagName||e.displayName||e.name,o)}function Bi(){const[e,t]=B(!1),n=async r=>{const o=await Wn({amount:r.amount,currency:r.currency,rechargeChannel:r.rechargeChannel});window.open(o,"_blank")};return d("div",{children:[d(ht,{onClick:()=>t(!0),children:_("充值/转账")}),d(ki,{visible:e,onClose:()=>t(!1),onSubmit:n})]})}qe(Bi,"best-recharge",["theme"],{shadow:!1});function Ri(){const e=E("size"),t={wrapper:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:e===l.SMALL?12:20,alignItems:"start",minWidth:880,"@media (max-width: 1020px)":{gridTemplateColumns:"1fr",gap:16,minWidth:"auto",width:"100%"}},fieldLabel:{fontSize:e===l.SMALL?12:13,marginBottom:6,fontWeight:500,textAlign:"left"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,outline:"none",border:"1px solid",boxSizing:"border-box",paddingRight:e===l.SMALL?48:64},inputError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",marginTop:6,fontSize:e===l.SMALL?12:13},inputWrapper:{position:"relative"},inputSuffix:{padding:"0 8px",fontSize:e===l.SMALL?12:13,opacity:.8},inputSuffixAbs:{position:"absolute",top:0,right:e===l.SMALL?10:12,height:"100%",display:"flex",alignItems:"center",color:"#999",pointerEvents:"none",fontSize:e===l.SMALL?12:13},blockTitle:{fontSize:e===l.SMALL?16:18,fontWeight:700,marginBottom:e===l.SMALL?12:16,textAlign:"left",display:"flex",alignItems:"center",gap:8},subTitle:{marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?8:10,fontWeight:600,textAlign:"left"},titleBar:{width:3,height:e===l.SMALL?16:20,background:"#1890ff",borderRadius:2},methodList:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,"@media (max-width: 600px)":{gridTemplateColumns:"1fr",gap:8}},bankList:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,"@media (max-width: 600px)":{gridTemplateColumns:"1fr",gap:8}}};return{white:{...t,left:{background:"#fff",borderRadius:8,padding:16,border:"1px solid #E5E6EB"},right:{background:"#fff",borderRadius:8,padding:16},currencyRow:{display:"flex",gap:10,flexWrap:"wrap","@media (max-width: 480px)":{gap:8}},currencyItem:n=>({padding:"6px 12px",borderRadius:6,border:`1px solid ${n?"#1890ff":"#E5E6EB"}`,color:n?"#1890ff":"#222",background:n?"#EEF7FF":"#fff",cursor:"pointer"}),input:{...t.input,border:"1px solid #E5E6EB",background:"#fff",color:"#222"},payButton:{width:"100%",marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?12:16,background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"8px 12px":"12px 16px",fontWeight:600,cursor:"pointer"},methodItem:n=>({padding:"10px 12px",textAlign:"left",borderRadius:8,border:`1px solid ${n?"#1890ff":"#F0F1F3"}`,background:n?"#EEF7FF":"#F7F8FA",cursor:"pointer"}),bankItem:{padding:"10px 12px",borderRadius:8,border:"1px solid #F0F1F3",background:"#F7F8FA",textAlign:"left"},noticeBox:{marginTop:e===l.SMALL?8:12,marginBottom:e===l.SMALL?12:16,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#FFF7E6",border:"1px solid #FFE7BA",color:"#AD6800",fontSize:e===l.SMALL?12:13},reminderTitle:{fontWeight:600,margin:"6px 0",textAlign:"left"},reminderList:{margin:0,paddingLeft:18,color:"#6b7280",lineHeight:1.6,textAlign:"left"}},dark:{...t,left:{background:"#181A20",borderRadius:8,padding:16,border:"1px solid #2B2E38"},right:{background:"#181A20",borderRadius:8,padding:16,border:"1px solid #2B2E38"},currencyRow:{display:"flex",gap:10,flexWrap:"wrap","@media (max-width: 480px)":{gap:8}},currencyItem:n=>({padding:"6px 12px",borderRadius:6,border:`1px solid ${n?"#00E8C6":"#374151"}`,color:n?"#00E8C6":"#fff",background:n?"#0F2824":"#23262F",cursor:"pointer"}),input:{...t.input,border:"1px solid #374151",background:"#23262F",color:"#fff"},payButton:{width:"100%",marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?12:16,background:"#00E8C6",color:"#111",border:"none",borderRadius:6,padding:e===l.SMALL?"8px 12px":"12px 16px",fontWeight:700,cursor:"pointer"},methodItem:n=>({padding:"10px 12px",textAlign:"left",borderRadius:8,border:`1px solid ${n?"#00E8C6":"#374151"}`,background:n?"#0F2824":"#23262F",color:"#fff",cursor:"pointer"}),bankItem:{padding:"10px 12px",borderRadius:8,border:"1px solid #374151",background:"#23262F",textAlign:"left",color:"#fff"},noticeBox:{marginTop:e===l.SMALL?8:12,marginBottom:e===l.SMALL?12:16,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#2A1F0F",border:"1px solid #5C3E12",color:"#F4E3C1",fontSize:e===l.SMALL?12:13},reminderTitle:{fontWeight:600,margin:"6px 0",textAlign:"left",color:"#fff"},reminderList:{margin:0,paddingLeft:18,color:"#B5B8BE",lineHeight:1.6,textAlign:"left"}}}}function Fi(){const e=E("theme"),t=E("themeConfig"),n=e===N.WHITE,r=Ri(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,payButton:{...o.payButton,background:a.color},currencyItem:i=>({...o.currencyItem(i),border:`1px solid ${i?a.color:n?"#E5E6EB":"#374151"}`,color:i?a.color:n?"#222":"#fff"}),methodItem:i=>({...o.methodItem(i),border:`1px solid ${i?a.color:n?"#F0F1F3":"#374151"}`})}}return o}function Ii(){const e=E("size"),t={left:{background:"#fff",borderRadius:8,padding:16,border:"1px solid #E5E6EB"},blockTitle:{fontSize:e===l.SMALL?16:18,fontWeight:700,marginBottom:e===l.SMALL?12:16,textAlign:"left",display:"flex",alignItems:"center",gap:8},titleBar:{width:3,height:e===l.SMALL?16:20,background:"#1890ff",borderRadius:2},fieldLabel:{fontSize:e===l.SMALL?14:16,marginBottom:6,fontWeight:500,textAlign:"left"},required:{color:"#ff4d4f",marginRight:4},currencyRow:{display:"flex",gap:10,flexWrap:"wrap","@media (max-width: 600px)":{gap:8}},currencyItem:n=>({padding:"6px 12px",borderRadius:6,border:`1px solid ${n?"#1890ff":"#E5E6EB"}`,color:n?"#1890ff":"#222",background:n?"#EEF7FF":"#fff",cursor:"pointer"}),inputWrapper:{position:"relative"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,outline:"none",border:"1px solid",boxSizing:"border-box",paddingRight:e===l.SMALL?48:64},inputError:{border:"1px solid #ff4d4f"},inputSuffixAbs:{position:"absolute",top:0,right:e===l.SMALL?10:12,height:"100%",display:"flex",alignItems:"center",color:"#999",pointerEvents:"none",fontSize:e===l.SMALL?12:13},bizRateBox:{marginTop:6,color:"#666",fontSize:e===l.SMALL?12:13,textAlign:"left",lineHeight:1.6},bizRateStrong:{color:"#111",fontWeight:600},subTitle:{fontSize:e===l.SMALL?12:14,marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?8:10,textAlign:"left"},methodList:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,"@media (max-width: 600px)":{gridTemplateColumns:"1fr",gap:8}},methodItem:n=>({padding:"12px 16px",textAlign:"left",borderRadius:10,border:`1px solid ${n?"#1890ff":"#F0F1F3"}`,background:n?"#EEF7FF":"#F7F8FA",cursor:"pointer",display:"flex",alignItems:"center",gap:8,minHeight:44}),channelIcon:{width:22,height:22,objectFit:"contain",marginRight:8,display:"inline-block"},bankList:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,"@media (max-width: 600px)":{gridTemplateColumns:"1fr",gap:8}},bankItem:n=>({padding:"12px 16px",borderRadius:10,border:`1px solid ${n?"#1890ff":"#F0F1F3"}`,background:n?"#EEF7FF":"#F7F8FA",textAlign:"left",cursor:"pointer",display:"flex",alignItems:"center",gap:8,minHeight:44}),error:{color:"#ff4d4f",marginTop:6,fontSize:e===l.SMALL?12:13}};return{white:{...t,input:{...t.input,border:"1px solid #E5E6EB",background:"#fff",color:"#222"}},dark:{...t,left:{background:"#181A20",borderRadius:8,padding:16,border:"1px solid #2B2E38"},titleBar:{...t.titleBar,background:"#00E8C6"},currencyItem:n=>({padding:"6px 12px",borderRadius:6,border:`1px solid ${n?"#00E8C6":"#374151"}`,color:n?"#00E8C6":"#fff",background:n?"#0F2824":"#23262F",cursor:"pointer"}),input:{...t.input,border:"1px solid #374151",background:"#23262F",color:"#fff"},methodItem:n=>({padding:"10px 12px",textAlign:"left",borderRadius:8,border:`1px solid ${n?"#00E8C6":"#374151"}`,background:n?"#0F2824":"#23262F",color:"#fff",cursor:"pointer"}),bankItem:n=>({padding:"10px 12px",borderRadius:8,border:`1px solid ${n?"#00E8C6":"#374151"}`,background:n?"#0F2824":"#23262F",textAlign:"left",color:"#fff",cursor:"pointer"})}}}function Di(){const e=E("theme"),t=E("themeConfig"),n=e===N.WHITE,r=Ii(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,titleBar:{...o.titleBar,background:a.color},currencyItem:i=>({...o.currencyItem(i),border:`1px solid ${i?a.color:n?"#E5E6EB":"#374151"}`,color:i?a.color:n?"#222":"#fff"}),methodItem:i=>({...o.methodItem(i),border:`1px solid ${i?a.color:n?"#F0F1F3":"#374151"}`}),bankItem:i=>({...o.bankItem(i),border:`1px solid ${i?a.color:n?"#F0F1F3":"#374151"}`})}}return o}function zi({onChannelChange:e,onAmountChange:t,onCurrencyChange:n,initialAmount:r="",initialCurrency:o="USD",initialPaymentType:a="online",amountError:i=""}){const s=Di(),c=JSON.parse(sessionStorage.getItem("all_dicts")||"{}")?.currency||[],[p,u]=B([]),[m,y]=B([]),[h,x]=B({currency:o,amount:r,onlineChannel:"",bankChannel:"",paymentType:a,amountError:""}),[b,S]=B(null),L=se(null),M=()=>{if(!h.amount||Number(h.amount)<=0){S(null);return}L.current&&clearTimeout(L.current),L.current=window.setTimeout(()=>{Jo({currency:h.currency,amount:h.amount}).then(w=>S(w)).catch(()=>S(null))},300)};q(()=>{qo({currency:h.currency}).then(w=>{const I=w.onlineChannel||[],J=w.offlineChannel||[];u(I),y(J);const $=I.length>0,Y=J?.[0]?.value||"",Se=I?.[0]?.value||"",de=$?a:"bank",k=de==="online"?Se:Y;x(v=>({...v,onlineChannel:Se,bankChannel:Y,paymentType:de})),k&&e(k,de)})},[h.currency]);function A(w){return w=w.replace(/[^\d.]/g,""),w=w.replace(/\.(?=.*\.)/g,""),w=w.replace(/^(\d+)(\.\d{0,2})?.*$/,"$1$2"),w=w.replace(/^0+(\d)/,"$1"),w.startsWith(".")&&(w="0"+w),w}const T=w=>{x(I=>({...I,currency:w})),n(w),M()},R=w=>{const I=A(w);x(J=>({...J,amount:I,amountError:""})),t(I),M()},P=(w,I)=>{x(J=>({...J,[I==="online"?"onlineChannel":"bankChannel"]:w,paymentType:I})),e(w,I),M()};return d("div",{style:s.left,children:[d("div",{style:s.blockTitle,children:[d("span",{style:s.titleBar}),_("选择支付方式")]}),d("div",{style:s.fieldLabel,children:_("支付币种")}),d("div",{style:s.currencyRow,children:(c||[]).slice(0,4).map(w=>d("button",{type:"button",onClick:()=>T(w.value),style:s.currencyItem(h.currency===w.value),children:w.label}))}),d("div",{style:{height:12}}),d("div",{style:s.fieldLabel,children:[d("span",{style:s.required,children:"*"}),_("支付金额")]}),d("div",{style:s.inputWrapper,children:[d("input",{type:"text",placeholder:_("请输入充值金额"),value:h.amount,onInput:w=>{R(w.target.value)},style:{...s.input,...i?s.inputError:{}}}),d("div",{style:s.inputSuffixAbs,children:h.currency})]}),i&&d("div",{style:s.error,children:i}),b&&b.consistent===!1&&d("div",{style:s.bizRateBox,children:[d("div",{children:_("您的支付币种与默认币种不一致,将转换为默认币种入账")}),d("div",{children:[_("目前汇率为:")," ",h.currency,_(`→${b.currency} = `),d("span",{style:s.bizRateStrong,children:b.exchangeRate})]}),d("div",{children:[_("钱包预计增加"),d("span",{style:s.bizRateStrong,children:[b.currency," ",b.amount]})]})]}),d("div",{style:{height:20}}),d("div",{style:s.fieldLabel,children:_("支付方式")}),p.length>0&&d("div",{children:[d("div",{style:s.subTitle,children:_("线上支付")}),d("div",{style:s.methodList,children:p.map(w=>d("button",{type:"button",onClick:()=>P(w.value,"online"),style:s.methodItem(h.onlineChannel===w.value&&h.paymentType==="online"),children:[w.icon&&d("img",{src:w.icon,alt:w.label,style:s.channelIcon}),w.label]}))})]}),d("div",{style:s.subTitle,children:_("银行转账")}),d("div",{style:s.bankList,children:m.map(w=>d("button",{type:"button",onClick:()=>P(w.value,"bank"),style:s.bankItem(h.bankChannel===w.value&&h.paymentType==="bank"),children:[w.icon&&d("img",{src:w.icon,alt:w.label,style:s.channelIcon}),w.label]}))})]})}function Oi(){const e=E("size"),t={right:{background:"#fff",borderRadius:8,padding:16},blockTitle:{fontSize:e===l.SMALL?16:18,fontWeight:700,marginBottom:e===l.SMALL?12:16,textAlign:"left",display:"flex",alignItems:"center",gap:8},titleBar:{width:3,height:e===l.SMALL?16:20,background:"#1890ff",borderRadius:2},inputWrapper:{position:"relative"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,outline:"none",border:"1px solid",boxSizing:"border-box",paddingRight:e===l.SMALL?48:64},inputError:{border:"1px solid #ff4d4f"},disabled:{backgroundColor:"#f5f5f5",color:"#999",cursor:"not-allowed"},disabledDark:{backgroundColor:"#1A1D23",color:"#6B7280",cursor:"not-allowed",border:"1px solid #374151"},inputSuffixAbs:{position:"absolute",top:0,right:e===l.SMALL?10:12,height:"100%",display:"flex",alignItems:"center",color:"#999",pointerEvents:"none",fontSize:e===l.SMALL?12:13},payButton:{width:"100%",marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?12:16,background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"8px 12px":"12px 16px",fontWeight:600,cursor:"pointer"},noticeBox:{marginTop:e===l.SMALL?8:12,marginBottom:e===l.SMALL?12:16,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#FFF7E6",border:"1px solid #FFE7BA",color:"#AD6800",fontSize:e===l.SMALL?12:13},calcBox:{marginTop:e===l.SMALL?8:12,marginBottom:e===l.SMALL?8:12,color:"#666",textAlign:"left",lineHeight:1.6,fontSize:e===l.SMALL?12:13},calcLine:{marginBottom:4},calcAmount:{color:"#ff4d4f",fontWeight:700,margin:"0 4px"},reminderTitle:{fontWeight:600,margin:"6px 0",textAlign:"left"},reminderList:{margin:0,paddingLeft:18,color:"#6b7280",lineHeight:1.6,textAlign:"left",listStyleType:"disc",listStylePosition:"outside"},listItem:{listStyleType:"disc",listStylePosition:"outside"},error:{color:"#ff4d4f",marginTop:6,fontSize:e===l.SMALL?12:13}};return{white:{...t,input:{...t.input,border:"1px solid #E5E6EB",background:"#fff",color:"#222"}},dark:{...t,right:{background:"#181A20",borderRadius:8,padding:16,border:"1px solid #2B2E38"},titleBar:{...t.titleBar,background:"#00E8C6"},input:{...t.input,border:"1px solid #374151",background:"#23262F",color:"#fff"},payButton:{...t.payButton,background:"#00E8C6",color:"#111",fontWeight:700},noticeBox:{...t.noticeBox,background:"#2A1F0F",border:"1px solid #5C3E12",color:"#F4E3C1"},reminderTitle:{...t.reminderTitle,color:"#fff"},reminderList:{...t.reminderList,color:"#B5B8BE"}}}}function Pi(){const e=E("theme"),t=E("themeConfig"),n=e===N.WHITE,r=Oi(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,payButton:{...o.payButton,background:a.color},titleBar:{...o.titleBar,background:a.color}}}return o}function Ni({onSubmit:e,amount:t,currency:n,channel:r,loading:o=!1,error:a="",onAmountError:i}){const s=Pi(),f=s.right.background==="#181A20",[c,p]=B({amount:t,currency:n,channel:r,loading:o,error:a,amountError:""}),[u,m]=B(null);q(()=>{p(x=>({...x,amount:t,currency:n,channel:r,loading:o,error:a}));const h=setTimeout(()=>{t&&r&&n?Hn({channel:r,amount:t,currency:n}).then(x=>m(x)).catch(()=>m(null)):m(null)},300);return()=>clearTimeout(h)},[t,n,r,o,a]);const y=async h=>{h&&h.preventDefault();let x=!0;if(t.trim()||(x=!1,i?.(_("请输入充值金额"))),r||(x=!1,p(b=>({...b,error:_("请选择支付平台")}))),!!x){p(b=>({...b,loading:!0,error:""}));try{await e({amount:t,currency:n,rechargeChannel:r})}finally{p(b=>({...b,loading:!1}))}}};return d("div",{style:s.right,children:[d("div",{style:s.blockTitle,children:[d("span",{style:s.titleBar}),_("在线支付")]}),d("form",{onSubmit:y,children:[d("div",{style:s.inputWrapper,children:[d("input",{type:"text",placeholder:_("支付金额"),value:c.amount,readOnly:!0,disabled:!0,style:{...s.input,...f?s.disabledDark:s.disabled,width:"100%"}}),d("div",{style:s.inputSuffixAbs,children:c.currency})]}),d("button",{type:"submit",disabled:c.loading,style:s.payButton,children:c.loading?_("提交中..."):_("立即支付")})]}),u&&d("div",{style:s.calcBox,children:[d("div",{style:s.calcLine,children:[_("预计支付金额约为:"),d("span",{style:s.calcAmount,children:`$${u.paymentAmount}`}),u.currency]}),d("div",{style:s.calcLine,children:[_("手续费约为:"),d("span",{style:s.calcAmount,children:`$${u.fee}`}),u.currency]}),d("div",{children:_("注:地区/币种/卡类型可能影响手续费,最终以平台为准。")})]}),d("div",{style:s.noticeBox,children:_("请在转账后提交银行回单,否则可能无法及时核验")}),d("div",{style:s.reminderTitle,children:_("温馨提示")}),d("ul",{style:s.reminderList,children:[d("li",{style:s.listItem,children:_("支付金额须与申请金额一致,请勿多付、少付或分批提交。")}),d("li",{style:s.listItem,children:_("请妥善保存回单并提供准确的支付时间,否则可能无法核验。")}),d("li",{style:s.listItem,children:_("工作时间提交4小时内审核,非工作时间将顺延至下一个工作日。")}),d("li",{style:s.listItem,children:_("如有问题,请联系平台客服。")}),d("li",{style:s.listItem,children:_("预付充值将收取平台服务费,具体以官方为准。")})]}),c.error&&d("div",{style:s.error,children:c.error})]})}function Ui(){const e=E("size"),t={container:{background:"#fff",borderRadius:8,padding:e===l.SMALL?14:16,width:"100%",maxWidth:"100%",boxSizing:"border-box","@media (max-width: 1020px)":{padding:e===l.SMALL?12:16}},header:{marginBottom:e===l.SMALL?16:20},backButton:{display:"flex",alignItems:"center",gap:8,background:"none",border:"none",color:"#1890ff",cursor:"pointer",fontSize:e===l.SMALL?13:14,fontWeight:500},backIcon:{fontSize:e===l.SMALL?16:18},uploadSection:{marginBottom:e===l.SMALL?18:24},uploadArea:{border:"2px dashed #D9D9D9",borderRadius:8,padding:e===l.SMALL?"30px 16px":"40px 20px",textAlign:"center",cursor:"pointer",background:"#FAFAFA",transition:"all 0.3s ease",width:"100%",boxSizing:"border-box","@media (max-width: 600px)":{padding:e===l.SMALL?"30px 15px":"40px 20px"}},uploadIcon:{fontSize:e===l.SMALL?40:52,marginBottom:e===l.SMALL?10:12},uploadTitle:{fontSize:e===l.SMALL?14:16,fontWeight:600,color:"#222",marginBottom:e===l.SMALL?6:10},uploadHint:{fontSize:e===l.SMALL?12:13,color:"#999"},hiddenInput:{display:"none"},fileList:{marginTop:e===l.SMALL?10:12},fileItem:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:e===l.SMALL?"6px 10px":"8px 12px",background:"#F5F5F5",borderRadius:6,marginBottom:6},fileName:{fontSize:e===l.SMALL?12:13,color:"#222"},removeButton:{background:"#ff4d4f",color:"#fff",border:"none",borderRadius:"50%",width:20,height:20,cursor:"pointer",fontSize:12,display:"flex",alignItems:"center",justifyContent:"center"},fieldSection:{marginBottom:e===l.SMALL?12:16},fieldLabel:{display:"block",fontSize:e===l.SMALL?13:14,fontWeight:500,color:"#222",marginBottom:e===l.SMALL?6:10},required:{color:"#ff4d4f",marginRight:4},inputWrapper:{position:"relative"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,border:"1px solid #D9D9D9",outline:"none",fontSize:14,boxSizing:"border-box"},inputError:{border:"1px solid #ff4d4f"},disabled:{backgroundColor:"#f5f5f5",color:"#999",cursor:"not-allowed"},disabledDark:{backgroundColor:"#1A1D23",color:"#6B7280",cursor:"not-allowed",border:"1px solid #374151"},calendarIcon:{position:"absolute",right:e===l.SMALL?8:10,top:"50%",transform:"translateY(-50%)",fontSize:e===l.SMALL?12:14,pointerEvents:"none"},currencySuffix:{position:"absolute",right:e===l.SMALL?10:12,top:"50%",transform:"translateY(-50%)",fontSize:e===l.SMALL?12:14,color:"#999",pointerEvents:"none"},buttonSection:{display:"flex",gap:e===l.SMALL?10:12,marginTop:e===l.SMALL?24:32,width:"100%",boxSizing:"border-box","@media (max-width: 600px)":{flexDirection:"column",gap:e===l.SMALL?8:12}},cancelButton:{flex:1,padding:e===l.SMALL?"8px 12px":"10px 16px",borderRadius:6,border:"1px solid #D9D9D9",background:"#fff",color:"#222",fontSize:e===l.SMALL?12:14,fontWeight:500,cursor:"pointer",minWidth:0,boxSizing:"border-box"},submitButton:{flex:1,padding:e===l.SMALL?"8px 12px":"10px 16px",borderRadius:6,border:"none",background:"#1890ff",color:"#fff",fontSize:e===l.SMALL?12:14,fontWeight:600,cursor:"pointer",minWidth:0,boxSizing:"border-box"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:6}};return{white:{...t},dark:{...t,container:{...t.container,background:"#181A20",border:"1px solid #2B2E38"},backButton:{...t.backButton,color:"#00E8C6"},uploadArea:{...t.uploadArea,border:"2px dashed #374151",background:"#23262F"},uploadTitle:{...t.uploadTitle,color:"#fff"},uploadHint:{...t.uploadHint,color:"#B5B8BE"},fileItem:{...t.fileItem,background:"#2B2E38"},fileName:{...t.fileName,color:"#fff"},fieldLabel:{...t.fieldLabel,color:"#fff"},input:{...t.input,border:"1px solid #374151",background:"#23262F",color:"#fff"},calendarIcon:{...t.calendarIcon,color:"#B5B8BE"},currencySuffix:{...t.currencySuffix,color:"#B5B8BE"},cancelButton:{...t.cancelButton,border:"1px solid #374151",background:"#23262F",color:"#fff"},submitButton:{...t.submitButton,background:"#00E8C6",color:"#111"}}}}function $i(){const e=E("theme"),t=E("themeConfig"),n=e===N.WHITE,r=Ui(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,backButton:{...o.backButton,color:a.color},submitButton:{...o.submitButton,background:a.color}}}return o}function Wi(){const e=E("theme"),t=E("themeConfig"),n={container:{position:"relative",display:"inline-block"},input:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 12px",border:"1px solid #d9d9d9",borderRadius:"6px",backgroundColor:"#fff",cursor:"pointer",transition:"all 0.3s",outline:"none",fontSize:"14px",lineHeight:"1.5715",color:"rgba(0, 0, 0, 0.85)"},inputText:{flex:1,textAlign:"left",color:"rgba(0, 0, 0, 0.85)"},calendarIcon:{fontSize:"16px",color:"rgba(0, 0, 0, 0.45)",marginLeft:"8px"},disabled:{backgroundColor:"#f5f5f5",color:"rgba(0, 0, 0, 0.25)",cursor:"not-allowed"},panel:{position:"absolute",top:"100%",left:0,zIndex:1050,backgroundColor:"#fff",border:"1px solid #d9d9d9",borderRadius:"6px",boxShadow:"0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05)",padding:"8px",minWidth:"280px",marginTop:"4px"},header:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 0",marginBottom:"8px"},navButton:{display:"flex",alignItems:"center",justifyContent:"center",width:"24px",height:"24px",border:"none",backgroundColor:"transparent",cursor:"pointer",borderRadius:"4px",fontSize:"16px",color:"rgba(0, 0, 0, 0.45)",transition:"all 0.3s"},monthYear:{fontSize:"16px",fontWeight:500,color:"rgba(0, 0, 0, 0.85)"},weekHeader:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:"4px",marginBottom:"8px"},weekDay:{display:"flex",alignItems:"center",justifyContent:"center",height:"32px",fontSize:"14px",fontWeight:500,color:"rgba(0, 0, 0, 0.85)"},calendarGrid:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:"4px"},dayButton:{display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",border:"none",backgroundColor:"transparent",cursor:"pointer",borderRadius:"4px",fontSize:"14px",transition:"all 0.3s",color:"rgba(0, 0, 0, 0.85)"},dayCurrentMonth:{color:"rgba(0, 0, 0, 0.85)"},dayOtherMonth:{color:"rgba(0, 0, 0, 0.25)"},dayToday:{fontWeight:600,color:"#1890ff"},daySelected:{backgroundColor:"#1890ff",color:"#fff"},yearPicker:{maxHeight:"200px",overflowY:"auto",marginBottom:"8px",border:"1px solid #f0f0f0",borderRadius:"4px",padding:"8px"},yearGrid:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"4px"},yearButton:{display:"flex",alignItems:"center",justifyContent:"center",padding:"6px 8px",border:"none",backgroundColor:"transparent",cursor:"pointer",borderRadius:"4px",fontSize:"14px",transition:"all 0.3s",color:"rgba(0, 0, 0, 0.85)"},yearSelected:{backgroundColor:"#1890ff",color:"#fff"},small:{padding:"4px 8px",fontSize:"12px"},middle:{padding:"8px 12px",fontSize:"14px"},large:{padding:"12px 16px",fontSize:"16px"}},r={white:{...n,input:{...n.input,border:"1px solid #d9d9d9",backgroundColor:"#fff",color:"rgba(0, 0, 0, 0.85)"},inputText:{...n.inputText,color:"rgba(0, 0, 0, 0.85)"},calendarIcon:{...n.calendarIcon,color:"rgba(0, 0, 0, 0.45)"},disabled:{...n.disabled,backgroundColor:"#f5f5f5",color:"rgba(0, 0, 0, 0.25)"},panel:{...n.panel,backgroundColor:"#fff",border:"1px solid #d9d9d9"},navButton:{...n.navButton,color:"rgba(0, 0, 0, 0.45)"},monthYear:{...n.monthYear,color:"rgba(0, 0, 0, 0.85)"},weekDay:{...n.weekDay,color:"rgba(0, 0, 0, 0.85)"},dayButton:{...n.dayButton,color:"rgba(0, 0, 0, 0.85)"},dayCurrentMonth:{...n.dayCurrentMonth,color:"rgba(0, 0, 0, 0.85)"},dayOtherMonth:{...n.dayOtherMonth,color:"rgba(0, 0, 0, 0.25)"},dayToday:{...n.dayToday,color:"#1890ff"},daySelected:{...n.daySelected,backgroundColor:"#1890ff",color:"#fff"},yearPicker:{...n.yearPicker,border:"1px solid #f0f0f0"},yearButton:{...n.yearButton,color:"rgba(0, 0, 0, 0.85)"},yearSelected:{...n.yearSelected,backgroundColor:"#1890ff",color:"#fff"}},dark:{...n,input:{...n.input,border:"1px solid #434343",backgroundColor:"#141414",color:"rgba(255, 255, 255, 0.85)"},inputText:{...n.inputText,color:"rgba(255, 255, 255, 0.85)"},calendarIcon:{...n.calendarIcon,color:"rgba(255, 255, 255, 0.45)"},disabled:{...n.disabled,backgroundColor:"#262626",color:"rgba(255, 255, 255, 0.25)"},panel:{...n.panel,backgroundColor:"#141414",border:"1px solid #434343"},navButton:{...n.navButton,color:"rgba(255, 255, 255, 0.45)"},monthYear:{...n.monthYear,color:"rgba(255, 255, 255, 0.85)"},weekDay:{...n.weekDay,color:"rgba(255, 255, 255, 0.85)"},dayButton:{...n.dayButton,color:"rgba(255, 255, 255, 0.85)"},dayCurrentMonth:{...n.dayCurrentMonth,color:"rgba(255, 255, 255, 0.85)"},dayOtherMonth:{...n.dayOtherMonth,color:"rgba(255, 255, 255, 0.25)"},dayToday:{...n.dayToday,color:"#00E8C6"},daySelected:{...n.daySelected,backgroundColor:"#00E8C6",color:"#111"},yearPicker:{...n.yearPicker,border:"1px solid #434343"},yearButton:{...n.yearButton,color:"rgba(255, 255, 255, 0.85)"},yearSelected:{...n.yearSelected,backgroundColor:"#00E8C6",color:"#111"}}},o=r[e]||r.white,a=t?.[e]?.color;return a&&(o.dayToday.color=a,o.daySelected.backgroundColor=a,o.yearSelected.backgroundColor=a,e==="dark"&&(o.daySelected.color="#111",o.yearSelected.color="#111")),o}function Hi(){return Wi()}function ji({value:e="",placeholder:t=_("请选择日期"),disabled:n=!1,size:r="middle",onChange:o,onFocus:a,onBlur:i,className:s="",style:f={}}){const c=Hi(),[p,u]=B(!1),[m,y]=B(e),[h,x]=B(new Date),[b,S]=B(!1),L=se(null),M=k=>{if(!k)return"";const v=new Date(k);return`${v.getFullYear()}-${String(v.getMonth()+1).padStart(2,"0")}-${String(v.getDate()).padStart(2,"0")}`},A=(k,v)=>new Date(k,v+1,0).getDate(),T=(k,v)=>new Date(k,v,1).getDay(),R=()=>{const k=h.getFullYear(),v=h.getMonth(),ue=A(k,v),Gn=T(k,v),fe=[],gt=v===0?11:v-1,bt=v===0?k-1:k,yt=A(bt,gt);for(let W=Gn-1;W>=0;W--)fe.push({date:yt-W,isCurrentMonth:!1,isToday:!1,isSelected:!1,fullDate:`${bt}-${String(gt+1).padStart(2,"0")}-${String(yt-W).padStart(2,"0")}`});const Kn=new Date,xt=m?new Date(m):null;for(let W=1;W<=ue;W++){const _t=`${k}-${String(v+1).padStart(2,"0")}-${String(W).padStart(2,"0")}`,St=new Date(_t);fe.push({date:W,isCurrentMonth:!0,isToday:St.toDateString()===Kn.toDateString(),isSelected:xt&&St.toDateString()===xt.toDateString(),fullDate:_t})}const Xn=v===11?0:v+1,Zn=v===11?k+1:k,Qn=42-fe.length;for(let W=1;W<=Qn;W++)fe.push({date:W,isCurrentMonth:!1,isToday:!1,isSelected:!1,fullDate:`${Zn}-${String(Xn+1).padStart(2,"0")}-${String(W).padStart(2,"0")}`});return fe},P=k=>{y(k),u(!1),o?.(k)},w=k=>{const v=new Date(h);k==="prev"?v.setMonth(v.getMonth()-1):v.setMonth(v.getMonth()+1),x(v)},I=k=>{const v=new Date(h);k==="prev"?v.setFullYear(v.getFullYear()-1):v.setFullYear(v.getFullYear()+1),x(v)},J=k=>{const v=new Date(h);v.setFullYear(k),x(v),S(!1)},$=()=>{const k=new Date().getFullYear(),v=[];for(let ue=k-50;ue<=k+50;ue++)v.push(ue);return v};q(()=>{const k=v=>{L.current&&!L.current.contains(v.target)&&u(!1)};if(p)return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[p]);const Y=R(),Se=[_("一月"),_("二月"),_("三月"),_("四月"),_("五月"),_("六月"),_("七月"),_("八月"),_("九月"),_("十月"),_("十一月"),_("十二月")],de=[_("日"),_("一"),_("二"),_("三"),_("四"),_("五"),_("六")];return d("div",{ref:L,className:`date-picker-container ${s}`,style:{...c.container,...f},children:[d("div",{style:{...c.input,...c[r],...n?c.disabled:{}},onClick:()=>!n&&u(!p),onFocus:a,onBlur:i,children:[d("span",{style:c.inputText,children:m?M(m):t}),d("span",{style:c.calendarIcon,children:"📅"})]}),p&&d("div",{style:c.panel,children:[d("div",{style:c.header,children:[d("button",{type:"button",style:c.navButton,onClick:()=>I("prev"),children:"‹‹"}),d("button",{type:"button",style:c.navButton,onClick:()=>w("prev"),children:"‹"}),d("span",{style:c.monthYear,onClick:()=>S(!b),children:[h.getFullYear(),"年",Se[h.getMonth()]]}),d("button",{type:"button",style:c.navButton,onClick:()=>w("next"),children:"›"}),d("button",{type:"button",style:c.navButton,onClick:()=>I("next"),children:"››"})]}),b&&d("div",{style:c.yearPicker,children:d("div",{style:c.yearGrid,children:$().map(k=>d("button",{type:"button",style:{...c.yearButton,...k===h.getFullYear()?c.yearSelected:{}},onClick:()=>J(k),children:k},k))})}),d("div",{style:c.weekHeader,children:de.map(k=>d("div",{style:c.weekDay,children:k},k))}),d("div",{style:c.calendarGrid,children:Y.map((k,v)=>d("button",{type:"button",style:{...c.dayButton,...k.isCurrentMonth?c.dayCurrentMonth:c.dayOtherMonth,...k.isToday?c.dayToday:{},...k.isSelected?c.daySelected:{}},onClick:()=>P(k.fullDate),disabled:n,children:k.date},v))})]})]})}function qi({onBack:e,onCancel:t,currency:n="USD",amount:r="",channel:o="",onAmountError:a}){const i=$i(),s=i.container.background==="#181A20",[f,c]=B({urls:[],transferTime:"",transferAmount:r,transactionId:"",payerName:"",filesError:"",timeError:"",amountError:"",transactionIdError:"",payerNameError:""});q(()=>{c(u=>({...u,transferAmount:r}))},[r]);const p=async()=>{let u=!0;if(f.urls.length===0&&(u=!1,c(m=>({...m,filesError:_("请上传银行转账回单")}))),f.transferTime||(u=!1,c(m=>({...m,timeError:_("请选择转账时间")}))),r.trim()||(u=!1,a?.(_("请输入充值金额"))),f.transactionId.trim()||(u=!1,c(m=>({...m,transactionIdError:_("请输入转账交易ID")}))),f.payerName.trim()||(u=!1,c(m=>({...m,payerNameError:_("请输入付款人名称")}))),!!u)try{await $n({transferDate:f.transferTime,transferNo:f.transactionId,transferChannel:o,voucherUrls:f.urls,payerName:f.payerName}),Ie.success(_("提交成功")),t()}finally{c(m=>({...m,loading:!1}))}};return d("div",{style:i.container,children:[d("div",{style:i.header,children:d("button",{type:"button",onClick:e,style:i.backButton,children:[d("span",{style:i.backIcon,children:"←"}),_("返回账户信息")]})}),d("div",{style:i.uploadSection,children:[d(Jn,{value:f.urls,onChange:u=>{c(m=>({...m,urls:u,filesError:""}))},maxCount:10,accept:"image/*,.pdf",multiple:!0}),f.filesError&&d("div",{style:i.error,children:f.filesError})]}),d("div",{style:i.fieldSection,children:[d("label",{style:i.fieldLabel,children:[d("span",{style:i.required,children:"*"}),_("转账时间")]}),d(ji,{value:f.transferTime,placeholder:_("请选择转账时间"),onChange:u=>{c(m=>({...m,transferTime:u,timeError:""}))},style:{width:"100%"}}),f.timeError&&d("div",{style:i.error,children:f.timeError})]}),d("div",{style:i.fieldSection,children:[d("label",{style:i.fieldLabel,children:_("转账金额")}),d("div",{style:i.inputWrapper,children:[d("input",{type:"text",placeholder:_("请输入实际转账金额"),value:f.transferAmount,readOnly:!0,disabled:!0,style:{...i.input,...s?i.disabledDark:i.disabled}}),d("span",{style:i.currencySuffix,children:n})]})]}),d("div",{style:i.fieldSection,children:[d("label",{style:i.fieldLabel,children:[d("span",{style:i.required,children:"*"}),_("交易ID")]}),d("input",{type:"text",placeholder:_("请输入转账交易ID"),value:f.transactionId,onChange:u=>{c(m=>({...m,transactionId:u.target.value,transactionIdError:""}))},style:{...i.input,...f.transactionIdError?i.inputError:{}}}),f.transactionIdError&&d("div",{style:i.error,children:f.transactionIdError})]}),d("div",{style:i.fieldSection,children:[d("label",{style:i.fieldLabel,children:[d("span",{style:i.required,children:"*"}),_("付款人名称")]}),d("input",{type:"text",placeholder:_("请输入付款人名称"),value:f.payerName,onChange:u=>{c(m=>({...m,payerName:u.target.value,payerNameError:""}))},style:{...i.input,...f.payerNameError?i.inputError:{}}}),f.payerNameError&&d("div",{style:i.error,children:f.payerNameError})]}),d("div",{style:i.buttonSection,children:[d("button",{type:"button",onClick:t,style:i.cancelButton,children:_("取消")}),d("button",{type:"button",onClick:p,style:i.submitButton,children:_("提交审核")})]})]})}function Ji(){const e=E("size"),t={container:{background:"#fff",borderRadius:8,padding:e===l.SMALL?16:20,width:"100%",maxWidth:"100%",boxSizing:"border-box","@media (max-width: 1020px)":{maxWidth:"100%",margin:0,padding:e===l.SMALL?12:16},"@media (min-width: 1021px)":{maxWidth:600,margin:"0 auto"}},header:{fontSize:e===l.SMALL?16:18,fontWeight:700,marginBottom:e===l.SMALL?16:20,textAlign:"left",display:"flex",alignItems:"center",gap:8},titleBar:{width:3,height:e===l.SMALL?16:20,background:"#1890ff",borderRadius:2},bankDetails:{marginBottom:e===l.SMALL?20:24},detailCard:{marginTop:12,marginBottom:12,border:"1px solid #f0f0f0",borderRadius:8,background:"#fafafa",overflow:"hidden"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:e===l.SMALL?"8px 0":"10px 0",borderBottom:"1px solid #f0f0f0",width:"100%",boxSizing:"border-box","@media (max-width: 600px)":{flexDirection:"column",alignItems:"flex-start",gap:4}},label:{fontSize:e===l.SMALL?13:14,color:"#666",fontWeight:500,minWidth:120,"@media (max-width: 600px)":{minWidth:"auto",marginBottom:2}},value:{fontSize:e===l.SMALL?13:14,color:"#222",fontWeight:500,textAlign:"right",flex:1,"@media (max-width: 600px)":{textAlign:"left",flex:"none",width:"100%"}},valueWithCopy:{display:"flex",alignItems:"center",gap:8,flex:1,justifyContent:"flex-end",minWidth:0,"@media (max-width: 600px)":{flex:"none",width:"100%",justifyContent:"flex-start"}},row:{display:"flex",alignItems:"center",padding:"10px 12px",borderBottom:"1px solid #ededed"},rowLast:{borderBottom:"none"},rowAlt:{background:"#fafafa"},labelMuted:{fontSize:e===l.SMALL?13:14,color:"#8c8c8c",fontWeight:500,flex:.4},valueStrong:{fontSize:e===l.SMALL?13:14,color:"#111",textAlign:"right",flex:.6,wordBreak:"break-all"},copyButton:{padding:e===l.SMALL?"4px 8px":"6px 12px",fontSize:e===l.SMALL?11:12,background:"#1890ff",color:"#fff",border:"none",borderRadius:4,cursor:"pointer",fontWeight:500,flexShrink:0,whiteSpace:"nowrap"},confirmButton:{width:"100%",marginBottom:e===l.SMALL?16:20,background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"10px 12px":"12px 16px",fontWeight:600,cursor:"pointer",fontSize:e===l.SMALL?13:14},noticeBox:{marginBottom:e===l.SMALL?16:20,padding:e===l.SMALL?"10px 12px":"12px 16px",borderRadius:6,background:"#FFF7E6",border:"1px solid #FFE7BA",color:"#AD6800",fontSize:e===l.SMALL?12:13,lineHeight:1.5},reminderTitle:{fontWeight:600,marginBottom:e===l.SMALL?8:12,textAlign:"left",fontSize:e===l.SMALL?14:16},reminderList:{margin:0,paddingLeft:18,color:"#666",lineHeight:1.6,textAlign:"left",fontSize:e===l.SMALL?12:13},link:{color:"#1890ff",textDecoration:"none",fontWeight:500}};return{white:{...t},dark:{...t,container:{...t.container,background:"#181A20",border:"1px solid #2B2E38"},titleBar:{...t.titleBar,background:"#00E8C6"},label:{...t.label,color:"#B5B8BE"},value:{...t.value,color:"#fff"},copyButton:{...t.copyButton,background:"#00E8C6",color:"#111"},confirmButton:{...t.confirmButton,background:"#00E8C6",color:"#111"},noticeBox:{...t.noticeBox,background:"#2A1F0F",border:"1px solid #5C3E12",color:"#F4E3C1"},reminderTitle:{...t.reminderTitle,color:"#fff"},reminderList:{...t.reminderList,color:"#B5B8BE"},link:{...t.link,color:"#00E8C6"}}}}function Vi(){const e=E("theme"),t=E("themeConfig"),n=e===N.WHITE,r=Ji(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,titleBar:{...o.titleBar,background:a.color},copyButton:{...o.copyButton,background:a.color},confirmButton:{...o.confirmButton,background:a.color},link:{...o.link,color:a.color}}}return o}function Yi({onConfirm:e,channelCode:t}){const n=Vi(),[r,o]=B([]);return q(()=>{if(!t)return;let a=!0;return jn({code:t}).then(i=>{if(a){if(Array.isArray(i)){o(i.map(s=>String(s)));return}if(i&&typeof i=="object"){const s=[];Object.keys(i).forEach(f=>{const c=i[f];s.push(`${f}: ${c}`)}),o(s);return}o(i?[String(i)]:[])}}).catch(()=>o([])),()=>{a=!1}},[t]),d("div",{style:n.container,children:[d("div",{style:n.header,children:[d("span",{style:n.titleBar}),_("银行转账")]}),r.length>0&&d("div",{style:n.detailCard,children:r.map((a,i)=>{const s=String(a).split(":"),f=s.shift()?.trim()||"",c=s.join(":").trim();return d("div",{style:{...n.row,...i===r.length-1?n.rowLast:{},...i%2===1?n.rowAlt:{}},children:[d("div",{style:n.labelMuted,children:f}),d("div",{style:n.valueStrong,children:c||"-"})]},i)})}),d("button",{type:"button",onClick:e,style:n.confirmButton,children:_("确认转账详情")}),d("div",{style:n.noticeBox,children:_("转账后提交银行回单提示")}),d("div",{style:n.reminderTitle,children:_("温馨提示")}),d("ul",{style:n.reminderList,children:[d("li",{children:_("支付金额匹配提醒")}),d("li",{children:_("保存交易回单提醒")}),d("li",{children:_("查看余额提醒")}),d("li",{children:_("联系客服提醒")}),d("li",{children:_("P卡转账延迟提醒")}),d("li",{children:[_("平台服务费说明")," ",d("a",{href:"#",style:n.link,children:_("费用政策")})," ",_("详情")]})]})]})}function Gi({visible:e,onClose:t,onSubmit:n}){const r=Fi(),[o,a]=B(!1),[i,s]=B({currency:"USD",amount:"",channel:"",paymentType:"online",loading:!1,error:"",amountError:"",channelError:"",showOfflineUpload:!1});q(()=>{const x=()=>{a(window.innerWidth<=1020)};return x(),window.addEventListener("resize",x),()=>window.removeEventListener("resize",x)},[]),q(()=>{e||s({currency:"USD",amount:"",channel:"",paymentType:"online",loading:!1,error:"",amountError:"",channelError:"",showOfflineUpload:!1})},[e]);const f=(x,b)=>{s(S=>({...S,channel:x,paymentType:b,channelError:""}))},c=x=>{s(b=>({...b,amount:x,amountError:""}))},p=x=>{s(b=>({...b,amountError:x}))},u=x=>{s(b=>({...b,currency:x}))},m=async x=>{s(b=>({...b,loading:!0,error:""}));try{await n(x),t()}catch{s(b=>({...b,error:_("提交失败,请重试")}))}finally{s(b=>({...b,loading:!1}))}},y=()=>{console.log("用户确认银行转账详情"),s(x=>({...x,showOfflineUpload:!0}))},h=()=>{s(x=>({...x,showOfflineUpload:!1}))};return d(Vn,{visible:e,onClose:t,title:_("充值/转账"),width:o?"95%":960,maxWidth:o?"95%":1e3,children:d("div",{style:{...r.wrapper,...o?{gridTemplateColumns:"1fr",gap:16,minWidth:"auto"}:{}},children:[d(zi,{onChannelChange:f,onAmountChange:c,onCurrencyChange:u,initialAmount:i.amount,initialCurrency:i.currency,initialPaymentType:i.paymentType,amountError:i.amountError}),i.paymentType==="online"?d(Ni,{onSubmit:m,amount:i.amount,currency:i.currency,channel:i.channel,loading:i.loading,error:i.error,onAmountError:p}):i.showOfflineUpload?d(qi,{onBack:h,onCancel:t,currency:i.currency,amount:i.amount,channel:i.channel,onAmountError:p}):d(Yi,{onConfirm:y,channelCode:i.channel})]})})}function Ki(){const[e,t]=B(!1),n=async r=>{const o=await Wn({amount:r.amount,currency:r.currency,rechargeChannel:r.rechargeChannel});window.open(o,"_blank")};return d("div",{children:[d(ht,{onClick:()=>t(!0),children:_("充值/转账")}),d(Gi,{visible:e,onClose:()=>t(!1),onSubmit:n})]})}qe(Ki,"best-payment",["theme"],{shadow:!1});const Kt={white:{popover:{background:"#fff",color:"#222",boxShadow:"0 4px 16px rgba(0,0,0,0.12)",border:"none"},arrow:{top:"#fff",bottom:"#fff",left:"#fff",right:"#fff"}},dark:{popover:{background:"#23262F",color:"#fff",boxShadow:"0 4px 16px rgba(0,0,0,0.32)",border:"1px solid #444C5C"},arrow:{top:"#23262F",bottom:"#23262F",left:"#23262F",right:"#23262F"}}};function Xi(){return E("theme")===N.WHITE?Kt.white:Kt.dark}const Zi=({popover:e,children:t,popoverWidth:n,popoverMinWidth:r,offsetY:o,offsetX:a,popoverPosition:i="top"})=>{const s=E("size"),f=n??(s===l.SMALL?200:300),c=r??(s===l.SMALL?150:200),p=o??(s===l.SMALL?8:16),u=a??(s===l.SMALL?8:16),[m,y]=B(!1),[h,x]=B(i),b=se(null),S=se(null),L=Xi(),M=()=>{if(S.current&&(clearTimeout(S.current),S.current=null),i==="top"||i==="bottom")if(b.current){const P=b.current.getBoundingClientRect();i==="top"&&P.top<100?x("bottom"):i==="bottom"&&window.innerHeight-P.bottom<100?x("top"):x(i)}else x(i);else x(i);y(!0)},A=()=>{S.current=window.setTimeout(()=>{y(!1)},120)};let T={position:"absolute",zIndex:999,borderRadius:6,fontSize:s===l.SMALL?12:15,minWidth:c,width:f,padding:s===l.SMALL?"6px 12px":"8px 14px",pointerEvents:"auto",textAlign:"center",animation:"fadeInUp 0.3s",...L.popover},R={position:"absolute",zIndex:11,width:0,height:0};return h==="top"?(T={...T,left:"50%",top:-48,transform:"translateX(-50%)"},R={...R,left:"50%",bottom:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderTop:`8px solid ${L.arrow.top}`}):h==="bottom"?(T={...T,left:"50%",top:"100%",marginTop:p,transform:"translateX(-50%)"},R={...R,left:"50%",top:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderBottom:`8px solid ${L.arrow.bottom}`}):h==="leftTop"?(T={...T,right:"100%",top:0,marginRight:u,transform:"none"},R={...R,right:-8,top:s===l.SMALL?8:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderLeft:`8px solid ${L.arrow.left}`}):h==="rightTop"&&(T={...T,left:"100%",top:0,marginLeft:u,transform:"translateY(0)"},R={...R,left:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderRight:`8px solid ${L.arrow.right}`}),d("div",{ref:b,style:{position:"relative",display:"inline-block"},onMouseEnter:M,onMouseLeave:A,children:[t,m&&d("div",{style:T,onMouseEnter:M,onMouseLeave:A,children:[e,d("div",{style:R})]})]})};function Qi(){const e=E("size");return{white:{popoverTitle:{fontSize:e===l.SMALL?12:16,fontWeight:600,color:"#222",marginBottom:e===l.SMALL?12:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:e===l.SMALL?"6px 0":"8px 0",borderBottom:"1px solid #e5e7eb",fontSize:e===l.SMALL?12:15},detailLabel:{display:"flex",alignItems:"center",color:"#6b7280",fontWeight:500},detailDot:t=>({display:"inline-block",width:e===l.SMALL?6:8,height:e===l.SMALL?6:8,borderRadius:"50%",background:t,marginRight:e===l.SMALL?6:8}),detailValue:t=>({color:t,fontWeight:600,fontSize:e===l.SMALL?12:15}),main:{fontSize:e===l.SMALL?18:24,fontWeight:800,color:"#111827",display:"inline-block"},currency:{fontSize:e===l.SMALL?16:18,color:"#6b7280",marginLeft:e===l.SMALL?6:8,fontWeight:600}},dark:{popoverTitle:{fontSize:e===l.SMALL?14:16,fontWeight:600,color:"#fff",marginBottom:e===l.SMALL?14:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:e===l.SMALL?"6px 0":"8px 0",borderBottom:"1px solid #374151",fontSize:e===l.SMALL?12:15},detailLabel:{display:"flex",alignItems:"center",color:"#B5B8BE",fontWeight:500},detailDot:t=>({display:"inline-block",width:e===l.SMALL?6:8,height:e===l.SMALL?6:8,borderRadius:"50%",background:t,marginRight:e===l.SMALL?6:8}),detailValue:t=>({color:t,fontWeight:600,fontSize:e===l.SMALL?12:15}),main:{fontSize:e===l.SMALL?18:24,fontWeight:800,color:"#fff",display:"inline-block"},currency:{fontSize:e===l.SMALL?16:18,color:"#B5B8BE",marginLeft:e===l.SMALL?6:8,fontWeight:600}}}}function ea(){const t=E("theme")===N.WHITE,n=Qi();return t?n.white:n.dark}function Xt(e){return e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}function ta(e){const[t,n]=B({currBalance:0,currency:"USD",details:[]}),r=async()=>{try{const i=await Un(),s=[{label:"",value:i.totalAmount,color:"#15b36b",dot:"#15b36b"},{label:"",value:i.frozenAmount,color:"#f59e0b",dot:"#f59e0b"},...i.isCredit?[{label:"",value:i.creditLimit,color:"#1890ff",dot:"#1890ff"},{label:"",value:i.creditUsed,color:"#ff0000",dot:"#ff0000"}]:[],{label:"",value:i.availableAmount,color:"#1890ff",dot:"#15b36b"}],f={currBalance:i.currBalance,currency:"USD",symbol:"$",details:s};n(f)}catch(i){console.error("获取余额失败:",i)}};q(()=>{r()},[]),q(()=>{const i=()=>{r()};return window.addEventListener("refresh-balance",i),()=>{window.removeEventListener("refresh-balance",i)}},[]);const o=ea(),a=[{label:_("真实金额"),value:t.details[0]?.value||0,color:"#15b36b",dot:"#15b36b"},{label:_("冻结金额"),value:t.details[1]?.value||0,color:"#f59e0b",dot:"#f59e0b"},...t.details.length>4?[{label:_("信用额度"),value:t.details[2]?.value||0,color:"#1890ff",dot:"#1890ff"},{label:_("已用额度"),value:t.details[3]?.value||0,color:"#ff0000",dot:"#ff0000"}]:[],{label:_("可用余额"),value:t.details[4]?.value||0,color:"#1890ff",dot:"#15b36b"}];return d(Zi,{popover:d(ne,{children:[d("div",{style:o.popoverTitle,children:_("余额详情")}),a.map(i=>d("div",{style:o.detailRow,children:[d("span",{style:o.detailLabel,children:[d("span",{style:o.detailDot(i.dot)}),i.label]}),d("span",{style:o.detailValue(i.color),children:Xt(i.value)})]},i.label))]}),popoverPosition:e.popoverPosition||"bottom",children:d("div",{style:o.main,children:[Xt(t.currBalance),d("span",{style:o.currency,children:t.currency})]})})}qe(ta,"best-statistical-balance");const we={white:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,cursor:"pointer",fontWeight:600,transition:"all 0.2s ease"},dark:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,cursor:"pointer",fontWeight:600,transition:"all 0.2s ease"}};function na(e){return E("theme")===N.WHITE?{...we.white,background:e||we.white.background}:{...we.dark,background:e||we.dark.background}}function ra(e){switch(e){case"small":return{fontSize:"12px",gap:"2px"};case"large":return{fontSize:"18px",gap:"6px"};default:return{fontSize:"14px",gap:"4px"}}}function oa({color:e,size:t="medium",children:n}){const[r,o]=B(!1),a=na(e),i=ra(t),s={...a,...i,display:"flex",alignItems:"center"};return d(ne,{children:[d("style",{children:`
|
|
79
79
|
@keyframes spin {
|
|
80
80
|
from {
|
|
81
81
|
transform: rotate(0deg);
|
|
@@ -94,4 +94,4 @@
|
|
|
94
94
|
:host {
|
|
95
95
|
display: inline-block;
|
|
96
96
|
}
|
|
97
|
-
`}),d(
|
|
97
|
+
`}),d(ht,{onClick:async()=>{o(!0);try{qn(),await new Promise(p=>setTimeout(p,300))}finally{o(!1)}},color:e,children:d("div",{style:s,children:[d("svg",{className:"refresh-icon",width:t==="small"?"14":t==="large"?"24":"18",height:t==="small"?"14":t==="large"?"24":"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{animation:r?"spin 0.6s linear infinite":"none",transition:"all 0.2s ease"},children:[d("path",{d:"M21 2v6h-6"}),d("path",{d:"M3 12a9 9 0 0 1 15-6.7L21 8"}),d("path",{d:"M3 22v-6h6"}),d("path",{d:"M21 12a9 9 0 0 1-15 6.7L3 16"})]}),n&&d("span",{children:n})]})})]})}qe(oa,"best-refresh-button",[],{shadow:!0});const ia=["best-recharge","best-payment","best-statistical-balance","best-refresh-button"];exports.components=ia;exports.getBalanceData=Vo;exports.initFundUnit=Yo;exports.npmTest=Xo;exports.printCurrentTime=Zo;exports.refreshBalance=qn;exports.viteProxy=Qo;
|