1import{b as N,L as S,u as T,ao as A,f as L,x as d,Y as j,I as R,a3 as V,i as r,v as B,j as e,t,k as n,w as _,m as c,l as b,F as q,r as D,O as P,N as z,n as F,o as i,q as H,s as M}from"./Ccw9mUhn.js";import{_ as O}from"./KGwDaeqH.js";import{u as U}from"./DAFaHp-e.js";import{Z as $,a9 as C,bl as Z,a as J}from"./D_rq7M5t.js";import"./DuGk2X12.js";import"./D6KhxRPP.js";import"./B623BiJ6.js";import"./DsnWl7_Z.js";const Y={class:"dark min-h-screen bg-[#0a0a0f] relative overflow-hidden flex flex-col justify-center py-12 sm:px-6 lg:px-8"},G={key:0,class:"relative z-10 sm:mx-auto sm:w-full sm:max-w-md"},K={class:"backdrop-blur-xl bg-gray-900/40 border border-white/10 rounded-3xl py-12 px-8 shadow-2xl"},Q={class:"flex flex-col items-center"},W={class:"mt-4 text-lg font-bold text-white"},X={key:1,class:"relative z-10 sm:mx-auto sm:w-full sm:max-w-2xl px-4 sm:px-0"},ee={class:"text-center mb-12"},se={class:"w-20 h-20 rounded-2xl bg-gradient-to-br from-cyan-400 via-blue-500 to-blue-600 flex items-center justify-center shadow-[0_0_30px_rgba(0,212,255,0.4)] border border-white/20 backdrop-blur-xl group-hover:scale-110 transition-transform"},te={class:"backdrop-blur-xl bg-gray-900/40 border border-white/5 rounded-3xl shadow-2xl overflow-hidden relative group"},oe={class:"p-8 sm:p-12 relative z-10"},ae={class:"text-center"},ce={class:"mt-6 text-center text-3xl sm:text-4xl font-black text-white leading-tight tracking-tight"},ne={key:0,class:"mt-10 bg-cyan-400/10 border border-cyan-400/20 rounded-2xl p-6 relative group/case"},ie={class:"flex items-center"},re={class:"flex-shrink-0"},le={class:"ml-4"},de={class:"text-lg font-bold text-white"},ue={class:"mt-1 text-sm text-gray-400 font-medium"},me={key:1,class:"mt-10 space-y-6"},he={class:"bg-cyan-400/10 border border-cyan-400/20 rounded-2xl p-6"},be={class:"flex items-center"},pe={class:"flex-shrink-0"},ve={class:"ml-4"},xe={class:"text-lg font-bold text-white"},fe={class:"mt-1 text-sm text-gray-400 font-medium"},_e={class:"text-center"},ge={key:2,class:"mt-10 space-y-8"},ye={class:"bg-blue-600/10 border border-blue-500/20 rounded-2xl p-6"},ke={class:"flex items-center"},we={class:"flex-shrink-0"},Pe={class:"ml-4"},$e={class:"text-lg font-bold text-white"},Ce={class:"mt-1 text-sm text-gray-400 font-medium"},Ie={class:"space-y-6"},Ee={class:"text-sm font-black text-white uppercase tracking-[0.2em] flex items-center gap-2"},Ne={class:"grid gap-4"},Se={class:"flex-shrink-0 w-8 h-8 rounded-lg bg-cyan-400/20 flex items-center justify-center font-black text-cyan-400 text-sm"},Te={class:"text-base font-bold text-white"},Ae={class:"text-sm text-gray-500 mt-1 font-medium"},Le={class:"text-center pt-8 border-t border-white/5"},je={class:"text-sm text-gray-500 mb-4 font-medium"},Re=["disabled"],Ve={key:0,class:"animate-spin -ml-1 mr-3 h-4 w-4 border-2 border-white/20 border-t-white rounded-full"},Be={class:"mt-12 pt-8 border-t border-white/5"},qe={class:"text-center"},De={class:"text-sm text-gray-500 mb-4 font-medium"},ze={class:"flex items-center justify-center gap-6"},Fe={href:"mailto:[email protected]",class:"text-sm text-cyan-400 hover:text-cyan-300 font-bold transition-colors"},He=N({__name:"success",setup(Me){const{t:g}=S(),p=T(),{authPath:I}=A();L({title:g("upstream-subs.checkoutPages.success.metaTitle"),meta:[{name:"description",content:g("upstream-subs.checkoutPages.success.metaDescription")},{name:"robots",content:"noindex"}]});const v=d(!0),y=d(!1),k=d(!1),x=d(!1),m=d(""),u=d(!1),l=d(0),w=j();R(async()=>{v.value=!0;try{const s=V();if(await s.loadUserContext(),s.isAuthenticated){y.value=!0,w.query.source==="extension"&&window.open("/session-refresh?mode=subscribe&app=upstream-subs","_blank");const f=U();setTimeout(()=>{f("/verbatim-subs/dashboard")},3e3);return}const o=w.query.session_id;if(!o)throw new Error("No session ID provided");const a=await(await fetch(`/api/checkout/session-info?session_id=${o}`)).json();a.success&&a.data&&(m.value=a.data.email,x.value=a.data.isNew,a.data.displayCase==="existing_verified"&&(k.value=!0))}catch(s){console.error("Error checking checkout status:",s)}finally{v.value=!1}});const E=async()=>
1{if(l.value>0||u.value)return;u.value=!0,l.value=60;const s=z(()=>{l.value--,l.value<=0&&clearInterval(s)},1e3);try{await fetch("/api/auth/resend-verification",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:m.value,appId:"upstream-subs"})})}catch(o){console.error("Error resending email:",o)}finally{u.value=!1}};return(s,o)=>{const h=F;return i(),r("div",Y,[o[4]||(o[4]=B('<div class="absolute inset-0 opacity-20 pointer-events-none" data-v-bc14cd07><div class="absolute -top-40 -right-40 w-96 h-96 bg-cyan-500/30 rounded-full blur-3xl animate-float" data-v-bc14cd07></div><div class="absolute -bottom-40 -left-40 w-80 h-80 bg-blue-600/30 rounded-full blur-3xl animate-float" style="animation-delay:2s;" data-v-bc14cd07></div><div class="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[500px] h-[500px] bg-cyan-400/20 rounded-full blur-3xl animate-float" style="animation-delay:4s;" data-v-bc14cd07></div><div class="absolute inset-0 opacity-[0.03] bg-[linear-gradient(rgba(18,16,16,0)_50%,rgba(0,0,0,0.25)_50%),linear-gradient(90deg,rgba(255,0,0,0.06),rgba(0,255,0,0.02),rgba(0,0,255,0.06))] bg-[length:100%_2px,3px_100%]" data-v-bc14cd07></div></div>',1)),v.value?(i(),r("div",G,[e("div",K,[e("div",Q,[o[0]||(o[0]=e("div",{class:"animate-spin rounded-full h-12 w-12 border-4 border-cyan-400 border-t-transparent"},null,-1)),e("p",W,t(s.$t("upstream-subs.checkoutPages.success.processingPayment")),1)])])])):(i(),r("div",X,[e("div",ee,[n(h,{to:c(p)("/verbatim-subs"),class:"inline-block group"},{default:_(()=>[e("div",se,[n(c($),{class:"w-10 h-10 text-white"})])]),_:1},8,["to"])]),e("div",te,[o[3]||(o[3]=e("div",{class:"absolute -inset-px bg-gradient-to-br from-cyan-400/5 to-transparent opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none"},null,-1)),e("div",oe,[e("div",ae,[o[1]||(o[1]=e("div",{class:"mx-auto flex items-center justify-center h-20 w-20 rounded-full bg-cyan-400/10 border border-cyan-400/30 shadow-[0_0_20px_rgba(0,212,255,0.2)]"},[e("svg",{class:"h-10 w-10 text-cyan-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"})])],-1)),e("h2",ce,t(s.$t("upstream-subs.checkoutPages.success.paymentConfirmed")),1)]),y.value?(i(),r("div",ne,[e("div",ie,[e("div",re,[n(c(C),{class:"h-6 w-6 text-cyan-400"})]),e("div",le,[e("h3",de,t(s.$t("upstream-subs.checkoutPages.success.accountReady")),1),e("p",ue,t(s.$t("upstream-subs.checkoutPages.success.redirectingToDashboard")),1)])])])):k.value?(i(),r("div",me,[e("div",he,[e("div",be,[e("div",pe,[n(c(C),{class:"h-6 w-6 text-cyan-400"})]),e("div",ve,[e("h3",xe,t(s.$t("upstream-subs.checkoutPages.success.subscriptionActive")),1),e("p",fe,t(s.$t("upstream-subs.checkoutPages.success.signInToContinue")),1)])])]),e("div",_e,[n(h,{to:c(p)(c(I)),class:"inline-flex items-center px-8 py-4 bg-gradient-to-r from-cyan-400 to-blue-600 text-white font-black rounded-xl hover:from-cyan-300 hover:to-blue-500 transition-all shadow-[0_0_20px_rgba(0,212,255,0.3)] hover:scale-105 active:scale-95"},{default:_(()=>[n(c(Z),{class:"w-5 h-5 mr-3"}),b(" "+t(s.$t("upstream-subs.checkoutPages.success.signInToAccount")),1)]),_:1},8,["to"])])])):(i(),r("div",ge,[e("div",ye,[e("div",ke,[e("div",we,[n(c(J),{class:"h-6 w-6 text-blue-400"})]),e("div",Pe,[e("h3",$e,t(x.value?s.$t("upstream-subs.checkoutPages.success.accountCreatedSuccess"):s.$t("upstream-subs.checkoutPages.success.verificationRequired")),1),e("p",Ce,t(x.value?s.$t("upstream-subs.checkoutPages.success.welcomeEmailSent",{email:m.value||"your email"}):s.$t("upstream-subs.checkoutPages.success.verificationEmailSent",{email:m.value||"your email"})),1)])])]),e("div",Ie,[e("h3",Ee,[n(c($),{class:"w-4 h-4 text-cyan-400"}),b(" "+t(s.$t("upstream-subs.checkoutPages.success.nextSteps")),1)]),e("div",Ne,[(i(),r(q,null,D(["checkInbox","clickActivationLink","installChromeExtension"],(a,f)=>e("div",{key:a,class:"flex items-start gap-4 backdrop-blur-xl bg-white/[0.03] border border-white/5 rounded-2xl p-4"},[e("div",Se,t(f+1),1),e("div",null,[e("p",Te,t(s.$t(`upstream-subs.checkoutPages.success.${a}`)),1),e("p",Ae,t(s.$t(`upstream-subs.checkoutPages.success.${a==="checkInbox"?"lookForEmail":a==="clickActivationLink"?"activateAccount":"downloadExtensionAfterLogin"}`)),1),a==="installChromeExtension"?(i(),H(O,{key:0,"extension-key":"upstream-subs"})):P("",!0)])])),64))])]),e("div",Le,[e("p",je,t(s.$t("upstream-subs.checkoutPages.success.didntReceiveEmail")),1),e("button",{onClick:E,disabled:u.value||l.value>0,class:"cursor-pointer inline-flex items-center px-6 py-2.5 border border-white/10 text-sm font-bold rounded-xl text-gray-300 hover:bg-white/5 hover:text-white disabled:opacity-50 disabled:cursor-not-allowed transition-all"},[u.value?(i(),r("div",Ve)):P("",!0),b(" "+t(l.value>0?s.$t("upstream-subs.checkoutPages.success.resendInSeconds",{count:l.value}):s.$t("upstream-subs.checkoutPages.success.resendEmail")),1)],8,Re)])])),e("div",Be,[e("div",qe,[e("p",De,t(s.$t("upstream-subs.checkoutPages.success.needHelp")),1),e("div",ze,[n(h,{to:c(p)("/verbatim-subs"),class:"text-sm text-cyan-400 hover:text-cyan-300 font-bold transition-colors"},{default:_(()=>[b(t(s.$t("upstream-subs.checkoutPages.success.backToHome")),1)]),_:1},8,["to"]),o[2]||(o[2]=e("div",{class:"w-1 h-1 bg-white/20 rounded-full"},null,-1)),e("a",Fe,t(s.$t("upstream-subs.checkoutPages.success.contactSupport")),1)])])])])])]))])}}}),We=M(He,[["__scopeId","data-v-bc14cd07"]]);export{We 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.