1import{d as K,i as Y,k as G,z as L,B as Q,u as z,a as X,m as Z,n as tt,C as et,c as u,b as o,t as r,g as a,F as _,f,A as ot,v,l as I,s as st,o as d,h as nt}from"./oDDDfqFT.js";import{u as rt}from"./BnnBulD2.js";import{u as ct}from"./Ch8Y5-Ou.js";import"./BvBeYEQX.js";const it={class:"checkout-page"},at={class:"checkout-container"},ut={class:"strong"},dt={class:"checkout-box"},pt={class:"products"},lt={key:0,class:"product"},_t={class:"product-info-box"},yt={class:"product-info-text"},ht={class:"title"},mt={class:"renews-info grey"},ft={class:"price red"},vt={key:1,class:"h3 strong"},gt={class:"payment-details"},Ct={class:"details-box"},Et={class:"title"},kt={class:"details"},bt={class:"price"},At=K({__name:"checkout",async setup(wt){let y,k;const c=Y(),b=G(),{user:A,isUserAuthenticated:N}=L(),{domain:U,protocol:q}=Q(),{getMessage:O,getMessageWithArgs:$}=z(),{getLangFullUrl:D,queryToString:R}=rt(),n=(t,e)=>O(t,e),F=(t,...e)=>$(t,...e),h=st(null),l=t=>Array.isArray(t)?t[0]||"":t||"",w=t=>c.query[t]!==void 0,m=v(()=>l(c.query.paymentSystem)||"stripe");X(()=>({title:n("IJ_PAGE_TITLE_CHECKOUT","IndexJump"),meta:[{key:"robots",name:"robots",content:"noindex"},{key:"description",name:"description",content:n("IJ_PAGE_DESC_CHECKOUT","")},{key:"og:title",name:"og:title",property:"og:title",content:n("IJ_PAGE_TITLE_CHECKOUT","IndexJump")},{key:"og:description",name:"og:description",property:"og:description",content:n("IJ_PAGE_DESC_CHECKOUT","")}]}));const{data:g,error:T}=([y,k]=Z(async()=>ct(`checkout:${c.fullPath}`,async()=>{const t=Number.parseInt(l(c.query.quantity)||"1",10);if(Number.isNaN(t)||t<1)throw I({statusCode:404});const e=await b.$get("Checkout.getProductInfo",{...c.query}),i=e&&typeof e=="object"?e:null;if(!i)throw I({statusCode:404});const p=(Number(i.price)*t).toFixed(2);return{product:i,quantity:t,totalPrice:p}})),y=await y,k(),y);if(T.value)throw T.value;const s=v(()=>g.value?.product||null),x=v(()=>g.value?.quantity||1),P=v(()=>g.value?.totalPrice||"0.00"),W=()=>{const t=R({...c.query,autoCheckout:void 0});return`${q.value}://${U.value}${c.path}?${t}`},C=()=>{if(m.value==="fs"){H();return}m.value==="stripe"&&V()},V=()=>{if(!s.value?.id||!N.value)return;const t=encodeURIComponent(s.value.id),e=encodeURIComponent(String(x.value)),i=encodeURIComponent(String(l(c.query.idu)||A.value?.id||0)),p=encodeURIComponent(String(l(c.query.urlsCount)||0)),E=encodeURIComponent(W()),J=`https://indexjump.com/api/payment/stripe/checkout?product=${t}&quantity=${e}&idu=${i}&urlsCount=${p}&cancelUrl=${E}`;window.location.href=J},H=()=>{if(!s.value?.id)return;const e=window.fastspring?.builder;if(!e)return;const i=s.value.id,p=x.value,E=l(c.query.idu)||A.value?.id||0,S=l(c.query.urlsCount)||0;e.reset(),e.clean(),e.add(i),e.update(i,p),e.tag({idu:E,urlsCount:S,product:i}),s.value.price===.01&&e.country("ae"),e.checkout()},M=async t=>{!t||!t.id||!t.reference||(await b.$post("Fastspring.onPayment",t.id),window.location.href=D("/panel/payment/success"))},j=()=>
1{if(h.value||m.value!=="fs")return;const t="popup-indexjump",e=document.createElement("script");e.setAttribute("id","fsc-api"),e.setAttribute("src","https://sbl.onfastspring.com/sbl/1.0.1/fastspring-builder.min.js"),e.setAttribute("type","text/javascript"),e.setAttribute("data-storefront",`indexjump.onfastspring.com/${t}`),e.setAttribute("data-continuous","true"),e.setAttribute("data-popup-closed","fastspringDataPopupClosed"),w("autoCheckout")&&(e.onload=()=>C()),document.head.appendChild(e),h.value=e;const i=window;i.fastspringDataPopupClosed=p=>{M(p)}},B=()=>{const t=h.value;t?.parentNode&&t.parentNode.removeChild(t),h.value=null;const e=window;delete e.fastspringDataPopupClosed};return tt(()=>{j(),w("autoCheckout")&&m.value==="stripe"&&C()}),et(()=>{B()}),(t,e)=>(d(),u("div",it,[o("div",at,[o("h1",ut,r(n("YOUR_ORDER")),1),o("div",dt,[o("div",pt,[a(s)&&a(s).id?(d(),u("div",lt,[o("div",_t,[o("div",yt,[o("div",ht,r(a(s).title),1),o("div",mt,[a(s).isSubscription?(d(),u(_,{key:0},[a(s).periodDays===30?(d(),u(_,{key:0},[f(r(n("RENEWS_EVERY_MONTH")),1)],64)):a(s).periodDays===7?(d(),u(_,{key:1},[f(r(n("RENEWS_EVERY_WEEK")),1)],64)):a(s).periodDays?(d(),u(_,{key:2},[f(r(F("RENEWS_EVERY_N_DAYS",a(s).periodDays)),1)],64)):ot("",!0)],64)):(d(),u(_,{key:1},[f(r(n("ONE_TIME_PAYMENT")),1)],64))])]),o("div",ft,"$"+r(a(P)),1)])])):(d(),u("div",vt,r(n("NOT_FOUND")),1))]),o("div",gt,[o("div",Ct,[o("div",Et,r(n("TOTAL")),1),o("div",kt,[o("div",null,r(n("TOTAL_COST")),1),o("div",bt,"$"+r(a(P)),1)])]),o("div",{class:"btn btn-dark-grey checkout-btn",onClick:C},r(n("GO_TO_CHECKOUT")),1)])])])]))}}),It=nt(At,[["__scopeId","data-v-1a3ab25e"]]);export{It 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.