1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[63485],{15882:(e,t,s)=>{s.d(t,{sx:()=>a});var r=s(36854),n=s(99856);function a(e,t){if(n.xo.enabled&&n.xo.customEvents&&(0,n.vz)(e))try{r.Ay.capture(e,t)}catch(e){}}},29578:(e,t,s)=>{s.d(t,{A:()=>b});var r=s(37876),n=s(49815),a=s(48230),i=s.n(a),c=s(14232),l=s(97685),o=s(39817),d=s(73434),m=s(44239),x=s(87066);let p=[{id:8453,name:"Base",short:"Base"},{id:1,name:"Ethereum",short:"ETH"},{id:137,name:"Polygon",short:"MATIC"}],u=c.lazy(()=>Promise.all([s.e(67914),s.e(57596),s.e(79034)]).then(s.bind(s,79034)));function h(e,t){fetch("/api/analytics/crypto-funnel",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:e,...t})}).catch(()=>{})}let b=e=>{var t;let{userName:a,onPurchaseComplete:b,isAdmin:y=!1}=e,g=(0,m.EN)(y),[f,j]=(0,c.useState)("creator"),[N,w]=(0,c.useState)(8453),[v,k]=(0,c.useState)("select"),[z,S]=(0,c.useState)(!1),[C,P]=(0,c.useState)(""),[A,_]=(0,c.useState)(""),[D,U]=(0,c.useState)(!1),E=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent),T=!!window.ethereum,I=!E&&T||E&&T||!0,M=()=>g.find(e=>e.id===f),O=M(),B=(0,c.useCallback)(async e=>{U(!0),_(""),h("manual_verify_attempt",{packId:f});try{for(let t of[8453,1,137]){let r=await fetch("/api/checkout/crypto/verify",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({txHash:e,packId:f,chainId:t})}),n=await r.json();if(n.success){h("manual_payment_success",{packId:f,chainId:t}),k("success"),l.Ay.success("".concat(null==O?void 0:O.credits.toLocaleString()," credits added!"));try{let{mutate:e}=await Promise.resolve().then(s.bind(s,37596));e("/api/user/credits")}catch(e){}setTimeout(()=>null==b?void 0:b(),2e3);return}if(n.alreadyCredited){k("success"),l.Ay.success("Payment already credited!");return}}_("Transaction not found yet. Make sure you sent to the correct address on Base, Ethereum, or Polygon.")}catch(e){_("Failed to verify. Please try again.")}finally{U(!1)}},[f,O,b]);return(0,c.useEffect)(()=>{if("manual"!==v)return;let e=setInterval(()=>{C&&C.startsWith("0x")&&C.length>=10&&!D&&B(C)},15e3);return()=>clearInterval(e)},[v,C,D,B]),(0,r.jsxs)("div",{className:"rounded-lg p-6 border border-zinc-700/60 bg-gradient-to-br from-zinc-800 to-zinc-850 shadow-sm h-full",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsx)("h2",{className:"text-base font-semibold text-white",children:"Buy Credits with Crypto"}),(0,r.jsxs)("div",{className:"flex items-center gap-1 px-2 py-1 rounded-full bg-blue-500/10 border border-blue-500/20",children:[(0,r.jsx)(d.sJE,{className:"text-blue-400 text-xs"}),(0,r.jsx)("span",{className:"text-xs font-medium text-blue-400",children:"USDC"})]})]}),(0,r.jsx)("div",{className:"text-sm text-zinc-400 mb-4",children:"Pay directly from any wallet. No middleman, instant credits."}),"success"===v&&(0,r.jsxs)("div",{className:"text-center py-8",children:[(0,r.jsx)(o.CMH,{className:"text-4xl text-green-500 mx-auto mb-3"}),(0,r.jsx)("h3",{className:"text-lg font-semibold text-white mb-2",children:"Payment Successful!"}),(0,r.jsxs)("p",{className:"text-sm text-zinc-400",children:[null==O?void 0:O.credits.toLocaleString()," credits added to your account."]})]}),"manual"===v&&O&&(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("p",{className:"text-sm text-zinc-300 mb-1",children:"Send exactly"}),(0,r.jsxs)("p",{className:"text-3xl font-bold text-white",children:["$",O.priceUSD," ",(0,r.jsx)("span",{className:"text-lg text-zinc-400",children:"USDC"})]}),(0,r.jsx)("p",{className:"text-xs text-zinc-500 mt-1",children:"USDC or ETH on Base, Ethereum, or Polygon"})]}),(0,r.jsxs)("div",{className:"bg-zinc-900 rounded-lg p-4 border border-zinc-700",children:[(0,r.jsx)("p",{className:"text-xs text-zinc-500 mb-2",children:"Send to this address:"}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("code",{className:"text-xs text-green-400 break-all flex-1 font-mono",children:x.a4}),(0,r.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(x.a4),S(!0),h("copy_address",{packId:f}),setTimeout(()=>S(!1),2e3)},className:"flex-shrink-0 p-2 rounded-lg bg-zinc-800 hover:bg-zinc-700 transition-colors",title:"Copy address",children:z?(0,r.jsx)(o.CMH,{className:"text-green-400 text-sm"}):(0,r.jsx)(o.paH,{className:"text-zinc-400 text-sm"})})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-xs text-zinc-500 mb-1.5",children:"Pay on"}),(0,r.jsx)("div",{className:"grid grid-cols-3 gap-2",children:p.map(e=>(0,r.jsx)("button",{onClick:()=>{w(e.id),h("select_chain",{chainId:e.id})},className:"px-3 py-2 rounded-lg text-xs font-medium transition-all ".concat(N===e.id?"bg-primary-500/20 text-primary-300 border border-primary-500/40":"bg-zinc-800 text-zinc-400 border border-zinc-700 hover:border-zinc-600"),children:e.name},e.id))})]}),E&&O&&(()=>{let e=function(e,t){let s=x.PU[e];if(!s)return null;let r=BigInt(Math.round(1e6*t));return"ethereum:".concat(s,"@").concat(e,"/transfer?address=").concat(x.a4,"&uint256=").concat(r.toString())}(N,O.priceUSD);return e?(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("p",{className:"text-xs text-zinc-500",children:"Open in your wallet (everything pre-filled):"}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,r.jsx)("a",{href:"https://metamask.app.link/send/".concat(e.replace(/^ethereum:/,"")),className:"bg-orange-500/10 text-orange-400 py-2.5 px-3 rounded-lg text-xs font-medium text-center hover:bg-orange-500/20 transition-colors",onClick:()=>h("deep_link_metamask",{chainId:N}),children:"Open MetaMask"}),(0,r.jsx)("a",{href:"https://link.trustwallet.com/send?asset=c".concat(N,"_t").concat(x.PU[N],"&address=").concat(x.a4,"&amount=").concat(O.priceUSD),className:"bg-blue-500/10 text-blue-400 py-2.5 px-3 rounded-lg text-xs font-medium text-center hover:bg-blue-500/20 transition-colors",onClick:()=>h("deep_link_trust",{chainId:N}),children:"Open Trust Wallet"}),(0,r.jsx)("a",{href:8453===N?"cbwallet://send?address=".concat(x.a4,"&chain=8453"):e,className:"bg-indigo-500/10 text-indigo-400 py-2.5 px-3 rounded-lg text-xs font-medium text-center hover:bg-indigo-500/20 transition-colors",onClick:()=>h("deep_link_coinbase",{chainId:N}),children:"Open Coinbase Wallet"}),(0,r.jsx)("a",{href:"https://rnbwapp.com/wc?uri=".concat(encodeURIComponent(e)),className:"bg-pink-500/10 text-pink-400 py-2.5 px-3 rounded-lg text-xs font-medium text-center hover:bg-pink-500/20 transition-colors",onClick:()=>h("deep_link_rainbow",{chainId:N}),children:"Open Rainbow"})]})]}):null})(),(0,r.jsxs)("div",{className:"bg-zinc-800/50 rounded-lg p-3 border border-zinc-700/50",children:[(0,r.jsxs)("div",{className:"flex justify-between text-sm",children:[(0,r.jsx)("span",{className:"text-zinc-400",children:"Pack"}),(0,r.jsx)("span",{className:"text-white",children:O.name})]}),(0,r.jsxs)("div",{className:"flex justify-between text-sm mt-1",children:[(0,r.jsx)("span",{className:"text-zinc-400",children:"Amount"}),(0,r.jsxs)("span",{className:"text-white font-semibold",children:[O.priceUSD," USDC"]})]})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("p",{className:"text-xs text-zinc-400",children:"After sending, paste your transaction hash:"}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("input",{type:"text",placeholder:"0x...",value:C,onChange:e=>P(e.target.value),className:"flex-1 bg-zinc-900 border border-zinc-700 rounded-lg px-3 py-2 text-sm text-white placeholder-zinc-600 focus:outline-none focus:border-primary-500"}),(0,r.jsx)("button",{onClick:()=>B(C),disabled:!C||D,className:"bg-green-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-green-700 disabled:opacity-50 disabled:cursor-not-allowed",children:D?(0,r.jsx)(o.hW,{className:"animate-spin"}):"Verify"})]}),A&&(0,r.jsxs)("div",{className:"text-xs text-red-400",children:[A,(0,r.jsxs)("div",{className:"mt-1 text-zinc-500",children:["Already sent it? ",(0,r.jsx)(i(),{href:"/billing/recover",className:"underline hover:text-zinc-300",children:"Claim it on the recovery page"}),"."]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-center gap-1 text-xs text-zinc-600",children:[(0,r.jsx)("span",{className:"w-2 h-2 bg-green-500/50 rounded-full animate-pulse"}),"Auto-checking for payment..."]}),(0,r.jsxs)("p",{className:"text-[11px] text-zinc-600 text-center",children:["Closed this tab after sending? You can"," ",(0,r.jsx)(i(),{href:"/billing/recover",className:"underline hover:text-zinc-400",children:"recover any payment by tx hash"}),"."]})]}),(0,r.jsx)("button",{onClick:()=>{k("select"),h("back_to_select")},className:"w-full text-xs text-zinc-500 hover:text-zinc-400 py-1",children:"Back"})]}),"select"===v&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i(),{href:"/crypto/how-to-pay",target:"_blank",className:"block rounded-lg bg-zinc-700/30 hover:bg-zinc-700/50 border border-zinc-600/50 hover:border-primary-500/30 p-3 mb-4 transition-all group",children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("div",{className:"flex items-center gap-2.5",children:(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-xs font-medium text-white group-hover:text-primary-400 transition-colors",children:"New to crypto?"}),(0,r.jsx)("span",{className:"text-xs text-zinc-500 ml-1.5",children:"Get set up in 10 minutes"})]})}),(0,r.jsx)(n.A,{className:"h-3.5 w-3.5 text-zinc-500 group-hover:text-primary-400 transition-colors"})]})}),(0,r.jsx)("div",{className:"space-y-3",children:g.map(e=>(0,r.jsxs)("label",{className:"flex items-center p-4 rounded-lg border cursor-pointer transition-all ".concat(f===e.id?"border-primary-500 bg-primary-500/10":"border-zinc-700 hover:border-zinc-600"),children:[(0,r.jsx)("input",{type:"radio",name:"credit-pack",value:e.id,onChange:()=>j(e.id),checked:f===e.id,className:"radio radio-primary mr-3 bg-inherit border-2 border-primary-600"}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("span",{className:"font-semibold text-white",children:["$",e.priceUSD]}),e.popular&&(0,r.jsx)("span",{className:"px-2 py-0.5 text-xs font-medium bg-primary-500/20 text-primary-400 rounded",children:"Popular"}),e.bonus&&(0,r.jsxs)("span",{className:"px-2 py-0.5 text-xs font-medium bg-green-500/20 text-green-400 rounded",children:["+",e.bonus,"% bonus"]})]}),(0,r.jsxs)("div",{className:"text-sm text-zinc-400 mt-1",children:[e.credits.toLocaleStr
1ing()," credits",e.description&&" - ".concat(e.description)]})]})]},e.id))}),(0,r.jsxs)("div",{className:"mt-6 space-y-2",children:[E&&I&&(0,r.jsxs)("button",{onClick:()=>{h("click_connect_wallet",{packId:f,mobile:E}),k("wallet")},className:"w-full bg-gradient-to-r from-primary-500 to-blue-600 text-white py-3 px-4 rounded-lg font-semibold hover:from-primary-600 hover:to-blue-700 transition-all flex items-center justify-center gap-2",children:[(0,r.jsx)(o.lcY,{className:"text-sm"}),"Pay with your wallet"]}),(0,r.jsx)("button",{onClick:()=>{h("click_send_usdc",{packId:f,mobile:E}),k("manual")},className:E&&I?"w-full bg-zinc-700 text-zinc-200 py-2.5 px-4 rounded-lg font-medium hover:bg-zinc-600 transition-all text-sm":"w-full bg-gradient-to-r from-green-500 to-emerald-600 text-white py-3 px-4 rounded-lg font-semibold hover:from-green-600 hover:to-emerald-700 transition-all flex items-center justify-center gap-2",children:E&&I?"Or pay manually (copy address)":"Pay $".concat(null==(t=M())?void 0:t.priceUSD," USDC")}),!E&&I&&(0,r.jsxs)("button",{onClick:()=>{h("click_connect_wallet",{packId:f,mobile:E}),k("wallet")},className:"w-full bg-zinc-700 text-zinc-200 py-2.5 px-4 rounded-lg font-medium hover:bg-zinc-600 transition-all flex items-center justify-center gap-2 text-sm",children:[(0,r.jsx)(o.lcY,{className:"text-xs"}),"Connect Wallet (auto-pay)"]})]}),(0,r.jsx)("div",{className:"mt-4 p-3 rounded-lg bg-zinc-800/50 border border-zinc-700/50",children:(0,r.jsxs)("p",{className:"text-xs text-zinc-400",children:[(0,r.jsx)("strong",{className:"text-zinc-300",children:"Accepted:"})," USDC or ETH on Base, Ethereum, or Polygon.",(0,r.jsx)("br",{}),(0,r.jsx)("strong",{className:"text-zinc-300",children:"Speed:"})," Credits added after 1 confirmation."]})})]}),"wallet"===v&&(0,r.jsxs)("div",{className:"mt-4",children:[(0,r.jsx)(c.Suspense,{fallback:(0,r.jsxs)("div",{className:"text-center py-4",children:[(0,r.jsx)("div",{className:"animate-spin h-6 w-6 border-2 border-primary-500 border-t-transparent rounded-full mx-auto mb-2"}),(0,r.jsx)("span",{className:"text-sm text-zinc-400",children:"Loading wallet..."})]}),children:(0,r.jsx)(u,{packId:f,pack:M(),onPurchaseComplete:b})}),(0,r.jsx)("button",{onClick:()=>k("select"),className:"w-full text-xs text-zinc-500 hover:text-zinc-400 py-2 mt-2",children:"Back"})]})]})}},36964:(e,t,s)=>{s.d(t,{Dq:()=>c,Fz:()=>l,G:()=>a,Xf:()=>i,dP:()=>o});var r=s(22149),n=s(15882);function a(e,t){(0,n.sx)(r.o.PRICING_PLAN_SELECTED,{timestamp:new Date().toISOString(),...t,plan_name:e})}function i(e){(0,n.sx)(r.o.CHECKOUT_STARTED,{timestamp:new Date().toISOString(),...e,funnel_step:"checkout_started"})}function c(e,t,s){(0,n.sx)(r.o.UPGRADE_PROMPT_SHOWN,{timestamp:new Date().toISOString(),prompt_type:e,shown_location:t,...s})}function l(e,t,s){(0,n.sx)(r.o.UPGRADE_PROMPT_CLICKED,{timestamp:new Date().toISOString(),prompt_type:e,clicked_location:t,conversion_event:!0,...s})}function o(e,t,s){(0,n.sx)(r.o.UPGRADE_PROMPT_DISMISSED,{timestamp:new Date().toISOString(),prompt_type:e,dismissed_location:t,...s})}},44239:(e,t,s)=>{s.d(t,{EN:()=>n,sS:()=>a});let r=[{id:"test",name:"Test Pack",credits:50,priceUSD:1,priceCents:100,priceStars:0,description:"Dev testing only",devOnly:!0},{id:"admin-test",name:"Admin Test",credits:25,priceUSD:5,priceCents:500,priceStars:250,description:"Admin-only Stars test ($5)",devOnly:!0},{id:"starter",name:"300 Credits",credits:300,creditsStars:240,priceUSD:10,priceCents:1e3,priceStars:500,description:"Great for trying things out"},{id:"creator",name:"900 Credits",credits:900,priceUSD:29,priceCents:2900,priceStars:0,popular:!0,description:"Most popular for creators"},{id:"pro",name:"1,600 Credits",credits:1600,creditsStars:1280,priceUSD:50,priceCents:5e3,priceStars:2500,bonus:5,description:"5% bonus credits"},{id:"studio",name:"3,300 Credits",credits:3300,priceUSD:99,priceCents:9900,priceStars:0,bonus:10,description:"10% bonus credits"},{id:"business",name:"10,000 Credits",credits:1e4,priceUSD:299,priceCents:29900,priceStars:0,bonus:10,description:"10% bonus credits"},{id:"agency",name:"16,500 Credits",credits:16500,priceUSD:499,priceCents:49900,priceStars:0,bonus:10,description:"10% bonus credits"}];function n(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return r.filter(t=>e||!t.devOnly)}function a(e,t){return"stars"===t&&void 0!==e.creditsStars?e.creditsStars:e.credits}},47176:(e,t,s)=>{s.d(t,{A:()=>r});let r=[{id:"CREATOR",name:"Creator",creditsPerMonth:800,features:["800 credits/month","Access to all AI tools","Priority support","Commercial use"],highlighted:!1,color:"indigo",durations:[{months:3,price:89,pricePerMonth:29.67,kinguinUrl:"https://www.kinguin.net/category/432799/basedlabs-ai-creator-membership-3-month-subscription?referrer=basedlabs.ai"},{months:6,price:169,pricePerMonth:28.17,discount:5,kinguinUrl:"https://www.kinguin.net/category/436431/basedlabs-ai-creator-membership-6-month-subscription?referrer=basedlabs.ai"},{months:12,price:319,pricePerMonth:26.58,discount:10,kinguinUrl:"https://www.kinguin.net/category/436432/basedlabs-ai-creator-membership-12-month-subscription?referrer=basedlabs.ai"}]},{id:"PRO",name:"Pro",creditsPerMonth:1700,features:["1,700 credits/month","Access to all AI tools","Priority support","Commercial use","Early access to new features"],highlighted:!0,color:"violet",durations:[{months:3,price:179,pricePerMonth:59.67,kinguinUrl:"https://www.kinguin.net/category/436433/basedlabs-ai-pro-membership-3-month-subscription?referrer=basedlabs.ai"},{months:6,price:339,pricePerMonth:56.5,discount:5,kinguinUrl:"https://www.kinguin.net/category/436434/basedlabs-ai-pro-membership-6-month-subscription?referrer=basedlabs.ai"},{months:12,price:639,pricePerMonth:53.25,discount:10,kinguinUrl:"https://www.kinguin.net/category/436435/basedlabs-ai-pro-membership-12-month-subscription?referrer=basedlabs.ai"}]},{id:"PREMIUM",name:"Premium",creditsPerMonth:3500,features:["3,500 credits/month","Access to all AI tools","Priority support","Commercial use","Early access to new features","Dedicated support channel"],highlighted:!1,color:"amber",durations:[{months:3,price:299,pricePerMonth:99.67,kinguinUrl:"https://www.kinguin.net/category/436436/basedlabs-ai-premium-membership-3-month-subscription?referrer=basedlabs.ai"},{months:6,price:569,pricePerMonth:94.83,discount:5,kinguinUrl:"https://www.kinguin.net/category/436438/basedlabs-ai-premium-membership-6-month-subscription?referrer=basedlabs.ai"},{months:12,price:1069,pricePerMonth:89.08,discount:10,kinguinUrl:"https://www.kinguin.net/category/436441/basedlabs-ai-premium-membership-12-month-subscription?referrer=basedlabs.ai"}]}]},49815:(e,t,s)=>{s.d(t,{A:()=>n});var r=s(14232);let n=r.forwardRef(function(e,t){let{title:s,titleId:n,...a}=e;return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":n},a),s?r.createElement("title",{id:n},s):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"}))})},63809:(e,t,s)=>{s.d(t,{A:()=>m});var r=s(37876),n=s(14232),a=s(97685),i=s(39817),c=s(44239);let l="BasedLabsOfficialBot";function o(e){let{pack:t,className:s=""}
1=e,[o,d]=(0,n.useState)(!1);if(!t.priceStars||t.priceStars<=0)return null;let m=(0,c.sS)(t,"stars");async function x(){d(!0);try{let s=await fetch("/api/telegram/buy",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({packId:t.id})});if(401===s.status){window.location.href="/login";return}if(409===s.status){let e=await fetch("/api/telegram/connect"),t=await e.json();if(e.ok&&t.url){a.Ay.success("Link your Telegram first â opening botâ¦"),window.open(t.url,"_blank");return}a.Ay.error("Link Telegram first.");return}if(!s.ok){var e;let t=await s.json().catch(()=>({}));a.Ay.error(null!=(e=t.message)?e:"Could not send invoice. Try again.");return}l&&window.open("https://t.me/".concat(l),"_blank"),a.Ay.success("Invoice sent to Telegram â tap Pay to confirm.")}catch(e){a.Ay.error("Network error. Try again.")}finally{d(!1)}}return(0,r.jsxs)("button",{type:"button",onClick:x,disabled:o,className:"group flex w-full items-center justify-between rounded-lg border border-[#229ED9]/30 bg-[#229ED9]/[0.06] px-3 py-2 text-left transition hover:border-[#229ED9]/60 hover:bg-[#229ED9]/[0.10] disabled:opacity-50 "+s,children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("div",{className:"flex h-7 w-7 items-center justify-center rounded-full bg-[#229ED9]/20",children:(0,r.jsx)(i.Cer,{size:11,className:"text-[#5BC2F4]"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-xs font-semibold text-white",children:o?"Sending invoiceâ¦":"Pay with Telegram Stars"}),(0,r.jsxs)("p",{className:"text-[11px] text-white/50",children:[m.toLocaleString()," cr \xb7 ",t.priceStars.toLocaleString(),"â \xb7 one-tap"]})]})]}),(0,r.jsxs)("div",{className:"flex items-baseline gap-1",children:[(0,r.jsx)("span",{className:"font-mono text-sm font-bold text-white",children:t.priceStars.toLocaleString()}),(0,r.jsx)("span",{className:"text-amber-300",children:"â"})]})]})}let d="BasedLabsOfficialBot",m=e=>{let{userName:t,isAdmin:s=!1}=e,l=(0,c.EN)(s).filter(e=>e.priceStars&&e.priceStars>
10),[m,x]=(0,n.useState)("unknown"),[p,u]=(0,n.useState)(!1);async function h(){u(!0);try{let s=await fetch("/api/telegram/connect");if(503===s.status)return void a.Ay.error("Telegram payments not configured yet.");if(401===s.status){window.location.href="/login";return}let r=await s.json();if(!s.ok||!r.url){var e,t;a.Ay.error(null!=(t=null!=(e=null==r?void 0:r.message)?e:null==r?void 0:r.error)?t:"Could not start link flow.");return}window.open(r.url,"_blank"),x("linked"),a.Ay.success("Tap Start in Telegram to finish linking.")}catch(e){a.Ay.error("Network error. Try again.")}finally{u(!1)}}return((0,n.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await fetch("/api/read/user/credits",{method:"POST"}),s=await t.json();if(e)return;x((null==s?void 0:s.tgLinked)?"linked":"unknown")}catch(t){e||x("unknown")}})(),()=>{e=!0}},[]),d)?(0,r.jsxs)("div",{className:"flex flex-col gap-4 rounded-lg border border-zinc-800 bg-zinc-950 p-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full bg-[#229ED9]/20",children:(0,r.jsx)(i.Cer,{size:14,className:"text-[#5BC2F4]"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-sm font-semibold text-white",children:"Telegram Stars"}),(0,r.jsx)("p",{className:"text-xs text-zinc-400",children:"One-tap pay in Telegram, no card required."})]})]}),(0,r.jsxs)("button",{type:"button",onClick:h,disabled:p,className:"flex items-center justify-center gap-2 rounded-md border border-zinc-700 bg-zinc-900 px-3 py-2 text-xs font-medium text-zinc-200 hover:bg-zinc-800 disabled:opacity-50",children:[p?(0,r.jsx)(i.hW,{className:"animate-spin"}):(0,r.jsx)(i.Cer,{}),"linked"===m?"Re-link Telegram":"Link Telegram"]}),0===l.length?(0,r.jsx)("p",{className:"text-xs text-zinc-500",children:"No packs are available via Stars right now."}):(0,r.jsx)("div",{className:"flex flex-col gap-2",children:l.map(e=>{let t=(0,c.sS)(e,"stars"),s=e.credits,n=t<s;return(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,r.jsx)("span",{className:"text-xs font-medium text-zinc-200",children:e.name}),(0,r.jsxs)("span",{className:"text-[11px] text-zinc-500",children:[t.toLocaleString()," credits",n&&(0,r.jsxs)("span",{className:"ml-1 text-zinc-600",children:["(vs ",s.toLocaleString()," via crypto)"]})]})]}),(0,r.jsx)(o,{pack:e})]},e.id)})}),(0,r.jsxs)("p",{className:"text-[11px] text-zinc-500",children:["Hi ",t,"! Stars covers Apple/Telegram fees, so you get fewer credits than crypto at the same price â but it's one-tap pay with no wallet setup. Linking sends you to"," ",(0,r.jsxs)("span",{className:"text-[#5BC2F4]",children:["@",d]}),"; we never see your Telegram contacts or DMs."]})]}):null}},87066:(e,t,s)=>{s.d(t,{AO:()=>l,MD:()=>c,PU:()=>r,_f:()=>a,_g:()=>n,a4:()=>i});let r={8453:"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",1:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",137:"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359"},n=r[8453],a=8453,i="0x4342F20ceCc648cD1C1f2812E2B63BF12151291f",c=[{name:"transfer",type:"function",stateMutability:"nonpayable",inputs:[{name:"to",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{name:"balanceOf",type:"function",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{name:"allowance",type:"function",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{name:"Transfer",type:"event",inputs:[{name:"from",type:"address",indexed:!0},{name:"to",type:"address",indexed:!0},{name:"value",type:"uint256",indexed:!1}]}];function l(e){return BigInt(Math.round(1e6*e))}},97602:(e,t,s)=>{s.d(t,{A:()=>j});var r=s(37876),n=s(14232),a=s(97685),i=s(39817),c=s(73434),l=s(44239),o=s(48230),d=s.n(o),m=s(47176);function x(e){let{plan:t}=e,[s,i]=(0,n.useState)(3),c=t.durations.find(e=>e.months===s);return(0,r.jsxs)("div",{className:"relative rounded-xl border bg-zinc-800/50 p-4 pt-5 transition-all ".concat(t.highlighted?"border-primary-500/50 shadow-[0_0_20px_rgba(168,85,247,0.15)]":"border-zinc-700/50 hover:border-zinc-600"),children:[t.highlighted&&(0,r.jsx)("div",{className:"absolute -top-2.5 left-1/2 -translate-x-1/2 px-2.5 py-0.5 text-[10px] font-bold uppercase tracking-wider bg-primary-500 text-white rounded-full",children:"Popular"}),(0,r.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,r.jsx)("h3",{className:"text-base font-bold text-white",children:t.name}),(0,r.jsxs)("span",{className:"text-xs font-medium text-primary-400",children:[t.creditsPerMonth.toLocaleStr
1ing(),"/mo"]})]}),(0,r.jsx)("div",{className:"flex gap-1 mb-3 p-1 bg-zinc-900/50 rounded-lg",children:t.durations.map(e=>(0,r.jsxs)("button",{onClick:()=>i(e.months),className:"flex-1 py-1.5 text-xs font-medium rounded-md transition-all ".concat(s===e.months?"bg-primary-500 text-white shadow-sm":"text-zinc-400 hover:text-white hover:bg-zinc-800"),children:[e.months,"mo",e.discount&&(0,r.jsxs)("span",{className:"ml-1 text-[10px] text-green-400",children:["-",e.discount,"%"]})]},e.months))}),(0,r.jsxs)("div",{className:"flex items-baseline gap-1.5 mb-3",children:[(0,r.jsxs)("span",{className:"text-2xl font-bold text-white",children:["$",c.price]}),(0,r.jsxs)("span",{className:"text-xs text-zinc-500",children:["($",c.pricePerMonth.toFixed(2),"/mo)"]})]}),(0,r.jsx)("a",{href:c.kinguinUrl||"#",target:"_blank",rel:"noopener noreferrer",className:"block w-full text-center py-2.5 px-3 rounded-lg text-sm font-semibold text-white transition-all bg-gradient-to-r from-primary-600 to-primary-500 hover:from-primary-500 hover:to-primary-400 ".concat(c.kinguinUrl?"":"opacity-50 cursor-not-allowed"),onClick:e=>{c.kinguinUrl||(e.preventDefault(),a.Ay.error("Coming soon! Check back later."))},children:"Buy on Kinguin"})]})}let p=e=>{let{userName:t,onPurchaseComplete:s,isAdmin:n=!1}=e;return(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsx)("div",{className:"p-3 rounded-xl bg-zinc-800/50 border border-zinc-700/50",children:(0,r.jsxs)("p",{className:"text-xs text-zinc-300",children:[(0,r.jsx)("strong",{className:"text-white",children:"How it works:"})," Purchase a subscription code on"," ",(0,r.jsx)("a",{href:"https://www.kinguin.net",target:"_blank",rel:"noopener noreferrer",className:"text-primary-400 hover:underline",children:"Kinguin"}),", then"," ",(0,r.jsx)(d(),{href:"/redeem",className:"text-primary-400 hover:underline",children:"redeem it here"})," ","to activate your subscription. Credits are added to your account (",t,") immediately."]})}),(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:m.A.map(e=>(0,r.jsx)(x,{plan:e},e.id))}),(0,r.jsx)("div",{className:"pt-3 border-t border-zinc-700/50",children:(0,r.jsxs)(d(),{href:"/redeem",className:"flex items-center justify-center gap-2 w-full py-2.5 px-4 rounded-xl border border-zinc-700/50 text-zinc-400 hover:text-white hover:border-zinc-600 hover:bg-zinc-800/50 transition-all text-sm",children:[(0,r.jsx)(i.tVd,{className:"text-primary-400"}),(0,r.jsx)("span",{children:"Already have a code? Redeem it here"})]})})]})};var u=s(14e3),h=s(32934),b=s(36964);function y(e){let{variant:t="default",className:s=""}=e,n="card-down"===t;return(0,r.jsxs)("a",{href:"https://apps.apple.com/us/app/gluely-ai-photo-video/id6757629611",target:"_blank",rel:"nofollow noopener noreferrer",className:"flex items-center gap-3 p-3 bg-gradient-to-r from-zinc-800/80 to-zinc-800/40 border border-zinc-700/50 rounded-xl hover:border-zinc-600/50 hover:from-zinc-800 hover:to-zinc-800/60 transition-all group ".concat(s),children:[(0,r.jsx)("img",{src:"https://is1-ssl.mzstatic.com/image/thumb/PurpleSource221/v4/f0/d7/75/f0d77500-7df2-2a00-fb0a-f0afff0098c4/Placeholder.mill/400x400bb-75.webp",alt:"Gluely",className:"flex-shrink-0 w-10 h-10 rounded-xl"}),(0,r.jsxs)("div",{className:"flex-1 min-w-0 text-left",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"text-sm font-semibold text-white",children:n?"Want to pay with Apple Pay or card?":"Prefer Apple Pay or credit card?"}),(0,r.jsx)("span",{className:"px-1.5 py-0.5 text-[9px] font-bold bg-green-500/20 text-green-400 rounded uppercase tracking-wide",children:"Free"})]}),(0,r.jsx)("p",{className:"text-xs text-zinc-400",children:n?"Get Gluely for iOS - same AI, card payments work there.":"Get Gluely for iOS - same AI, pay how you want."})]}),(0,r.jsx)("div",{className:"flex-shrink-0",children:(0,r.jsx)("span",{className:"text-xs font-medium text-primary-400 group-hover:text-primary-300 transition-colors",children:"Get It Free â"})})]})}let g=()=>{let e=(0,u.useRouter)(),{status:t}
1=(0,h.useSession)(),[s,a]=(0,n.useState)(null),[c,l]=(0,n.useState)(null),[o,d]=(0,n.useState)("month"),[m,x]=(0,n.useState)(null),[p,g]=(0,n.useState)(null);(0,n.useEffect)(()=>{fetch("/api/checkout/fungies/subscribe").then(e=>e.json()).then(e=>{l(!!e.available),a(e.plans||[]),(e.plans||[]).some(e=>!1!==e.hasYearly)||d("month")}).catch(()=>{l(!1),a([])})},[]);let f=async s=>{if("authenticated"!==t){let t="/subscribe?plan=".concat(s,"&billing=").concat(o,"ly");localStorage.setItem("redirectAfterSignIn",t),e.push("/signin?callbackUrl=".concat(encodeURIComponent(t)));return}x(s),g(null),(0,b.G)(s,{interval:o,page:"plans_section"});try{var r,n;let e=await fetch("/api/checkout/fungies/subscribe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:s,interval:o})}),t=await e.json();if(!e.ok||!t.paymentUrl)throw Error(t.error||"Could not start checkout");(0,b.Xf)({amount:null!=(n=null==(r=t.plan)?void 0:r.priceUSD)?n:0,currency:"USD",product_type:"subscription",payment_method:"card",plan_name:s,interval:o}),window.location.href=t.paymentUrl}catch(e){g(e instanceof Error?e.message:"Something went wrong"),x(null)}};return null===c||null===s?(0,r.jsx)("div",{className:"py-2",children:(0,r.jsx)("div",{className:"grid gap-3 sm:grid-cols-3",children:[0,1,2].map(e=>(0,r.jsx)("div",{className:"h-64 animate-pulse rounded-xl border border-zinc-800 bg-zinc-800/40"},e))})}):c&&0!==s.length?(0,r.jsxs)("div",{className:"py-2",children:[(0,r.jsxs)("div",{className:"mb-4",children:[(0,r.jsx)("h2",{className:"text-base font-semibold text-white",children:"Pick a plan"}),(0,r.jsx)("p",{className:"mt-1 text-sm text-zinc-400",children:"Plans include monthly credits. Card top-ups unlock after you subscribe; crypto top-ups work anytime."})]}),(0,r.jsxs)("div",{className:"mb-4 flex items-center gap-2",children:[(0,r.jsx)("button",{onClick:()=>d("month"),className:"rounded-full px-4 py-1.5 text-sm font-medium transition ".concat("month"===o?"bg-primary-600 text-white":"bg-zinc-800 text-zinc-400 hover:text-white"),children:"Monthly"}),(0,r.jsxs)("button",{onClick:()=>d("year"),className:"flex items-center gap-2 rounded-full px-4 py-1.5 text-sm font-medium transition ".concat("year"===o?"bg-primary-600 text-white":"bg-zinc-800 text-zinc-400 hover:text-white"),children:["Yearly",(0,r.jsx)("span",{className:"rounded-full bg-green-500/20 px-2 py-0.5 text-xs text-green-400",children:"2 months free"})]})]}),p&&(0,r.jsx)("p",{className:"mb-4 text-sm text-red-400",children:p}),(0,r.jsx)("div",{className:"grid gap-3 sm:grid-cols-3",children:s.map(e=>{let t="year"===o?(e.priceYearlyUSD/12).toFixed(0):e.priceMonthlyUSD,s=null!==m||"month"===o&&!1===e.hasMonthly||"year"===o&&!1===e.hasYearly;return(0,r.jsxs)("div",{className:"relative flex flex-col rounded-xl border p-4 ".concat(e.popular?"border-primary-500 bg-zinc-800/80 ring-1 ring-primary-500":"border-zinc-700/50 bg-zinc-800/50"),children:[e.popular&&(0,r.jsx)("span",{className:"absolute -top-2.5 left-1/2 -translate-x-1/2 rounded-full bg-primary-600 px-2.5 py-0.5 text-[11px] font-semibold text-white",children:"Most Popular"}),(0,r.jsx)("h3",{className:"font-semibold text-white",children:e.name}),(0,r.jsxs)("div",{className:"mt-2 flex items-baseline gap-1",children:[(0,r.jsxs)("span",{className:"text-2xl font-bold text-white",children:["$",t]}),(0,r.jsx)("span",{className:"text-sm text-zinc-400",children:"/mo"})]}),"year"===o&&(0,r.jsxs)("p",{className:"mt-0.5 text-xs text-zinc-500",children:["$",e.priceYearlyUSD," billed yearly"]}),(0,r.jsxs)("ul",{className:"mt-3 space-y-1.5 text-xs text-zinc-300",children:[(0,r.jsxs)("li",{className:"flex items-center gap-1.5",children:[(0,r.jsx)(i.lHQ,{className:"shrink-0 text-primary-400"}),(0,r.jsxs)("span",{children:[(0,r.jsx)("strong",{children:e.monthlyCredits.toLocaleString()})," credits every month"]})]}),(0,r.jsxs)("li",{className:"flex items-center gap-1.5",children:[(0,r.jsx)(i.CMH,{className:"shrink-0 text-green-400"})," Access to all models"]}),(0,r.jsxs)("li",{className:"flex items-center gap-1.5",children:[(0,r.jsx)(i.CMH,{className:"shrink-0 text-green-400"})," Cancel anytime"]})]}),(0,r.jsx)("button",{disabled:s,onClick:()=>f(e.id),className:"mt-4 flex w-full items-center justify-center gap-2 rounded-lg py-2 text-sm font-semibold transition ".concat(e.popular?"bg-primary-600 text-white hover:bg-primary-700":"bg-zinc-700 text-white hover:bg-zinc-600"," disabled:cursor-not-allowed disabled:opacity-60"),children:m===e.id?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.hW,{className:"animate-spin"})," Starting checkout..."]}):"Subscribe"})]},e.id)})}),(0,r.jsx)("p",{className:"mt-4 text-center text-xs text-zinc-500",children:"Prefer a one-time purchase? Buy a credit pack with crypto, no plan needed."})]}):(0,r.jsxs)("div",{className:"space-y-4 py-4 text-center",children:[(0,r.jsx)("p",{className:"text-zinc-400",children:"Card checkout is temporarily unavailable."}),(0,r.jsx)("p",{className:"text-sm text-zinc-500",children:"You can still buy credits instantly with crypto, no plan needed."}),(0,r.jsx)(y,{variant:"card-down"})]})},f=async()=>{try{let e=await fetch("/api/read/user/credits",{method:"POST"});if(!e.ok)return null;let t=await e.json();return"number"==typeof(null==t?void 0:t.credits)?t.credits:null}catch(e){return null}},j=e=>{var t;let{userName:s,onPurchaseComplete:o,isAdmin:d=!1}
1=e,m=(0,l.EN)(d),[x,u]=(0,n.useState)("creator"),[h,b]=(0,n.useState)(!1),[y,j]=(0,n.useState)(null),[N,w]=(0,n.useState)(!1),[v,k]=(0,n.useState)([]),[z,S]=(0,n.useState)(null),[C,P]=(0,n.useState)("moonpay"),[A,_]=(0,n.useState)(null);(0,n.useEffect)(()=>{(async()=>{try{var e;let t=await fetch("/api/checkout/fungies").then(e=>e.json()),s=(null==t?void 0:t.available)?{...t,provider:"fungies"}:{...await fetch("/api/checkout/moonpay").then(e=>e.json()),provider:"moonpay"};P(s.provider),j(s.available),S((null==t?void 0:t.canBuyTopUp)!==!1),w(s.kinguinEnabled||!1),k(s.configuredPacks||[]),(null==(e=s.configuredPacks)?void 0:e.length)>0&&!s.configuredPacks.includes(x)&&u(s.configuredPacks[0])}catch(e){j(!1)}})()},[]),(0,n.useEffect)(()=>{fetch("/api/read/user/pending-purchase").then(e=>e.ok?e.json():null).then(e=>_((null==e?void 0:e.pending)||null)).catch(()=>null)},[]),(0,n.useEffect)(()=>{if(!A)return;let e=!1;return(async()=>{let t=await f();if(e||null===t)return;let s=Date.now();for(;!e&&Date.now()-s<6e4;){if(await new Promise(e=>setTimeout(e,3e3)),e)return;let s=await f();if(null!==s&&s>t){a.Ay.success("+".concat((s-t).toLocaleString()," credits added")),_(null),null==o||o();return}}if(!e){try{let e=await fetch("/api/read/user/pending-purchase"),t=e.ok?await e.json():null;if(t&&!t.pending)return void _(null)}catch(e){}(0,a.Ay)("Payment is still processing, credits will appear shortly. Contact support if not.",{duration:8e3})}})(),()=>{e=!0}},[null==A?void 0:A.createdAt]);let D=async()=>{b(!0);try{let e=await fetch("/api/checkout/".concat(C),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({packId:x})}),t=await e.json();if(403===e.status&&t.requiresSubscription){window.location.href="/subscribe";return}if(!e.ok)throw Error(t.error||"Failed to create checkout");if(!t.paymentUrl)throw Error("No checkout URL received");window.location.href=t.paymentUrl}catch(e){console.error("Card purchase error:",e),a.Ay.error("Failed to start checkout. Please try again."),b(!1)}},U=e=>v.includes(e);return null===y?(0,r.jsx)("div",{className:"py-4",children:(0,r.jsxs)("div",{className:"flex items-center justify-center py-8",children:[(0,r.jsx)(i.hW,{className:"animate-spin text-zinc-400 mr-2"}),(0,r.jsx)("span",{className:"text-zinc-400",children:"Checking payment options..."})]})}):!1===z?(0,r.jsx)(g,{}):!y&&N?(0,r.jsxs)("div",{className:"py-2",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsx)("h2",{className:"text-base font-semibold text-white",children:"Buy Credits with Card"}),(0,r.jsxs)("div",{className:"flex items-center gap-2 text-zinc-400",children:[(0,r.jsx)(i.x1c,{className:"text-primary-400"}),(0,r.jsx)(c.xtw,{className:"text-white"}),(0,r.jsx)(c.W60,{className:"text-white"})]})]}),(0,r.jsx)(p,{userName:s,onPurchaseComplete:o,isAdmin:d})]}):y?(0,r.jsxs)("div",{className:"py-2",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsx)("h2",{className:"text-base font-semibold text-white",children:"Buy Credits with Card"}),(0,r.jsxs)("div",{className:"flex items-center gap-2 text-zinc-400",children:[(0,r.jsx)(i.x1c,{className:"text-primary-400"}),(0,r.jsx)(c.xtw,{className:"text-white"}),(0,r.jsx)(c.W60,{className:"text-white"})]})]}),(0,r.jsxs)("div",{className:"text-sm text-zinc-400 mb-4",children:["Credits will be added to your account (",s,") after payment."]}),(0,r.jsx)("div",{className:"mb-4 p-3 rounded-xl bg-zinc-800/50 border border-zinc-700/50",children:(0,r.jsxs)("p",{className:"text-xs text-zinc-300",children:[(0,r.jsx)("strong",{className:"text-white",children:"How it works:"})," ","fungies"===C?(0,r.jsx)(r.Fragment,{children:"You'll be redirected to our secure checkout to complete payment. Credits are added automatically within 1-3 minutes."}):(0,r.jsxs)(r.Fragment,{children:["You'll be redirected to"," ",(0,r.jsx)("a",{href:"https://www.moonpay.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary-400 hover:underline",children:"MoonPay"})," ","to complete payment securely. Credits are added automatically within 1-3 minutes."]})]})}),A&&(0,r.jsx)("div",{className:"mb-4 p-3 rounded-xl bg-amber-500/10 border border-amber-500/30",children:(0,r.jsxs)("p",{className:"text-xs text-amber-300",children:[(0,r.jsx)("strong",{className:"text-amber-200",children:"Your payment is processing."})," ","Credits usually arrive within a minute.",A.packName&&(0,r.jsxs)(r.Fragment,{children:[" You just bought the ",A.packName," pack."]})]})}),(0,r.jsx)("div",{className:"space-y-3",children:m.map(e=>{let t=U(e.id);return(0,r.jsxs)("label",{className:"flex items-center p-4 rounded-xl border transition-all ".concat(t?x===e.id?"border-primary-500/50 bg-zinc-800/80 cursor-pointer":"border-zinc-700/50 bg-zinc-800/50 hover:border-zinc-600 cursor-pointer":"border-zinc-800 bg-zinc-800/30 cursor-not-allowed opacity-50"),children:[(0,r.jsx)("input",{type:"radio",name:"card-credit-pack",value:e.id,onChange:()=>t&&u(e.id),checked:x===e.id,disabled:!t,className:"radio radio-primary mr-3 bg-inherit border-2 border-primary-600"}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("span",{className:"font-semibold text-white",children:["$",e.priceUSD]}),e.popular&&(0,r.jsx)("span",{className:"px-2 py-0.5 text-xs font-medium bg-primary-500/20 text-primary-400 rounded",children:"Popular"}),e.bonus&&(0,r.jsxs)("span",{className:"px-2 py-0.5 text-xs font-medium bg-green-500/20 text-green-400 rounded",children:["+",e.bonus,"% bonus"]}),!t&&(0,r.jsx)("span",{className:"px-2 py-0.5 text-xs font-medium bg-zinc-700/50 text-zinc-500 rounded",children:"Coming soon"}),(null==A?void 0:A.packId)===e.id&&(0,r.jsx)("span",{className:"px-2 py-0.5 text-xs font-medium bg-amber-500/20 text-amber-400 rounded",children:"Payment processing"})]}),(0,r.jsxs)("div",{className:"text-sm text-zinc-400 mt-1",children:[e.credits.toLocaleStr
1ing()," credits",e.description&&" - ".concat(e.description)]})]})]},e.id)})}),(0,r.jsx)("button",{onClick:D,disabled:h||!U(x),className:"mt-6 w-full bg-gradient-to-r from-primary-500 to-primary-600 text-white py-3 px-4 rounded-lg font-semibold hover:from-primary-600 hover:to-primary-700 transition-all flex items-center justify-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed",children:h?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.hW,{className:"animate-spin"}),"Redirecting to checkout..."]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.x1c,{}),"Pay $",null==(t=m.find(e=>e.id===x))?void 0:t.priceUSD," with Card"]})}),(0,r.jsx)("div",{className:"mt-4 text-center text-xs text-zinc-500",children:"Visa, Mastercard, Amex, Apple Pay, Google Pay"})]}):(0,r.jsxs)("div",{className:"py-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsx)("h2",{className:"text-base font-semibold text-white",children:"Buy Credits with Card"}),(0,r.jsxs)("div",{className:"flex items-center gap-2 text-zinc-400",children:[(0,r.jsx)(i.x1c,{className:"text-primary-400"}),(0,r.jsx)(c.xtw,{className:"text-white"}),(0,r.jsx)(c.W60,{className:"text-white"})]})]}),(0,r.jsxs)("div",{className:"text-center py-8",children:[(0,r.jsx)("p",{className:"text-zinc-400 mb-2",children:"Card payments coming soon!"}),(0,r.jsx)("p",{className:"text-sm text-zinc-500",children:"In the meantime, you can purchase credits with cryptocurrency."})]})]})}}}]);
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.