PageSourceSearch

https://portal.commoninterest.com/assets/create-account-CtlTbqCW.js

js commoninterest.com collected 2026-10-01 23:53:05 UTC 5,184 bytes, 1 lines download raw bytes

1import{u as q,j as e,r as w,I as o,F as S,o as N,p as j,B as P}from"./elements-5kxJS_4j.js";import{R as X,x as k,k as I,L as y}from"./index-CtCeyryw.js";import{u as L}from"./index.esm-GMeyTKQp.js";import{C as E}from"./CustomContent-CcAnhb4u.js";import{u as K}from"./useAuthorization-XS6cSJ0I.js";import{u as F}from"./useBanner-B9a9zq1p.js";import{u as B}from"./useCustomContent-DI_9OCLI.js";import{u as M}from"./useRedesign-xeayEwR4.js";import"./grids-DGmfp9GI.js";import"./startOfDay-AazlW55I.js";import"./index-BSR_b3JY.js";const Q={title:"Welcome, Neighbor!",showPropertySelector:!1,showAi:!0};function Y(){const{t}=q(),{isLoggedIn:u}=K(),c=F(),i=B("Registration","Home_v2"),n=M();return u?e.jsx(X,{to:"/dashboard"}):n?e.jsx(X,{to:"/public?modal=createAccount"}):e.jsxs("div",{className:"px-horizontal-layout flex flex-wrap-reverse xl:flex-nowrap justify-center gap-10 py-8 bg-base-fill rounded-xl",children:[e.jsxs("div",{className:"flex flex-col w-full xl:max-w-[50%]",children:[i&&e.jsx("div",{className:"flex gap-3 items-center lg:mb-[2vw] mb-12 w-full",children:e.jsx(E,{content:i})}),e.jsx("h1",{className:"font-bold text-2xl lg:mb-[1vw] mb-6",children:t("auth.login.signUpAccount")}),e.jsx(U,{})]}),e.jsx("div",{className:"hidden flex-col md:flex",children:c?e.jsx("img",{src:c,width:548,className:"rounded-xl max-w-full max-h-[548px]",alt:"banner"}):e.jsx("div",{className:"min-h-[548px] max-h-[548px] bg-gray-100 w-[30vw] max-w-[600px] mb-20 rounded-xl"})})]})}function U(){var d,p,h,x,f,b;const{t}=q(),u=k(),[c,i]=w.useState(!1),[n,m]=w.useState([!1,!1]),{handleSubmit:v,formState:{errors:r},watch:A,register:s}=L(),R=A("password",""),g=a=>{m(a?l=>[l[0],!l[1]]:l=>[!l[0],l[1]])},C=v(async a=>{i(!0),await I.createAccount(a.accountNumber,{name:a.name,emailAddress:a.email,phone:a.phoneNumber,password:a.password,passwordConfirmation:a.confirmPassword,registrationKey:a.registrationKey}),i(!1),u("/login")});return e.jsxs("form",{id:"create-account-form",noValidate:!0,onSubmit:C,className:"space-y-16",children:[e.jsxs("div",{className:"flex flex-col gap-7",children:[e.jsx(o,{errorSpacing:!1,type:"text",label:t("auth.createAccount.accountNumber").toString(),className:"lg:w-11/12",placeholder:"XXXXXXXXX",tooltipMessage:t("main.accountRegistration.accountNumber.tooltip"),error:r.name&&t("auth.login.accountRequired").toString(),qaAttribute:"account-number",...s("accountNumber",{required:!0})}),e.jsx(o,{errorSpacing:!1,type:"text",label:t("auth.createAccount.registrationKey").toString(),className:"lg:w-11/12",placeholder:"XXXXXXXXX",tooltipMessage:t("main.accountRegistration.registrationKey.tooltip"),error:r.name&&t("auth.login.registrationRequired").toString(),qaAttribute:"registration-key",...s("registrationKey",{required:!0})}),e.jsx(y,{to:"/request-account",className:"text-base-link hover:underline",children:t("auth.login.noAccountOrRegistration")}),e.jsx(o,{errorSpacing:!1,type:"text",label:t("auth.login.email").toString(),className:"lg:w-11/12",placeholder:"[email protected]",error:r.email&&t("auth.login.invalidEmail").toString(),qaAttribute:"email",...s("email",{required:!0,pattern:/^[^@ ]+@[^@ ]+\.[^@ .]{2,}$/})}),e.jsx(o,{errorSpacing:!1,type:"text",label:t("auth.login.name").toString(),className:"lg:w-11/12",placeholder:"Neil Armstrong",error:r.name&&t("auth.login.nameRequired").toString(),qaAttribute:"name",...s("name",{required:!0})}),e.jsx(o,{errorSpacing:!1,type:"tel",label:t("auth.login.phone").toString(),className:"lg:w-11/12",placeholder:"XXX-XXX-XXXX",error:(p=(d=r.phoneNumber)==null?void 0:d.message)==null?void 0:p.toString(),qaAttribute:"phone-number",...s("phoneNumber",{required:t("auth.login.phoneRequired").toString(),pattern:{value:/^\d{3}-?\d{3}-?\d{4}$/,message:t("auth.login.invalidPhone").toString()}})}),e.jsx(o,{errorSpacing:!1,type:n[0]?"text":"password",label:t("auth.login.password").toString(),className:"lg:w-11/12",endIcon:e.jsx(S,{icon:n[0]?N:j,className:"text-base-header/70",onClick:()=>g(0)}),error:(x=(h=r.password)==null?void 0:h.message)==null?void 0:x.toString(),qaAttribute:"password",...s("password",{required:t("auth.login.passRequired").toString(),minLength:{value:6,message:t("auth.login.minPass").toString()}})}),e.jsx(o,{errorSpacing:!1,type:n[1]?"text":"password",label:t("auth.login.confirmPassword").toString(),className:"lg:w-11/12 mb-3",endIcon:e.jsx(S,{icon:n[1]?N:j,className:"text-base-header/70",onClick:()=>g(1)}),error:(b=(f=r.confirmPassword)==null?void 0:f.message)==null?void 0:b.toString(),qaAttribute:"confirm-password",...s("confirmPassword",{required:t("auth.login.passRequired").toString(),minLength:{value:6,message:t("auth.login.minPass").toString()},validate:a=>a===R||t("auth.login.noPasswordMatch").toString()})})]}),e.jsxs("div",{className:"flex flex-col justify-center items-center",children:[e.jsx(P,{type:"submit",className:"mb-5 w-48","data-qa":"submit-btn",disabled:c,
1children:t("auth.login.signUp").toString()}),e.jsxs("p",{children:[t("auth.login.alreadyHave").toString()," ",e.jsx(y,{to:"/login",className:"text-base-link hover:underline","data-qa":"log-in-link",children:t("auth.login.logIn").toString()})]})]})]})}export{Y as Component,Q as handle};

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.