1import{r as d,j as e}from"./query-vendor-CqOtiPNe.js";import{a as S,d as P,L as w}from"./react-vendor-Oyj1q24G.js";import{d as F,e as L,b as z,a as m}from"./index-CgiuONvO.js";import{L as B}from"./Logo-BMQirxBI.js";/* empty css */import{C as p}from"./check-EsNBkSFR.js";import{A as G}from"./arrow-left-Cg5pwYzI.js";import{B as _}from"./building-2-Dhg-JMoH.js";import{A as E}from"./arrow-right-CcjvJnjH.js";import"./ui-vendor-C92kXd7i.js";import"./chart-vendor-De-uRwFm.js";const H=()=>e.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",width:"19",height:"19",children:[e.jsx("path",{fill:"#4285F4",d:"M21.6 12.23c0-.71-.06-1.4-.18-2.07H12v3.92h5.38a4.6 4.6 0 0 1-2 3.02v2.55h3.24c1.9-1.75 2.98-4.33 2.98-7.42Z"}),e.jsx("path",{fill:"#34A853",d:"M12 22c2.7 0 4.98-.9 6.64-2.43l-3.24-2.55c-.9.6-2.05.96-3.4.96-2.61 0-4.82-1.77-5.61-4.14H3.05v2.63A10 10 0 0 0 12 22Z"}),e.jsx("path",{fill:"#FBBC05",d:"M6.39 13.84A6.02 6.02 0 0 1 6.07 12c0-.64.11-1.26.32-1.84V7.53H3.05A10 10 0 0 0 2 12c0 1.61.39 3.14 1.05 4.47l3.34-2.63Z"}),e.jsx("path",{fill:"#EA4335",d:"M12 6.02c1.47 0 2.79.51 3.82 1.5l2.88-2.88A9.65 9.65 0 0 0 12 2a10 10 0 0 0-8.95 5.53l3.34 2.63C7.18 7.79 9.39 6.02 12 6.02Z"})]}),q=(r,l)=>!r||!r.startsWith("/")||r.startsWith("//")||r.includes("\\")?l:r.slice(0,512),V=()=>{const r=S(),[l]=P(),{authCapabilities:b,user:j,loading:x,signInWithGoogle:y,signUp:N}=F(),o=l.get("plan")==="all-access"?"all-access":null,h=l.get("source")==="autobot",u=q(l.get("returnTo"),h?"/autobot/workspace?connect=extension":"/dashboard"),[t,g]=d.useState(!1),[i,f]=d.useState(!1),[a,v]=d.useState({email:"",fullName:"",phone:"",password:"",confirmPassword:""});d.useEffect(()=>{if(o)try{sessionStorage.setItem("pendingPlan",o)}catch{}},[o]),d.useEffect(()=>{!x&&j&&r(u,{replace:!0})},[r,u,x,j]);const c=(s,n)=>{v(k=>({...k,[s]:n}))},C=async s=>{if(s.preventDefault(),a.password!==a.confirmPassword){m.error("Passwords do not match.");return}g(!0);const{error:n}=await N(a.email.trim(),a.password,a.fullName.trim(),a.phone.trim(),"owner",u);n&&m.error(n.message),g(!1)},A=()=>{f(!0);try{y(u)}catch(s){const n=s instanceof Error?s.message:"Google signup could not be started.";m.error(n),f(!1)}};return e.jsxs("main",{className:"jha-auth",children:[e.jsxs("section",{className:"jha-auth__context","aria-labelledby":"signup-context-title",children:[e.jsxs(w,{className:"jha-auth__brand",to:"/","aria-label":"JHA Solutions home",children:[e.jsx("span",{className:"jha-auth__brand-mark","aria-hidden":"true",children:e.jsx(B,{size:27,theme:"light"})}),e.jsxs("span",{children:[e.jsx("strong",{children:"JHA Solutions"}),e.jsx("small",{children:"Property operations software"})]})]}),e.jsxs("div",{className:"jha-auth__context-copy",children:[e.jsx("p",{className:"jha-auth__eyebrow",children:h?"AutoBot account setup":o?"All Access account setup":"Start with the essentials"}),e.jsx("h1",{id:"signup-context-title",children:h?"Create your account and connect AutoBot.":o?"Create your workspace, then unlock All Access.":"Create a focused workspace for your property operations."}),e.jsx("p",{children:h?"Use one secure JHA Solutions account for the AutoBot desktop app, Chrome extension, and posting workspace.":"Set up your account, add your portfolio, and bring daily work into one secure system."})]}),e.jsxs("ul",{className:"jha-auth__assurances",children:[e.jsxs("li",{children:[e.jsx(p,{size:17})," Free workspace with no card required"]}),e.jsxs("li",{children:[e.jsx(p,{size:17})," Local PostgreSQL account and session storage"]}),e.jsxs("li",{children:[e.jsx(p,{size:17})," Upgrade only when your operation needs it"]})]}),e.jsxs("div",{className:"jha-auth__security-note",children:[e.jsx(L,{size:20}),e.jsxs("span",{children:[e.jsx("strong",{children:"Server-managed access"}),"Your password is salted and hashed before it reaches the database."]})]})]}),e.jsx("section",{className:"jha-auth__form-panel","aria-labelledby":"signup-title",children:e.jsxs("div",{className:"jha-auth__form-shell",children:[e.jsxs("button",{className:"jha-auth__back",type:"button",onClick:()=>r("/"),children:[e.jsx(G,{size:17}),"Back to website"]}),e.jsxs("div",{className:"jha-auth__heading",children:[e.jsx("span",{className:"jha-auth__heading-icon","aria-hidden":"true",children:e.jsx(_,{size:21})}),e.jsxs("div",{children:[e.jsx("p",{className:"jha-auth__eyebrow",children:o?"Selected plan: All Access":"Free account"}),e.jsx("h2",{id:"signup-title",children:"Create your workspace"})]})]}),o&&e.jsxs("div",{className:"jha-auth__dev-card",role:"status",children:[e.jsx("strong",{children:"All Access - $5 per month"}),e.jsx("span",{children:"Create your secure account first. The payment window will open from your dashboard immediately afterward."})]}),b.google&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{className:"jha-auth__google",type:"button",onClick:A,disabled:t||i,children:[e.jsx(H,{}),i?"Opening Google signup...":"Create account with Google"]}),e.jsx("div",{className:"jha-auth__divider","aria-hidden":"true",children:e.jsx("span",{children:"or create with email"})})]}),e.jsxs("form",{className:"jha-auth__form",onSubmit:C,children:[e.jsxs("div",{className:"jha-auth__field",children:[e.jsx("label",{htmlFor:"fullName",children:"Full name"}),e.jsx("input",{id:"fullName",autoComplete:"name",value:a.fullName,onChange:s=>c("fullName",s.target.value),required:!0,disabled:t||i})]}),e.jsxs("div",{className:"jha-auth__field",children:[e.jsx("label",{htmlFor:"email",children:"Work email"}),e.jsx("input",{id:"email",type:"email",autoComplete:"email",value:a.email,onChange:s=>c("email",s.target.value),required:!0,disabled:t||i})]}),e.jsxs("div",{className:"jha-auth__field",children:[e.jsxs("label",{htmlFor:"phone",children:["Phone ",e.jsx("span",{"aria-hidden":"true",children:"(optional)"})]}),e.jsx("input",{id:"phone",type:"tel",autoComplete:"tel",value:a.p
1hone,onChange:s=>c("phone",s.target.value),disabled:t||i})]}),e.jsxs("div",{className:"jha-auth__field",children:[e.jsx("label",{htmlFor:"newPassword",children:"Password"}),e.jsx("input",{id:"newPassword",type:"password",autoComplete:"new-password",minLength:10,value:a.password,onChange:s=>c("password",s.target.value),required:!0,disabled:t||i})]}),e.jsxs("div",{className:"jha-auth__field",children:[e.jsx("label",{htmlFor:"confirmPassword",children:"Confirm password"}),e.jsx("input",{id:"confirmPassword",type:"password",autoComplete:"new-password",minLength:10,value:a.confirmPassword,onChange:s=>c("confirmPassword",s.target.value),required:!0,disabled:t||i})]}),e.jsxs("button",{className:"jha-auth__submit",type:"submit",disabled:t||i,children:[t?e.jsx(z,{className:"jha-auth__spinner",size:18}):e.jsx(_,{size:18}),t?"Creating workspace...":"Create free account",!t&&e.jsx(E,{size:18})]})]}),e.jsxs("p",{className:"jha-auth__support",children:["Already have an account? ",e.jsx(w,{to:o?"/auth?plan=all-access":"/auth",children:"Sign in"})]})]})})]})};export{V 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.