1import{cl as Se,r as t,j as e,cx as Ce,ct as G}from"./vendor-CWbTxbDJ.js";import{e as Ie,g as Me,a as Oe,u as Pe,t as N,N as Le}from"./index-CF-Nit-z.js";import{u as Be}from"./useAuthCheck-COTajCDz.js";import{S as $e,U as ke}from"./index-Cm0pyq_5.js";import{L as Re}from"./main-C7TXzVGt.js";import{P as Ae}from"./index-BmLFDtkL.js";import"./ui-vendor-BVdwggPR.js";import"./vip-CAw_bTAV.js";import"./vipApi-BfE34DRy.js";import"./projectApi-C6GqtqYk.js";const De="_pageWrapper_1ao7h_1",Te="_successOverlay_1ao7h_13",Ee="_successOverlayInner_1ao7h_29",Ue="_successOverlayIcon_1ao7h_53",He="_successOverlayContent_1ao7h_79",Ge="_successOverlayTitle_1ao7h_91",Fe="_successOverlayMessage_1ao7h_105",We="_successOverlayClose_1ao7h_117",ze="_messageCard_1ao7h_157",Ye="_messageCardError_1ao7h_181",Ve="_messageCardInfo_1ao7h_193",qe="_messageCardIcon_1ao7h_205",Je="_walletSummarySection_1ao7h_229",Ke="_walletSummaryGrid_1ao7h_237",Qe="_walletSummaryCard_1ao7h_249",Xe="_walletSummaryIcon_1ao7h_281",Ze="_walletSummaryIconGold_1ao7h_305",ea="_walletSummaryIconBalance_1ao7h_315",aa="_walletSummaryContent_1ao7h_325",sa="_walletSummaryHeader_1ao7h_335",na="_walletSummaryTitle_1ao7h_349",ta="_walletSummaryValue_1ao7h_363",ca="_walletSummaryLinks_1ao7h_377",la="_walletLink_1ao7h_389",ra="_walletActionButton_1ao7h_425",oa="_sectionHeading_1ao7h_457",ia="_rechargeOptionsGrid_1ao7h_471",da="_rechargeOptionCard_1ao7h_483",ma="_rechargeOptionCardSelected_1ao7h_523",ha="_rechargeOptionBadge_1ao7h_535",ua="_rechargeOptionTestBadge_1ao7h_563",xa="_rechargeOptionSavingsBadge_1ao7h_571",pa="_coinIcon_1ao7h_587",ya="_coinAmount_1ao7h_599",fa="_coinLabel_1ao7h_611",ga="_priceTag_1ao7h_621",wa="_paymentMethodsGrid_1ao7h_657",ja="_paymentMethodCard_1ao7h_669",_a="_paymentMethodCardSelected_1ao7h_705",Na="_paymentMethodIcon_1ao7h_715",ba="_paymentMethodIconBalance_1ao7h_737",va="_paymentMethodIconWechat_1ao7h_747",Sa="_paymentMethodIconAlipay_1ao7h_752",Ca="_paymentMethodMeta_1ao7h_758",Ia="_paymentMethodIndicator_1ao7h_784",Ma="_paymentMethodIndicatorInner_1ao7h_806",Oa="_confirmSection_1ao7h_820",Pa="_confirmCard_1ao7h_828",La="_confirmRows_1ao7h_850",Ba="_confirmRow_1ao7h_850",$a="_confirmRowTotal_1ao7h_886",ka="_primaryActionButton_1ao7h_908",Ra="_primaryActionButtonDisabled_1ao7h_952",Aa="_infoCard_1ao7h_968",Da="_infoHeader_1ao7h_984",Ta="_infoIcon_1ao7h_1004",Ea="_infoList_1ao7h_1026",Ua="_infoListItem_1ao7h_1046",Ha="_infoListIndex_1ao7h_1056",a={pageWrapper:De,successOverlay:Te,successOverlayInner:Ee,successOverlayIcon:Ue,successOverlayContent:He,successOverlayTitle:Ge,successOverlayMessage:Fe,successOverlayClose:We,messageCard:ze,messageCardError:Ye,messageCardInfo:Ve,messageCardIcon:qe,walletSummarySection:Je,walletSummaryGrid:Ke,walletSummaryCard:Qe,walletSummaryIcon:Xe,walletSummaryIconGold:Ze,walletSummaryIconBalance:ea,walletSummaryContent:aa,walletSummaryHeader:sa,walletSummaryTitle:na,walletSummaryValue:ta,walletSummaryLinks:ca,walletLink:la,walletActionButton:ra,sectionHeading:oa,rechargeOptionsGrid:ia,rechargeOptionCard:da,rechargeOptionCardSelected:ma,rechargeOptionBadge:ha,rechargeOptionTestBadge:ua,rechargeOptionSavingsBadge:xa,coinIcon:pa,coinAmount:ya,coinLabel:fa,priceTag:ga,paymentMethodsGrid:wa,paymentMethodCard:ja,paymentMethodCardSelected:_a,paymentMethodIcon:Na,paymentMethodIconBalance:ba,paymentMethodIconWechat:va,paymentMethodIconAlipay:Sa,paymentMethodMeta:Ca,paymentMethodIndicator:Ia,paymentMethodIndicatorInner:Ma,confirmSection:Oa,confirmCard:Pa,confirmRows:La,confirmRow:Ba,confirmRowTotal:$a,primaryActionButton:ka,primaryActionButtonDisabled:Ra,infoCard:Aa,infoHeader:Da,infoIcon:Ta,infoList:Ea,infoListItem:Ua,infoListIndex:Ha},es=()=>{const ne=Se(),{openLoginModal:te}=Ie(),h=Me(),s=n=>N(n,h),ce=h==="en"?"en-US":h==="zh-Hant"?"zh-HK":"zh-CN",j=n=>n.toLocaleString(ce),l=Oe()==="master",le=l?"$":"Â¥",F=l?"USD":"CNY",p=n=>`${le}${n.toFixed(2)}`;Be(!0,"/register-login",!1,"admin",!0);const[u,re]=t.useState(0),[o,W]=t.useState(""),[B,y]=t.useState(!1),[z,Y]=t.useState(0),[Ga,oe]=t.useState(0),[b,V]=t.useState(0),[v,$]=t.useState(!1),[q,d]=t.useState(null),[I,f]=t.useState(null),[ie,k]=t.useState(!1),[m,R]=t.useState(null),[de,J]=t.useState(!1),[S,K]=t.useState(null),[_,A]=t.useState(null),[Q,D]=t.useState(!1),[me,g]=t.useState(""),[he,X]=t.useState(!0),i=t.useRef(null),{user:T,isAuthenticated:E,isAuthLoading:Z}=Pe(),M="/api",U=(()=>
1{if(l)return[{coins:300,rmb:1,currency:"USD"},{coins:1e4,rmb:20,currency:"USD",savingsPercent:67},{coins:5e4,rmb:100,currency:"USD",savingsPercent:67}];const n=[{coins:500,rmb:10,currency:"CNY"},{coins:8e3,rmb:100,currency:"CNY",savingsPercent:60},{coins:24e3,rmb:300,currency:"CNY",savingsPercent:60},{coins:85e3,rmb:1e3,currency:"CNY",savingsPercent:70}];return T&&T.role==="admin"?[{coins:5,rmb:.1,currency:"CNY"},...n]:n})();t.useEffect(()=>{l&&(W(n=>n||"creem"),$(!1))},[l]),t.useEffect(()=>{if(!I)return;const n=window.setTimeout(()=>{f(null)},3800);return()=>{window.clearTimeout(n)}},[I]);const ue=()=>{f(null)},H=t.useCallback(async()=>{try{const n=await fetch(`${M}/user-coins/`,{headers:{"Content-Type":"application/json"},credentials:"include"});if(!n.ok)throw new Error(`${N("wallet.fetchInfoFailed",h)}ï¼${N("wallet.statusCode",h)}: ${n.status}`);const c=await n.json();c.status==="success"?(Y(c.data.coins||0),oe(c.data.points||0),V(c.data.balance||0)):d(c.message||N("wallet.fetchInfoFailed",h))}catch(n){console.error("è·åé±å
ä¿¡æ¯é误:",n),d(n instanceof Error?n.message:N("wallet.fetchInfoFailed",h))}},[M,h]);t.useEffect(()=>{const n=document.title;document.title=N("wallet.seoTitle",h);let c=!0;return Z?X(!0):(async()=>{E&&await H(),c&&X(!1)})(),()=>{c=!1,document.title=n}},[E,Z,H,h]);const xe=n=>{re(n),d(null),f(null)},O=n=>{W(n),$(!l&&n==="balance"),d(null),f(null)},pe=async()=>{if(!E||!T){d(s("wallet.loginRequired")),te("login");return}if(u>0&&o){y(!0),d(null),f(null);try{const n=U.find(w=>w.rmb===u);if(!n)throw new Error(s("wallet.invalidRechargeAmount"));const c=l?0:ee(),P=l?n.rmb:C();let r=null;if(P>0)try{r=window.open("about:blank","vicrocode-payment"),i.current=r,r&&!r.closed&&(r.opener=null,r.document.title=s("paymentDialog.title"),r.document.body.innerHTML='<p style="font:16px/1.7 system-ui;padding:40px;color:#334155">æ£å¨çæå®å
¨æ¯ä»é¾æ¥ï¼è¯·ç¨åâ¦</p>')}catch{r=null}const L=await fetch(`${M}/recharge/`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({payment_method:l?"creem":o==="balance"?"balance":o,payment_amount:n.rmb,payment_currency:F,coins_obtained:n.coins,use_balance_deduction:!l&&v,balance_deduction_amount:c,actual_payment_amount:P})});if(!L.ok){const w=await L.json().catch(()=>({}));throw new Error(w.message||`${s("wallet.createRechargeFailed")}ï¼${s("wallet.statusCode")}: ${L.status}`)}const x=await L.json();if(x.recharge_id){if(!l&&x.actual_payment_amount===0&&x.balance_deduction_amount>0){R({rechargeId:x.recharge_id,selectedOption:n,balanceDeduction:c,actualPaymentAmount:x.actual_payment_amount,balanceDeductionAmount:x.balance_deduction_amount}),k(!0),y(!1);return}const w=x.payment_url||x.pay_url;if(w){A({rechargeId:Number(x.recharge_id),paymentUrl:String(w),amount:Number(x.actual_payment_amount??P)});const se=!!(r&&!r.closed);if(g(se?"":s("paymentDialog.popupBlocked")),y(!1),se&&r)try{r.location.replace(w)}catch{g(s("paymentDialog.popupBlocked"))}return}r&&!r.closed&&r.close(),d(s("wallet.paymentLinkMissing")),y(!1)}else r&&!r.closed&&r.close(),d(s("wallet.createRechargeFailed")),y(!1)}catch(n){i.current&&!i.current.closed&&i.current.close(),i.current=null,console.error("å
å¼å¤çé误:",n),d(n instanceof Error?n.message:s("wallet.rechargeProcessFailed")),y(!1)}}},ye=()=>{if(u>0){const n=U.find(c=>c.rmb===u);return n?`${j(n.coins)} ${s("wallet.coins")}`:s("wallet.selectRechargeAmount")}return s("wallet.selectRechargeAmount")},fe=()=>{if(o)switch(o){case"creem":return"Creem";case"wechat":return s("wallet.wechatPay");case"alipay":return"æ¯ä»å®";case"balance":return s("wallet.balancePay");default:return o}return s("wallet.selectPaymentMethod")},ge=()=>p(u),ee=()=>l||!v||u<=0?0:Math.min(b,u),C=()=>u-ee(),we=()=>p(C()),je=async()=>{m&&(y(!0),k(!1),f(s("wallet.balanceRechargeProcessing")),setTimeout(()=>{f(s("wallet.balanceRechargePending")),setTimeout(()=>{Y(n=>n+m.selectedOption.coins),V(n=>n-m.balanceDeduction),K({coins:m.selectedOption.coins,balanceDeduction:m.balanceDeduction,newBalance:z+m.selectedOption.coins,newUserBalance:b-m.balanceDeduction}),J(!0),y(!1),R(null)},1500)},1e3))},_e=()=>{k(!1),R(null),d(s("wallet.balanceRechargeCancelled"))},Ne=()=>{J(!1),K(null),window.location.reload()},be=async()=>
1{if(!(!_||Q)){D(!0),g("");try{const n=await fetch(`${M}/recharge/${encodeURIComponent(_.rechargeId)}/status/`,{method:"GET",credentials:"include"}),c=await n.json().catch(()=>({}));if(!n.ok||c.status!=="success")throw new Error(c.message||s("paymentDialog.pending"));if(c.payment_status==="completed"){i.current&&!i.current.closed&&i.current.close(),i.current=null,A(null),g(""),await H(),f(s("paymentDialog.completed"));return}g(c.message||s("paymentDialog.pending"))}catch(n){g(n instanceof Error?n.message:s("paymentDialog.pending"))}finally{D(!1)}}},ve=()=>{i.current&&!i.current.closed&&i.current.close(),i.current=null,A(null),g(""),D(!1),d(s("paymentDialog.unableNotice"))},ae=()=>u<=0||!o||B;return e.jsxs("div",{className:a.pageWrapper,children:[e.jsx(Ce,{position:"top-center",autoClose:2e3,hideProgressBar:!1,newestOnTop:!1,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!0,draggable:!0,pauseOnHover:!0,theme:"light"}),I&&e.jsx("div",{className:a.successOverlay,children:e.jsxs("div",{className:a.successOverlayInner,children:[e.jsx("div",{className:a.successOverlayIcon,children:e.jsx("i",{className:"fas fa-check"})}),e.jsxs("div",{className:a.successOverlayContent,children:[e.jsx("h4",{className:a.successOverlayTitle,children:s("wallet.operationNotice")}),e.jsx("p",{className:a.successOverlayMessage,children:I})]}),e.jsx("button",{type:"button",className:a.successOverlayClose,onClick:ue,"aria-label":s("wallet.closeNotice"),children:e.jsx("i",{className:"fas fa-times"})})]})}),e.jsx(Le,{}),e.jsx($e,{}),e.jsx("main",{className:"ml-0 lg:ml-72 mt-16 min-h-screen bg-secondary",children:he?e.jsx("div",{className:"flex items-center justify-center min-h-[60vh] p-6",children:e.jsx(Re,{message:s("wallet.loadingInfo"),size:"large",fullScreen:!1})}):e.jsxs("div",{className:"p-4 sm:p-6",children:[e.jsx(ke,{eyebrow:"MY OFFICE / WALLET",title:s("wallet.title"),description:s("wallet.personalCenter")}),q&&e.jsxs("div",{className:`${a.messageCard} ${a.messageCardError}`,children:[e.jsx("div",{className:a.messageCardIcon,children:e.jsx("i",{className:"fas fa-exclamation-circle"})}),e.jsxs("div",{children:[e.jsx("div",{children:e.jsx("strong",{children:s("wallet.errorTitle")})}),e.jsx("div",{children:q})]})]}),!l&&B&&v&&C()===0&&e.jsxs("div",{className:`${a.messageCard} ${a.messageCardInfo}`,children:[e.jsx("div",{className:a.messageCardIcon,children:e.jsx("i",{className:"fas fa-spinner fa-spin"})}),e.jsxs("div",{children:[e.jsx("div",{children:e.jsx("strong",{children:s("wallet.balanceProcessingTitle")})}),e.jsx("div",{children:s("wallet.balanceProcessingDesc")})]})]}),e.jsx("section",{className:a.walletSummarySection,children:e.jsxs("div",{className:a.walletSummaryGrid,children:[e.jsxs("div",{className:a.walletSummaryCard,children:[e.jsx("div",{className:`${a.walletSummaryIcon} ${a.walletSummaryIconGold}`,children:e.jsx("i",{className:"fas fa-coins"})}),e.jsxs("div",{className:a.walletSummaryContent,children:[e.jsx("h3",{className:a.walletSummaryTitle,children:s("wallet.coinWallet")}),e.jsx("p",{className:a.walletSummaryValue,children:j(z)}),e.jsxs("div",{className:a.walletSummaryLinks,children:[e.jsx(G,{to:"/user-purchase-records",className:a.walletLink,children:s("wallet.purchaseRecords")}),e.jsx(G,{to:"/recharge-records",className:a.walletLink,children:s("wallet.rechargeRecords")})]})]})]}),!l&&e.jsxs("div",{className:a.walletSummaryCard,children:[e.jsx("div",{className:`${a.walletSummaryIcon} ${a.walletSummaryIconBalance}`,children:e.jsx("i",{className:"fas fa-wallet"})}),e.jsxs("div",{className:a.walletSummaryContent,children:[e.jsxs("div",{className:a.walletSummaryHeader,children:[e.jsx("h3",{className:a.walletSummaryTitle,children:s("wallet.balance")}),e.jsx("button",{onClick:()=>ne("/user-withdrawal"),className:a.walletActionButton,children:s("wallet.withdraw")})]}),e.jsxs("p",{className:a.walletSummaryValue,children:["Â¥",b.toFixed(2)]}),e.jsx("div",{className:a.walletSummaryLinks,children:e.jsx(G,{to:"/earnings-records",className:a.walletLink,children:s("wallet.earningsRecords")})})]})]})]})}),e.jsxs("section",{className:"mb-8",children:[e.jsx("h2",{className:a.sectionHeading,children:s("wallet.chooseAmount")}),e.jsx("div",{className:a.rechargeOptionsGrid,children:U.map((n,c)=>e.jsxs("div",{onClick:()=>xe(n.rmb),className:`${a.rechargeOptionCard} ${u===n.rmb?a.rechargeOptionCardSelected:""}`,children:[c===1&&e.jsx("div",{className:a.rechargeOptionBadge,children:s("wallet.recommended")}),n.rmb===.1&&e.jsx("div",{className:`${a.rechargeOptionBadge} ${a.rechargeOptionTestBadge}`,children:s("wallet.test")}),n.savingsPercent!==void 0&&e.jsxs("div",{className:`${a.rechargeOptionBadge} ${a.rechargeOptionSavingsBadge}`,children:[s("wallet.savePercentPrefix"),n.savingsPercent,s("wallet.savePercentSuffix")]}),e.jsx("i",{className:`fas fa-coins ${a.coinIcon}`}),e.jsx("span",{className:a.coinAmount,children:j(n.coins)}),e.jsx("span",{className:a.coinLabel,children:s("wallet.coins")}),e.jsx("div",{className:a.priceTag,children:p(n.rmb)})]},`${n.currency||F}-${n.rmb}-${n.coins}`))})]}),e.jsxs("section",{className:"mb-8",children:[e.jsx("h2",{className:a.sectionHeading,children:s("wallet.choosePaymentMethod")}),e.jsx("div",{className:a.paymentMethodsGrid,children:l?e.jsxs("div",{onClick:()=>O("creem"),className:`${a.paymentMethodCard} ${o==="creem"?a.paymentMethodCardSelected:""}`,children:[e.jsx("div",{className:`${a.paymentMethodIcon} ${a.paymentMethodIconBalance}`,children:e.jsx("i",{className:"fas fa-credit-card"})}),e.jsxs("div",{className:a.paymentMethodMeta,children:[e.jsx("h3",{children:"Creem"}),e.jsx("p",{children:"USD checkout"})]}),e.jsx("div",{className:a.paymentMethodIndicator,children:o==="creem"&&e.jsx("span",{className:a.paymentMethodIndicatorInner})})]}):e.jsxs(e.Fragment,{children:[b>0&&e.jsxs("div",{onClick:()=>O("balance"),className:`${a.paymentMethodCard} ${o==="balance"?a.paymentMethodCardSelected:""}`,children:[e.jsx("div",{className:`${a.paymentMethodIcon} ${a.paymentMethodIconBalance}`,children:e.jsx("i",{className:"fas fa-wallet"})}),e.jsxs("div",{className:a.paymentMethodMeta,children:[e.jsx("h3",{children:s("wallet.balancePay")}),e.jsxs("p",{children:[s("wallet.balancePayDesc")," Â¥",b.toFixed(2)]})]}),e.jsx("div",{className:a.paymentMethodIndicator,children:o==="balance"&&e.jsx("span",{className:a.paymentMethodIndicatorInner})})]}),e.jsxs("div",{onClick:()=>O("wechat"),className:`${a.paymentMethodCard} ${o==="wechat"?a.paymentMethodCardSelected:""}`,children:[e.jsx("div",{className:`${a.paymentMethodIcon} ${a.paymentMethodIconWechat}`,children:e.jsx("i",{className:"fab fa-weixin"})}),e.jsxs("div",{className:a.paymentMethodMeta,children:[e.jsx("h3",{children:s("wallet.wechatPay")}),e.jsx("p",{children:s("wallet.wechatPayDesc")})]}),e.jsx("div",{className:a.paymentMethodIndicator,children:o==="wechat"&&e.jsx("span",{className:a.paymentMethodIndicatorInner})})]}),e.jsxs("div",{onClick:()=>O("alipay"),className:`${a.paymentMethodCard} ${o==="alipay"?a.paymentMethodCardSelected:""}`,children:[e.jsx("div",{className:`${a.paymentMethodIcon} ${a.paymentMethodIconAlipay}`,children:e.jsx("i",{className:"fab fa-alipay"})}),e.jsxs("div",{className:a.paymentMethodMeta,children:[e.jsx("h3",{children:"æ¯ä»å®"}),e.jsx("p",{children:"æ¯æçµèç½ç«åææºç½ç«å®å
¨æ¯ä»"})]}),e.jsx("div",{className:a.paymentMethodIndicator,children:o==="alipay"&&e.jsx("span",{className:a.paymentMethodIndicatorInner})})]})]})})]}),e.jsx("section",{className:a.confirmSection,children:e.jsxs("div",{className:a.confirmCard,children:[e.jsx("h3",{className:a.sectionHeading,children:s("wallet.confirmRechargeTitle")}),e.jsxs("div",{className:a.confirmRows,children:[e.jsxs("div",{className:a.confirmRow,children:[e.jsx("span",{children:s("wallet.confirmCoins")}),e.jsx("span",{children:ye()})]}),e.jsxs("div",{className:a.confirmRow,children:[e.jsx("span",{children:s("wallet.paymentMethod")}),e.jsx("span",{children:fe()})]}),e.jsxs("div",{className:a.confirmRow,children:[e.jsx("span",{children:s("wallet.rechargeAmount")}),e.jsx("span",{children:ge()})]}),e.jsxs("div",{className:`${a.confirmRow} ${a.confirmRowTotal}`,children:[e.jsx("span",{children:s("wallet.actualPayment")}),e.jsx("span",{children:we()})]})]}),e.jsx("button",{onClick:pe,disabled:ae(),className:`${a.primaryActionButton} ${ae()?a.primaryActionButtonDisabled:""}`,children:B?e.jsxs(e.Fragment,{children:[e.jsx("i",{className:"fas fa-spinner fa-spin"}),v&&C()===0?s("wallet.balanceDeductionProcessingShort"):s("wallet.processing")]}):e.jsxs(e.Fragment,{children:[e.jsx("i",{className:"fas fa-credit-card"}),v&&C()===0?s("wallet.confirmBalanceRecharge"):s("wallet.confirmRecharge")]})})]})}),e.jsx("section",{className:"mb-12",children:e.jsxs("div",{className:a.infoCard,children:[e.jsxs("div",{className:a.infoHeader,children:[e.jsx("span",{className:a.infoIcon,children:e.jsx("i",{className:"fas fa-info"})}),e.jsx("span",{children:s("wallet.instructionsTitle")})]}),e.jsx("ul",{className:a.infoList,children:l?e.jsxs(e.Fragment,{children:[e.jsxs("li",{className:a.infoListItem,children:[e.jsx("span",{className:a.infoListIndex,children:"1."}),e.jsx("span",{children:"Gold will be credited after Creem confirms the payment."})]}),e.jsxs("li",{className:a.infoListItem,children:[e.jsx("span",{className:a.infoListIndex,children:"2."}),e.jsx("span",{children:"International checkout is settled in USD."})]}),e.jsxs("li",{className:a.infoListItem,children:[e.jsx("span",{className:a.infoListIndex,children:"3."}),e.jsx("span",{children:"You can review completed orders in Recharge Records."})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("li",{className:a.infoListItem,children:[e.jsx("span",{className:a.infoListIndex,children:"1."}),e.jsx("span",{children:s("wallet.instruction1")})]}),e.jsxs("li",{className:a.infoListItem,children:[e.jsx("span",{className:a.infoListIndex,children:"2."}),e.jsx("span",{children:s("wallet.instruction2")})]}),e.jsxs("li",{className:a.infoListItem,children:[e.jsx("span",{className:a.infoListIndex,children:"3."}),e.jsx("span",{children:s("wallet.instruction3")})]}),e.jsxs("li",{className:a.infoListItem,children:[e.jsx("span",{className:a.infoListIndex,children:"4."}),e.jsx("span",{children:s("wallet.instruction4")})]})]})})]})})]})}),e.jsx(Ae,{open:!!_,paymentUrl:_?.paymentUrl||"",amountText:_?p(_.amount):"",checking:Q,statusMessage:me,onPaid:be,onUnable:ve}),!l&&ie&&m&&e.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:e.jsxs("div",{className:"bg-white rounded-xl p-6 max-w-md w-full mx-4 shadow-2xl",children:[e.jsxs("div",{className:"text-center mb-6",children:[e.jsx("div",{className:"w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mx-auto mb-4",children:e.jsx("i",{className:"fas fa-wallet text-blue-500 text-2xl"})}),e.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-2",children:s("wallet.balancePaymentConfirmTitle")}),e.jsx("p",{className:"text-gray-600",children:s("wallet.balancePaymentConfirmDesc")})]}),e.jsx("div",{className:"bg-gray-50 rounded-lg p-4 mb-6",children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsxs("span",{className:"text-gray-600",children:[s("wallet.confirmCoins"),":"]}),e.jsxs("span",{className:"font-semibold text-orange-500",children:[j(m.selectedOption.coins)," ",s("wallet.coins")]})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-gray-600",children:s("wallet.originalPrice")}),e.jsx("span",{className:"text-gray-900",children:p(m.selectedOption.rmb)}
1)]}),e.jsxs("div",{className:"flex justify-between text-red-500",children:[e.jsx("span",{children:s("wallet.balanceDeduction")}),e.jsxs("span",{className:"font-semibold",children:["-",p(m.balanceDeduction)]})]}),e.jsx("div",{className:"border-t pt-3",children:e.jsxs("div",{className:"flex justify-between",children:[e.jsxs("span",{className:"text-gray-600 font-medium",children:[s("wallet.actualPayment"),":"]}),e.jsx("span",{className:"text-green-600 font-bold text-lg",children:p(0)})]})})]})}),e.jsxs("div",{className:"flex space-x-3",children:[e.jsx("button",{onClick:_e,className:"flex-1 py-3 px-4 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50 transition-colors",children:s("wallet.cancel")}),e.jsxs("button",{onClick:je,className:"flex-1 py-3 px-4 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors font-medium",children:[e.jsx("i",{className:"fas fa-check mr-2"}),s("wallet.confirmPayment")]})]})]})}),!l&&de&&S&&e.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:e.jsxs("div",{className:"bg-white rounded-xl p-6 max-w-md w-full mx-4 shadow-2xl",children:[e.jsxs("div",{className:"text-center mb-6",children:[e.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4",children:e.jsx("i",{className:"fas fa-check-circle text-green-500 text-2xl"})}),e.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-2",children:s("wallet.successTitle")}),e.jsx("p",{className:"text-gray-600",children:s("wallet.successDesc")})]}),e.jsx("div",{className:"bg-green-50 rounded-lg p-4 mb-6",children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-gray-600",children:s("wallet.coinsObtained")}),e.jsxs("span",{className:"font-semibold text-orange-500",children:["+",j(S.coins)," ",s("wallet.coins")]})]}),e.jsxs("div",{className:"flex justify-between text-red-500",children:[e.jsx("span",{children:s("wallet.balanceDeduction")}),e.jsxs("span",{className:"font-semibold",children:["-",p(S.balanceDeduction)]})]}),e.jsxs("div",{className:"border-t pt-3",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-gray-600",children:s("wallet.currentCoins")}),e.jsx("span",{className:"text-orange-600 font-bold",children:j(S.newBalance)})]}),e.jsxs("div",{className:"flex justify-between mt-1",children:[e.jsx("span",{className:"text-gray-600",children:s("wallet.currentBalance")}),e.jsx("span",{className:"text-green-600 font-bold",children:p(S.newUserBalance)})]})]})]})}),e.jsxs("button",{onClick:Ne,className:"w-full py-3 px-4 bg-green-600 text-white rounded-lg hover:bg-green-700 transition-colors font-medium",children:[e.jsx("i",{className:"fas fa-check mr-2"}),s("wallet.gotIt")]})]})})]})};export{es as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.