1import{a as L,u as A,b as P,r,j as e,L as d}from"./index-B9DrxPxt.js";import{A as I}from"./AuthSplit-CROz5OlJ.js";import{u as R}from"./PrivacyKeyContext-eVu-6Cbe.js";import{u as C,M as W}from"./usePrivyAuth-D3-qKv8e.js";import{a as z}from"./useUserPreferences-KSpbjZJ1.js";import{g as D,r as G}from"./authFlow-ug00Wz-o.js";import{cU as T}from"./mock-Czs9_i9A.js";import"./encryptionAttestation-9Xfw64x_.js";import{L as U}from"./loader-circle-nEb5kzpG.js";import{A as _}from"./arrow-right-vSjrYovR.js";import{G as Y}from"./globe-CehLheB9.js";import{W as B}from"./wallet-C9pP8zvM.js";import"./shield-check-DKysTtCD.js";import"./lock-Dt-SpnOl.js";import"./zap-CyjXl5QB.js";import"./file-text-C0_3ViwV.js";import"./activity-Cv125lwa.js";import"./chevron-left-CvKcC93r.js";import"./vendor-obs-efJMxAnS.js";import"./index-DQp_5KKJ-xvXWcIkI.js";import"./sha256-B5Zgb3YJ.js";import"./tslib.es6-CxgKo-rx.js";import"./crossTabSync-CcAhSYOP.js";import"./__vite-browser-external-DebD-OTV.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"vita-app@f75f359f87cf"};var s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="0a03f8e9-41b9-409e-922e-a7dc9293224f",t._sentryDebugIdIdentifier="sentry-dbid-0a03f8e9-41b9-409e-922e-a7dc9293224f")}catch{}})();function E(t){return G({unlockState:"unlocked",autoUnlockAttempted:!0,isNewUser:!1,fromPath:t})}function fe(){const t=L(),s=A(),{toast:c}=P(),{user:i,loading:o}=R(),k=T,{ready:n,authenticated:m}=k(),{signInWithPrivy:w,syncExistingPrivySession:p,isLoading:a,error:l,clearError:f}=C(),{loading:h,hasCompletedOnboarding:y,onboardingResolved:g,error:v}=z(),x=r.useRef(!1),[F,M]=r.useState(!1),S=!1;r.useEffect(()=>{var N;if(o||a||!i||h)return;const u=(N=s.state)==null?void 0:N.from,b=D(u);if(!g){v&&t(E(b),{replace:!0});return}if(!y){t("/onboarding",{replace:!0});return}t(E(b),{replace:!0,state:u?{from:u}:void 0})},[o,a,i,t,s.state,h,y,g,v]),r.useEffect(()=>{x.current||!n||!m||o||i||a||(x.current=!0,p())},[o,a,m,n,p,i]),r.useEffect(()=>{l&&(c({variant:"destructive",title:"Sign up failed",description:l.message}),f())},[l,c,f]);const j=a||!n;return e.jsxs(I,{variant:"signup",eyebrow:"create account",title:"Launch your profile.",sub:"Continue with Email, Google, or Wallet. Your encrypted record is provisioned automatically.",children:[e.jsxs("div",{className:"auth-login-stack",children:[S,e.jsx("button",{type:"button",className:"btn vita",style:{height:50,fontSize:14.5,justifyContent:"center",width:"100%"},onClick:w,disabled:j,children:j?e.jsxs(e.Fragment,{children:[e.jsx(U,{className:"h-4 w-4 animate-spin"}),n?"Creating session...":"Loading..."]}):e.jsxs(e.Fragment,{children:["Continue with Email, Google, or Wallet ",e.jsx(_,{size:16})]})}),e.jsxs("div",{className:"auth-or",children:[e.jsx("div",{className:"auth-rule"}),e.jsx("span",{className:"eyebrow",children:"providers"}),e.jsx("div",{className:"auth-rule"})]}),e.jsxs("div",{className:"auth-providers",children:[e.jsxs("span",{className:"auth-prov",children:[e.jsx(W,{size:13})," Email"]}),e.jsxs("span",{className:"auth-prov",children:[e.jsx(Y,{size:13})," Google"]}),e.jsxs("span",{className:"auth-prov",children:[e.jsx(B,{size:13})," Wallet"]})]})]}),e.jsxs("div",{className:"auth-bottom-stack",children:[e.jsxs("div",{className:"auth-important",children:[e.jsx("p",{className:"auth-important-label",children:"Important"}),e.jsx("p",{className:"auth-important-copy",children:"You'll set a passphrase that derives your encryption key. We can't see it and we can't reset it â save your recovery phrase."})]}),e.jsxs("p",{className:"auth-legal",children:["By creating an account, you accept the"," ",e.jsx(d,{to:"/terms",className:"auth-link",children:"Terms of Service"})," ","and"," ",e.jsx(d,{to:"/privacy",className:"auth-link",children:"Privacy Policy"}),"."]}),e.jsxs("div",{className:"auth-foot",children:["Already have an account?"," ",e.jsx(d,{to:"/login",className:"auth-link",children:"Sign in"})]})]})]})}export{fe 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.