1import{r as a,j as e}from"./vendor-react-7kK5Bxv7.js";import{k as p,L as u,C as y,c as b,A as v}from"./realtime-mux-D9UASGOE.js";import{A as g,B as c}from"./index-CY_U-MX5.js";import"./vendor-radix-B-GS9lOI.js";import"./vendor-sentry-5pfF84Kg.js";import"./vendor-zustand-CrGSlGru.js";import"./vendor-tiptap-D5DGAmLD.js";import"./vendor-prosemirror-C2SEAMxP.js";import"./vendor-yjs-B8tolAur.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:"266446510ecd5dbce76808c272265ca5e766a576"};var r=new t.Error().stack;r&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[r]="a210b64f-0134-4162-8c79-1e367a988515",t._sentryDebugIdIdentifier="sentry-dbid-a210b64f-0134-4162-8c79-1e367a988515")}catch{}})();function _(){const[t,r]=a.useState(""),[s,i]=a.useState(!1),[d,l]=a.useState(null),[m,x]=a.useState("form"),h=async o=>{o.preventDefault(),i(!0),l(null);try{await b.auth.auth.findWorkspaces({body:{email:t}}),x("success")}catch(n){const f=n instanceof v?n.body.error||n.message:"Failed to send workspace list";l(f)}finally{i(!1)}};return e.jsxs(g,{children:[m==="form"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mb-6 flex justify-center",children:e.jsx("div",{className:"w-16 h-16 rounded-full bg-[var(--color-accent-subtle)] flex items-center justify-center",children:e.jsx(p,{className:"w-8 h-8 text-[var(--color-accent)]"})})}),e.jsx("h1",{className:"text-[length:var(--text-headline-s)] leading-[var(--lh-headline-s)] font-semibold text-[var(--color-text-primary)] text-center mb-1",children:"Find your workspaces"}),e.jsx("p",{className:"text-[length:var(--text-body-m)] leading-[var(--lh-body-m)] text-[var(--color-text-tertiary)] text-center mb-6",children:"Enter your email to get a list of your workspaces."}),d&&e.jsx("div",{role:"alert","aria-live":"assertive",className:"mb-4 p-3 rounded-[var(--radius-md)] bg-[var(--color-error-subtle)] text-[var(--color-error-text)] text-[length:var(--text-body-s)] leading-[var(--lh-body-s)]",children:d}),e.jsxs("form",{onSubmit:h,className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{htmlFor:"email",className:"text-[length:var(--text-label-l)] leading-[var(--lh-label-l)] font-medium text-[var(--color-text-secondary)]",children:"Email address"}),e.jsx("input",{id:"email",name:"email",type:"email",value:t,onChange:o=>{r(o.target.value),l(null)},required:!0,autoFocus:!0,autoComplete:"username",placeholder:"[email protected]",className:"h-11 md:h-[38px] py-2 px-3 rounded-[6px] border border-[var(--color-bg-tertiary)] bg-[var(--color-bg-primary)] text-[16px] md:text-[length:var(--text-body-m)] leading-[var(--lh-body-m)] text-[var(--color-text-primary)] placeholder:text-[var(--color-text-quaternary)] focus:outline-2 focus:outline-[var(--color-accent)] focus:outline-offset-0 transition-colors"})]}),e.jsx(c,{type:"submit",disabled:s,className:"w-full mt-1 h-11 md:h-[38px] !rounded-[6px]",children:s?"Sending...":"Send workspace list"})]}),e.jsxs("p",{className:"mt-6 text-center text-[length:var(--text-body-s)] leading-[var(--lh-body-s)] text-[var(--color-text-tertiary)]",children:["Remember your workspace?"," ",e.jsx(u,{to:"/login",className:"text-[var(--color-accent)] hover:underline font-medium",children:"Sign in"})]}),e.jsxs("p",{className:"mt-4 text-center text-[length:var(--text-body-s)] leading-[var(--lh-body-s)] text-[var(--color-text-quaternary)]",children:[e.jsx("a",{href:"https://www.ambiguous.ai/legal/privacy",target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:"Privacy Policy"})," · ",e.jsx("a",{href:"https://www.ambiguous.ai/legal/terms",target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:"Terms of Service"})]})]}),m==="success"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mb-6 flex justify-center",children:e.jsx("div",{className:"w-16 h-16 rounded-full bg-[var(--color-success-subtle)] flex items-center justify-center",children:e.jsx(y,{className:"w-8 h-8 text-[var(--color-success)]"})})}),e.jsx("h1",{className:"text-[length:var(--text-headline-s)] leading-[var(--lh-headline-s)] font-semibold text-[var(--color-text-primary)] text-center mb-1",children:"Check your email"}),e.jsxs("p",{className:"text-[length:var(--text-body-m)] leading-[var(--lh-body-m)] text-[var(--color-text-tertiary)] text-center mb-2",children:["If ",e.jsx("strong",{className:"text-[var(--color-text-primary)]",children:t})," has any workspaces, we've sent you the list."]}),e.jsx("p",{className:"text-[length:var(--text-body-s)] leading-[var(--lh-body-s)] text-[var(--color-text-quaternary)] text-center mb-6",children:"Check your spam folder if you don't see the email."}),e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx(u,{to:"/login",children:e.jsx(c,{type:"button",className:"w-full h-11 md:h-[38px] !rounded-[6px]",children:"Back to sign in"})}),e.jsx(c,{type:"button",variant:"secondary",onClick:()=>{x("form"),r("")},className:"w-full h-11 md:h-[38px] !rounded-[6px]",children:"Try a Different Email"})]})]})]})}export{_ as FindWorkspacesPage};
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.