best-unit 0.0.35 → 0.0.36
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 +1 -1
- package/dist/best-unit.js +5 -7
- package/dist/types/global.d.ts +0 -1
- package/package.json +1 -1
- package/src/demo/App.tsx +0 -1
- package/src/types/global.d.ts +0 -1
- package/src/utils/business/index.ts +1 -4
package/dist/best-unit.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function _n(){console.log("npm package test!!!")}function mn(){console.log("Current time:",new Date().toISOString())}function bn(e){const{merchant_id:t,biz_type:n,theme:r,user_id:o,locale:i="zh"}=e,s="Bearer "+e.token;return sessionStorage.setItem("fund_unit_params",JSON.stringify({merchantId:t,bizType:n,userId:o,token:s,theme:r,locale:i})),{token:s,merchantId:t,bizType:n,theme:r,userId:o,locale:i}}const gn={"/api":{target:"https://fund.bestfulfill.tech/api/sdk",changeOrigin:!0,rewrite:e=>e.replace(/^\/api/,""),secure:!1}};var re,S,St,M,Xe,vt,Rt,Ct,He,Fe,Pe,ee={},Tt=[],yn=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,me=Array.isArray;function I(e,t){for(var n in t)e[n]=t[n];return e}function Me(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function J(e,t,n){var r,o,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?re.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return Y(e,s,r,o,null)}function Y(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++St,__i:-1,__u:0};return o==null&&S.vnode!=null&&S.vnode(i),i}function G(e){return e.children}function ae(e,t){this.props=e,this.context=t}function V(e,t){if(t==null)return e.__?V(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"?V(e):null}function kt(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 kt(e)}}function Ze(e){(!e.__d&&(e.__d=!0)&&M.push(e)&&!de.__r++||Xe!=S.debounceRendering)&&((Xe=S.debounceRendering)||vt)(de)}function de(){for(var e,t,n,r,o,i,s,a=1;M.length;)M.length>a&&M.sort(Rt),e=M.shift(),a=M.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,i=[],s=[],t.__P&&((n=I({},r)).__v=r.__v+1,S.vnode&&S.vnode(n),$e(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,i,o??V(r),!!(32&r.__u),s),n.__v=r.__v,n.__.__k[n.__i]=n,Ft(i,n,s),n.__e!=o&&kt(n)));de.__r=0}function At(e,t,n,r,o,i,s,a,c,u,f){var l,b,h,p,g,_,y=r&&r.__k||Tt,w=t.length;for(c=wn(n,t,y,c,w),l=0;l<w;l++)(h=n.__k[l])!=null&&(b=h.__i==-1?ee:y[h.__i]||ee,h.__i=l,_=$e(e,h,b,o,i,s,a,c,u,f),p=h.__e,h.ref&&b.ref!=h.ref&&(b.ref&&qe(b.ref,null,h),f.push(h.ref,h.__c||p,h)),g==null&&p!=null&&(g=p),4&h.__u||b.__k===h.__k?c=Ot(h,c,e):typeof h.type=="function"&&_!==void 0?c=_:p&&(c=p.nextSibling),h.__u&=-7);return n.__e=g,c}function wn(e,t,n,r,o){var i,s,a,c,u,f=n.length,l=f,b=0;for(e.__k=new Array(o),i=0;i<o;i++)(s=t[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(c=i+b,(s=e.__k[i]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?Y(null,s,null,null,null):me(s)?Y(G,{children:s},null,null,null):s.constructor==null&&s.__b>0?Y(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=e,s.__b=e.__b+1,a=null,(u=s.__i=xn(s,n,c,l))!=-1&&(l--,(a=n[u])&&(a.__u|=2)),a==null||a.__v==null?(u==-1&&(o>f?b--:o<f&&b++),typeof s.type!="function"&&(s.__u|=4)):u!=c&&(u==c-1?b--:u==c+1?b++:(u>c?b--:b++,s.__u|=4))):e.__k[i]=null;if(l)for(i=0;i<f;i++)(a=n[i])!=null&&(2&a.__u)==0&&(a.__e==r&&(r=V(a)),Bt(a,a));return r}function Ot(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=Ot(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=V(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function xn(e,t,n,r){var o,i,s=e.key,a=e.type,c=t[n];if(c===null&&e.key==null||c&&s==c.key&&a==c.type&&(2&c.__u)==0)return n;if(r>(c!=null&&(2&c.__u)==0?1:0))for(o=n-1,i=n+1;o>=0||i<t.length;){if(o>=0){if((c=t[o])&&(2&c.__u)==0&&s==c.key&&a==c.type)return o;o--}if(i<t.length){if((c=t[i])&&(2&c.__u)==0&&s==c.key&&a==c.type)return i;i++}}return-1}function Qe(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||yn.test(t)?n:n+"px"}function se(e,t,n,r,o){var i,s;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Qe(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||Qe(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(Ct,"$1")),s=t.toLowerCase(),t=s in e||t=="onFocusOut"||t=="onFocusIn"?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=He,e.addEventListener(t,i?Pe:Fe,i)):e.removeEventListener(t,i?Pe:Fe,i);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function Ye(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=He++;else if(t.t<n.u)return;return n(S.event?S.event(t):t)}}}function $e(e,t,n,r,o,i,s,a,c,u){var f,l,b,h,p,g,_,y,w,v,A,k,F,D,j,H,Ce,U=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),i=[a=t.__e=n.__e]),(f=S.__b)&&f(t);e:if(typeof U=="function")try{if(y=t.props,w="prototype"in U&&U.prototype.render,v=(f=U.contextType)&&r[f.__c],A=f?v?v.props.value:f.__:r,n.__c?_=(l=t.__c=n.__c).__=l.__E:(w?t.__c=l=new U(y,A):(t.__c=l=new ae(y,A),l.constructor=U,l.render=Sn),v&&v.sub(l),l.props=y,l.state||(l.state={}),l.context=A,l.__n=r,b=l.__d=!0,l.__h=[],l._sb=[]),w&&l.__s==null&&(l.__s=l.state),w&&U.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=I({},l.__s)),I(l.__s,U.getDerivedStateFromProps(y,l.__s))),h=l.props,p=l.state,l.__v=t,b)w&&U.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),w&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(w&&U.getDerivedStateFromProps==null&&y!==h&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(y,A),!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(y,l.__s,A)===!1||t.__v==n.__v){for(t.__v!=n.__v&&(l.props=y,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(Z){Z&&(Z.__=t)}),k=0;k<l._sb.length;k++)l.__h.push(l._sb[k]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(y,l.__s,A),w&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(h,p,g)})}if(l.context=A,l.props=y,l.__P=e,l.__e=!1,F=S.__r,D=0,w){for(l.state=l.__s,l.__d=!1,F&&F(t),f=l.render(l.props,l.state,l.context),j=0;j<l._sb.length;j++)l.__h.push(l._sb[j]);l._sb=[]}else do l.__d=!1,F&&F(t),f=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++D<25);l.state=l.__s,l.getChildContext!=null&&(r=I(I({},r),l.getChildContext())),w&&!b&&l.getSnapshotBeforeUpdate!=null&&(g=l.getSnapshotBeforeUpdate(h,p)),H=f,f!=null&&f.type===G&&f.key==null&&(H=Pt(f.props.children)),a=At(e,me(H)?H:[H],t,n,r,o,i,s,a,c,u),l.base=t.__e,t.__u&=-161,l.__h.length&&s.push(l),_&&(l.__E=l.__=null)}catch(Z){if(t.__v=null,c||i!=null)if(Z.then){for(t.__u|=c?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;i[i.indexOf(a)]=null,t.__e=a}else for(Ce=i.length;Ce--;)Me(i[Ce]);else t.__e=n.__e,t.__k=n.__k;S.__e(Z,t,n)}else i==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=En(n.__e,t,n,r,o,i,s,c,u);return(f=S.diffed)&&f(t),128&t.__u?void 0:a}function Ft(e,t,n){for(var r=0;r<n.length;r++)qe(n[r],n[++r],n[++r]);S.__c&&S.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){S.__e(i,o.__v)}})}function Pt(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:me(e)?e.map(Pt):I({},e)}function En(e,t,n,r,o,i,s,a,c){var u,f,l,b,h,p,g,_=n.props,y=t.props,w=t.type;if(w=="svg"?o="http://www.w3.org/2000/svg":w=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),i!=null){for(u=0;u<i.length;u++)if((h=i[u])&&"setAttribute"in h==!!w&&(w?h.localName==w:h.nodeType==3)){e=h,i[u]=null;break}}if(e==null){if(w==null)return document.createTextNode(y);e=document.createElementNS(o,w,y.is&&y),a&&(S.__m&&S.__m(t,i),a=!1),i=null}if(w==null)_===y||a&&e.data==y||(e.data=y);else{if(i=i&&re.call(e.childNodes),_=n.props||ee,!a&&i!=null)for(_={},u=0;u<e.attributes.length;u++)_[(h=e.attributes[u]).name]=h.value;for(u in _)if(h=_[u],u!="children"){if(u=="dangerouslySetInnerHTML")l=h;else if(!(u in y)){if(u=="value"&&"defaultValue"in y||u=="checked"&&"defaultChecked"in y)continue;se(e,u,null,h,o)}}for(u in y)h=y[u],u=="children"?b=h:u=="dangerouslySetInnerHTML"?f=h:u=="value"?p=h:u=="checked"?g=h:a&&typeof h!="function"||_[u]===h||se(e,u,h,_[u],o);if(f)a||l&&(f.__html==l.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(l&&(e.innerHTML=""),At(t.type=="template"?e.content:e,me(b)?b:[b],t,n,r,w=="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,s,i?i[0]:n.__k&&V(n,0),a,c),i!=null)for(u=i.length;u--;)Me(i[u]);a||(u="value",w=="progress"&&p==null?e.removeAttribute("value"):p!=null&&(p!==e[u]||w=="progress"&&!p||w=="option"&&p!=_[u])&&se(e,u,p,_[u],o),u="checked",g!=null&&g!=e[u]&&se(e,u,g,_[u],o))}return e}function qe(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){S.__e(o,n)}}function Bt(e,t,n){var r,o;if(S.unmount&&S.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||qe(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){S.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&Bt(r[o],t,n||typeof e.type!="function");n||Me(e.__e),e.__c=e.__=e.__e=void 0}function Sn(e,t,n){return this.constructor(e,n)}function be(e,t,n){var r,o,i,s;t==document&&(t=document.documentElement),S.__&&S.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],$e(t,e=(!r&&n||t).__k=J(G,null,[e]),o||ee,ee,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?re.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,s),Ft(i,e,s)}function Nt(e,t){be(e,t,Nt)}function Dt(e,t,n){var r,o,i,s,a=I({},e.props);for(i in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?o=t[i]:a[i]=t[i]===void 0&&s!=null?s[i]:t[i];return arguments.length>2&&(a.children=arguments.length>3?re.call(arguments,2):n),Y(e.type,a,r||e.key,o||e.ref,null)}re=Tt.slice,S={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(a){e=a}throw e}},St=0,ae.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=I({},this.state),typeof e=="function"&&(e=e(I({},n),this.props)),e&&I(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ze(this))},ae.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ze(this))},ae.prototype.render=G,M=[],vt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Rt=function(e,t){return e.__v.__b-t.__v.__b},de.__r=0,Ct=/(PointerCapture)$|Capture$/i,He=0,Fe=Ye(!1),Pe=Ye(!0);var vn=0;function m(e,t,n,r,o,i){t||(t={});var s,a,c=t;if("ref"in c)for(a in c={},t)a=="ref"?s=t[a]:c[a]=t[a];var u={type:e,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--vn,__i:-1,__u:0,__source:o,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)c[a]===void 0&&(c[a]=s[a]);return S.vnode&&S.vnode(u),u}var te,R,Te,et,pe=0,Ut=[],T=S,tt=T.__b,nt=T.__r,rt=T.diffed,ot=T.__c,it=T.unmount,st=T.__;function We(e,t){T.__h&&T.__h(R,e,pe||t),pe=0;var n=R.__H||(R.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function z(e){return pe=1,Rn(jt,e)}function Rn(e,t,n){var r=We(te++,2);if(r.t=e,!r.__c&&(r.__=[jt(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=R,!R.__f)){var o=function(a,c,u){if(!r.__c.__H)return!0;var f=r.__c.__H.__.filter(function(b){return!!b.__c});if(f.every(function(b){return!b.__N}))return!i||i.call(this,a,c,u);var l=r.__c.props!==a;return f.forEach(function(b){if(b.__N){var h=b.__[0];b.__=b.__N,b.__N=void 0,h!==b.__[0]&&(l=!0)}}),i&&i.call(this,a,c,u)||l};R.__f=!0;var i=R.shouldComponentUpdate,s=R.componentWillUpdate;R.componentWillUpdate=function(a,c,u){if(this.__e){var f=i;i=void 0,o(a,c,u),i=f}s&&s.call(this,a,c,u)},R.shouldComponentUpdate=o}return r.__N||r.__}function Lt(e,t){var n=We(te++,3);!T.__s&&zt(n.__H,t)&&(n.__=e,n.u=t,R.__H.__h.push(n))}function It(e){return pe=5,Cn(function(){return{current:e}},[])}function Cn(e,t){var n=We(te++,7);return zt(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Tn(){for(var e;e=Ut.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(le),e.__H.__h.forEach(Be),e.__H.__h=[]}catch(t){e.__H.__h=[],T.__e(t,e.__v)}}T.__b=function(e){R=null,tt&&tt(e)},T.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),st&&st(e,t)},T.__r=function(e){nt&&nt(e),te=0;var t=(R=e.__c).__H;t&&(Te===R?(t.__h=[],R.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(le),t.__h.forEach(Be),t.__h=[],te=0)),Te=R},T.diffed=function(e){rt&&rt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Ut.push(t)!==1&&et===T.requestAnimationFrame||((et=T.requestAnimationFrame)||kn)(Tn)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Te=R=null},T.__c=function(e,t){t.some(function(n){try{n.__h.forEach(le),n.__h=n.__h.filter(function(r){return!r.__||Be(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],T.__e(r,n.__v)}}),ot&&ot(e,t)},T.unmount=function(e){it&&it(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{le(r)}catch(o){t=o}}),n.__H=void 0,t&&T.__e(t,n.__v))};var at=typeof requestAnimationFrame=="function";function kn(e){var t,n=function(){clearTimeout(r),at&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);at&&(t=requestAnimationFrame(n))}function le(e){var t=R,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),R=t}function Be(e){var t=R;e.__c=e.__(),R=t}function zt(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function jt(e,t){return typeof t=="function"?t(e):t}function An({onClick:e,color:t,children:n}){return m("button",{style:{background:t||"#1890ff",color:"#fff",border:"none",borderRadius:4,padding:"8px 16px",cursor:"pointer",fontSize:16},onClick:e,children:n})}const On={余额详情:"余额详情",真实金额:"真实金额",冻结金额:"冻结金额",总可用:"总可用","充值 / 转账":"充值 / 转账",在线充值:"在线充值",线下转账:"线下转账",充值币种:"充值币种",充值金额:"充值金额",支付平台:"支付平台",请选择充值币种:"请选择充值币种",请输入充值金额:"请输入充值金额",请选择支付平台:"请选择支付平台","提交失败,请重试":"提交失败,请重试","提交中...":"提交中...",去支付:"去支付",取消:"取消",关闭:"关闭",第三方支付平台:"第三方支付平台",交易ID:"交易ID",请输入转账交易ID:"请输入转账交易ID",上传文件:"上传文件",请上传转账凭证:"请上传转账凭证",离线充值创建成功:"离线充值创建成功","加载中...":"加载中...",错误:"错误",成功:"成功",必填:"必填","充值/转账":"充值/转账",切换为暗黑主题:"切换为暗黑主题",切换为白色主题:"切换为白色主题",点击或拖拽文件到此处上传:"点击或拖拽文件到此处上传","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传",个文件:"个文件","正在上传...":"正在上传...",已上传:"已上传",移除:"移除"};function Fn(e){return On[e]||e}const Pn={余额详情:"Balance Details",真实金额:"Real Amount",冻结金额:"Frozen Amount",总可用:"Total Available","充值 / 转账":"Recharge / Transfer",在线充值:"Online Recharge",线下转账:"Offline Transfer",充值币种:"Recharge Currency",充值金额:"Recharge Amount",支付平台:"Payment Platform",请选择充值币种:"Please select recharge currency",请输入充值金额:"Please enter recharge amount",请选择支付平台:"Please select payment platform","提交失败,请重试":"Submit failed, please try again","提交中...":"Submitting...",去支付:"Go to Pay",取消:"Cancel",关闭:"Close",第三方支付平台:"Third-party Payment Platform",交易ID:"Transaction ID",请输入转账交易ID:"Please enter transfer transaction ID",上传文件:"Upload Files",请上传转账凭证:"Please upload transfer voucher",离线充值创建成功:"Offline recharge created successfully","加载中...":"Loading...",错误:"Error",成功:"Success",必填:"Required","充值/转账":"Recharge/Transfer",切换为暗黑主题:"Switch to Dark Theme",切换为白色主题:"Switch to Light Theme",点击或拖拽文件到此处上传:"Click or drag files here to upload","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"Supports JPG, PNG, PDF formats, single file not exceeding 20MB, maximum",个文件:"files can be uploaded","正在上传...":"Uploading...",已上传:"Uploaded",移除:"Remove"};function Bn(e){return Pn[e]||e}function Nn(){return JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").locale||"zh"}function x(e){return Nn()==="zh"?Fn(e):Bn(e)}const Dn=({formState:e,setFormState:t,onClose:n,loading:r,whiteTheme:o=!1})=>{const i=JSON.parse(sessionStorage.getItem("all_dicts")||"{}"),s=i?.currency||[],a=i?.channel?.filter(l=>l.payment_support)||[],c=o?{label:{marginBottom:8,fontSize:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:"10px 12px",borderRadius:6,border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}}:{label:{marginBottom:8,fontSize:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #23262F",background:"#23262F",color:"#fff",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:"10px 12px",borderRadius:6,border:"1px solid #23262F",background:"#23262F",color:"#fff",fontSize:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}},u=o?{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"}:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},f=o?{background:"#155EEF",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600}:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600};return m(G,{children:[m("div",{style:{marginBottom:18},children:[m("div",{style:c.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",x("充值币种")]}),m("select",{style:{...c.select},value:e.currency,onInput:l=>{const b=l.target.value;t(h=>({...h,currency:b}))},children:[m("option",{value:"",disabled:!0,hidden:!0,children:x("请选择充值币种")}),s?.map(l=>m("option",{value:l.value,children:l.label}))]})]}),m("div",{style:{marginBottom:18},children:[m("div",{style:c.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",x("充值金额")]}),m("input",{type:"text",placeholder:x("请输入充值金额"),value:e.amount,onInput:l=>{const b=l.target.value;t(h=>({...h,amount:b,amountError:b.trim()?"":h.amountError}))},style:{...c.input,...e.amountError?c.inputError:{}}}),e.amountError&&m("div",{style:c.error,children:e.amountError})]}),m("div",{style:{marginBottom:24},children:[m("div",{style:c.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",x("支付平台")]}),m("select",{style:{...c.select,...e.rechargeChannelError?c.selectError:{}},value:e.rechargeChannel,onInput:l=>{const b=l.target.value;t(h=>({...h,rechargeChannel:b,rechargeChannelError:b?"":h.rechargeChannelError}))},children:[m("option",{value:"",disabled:!0,hidden:!0,children:x("请选择支付平台")}),a?.map(l=>m("option",{value:l.value,children:l.label}))]}),e.rechargeChannelError&&m("div",{style:c.error,children:e.rechargeChannelError})]}),e.error&&m("div",{style:{color:"#ff4d4f",marginBottom:12},children:e.error}),m("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[m("button",{type:"button",onClick:n,style:u,children:x("取消")}),m("button",{type:"submit",disabled:r,style:f,children:x(r?"提交中...":"去支付")})]})]})};function Ht(e,t){return function(){return e.apply(t,arguments)}}const{toString:Un}=Object.prototype,{getPrototypeOf:Je}=Object,{iterator:ge,toStringTag:Mt}=Symbol,ye=(e=>t=>{const n=Un.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),N=e=>(e=e.toLowerCase(),t=>ye(t)===e),we=e=>t=>typeof t===e,{isArray:K}=Array,ne=we("undefined");function Ln(e){return e!==null&&!ne(e)&&e.constructor!==null&&!ne(e.constructor)&&P(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const $t=N("ArrayBuffer");function In(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&$t(e.buffer),t}const zn=we("string"),P=we("function"),qt=we("number"),xe=e=>e!==null&&typeof e=="object",jn=e=>e===!0||e===!1,ce=e=>{if(ye(e)!=="object")return!1;const t=Je(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Mt in e)&&!(ge in e)},Hn=N("Date"),Mn=N("File"),$n=N("Blob"),qn=N("FileList"),Wn=e=>xe(e)&&P(e.pipe),Jn=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||P(e.append)&&((t=ye(e))==="formdata"||t==="object"&&P(e.toString)&&e.toString()==="[object FormData]"))},Vn=N("URLSearchParams"),[Gn,Kn,Xn,Zn]=["ReadableStream","Request","Response","Headers"].map(N),Qn=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function oe(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),K(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let a;for(r=0;r<s;r++)a=i[r],t.call(null,e[a],a,e)}}function Wt(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const $=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Jt=e=>!ne(e)&&e!==$;function Ne(){const{caseless:e}=Jt(this)&&this||{},t={},n=(r,o)=>{const i=e&&Wt(t,o)||o;ce(t[i])&&ce(r)?t[i]=Ne(t[i],r):ce(r)?t[i]=Ne({},r):K(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&oe(arguments[r],n);return t}const Yn=(e,t,n,{allOwnKeys:r}={})=>(oe(t,(o,i)=>{n&&P(o)?e[i]=Ht(o,n):e[i]=o},{allOwnKeys:r}),e),er=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)},nr=(e,t,n,r)=>{let o,i,s;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],(!r||r(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=n!==!1&&Je(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},rr=(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},or=e=>{if(!e)return null;if(K(e))return e;let t=e.length;if(!qt(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},ir=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Je(Uint8Array)),sr=(e,t)=>{const r=(e&&e[ge]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},ar=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},lr=N("HTMLFormElement"),cr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),lt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ur=N("RegExp"),Vt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};oe(n,(o,i)=>{let s;(s=t(o,i,e))!==!1&&(r[i]=s||o)}),Object.defineProperties(e,r)},fr=e=>{Vt(e,(t,n)=>{if(P(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(P(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},dr=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return K(e)?r(e):r(String(e).split(t)),n},pr=()=>{},hr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function _r(e){return!!(e&&P(e.append)&&e[Mt]==="FormData"&&e[ge])}const mr=e=>{const t=new Array(10),n=(r,o)=>{if(xe(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=K(r)?[]:{};return oe(r,(s,a)=>{const c=n(s,o+1);!ne(c)&&(i[a]=c)}),t[o]=void 0,i}}return r};return n(e,0)},br=N("AsyncFunction"),gr=e=>e&&(xe(e)||P(e))&&P(e.then)&&P(e.catch),Gt=((e,t)=>e?setImmediate:t?((n,r)=>($.addEventListener("message",({source:o,data:i})=>{o===$&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),$.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",P($.postMessage)),yr=typeof queueMicrotask<"u"?queueMicrotask.bind($):typeof process<"u"&&process.nextTick||Gt,wr=e=>e!=null&&P(e[ge]),d={isArray:K,isArrayBuffer:$t,isBuffer:Ln,isFormData:Jn,isArrayBufferView:In,isString:zn,isNumber:qt,isBoolean:jn,isObject:xe,isPlainObject:ce,isReadableStream:Gn,isRequest:Kn,isResponse:Xn,isHeaders:Zn,isUndefined:ne,isDate:Hn,isFile:Mn,isBlob:$n,isRegExp:ur,isFunction:P,isStream:Wn,isURLSearchParams:Vn,isTypedArray:ir,isFileList:qn,forEach:oe,merge:Ne,extend:Yn,trim:Qn,stripBOM:er,inherits:tr,toFlatObject:nr,kindOf:ye,kindOfTest:N,endsWith:rr,toArray:or,forEachEntry:sr,matchAll:ar,isHTMLForm:lr,hasOwnProperty:lt,hasOwnProp:lt,reduceDescriptors:Vt,freezeMethods:fr,toObjectSet:dr,toCamelCase:cr,noop:pr,toFiniteNumber:hr,findKey:Wt,global:$,isContextDefined:Jt,isSpecCompliantForm:_r,toJSONObject:mr,isAsyncFn:br,isThenable:gr,setImmediate:Gt,asap:yr,isIterable:wr};function E(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)}d.inherits(E,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:d.toJSONObject(this.config),code:this.code,status:this.status}}});const Kt=E.prototype,Xt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Xt[e]={value:e}});Object.defineProperties(E,Xt);Object.defineProperty(Kt,"isAxiosError",{value:!0});E.from=(e,t,n,r,o,i)=>{const s=Object.create(Kt);return d.toFlatObject(e,s,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),E.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const xr=null;function De(e){return d.isPlainObject(e)||d.isArray(e)}function Zt(e){return d.endsWith(e,"[]")?e.slice(0,-2):e}function ct(e,t,n){return e?e.concat(t).map(function(o,i){return o=Zt(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function Er(e){return d.isArray(e)&&!e.some(De)}const Sr=d.toFlatObject(d,{},null,function(t){return/^is[A-Z]/.test(t)});function Ee(e,t,n){if(!d.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=d.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,_){return!d.isUndefined(_[g])});const r=n.metaTokens,o=n.visitor||f,i=n.dots,s=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&d.isSpecCompliantForm(t);if(!d.isFunction(o))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(d.isDate(p))return p.toISOString();if(d.isBoolean(p))return p.toString();if(!c&&d.isBlob(p))throw new E("Blob is not supported. Use a Buffer instead.");return d.isArrayBuffer(p)||d.isTypedArray(p)?c&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function f(p,g,_){let y=p;if(p&&!_&&typeof p=="object"){if(d.endsWith(g,"{}"))g=r?g:g.slice(0,-2),p=JSON.stringify(p);else if(d.isArray(p)&&Er(p)||(d.isFileList(p)||d.endsWith(g,"[]"))&&(y=d.toArray(p)))return g=Zt(g),y.forEach(function(v,A){!(d.isUndefined(v)||v===null)&&t.append(s===!0?ct([g],A,i):s===null?g:g+"[]",u(v))}),!1}return De(p)?!0:(t.append(ct(_,g,i),u(p)),!1)}const l=[],b=Object.assign(Sr,{defaultVisitor:f,convertValue:u,isVisitable:De});function h(p,g){if(!d.isUndefined(p)){if(l.indexOf(p)!==-1)throw Error("Circular reference detected in "+g.join("."));l.push(p),d.forEach(p,function(y,w){(!(d.isUndefined(y)||y===null)&&o.call(t,y,d.isString(w)?w.trim():w,g,b))===!0&&h(y,g?g.concat(w):[w])}),l.pop()}}if(!d.isObject(e))throw new TypeError("data must be an object");return h(e),t}function ut(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Ve(e,t){this._pairs=[],e&&Ee(e,this,t)}const Qt=Ve.prototype;Qt.append=function(t,n){this._pairs.push([t,n])};Qt.toString=function(t){const n=t?function(r){return t.call(this,r,ut)}:ut;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function vr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Yt(e,t,n){if(!t)return e;const r=n&&n.encode||vr;d.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(o?i=o(t,n):i=d.isURLSearchParams(t)?t.toString():new Ve(t,n).toString(r),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class ft{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){d.forEach(this.handlers,function(r){r!==null&&t(r)})}}const en={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Rr=typeof URLSearchParams<"u"?URLSearchParams:Ve,Cr=typeof FormData<"u"?FormData:null,Tr=typeof Blob<"u"?Blob:null,kr={isBrowser:!0,classes:{URLSearchParams:Rr,FormData:Cr,Blob:Tr},protocols:["http","https","file","blob","url","data"]},Ge=typeof window<"u"&&typeof document<"u",Ue=typeof navigator=="object"&&navigator||void 0,Ar=Ge&&(!Ue||["ReactNative","NativeScript","NS"].indexOf(Ue.product)<0),Or=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Fr=Ge&&window.location.href||"http://localhost",Pr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ge,hasStandardBrowserEnv:Ar,hasStandardBrowserWebWorkerEnv:Or,navigator:Ue,origin:Fr},Symbol.toStringTag,{value:"Module"})),O={...Pr,...kr};function Br(e,t){return Ee(e,new O.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return O.isNode&&d.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Nr(e){return d.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Dr(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}function tn(e){function t(n,r,o,i){let s=n[i++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),c=i>=n.length;return s=!s&&d.isArray(o)?o.length:s,c?(d.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!a):((!o[s]||!d.isObject(o[s]))&&(o[s]=[]),t(n,r,o[s],i)&&d.isArray(o[s])&&(o[s]=Dr(o[s])),!a)}if(d.isFormData(e)&&d.isFunction(e.entries)){const n={};return d.forEachEntry(e,(r,o)=>{t(Nr(r),o,n,0)}),n}return null}function Ur(e,t,n){if(d.isString(e))try{return(t||JSON.parse)(e),d.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ie={transitional:en,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=d.isObject(t);if(i&&d.isHTMLForm(t)&&(t=new FormData(t)),d.isFormData(t))return o?JSON.stringify(tn(t)):t;if(d.isArrayBuffer(t)||d.isBuffer(t)||d.isStream(t)||d.isFile(t)||d.isBlob(t)||d.isReadableStream(t))return t;if(d.isArrayBufferView(t))return t.buffer;if(d.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Br(t,this.formSerializer).toString();if((a=d.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Ee(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),Ur(t)):t}],transformResponse:[function(t){const n=this.transitional||ie.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(d.isResponse(t)||d.isReadableStream(t))return t;if(t&&d.isString(t)&&(r&&!this.responseType||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?E.from(a,E.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:O.classes.FormData,Blob:O.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};d.forEach(["delete","get","head","post","put","patch"],e=>{ie.headers[e]={}});const Lr=d.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"]),Ir=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function _n(){console.log("npm package test!!!")}function mn(){console.log("Current time:",new Date().toISOString())}function bn(e){const{merchant_id:t,biz_type:n,theme:r,locale:o="zh"}=e,i="Bearer "+e.token;return sessionStorage.setItem("fund_unit_params",JSON.stringify({merchantId:t,bizType:n,token:i,theme:r,locale:o})),{token:i,merchantId:t,bizType:n,theme:r,locale:o}}const gn={"/api":{target:"https://fund.bestfulfill.tech/api/sdk",changeOrigin:!0,rewrite:e=>e.replace(/^\/api/,""),secure:!1}};var re,S,St,M,Xe,vt,Rt,Ct,He,Fe,Pe,ee={},Tt=[],yn=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,me=Array.isArray;function I(e,t){for(var n in t)e[n]=t[n];return e}function Me(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function J(e,t,n){var r,o,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?re.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return Y(e,s,r,o,null)}function Y(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++St,__i:-1,__u:0};return o==null&&S.vnode!=null&&S.vnode(i),i}function G(e){return e.children}function ae(e,t){this.props=e,this.context=t}function V(e,t){if(t==null)return e.__?V(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"?V(e):null}function kt(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 kt(e)}}function Ze(e){(!e.__d&&(e.__d=!0)&&M.push(e)&&!de.__r++||Xe!=S.debounceRendering)&&((Xe=S.debounceRendering)||vt)(de)}function de(){for(var e,t,n,r,o,i,s,a=1;M.length;)M.length>a&&M.sort(Rt),e=M.shift(),a=M.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,i=[],s=[],t.__P&&((n=I({},r)).__v=r.__v+1,S.vnode&&S.vnode(n),$e(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,i,o??V(r),!!(32&r.__u),s),n.__v=r.__v,n.__.__k[n.__i]=n,Ft(i,n,s),n.__e!=o&&kt(n)));de.__r=0}function At(e,t,n,r,o,i,s,a,c,u,f){var l,b,h,p,g,_,y=r&&r.__k||Tt,w=t.length;for(c=wn(n,t,y,c,w),l=0;l<w;l++)(h=n.__k[l])!=null&&(b=h.__i==-1?ee:y[h.__i]||ee,h.__i=l,_=$e(e,h,b,o,i,s,a,c,u,f),p=h.__e,h.ref&&b.ref!=h.ref&&(b.ref&&qe(b.ref,null,h),f.push(h.ref,h.__c||p,h)),g==null&&p!=null&&(g=p),4&h.__u||b.__k===h.__k?c=Ot(h,c,e):typeof h.type=="function"&&_!==void 0?c=_:p&&(c=p.nextSibling),h.__u&=-7);return n.__e=g,c}function wn(e,t,n,r,o){var i,s,a,c,u,f=n.length,l=f,b=0;for(e.__k=new Array(o),i=0;i<o;i++)(s=t[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(c=i+b,(s=e.__k[i]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?Y(null,s,null,null,null):me(s)?Y(G,{children:s},null,null,null):s.constructor==null&&s.__b>0?Y(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=e,s.__b=e.__b+1,a=null,(u=s.__i=xn(s,n,c,l))!=-1&&(l--,(a=n[u])&&(a.__u|=2)),a==null||a.__v==null?(u==-1&&(o>f?b--:o<f&&b++),typeof s.type!="function"&&(s.__u|=4)):u!=c&&(u==c-1?b--:u==c+1?b++:(u>c?b--:b++,s.__u|=4))):e.__k[i]=null;if(l)for(i=0;i<f;i++)(a=n[i])!=null&&(2&a.__u)==0&&(a.__e==r&&(r=V(a)),Bt(a,a));return r}function Ot(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=Ot(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=V(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function xn(e,t,n,r){var o,i,s=e.key,a=e.type,c=t[n];if(c===null&&e.key==null||c&&s==c.key&&a==c.type&&(2&c.__u)==0)return n;if(r>(c!=null&&(2&c.__u)==0?1:0))for(o=n-1,i=n+1;o>=0||i<t.length;){if(o>=0){if((c=t[o])&&(2&c.__u)==0&&s==c.key&&a==c.type)return o;o--}if(i<t.length){if((c=t[i])&&(2&c.__u)==0&&s==c.key&&a==c.type)return i;i++}}return-1}function Qe(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||yn.test(t)?n:n+"px"}function se(e,t,n,r,o){var i,s;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Qe(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||Qe(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(Ct,"$1")),s=t.toLowerCase(),t=s in e||t=="onFocusOut"||t=="onFocusIn"?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=He,e.addEventListener(t,i?Pe:Fe,i)):e.removeEventListener(t,i?Pe:Fe,i);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function Ye(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=He++;else if(t.t<n.u)return;return n(S.event?S.event(t):t)}}}function $e(e,t,n,r,o,i,s,a,c,u){var f,l,b,h,p,g,_,y,w,v,A,k,F,D,j,H,Ce,U=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),i=[a=t.__e=n.__e]),(f=S.__b)&&f(t);e:if(typeof U=="function")try{if(y=t.props,w="prototype"in U&&U.prototype.render,v=(f=U.contextType)&&r[f.__c],A=f?v?v.props.value:f.__:r,n.__c?_=(l=t.__c=n.__c).__=l.__E:(w?t.__c=l=new U(y,A):(t.__c=l=new ae(y,A),l.constructor=U,l.render=Sn),v&&v.sub(l),l.props=y,l.state||(l.state={}),l.context=A,l.__n=r,b=l.__d=!0,l.__h=[],l._sb=[]),w&&l.__s==null&&(l.__s=l.state),w&&U.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=I({},l.__s)),I(l.__s,U.getDerivedStateFromProps(y,l.__s))),h=l.props,p=l.state,l.__v=t,b)w&&U.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),w&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(w&&U.getDerivedStateFromProps==null&&y!==h&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(y,A),!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(y,l.__s,A)===!1||t.__v==n.__v){for(t.__v!=n.__v&&(l.props=y,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(Z){Z&&(Z.__=t)}),k=0;k<l._sb.length;k++)l.__h.push(l._sb[k]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(y,l.__s,A),w&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(h,p,g)})}if(l.context=A,l.props=y,l.__P=e,l.__e=!1,F=S.__r,D=0,w){for(l.state=l.__s,l.__d=!1,F&&F(t),f=l.render(l.props,l.state,l.context),j=0;j<l._sb.length;j++)l.__h.push(l._sb[j]);l._sb=[]}else do l.__d=!1,F&&F(t),f=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++D<25);l.state=l.__s,l.getChildContext!=null&&(r=I(I({},r),l.getChildContext())),w&&!b&&l.getSnapshotBeforeUpdate!=null&&(g=l.getSnapshotBeforeUpdate(h,p)),H=f,f!=null&&f.type===G&&f.key==null&&(H=Pt(f.props.children)),a=At(e,me(H)?H:[H],t,n,r,o,i,s,a,c,u),l.base=t.__e,t.__u&=-161,l.__h.length&&s.push(l),_&&(l.__E=l.__=null)}catch(Z){if(t.__v=null,c||i!=null)if(Z.then){for(t.__u|=c?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;i[i.indexOf(a)]=null,t.__e=a}else for(Ce=i.length;Ce--;)Me(i[Ce]);else t.__e=n.__e,t.__k=n.__k;S.__e(Z,t,n)}else i==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=En(n.__e,t,n,r,o,i,s,c,u);return(f=S.diffed)&&f(t),128&t.__u?void 0:a}function Ft(e,t,n){for(var r=0;r<n.length;r++)qe(n[r],n[++r],n[++r]);S.__c&&S.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){S.__e(i,o.__v)}})}function Pt(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:me(e)?e.map(Pt):I({},e)}function En(e,t,n,r,o,i,s,a,c){var u,f,l,b,h,p,g,_=n.props,y=t.props,w=t.type;if(w=="svg"?o="http://www.w3.org/2000/svg":w=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),i!=null){for(u=0;u<i.length;u++)if((h=i[u])&&"setAttribute"in h==!!w&&(w?h.localName==w:h.nodeType==3)){e=h,i[u]=null;break}}if(e==null){if(w==null)return document.createTextNode(y);e=document.createElementNS(o,w,y.is&&y),a&&(S.__m&&S.__m(t,i),a=!1),i=null}if(w==null)_===y||a&&e.data==y||(e.data=y);else{if(i=i&&re.call(e.childNodes),_=n.props||ee,!a&&i!=null)for(_={},u=0;u<e.attributes.length;u++)_[(h=e.attributes[u]).name]=h.value;for(u in _)if(h=_[u],u!="children"){if(u=="dangerouslySetInnerHTML")l=h;else if(!(u in y)){if(u=="value"&&"defaultValue"in y||u=="checked"&&"defaultChecked"in y)continue;se(e,u,null,h,o)}}for(u in y)h=y[u],u=="children"?b=h:u=="dangerouslySetInnerHTML"?f=h:u=="value"?p=h:u=="checked"?g=h:a&&typeof h!="function"||_[u]===h||se(e,u,h,_[u],o);if(f)a||l&&(f.__html==l.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(l&&(e.innerHTML=""),At(t.type=="template"?e.content:e,me(b)?b:[b],t,n,r,w=="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,s,i?i[0]:n.__k&&V(n,0),a,c),i!=null)for(u=i.length;u--;)Me(i[u]);a||(u="value",w=="progress"&&p==null?e.removeAttribute("value"):p!=null&&(p!==e[u]||w=="progress"&&!p||w=="option"&&p!=_[u])&&se(e,u,p,_[u],o),u="checked",g!=null&&g!=e[u]&&se(e,u,g,_[u],o))}return e}function qe(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){S.__e(o,n)}}function Bt(e,t,n){var r,o;if(S.unmount&&S.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||qe(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){S.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&Bt(r[o],t,n||typeof e.type!="function");n||Me(e.__e),e.__c=e.__=e.__e=void 0}function Sn(e,t,n){return this.constructor(e,n)}function be(e,t,n){var r,o,i,s;t==document&&(t=document.documentElement),S.__&&S.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],$e(t,e=(!r&&n||t).__k=J(G,null,[e]),o||ee,ee,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?re.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,s),Ft(i,e,s)}function Nt(e,t){be(e,t,Nt)}function Dt(e,t,n){var r,o,i,s,a=I({},e.props);for(i in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?o=t[i]:a[i]=t[i]===void 0&&s!=null?s[i]:t[i];return arguments.length>2&&(a.children=arguments.length>3?re.call(arguments,2):n),Y(e.type,a,r||e.key,o||e.ref,null)}re=Tt.slice,S={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(a){e=a}throw e}},St=0,ae.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=I({},this.state),typeof e=="function"&&(e=e(I({},n),this.props)),e&&I(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ze(this))},ae.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ze(this))},ae.prototype.render=G,M=[],vt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Rt=function(e,t){return e.__v.__b-t.__v.__b},de.__r=0,Ct=/(PointerCapture)$|Capture$/i,He=0,Fe=Ye(!1),Pe=Ye(!0);var vn=0;function m(e,t,n,r,o,i){t||(t={});var s,a,c=t;if("ref"in c)for(a in c={},t)a=="ref"?s=t[a]:c[a]=t[a];var u={type:e,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--vn,__i:-1,__u:0,__source:o,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)c[a]===void 0&&(c[a]=s[a]);return S.vnode&&S.vnode(u),u}var te,R,Te,et,pe=0,Ut=[],T=S,tt=T.__b,nt=T.__r,rt=T.diffed,ot=T.__c,it=T.unmount,st=T.__;function We(e,t){T.__h&&T.__h(R,e,pe||t),pe=0;var n=R.__H||(R.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function z(e){return pe=1,Rn(jt,e)}function Rn(e,t,n){var r=We(te++,2);if(r.t=e,!r.__c&&(r.__=[jt(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=R,!R.__f)){var o=function(a,c,u){if(!r.__c.__H)return!0;var f=r.__c.__H.__.filter(function(b){return!!b.__c});if(f.every(function(b){return!b.__N}))return!i||i.call(this,a,c,u);var l=r.__c.props!==a;return f.forEach(function(b){if(b.__N){var h=b.__[0];b.__=b.__N,b.__N=void 0,h!==b.__[0]&&(l=!0)}}),i&&i.call(this,a,c,u)||l};R.__f=!0;var i=R.shouldComponentUpdate,s=R.componentWillUpdate;R.componentWillUpdate=function(a,c,u){if(this.__e){var f=i;i=void 0,o(a,c,u),i=f}s&&s.call(this,a,c,u)},R.shouldComponentUpdate=o}return r.__N||r.__}function Lt(e,t){var n=We(te++,3);!T.__s&&zt(n.__H,t)&&(n.__=e,n.u=t,R.__H.__h.push(n))}function It(e){return pe=5,Cn(function(){return{current:e}},[])}function Cn(e,t){var n=We(te++,7);return zt(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Tn(){for(var e;e=Ut.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(le),e.__H.__h.forEach(Be),e.__H.__h=[]}catch(t){e.__H.__h=[],T.__e(t,e.__v)}}T.__b=function(e){R=null,tt&&tt(e)},T.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),st&&st(e,t)},T.__r=function(e){nt&&nt(e),te=0;var t=(R=e.__c).__H;t&&(Te===R?(t.__h=[],R.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(le),t.__h.forEach(Be),t.__h=[],te=0)),Te=R},T.diffed=function(e){rt&&rt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Ut.push(t)!==1&&et===T.requestAnimationFrame||((et=T.requestAnimationFrame)||kn)(Tn)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Te=R=null},T.__c=function(e,t){t.some(function(n){try{n.__h.forEach(le),n.__h=n.__h.filter(function(r){return!r.__||Be(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],T.__e(r,n.__v)}}),ot&&ot(e,t)},T.unmount=function(e){it&&it(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{le(r)}catch(o){t=o}}),n.__H=void 0,t&&T.__e(t,n.__v))};var at=typeof requestAnimationFrame=="function";function kn(e){var t,n=function(){clearTimeout(r),at&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);at&&(t=requestAnimationFrame(n))}function le(e){var t=R,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),R=t}function Be(e){var t=R;e.__c=e.__(),R=t}function zt(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function jt(e,t){return typeof t=="function"?t(e):t}function An({onClick:e,color:t,children:n}){return m("button",{style:{background:t||"#1890ff",color:"#fff",border:"none",borderRadius:4,padding:"8px 16px",cursor:"pointer",fontSize:16},onClick:e,children:n})}const On={余额详情:"余额详情",真实金额:"真实金额",冻结金额:"冻结金额",总可用:"总可用","充值 / 转账":"充值 / 转账",在线充值:"在线充值",线下转账:"线下转账",充值币种:"充值币种",充值金额:"充值金额",支付平台:"支付平台",请选择充值币种:"请选择充值币种",请输入充值金额:"请输入充值金额",请选择支付平台:"请选择支付平台","提交失败,请重试":"提交失败,请重试","提交中...":"提交中...",去支付:"去支付",取消:"取消",关闭:"关闭",第三方支付平台:"第三方支付平台",交易ID:"交易ID",请输入转账交易ID:"请输入转账交易ID",上传文件:"上传文件",请上传转账凭证:"请上传转账凭证",离线充值创建成功:"离线充值创建成功","加载中...":"加载中...",错误:"错误",成功:"成功",必填:"必填","充值/转账":"充值/转账",切换为暗黑主题:"切换为暗黑主题",切换为白色主题:"切换为白色主题",点击或拖拽文件到此处上传:"点击或拖拽文件到此处上传","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传",个文件:"个文件","正在上传...":"正在上传...",已上传:"已上传",移除:"移除"};function Fn(e){return On[e]||e}const Pn={余额详情:"Balance Details",真实金额:"Real Amount",冻结金额:"Frozen Amount",总可用:"Total Available","充值 / 转账":"Recharge / Transfer",在线充值:"Online Recharge",线下转账:"Offline Transfer",充值币种:"Recharge Currency",充值金额:"Recharge Amount",支付平台:"Payment Platform",请选择充值币种:"Please select recharge currency",请输入充值金额:"Please enter recharge amount",请选择支付平台:"Please select payment platform","提交失败,请重试":"Submit failed, please try again","提交中...":"Submitting...",去支付:"Go to Pay",取消:"Cancel",关闭:"Close",第三方支付平台:"Third-party Payment Platform",交易ID:"Transaction ID",请输入转账交易ID:"Please enter transfer transaction ID",上传文件:"Upload Files",请上传转账凭证:"Please upload transfer voucher",离线充值创建成功:"Offline recharge created successfully","加载中...":"Loading...",错误:"Error",成功:"Success",必填:"Required","充值/转账":"Recharge/Transfer",切换为暗黑主题:"Switch to Dark Theme",切换为白色主题:"Switch to Light Theme",点击或拖拽文件到此处上传:"Click or drag files here to upload","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"Supports JPG, PNG, PDF formats, single file not exceeding 20MB, maximum",个文件:"files can be uploaded","正在上传...":"Uploading...",已上传:"Uploaded",移除:"Remove"};function Bn(e){return Pn[e]||e}function Nn(){return JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").locale||"zh"}function x(e){return Nn()==="zh"?Fn(e):Bn(e)}const Dn=({formState:e,setFormState:t,onClose:n,loading:r,whiteTheme:o=!1})=>{const i=JSON.parse(sessionStorage.getItem("all_dicts")||"{}"),s=i?.currency||[],a=i?.channel?.filter(l=>l.payment_support)||[],c=o?{label:{marginBottom:8,fontSize:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:"10px 12px",borderRadius:6,border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}}:{label:{marginBottom:8,fontSize:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #23262F",background:"#23262F",color:"#fff",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:"10px 12px",borderRadius:6,border:"1px solid #23262F",background:"#23262F",color:"#fff",fontSize:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}},u=o?{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"}:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},f=o?{background:"#155EEF",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600}:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600};return m(G,{children:[m("div",{style:{marginBottom:18},children:[m("div",{style:c.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",x("充值币种")]}),m("select",{style:{...c.select},value:e.currency,onInput:l=>{const b=l.target.value;t(h=>({...h,currency:b}))},children:[m("option",{value:"",disabled:!0,hidden:!0,children:x("请选择充值币种")}),s?.map(l=>m("option",{value:l.value,children:l.label}))]})]}),m("div",{style:{marginBottom:18},children:[m("div",{style:c.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",x("充值金额")]}),m("input",{type:"text",placeholder:x("请输入充值金额"),value:e.amount,onInput:l=>{const b=l.target.value;t(h=>({...h,amount:b,amountError:b.trim()?"":h.amountError}))},style:{...c.input,...e.amountError?c.inputError:{}}}),e.amountError&&m("div",{style:c.error,children:e.amountError})]}),m("div",{style:{marginBottom:24},children:[m("div",{style:c.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",x("支付平台")]}),m("select",{style:{...c.select,...e.rechargeChannelError?c.selectError:{}},value:e.rechargeChannel,onInput:l=>{const b=l.target.value;t(h=>({...h,rechargeChannel:b,rechargeChannelError:b?"":h.rechargeChannelError}))},children:[m("option",{value:"",disabled:!0,hidden:!0,children:x("请选择支付平台")}),a?.map(l=>m("option",{value:l.value,children:l.label}))]}),e.rechargeChannelError&&m("div",{style:c.error,children:e.rechargeChannelError})]}),e.error&&m("div",{style:{color:"#ff4d4f",marginBottom:12},children:e.error}),m("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[m("button",{type:"button",onClick:n,style:u,children:x("取消")}),m("button",{type:"submit",disabled:r,style:f,children:x(r?"提交中...":"去支付")})]})]})};function Ht(e,t){return function(){return e.apply(t,arguments)}}const{toString:Un}=Object.prototype,{getPrototypeOf:Je}=Object,{iterator:ge,toStringTag:Mt}=Symbol,ye=(e=>t=>{const n=Un.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),N=e=>(e=e.toLowerCase(),t=>ye(t)===e),we=e=>t=>typeof t===e,{isArray:K}=Array,ne=we("undefined");function Ln(e){return e!==null&&!ne(e)&&e.constructor!==null&&!ne(e.constructor)&&P(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const $t=N("ArrayBuffer");function In(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&$t(e.buffer),t}const zn=we("string"),P=we("function"),qt=we("number"),xe=e=>e!==null&&typeof e=="object",jn=e=>e===!0||e===!1,ce=e=>{if(ye(e)!=="object")return!1;const t=Je(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Mt in e)&&!(ge in e)},Hn=N("Date"),Mn=N("File"),$n=N("Blob"),qn=N("FileList"),Wn=e=>xe(e)&&P(e.pipe),Jn=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||P(e.append)&&((t=ye(e))==="formdata"||t==="object"&&P(e.toString)&&e.toString()==="[object FormData]"))},Vn=N("URLSearchParams"),[Gn,Kn,Xn,Zn]=["ReadableStream","Request","Response","Headers"].map(N),Qn=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function oe(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),K(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let a;for(r=0;r<s;r++)a=i[r],t.call(null,e[a],a,e)}}function Wt(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const $=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Jt=e=>!ne(e)&&e!==$;function Ne(){const{caseless:e}=Jt(this)&&this||{},t={},n=(r,o)=>{const i=e&&Wt(t,o)||o;ce(t[i])&&ce(r)?t[i]=Ne(t[i],r):ce(r)?t[i]=Ne({},r):K(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&oe(arguments[r],n);return t}const Yn=(e,t,n,{allOwnKeys:r}={})=>(oe(t,(o,i)=>{n&&P(o)?e[i]=Ht(o,n):e[i]=o},{allOwnKeys:r}),e),er=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)},nr=(e,t,n,r)=>{let o,i,s;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],(!r||r(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=n!==!1&&Je(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},rr=(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},or=e=>{if(!e)return null;if(K(e))return e;let t=e.length;if(!qt(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},ir=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Je(Uint8Array)),sr=(e,t)=>{const r=(e&&e[ge]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},ar=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},lr=N("HTMLFormElement"),cr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),lt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ur=N("RegExp"),Vt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};oe(n,(o,i)=>{let s;(s=t(o,i,e))!==!1&&(r[i]=s||o)}),Object.defineProperties(e,r)},fr=e=>{Vt(e,(t,n)=>{if(P(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(P(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},dr=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return K(e)?r(e):r(String(e).split(t)),n},pr=()=>{},hr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function _r(e){return!!(e&&P(e.append)&&e[Mt]==="FormData"&&e[ge])}const mr=e=>{const t=new Array(10),n=(r,o)=>{if(xe(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=K(r)?[]:{};return oe(r,(s,a)=>{const c=n(s,o+1);!ne(c)&&(i[a]=c)}),t[o]=void 0,i}}return r};return n(e,0)},br=N("AsyncFunction"),gr=e=>e&&(xe(e)||P(e))&&P(e.then)&&P(e.catch),Gt=((e,t)=>e?setImmediate:t?((n,r)=>($.addEventListener("message",({source:o,data:i})=>{o===$&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),$.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",P($.postMessage)),yr=typeof queueMicrotask<"u"?queueMicrotask.bind($):typeof process<"u"&&process.nextTick||Gt,wr=e=>e!=null&&P(e[ge]),d={isArray:K,isArrayBuffer:$t,isBuffer:Ln,isFormData:Jn,isArrayBufferView:In,isString:zn,isNumber:qt,isBoolean:jn,isObject:xe,isPlainObject:ce,isReadableStream:Gn,isRequest:Kn,isResponse:Xn,isHeaders:Zn,isUndefined:ne,isDate:Hn,isFile:Mn,isBlob:$n,isRegExp:ur,isFunction:P,isStream:Wn,isURLSearchParams:Vn,isTypedArray:ir,isFileList:qn,forEach:oe,merge:Ne,extend:Yn,trim:Qn,stripBOM:er,inherits:tr,toFlatObject:nr,kindOf:ye,kindOfTest:N,endsWith:rr,toArray:or,forEachEntry:sr,matchAll:ar,isHTMLForm:lr,hasOwnProperty:lt,hasOwnProp:lt,reduceDescriptors:Vt,freezeMethods:fr,toObjectSet:dr,toCamelCase:cr,noop:pr,toFiniteNumber:hr,findKey:Wt,global:$,isContextDefined:Jt,isSpecCompliantForm:_r,toJSONObject:mr,isAsyncFn:br,isThenable:gr,setImmediate:Gt,asap:yr,isIterable:wr};function E(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)}d.inherits(E,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:d.toJSONObject(this.config),code:this.code,status:this.status}}});const Kt=E.prototype,Xt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Xt[e]={value:e}});Object.defineProperties(E,Xt);Object.defineProperty(Kt,"isAxiosError",{value:!0});E.from=(e,t,n,r,o,i)=>{const s=Object.create(Kt);return d.toFlatObject(e,s,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),E.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const xr=null;function De(e){return d.isPlainObject(e)||d.isArray(e)}function Zt(e){return d.endsWith(e,"[]")?e.slice(0,-2):e}function ct(e,t,n){return e?e.concat(t).map(function(o,i){return o=Zt(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function Er(e){return d.isArray(e)&&!e.some(De)}const Sr=d.toFlatObject(d,{},null,function(t){return/^is[A-Z]/.test(t)});function Ee(e,t,n){if(!d.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=d.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,_){return!d.isUndefined(_[g])});const r=n.metaTokens,o=n.visitor||f,i=n.dots,s=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&d.isSpecCompliantForm(t);if(!d.isFunction(o))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(d.isDate(p))return p.toISOString();if(d.isBoolean(p))return p.toString();if(!c&&d.isBlob(p))throw new E("Blob is not supported. Use a Buffer instead.");return d.isArrayBuffer(p)||d.isTypedArray(p)?c&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function f(p,g,_){let y=p;if(p&&!_&&typeof p=="object"){if(d.endsWith(g,"{}"))g=r?g:g.slice(0,-2),p=JSON.stringify(p);else if(d.isArray(p)&&Er(p)||(d.isFileList(p)||d.endsWith(g,"[]"))&&(y=d.toArray(p)))return g=Zt(g),y.forEach(function(v,A){!(d.isUndefined(v)||v===null)&&t.append(s===!0?ct([g],A,i):s===null?g:g+"[]",u(v))}),!1}return De(p)?!0:(t.append(ct(_,g,i),u(p)),!1)}const l=[],b=Object.assign(Sr,{defaultVisitor:f,convertValue:u,isVisitable:De});function h(p,g){if(!d.isUndefined(p)){if(l.indexOf(p)!==-1)throw Error("Circular reference detected in "+g.join("."));l.push(p),d.forEach(p,function(y,w){(!(d.isUndefined(y)||y===null)&&o.call(t,y,d.isString(w)?w.trim():w,g,b))===!0&&h(y,g?g.concat(w):[w])}),l.pop()}}if(!d.isObject(e))throw new TypeError("data must be an object");return h(e),t}function ut(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Ve(e,t){this._pairs=[],e&&Ee(e,this,t)}const Qt=Ve.prototype;Qt.append=function(t,n){this._pairs.push([t,n])};Qt.toString=function(t){const n=t?function(r){return t.call(this,r,ut)}:ut;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function vr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Yt(e,t,n){if(!t)return e;const r=n&&n.encode||vr;d.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(o?i=o(t,n):i=d.isURLSearchParams(t)?t.toString():new Ve(t,n).toString(r),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class ft{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){d.forEach(this.handlers,function(r){r!==null&&t(r)})}}const en={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Rr=typeof URLSearchParams<"u"?URLSearchParams:Ve,Cr=typeof FormData<"u"?FormData:null,Tr=typeof Blob<"u"?Blob:null,kr={isBrowser:!0,classes:{URLSearchParams:Rr,FormData:Cr,Blob:Tr},protocols:["http","https","file","blob","url","data"]},Ge=typeof window<"u"&&typeof document<"u",Ue=typeof navigator=="object"&&navigator||void 0,Ar=Ge&&(!Ue||["ReactNative","NativeScript","NS"].indexOf(Ue.product)<0),Or=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Fr=Ge&&window.location.href||"http://localhost",Pr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ge,hasStandardBrowserEnv:Ar,hasStandardBrowserWebWorkerEnv:Or,navigator:Ue,origin:Fr},Symbol.toStringTag,{value:"Module"})),O={...Pr,...kr};function Br(e,t){return Ee(e,new O.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return O.isNode&&d.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Nr(e){return d.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Dr(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}function tn(e){function t(n,r,o,i){let s=n[i++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),c=i>=n.length;return s=!s&&d.isArray(o)?o.length:s,c?(d.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!a):((!o[s]||!d.isObject(o[s]))&&(o[s]=[]),t(n,r,o[s],i)&&d.isArray(o[s])&&(o[s]=Dr(o[s])),!a)}if(d.isFormData(e)&&d.isFunction(e.entries)){const n={};return d.forEachEntry(e,(r,o)=>{t(Nr(r),o,n,0)}),n}return null}function Ur(e,t,n){if(d.isString(e))try{return(t||JSON.parse)(e),d.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ie={transitional:en,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=d.isObject(t);if(i&&d.isHTMLForm(t)&&(t=new FormData(t)),d.isFormData(t))return o?JSON.stringify(tn(t)):t;if(d.isArrayBuffer(t)||d.isBuffer(t)||d.isStream(t)||d.isFile(t)||d.isBlob(t)||d.isReadableStream(t))return t;if(d.isArrayBufferView(t))return t.buffer;if(d.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Br(t,this.formSerializer).toString();if((a=d.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Ee(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),Ur(t)):t}],transformResponse:[function(t){const n=this.transitional||ie.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(d.isResponse(t)||d.isReadableStream(t))return t;if(t&&d.isString(t)&&(r&&!this.responseType||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?E.from(a,E.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:O.classes.FormData,Blob:O.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};d.forEach(["delete","get","head","post","put","patch"],e=>{ie.headers[e]={}});const Lr=d.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"]),Ir=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
2
2
|
`).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||t[n]&&Lr[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},dt=Symbol("internals");function Q(e){return e&&String(e).trim().toLowerCase()}function ue(e){return e===!1||e==null?e:d.isArray(e)?e.map(ue):String(e)}function zr(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 jr=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ke(e,t,n,r,o){if(d.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!d.isString(t)){if(d.isString(r))return t.indexOf(r)!==-1;if(d.isRegExp(r))return r.test(t)}}function Hr(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Mr(e,t){const n=d.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,s){return this[r].call(this,t,o,i,s)},configurable:!0})})}let B=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(a,c,u){const f=Q(c);if(!f)throw new Error("header name must be a non-empty string");const l=d.findKey(o,f);(!l||o[l]===void 0||u===!0||u===void 0&&o[l]!==!1)&&(o[l||c]=ue(a))}const s=(a,c)=>d.forEach(a,(u,f)=>i(u,f,c));if(d.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(d.isString(t)&&(t=t.trim())&&!jr(t))s(Ir(t),n);else if(d.isObject(t)&&d.isIterable(t)){let a={},c,u;for(const f of t){if(!d.isArray(f))throw TypeError("Object iterator must return a key-value pair");a[u=f[0]]=(c=a[u])?d.isArray(c)?[...c,f[1]]:[c,f[1]]:f[1]}s(a,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=Q(t),t){const r=d.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return zr(o);if(d.isFunction(n))return n.call(this,o,r);if(d.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Q(t),t){const r=d.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ke(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(s){if(s=Q(s),s){const a=d.findKey(r,s);a&&(!n||ke(r,r[a],a,n))&&(delete r[a],o=!0)}}return d.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||ke(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return d.forEach(this,(o,i)=>{const s=d.findKey(r,i);if(s){n[s]=ue(o),delete n[i];return}const a=t?Hr(i):String(i).trim();a!==i&&delete n[i],n[a]=ue(o),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return d.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&d.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
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[dt]=this[dt]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=Q(s);r[a]||(Mr(o,s),r[a]=!0)}return d.isArray(t)?t.forEach(i):i(t),this}};B.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);d.reduceDescriptors(B.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});d.freezeMethods(B);function Ae(e,t){const n=this||ie,r=t||n,o=B.from(r.headers);let i=r.data;return d.forEach(e,function(a){i=a.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function nn(e){return!!(e&&e.__CANCEL__)}function X(e,t,n){E.call(this,e??"canceled",E.ERR_CANCELED,t,n),this.name="CanceledError"}d.inherits(X,E,{__CANCEL__:!0});function rn(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new E("Request failed with status code "+n.status,[E.ERR_BAD_REQUEST,E.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function $r(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function qr(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,s;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),f=r[i];s||(s=u),n[o]=c,r[o]=u;let l=i,b=0;for(;l!==o;)b+=n[l++],l=l%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-s<t)return;const h=f&&u-f;return h?Math.round(b*1e3/h):void 0}}function Wr(e,t){let n=0,r=1e3/t,o,i;const s=(u,f=Date.now())=>{n=f,o=null,i&&(clearTimeout(i),i=null),e.apply(null,u)};return[(...u)=>{const f=Date.now(),l=f-n;l>=r?s(u,f):(o=u,i||(i=setTimeout(()=>{i=null,s(o)},r-l)))},()=>o&&s(o)]}const he=(e,t,n=3)=>{let r=0;const o=qr(50,250);return Wr(i=>{const s=i.loaded,a=i.lengthComputable?i.total:void 0,c=s-r,u=o(c),f=s<=a;r=s;const l={loaded:s,total:a,progress:a?s/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&f?(a-s)/u:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(l)},n)},pt=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},ht=e=>(...t)=>d.asap(()=>e(...t)),Jr=O.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,O.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(O.origin),O.navigator&&/(msie|trident)/i.test(O.navigator.userAgent)):()=>!0,Vr=O.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const s=[e+"="+encodeURIComponent(t)];d.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),d.isString(r)&&s.push("path="+r),d.isString(o)&&s.push("domain="+o),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Gr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Kr(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function on(e,t,n){let r=!Gr(t);return e&&(r||n==!1)?Kr(e,t):t}const _t=e=>e instanceof B?{...e}:e;function W(e,t){t=t||{};const n={};function r(u,f,l,b){return d.isPlainObject(u)&&d.isPlainObject(f)?d.merge.call({caseless:b},u,f):d.isPlainObject(f)?d.merge({},f):d.isArray(f)?f.slice():f}function o(u,f,l,b){if(d.isUndefined(f)){if(!d.isUndefined(u))return r(void 0,u,l,b)}else return r(u,f,l,b)}function i(u,f){if(!d.isUndefined(f))return r(void 0,f)}function s(u,f){if(d.isUndefined(f)){if(!d.isUndefined(u))return r(void 0,u)}else return r(void 0,f)}function a(u,f,l){if(l in t)return r(u,f);if(l in e)return r(void 0,u)}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,f,l)=>o(_t(u),_t(f),l,!0)};return d.forEach(Object.keys(Object.assign({},e,t)),function(f){const l=c[f]||o,b=l(e[f],t[f],f);d.isUndefined(b)&&l!==a||(n[f]=b)}),n}const sn=e=>{const t=W({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:a}=t;t.headers=s=B.from(s),t.url=Yt(on(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(d.isFormData(n)){if(O.hasStandardBrowserEnv||O.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((c=s.getContentType())!==!1){const[u,...f]=c?c.split(";").map(l=>l.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...f].join("; "))}}if(O.hasStandardBrowserEnv&&(r&&d.isFunction(r)&&(r=r(t)),r||r!==!1&&Jr(t.url))){const u=o&&i&&Vr.read(i);u&&s.set(o,u)}return t},Xr=typeof XMLHttpRequest<"u",Zr=Xr&&function(e){return new Promise(function(n,r){const o=sn(e);let i=o.data;const s=B.from(o.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=o,f,l,b,h,p;function g(){h&&h(),p&&p(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let _=new XMLHttpRequest;_.open(o.method.toUpperCase(),o.url,!0),_.timeout=o.timeout;function y(){if(!_)return;const v=B.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),k={data:!a||a==="text"||a==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:v,config:e,request:_};rn(function(D){n(D),g()},function(D){r(D),g()},k),_=null}"onloadend"in _?_.onloadend=y:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.indexOf("file:")===0)||setTimeout(y)},_.onabort=function(){_&&(r(new E("Request aborted",E.ECONNABORTED,e,_)),_=null)},_.onerror=function(){r(new E("Network Error",E.ERR_NETWORK,e,_)),_=null},_.ontimeout=function(){let A=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const k=o.transitional||en;o.timeoutErrorMessage&&(A=o.timeoutErrorMessage),r(new E(A,k.clarifyTimeoutError?E.ETIMEDOUT:E.ECONNABORTED,e,_)),_=null},i===void 0&&s.setContentType(null),"setRequestHeader"in _&&d.forEach(s.toJSON(),function(A,k){_.setRequestHeader(k,A)}),d.isUndefined(o.withCredentials)||(_.withCredentials=!!o.withCredentials),a&&a!=="json"&&(_.responseType=o.responseType),u&&([b,p]=he(u,!0),_.addEventListener("progress",b)),c&&_.upload&&([l,h]=he(c),_.upload.addEventListener("progress",l),_.upload.addEventListener("loadend",h)),(o.cancelToken||o.signal)&&(f=v=>{_&&(r(!v||v.type?new X(null,e,_):v),_.abort(),_=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const w=$r(o.url);if(w&&O.protocols.indexOf(w)===-1){r(new E("Unsupported protocol "+w+":",E.ERR_BAD_REQUEST,e));return}_.send(i||null)})},Qr=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const i=function(u){if(!o){o=!0,a();const f=u instanceof Error?u:this.reason;r.abort(f instanceof E?f:new X(f instanceof Error?f.message:f))}};let s=t&&setTimeout(()=>{s=null,i(new E(`timeout ${t} of ms exceeded`,E.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:c}=r;return c.unsubscribe=()=>d.asap(a),c}},Yr=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},eo=async function*(e,t){for await(const n of to(e))yield*Yr(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()}},mt=(e,t,n,r)=>{const o=eo(e,t);let i=0,s,a=c=>{s||(s=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:f}=await o.next();if(u){a(),c.close();return}let l=f.byteLength;if(n){let b=i+=l;n(b)}c.enqueue(new Uint8Array(f))}catch(u){throw a(u),u}},cancel(c){return a(c),o.return()}},{highWaterMark:2})},Se=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",an=Se&&typeof ReadableStream=="function",no=Se&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),ln=(e,...t)=>{try{return!!e(...t)}catch{return!1}},ro=an&&ln(()=>{let e=!1;const t=new Request(O.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),bt=64*1024,Le=an&&ln(()=>d.isReadableStream(new Response("").body)),_e={stream:Le&&(e=>e.body)};Se&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!_e[t]&&(_e[t]=d.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new E(`Response type '${t}' is not supported`,E.ERR_NOT_SUPPORT,r)})})})(new Response);const oo=async e=>{if(e==null)return 0;if(d.isBlob(e))return e.size;if(d.isSpecCompliantForm(e))return(await new Request(O.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(d.isArrayBufferView(e)||d.isArrayBuffer(e))return e.byteLength;if(d.isURLSearchParams(e)&&(e=e+""),d.isString(e))return(await no(e)).byteLength},io=async(e,t)=>{const n=d.toFiniteNumber(e.getContentLength());return n??oo(t)},so=Se&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:f,withCredentials:l="same-origin",fetchOptions:b}=sn(e);u=u?(u+"").toLowerCase():"text";let h=Qr([o,i&&i.toAbortSignal()],s),p;const g=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let _;try{if(c&&ro&&n!=="get"&&n!=="head"&&(_=await io(f,r))!==0){let k=new Request(t,{method:"POST",body:r,duplex:"half"}),F;if(d.isFormData(r)&&(F=k.headers.get("content-type"))&&f.setContentType(F),k.body){const[D,j]=pt(_,he(ht(c)));r=mt(k.body,bt,D,j)}}d.isString(l)||(l=l?"include":"omit");const y="credentials"in Request.prototype;p=new Request(t,{...b,signal:h,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:y?l:void 0});let w=await fetch(p,b);const v=Le&&(u==="stream"||u==="response");if(Le&&(a||v&&g)){const k={};["status","statusText","headers"].forEach(H=>{k[H]=w[H]});const F=d.toFiniteNumber(w.headers.get("content-length")),[D,j]=a&&pt(F,he(ht(a),!0))||[];w=new Response(mt(w.body,bt,D,()=>{j&&j(),g&&g()}),k)}u=u||"text";let A=await _e[d.findKey(_e,u)||"text"](w,e);return!v&&g&&g(),await new Promise((k,F)=>{rn(k,F,{data:A,headers:B.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:p})})}catch(y){throw g&&g(),y&&y.name==="TypeError"&&/Load failed|fetch/i.test(y.message)?Object.assign(new E("Network Error",E.ERR_NETWORK,e,p),{cause:y.cause||y}):E.from(y,y&&y.code,e,p)}}),Ie={http:xr,xhr:Zr,fetch:so};d.forEach(Ie,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const gt=e=>`- ${e}`,ao=e=>d.isFunction(e)||e===null||e===!1,cn={getAdapter:e=>{e=d.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){n=e[i];let s;if(r=n,!ao(n)&&(r=Ie[(s=String(n)).toLowerCase()],r===void 0))throw new E(`Unknown adapter '${s}'`);if(r)break;o[s||"#"+i]=r}if(!r){const i=Object.entries(o).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let s=t?i.length>1?`since :
|
|
4
4
|
`+i.map(gt).join(`
|
package/dist/best-unit.js
CHANGED
|
@@ -5,24 +5,22 @@ function To() {
|
|
|
5
5
|
console.log("Current time:", (/* @__PURE__ */ new Date()).toISOString());
|
|
6
6
|
}
|
|
7
7
|
function ko(e) {
|
|
8
|
-
const { merchant_id: t, biz_type: n, theme: r,
|
|
8
|
+
const { merchant_id: t, biz_type: n, theme: r, locale: o = "zh" } = e, i = "Bearer " + e.token;
|
|
9
9
|
return sessionStorage.setItem(
|
|
10
10
|
"fund_unit_params",
|
|
11
11
|
JSON.stringify({
|
|
12
12
|
merchantId: t,
|
|
13
13
|
bizType: n,
|
|
14
|
-
|
|
15
|
-
token: s,
|
|
14
|
+
token: i,
|
|
16
15
|
theme: r,
|
|
17
|
-
locale:
|
|
16
|
+
locale: o
|
|
18
17
|
})
|
|
19
18
|
), {
|
|
20
|
-
token:
|
|
19
|
+
token: i,
|
|
21
20
|
merchantId: t,
|
|
22
21
|
bizType: n,
|
|
23
22
|
theme: r,
|
|
24
|
-
|
|
25
|
-
locale: i
|
|
23
|
+
locale: o
|
|
26
24
|
};
|
|
27
25
|
}
|
|
28
26
|
const Ao = {
|
package/dist/types/global.d.ts
CHANGED
package/package.json
CHANGED
package/src/demo/App.tsx
CHANGED
|
@@ -14,7 +14,6 @@ export default function DemoApp() {
|
|
|
14
14
|
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NTM0MTM1MjksIm1lcmNoYW50X2lkIjoxMTI4LCJ0aW1lc3RhbXAiOjE3NTMxNTQzMjl9.UAvzq0P4HCnbJR1Ga3CgF6q3vk2RHiZRvnAFohBTHpw",
|
|
15
15
|
merchant_id: "1128",
|
|
16
16
|
biz_type: "ad",
|
|
17
|
-
user_id: "123",
|
|
18
17
|
locale: locale,
|
|
19
18
|
});
|
|
20
19
|
};
|
package/src/types/global.d.ts
CHANGED
|
@@ -2,18 +2,16 @@ export function initFundUnit(params: {
|
|
|
2
2
|
token: string;
|
|
3
3
|
merchant_id: string;
|
|
4
4
|
biz_type: string;
|
|
5
|
-
user_id: string;
|
|
6
5
|
theme?: string;
|
|
7
6
|
locale?: "zh" | "en";
|
|
8
7
|
}) {
|
|
9
|
-
const { merchant_id, biz_type, theme,
|
|
8
|
+
const { merchant_id, biz_type, theme, locale = "zh" } = params;
|
|
10
9
|
const token = "Bearer " + params.token;
|
|
11
10
|
sessionStorage.setItem(
|
|
12
11
|
"fund_unit_params",
|
|
13
12
|
JSON.stringify({
|
|
14
13
|
merchantId: merchant_id,
|
|
15
14
|
bizType: biz_type,
|
|
16
|
-
userId: user_id,
|
|
17
15
|
token,
|
|
18
16
|
theme,
|
|
19
17
|
locale,
|
|
@@ -24,7 +22,6 @@ export function initFundUnit(params: {
|
|
|
24
22
|
merchantId: merchant_id,
|
|
25
23
|
bizType: biz_type,
|
|
26
24
|
theme,
|
|
27
|
-
userId: user_id,
|
|
28
25
|
locale,
|
|
29
26
|
};
|
|
30
27
|
}
|