1import{q as m,r as l,j as e,s as n}from"./index-eJyS5X3E.js";function w(){const a=m(),[r,d]=l.useState(null);return l.useEffect(()=>{(async()=>{try{const t=new URL(window.location.href),h=t.searchParams.get("next")||"/members";if(t.searchParams.get("code")){const{error:s}=await n.auth.exchangeCodeForSession(window.location.href);if(s)throw s}else if(window.location.hash.includes("access_token")){const s=new URLSearchParams(window.location.hash.slice(1)),o=s.get("access_token"),i=s.get("refresh_token");if(o&&i){const{error:c}=await n.auth.setSession({access_token:o,refresh_token:i});if(c)throw c}}const{data:x}=await n.auth.getSession();if(!x.session)throw new Error("Sign-in link is invalid or expired. Please request a new one.");a({to:h,replace:!0})}catch(t){d(t?.message??"Could not sign you in.")}})()},[a]),e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background px-6",children:e.jsx("div",{className:"max-w-md w-full text-center space-y-3",children:r?e.jsxs(e.Fragment,{children:[e.jsx("h1",{className:"font-display text-2xl text-gold",children:"Sign-in failed"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:r}),e.jsx("a",{href:"/auth",className:"inline-block text-sm text-gold underline",children:"Go to sign in"})]}):e.jsxs(e.Fragment,{children:[e.jsx("h1",{className:"font-display text-2xl text-gold",children:"Signing you inâ¦"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"One moment."})]})})})}export{w as component};
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.