1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6833],{96833:function(e,t,a){a.r(t),a.d(t,{default:function(){return b}});var s=a(57437),r=a(542),n=a.n(r),i=a(2265),l=a(3274),c=a(13231),d=a(74697),o=a(76780),x=a(55430),m=a(92513),u=a(34045);function h(e){let t=Number(e)||0;return Number.isInteger(t)?t.toLocaleString():t.toFixed(2).replace(/\.?0+$/,"")}function p(e){let{usage:t}=e,[a,r]=(0,i.useState)(!1);if((0,i.useEffect)(()=>{let e=setTimeout(()=>r(!0),80);return()=>clearTimeout(e)},[]),"none"===t.kind)return null;if("unlimited"===t.kind)return(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center px-2",title:"Your plan includes unlimited AI usage",children:[(0,s.jsx)("div",{className:"flex h-[84px] w-[84px] items-center justify-center rounded-full border-[7px] border-white/25",children:(0,s.jsx)("span",{className:"text-2xl font-bold",children:"â"})}),(0,s.jsx)("p",{className:"mt-1.5 text-[11px] text-teal-100",children:"Unlimited AI usage"})]});let n=Math.max(0,t.pct),l=2*Math.PI*30;return(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center px-2",title:"Share of the AI usage included with your plan that you've used this billing cycle. Resets when your plan renews.",children:[(0,s.jsxs)("div",{className:"relative h-[84px] w-[84px]",children:[(0,s.jsxs)("svg",{viewBox:"0 0 72 72",className:"h-full w-full -rotate-90",children:[(0,s.jsx)("circle",{cx:"36",cy:"36",r:30,fill:"none",stroke:"rgba(255,255,255,0.22)",strokeWidth:"7"}),(0,s.jsx)("circle",{cx:"36",cy:"36",r:30,fill:"none",stroke:n>=100?"#fda4af":n>=70?"#fcd34d":"#6ee7b7",strokeWidth:"7",strokeLinecap:"round",strokeDasharray:l,strokeDashoffset:l*(1-(a?Math.min(n,100):0)/100),style:{transition:"stroke-dashoffset 900ms cubic-bezier(.4,0,.2,1)"}})]}),(0,s.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[(0,s.jsxs)("span",{className:"text-lg font-bold leading-none",children:[Math.round(n),"%"]}),(0,s.jsx)("span",{className:"mt-0.5 text-[9px] uppercase tracking-wider text-teal-100",children:"used"})]})]}),(0,s.jsx)("p",{className:"mt-1.5 max-w-[120px] text-center text-[11px] leading-tight text-teal-100",children:n>=100?t.overageCredits>0?"Plan usage full â credits covering extra":"Plan usage full":"AI usage this cycle"})]})}let g={signup_bonus:"Welcome bonus",topup_stripe:"Top-up (card)",topup_nowpayments:"Top-up (crypto)",spend_auto_apply:"Tailored resume",spend_codebase_answer:"Codebase Mode answer",spend_usage_overage:"AI usage overage",spend_mock_interview_livekit:"Mock interview (live)",spend_mock_interview_pretrain:"Mock interview (chat)",spend_resume_tailor:"Resume tailoring",spend_cover_letter:"Cover letter",refund_auto_apply:"Refund (auto-apply)",admin_adjust:"Adjustment"};function b(){let[e,t]=(0,i.useState)(null),[a,r]=(0,i.useState)(!0),[u,b]=(0,i.useState)(null),[k,j]=(0,i.useState)(!1),[N,w]=(0,i.useState)(null),[v,C]=(0,i.useState)(!1),S=(0,i.useCallback)(async()=>{b(null);try{let e=await fetch("/api/account/credits",{credentials:"include"});if(!e.ok){b("Failed to load credits (".concat(e.status,")"));return}let a=await e.json();t(a);try{window.dispatchEvent(new Event("credits:changed"))}catch(e){}}catch(e){b((null==e?void 0:e.message)||"Failed to load credits")}finally{r(!1)}},[]);return((0,i.useEffect)(()=>{S()},[S]),(0,i.useEffect)(()=>{let e=new URLSearchParams(window.location.search),t=e.get("topup");if("success"===t){w("Payment received! Your credits should appear within a few seconds. Refreshingâ¦");let e=0,t=()=>{e++,S(),e<6&&setTimeout(t,2e3)};setTimeout(t,1500)}else"cancelled"===t&&C(!0);if(t){e.delete("topup"),e.delete("provider");let t=e.toString(),a=window.location.pathname+(t?"?".concat(t):"");window.history.replaceState({},"",a)}},[S]),a)?(0,s.jsxs)("div",{className:"flex items-center justify-center p-12 text-gray-500 dark:text-ink-400",children:[(0,s.jsx)(l.Z,{className:"h-5 w-5 animate-spin mr-2"}),"Loading creditsâ¦"]}):u||!e?(0,s.jsxs)("div",{className:"rounded border border-red-200 bg-red-50 p-4 text-sm text-red-800",children:[u||"Could not load credits",(0,s.jsx)("button",{onClick:S,className:"ml-3 underline text-red-900 hover:text-red-700",children:"Retry"})]}):(0,s.jsxs)("div",{className:"space-y-6",children:[N&&(0,s.jsxs)("div",{className:"rounded-lg border border-emerald-200 bg-emerald-50 p-3 text-sm text-emerald-800 flex items-start gap-2",children:[(0,s.jsx)(c.Z,{className:"h-5 w-5 shrink-0 text-emerald-600"}),(0,s.jsx)("div",{className:"flex-1",children:N}),(0,s.jsx)("button",{onClick:()=>w(null),className:"text-emerald-700 hover:text-emerald-900",children:(0,s.jsx)(d.Z,{className:"h-4 w-4"})})]}),v&&(0,s.jsxs)("div",{className:"rounded-lg border border-amber-200 bg-amber-50 p-3 text-sm text-amber-800 flex items-start gap-2",children:[(0,s.jsx)(o.Z,{className:"h-5 w-5 shrink-0 text-amber-600"}),(0,s.jsx)("div",{className:"flex-1",children:"Top-up was cancelled. No credits were charged."}),(0,s.jsx)("button",{onClick:()=>C(!1),className:"text-amber-700 hover:text-amber-900",children:(0,s.jsx)(d.Z,{className:"h-4 w-4"})})]}),(0,s.jsx)("div",{className:n().balance,children:(0,s.jsxs)("div",{className:"flex items-start justify-between gap-4 flex-wrap",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs uppercase tracking-wide text-teal-100 mb-1",children:"Credit balance"}),(0,s.jsxs)("p",{className:"text-4xl font-bold flex items-center gap-2",children:[(0,s.jsx)(x.Z,{className:"h-7 w-7"}),h(e.balance),(0,s.jsx)("span",{className:"text-base font-normal text-teal-100",children:"credits"})]}),(0,s.jsx)("p",{className:"text-sm text-teal-100 mt-2",children:"1 credit = $1 USD \xb7 Credits never expire"})]}),e.usage&&(0,s.jsx)(p,{usage:e.usage}),(0,s.jsxs)("button",{onClick:()=>j(!0),className:"rounded-lg bg-white px-4 py-2 text-sm font-semibold text-teal-700 hover:bg-teal-50 flex items-center gap-2 shadow-sm dark:bg-ink-900",children:[(0,s.jsx)(m.Z,{className:"h-4 w-4"}),"Top up credits"]})]})}),(0,s.jsxs)("div",{className:"rounded-xl border border-gray-200 bg-white p-5 dark:bg-ink-900 dark:border-ink-800",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold uppercase tracking-wide text-gray-700 mb-3 dark:text-ink-200",children:"What credits cost"}),(0,s.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2 text-sm",children:[(0,s.jsx)(y,{label:"Tailored resume attach (extension)",cost:e.costs.autoApply}),"number"==typeof e.costs.codebaseAnswer&&(0,s.jsx)(y,{label:"Codebase Mode answer (live interview)",cost:e.costs.codebaseAnswer})]}),(0,s.jsx)("p",{className:"mt-3 text-xs text-gray-500 dark:text-ink-400",children:"Resume tailoring, cover letters, and mock
1interviews are included free with any active paid subscription. Interview support, P2P sessions, and general electron-app usage are also gated by your subscription tier â none of them consume credits."}),(0,s.jsx)("p",{className:"mt-2 text-xs text-gray-500 dark:text-ink-400",children:"Heavy AI usage beyond what your plan includes is covered by credits automatically (1 credit per $1 of extra usage), so answers keep working. If your credits run out, top up here to continue."})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-gray-200 bg-white p-5 dark:bg-ink-900 dark:border-ink-800",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold uppercase tracking-wide text-gray-700 mb-3 dark:text-ink-200",children:"Recent activity"}),0===e.transactions.length?(0,s.jsx)("p",{className:"text-sm text-gray-500 dark:text-ink-400",children:"No credit movements yet."}):(0,s.jsx)("div",{className:"overflow-x-auto -mx-1",children:(0,s.jsxs)("table",{className:"w-full min-w-[480px] text-sm",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{className:"text-left text-xs uppercase text-gray-500 border-b dark:text-ink-400",children:[(0,s.jsx)("th",{className:"py-2 pr-2",children:"When"}),(0,s.jsx)("th",{className:"py-2 pr-2",children:"Activity"}),(0,s.jsx)("th",{className:"py-2 pr-2 text-right",children:"Î"}),(0,s.jsx)("th",{className:"py-2 pr-2 text-right",children:"Balance"})]})}),(0,s.jsx)("tbody",{children:e.transactions.map(e=>{var t;return(0,s.jsxs)("tr",{className:"border-b border-gray-100 last:border-0",children:[(0,s.jsx)("td",{className:"py-2 pr-2 text-gray-600 whitespace-nowrap dark:text-ink-300",children:function(e){try{return new Date(e).toLocaleString()}catch(t){return e}}(e.createdAt)}),(0,s.jsxs)("td",{className:"py-2 pr-2 text-gray-800 dark:text-ink-100",children:[(0,s.jsx)("div",{children:g[t=e.reason]||t.replace(/_/g," ")}),e.notes&&(0,s.jsx)("div",{className:"text-xs text-gray-500 truncate max-w-xs dark:text-ink-400",title:e.notes,children:e.notes})]}),(0,s.jsx)("td",{className:"py-2 pr-2 text-right font-mono font-semibold ".concat(e.amount>=0?"text-emerald-700":"text-rose-700"),children:e.amount>=0?"+".concat(h(e.amount)):"-".concat(h(-e.amount))}),(0,s.jsx)("td",{className:"py-2 pr-2 text-right text-gray-700 dark:text-ink-200",children:h(e.balanceAfter)})]},e.id)})})]})})]}),k&&(0,s.jsx)(f,{packages:e.packages,customAmount:e.customAmount,onClose:()=>j(!1)})]})}function y(e){let{label:t,cost:a}=e;return(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2 px-2 py-1.5 rounded bg-gray-50 dark:bg-ink-900",children:[(0,s.jsx)("span",{className:"text-gray-700 dark:text-ink-200",children:t}),(0,s.jsxs)("span",{className:"text-teal-700 font-semibold flex items-center gap-1 text-xs",children:[(0,s.jsx)(x.Z,{className:"h-3 w-3"}),h(a)," ",1===a?"credit":"credits"]})]})}function f(e){var t,a;let{packages:r,customAmount:n,onClose:c}=e,[m,h]=(0,i.useState)((null===(t=r.find(e=>e.highlight))||void 0===t?void 0:t.id)||(null===(a=r[0])||void 0===a?void 0:a.id)||"custom"),[p,g]=(0,i.useState)(""),[b,y]=(0,i.useState)("stripe"),[f,k]=(0,i.useState)(!1),[j,N]=(0,i.useState)(!1),[w,v]=(0,i.useState)(null),C=Number(p),S="custom"===m&&Number.isFinite(C)&&C>=n.minUsd&&C<=n.maxUsd,U="custom"!==m?r.find(e=>e.id===m):null,A=U?{amountUsd:U.amountUsd,totalCredits:U.totalCredits,bonus:U.bonusCredits}:"custom"===m&&S?{amountUsd:Math.floor(C),totalCredits:Math.floor(C),bonus:0}:null,P=async()=>{if(A){if("stripe"!==b){k(!0);return}N(!0),v(null);try{let e="custom"===m?{amountUsd:A.amountUsd}:{packageId:m},t=await fetch("/api/credits/checkout",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),a=await t.json();if(!t.ok){v((null==a?void 0:a.error)||"Failed to create ".concat(b," checkout")),N(!1);return}(null==a?void 0:a.url)?window.location.href=a.url:(v("Provider did not return a checkout URL"),N(!1))}catch(e){v((null==e?void 0:e.message)||"Network error"),N(!1)}}};return(0,s.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/50",onClick:c,children:(0,s.jsxs)("div",{className:"relative w-full max-w-2xl rounded-2xl bg-white shadow-2xl overflow-hidden max-h-[90vh] overflow-y-auto dark:bg-ink-900",onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"px-6 pt-6 pb-2 flex items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-xl font-bold text-gray-900 dark:text-white",children:"Top up credits"}),(0,s.jsx)("p",{className:"text-sm text-gray-500 mt-1 dark:text-ink-400",children:"1 credit = $1 USD. Bigger packages include bonus credits."})]}),(0,s.jsx)("button",{onClick:c,className:"rounded-lg p-1.5 text-gray-400 hover:bg-gray-100 hover:text-gray-600 dark:text-ink-500 dark:hover:bg-ink-800",children:(0,s.jsx)(d.Z,{className:"h-5 w-5"})})]}),(0,s.jsxs)("div",{className:"px-6 py-4 space-y-4",children:[(0,s.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[r.map(e=>(0,s.jsxs)("button",{onClick:()=>h(e.id),className:"rounded-xl border-2 p-4 text-left transition-all ".concat(m===e.id?"border-teal-500 bg-teal-50":"border-gray-200 hover:border-gray-300 bg-white"),children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2 mb-1",children:[(0,s.jsxs)("span",{className:"text-lg font-bold text-gray-900 dark:text-white",children:["$",e.amountUsd]}),e.highlight&&(0,s.jsx)("span",{className:"rounded-full bg-teal-600 px-2 py-0.5 text-[10px] font-semibold text-white uppercase tracking-wide",children:"Best value"})]}),(0,s.jsxs)("div",{className:"text-2xl font-bold text-teal-700 flex items-center gap-1",children:[(0,s.jsx)(x.Z,{className:"h-5 w-5"}),e.totalCredits]}),e.bonusCredits>0&&(0,s.jsxs)("div",{className:"text-xs font-medium text-emerald-700 mt-1",children:["Includes ",e.bonusCredits," bonus credits"]}),e.badge&&(0,s.jsx)("div",{className:"text-xs text-gray-500 mt-0.5 dark:text-ink-400",children:e.badge})]},e.id)),(0,s.jsxs)("button",{onClick:()=>h("custom"),className:"rounded-xl border-2 p-4 text-left transition-all sm:col-span-2 ".concat("custom"===m?"border-teal-500 bg-teal-50":"border-gray-200 hover:border-gray-300 bg-white"),children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2 mb-2",children:[(0,s.jsx)("span",{className:"font-semibold text-gray-900 dark:text-white",children:"Custom amount"}),(0,s.jsxs)("span",{className:"text-xs text-gray-500 dark:text-ink-400",children:["$",n.minUsd,"â$",n.maxUsd,", no bonus"]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-lg font-semibold text-gray-700 dark:text-ink-200",children:"$"}),(0,s.jsx)("input",{type:"number",min:n.minUsd,max:n.maxUsd,step:1,value:p,onChange:e=>{g(e.target.value),h("custom")},placeholder:"20",className:"w-24 rounded border border-gray-300 px-2 py-1.5 text-sm focus:border-teal-500 focus:outline-none focus:ring-1 focus:ring-teal-500 dark:border-ink-700",onClick:e=>e.stopPropagation()}),(0,s.jsxs)("span",{className:"text-sm text-gray-600 dark:text-ink-300",children:["= ",S?"".concat(Math.floor(C)," credits"):"â"]})]})]})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-gray-200 p-4 dark:border-ink-800",children:[(0,s.jsx)("p",{className:"text-xs uppercase font-semibold tracking-wide text-gray-600 mb-2 dark:text-ink-300",children:"Pay with"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("button",{onClick:()=>y("stripe"),className:"flex-1 rounded-lg border-2 px-4 py-2 text-sm font-medium transition-colors ".concat("stripe"===b?"border-teal-500 bg-teal-50 text-teal-800":"border-gray-200 bg-white text-gray-700 hover:border-gray-300"," dark:text-ink-200 dark:bg-ink-900"),children:"Card (Stripe)"}),(0,s.jsx)("button",{onClick:()=>y("nowpayments"),className:"flex-1 rounded-lg border-2 px-4 py-2 text-sm font-medium transition-colors ".concat("nowpayments"===b?"border-teal-500 bg-teal-50 text-teal-800":"border-gray-200 bg-white text-gray-700 hover:border-gray-300"," dark:text-ink-200 dark:bg-ink-900"),children:"Crypto (USDT / USDC)"})]})]}),f&&A&&(0,s.jsx)(u.Z,{kind:"credits",packageId:"custom"!==m?m:void 0,amountUsd:"custom"===m?A.amountUsd:void 0,label:"".concat(A.totalCredits," credits â $").concat(A.amountUsd),onClose:()=>k(!1),onPaid:()=>{try{window.dispatchEvent(new Event("credits:changed"))}catch(e){}}}),w&&(0,s.jsxs)("div",{className:"rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-800 flex items-start gap-2",children:[(0,s.jsx)(o.Z,{className:"h-4 w-4 shrink-0 text-red-600 mt-0.5"}),(0,s.jsx)("span",{children:w})]})]}),(0,s.jsxs)("div",{className:"border-t border-gray-200 bg-gray-50 px-6 py-4 flex items-center justify-between gap-3 dark:bg-ink-900 dark:border-ink-800",children:[(0,s.jsx)("div",{className:"text-sm text-gray-700 dark:text-ink-200",children:A?"Total: $".concat(A.amountUsd," â ").concat(A.totalCredits," credits").concat(A.bonus>0?" (incl. ".concat(A.bonus," bonus)"):""):"Choose a package or enter a custom amount"}),(0,s.jsx)("button",{onClick:P,disabled:!A||j,className:"rounded-lg bg-teal-600 px-5 py-2 text-sm font-semibold text-white hover:bg-teal-700 disabled:opacity-50 flex items-center gap-2 transition-colors",children:j?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.Z,{className:"h-4 w-4 animate-spin"}),"Redirectingâ¦"]}):(0,s.jsx)(s.Fragment,{children:"Continue to checkout"})})]})]})})}},34045:function(e,t,a){a.d(t,{Z:function(){return n}});var s=a(57437),r=a(2265);function n(e){let{kind:t,plan:a,packageId:n,amountUsd:i,label:l,onClose:c,onPaid:d}=e,[o,x]=(0,r.useState)("choose"),[m,u]=(0,r.useState)(null),[h,p]=(0,r.useState)(null),[g,b]=(0,r.useState)("PEND
1ING"),[y,f]=(0,r.useState)(null),[k,j]=(0,r.useState)(!1),[N,w]=(0,r.useState)(""),[v,C]=(0,r.useState)(0);(0,r.useEffect)(()=>{fetch("/api/crypto/chains").then(e=>e.json()).then(e=>u(Array.isArray(e.chains)?e.chains:[])).catch(()=>u([]))},[]);let S=async(e,s)=>{if(!k){j(!0),f(null);try{let r=await fetch("/api/crypto/create",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({kind:t,plan:a,packageId:n,amountUsd:i,chain:e,asset:s})});if(401===r.status){f("Please sign in to pay.");return}let l=await r.json();if(!r.ok||l.error){f(l.error||"Could not start the payment.");return}p(l),b("PENDING"),x("pay")}catch(e){f("Network error. Please try again.")}finally{j(!1)}}};(0,r.useEffect)(()=>{if(!(null==h?void 0:h.id)||"PENDING"!==g)return;let e=setInterval(async()=>{try{let e=await fetch("/api/crypto/status?id=".concat(h.id)).then(e=>e.json());"PAID"===e.status?(b("PAID"),null==d||d()):"EXPIRED"===e.status&&b("EXPIRED")}catch(e){}},12e3);return()=>clearInterval(e)},[h,g,d]),(0,r.useEffect)(()=>{if(!(null==h?void 0:h.expiresAt))return;let e=()=>C(Math.max(0,Math.floor((new Date(h.expiresAt).getTime()-Date.now())/1e3)));e();let t=setInterval(e,1e3);return()=>clearInterval(t)},[h]);let U=(e,t)=>{try{navigator.clipboard.writeText(e),w(t),setTimeout(()=>w(""),1500)}catch(e){}},A="".concat(String(Math.floor(v/60)).padStart(2,"0"),":").concat(String(v%60).padStart(2,"0"));return(0,s.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4",children:(0,s.jsxs)("div",{className:"relative w-full max-w-sm max-h-[92vh] overflow-y-auto rounded-2xl bg-white p-6 text-center shadow-xl dark:bg-gray-900 dark:text-gray-100",children:[(0,s.jsx)("button",{className:"absolute right-3 top-2 text-2xl leading-none text-gray-400 hover:text-gray-600",onClick:c,"aria-label":"Close",children:"\xd7"}),y&&(0,s.jsxs)("div",{className:"mb-3 text-sm text-red-600",children:[y," ",y.includes("sign in")&&(0,s.jsx)("a",{href:"/signin",className:"underline",children:"Sign in"})]}),"choose"===o&&(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"mb-1 text-lg font-semibold",children:"Pay with USDT or USDC"}),l&&(0,s.jsx)("p",{className:"mb-4 text-sm text-gray-500 dark:text-gray-400",children:l}),(0,s.jsx)("p",{className:"mb-3 text-sm text-gray-600 dark:text-gray-300",children:"Choose a coin and network â pay from any wallet or exchange."}),null===m&&(0,s.jsx)("p",{className:"text-sm text-gray-400",children:"Loading networksâ¦"}),null!==m&&0===m.length&&(0,s.jsx)("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Crypto payments are temporarily unavailable. Please try again later."}),["USDT","USDC"].map(e=>{let t=(m||[]).filter(t=>(t.asset||"USDT")===e);return t.length?(0,s.jsxs)("div",{className:"mb-3",children:[(0,s.jsx)("p",{className:"mb-1.5 text-left text-xs font-semibold uppercase tracking-wide text-gray-400",children:e}),(0,s.jsx)("div",{className:"flex flex-col gap-2",children:t.map(t=>(0,s.jsxs)("button",{disabled:k,className:"flex items-center justify-between rounded-xl border border-gray-200 px-4 py-3 text-left hover:border-indigo-400 hover:bg-indigo-50 disabled:opacity-50 dark:border-gray-700 dark:hover:bg-gray-800",onClick:()=>S(t.chain,e),children:[(0,s.jsx)("span",{className:"font-medium",children:t.label}),(0,s.jsx)("span",{className:"text-xs text-gray-400",children:t.note})]},"".concat(e,"-").concat(t.chain)))})]},e):null})]}),"pay"===o&&h&&"PENDING"===g&&(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"mb-1 font-semibold",children:"Send exactly"}),(0,s.jsxs)("button",{className:"mb-1 inline-flex items-center gap-2 text-2xl font-bold text-indigo-600 dark:text-indigo-300",onClick:()=>U(h.amount,"amount"),title:"Copy amount",children:[h.amount," ",h.asset||"USDT"," ",(0,s.jsx)("span",{className:"text-xs font-normal text-gray-400",children:"amount"===N?"copied":"copy"})]}),(0,s.jsxs)("p",{className:"mb-1 text-xs text-amber-600",children:["Send this EXACT amount of ",h.asset||"USDT"," â that's how we match your payment. A different coin on the same address won't be detected."]}),(0,s.jsxs)("p",{className:"mb-1 mt-3 text-sm",children:["to your ",h.network.toUpperCase()," address:"]}),(0,s.jsxs)("button",{className:"mb-1 block w-full break-all text-xs text-gray-700 hover:text-indigo-600 dark:text-gray-300",onClick:()=>U(h.address,"addr"),title:"Copy address",children:[h.address," ",(0,s.jsx)("span",{className:"text-gray-400",children:"addr"===N?"(copied)":"(copy)"})]}),(0,s.jsx)("div",{className:"my-3",children:(0,s.jsx)("img",{src:"https://api.qrserver.com/v1/create-qr-code/?size=160x160&data=".concat(encodeURIComponent(h.address)),alt:"address QR",className:"mx-auto rounded bg-white p-1",width:160,height:160})}),(0,s.jsxs)("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:["Waiting for payment⦠(expires in ",A,")"]}),(0,s.jsx)("p",{className:"mt-2 text-[11px] text-gray-400",children:"Detected automatically once confirmed on-chain. Keep this open, or it'll still credit after a couple of confirmations."})]}),"pay"===o&&"EXPIRED"===g&&(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"mb-3 font-semibold text-amber-600",children:"This payment window expired."}),(0,s.jsx)("button",{className:"rounded-lg bg-indigo-600 px-4 py-2 text-white",onClick:()=>{p(null),b("PENDING"),x("choose")},children:"Start over"})]}),"PAID"===g&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-2 text-3xl",children:"â
"}),(0,s.jsx)("p",{className:"mb-1 font-semibold text-green-600",children:"Payment c
1onfirmed!"}),(0,s.jsx)("p",{className:"mb-4 text-sm text-gray-500 dark:text-gray-400",children:"membership"===t?"Your membership is now active.":"Your credits have been added."}),(0,s.jsx)("button",{className:"rounded-lg bg-indigo-600 px-4 py-2 text-white",onClick:c,children:"Done"})]})]})})}},78030:function(e,t,a){a.d(t,{Z:function(){return x}});var s=a(2265);/** 2 * @license lucide-react v0.542.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */let r=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),n=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,a)=>a?a.toUpperCase():t.toLowerCase()),i=e=>{let t=n(e);return t.charAt(0).toUpperCase()+t.slice(1)},l=function(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return t.filter((e,t,a)=>!!e&&""!==e.trim()&&a.indexOf(e)===t).join(" ").trim()},c=e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};/** 7 * @license lucide-react v0.542.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */var d={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 12 * @license lucide-react v0.542.0 - ISC 13 * 14 * This source code is licensed under the ISC license. 15 * See the LICENSE file in the root directory of this source tree. 16 */let o=(0,s.forwardRef)((e,t)=>{let{color:a="currentColor",size:r=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:o="",children:x,iconNode:m,...u}=e;return(0,s.createElement)("svg",{ref:t,...d,width:r,height:r,stroke:a,strokeWidth:i?24*Number(n)/Number(r):n,className:l("lucide",o),...!x&&!c(u)&&{"aria-hidden":"true"},...u},[...m.map(e=>{let[t,a]=e;return(0,s.createElement)(t,a)}),...Array.isArray(x)?x:[x]])}),x=(e,t)=>{let a=(0,s.forwardRef)((a,n)=>{let{className:c,...d}=a;return(0,s.createElement)(o,{ref:n,iconNode:t,className:l("lucide-".concat(r(i(e))),"lucide-".concat(e),c),...d})});return a.displayName=i(e),a}},76780:function(e,t,a){a.d(t,{Z:function(){return s}});let s=(0,a(78030).Z)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},13231:function(e,t,a){a.d(t,{Z:function(){return s}});let s=(0,a(78030).Z)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},3274:function(e,t,a){a.d(t,{Z:function(){return s}});let s=(0,a(78030).Z)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},92513:function(e,t,a){a.d(t,{Z:function(){return s}});let s=(0,a(78030).Z)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},74697:function(e,t,a){a.d(t,{Z:function(){return s}});let s=(0,a(78030).Z)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},55430:function(e,t,a){a.d(t,{Z:function(){return s}});let s=(0,a(78030).Z)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]])}}]);
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.