1import{d as yt,C as xt,G as gt,k as ft,l as _t,i as kt,n as ze,V as Ce,W as Se,bK as De,m as wt,Z as Ve,bI as $e,r as b,ax as $,w as Oe,ci as Ut,bV as Ct,o,c as O,v as f,b as t,u as a,a as i,e as u,_ as St,g as Mt,h as g,z as pe,t as n,a0 as U,a1 as F,F as re,y as le,D as Pt,f as p,cj as jt,x as W,ck as Me,bL as Tt,Y as It,S as At,c8 as Jt,M as Rt,q as h}from"./tOb3Zl6S.js";import{_ as qt}from"./DiQPfW_t.js";import{_ as Nt}from"./5YV34PJo.js";import{_ as Et}from"./kB5nK6fG.js";import{_ as Lt}from"./BYf26WdW.js";import{f as M,g as Bt}from"./COhrILo-.js";import"./qu7JTs9K.js";import"./DEVHbpV9.js";import"./CC0OHWaO.js";import"./XiVZk-9_.js";import"./BAlHvQu7.js";import"./CHHASab7.js";import"./8Lp5hLVD.js";import"./C70l4O0v.js";import"./BwfvWDTl.js";import"./BabsMbRp.js";import"./kRIii9yh.js";import"./gi_HHDoi.js";import"./DxCcUeOy.js";import"./D72sYDGU.js";import"./D-pctMGk.js";import"./DMkCVrvg.js";import"./D_NzIyiT.js";const zt={class:"flex items-center gap-3"},Dt={class:"flex items-center gap-2 text-xs text-muted"},Vt={class:"mx-auto max-w-2xl px-4 pb-16 pt-6"},$t={key:0,class:"mb-8 flex items-center justify-between rounded-xl border border-amber-200 bg-gradient-to-r from-amber-50 to-orange-50 px-5 py-4 dark:border-amber-800/40 dark:from-amber-950/30 dark:to-orange-950/20"},Ot={class:"flex items-center gap-3"},Ft={class:"flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-amber-100 dark:bg-amber-900/50"},Kt={class:"flex items-center gap-2"},Gt={class:"mb-10"},Yt={class:"mb-5 flex items-center justify-between"},Ht={class:"flex items-center gap-3"},Zt={key:1},Wt={class:"text-base font-semibold text-highlighted"},Qt={key:0,class:"rounded-xl border border-neutral-200 bg-white px-5 py-3 shadow-sm dark:border-neutral-800 dark:bg-neutral-900/50"},Xt={class:"flex items-center gap-3 text-sm text-muted"},ea={class:"text-highlighted"},ta={key:1,class:"rounded-xl border border-neutral-200 bg-white p-5 shadow-sm dark:border-neutral-800 dark:bg-neutral-900/50"},aa={class:"space-y-4"},sa={class:"relative"},ra={key:0,class:"absolute left-0 right-0 top-full z-50 mt-1 overflow-hidden rounded-lg border border-neutral-200 bg-white shadow-lg dark:border-neutral-700 dark:bg-neutral-800"},la=["onMousedown"],oa={class:"text-highlighted"},na={class:"mt-1 text-xs text-muted"},ia={class:"grid grid-cols-3 gap-3"},da={class:"col-span-2"},ua=["value"],ca={class:"mt-1.5 flex items-center gap-1 text-xs text-muted"},pa={key:0,class:"flex items-center gap-1.5 rounded-lg bg-red-50 px-3 py-2 text-xs text-red-600 dark:bg-red-900/20 dark:text-red-400"},ma={key:1,class:"mb-10"},ba={class:"mb-5 flex items-center gap-3"},ha={class:"flex h-8 w-8 items-center justify-center rounded-full bg-neutral-900 text-sm font-bold text-white shadow-sm dark:bg-white dark:text-neutral-900"},va={class:"rounded-xl border border-neutral-200 bg-white p-5 shadow-sm dark:border-neutral-800 dark:bg-neutral-900/50"},ya={class:"mb-10"},xa={class:"rounded-xl border border-neutral-200 bg-white p-5 shadow-sm dark:border-neutral-800 dark:bg-neutral-900/50"},ga={key:0,class:"mb-4"},fa={class:"mb-3 flex cursor-pointer items-center gap-2.5"},_a={key:0,class:"mb-4 ml-6 space-y-2"},ka=["value"],wa={class:"flex-1"},Ua={class:"text-sm font-medium text-highlighted capitalize"},Ca={class:"text-sm text-muted"},Sa={class:"text-xs text-muted"},Ma={class:"flex cursor-pointer items-center gap-2.5"},Pa={key:0,class:"mt-1.5 text-xs text-red-500"},ja={class:"mt-4 flex items-center gap-2 rounded-lg bg-neutral-50 px-3 py-2.5 text-xs text-muted dark:bg-neutral-800/50"},Ta={class:"mb-8"},Ia={class:"rounded-xl border border-neutral-200 bg-white shadow-sm dark:border-neutral-800 dark:bg-neutral-900/50"},Aa={class:"p-5"},Ja={class:"flex items-start justify-between"},Ra={class:"flex-1"},qa={class:"flex items-center gap-2"},Na={class:"text-base font-semibold text-highlighted"},Ea={class:"mt-1 text-sm text-muted"},La={key:0,class:"text-muted"},Ba={class:"mt-2 flex items-center gap-3"},za={class:"text-right"},Da={class:"text-xl font-bold text-highlighted"},Va={class:"text-xs text-muted"},$a={key:0},Oa={class:"border-t border-neutral-100 px-5 py-4 dark:border-neutral-800"},Fa={key:0},Ka={key:1},Ga={class:"flex gap-2"},Ya={key:0,class:"mt-1.5 text-xs text-red-500"},Ha={key:2,class:"flex items-center justify-between rounded-lg bg-green-50 px-3.5 py-2.5 dark:bg-green-900/20"},Za={class:"flex items-center gap-2.5"},Wa={class:"text-sm font-medium text-green-800 dark:text-green-200"},Qa={class:"text-xs text-green-600 dark:text-green-400"},Xa={key:0},es={key:1},ts={key:2},as={key:3},ss={class:"border-t border-neutral-100 px-5 py-4 dark:border-neutral-800"},rs={class:"space-y-2"},ls={class:"flex items-center justify-between text-sm"},os={class:"text-highlighted"},ns={key:0,class:"flex items-center justify-between text-sm"},is={class:"font-medium text-green-600 dark:text-green-400"},ds={class:"flex items-center justify-between text-sm"},us={class:"flex items-center gap-1 text-muted"},cs={key:0,class:"text-xs text-muted"}
1,ps={key:1,class:"text-highlighted"},ms={key:2,class:"text-xs text-muted"},bs={class:"mt-3 flex items-center justify-between border-t border-neutral-100 pt-3 dark:border-neutral-800"},hs={class:"text-right"},vs={key:0,class:"text-xl font-bold text-highlighted"},ys={key:1,class:"text-xl font-bold text-highlighted"},xs={key:2,class:"text-[10px] text-muted"},gs={key:3,class:"text-[10px] text-muted"},fs={key:2,class:"mb-5 flex items-start gap-3 rounded-xl border border-red-200 bg-red-50 px-4 py-3.5 dark:border-red-800/50 dark:bg-red-900/20"},_s={class:"text-sm text-red-700 dark:text-red-300"},ks={class:"mb-5"},ws={class:"flex cursor-pointer items-start gap-3"},Us={class:"space-y-3 rounded-xl border border-neutral-100 bg-neutral-50/50 p-4 text-xs text-muted dark:border-neutral-800 dark:bg-neutral-900/30"},Cs={class:"flex items-start gap-2.5"},Ss={key:0},Ms={class:"text-highlighted"},Ps={key:1},js={class:"text-highlighted"},Ts={key:2},Is={class:"flex items-start gap-2.5"},As={class:"flex items-start gap-2.5"},Js={class:"p-6"},Rs={class:"mb-5 flex items-center justify-between"},qs={class:"mb-5 overflow-hidden rounded-xl border border-primary/20 bg-gradient-to-br from-primary-50 to-blue-50 dark:from-primary-950/30 dark:to-blue-950/20"},Ns={class:"p-5"},Es={class:"flex items-center justify-between"},Ls={class:"flex items-center gap-2"},Bs={class:"text-xl font-bold text-highlighted"},zs={class:"mt-1 text-sm text-muted"},Ds={class:"text-right"},Vs={class:"text-2xl font-bold text-primary"},$s={key:0,class:"text-xs text-muted"},Os={class:"flex border-t border-primary/10"},Fs={class:"flex flex-1 items-center justify-center gap-1.5 border-r border-primary/10 py-2.5 text-xs"},Ks={class:"text-muted"},Gs={class:"flex flex-1 items-center justify-center gap-1.5 py-2.5 text-xs"},Ys={class:"text-muted"},Hs={class:"mb-5"},Zs={class:"grid grid-cols-1 gap-0"},Ws={class:"flex items-center gap-2.5"},Qs={class:"text-sm text-muted"},Xs={class:"text-sm font-medium text-highlighted"},er={class:"mb-5 rounded-lg bg-neutral-50 p-4 dark:bg-neutral-800/50"},tr={class:"grid grid-cols-2 gap-2"},ar={class:"text-highlighted"},Mr=yt({__name:"checkout",async setup(sr){let R,oe;xt({title:"Checkout - Complete Your Purchase | Tomba",description:"Complete your Tomba subscription purchase securely."});const{data:K,getSession:Pe}=gt(),q=ft(),P=_t(),Fe=kt(),Q=h(()=>P.query.price_id||""),S=h(()=>P.query.plan||"Plan"),j=h(()=>P.query.credits||"0"),v=h(()=>P.query.period||"monthly"),B=h(()=>Number(P.query.price||0)),X=h(()=>P.query.mode||"subscription"),je=h(()=>P.query.coupon||""),Ke=h(()=>P.query.country_code||""),Ge=h(()=>P.query.zip_code||""),Ye=h(()=>(document.cookie.match(/(^| )partnero_partner=([^;]+)/)||[])[2]||"");ze(async()=>{Q.value||Ce("/upgrade");const s=Number(j.value),e=!!K.value?.data?.pricing?.plan_full_access;if((X.value==="subscription",s>5e4)&&!e){Ce("/upgrade");return}je.value&&(T.value=je.value,await Se(),_e()),We(),Ae()});const{data:me}=([R,oe]=De(()=>$("/account/billing")),R=await R,oe(),R),N=s=>!me.value?.data||!Array.isArray(me.value.data)?"":me.value.data.find(c=>c.meta_key===`billing_${s}`)?.meta_value||"",r=wt({company:N("company"),address:N("address"),postalCode:Ge.value||N("postal_code")||"",city:N("city")||"",country:Ke.value||N("country")||K.value?.data?.country||"US",additionalInfo:N("vat_number")||"",cardholderName:`${K.value?.data?.first_name||""} ${K.value?.data?.last_name||""}`.trim()}),He=!!(N("country")||N("address")),G=b(He),x=h(()=>Bt(r.country)),Ze=b(),ee=b([]),Y=b(!1);let ne=null,ie=null;const We=()=>{if(typeof window>"u")return;const s="_gmapsCallback_"+Date.now();if(window[s]=()=>{Te(),delete window[s]},window.google?.maps?.places){Te();return}const e=document.createElement("script"),c=Ve().public.googleMapsKey||"";e.src=`https://maps.googleapis.com/maps/api/js?key=${c}&libraries=places&callback=${s}&loading=async`,e.async=!0,e.defer=!0,document.head.appendChild(e)},Te=()=>{if(!window.google?.maps?.places)return;ne=new window.google.maps.places.AutocompleteService;const s=document.createElement("div");ie=new window.google.maps.places.PlacesService(s)},Qe=()=>{const s=r.address;if(!s||s.length<3||!ne){ee.value=[],Y.value=!1;return}ne.getPlacePredictions({input:s,types:["address"]},(e,c)=>{c==="OK"&&e?(ee.value=e.slice(0,5),Y.value=!0):(ee.value=[],Y.value=!1)})},Xe=s=>{Y.value=!1,r.address=s.description,ie&&ie.getDetails({placeId:s.place_id,fields:["address_components"]},(e,c)=>{if(c!=="OK"||!e?.address_components)return;let d="",J="";for(const y of e.address_components)switch(y.types[0]){case"street_number":J=y.long_name;break;case"route":d=y.long_name;break;case"locality":r.city=y.long_name;break;case"country":r.country=y.short_name;break;case"postal_code":r.postalCode=y.long_name;break}r.address=J?`${J} ${d}`:d})},et=()=>{setTimeout(()=>{Y.value=!1},200)};
1$e(()=>{ne=null,ie=null,m.value=null,T.value="",_.value=null});const T=b(""),m=b(null),be=b(!1),H=b(""),te=b(!1),E=b(!1),C=b(""),ae=b(!1),tt=["US","CA","GB","AU","IN","BR","MX","JP","KR","CN"],at=s=>/^https?:\/\//i.test(s.trim())||/^www\./i.test(s.trim()),Ie=()=>{const s=r.country;if(!s)return"Country is required";if(r.address&&at(r.address))return"Please enter a valid street address, not a URL";if(tt.includes(s)){if(!r.postalCode?.trim())return`Postal code is required for ${s}`;if(!r.address?.trim())return`Street address is required for ${s}`}return s==="US"&&r.postalCode&&!/^\d{5}(-\d{4})?$/.test(r.postalCode.trim())?"Please enter a valid US zip code (e.g. 10001)":null},_=b(null),he=b(!1),de=b(""),Ae=async()=>{if(!r.country)return;const s=Ie();if(s){de.value=s,_.value=null;return}de.value="",he.value=!0;try{const{data:e}=await $("/stripe/review-order",{method:"POST",body:{price_id:Q.value,coupon:m.value?.id||"",currency:x.value.toLowerCase(),address:{line1:r.address,city:r.city,state:"",postal_code:r.postalCode,country:r.country}}});e.value&&(_.value=e.value)}catch{}finally{he.value=!1}};let ve=null;Oe(()=>[r.country,r.postalCode,r.city,r.address,m.value?.id],()=>{ve&&clearTimeout(ve),ve=setTimeout(()=>{r.country&&Ae()},500)},{immediate:!0});const Je=b(!1),Z=b(!1),{data:st}=([R,oe]=De(()=>$("/stripe/cards")),R=await R,oe(),R),ue=h(()=>st.value?.data||[]),k=b("new"),L=b("");Oe(ue,s=>{s.length>0&&(k.value="saved",L.value=s[0].id)},{immediate:!0});let I=null,se=null;const ye=b(!1),xe=b(""),Re=[{value:"AF",label:"Afghanistan"},{value:"AL",label:"Albania"},{value:"DZ",label:"Algeria"},{value:"AR",label:"Argentina"},{value:"AU",label:"Australia"},{value:"AT",label:"Austria"},{value:"BH",label:"Bahrain"},{value:"BD",label:"Bangladesh"},{value:"BE",label:"Belgium"},{value:"BR",label:"Brazil"},{value:"BG",label:"Bulgaria"},{value:"CA",label:"Canada"},{value:"CL",label:"Chile"},{value:"CN",label:"China"},{value:"CO",label:"Colombia"},{value:"HR",label:"Croatia"},{value:"CZ",label:"Czech Republic"},{value:"DK",label:"Denmark"},{value:"EG",label:"Egypt"},{value:"EE",label:"Estonia"},{value:"FI",label:"Finland"},{value:"FR",label:"France"},{value:"DE",label:"Germany"},{value:"GH",label:"Ghana"},{value:"GR",label:"Greece"},{value:"HK",label:"Hong Kong"},{value:"HU",label:"Hungary"},{value:"IN",label:"India"},{value:"ID",label:"Indonesia"},{value:"IE",label:"Ireland"},{value:"IL",label:"Israel"},{value:"IT",label:"Italy"},{value:"JP",label:"Japan"},{value:"JO",label:"Jordan"},{value:"KE",label:"Kenya"},{value:"KR",label:"South Korea"},{value:"KW",label:"Kuwait"},{value:"LV",label:"Latvia"},{value:"LB",label:"Lebanon"},{value:"LT",label:"Lithuania"},{value:"LU",label:"Luxembourg"},{value:"MY",label:"Malaysia"},{value:"MA",label:"Morocco"},{value:"MX",label:"Mexico"},{value:"NL",label:"Netherlands"},{value:"NZ",label:"New Zealand"},{value:"NG",label:"Nigeria"},{value:"NO",label:"Norway"},{value:"OM",label:"Oman"},{value:"PK",label:"Pakistan"},{value:"PE",label:"Peru"},{value:"PH",label:"Philippines"},{value:"PL",label:"Poland"},{value:"PT",label:"Portugal"},{value:"QA",label:"Qatar"},{value:"RO",label:"Romania"},{value:"RU",label:"Russia"},{value:"SA",label:"Saudi Arabia"},{value:"RS",label:"Serbia"},{value:"SG",label:"Singapore"},{value:"SK",label:"Slovakia"},{value:"SI",label:"Slovenia"},{value:"ZA",label:"South Africa"},{value:"ES",label:"Spain"},{value:"LK",label:"Sri Lanka"},{value:"SE",label:"Sweden"},{value:"CH",label:"Switzerland"},{value:"TW",label:"Taiwan"},{value:"TH",label:"Thailand"},{value:"TN",label:"Tunisia"},{value:"TR",label:"Turkey"},{value:"UA",label:"Ukraine"},{value:"AE",label:"United Arab Emirates"},{value:"GB",label:"United Kingdom"},{value:"US",label:"United States"},{value:"VN",label:"Vietnam"}],z=h(()=>{if(_.value?.subtotal)return(_.value.subtotal-(_.value.discount||0))/100;if(m.value){const s=B.value;if(m.value.percent_off)return s*(1-m.value.percent_off/100);if(m.value.amount_off)return Math.max(0,s-m.value.amount_off/100)}return B.value}),qe=h(()=>B.value-z.value),ce=h(()=>Number(j.value).toLocaleString()),Ne=h(()=>
1(Number(j.value)*2).toLocaleString()),Ee=h(()=>{const s=v.value==="yearly"?31536e6:2592e6;return new Date(Date.now()+s).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"})}),rt=h(()=>v.value==="monthly"&&X.value==="subscription"&&!Je.value),lt=h(()=>(k.value==="saved"?!!L.value:ye.value)&&ae.value&&!E.value),Le={2500:{searches:2500,verifications:2500,leads:1e4,lists:150,attributes:29,keys:10,teams:10,sources:1e4,emailCount:1e4},5e3:{searches:5e3,verifications:5e3,leads:2e4,lists:300,attributes:50,keys:20,teams:20,sources:2e4,emailCount:1e4},2e4:{searches:2e4,verifications:2e4,leads:8e4,lists:1e3,attributes:100,keys:50,teams:50,sources:8e4,emailCount:25e3},5e4:{searches:5e4,verifications:5e4,leads:2e5,lists:2e3,attributes:200,keys:100,teams:100,sources:2e5,emailCount:25e3},1e5:{searches:1e5,verifications:1e5,leads:4e5,lists:3e3,attributes:300,keys:200,teams:200,sources:4e5,emailCount:25e3},2e5:{searches:2e5,verifications:2e5,leads:8e5,lists:5e3,attributes:500,keys:400,teams:400,sources:8e5,emailCount:25e3},35e4:{searches:35e4,verifications:35e4,leads:14e5,lists:8750,attributes:875,keys:700,teams:700,sources:14e5,emailCount:25e3},4e5:{searches:4e5,verifications:4e5,leads:16e5,lists:1e4,attributes:1e3,keys:800,teams:800,sources:16e5,emailCount:25e3},5e5:{searches:5e5,verifications:5e5,leads:2e6,lists:12500,attributes:1250,keys:1e3,teams:1e3,sources:2e6,emailCount:25e3},6e5:{searches:6e5,verifications:6e5,leads:24e5,lists:15e3,attributes:1500,keys:1200,teams:1200,sources:24e5,emailCount:25e3},7e5:{searches:7e5,verifications:7e5,leads:28e5,lists:17500,attributes:1750,keys:1400,teams:1400,sources:28e5,emailCount:25e3},8e5:{searches:8e5,verifications:8e5,leads:32e5,lists:2e4,attributes:2e3,keys:1600,teams:1600,sources:32e5,emailCount:25e3},9e5:{searches:9e5,verifications:9e5,leads:36e5,lists:22500,attributes:2250,keys:1800,teams:1800,sources:36e5,emailCount:25e3}},ot=h(()=>{const s=Number(j.value);return Le[s]||Le[2500]}),A=s=>s.toLocaleString(),nt=h(()=>{const s=ot.value;return[{icon:"i-heroicons-magnifying-glass",label:"Search requests",value:A(s.searches),color:"text-blue-500"},{icon:"i-heroicons-shield-check",label:"Verification requests",value:A(s.verifications),color:"text-green-500"},{icon:"i-heroicons-users",label:"Saved leads",value:A(s.leads),color:"text-purple-500"},{icon:"i-heroicons-queue-list",label:"Lead lists",value:A(s.lists),color:"text-indigo-500"},{icon:"i-heroicons-tag",label:"Lead attributes",value:A(s.attributes),color:"text-pink-500"},{icon:"i-heroicons-key",label:"API keys",value:A(s.keys),color:"text-orange-500"},{icon:"i-heroicons-user-group",label:"Team members",value:A(s.teams),color:"text-cyan-500"},{icon:"i-heroicons-globe-alt",label:"Sources access",value:A(s.sources),color:"text-teal-500"},{icon:"i-heroicons-envelope",label:"Email count requests",value:A(s.emailCount),color:"text-amber-500"},{icon:"i-heroicons-calendar",label:"Billing cycle",value:v.value==="yearly"?"Annual":v.value==="monthly"?"Monthly":"One-time",color:"text-neutral-500"},{icon:"i-heroicons-code-bracket",label:"API access",value:"Full access",color:"text-violet-500"},{icon:"i-heroicons-arrow-up-tray",label:"Bulk operations",value:s.searches>=2e4?"Included":"Not included",color:"text-rose-500"}]}),ge=b(),fe=b(),Be=b(!1);ze(async()=>{if(I=await Ut(),!I){C.value="Failed to load payment system. Please refresh the page.";return}const e=Ct().value==="dark",c=I.elements();se=c.create("card",{style:{base:{fontSize:"16px",lineHeight:"24px",color:e?"#e5e7eb":"#1f2937",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontSmoothing:"antialiased","::placeholder":{color:e?"#6b7280":"#9ca3af"},iconColor:e?"#9ca3af":"#6b7280"},invalid:{color:"#ef4444",iconColor:"#ef4444"}},hidePostalCode:!0});const d=I.paymentRequest({country:"US",currency:x.value.toLowerCase(),total:{label:`${S.value} Plan`,amount:Math.round(B.value*100)},requestPayerName:!0,requestPayerEmail:!0});if(await d.canMakePayment()){Be.value=!0;const y=c.create("paymentRequestButton",{paymentRequest:d});await Se(),fe.value&&y.mount(fe.value),d.on("paymentmethod",async w=>{try{const{data:D,error:we}=await $("/stripe/create-payment-intent",{method:"POST",body:{price_id:Q.value,mode:X.value,coupon:m.value?.id||"",name:w.payerName||r.cardholderName,address:{line1:r.address,city:r.city,postal_code:r.postalCode,country:r.country}}});if(we?.value||!D.value?.client_secret){w.complete("fail");return}const{error:Ue,paymentIntent:l}=await I.confirmCardPayment(D.value.client_secret,{payment_method:w.paymentMethod.id},{handleActions:!1});if(Ue){w.complete("fail");return}if(w.complete("success"),l?.status==="requires_action"){const{error:V}=await I.confirmCardPayment(D.value.client_secret);
1if(V){q.push({path:"/upgrade/cancelled",query:{plan:S.value,reason:V.message}});return}}await Pe({required:!0}),q.push({path:"/upgrade/success",query:{plan:S.value,credits:j.value,period:v.value,price:z.value.toString(),amount_total:(l?.amount||Math.round(z.value*100)).toString()}})}catch{w.complete("fail")}})}await Se(),ge.value&&se.mount(ge.value),se.on("change",y=>{ye.value=y.complete,xe.value=y.error?.message||""})}),$e(()=>{se?.destroy()});const _e=async()=>{if(!T.value.trim())return;be.value=!0,H.value="",m.value=null;const{data:s,error:e}=await $("/stripe/validate-coupon",{method:"POST",body:{coupon_code:T.value.trim(),mode:X.value,period:v.value}});if(be.value=!1,e?.value){H.value=e.value?.data?.error?.message||"Invalid or expired coupon code";return}m.value=s.value,Fe.add({title:"Coupon applied!",color:"success"})},it=()=>{te.value=!1,H.value=""},dt=()=>{m.value=null,T.value="",H.value="",te.value=!1},ke=async(s,e)=>{await $("/account/billing",{method:"PUT",body:{company:r.company,address:r.address,postal_code:r.postalCode,city:r.city,country:r.country,vat_number:r.additionalInfo}});const c=e?.amount||s?.amount||Math.round(z.value*100);if(window.po)try{window.po("transactions","sale",{data:{key:K.value?.data?.email,amount:c,currency:e?.currency||s?.currency||x.value.toLowerCase(),product_id:Q.value,product_name:S.value,order_id:s?.subscription_id||s?.invoice_id||e?.id||"",customer_key:K.value?.data?.email}})}catch{}await Pe({required:!0}),q.push({path:"/upgrade/success",query:{plan:S.value,credits:j.value,period:v.value,price:z.value.toString(),amount_total:c.toString(),currency:x.value.toLowerCase()}})},ut=async()=>{if(!I){C.value="Payment system not ready. Please refresh.";return}if(k.value==="new"&&!ye.value){C.value="Please complete your card details";return}if(k.value==="saved"&&!L.value){C.value="Please select a payment card";return}if(!ae.value){C.value="Please agree to the Terms of Service";return}const s=Ie();if(s){C.value=s;return}if(!E.value){E.value=!0,C.value="";try{const{data:e,error:c}=await $("/stripe/create-payment-intent",{method:"POST",body:{price_id:Q.value,mode:X.value,coupon:m.value?.id||"",name:r.cardholderName,payment_method_id:k.value==="saved"?L.value:"",address:{line1:r.address,city:r.city,postal_code:r.postalCode,country:r.country},tax_id:r.additionalInfo,partner_key:Ye.value||void 0}});if(c?.value){if((c.value.data?.error?.type||c.value.data?.errors?.type||"")==="plan_restricted"){Ce({path:"/upgrade",query:{restricted:"true"}});return}C.value=c.value.data?.errors?.message||c.value.data?.error?.message||"Failed to create payment",E.value=!1;return}if(e.value?.status==="paid"){await ke(e.value);return}if(e.value?.status==="requires_action"&&e.value?.client_secret){const{error:w,paymentIntent:D}=await I.confirmCardPayment(e.value.client_secret);if(w){q.push({path:"/upgrade/cancelled",query:{plan:S.value,reason:w.message||"Payment failed"}});return}await ke(e.value,D);return}const d=e.value?.client_secret;if(!d){C.value="Failed to initialize payment. Please try again.",E.value=!1;return}const{error:J,paymentIntent:y}=await I.confirmCardPayment(d,{payment_method:{card:se,billing_details:{name:r.cardholderName,address:{line1:r.address,city:r.city,postal_code:r.postalCode,country:r.country}}}});if(J){q.push({path:"/upgrade/cancelled",query:{plan:S.value,reason:J.message||"Payment failed"}});return}(y?.status==="succeeded"||y?.status==="requires_action")&&await ke(e.value,y)}catch(e){C.value=e instanceof Error?e.message:"An unexpected error occurred"}finally{E.value=!1}}},ct={2500:{price:588,priceId:{usd:"price_1TwnyWJndjUMdodUcKZVN8Fp",eur:"price_1U2xltJndjUMdodUpFNaHCZ6",gbp:"price_1U2xlzJndjUMdodUtvLbKZy0"}},5e3:{price:1068,priceId:{usd:"price_1TwnyXJndjUMdodUSwatOGkp",eur:"price_1U2xluJndjUMdodUjQnk8YjS",gbp:"price_1U2xm0JndjUMdodUcg8l8gjG"}},2e4:{price:2388,priceId:{usd:"price_1TwnyYJndjUMdodUySCSalMT",eur:"price_1U2xluJndjUMdodUS1PcReTX",gbp:"price_1U2xm0JndjUMdodUc698jCQ0"}},5e4:{price:5988,priceId:{usd:"price_1TwnyZJndjUMdodUuEdo1hzO",eur:"price_1U2xlvJndjUMdodU2o0moECB",gbp:"price_1U2xm1JndjUMdodUTSz2oDI0"}},1e5:{price:10788,priceId:{usd:"price_1TwnyaJndjUMdodUpXdjT5Uu",eur:"price_1U2xlvJndjUMdodU4ZGhwMgY",gbp:"price_1U2xm1JndjUMdodUQHfYchB9"}},2e5:{price:19440,priceId:{usd:"price_1TwnycJndjUMdodUbT8qCZlW",eur:"price_1U2xlwJndjUMdodUBoD4MWBT",gbp:"price_1U2xm2JndjUMdodUzNfG73dJ"}},35e4:{price:29988,priceId:{usd:"price_1TwnydJndjUMdodU9qCSOJ2m",eur:"price_1U2xlwJndjUMdodUr7hrUNiR",gbp:"price_1U2xm2JndjUMdodU1GO4CkoP"}}},pt={2500:{price:588,priceId:{usd:"price_1TwnzgJndjUMdodUyL0dBb3V",eur:"price_1U2xskJndjUMdodUqQp0oOCF",gbp:"price_1U2xsqJndjUMdodUDR4JDi0t"}},5e3:{price:1068,priceId:{usd:"price_1TwnzhJndjUMdodUSzSax7dJ",eur:"price_1U2xslJndjUMdodUIkvoW4z4",gbp:"price_1U2xsqJndjUMdodUZFWGg1Ee"}},2e4:{price:2388,priceId:{usd:"price_1TwnziJndjUMdodUPwjEmlH8",eur:"price_1U2xslJndjUMdodUJ8xHgAB8",gbp:"price_1U2xsrJndjUMdodU8fLMLvFP"}},5e4:{price:5988,priceId:{usd:"price_1TwnzjJndjUMdodUXLL5hYxi",eur:"price_1U2xsmJndjUMdodUDkyaVbWH",gbp:"price_1U2xsrJndjUMdodUm7RoffjY"}},1e5:{price:10788,priceId:{usd:"price_1TwnzkJndjUMdodUpe9b5mBY",eur:"price_1U2xurJndjUMdodUCxRsLbDP",gbp:"price_1U2xwzJndjUMdodUOtE0Qob9"}},2e5:{price:19440,priceId:{usd:"price_1TwnzlJndjUMdodUadGwAOXD",eur:"price_1U2xsmJndjUMdodU8u2Rw1Sx",gbp:"price_1U2xssJndjUMdodUZJwtAfMh"}},35e4:{price:29988,priceId:{usd:"price_1TwnznJndjUMdodULPOOnIrk",eur:"price_1U2xsnJndjUMdodU0a9duvVL",gbp:"price_1U2xssJndjUMdodUzQdIsDTp"}}},mt=h(()=>Ve().public.stripe?.publishableKey?.startsWith("pk_live")||!1),bt=h(()=>mt.value?pt:ct),ht=()=>{q.push({path:"/upgrade/cancelled",query:{plan:S.value}})},vt=()=>{const s=Number(j.value),e=bt.value[s],c=x.value.toLowerCase();e?q.push({path:"/upgrade/checkout",query:{price_id:e.priceId[c]||e.priceId.usd,plan:S.value,credits:j.value,period:"yearly",price:e.price.toString(),mode:"subscription"}}):q.push({path:"/upgrade",query:{period:"yearly",credits:j.value}})};return(s,e)=>{const c=Mt,d=St,J=qt,y=Nt,w=It,D=Et,we=Rt,Ue=Lt;return o(),O(Ue,null,{header:f(()=>[u(J,{class:"border-0"},{leading:f(()=>[t("div",zt,[u(c,{icon:"i-heroicons-arrow-left",variant:"ghost",color:"neutral",size:"sm",onClick:ht}),e[19]||(e[19]=t("h1",{class:"text-lg font-semibold text-highlighted"},"Checkout",-1))])]),trailing:f(()=>[t("div",Dt,[u(d,{name:"i-heroicons-lock-closed",class:"h-3.5 w-3.5"}),e[20]||(e[20]=t("span",null,"Secure checkout",-1))])]),_:1})]),body:f(()=>[t("div",Vt,[a(rt)?(o(),i("div",$t,[t("div",Ot,[t("div",Ft,[u(d,{name:"i-heroicons-light-bulb",class:"h-5 w-5 text-amber-600 dar
1k:text-amber-400"})]),e[21]||(e[21]=t("div",null,[t("p",{class:"text-sm font-semibold text-amber-900 dark:text-amber-100"}," Save 30% by switching to annual billing "),t("p",{class:"mt-0.5 text-xs text-amber-700 dark:text-amber-300"}," Pay once a year and get 2 months free. The discount does not apply to monthly billing. ")],-1))]),t("div",Kt,[u(c,{label:"Switch to annual",color:"warning",variant:"solid",size:"xs",onClick:vt}),u(c,{icon:"i-heroicons-x-mark",variant:"ghost",color:"neutral",size:"xs",onClick:e[0]||(e[0]=l=>Je.value=!0)})])])):g("",!0),t("section",Gt,[t("div",Yt,[t("div",Ht,[t("div",{class:pe(["flex h-8 w-8 items-center justify-center rounded-full text-sm font-bold shadow-sm",a(G)?"bg-green-500 text-white":"bg-primary text-white"])},[a(G)?(o(),O(d,{key:0,name:"i-heroicons-check",class:"h-4 w-4"})):(o(),i("span",Zt,"1"))],2),t("h2",Wt,n(a(G)?"Billing information":"Complete your billing information"),1)]),a(G)?(o(),O(c,{key:0,label:"Edit",color:"neutral",variant:"ghost",size:"xs",icon:"i-heroicons-pencil",onClick:e[1]||(e[1]=l=>G.value=!1)})):g("",!0)]),a(G)?(o(),i("div",Qt,[t("div",Xt,[u(d,{name:"i-heroicons-map-pin",class:"h-4 w-4 shrink-0 text-green-500"}),t("span",ea,n(a(r).address||"No address")+n(a(r).city?`, ${a(r).city}`:"")+n(a(r).postalCode?` ${a(r).postalCode}`:"")+" â "+n(Re.find(l=>l.value===a(r).country)?.label||a(r).country),1)])])):(o(),i("div",ta,[t("div",aa,[t("div",null,[e[22]||(e[22]=t("label",{class:"mb-1.5 block text-sm font-medium text-highlighted"}," Company name ",-1)),U(t("input",{"onUpdate:modelValue":e[2]||(e[2]=l=>a(r).company=l),type:"text",placeholder:"Your company name (optional)",class:"h-10 w-full rounded-lg border border-neutral-300 bg-white px-3.5 text-sm text-highlighted placeholder-neutral-400 transition-all focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20 dark:border-neutral-700 dark:bg-neutral-800 dark:placeholder-neutral-500"},null,512),[[F,a(r).company]])]),t("div",null,[e[24]||(e[24]=t("label",{class:"mb-1.5 block text-sm font-medium text-highlighted"}," Address ",-1)),t("div",sa,[U(t("input",{ref_key:"addressInputRef",ref:Ze,"onUpdate:modelValue":e[3]||(e[3]=l=>a(r).address=l),type:"text",placeholder:"Start typing your address...",autocomplete:"off",class:"h-10 w-full rounded-lg border border-neutral-300 bg-white px-3.5 text-sm text-highlighted placeholder-neutral-400 transition-all focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20 dark:border-neutral-700 dark:bg-neutral-800 dark:placeholder-neutral-500",onInput:Qe,onBlur:et},null,544),[[F,a(r).address]]),a(Y)&&a(ee).length>0?(o(),i("div",ra,[(o(!0),i(re,null,le(a(ee),l=>(o(),i("button",{key:l.place_id,type:"button",class:"flex w-full items-start gap-2 px-3 py-2.5 text-left text-sm transition hover:bg-neutral-50 dark:hover:bg-neutral-700",onMousedown:Pt(V=>Xe(l),["prevent"])},[u(d,{name:"i-heroicons-map-pin",class:"mt-0.5 h-4 w-4 shrink-0 text-muted"}),t("span",oa,n(l.description),1)],40,la))),128))])):g("",!0)]),t("p",na,[u(d,{name:"i-heroicons-map-pin",class:"inline h-3 w-3"}),e[23]||(e[23]=p(" Start typing to auto-fill address, city, country, and postal code ",-1))])]),t("div",ia,[t("div",null,[e[25]||(e[25]=t("label",{class:"mb-1.5 block text-sm font-medium text-highlighted"}," Postal / ZIP code ",-1)),U(t("input",{"onUpdate:modelValue":e[4]||(e[4]=l=>a(r).postalCode=l),type:"text",placeholder:"00000",class:"h-10 w-full rounded-lg border border-neutral-300 bg-white px-3.5 text-sm text-highlighted placeholder-neutral-400 transition-all focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20 dark:border-neutral-700 dark:bg-neutral-800 dark:placeholder-neutral-500"},null,512),[[F,a(r).postalCode]])]),t("div",da,[e[26]||(e[26]=t("label",{class:"mb-1.5 block text-sm font-medium text-highlighted"}," City ",-1)),U(t("input",{"onUpdate:modelValue":e[5]||(e[5]=l=>a(r).city=l),type:"text",placeholder:"Your city",class:"h-10 w-full rounded-lg border border-neutral-300 bg-white px-3.5 text-sm text-highlighted placeholder-neutral-400 transition-all focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20 dark:border-neutral-700 dark:bg-neutral-800 dark:placeholder-neutral-500"},null,512),[[F,a(r).city]])])]),t("div",null,[e[28]||(e[28]=t("label",{class:"mb-1.5 block text-sm font-medium text-highlighted"}," Country ",-1)),U(t("select",{"onUpdate:modelValue":e[6]||(e[6]=l=>a(r).country=l),class:"h-10 w-full rounded-lg border border-neutral-300 bg-white px-3.5 text-sm text-highlighted transition-all focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20 dark:border-neutral-700 dark:bg-neutral-800"},[(o(),i(re,null,le(Re,l=>t("option",{key:l.value,value:l.value},n(l.label),9,ua)),64))],512),[[jt,a(r).country]]),t("p",ca,[u(d,{name:"i-heroicons-information-circle",class:"h-3.5 w-3.5"}
1),e[27]||(e[27]=p(" Please make sure this address matches the one known by your bank. ",-1))])]),a(de)?(o(),i("p",pa,[u(d,{name:"i-heroicons-exclamation-triangle",class:"h-3.5 w-3.5 shrink-0"}),p(" "+n(a(de)),1)])):g("",!0),t("div",null,[e[29]||(e[29]=t("label",{class:"mb-1.5 block text-sm font-medium text-highlighted"}," Tax ID / VAT number (optional) ",-1)),U(t("textarea",{"onUpdate:modelValue":e[7]||(e[7]=l=>a(r).additionalInfo=l),rows:"2",placeholder:"Your tax ID or VAT number to display on invoices",class:"w-full rounded-lg border border-neutral-300 bg-white px-3.5 py-2.5 text-sm text-highlighted placeholder-neutral-400 transition-all focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20 dark:border-neutral-700 dark:bg-neutral-800 dark:placeholder-neutral-500"},null,512),[[F,a(r).additionalInfo]])])])]))]),a(Be)?(o(),i("section",ma,[t("div",ba,[t("div",ha,[u(d,{name:"i-heroicons-bolt",class:"h-4 w-4"})]),e[30]||(e[30]=t("h2",{class:"text-base font-semibold text-highlighted"},"Express checkout",-1))]),t("div",va,[t("div",{ref_key:"expressCheckoutRef",ref:fe,class:"min-h-[44px]"},null,512),e[31]||(e[31]=t("p",{class:"mt-3 text-center text-xs text-muted"}," Pay instantly with Apple Pay, Google Pay, or Link ",-1))]),e[32]||(e[32]=t("div",{class:"relative my-8 flex items-center"},[t("div",{class:"flex-1 border-t border-neutral-200 dark:border-neutral-700"}),t("span",{class:"mx-4 text-sm text-muted"},"or pay with card"),t("div",{class:"flex-1 border-t border-neutral-200 dark:border-neutral-700"})],-1))])):g("",!0),t("section",ya,[e[38]||(e[38]=t("div",{class:"mb-5 flex items-center gap-3"},[t("div",{class:"flex h-8 w-8 items-center justify-center rounded-full bg-primary text-sm font-bold text-white shadow-sm"}," 2 "),t("h2",{class:"text-base font-semibold text-highlighted"}," Payment method ")],-1)),t("div",xa,[a(ue).length>0?(o(),i("div",ga,[t("label",fa,[U(t("input",{"onUpdate:modelValue":e[8]||(e[8]=l=>W(k)?k.value=l:null),type:"radio",value:"saved",class:"h-4 w-4 border-neutral-300 text-primary focus:ring-primary dark:border-neutral-600"},null,512),[[Me,a(k)]]),e[33]||(e[33]=t("span",{class:"text-sm font-medium text-highlighted"},"Use a saved card",-1))]),a(k)==="saved"?(o(),i("div",_a,[(o(!0),i(re,null,le(a(ue),l=>(o(),i("label",{key:l.id,class:pe(["flex cursor-pointer items-center gap-3 rounded-lg border px-4 py-3 transition-all",a(L)===l.id?"border-primary bg-primary/5 ring-1 ring-primary/20":"border-neutral-200 hover:border-neutral-300 dark:border-neutral-700 dark:hover:border-neutral-600"])},[U(t("input",{"onUpdate:modelValue":e[9]||(e[9]=V=>W(L)?L.value=V:null),type:"radio",value:l.id,class:"h-4 w-4 border-neutral-300 text-primary focus:ring-primary dark:border-neutral-600"},null,8,ka),[[Me,a(L)]]),u(d,{name:"i-heroicons-credit-card",class:"h-5 w-5 text-muted"}),t("div",wa,[t("span",Ua,n(l.brand),1),t("span",Ca," **** "+n(l.last4),1)]),t("span",Sa,n(String(l.exp_month).padStart(2,"0"))+"/"+n(l.exp_year),1)],2))),128))])):g("",!0),t("label",Ma,[U(t("input",{"onUpdate:modelValue":e[10]||(e[10]=l=>W(k)?k.value=l:null),type:"radio",value:"new",class:"h-4 w-4 border-neutral-300 text-primary focus:ring-primary dark:border-neutral-600"},null,512),[[Me,a(k)]]),e[34]||(e[34]=t("span",{class:"text-sm font-medium text-highlighted"},"Enter a new card",-1))])])):g("",!0),U(t("div",{class:pe(["space-y-4",{"ml-6":a(ue).length>0}])},[t("div",null,[e[35]||(e[35]=t("label",{class:"mb-1.5 block text-sm font-medium text-highlighted"}," Cardholder name ",-1)),U(t("input",{"onUpdate:modelValue":e[11]||(e[11]=l=>a(r).cardholderName=l),type:"text",placeholder:"Full name on card",class:"h-10 w-full rounded-lg border border-neutral-300 bg-white px-3.5 text-sm text-highlighted placeholder-neutral-400 transition-all focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20 dark:border-neutral-700 dark:bg-neutral-800 dark:placeholder-neutral-500"},null,512),[[F,a(r).cardholderName]])]),t("div",null,[e[36]||(e[36]=t("label",{class:"mb-1.5 block text-sm font-medium text-highlighted"}," Card number ",-1)),t("div",{ref_key:"cardMountRef",ref:ge,class:"h-10 rounded-lg border border-neutral-300 bg-white px-3.5 pt-[7px] transition-all focus-within:border-primary focus-within:ring-2 focus-within:ring-primary/20 dark:border-neutral-700 dark:bg-neutral-800"},null,512),a(xe)?(o(),i("p",Pa,n(a(xe)),1)):g("",!0)])],2),[[Tt,a(k)==="new"]
1]),t("div",ja,[u(d,{name:"i-heroicons-lock-closed",class:"h-3.5 w-3.5 shrink-0 text-green-600"}),e[37]||(e[37]=t("span",null,[p(" Your payment information is safely encrypted and stored by our partner "),t("a",{href:"https://stripe.com/docs/security/stripe",target:"_blank",rel:"noopener noreferrer",class:"font-semibold text-primary hover:underline"}," Stripe "),p(" . ")],-1))])])]),t("section",Ta,[e[48]||(e[48]=t("div",{class:"mb-5 flex items-center gap-3"},[t("div",{class:"flex h-8 w-8 items-center justify-center rounded-full bg-primary text-sm font-bold text-white shadow-sm"}," 3 "),t("h2",{class:"text-base font-semibold text-highlighted"}," Review your order ")],-1)),t("div",Ia,[t("div",Aa,[t("div",Ja,[t("div",Ra,[t("div",qa,[t("h3",Na,n(a(S)),1),a(v)!=="payas"?(o(),O(y,{key:0,color:a(v)==="yearly"?"success":"info",variant:"subtle",size:"xs"},{default:f(()=>[p(n(a(v)==="yearly"?"Annual":"Monthly"),1)]),_:1},8,["color"])):(o(),O(y,{key:1,color:"warning",variant:"subtle",size:"xs"},{default:f(()=>[...e[39]||(e[39]=[p(" One-time ",-1)])]),_:1}))]),t("p",Ea,[p(n(a(Ne))+" credits ",1),a(v)!=="payas"?(o(),i("span",La," · "+n(a(ce))+" searches + "+n(a(ce))+" verifications ",1)):g("",!0)]),t("div",Ba,[t("button",{class:"text-sm font-medium text-primary hover:underline",onClick:e[12]||(e[12]=l=>Z.value=!0)}," Plan details "),e[41]||(e[41]=t("span",{class:"text-neutral-300 dark:text-neutral-600"}," | ",-1)),u(w,{to:"/upgrade",class:"text-sm font-medium text-primary hover:underline"},{default:f(()=>[...e[40]||(e[40]=[p(" Change plan ",-1)])]),_:1})])]),t("div",za,[t("p",Da,n(a(M)(a(B),a(x))),1),t("p",Va,[p(n(a(x))+" ",1),a(v)!=="payas"?(o(),i("span",$a," / "+n(a(v)==="yearly"?"year":"month"),1)):g("",!0)])])])]),t("div",Oa,[!a(m)&&!a(te)?(o(),i("div",Fa,[t("button",{class:"flex items-center gap-1.5 text-sm font-medium text-primary hover:underline",onClick:e[13]||(e[13]=l=>te.value=!0)},[u(d,{name:"i-heroicons-tag",class:"h-4 w-4"}),e[42]||(e[42]=p(" Have a coupon? ",-1))])])):!a(m)&&a(te)?(o(),i("div",Ka,[t("div",Ga,[U(t("input",{"onUpdate:modelValue":e[14]||(e[14]=l=>W(T)?T.value=l:null),type:"text",placeholder:"Enter coupon code",autofocus:"",class:"h-9 flex-1 rounded-lg border border-neutral-300 bg-white px-3 text-sm text-highlighted placeholder-neutral-400 transition-all focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20 dark:border-neutral-700 dark:bg-neutral-800 dark:placeholder-neutral-500",onKeyup:At(_e,["enter"])},null,544),[[F,a(T)]]),u(c,{label:"Apply",color:"primary",variant:"soft",size:"sm",loading:a(be),disabled:!a(T).trim(),onClick:_e},null,8,["loading","disabled"]),u(c,{icon:"i-heroicons-x-mark",variant:"ghost",color:"neutral",size:"sm",onClick:it})]),a(H)?(o(),i("p",Ya,n(a(H)),1)):g("",!0)])):(o(),i("div",Ha,[t("div",Za,[u(d,{name:"i-heroicons-check-circle-solid",class:"h-5 w-5 text-green-500"}),t("div",null,[t("p",Wa,n(a(m).name||a(m).id),1),t("p",Qa,[a(m).percent_off?(o(),i("span",Xa,n(a(m).percent_off)+"% off ",1)):a(m).amount_off?(o(),i("span",es,n(a(M)(a(m).amount_off/100,a(x)))+" off ",1)):g("",!0),a(m).duration==="repeating"?(o(),i("span",ts," for "+n(a(m).duration_in_months)+" months ",1)):a(m).duration==="forever"?(o(),i("span",as," forever ")):g("",!0)])])]),u(c,{icon:"i-heroicons-x-mark",variant:"ghost",color:"neutral",size:"xs",onClick:dt})]))]),t("div",ss,[t("div",rs,[t("div",ls,[e[43]||(e[43]=t("span",{class:"text-muted"},"Subtotal",-1)),t("span",os,n(a(M)(a(B),a(x))),1)]),a(m)&&a(qe)>0?(o(),i("div",ns,[e[44]||(e[44]=t("span",{class:"text-green-600 dark:text-green-400"}," Discount ",-1)),t("span",is," -"+n(a(M)(a(qe),a(x))),1)])):g("",!0),t("div",ds,[t("span",us,[e[46]||(e[46]=p(" Tax ",-1)),u(D,{mode:"hover",content:{side:"top"}},{content:f(()=>[...e[45]||(e[45]=[t("div",{class:"max-w-xs p-3 text-xs text-muted"}," Tomba is registered in the United States. Sales tax applies only in US states where required by law. International orders are not subject to VAT, GST, or sales tax. ",-1)])]),default:f(()=>[u(d,{name:"i-heroicons-information-circle",class:"h-3.5 w-3.5 text-muted"})]),_:1})]),a(he)?(o(),i("span",cs,"Calculating...")):a(_)&&a(_).tax>0?(o(),i("span",ps,n(a(M)(a(_).tax/100,a(x))),1)):(o(),i("span",ms,n(a(M)(0,a(x))),1))])]),t("div",bs,[e[47]||(e[47]=t("span",{class:"text-base font-semibold text-highlighted"}," Total ",-1)),t("div",hs,[a(_)?(o(),i("span",vs,n(a(M)(a(_).total/100,a(x))),1)):(o(),i("span",ys,n(a(M)(a(z),a(x))),1)),a(_)&&a(_).tax>0?(o(),i("p",xs,"US sales tax included")):(o(),i("p",gs,"no tax applied"))])])])])]),a(C)?(o(),i("div",fs,[u(d,{name:"i-heroicons-exclamation-triangle",class:"mt-0.5 h-5 w-5 shrink-0 text-red-500"}),t("p",_s,n(a(C)),1)])):g("",!0),t("div",ks,[t("label",ws,[U(t("input",{"onUpdate:modelValue":e[15]||(e[15]=l=>W(ae)?ae.value=l:null),type:"checkbox",class:"mt-0.5 h-4 w-4 roun
1ded border-neutral-300 text-primary focus:ring-primary dark:border-neutral-600"},null,512),[[Jt,a(ae)]]),e[49]||(e[49]=t("span",{class:"text-sm text-muted"},[p(" By placing this order, you agree to our "),t("a",{href:"https://tomba.io/terms",target:"_blank",class:"font-medium text-primary hover:underline"}," Terms of Service "),p(" and "),t("a",{href:"https://tomba.io/privacy",target:"_blank",class:"font-medium text-primary hover:underline"}," Privacy Policy "),p(" . ")],-1))])]),u(c,{color:"primary",size:"xl",block:"",icon:"i-heroicons-lock-closed",loading:a(E),disabled:!a(lt),class:"mb-8 h-14 text-base font-semibold shadow-lg shadow-primary/20 transition-all hover:shadow-xl hover:shadow-primary/30",onClick:ut},{leading:f(()=>[u(d,{name:"i-heroicons-lock-closed",class:"h-5 w-5"})]),default:f(()=>[p(" "+n(a(E)?"Processing payment...":`Pay ${a(M)(a(z),a(x))} and upgrade`),1)]),_:1},8,["loading","disabled"]),t("div",Us,[t("div",Cs,[u(d,{name:"i-heroicons-calendar",class:"mt-0.5 h-4 w-4 shrink-0 text-neutral-400"}),a(v)==="yearly"?(o(),i("p",Ss,[e[50]||(e[50]=p(" The credits of your plan will be renewed every year. Your next billing will be on ",-1)),t("strong",Ms,n(a(Ee)),1),e[51]||(e[51]=p(" . ",-1))])):a(v)==="monthly"?(o(),i("p",Ps,[e[52]||(e[52]=p(" The credits of your plan will be renewed every month. Your next billing will be on ",-1)),t("strong",js,n(a(Ee)),1),e[53]||(e[53]=p(" . ",-1))])):(o(),i("p",Ts,[...e[54]||(e[54]=[p(" Your credits are valid for ",-1),t("strong",{class:"text-highlighted"},"12 months",-1),p(" from today. ",-1)])]))]),t("div",Is,[u(d,{name:"i-heroicons-arrow-path",class:"mt-0.5 h-4 w-4 shrink-0 text-neutral-400"}),e[55]||(e[55]=t("p",null,' You can cancel or modify your subscription at any time in the "Subscription" section of your dashboard. When you cancel, your premium plan is kept active until the next billing date. ',-1))]),t("div",As,[u(d,{name:"i-heroicons-shield-check",class:"mt-0.5 h-4 w-4 shrink-0 text-neutral-400"}),e[56]||(e[56]=t("p",null,[p(" All payments are processed securely through "),t("a",{href:"https://stripe.com/docs/security/stripe",target:"_blank",rel:"noopener noreferrer",class:"font-semibold text-primary hover:underline"}," Stripe "),p(" . We never store your card details on our servers. ")],-1))])])]),u(we,{open:a(Z),"onUpdate:open":e[18]||(e[18]=l=>W(Z)?Z.value=l:null)},{content:f(()=>[t("div",Js,[t("div",Rs,[e[57]||(e[57]=t("h3",{class:"text-lg font-semibold text-highlighted"}," Plan Details ",-1)),u(c,{icon:"i-heroicons-x-mark",variant:"ghost",color:"neutral",size:"sm",onClick:e[16]||(e[16]=l=>Z.value=!1)})]),t("div",qs,[t("div",Ns,[t("div",Es,[t("div",null,[t("div",Ls,[t("h4",Bs,n(a(S)),1),a(v)!=="payas"?(o(),O(y,{key:0,color:a(v)==="yearly"?"success":"info",variant:"subtle",size:"xs"},{default:f(()=>[p(n(a(v)==="yearly"?"Annual":"Monthly"),1)]),_:1},8,["color"])):(o(),O(y,{key:1,color:"warning",variant:"subtle",size:"xs"},{default:f(()=>[...e[58]||(e[58]=[p(" One-time ",-1)])]),_:1}))]),t("p",zs,n(a(Ne))+" total credits ",1)]),t("div",Ds,[t("p",Vs,n(a(M)(a(B),a(x))),1),a(v)!=="payas"?(o(),i("p",$s," per "+n(a(v)==="yearly"?"year":"month"),1)):g("",!0)])])]),t("div",Os,[t("div",Fs,[u(d,{name:"i-heroicons-magnifying-glass",class:"h-3.5 w-3.5 text-blue-500"}),t("span",Ks,n(a(ce)),1),e[59]||(e[59]=t("span",{class:"font-medium text-highlighted"},"searches",-1))]),t("div",Gs,[u(d,{name:"i-heroicons-shield-check",class:"h-3.5 w-3.5 text-green-500"}),t("span",Ys,n(a(ce)),1),e[60]||(e[60]=t("span",{class:"font-medium text-highlighted"}," verifications ",-1))])])]),t("div",Hs,[e[61]||(e[61]=t("h5",{class:"mb-3 text-xs font-semibold uppercase tracking-wider text-muted"}," What's included ",-1)),t("div",Zs,[(o(!0),i(re,null,le(a(nt),(l,V)=>(o(),i("div",{key:V,class:"flex items-center justify-between border-b border-neutral-100 py-2.5 last:border-0 dark:border-neutral-800"},[t("div",Ws,[u(d,{name:l.icon,class:pe(["h-4 w-4 shrink-0",l.color])},null,8,["name","class"]),t("span",Qs,n(l.label),1)]),t("span",Xs,n(l.value),1)]))),128))])]),t("div",er,[e[62]||(e[62]=t("h5",{class:"mb-2.5 text-xs font-semibold uppercase tracking-wider text-muted"}," All plans include ",-1)),t("div",tr,[(o(),i(re,null,le(["Domain search","Email finder","Email verifier","Chrome extension","CSV export","Webhook supp
1ort","Priority support","GDPR compliant"],l=>t("div",{key:l,class:"flex items-center gap-1.5 text-xs"},[u(d,{name:"i-heroicons-check",class:"h-3.5 w-3.5 text-green-500"}),t("span",ar,n(l),1)])),64))])]),u(c,{label:"Close",color:"neutral",variant:"outline",block:"",onClick:e[17]||(e[17]=l=>Z.value=!1)})])]),_:1},8,["open"])]),_:1})}}});export{Mr 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.