PageSourceSearch

https://hq0.com/assets/Register-Cd1-PKWv.js

js hq0.com collected 2026-10-08 23:02:46 UTC 3,285 bytes, 1 lines download raw bytes

1import{r as v,j as e}from"./index-ulJQSrBi.js";import{_ as F,a9 as w,Y as k,w as C,a as h,aa as L,c as g,v as z,ab as A,ac as I,x as S,y as n,z as l,E as o,G as c,a4 as d,I as m,B as R,L as E,J as O,ae as j,ag as B}from"./main-PG-dEEgK.js";import{r as D}from"./schema-CDzBo61M.js";import{I as J}from"./info-Djp666Vq.js";function M(){const[,p]=F(),{toast:u}=w(),{setUser:f,setCurrentOrg:b,setOrganizations:N}=k(),[s,x]=v.useState(!1),t=C({resolver:O(D),defaultValues:{email:"",name:"",organizationName:""}}),y=async a=>{try{x(!0);const r=await j.auth.register(a);f(r.user);const i=await j.organizations.list();N(i),i.length>0&&b(i[0]),B("signup",{email:a.email}),u({title:"Account created",description:g.auth.welcome}),p("/app/meetings?tab=meetings")}catch(r){console.error("Registration error:",r),u({title:"Registration failed",description:r.message||"Please try again.",variant:"destructive"})}finally{x(!1)}};return e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-muted/50 px-6 py-12",children:e.jsxs("div",{className:"w-full max-w-md",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx(h,{href:"/",children:e.jsx("div",{className:"inline-flex items-center mb-4 hover-elevate active-elevate-2 px-3 py-2 rounded-md",children:e.jsx(L,{size:40,variant:"black"})})}),e.jsx("h1",{className:"text-3xl font-bold mb-2","data-testid":"text-register-title",children:g.auth.signUpPrompt}),e.jsx("p",{className:"text-muted-foreground",children:"Start your 14-day free trial today"})]}),e.jsxs(z,{className:"p-8",children:[e.jsxs(A,{className:"mb-6 bg-blue-50 border-blue-200 dark:bg-blue-950 dark:border-blue-800",children:[e.jsx(J,{className:"h-4 w-4 text-blue-600 dark:text-blue-400"}),e.jsx(I,{className:"text-blue-800 dark:text-blue-200","data-testid":"text-auth-config-info",children:"You can configure authentication methods for your team in settings after registration."})]}),e.jsx(S,{...t,children:e.jsxs("form",{onSubmit:t.handleSubmit(y),className:"space-y-6",children:[e.jsx(n,{control:t.control,name:"email",render:({field:a})=>e.jsxs(l,{children:[e.jsx(o,{children:"Email"}),e.jsx(c,{children:e.jsx(d,{...a,type:"email",placeholder:"[email protected]","data-testid":"input-email",disabled:s})}),e.jsx(m,{})]})}),e.jsx(n,{control:t.control,name:"name",render:({field:a})=>e.jsxs(l,{children:[e.jsx(o,{children:"Full Name"}),e.jsx(c,{children:e.jsx(d,{...a,placeholder:"John Doe","data-testid":"input-name",disabled:s})}),e.jsx(m,{})]})}),e.jsx(n,{control:t.control,name:"organizationName",render:({field:a})=>e.jsxs(l,{children:[e.jsx(o,{children:"Organization Name"}),e.jsx(c,{children:e.jsx(d,{...a,placeholder:"Acme Inc.","data-testid":"input-org-name",disabled:s})}),e.jsx(m,{})]})}),e.jsx(R,{type:"submit",className:"w-full",disabled:s,"data-testid":"button-register",children:s?e.jsxs(e.Fragment,{children:[e.jsx(E,{className:"mr-2 h-4 w-4 animate-spin"}),"Creating account..."]}):"Create Account"})]})}),e.jsxs("div",{className:"mt-6 text-center text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:"Already have an account? "}),e.jsx(h,{href:"/login","data-testid":"link-login",children:e.jsx("span",{className:"text-primary hover:underline font-medium",children:"Sign in"})})]})]})]})})}export{M 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.