1import{j as n}from"./vendor-ui-HFWR8-3w.js";import{u,r as l}from"./vendor-react-TOmoy5F7.js";import{s as t}from"./index-khXlasVk.js";import"./vendor-charts-vYadQpzB.js";import"./vendor-icons-DoRmp3nk.js";import"./vendor-supabase-BSJTZ0K-.js";function w(){const a=u();return l.useEffect(()=>{(async()=>{const{data:{session:r}}=await t.auth.getSession();if(!(r!=null&&r.user)){a("/auth/auth-code-error");return}const s=r.user.id;await t.from("users").upsert({id:s},{onConflict:"id"});const{data:c}=await t.from("credits_ledger").select("id").eq("user_id",s).limit(1).single();c||await t.from("user_context").upsert({user_id:s,about_me:"",style_rules:[],target_voices:[],promoted_products:[]});const{data:i}=await t.from("user_context").select("about_me, onboarding_completed").eq("user_id",s).single(),o=!(i!=null&&i.onboarding_completed),{data:e}=await t.from("subscriptions").select("status").eq("user_id",s).maybeSingle(),d=(e==null?void 0:e.status)==="active"||(e==null?void 0:e.status)==="trialing";a(o&&!d?"/plans":o?"/onboarding":"/dashboard")})()},[a]),n.jsx("div",{className:"min-h-screen flex items-center justify-center",children:n.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})})}export{w 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.