1import{j as u}from"./vendor-motion-CrVg7028.js";import{d as f,r as h}from"./vendor-react-CMYciJPr.js";import{aF as w,aE as l,aD as y,s}from"./index-B58eJlvC.js";import"./vendor-query-C4LcE4u2.js";import"./vendor-supabase-XOXmZWMk.js";const I=()=>{const i=f();return h.useEffect(()=>{let o=!1,n;const t=e=>{o||(o=!0,clearTimeout(n),i(e,{replace:!0}))},d=()=>{const e=localStorage.getItem("auth_redirect"),r=localStorage.getItem("auth_intent");e?(localStorage.removeItem("auth_redirect"),localStorage.removeItem("auth_intent"),t(r?`${e}?intent=${r}`:e)):t("/")},m=new URLSearchParams(window.location.hash.replace(/^#/,"")),c=new URLSearchParams(window.location.search),a=(m.get("type")||c.get("type"))==="recovery"||c.get("flow")==="recovery"||w();a?l():y();const{data:{subscription:p}}=s.auth.onAuthStateChange((e,r)=>{if(r){if(a||e==="PASSWORD_RECOVERY"){l(),t("/reset-password");return}e==="SIGNED_IN"&&d()}});return(async()=>{const e=c.get("code");if(e){const{error:g}=await s.auth.exchangeCodeForSession(e);if(g){await s.auth.signOut(),t("/reset-password?expired=true");return}}const{data:{session:r}}=await s.auth.getSession();r&&a&&t("/reset-password")})(),n=setTimeout(async()=>{if(o)return;const{data:{session:e}}=await s.auth.getSession();t(a?e?"/reset-password":"/reset-password?expired=true":"/")},2e3),()=>{clearTimeout(n),p.unsubscribe()}},[i]),u.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background",children:u.jsx("p",{className:"text-muted-foreground",children:"Setting up your account..."})})};export{I 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.