PageSourceSearch

https://app.slancha.ai/assets/Signup-CcA6oGKu.js

js slancha.ai collected 2026-10-05 15:05:04 UTC 3,475 bytes, 1 lines download raw bytes

1import{t as i,u as _,j as e,a as w,b as k,p as d,r as x}from"./app-DeursVD0.js";import{a as o,h as S,d as P,L as m}from"./react-vendor-CkgV0jl3.js";import{A}from"./AuthCard-CQAb8GN1.js";import{G as q}from"./GoogleButton-DMWxz5hD.js";import"./supabase-J7ITh-P0.js";function W(){o.useEffect(()=>{i("audit_signup_viewed")},[]);const{signUp:j,signInWithGoogle:v}=_(),u=S(),l=P(),[s,b]=o.useState({name:"",email:"",password:"",confirmPassword:""}),[h,r]=o.useState(""),[p,g]=o.useState(!1),n=a=>{b({...s,[a.target.name]:a.target.value}),r("")},y=async a=>{if(a.preventDefault(),s.password!==s.confirmPassword){r("Passwords do not match.");return}if(s.password.length<8){r("Password must be at least 8 characters.");return}g(!0),r(""),i("audit_signup_started");const{data:t,error:f}=await j(s.email,s.password,{display_name:s.name});if(f){i("audit_signup_failed"),r(f.message),g(!1);return}const C=s.email.split("@")[1]||"unknown";if(i("audit_signup_requested"),t!=null&&t.session&&k(C,"email"),t!=null&&t.session){const c=d(window.location.search);c.spa?u(c.path,{replace:!0}):window.location.assign(c.path);return}i("audit_signup_verification_pending"),x(d(l.search).path),u(w("/verify-email",l.search),{state:{email:s.email}})},N=async()=>{i("audit_signup_started"),x(d(window.location.search).path);const{error:a}=await v();a&&r(a.message)};return e.jsxs(A,{title:"Create your Slancha account",dek:"Scan, approve and share your team’s agent skills. Tracing is optional. Drafting skills from sessions requires premium access.",path:"/signup",children:[e.jsx(q,{onClick:N,label:"Sign up with Google"}),e.jsx("div",{className:"sh-divider",children:"or"}),e.jsxs("form",{onSubmit:y,children:[h&&e.jsx("div",{className:"sh-error",role:"alert",children:h}),e.jsxs("div",{className:"sh-field",children:[e.jsx("label",{className:"sh-label",htmlFor:"name",children:"Full name"}),e.jsx("input",{className:"sh-input",id:"name",name:"name",type:"text",autoComplete:"name",placeholder:"Your name",required:!0,value:s.name,onChange:n})]}),e.jsxs("div",{className:"sh-field",children:[e.jsx("label",{className:"sh-label",htmlFor:"email",children:"Work email"}),e.jsx("input",{className:"sh-input",id:"email",name:"email",type:"email",autoComplete:"email",placeholder:"[email protected]",required:!0,value:s.email,onChange:n})]}),e.jsxs("div",{className:"sh-field",children:[e.jsx("label",{className:"sh-label",htmlFor:"password",children:"Password"}),e.jsx("input",{className:"sh-input",id:"password",name:"password",type:"password",autoComplete:"new-password",placeholder:"At least 8 characters",required:!0,minLength:8,value:s.password,onChange:n})]}),e.jsxs("div",{className:"sh-field",children:[e.jsx("label",{className:"sh-label",htmlFor:"confirmPassword",children:"Confirm password"}),e.jsx("input",{className:"sh-input",id:"confirmPassword",name:"confirmPassword",type:"password",autoComplete:"new-password",placeholder:"Confirm your password",required:!0,value:s.confirmPassword,onChange:n})]}),e.jsx("button",{className:"sh-btn sh-btn--primary sh-btn--block",type:"submit",disabled:p,children:p?"Creating account…":"Create account"})]}),e.jsxs("p",{className:"sh-aside",children:["Already have an account? ",e.jsx(m,{to:w("/login",l.search),children:"Sign in"})]}),e.jsxs("p",{className:"sh-aside",children:["Creating an account accepts the ",e.jsx(m,{to:"/terms",children:"terms"})," and the"," ",e.jsx(m,{to:"/privacy",children:"privacy policy"}),"."]})]})}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.