1import{j as e,R as h,Q as u,h as p}from"./index-BW3TEkXi.js";import{c as g,a as f,b as w}from"./closerPadiIntegrationService-CfNXTGwY.js";import{C as b}from"./circle-x-BzqcdJsc.js";import{L as j}from"./link-2-ChVVx3Mg.js";const o=({connectParam:i,partnerName:n,completeConnect:l})=>{const[s,a]=h.useState({phase:"working",message:`Linking your NanoReplica account to ${n}...`});h.useEffect(()=>{let c=!1;return(async()=>{const d=new URLSearchParams(window.location.search).get(i);if(!d){c||a({phase:"error",message:`This ${n} connect link is missing its token.`});return}try{const t=await l(d);if(c)return;const r=typeof(t==null?void 0:t.returnUrl)=="string"?t.returnUrl:null;a({phase:"success",message:t!=null&&t.mirrorSynced?`Your NanoReplica account is now linked to ${n}.`:`Your account is linked. ${n} may need a quick refresh to show it.`,returnUrl:r}),r&&window.setTimeout(()=>{window.location.href=r},1500)}catch(t){c||a({phase:"error",message:(t==null?void 0:t.message)||`We could not link your NanoReplica account to ${n}.`})}})(),()=>{c=!0}},[l,i,n]);const m=s.phase==="working",x=s.phase==="success";return e.jsx("div",{className:"min-h-screen bg-[#050B12] text-white px-6 py-16",children:e.jsx("div",{className:"mx-auto flex max-w-2xl flex-col items-center justify-center text-center",children:e.jsxs("div",{className:"rounded-[2rem] border border-white/10 bg-white/[0.04] px-8 py-10 shadow-[0_30px_90px_rgba(0,0,0,0.35)] backdrop-blur-xl",children:[e.jsx("div",{className:"mx-auto flex h-16 w-16 items-center justify-center rounded-2xl border border-cyan-400/20 bg-cyan-400/10",children:m?e.jsx(u,{className:"h-8 w-8 animate-spin text-cyan-300"}):x?e.jsx(p,{className:"h-8 w-8 text-emerald-300"}):e.jsx(b,{className:"h-8 w-8 text-rose-300"})}),e.jsx("h1",{className:"mt-6 text-3xl font-bold tracking-tight",children:x?`${n} linked`:`${n} connection`}),e.jsx("p",{className:"mt-4 text-sm leading-7 text-slate-300",children:s.message}),e.jsxs("div",{className:"mt-8 flex flex-wrap items-center justify-center gap-3",children:[s.phase==="success"&&s.returnUrl?e.jsxs("a",{href:s.returnUrl,className:"inline-flex items-center gap-2 rounded-2xl bg-cyan-400 px-5 py-3 text-sm font-black uppercase tracking-[0.12em] text-slate-950 shadow-[0_18px_40px_rgba(34,211,238,0.25)] transition hover:bg-cyan-300",children:[e.jsx(j,{className:"h-4 w-4"}),"Return To ",n]}):null,m?null:e.jsx("a",{href:"/app",className:"inline-flex items-center gap-2 rounded-2xl border border-white/10 bg-white/[0.04] px-5 py-3 text-sm font-black uppercase tracking-[0.12em] text-white transition hover:bg-white/[0.08]",children:"Open NanoReplica"})]})]})})})},v=()=>e.jsx(o,{connectParam:"cpConnect",partnerName:"CloserPadi",completeConnect:g}),R=()=>e.jsx(o,{connectParam:"gvConnect",partnerName:"GrowVance",completeConnect:f}),$=()=>e.jsx(o,{connectParam:"nfaConnect",partnerName:"NanoForge Academy",completeConnect:w});export{v as CloserPadiConnectPage,R as GrowVanceConnectPage,$ as NanoForgeAcademyConnectPage};
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.