PageSourceSearch

https://rocketwriter.ai/_nuxt/DsQBK-Qt.js

js rocketwriter.ai collected 2026-10-05 13:39:47 UTC 25,370 bytes, 1 lines download raw bytes

1import{_ as Se}from"./BodJxGTV.js";import{K as Ne,e as oe,z as Ce,m,i as ne,c as i,a as t,l as y,b as S,n as C,t as c,w as R,o as l,d as f,h as Ee,a2 as Pe,s as Te,B as Le,I as W,x as Ue,q as k,a3 as ae,a0 as se,F as V,r as O,a1 as P,a4 as Ie,p as Ve}from"./D3mXZbvm.js";import{B as q}from"./CbyiM6aK.js";import{S as X}from"./D0HDmefO.js";import{_ as Re}from"./DlAUqK2U.js";const $e=Ne("/images/cashback.webp");var le="clover",je=function(u){return u===3?"v3":u},ie="https://js.stripe.com",Me="".concat(ie,"/").concat(le,"/stripe.js"),Oe=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,Ae=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/;var ze=function(u){return Oe.test(u)||Ae.test(u)},Be=function(){for(var u=document.querySelectorAll('script[src^="'.concat(ie,'"]')),p=0;p<u.length;p++){var v=u[p];if(ze(v.src))return v}return null},re=function(u){var p="",v=document.createElement("script");v.src="".concat(Me).concat(p);var d=document.head||document.body;if(!d)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return d.appendChild(v),v},Fe=function(u,p){!u||!u._registerWrapper||u._registerWrapper({name:"stripe-js",version:"8.6.0",startTime:p})},A=null,J=null,G=null,De=function(u){return function(p){u(new Error("Failed to load Stripe.js",{cause:p}))}},Je=function(u,p){return function(){window.Stripe?u(window.Stripe):p(new Error("Stripe.js not available"))}},Ge=function(u){return A!==null?A:(A=new Promise(function(p,v){if(typeof window>"u"||typeof document>"u"){p(null);return}if(window.Stripe){p(window.Stripe);return}try{var d=Be();if(!(d&&u)){if(!d)d=re(u);else if(d&&G!==null&&J!==null){var o;d.removeEventListener("load",G),d.removeEventListener("error",J),(o=d.parentNode)===null||o===void 0||o.removeChild(d),d=re(u)}}G=Je(p,v),J=De(v),d.addEventListener("load",G),d.addEventListener("error",J)}catch(_){v(_);return}}),A.catch(function(p){return A=null,Promise.reject(p)}))},qe=function(u,p,v){if(u===null)return null;var d=p[0],o=d.match(/^pk_test/),_=je(u.version),w=le;o&&_!==w&&console.warn("Stripe.js@".concat(_," was loaded on the page, but @stripe/stripe-js@").concat("8.6.0"," expected Stripe.js@").concat(w,". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));var N=u.apply(void 0,p);return Fe(N,v),N},z,de=!1,ue=function(){return z||(z=Ge(null).catch(function(u){return z=null,Promise.reject(u)}),z)};Promise.resolve().then(function(){return ue()}).catch(function(x){de||console.warn(x)});var Ke=function(){for(var u=arguments.length,p=new Array(u),v=0;v<u;v++)p[v]=arguments[v];de=!0;var d=Date.now();return ue().then(function(o){return qe(o,p,d)})};const He={class:"mt-4 p-6 border rounded-xl bg-white shadow-sm"},We={key:0,class:"flex flex-col items-center py-8"},Xe={key:0,class:"mb-4 p-3 bg-red-50 text-red-600 text-sm rounded-lg border border-red-100"},Ze=oe({__name:"CheckoutStripe",props:{secret:{},orderId:{}},setup(x){const u=x,v=Ce().public.stripeClientId,d=m(null),o=m(null),_=m(null),w=m(!1),N=m(!1),h=m(null);ne(async()=>{if(!v){h.value="Stripe client ID is not configured.";return}try{if(d.value=await Ke(v),!d.value)throw new Error("Failed to load Stripe");o.value=d.value.elements({clientSecret:u.secret,appearance:{theme:"stripe",variables:{colorPrimary:"#FFA121"}}}),_.value=o.value.create("payment"),_.value.mount("#payment-element"),_.value.on("ready",()=>{N.value=!0})}catch(r){console.error("Stripe initialization error:",r),h.value="Failed to initialize payment interface. Please try again."}});const $=async()=>{if(!(!d.value||!o.value)){w.value=!0,h.value=null;try{const{error:r}=await d.value.confirmPayment({elements:o.value,confirmParams:{return_url:`${window.location.origin}/order/${u.orderId}`}});r&&(h.value=r.message||"An unexpected error occurred during payment.")}catch(r){console.error("Stripe payment error:",r),h.value="An error occurred while processing your payment."}finally{w.value=!1}}};return(r,g)=>(l(),i("div",He,[g[3]||(g[3]=t("h3",{class:"text-lg font-bold text-gray-900 mb-4"},"Complete Payment",-1)),N.value?y("",!0):(l(),i("div",We,[S(X,{size:"lg",color:"primary"}),g[0]||(g[0]=t("p",{class:"mt-4 text-gray-600 font-medium text-sm"},"Initializing secure payment...",-1))])),t("div",{class:C({hidden:!N.value})},[g[2]||(g[2]=t("div",{id:"payment-element",class:"mb-6"},null,-1)),h.value?(l(),i("div",Xe,c(h.value),1)):y("",!0),S(q,{variant:"primary",block:"",onClick:$,loading:w.value},{default:R(()=>[...g[1]||(g[1]=[f(" Pay Now ",-1)])]),_:1},8,["loading"])],2)]))}}),Ye=Object.assign(Ze,{__name:"CheckoutStripe"}),Qe={class:"min-h-screen bg-gray-50 pt-20 pb-12 px-4 sm:px-6 lg:px-8"},et={key:0,class:"flex justify-center py-20"},tt={key:1,class:"max-w-xl mx-auto text-center py-20"},at={key:2,class:"max-w-7xl mx-auto"},st={class:"flex flex-col lg:flex-row gap-12 items-start"},rt={class:"w-full lg:w-2/3"},ot={key:1,class:"bg-white shadow-sm rounded-2xl p-6 md:p-8 border border-gray-100"},nt={class:"flex gap-6 mb-6"},lt={class:"flex items-center gap-2 cursor-pointer group"},it={class:"flex items-center gap-2 cursor-pointer group"},dt={class:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-6"},ut={class:"flex-1"},ct=["value"],pt={key:0,class:"mt-1 text-xs text-red-500"},mt={class:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-6"},vt={key:0,class:"md:col-span-2"},yt={key:0,class:"mt-1 text-xs text-red-500"},ft={class:"flex-1"},xt={class:"block text-sm font-semibold text-gray-700 mb-1.5"},gt=["placeholder","disabled"],bt={key:0,class:"mt-1 text-xs text-gray-400"},ht={key:1,class:"mt-1 text-xs text-red-500"},_t={class:"flex-1"},wt={key:0,class:"mt-1 text-xs text-red-500"},kt={key:0,class:"mb-6 -mt-4"},St={class:"text-xs text-gray-500"},Nt={class:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-6"},Ct={class:"flex-1"},Et={key:0,class:"mt-1 text-xs text-red-500"},Pt={class:"flex-1"},Tt={key:0,class:"mt-1 text-xs text-red-500"},Lt={class:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-8"},Ut={class:"flex-1"},It={key:0,class:"mt-1 text-xs text-red-500"},Vt={class:"flex-1"},Rt={class:"block text-sm font-semibold text-gray-700 mb-1.5"},$t={key:0,class:"text-red-500"},jt=["value"],Mt={key:2,class:"mt-1 text-xs text-red-500"},Ot={class:"mt-10 pt-10 border-t border-gray-100"},At={class:"space-y-3"},zt=["onClick"],Bt=["value","checked"],Ft=["src"],Dt={class:"font-medium text-gray-900"},Jt={key:0,class:"mt-2 text-sm text-red-500"},Gt={class:"mt-8"},qt={class:"w-full lg:w-1/3 sticky top-24"},Kt={class:"bg-white shadow-sm rounded-2xl p-6 border border-gray-100"},Ht={class:"space-y-4 mb-6"},Wt={class:"flex justify-between items-start gap-4"},Xt={class:"flex-1"},Zt={class:"font-bold text-gray-900"},Yt={class:"text-xs text-gray-500"},Qt={class:"text-right"},ea={key:0,class:"flex flex-col items-end"},ta={class:"flex items-center gap-1.5"},aa={class:"text-xs text-gray-400 line-through"},sa={class:"text-[10px] font-black text-primary bg-primary/10 px-1 py-0.5 rounded uppercase"},ra={class:"font-bold text-primary text-lg"},oa={key:1,class:"flex flex-col items-end"},na={class:"font-bold text-gray-900 text-lg"},la={class:"text-gray-600"},ia={class:"text-gray-900 font-medium"},da={class:"flex justify-between text-sm"},ua={class:"flex items-center gap-2"},ca={key:0,class:"text-[10px] font-bold text-gray-400 uppercase tracking-wider bg-gray-100 px-1.5 py-0.5 rounded"},pa={key:0,class:"flex items-center gap-2 text-gray-400 italic"},ma={key:1,class:"text-gray-900 font-medium"},va={class:"pt-6 border-t border-gray-100 mb-6"},ya={class:"flex gap-2"},fa={key:0,class:"mt-2 text-xs text-red-500 font-medium"},xa={key:1,class:"mt-4 space-y-2"},ga={class:"flex items-center gap-2"},ba=["onClick"],ha={class:"pt-6 border-t border-gray-100"},_a={class:"flex justify-between items-center mb-1"},wa={class:"text-2xl font-black text-gray-900"},ka={class:"mt-8 text-center px-4"},Sa={class:"text-[11px] text-gray-500 leading-relaxed"},Na=oe({__name:"index",setup(x){const u=Ee(),p=Pe(),v=Te(),{request:d}=Le(),o=m(null),_=m(!0),w=m(!1),N=m(!0),h=m(!0),$=m(null),r=m({}),g=m(""),B=m(""),Z=m([]),T=m(null),Y=m({}),Q=m({}),F=m("Proceed to payment"),ee={paypal:"/images/checkout/checkout_paypal.webp",stripe:"/images/checkout/checkout_stripe.svg",card:"/images/checkout/checkout_card.webp"},s=m({headline:{type:"simple",name:"",companyName:""},address:{country:"",city:"",postalCode:"",state:null,addressLine1:"",addressLine2:""},taxNumber:"",hash:""}),K=m(!1),E=m(""),b=m(!1),ce=["AT","BE","BG","CY","CZ","DE","DK","EE","ES","FI","FR","GR","HR","HU","IE","IT","LT","LU","LV","MT","NL","PL","PT","RO","SE","SI","SK"],j=a=>ce.includes(a.toUpperCase()),pe=a=>{window.location.href=a},H=async()=>
1{if(s.value.headline.type!=="company"){b.value=!1;return}const a=s.value.address.country;if(!a){b.value=!1;return}if(!j(a)){b.value=!0,r.value.taxNumber&&delete r.value.taxNumber;return}const e=(s.value.taxNumber||"").trim();if(!e){r.value.taxNumber="Tax number is required",b.value=!1;return}K.value=!0;try{const M=encodeURIComponent(e),U=await d(`/api/v3/orders/tax/validate_tax_number/${M}`);!!(U&&U.ok&&U.data?.isValid===!0)?(r.value.taxNumber&&delete r.value.taxNumber,E.value=U?.data?.company?.companyName||"",b.value=!0,await D()):(r.value.taxNumber="Invalid tax number",E.value="",b.value=!1)}catch{r.value.taxNumber="Could not validate tax number",E.value="",b.value=!1}finally{K.value=!1}},me=a=>new Intl.NumberFormat("en-US").format(a),L=async()=>{try{const a=await d("/api/v3/me/orders/current");a.ok?(o.value=a.data,o.value.billingData&&ve(o.value.billingData),o.value.paymentMethodId&&(T.value=o.value.paymentMethodId)):a.status===404&&(o.value=null)}catch(a){console.error("Error fetching order:",a)}finally{_.value=!1}},ve=a=>{s.value={headline:{type:a.headline?.type||"simple",name:a.headline?.name||"",companyName:a.headline?.companyName||""},address:{country:a.address?.country||"",postalCode:a.address?.postalCode||"",state:a.address?.state||null,city:a.address?.city||"",addressLine1:a.address?.addressLine1||"",addressLine2:a.address?.addressLine2||""},hash:a.hash||"",taxNumber:a.taxNumber||""}},ye=async()=>{const a=await d("/api/v3/payment_methods");a.ok&&(Z.value=a.data)},fe=async()=>{const a=await d("/api/v3/address/countries");a.ok&&(Y.value=a.data)},xe=async()=>{const a=await d("/api/v3/address/states");a.ok&&(Q.value=a.data)},ge=async a=>{N.value=!1,T.value=a,r.value.paymentMethod="";try{(await d(`/api/v3/orders/${o.value.id}/payment_method`,{method:"POST",body:JSON.stringify({id:a})})).ok?N.value=!0:T.value=null}catch{T.value=null}},be=()=>{r.value.country="",b.value=!1,s.value.headline.type==="company"&&s.value.taxNumber&&H(),s.value.address.country==="US"?(s.value.address.state=null,xe()):D()},D=async()=>{h.value=!1;try{const a=s.value.address.country,e=j(a);s.value.headline.type==="company"&&(b.value||!e)?await d(`/api/v3/orders/${o.value.id}/tax`,{method:"DELETE"}):s.value.headline.type==="company"&&!b.value&&e?await d(`/api/v3/orders/${o.value.id}/tax`,{method:"DELETE"}):await d(`/api/v3/orders/${o.value.id}/tax`,{method:"POST",body:JSON.stringify({country:s.value.address.country,state:s.value.address.country==="US"?s.value.address.state:null})}),await L()}finally{h.value=!0}};W(()=>s.value.headline.type,a=>{a==="simple"&&(r.value.taxNumber&&delete r.value.taxNumber,E.value=""),b.value=!1,D()}),W(()=>s.value.taxNumber,()=>{r.value.taxNumber&&delete r.value.taxNumber,E.value="",b.value=!1});const he=()=>{r.value={};const a=s.value;return a.headline.type==="simple"&&!a.headline.name&&(r.value.name="Please enter your full name."),a.headline.type==="company"&&!a.headline.companyName&&(r.value.companyName="Please enter company name."),a.headline.type==="company"&&!a.taxNumber&&(r.value.taxNumber="Please enter tax number."),a.address.country||(r.value.country="Please select a country."),a.address.country==="US"&&!a.address.state&&(r.value.state="Please select a state."),a.address.addressLine1||(r.value.addressLine1="Please enter street address."),a.address.city||(r.value.city="Please enter town/city."),a.address.postalCode||(r.value.postalCode="Please enter postal code."),T.value||(r.value.paymentMethod="Please select a payment method."),Object.keys(r.value).length===0},_e=async()=>{if(!he()){window.scrollTo({top:0,behavior:"smooth"});return}if(s.value.headline.type==="company"&&!b.value){const a=s.value.address.country;if(j(a)){if(await H(),!b.value){window.scrollTo({top:0,behavior:"smooth"});return}}else b.value=!0}w.value=!0,F.value="Processing...";try{await d(`/api/v3/orders/${o.value.id}/billing_data`,{method:"PUT",body:JSON.stringify({headline:we(s.value.headline),address:s.value.address,hash:s.value.hash,taxNumber:s.value.taxNumber})});const a=await d(`/api/v3/orders/${o.value.id}/finalize`,{method:"POST",body:JSON.stringify({backUrl:window.location.origin+"/order/"+o.value.id})});a.ok?a.data.stripeSecret?$.value=a.data.stripeSecret:a.data.paymentUrl&&pe(a.data.paymentUrl):(F.value="Something went wrong. Try again.",w.value=!1)}catch{F.value="Failed to process order.",w.value=!1}},we=a=>({name:a.name,companyName:a.companyName,type:a.type}),te=async()=>
1{if(!g.value)return;B.value="";const a=await d(`/api/v3/orders/${o.value.id}/coupon`,{method:"POST",body:JSON.stringify({code:g.value})});a.ok?(await L(),g.value=""):B.value=a.data?.error||"Invalid coupon code."},ke=async a=>{(await d(`/api/v3/orders/${o.value.id}/coupon/${a}`,{method:"DELETE"})).ok&&await L()};return W(()=>s.value.address.state,a=>{s.value.address.country==="US"&&a&&D()}),ne(async()=>{if(u.initializeToken(),v.query.token)try{_.value=!0,(await d("/api/v3/me/orders/create",{method:"POST",body:JSON.stringify({token:v.query.token})})).ok?(p.replace("/checkout"),await L()):await L()}catch(a){console.error("Error creating order from token:",a),await L()}else L();fe(),ye()}),(a,e)=>{const M=Se,U=Ve("font-awesome-icon");return l(),i("div",Qe,[_.value?(l(),i("div",et,[S(X,{size:"lg",color:"primary"})])):o.value?(l(),i("div",at,[t("div",st,[t("div",rt,[$.value?(l(),Ue(Ye,{key:0,secret:$.value,orderId:o.value.id},null,8,["secret","orderId"])):(l(),i("div",ot,[e[31]||(e[31]=t("h2",{class:"text-xl font-bold text-gray-900 mb-6"},"Billing Information",-1)),t("div",nt,[t("label",lt,[k(t("input",{type:"radio","onUpdate:modelValue":e[0]||(e[0]=n=>s.value.headline.type=n),value:"simple",class:"radio radio-primary"},null,512),[[ae,s.value.headline.type]]),e[16]||(e[16]=t("span",{class:"text-sm font-medium text-gray-700 group-hover:text-gray-900"},"Personal",-1))]),t("label",it,[k(t("input",{type:"radio","onUpdate:modelValue":e[1]||(e[1]=n=>s.value.headline.type=n),value:"company",class:"radio radio-primary"},null,512),[[ae,s.value.headline.type]]),e[17]||(e[17]=t("span",{class:"text-sm font-medium text-gray-700 group-hover:text-gray-900"},"Company",-1))])]),t("div",dt,[t("div",ut,[e[19]||(e[19]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-1.5"},[f(" Country "),t("span",{class:"text-red-500"},"*")],-1)),k(t("select",{"onUpdate:modelValue":e[2]||(e[2]=n=>s.value.address.country=n),onChange:be,class:C(["w-full px-4 py-2.5 bg-white border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary/20 focus:border-primary outline-none transition-all appearance-none",{"border-red-500 bg-red-50":r.value.country}])},[e[18]||(e[18]=t("option",{value:"",disabled:""},"Select country",-1)),(l(!0),i(V,null,O(Y.value,(n,I)=>(l(),i("option",{key:I,value:I},c(n),9,ct))),128))],34),[[se,s.value.address.country]]),r.value.country?(l(),i("p",pt,c(r.value.country),1)):y("",!0)]),e[20]||(e[20]=t("div",null,null,-1))]),t("div",mt,[s.value.headline.type==="simple"?(l(),i("div",vt,[e[21]||(e[21]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-1.5"},[f(" Full Name "),t("span",{class:"text-red-500"},"*")],-1)),k(t("input",{"onUpdate:modelValue":e[3]||(e[3]=n=>s.value.headline.name=n),type:"text",placeholder:"Enter your full name",class:C(["w-full px-4 py-2.5 bg-white border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary/20 focus:border-primary outline-none transition-all",{"border-red-500 bg-red-50":r.value.name}])},null,2),[[P,s.value.headline.name]]),r.value.name&&s.value.headline.type==="simple"?(l(),i("p",yt,c(r.value.name),1)):y("",!0)])):(l(),i(V,{key:1},[t("div",ft,[t("label",xt,[f(c(s.value.address.country&&j(s.value.address.country)?"European VAT Number":"Tax Number")+" ",1),e[22]||(e[22]=t("span",{class:"text-red-500"},"*",-1))]),k(t("input",{"onUpdate:modelValue":e[4]||(e[4]=n=>s.value.taxNumber=n),onBlur:H,type:"text",placeholder:s.value.address.country?j(s.value.address.country)?"Enter European VAT number":"Enter tax ID":"Select country first",disabled:!s.value.address.country,class:C(["w-full px-4 py-2.5 bg-white border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary/20 focus:border-primary outline-none transition-all",{"border-red-500 bg-red-50":r.value.taxNumber,"bg-gray-50 cursor-not-allowed":!s.value.address.country}])},null,42,gt),[[P,s.value.taxNumber]]),K.value?(l(),i("p",bt,"Validating tax number...")):y("",!0),r.value.taxNumber?(l(),i("p",ht,c(r.value.taxNumber),1)):y("",!0)]),t("div",_t,[e[23]||(e[23]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-1.5"},[f(" Company Name "),t("span",{class:"text-red-500"},"*")],-1)),k(t("input",{"onUpdate:modelValue":e[5]||(e[5]=n=>s.value.headline.companyName=n),type:"text",placeholder:"Enter company name",class:C(["w-full px-4 py-2.5 bg-white border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary/20 focus:border-primary outline-none transition-all",{"border-red-500 bg-red-50":r.value.companyName}])},null,2),[[P,s.value.headline.companyName]]),r.value.companyName&&s.value.headline.type==="company"?(l(),i("p",wt,c(r.value.companyName),1)):y("",!0)])],64))]),s.value.headline.type==="company"&&E.value&&E.value!==s.value.headline.companyName?(l(),i("div",kt,[t("p",St,[e[24]||(e[24]=f(" Suggested company name: ",-1)),t("button",{type:"button",class:"text-primary hover:underline font-medium",onClick:e[6]||(e[6]=n=>s.value.headline.companyName=E.value)},c(E.value),1)])])):y("",!0),t("div",Nt,[t("div",Ct,[e[25]||(e[25]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-1.5"},[f(" Town / City "),t("span",{class:"text-red-500"}
1,"*")],-1)),k(t("input",{"onUpdate:modelValue":e[7]||(e[7]=n=>s.value.address.city=n),type:"text",placeholder:"Enter city",class:C(["w-full px-4 py-2.5 bg-white border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary/20 focus:border-primary outline-none transition-all",{"border-red-500 bg-red-50":r.value.city}])},null,2),[[P,s.value.address.city]]),r.value.city?(l(),i("p",Et,c(r.value.city),1)):y("",!0)]),t("div",Pt,[e[26]||(e[26]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-1.5"},[f(" Postal Code "),t("span",{class:"text-red-500"},"*")],-1)),k(t("input",{"onUpdate:modelValue":e[8]||(e[8]=n=>s.value.address.postalCode=n),type:"text",placeholder:"ZIP / Postcode",class:C(["w-full px-4 py-2.5 bg-white border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary/20 focus:border-primary outline-none transition-all",{"border-red-500 bg-red-50":r.value.postalCode}])},null,2),[[P,s.value.address.postalCode]]),r.value.postalCode?(l(),i("p",Tt,c(r.value.postalCode),1)):y("",!0)])]),t("div",Lt,[t("div",Ut,[e[27]||(e[27]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-1.5"},[f(" Street Address "),t("span",{class:"text-red-500"},"*")],-1)),k(t("input",{"onUpdate:modelValue":e[9]||(e[9]=n=>s.value.address.addressLine1=n),type:"text",placeholder:"House number and street name",class:C(["w-full px-4 py-2.5 bg-white border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary/20 focus:border-primary outline-none transition-all",{"border-red-500 bg-red-50":r.value.addressLine1}])},null,2),[[P,s.value.address.addressLine1]]),r.value.addressLine1?(l(),i("p",It,c(r.value.addressLine1),1)):y("",!0)]),t("div",Vt,[t("label",Rt,[e[28]||(e[28]=f(" State/Region ",-1)),s.value.address.country==="US"?(l(),i("span",$t,"*")):y("",!0)]),s.value.address.country==="US"?k((l(),i("select",{key:0,"onUpdate:modelValue":e[10]||(e[10]=n=>s.value.address.state=n),class:C(["w-full px-4 py-2.5 bg-white border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary/20 focus:border-primary outline-none transition-all appearance-none",{"border-red-500 bg-red-50":r.value.state}])},[e[29]||(e[29]=t("option",{value:null,disabled:""},"Select state",-1)),(l(!0),i(V,null,O(Q.value,(n,I)=>(l(),i("option",{key:I,value:I},c(n),9,jt))),128))],2)),[[se,s.value.address.state]]):k((l(),i("input",{key:1,"onUpdate:modelValue":e[11]||(e[11]=n=>s.value.address.state=n),type:"text",placeholder:"Enter state or region",class:"w-full px-4 py-2.5 bg-white border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary/20 focus:border-primary outline-none transition-all"},null,512)),[[P,s.value.address.state]]),r.value.state&&s.value.address.country==="US"?(l(),i("p",Mt,c(r.value.state),1)):y("",!0)])]),t("div",Ot,[e[30]||(e[30]=t("h2",{class:"text-xl font-bold text-gray-900 mb-6"},"Payment Method",-1)),t("div",At,[(l(!0),i(V,null,O(Z.value,n=>(l(),i("label",{key:n.id,class:C(["flex items-center p-4 border rounded-xl cursor-pointer transition-all hover:bg-gray-50",[T.value===n.id?"border-secondary bg-blue-50/30 ring-1 ring-secondary":"border-gray-200"]]),onClick:I=>ge(n.id)},[t("input",{type:"radio",name:"payment-method",value:n.id,checked:T.value===n.id,class:"radio radio-secondary mr-4"},null,8,Bt),ee[n.token]?(l(),i("img",{key:0,src:ee[n.token],class:"h-6 w-auto mr-3",alt:""},null,8,Ft)):y("",!0),t("span",Dt,c(n.name),1)],10,zt))),128))]),r.value.paymentMethod?(l(),i("p",Jt,c(r.value.paymentMethod),1)):y("",!0),t("div",Gt,[S(q,{variant:"primary",block:"",size:"lg",class:"py-4 text-lg font-bold shadow-lg",loading:w.value,disabled:!N.value||!h.value,onClick:_e},{default:R(()=>[f(c(w.value?"Redirecting...":F.value),1)]),_:1},8,["loading","disabled"])])])]))]),t("div",qt,[t("div",Kt,[e[37]||(e[37]=t("h2",{class:"text-xl font-bold text-gray-900 mb-6"},"Order Summary",-1)),t("div",Ht,[t("div",Wt,[t("div",Xt,[t("p",Zt,c(o.value.package.name),1),t("p",Yt,c(me(o.value.package.credits))+" Credits Package",1)]),t("div",Qt,[o.value.package.discountPrice?(l(),i("div",ea,[t("div",ta,[t("span",aa,"$"+c(o.value.package.price),1),t("span",sa,"-"+c(Math.round((1-o.value.package.discountPrice/o.value.package.price)*100))+"%",1)]),t("span",ra,"$"+c(o.value.package.discountPrice),1)])):(l(),i("div",oa,[t("span",na,"$"+c(o.value.package.price),1)]))])]),(l(!0),i(V,null,O(o.value.adjustments,n=>(l(),i("div",{key:n.id,class:"flex justify-between text-sm"},[t("span",la,c(n.name),1),t("span",ia,"$"+c(n.operand.gross),1)]))),128)),t("div",da,[t("div",ua,[e[32]||(e[32]=t("span",{class:"text-gray-600"},"VAT / Tax",-1)),o.value.price.tax&&h.value?(l(),i("span",ca,c((o.value.price.tax.value*100).toFixed(2))+"% ",1)):y("",!0)]),h.value?(l(),i("span",ma,"$"+c((o.value.price.total.gross-o.value.price.total.net).toFixed(2)),1)):(l(),i("div",pa,[S(X,{size:"sm",color:"gray"}),e[33]||(e[33]=t("span",{class:"text-xs"},"Calculating...",-1))]))])]),t("div",va,[e[35]||(e[35]=t("label",{class:"block text-sm font-bold text-gray-700 mb-2"},"Have a coupon?",-1)),t("div",ya,[k(t("input",{"onUpdate:modelValue":e[12]||(e[12]=n=>g.value=n),type:"text",placeholder:"Enter code",class:"flex-1 px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary/20 focus:border-primary outline-none transition-all text-sm",onKeyup:Ie(te,["enter"])},null,544),[[P,g.value]]),S(q,{variant:"ghost",size:"sm",class:"font-bold",onClick:te,disabled:!g.value},{default:R(()=>[...e[34]||(e[34]=[f(" Apply ",-1)])]),_:1},8,["disabled"])]),B.value?(l(),i("p",fa,c(B.value),1)):y("",!0),o.value.coupons?.length?(l(),i("div",xa,[(l(!0),i(V,null,O(o.value.coupons,n=>(l(),i("div",{key:n.id,class:"flex items-center justify-between px-3 py-1.5 bg-green-50 text-green-700 rounded-lg text-xs font-bold border border-green-100"},[t("div",ga,[S(U,{icon:"check-circle"}),t("span",null,c(n.name),1)]),t("button",{onClick:I=>ke(n.id),class:"text-green-900 hover:text-red-500 transition-colors p-1"},[S(U,{icon:"trash",class:"text-[10px]"})],8,ba)]))),128))])):y("",!0)]),t("div",ha,[t("div",_a,[e[36]||(e[36]=t("span",{class:"text-lg font-bold text-gray-900"},"Total Amount",-1)),t("span",wa,"$"+c(o.value.price.total.gross.toFixed(2)),1)])])]),t("div",ka,[e[43]||(e[43]=t("img",{loading:"lazy",src:$e,alt:"30-day money back guarantee",class:"w-32 mx-auto mb-4 opacity-80 rounded-lg"},null,-1)),t("p",Sa,[e[39]||(e[39]=f(" We offer a 30-day Money Back Guarantee.",-1)),e[40]||(e[40]=t("br",null,null,-1)),e[41]||(e[41]=f(" Conditions apply. See our ",-1)),S(M,{to:"/terms-and-conditions",class:"text-secondary hover:underline font-bold"},{default:R(()=>[...e[38]||(e[38]=[f("Terms & Conditions",-1)])]),_:1}),e[42]||(e[42]=f(". ",-1))])])])])])):(l(),i("div",tt,[e[14]||(e[14]=t("h2",{class:"text-2xl font-bold text-gray-900 mb-4"},"No active order found",-1)),e[15]||(e[15]=t("p",{class:"text-gray-600 mb-8"},"Please select a package from the pricing page to continue.",-1)),S(M,{to:"/pricing"},{default:R(()=>[S(q,{variant:"primary"},{default:R(()=>[...e[13]||(e[13]=[f("Go to Pricing",-1)])]),_:1})]),_:1})]))])}}}),Ua=Re(Na,[["__scopeId","data-v-3a02818a"]]);export{Ua 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.