1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[883],{44250:function(e,a,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/claim-your-link",function(){return r(86290)}])},86290:function(e,a,r){"use strict";r.r(a),r.d(a,{Register:function(){return E},default:function(){return S}});var t=r(52322),s=r(2784),i=r(10495),n=r(96577),o=r.n(n),l=r(3265),c=r(66773),d=r(24511),m=r(32799),u=r(90047),p=r(84695),h=r.n(p);r(15233);var w=r(57647),x=r.n(w),f=r(90492),g=r(94128),N=r(95207),y=r(55934),b=r(94757),j=r(49912);let v=/^\+[1-9]\d{10,14}$/,C=d.Ry().shape({firstName:d.Z_().trim().min(2,"Minimum 2 characters needed for first name").max(100,"Maximum 100 characters allowed in first name").matches(N.ME,"Please enter your valid first name. It can include things like letters, numbers, apostrophes, spaces and hyphens. Minimum two and maximum 100 characters allowed. If your name includes something outside of the above parameters, we truly apologize. Please let us know right away so we can fix it!").required("First name is required"),lastName:d.Z_().trim().min(2,"Minimum 2 characters needed for last name").max(100,"Maximum 100 characters allowed for last name").matches(N.ME,"Please enter your valid last name. It can include things like letters, numbers, apostrophes, spaces and hyphens. Minimum two and maximum 100 characters allowed. If your name includes something outside of the above parameters, we truly apologize. Please let us know right away so we can fix it!").required("Last name is required"),phone:d.Z_().trim().matches(v,"Phone number is not valid").notRequired(),email:d.Z_().trim().min(7).max(250).email("Enter a valid email address (i.e. [email protected])").required("Email is required"),password:d.Z_().min(8,"Password must include a minimum of: (8 charatcers, 1 number, and 1 special character)").matches(N.QC,"Password must contain special characters").required("Password is required"),cpassword:d.Z_().min(8,"Password must include a minimum of: (8 charatcers, 1 number, and 1 special character)").matches(N.QC,"Password must contain special characters").required("Confirm Password is required"),profileAlias:d.Z_().required("Profile Alias is required"),terms:d.O7().oneOf([!0],"Required terms of use").required("Required terms of use")});function k(e){let{handleSubmit:a,resetError:r,profileAlias:n,firstName:o,lastName:c,phone:d,email:p}=e,[w,N]=(0,s.useState)(!1),[k,_]=(0,s.useState)(!1),[P,E]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{new(x())(".btn").on("success",function(){})},[]),(0,t.jsx)(m.J9,{initialValues:{firstName:o,lastName:c,phone:d,email:p,profileAlias:n,password:"",cpassword:"",terms:!1},validationSchema:C,onSubmit:(e,r)=>{e.firstName=e.firstName.trim(),e.lastName=e.lastName.trim(),e.email=e.email.trim(),e.password=e.password.trim(),e.cpassword=e.cpassword.trim(),e.password!==e.cpassword?(E(!0),r.setSubmitting(!1)):(E(!1),a(e,r))},children:e=>{let{errors:a,touched:s,isSubmitting:o,submitForm:c,handleChange:d,values:m,validateForm:p,setValues:x}=e;return(0,t.jsxs)("form",{className:"signup-form new-signup-form",onSubmit:c,autoComplete:"false",onKeyDown:async e=>{if("Enter"===e.key&&(c(),u.Am.dismiss(),(await p(m)).email)){u.Am.error("Your email is invalid");return}},children:[(0,t.jsxs)(i.rj,{container:!0,spacing:3,children:[(0,t.jsx)(i.rj,{item:!0,xs:6,children:(0,t.jsx)(i.nv,{error:s.firstName&&!!a.firstName,helperText:s.firstName&&a.firstName,id:"firstName",label:"First Name *",name:"firstName",variant:"outlined",value:m.firstName,onChange:d})}),(0,t.jsx)(i.rj,{item:!0,xs:6,children:(0,t.jsx)(i.nv,{error:s.lastName&&!!a.lastName,helperText:s.lastName&&a.lastName,id:"lastName",label:"Last Name *",name:"lastName",variant:"outlined",value:m.lastName,onChange:d})}),(0,t.jsx)(i.rj,{item:!0,xs:12,children:(0,t.jsx)(h(),{inputProps:{id:"phone-number",name:"phone-number",autocomplete:"phone-number"+Math.random(),style:{width:"100%",paddingTop:"13px",paddingBottom:"12px"}},country:"us",value:m.phone,inputClass:"material-shadow",placeholder:"Phone",onChange:e=>x({...m,phone:e?"+"+e:""}),isValid:()=>{if(""!==m.phone){var e;if(!(null===(e=m.phone)||void 0===e?void 0:e.match(v)))return!1}return!0}})}),(0,t.jsx)(i.rj,{item:!0,xs:12,children:(0,t.jsxs)(i.NI,{variant:"outlined",className:s.password&&a.password?"textfield-error-text":"",error:s.password&&!!a.password,children:[(0,t.jsx)(i.AZ,{htmlFor:"outlined-adornment-password",children:"Password *"}),(0,t.jsx)(i.zu,{id:"outlined-adornment-password",name:"password",autoComplete:"new-password",type:w?"text":"password",value:m.password,onChange:d,endAdornment:(0,t.jsx)(i.oG,{position:"end",children:(0,t.jsx)(i.hU,{"aria-label":"toggle password visibility",onClick:()=>N(!w),edge:"end",children:w?(0,t.jsx)("span",{className:"material-icons-outlined",children:"visibility"}):(0,t.jsx)("span",{className:"material-icons-outlined",children:"visibility_off"})})})}),s.password&&!!a.password&&(0,t.jsx)(f.Z,{children:a.password})]})}),(0,t.jsxs)(i.rj,{item:!0,xs:12,children:[(0,t.jsxs)(i.NI,{variant:"outlined",className:s.cpassword&&a.cpassword?"textfield-error-text":"",error:s.cpassword&&!!a.cpassword,children:[(0,t.jsx)(i.AZ,{htmlFor:"outlined-adornment-cpassword",children:"Confirm Password *"}),(0,t.jsx)(i.zu,{id:"outlined-adornment-cpassword",name:"cpassword",type:k?"text":"password",value:m.cpassword,onChange:d,endAdornment:(0,t.jsx)(i.oG,{position:"end",children:(0,t.jsx)(i.hU,{"aria-label":"toggle password visibility",onClick:()=>_(!k),edge:"end",children:k?(0,t.jsx)("span",{className:"material-icons-outlined",children:"visibility"}):(0,t.jsx)("span",{className:"material-icons-outlined",children:"visibility_off"})})})}),s.cpassword&&!!a.cpassword&&(0,t.jsx)(f.Z,{children:a.cpassword})]}),P&&(0,t.jsx)(i.ZT,{variant:"body2",className:"inline-erros-msgs",children:"Password and Confirm Password does not match"})]}),(0,t.jsx)(i.rj,{item:!0,xs:12,children:(0,t.jsxs)(i.xu,{className:"flex items-center justify-between text-gray600 rounded signup-link mb-3",bgcolor:"primary.bodyBgColor",children:[(0,t.jsxs)(i.xu,{className:"flex items-center gap-2 overflow-hidden",children:[(0,t.jsx)("span",{className:"material-icons",children:"lock"}),(0,t.jsx)("span",{className:"truncate",children:(0,y.$2)()+"/cp/"+n})]}),(0,t.jsx)("button",{className:"btn","data-clipboard-text":"".concat((0,y.$2)(),"/cp/")+n,onClick:e=>{e.preventDefault(),u.Am.success("Copied to clipboard! Share this link with others so they can chat, schedule, meet, share content, sign etc. in a secure relationship workspace with you.",{toastId:"
1COPY_LINK",autoClose:5e3,icon:(0,t.jsx)("img",{src:l.nQ.src,alt:"img",className:"mt-1"})})},children:(0,t.jsx)(i.hU,{"aria-label":"delete",className:" hover:bg-transparent ",children:(0,t.jsx)("span",{className:"material-icons text-primary cursor-pointer",children:"content_copy"})})})]})})]}),(0,t.jsxs)(i.xu,{className:"",alignItems:"center",mt:1,children:[(0,t.jsx)(g.Z,{control:(0,t.jsx)(i.XZ,{name:"terms",id:"terms",color:"primary",checked:m.terms,onChange:d,inputProps:{"aria-label":"primary checkbox"},required:!0}),label:(0,t.jsxs)(i.ZT,{variant:"body2",style:{paddingTop:"6px"},children:["I agree to the",(0,t.jsx)(i.rU,{href:"https://www.clientpoint.net/terms-conditions",target:"_blank",className:"font-weight-bold policy-link",underline:"always",color:"inherit",children:"Terms of Service"}),"and",(0,t.jsx)(i.rU,{className:"font-weight-bold policy-link",target:"_blank",underline:"always",href:"https://www.clientpoint.net/privacy-policy",color:"inherit",children:"Privacy Policy."})]})}),s.terms&&!m.terms&&(0,t.jsx)(i.ZT,{className:"pb-1 pt-1",display:"block",variant:"caption",color:"error",children:"To signup, Please agree to the terms & conditions"})]}),(0,t.jsx)(i.xu,{mt:1,mb:2,children:(0,t.jsxs)(i.zx,{onClick:async()=>{if(r(),c(),u.Am.dismiss(),(await p(m)).email){u.Am.error("Your email is invalid");return}},variant:"contained",color:"primary",disableElevation:!0,size:"large",className:o?"custom-button button-diasabled":"custom-button",fullWidth:!0,children:[o&&(0,t.jsx)(i.aN,{color:"inherit",size:20}),!o&&"CONTINUE TO MY CLIENTPOINT"]})}),(0,t.jsxs)(i.xu,{className:"relative w-full mb-4 inline-flex flex-wrap justify-center text-center",children:[(0,t.jsx)(i.xu,{className:"w-full h-[1px] absolute left-0 top-0 bottom-0 m-auto bg-disabledColor right-0"}),(0,t.jsx)(i.xu,{component:"span",className:"text-gray700 px-2 leading-5 text-[13px] z-10 bg-[#fafafa] relative !w-auto",children:"or log in with"})]}),(0,t.jsxs)(i.xu,{className:"w-full inline-flex flex-wrap justify-center text-center items-start",children:[(0,t.jsx)(j.b,{SocialProviderType:b.MC.Google}),(0,t.jsx)(j.b,{SocialProviderType:b.MC.ClientPointEnterprise}),(0,t.jsx)(j.b,{SocialProviderType:b.MC.Facebook}),(0,t.jsx)(j.b,{SocialProviderType:b.MC.Twitter})]}),(0,t.jsx)(i.xu,{mt:2.5,color:"primary.linkColor",textAlign:"center",children:(0,t.jsxs)(i.ZT,{variant:"body1",gutterBottom:!0,children:["Already have a ClientPoint account?",(0,t.jsx)(i.rU,{href:"/login",className:"font-weight-bold policy-link",underline:"always",color:"inherit",children:"Log In"})]})})]})}})}var _=r(12910),P=r(5632);function E(){let e=(0,P.useRouter)(),{phone:a,email:r,first_name:n,last_name:d,profile_alias:m,marketing_msg:u}
1=e.query,[p,h]=(0,s.useState)("");e.isReady&&!m&&e.push("register");let[w,x]=s.useState(!1),[f,g]=s.useState(null);s.useEffect(()=>{var a;null===(a=window.rudderanalytics)||void 0===a||a.page(),h((0,N.rj)(e))},[]);let y=async(e,a)=>{a.setSubmitting(!0),g(null);let r={email:e.email.toLowerCase(),password:e.password,user_metadata:{firstName:e.firstName,lastName:e.lastName},connection:"Username-Password-Authentication"};c.Z.signup(r,function(r){if(r){if(a.setSubmitting(!1),r.code&&"invalid_signup"===r.code){g("User already exist, Please try with another email address.");return}if(r.code&&("invalid_password"===r.code||"password_dictionary_error"===r.code||"password_strength_error"===r.code)){g("The chosen password is too weak or common");return}if(r.code&&"password_no_user_info_error"===r.code){g("The chosen password is based on user information");return}g("The user your are attempting to sign up is invalid.");return}!function(e,a){let r=JSON.stringify({firstName:e.firstName,lastName:e.lastName,profileAlias:e.profileAlias,email:e.email.toLowerCase(),...e.phone&&{phone:e.phone.replace(/[^\d+]/g,"")}});N.zk.post(_.eb+"/user/signup",r).then(function(r){x(!0),localStorage.removeItem("connectUser"),localStorage.removeItem("show_notification_preferences");let t=e.phone.replace(/[^\d+]/g,""),s=r.data.data,i=window;i.rudderanalytics.identify(s.userId,{firstName:e.firstName,lastName:e.lastName,email:e.email.toLowerCase()}),i.rudderanalytics.alias(e.email.toLowerCase()),i.rudderanalytics.track("Registration",{firstName:e.firstName,lastName:e.lastName,email:e.email.toLowerCase(),...""!==t?{phone:t}:{}}),setTimeout(function(){c.Z.login({realm:"Username-Password-Authentication",username:e.email.toLowerCase(),password:e.password,responseType:"token id_token",audience:"".concat("https://auth.clientpoint.me"),redirectUri:window.location.origin+"/auth"+p},function(r){if(r){var s,n;if(r&&!r.description&&"string"==typeof!r.description){a.setSubmitting(!1),g("Unknown error: Please reload and try again"),i.rudderanalytics.track("Registration_Error",{firstName:e.firstName,lastName:e.lastName,email:e.email.toLowerCase(),...""!==t?{phone:t}:{},error:"UNKNOWN_ERROR"});return}(null===(s=r.description)||void 0===s?void 0:s.includes("account has been blocked"))?(a.setSubmitting(!1),g(r.description),i.rudderanalytics.track("Registration_Error",{firstName:e.firstName,lastName:e.lastName,email:e.email.toLowerCase(),...""!==t?{phone:t}:{},error:"ACCOUNT_BLOCKED"})):(null===(n=r.description)||void 0===n?void 0:n.includes("Wrong email or password"))?N.zk.get("".concat(_.eb,"/user/email?email=").concat(encodeURIComponent(e.email))).then(()=>{a.setSubmitting(!1),i.rudderanalytics.track("Registration_Error",{firstName:e.firstName,lastName:e.lastName,email:e.email.toLowerCase(),...""!==t?{phone:t}:{},error:"Entered Email Address/Password is incorrect, please re-check and try again"}),g("Entered Email Address/Password is incorrect, please re-check and try again")}).catch(()=>{a.setSubmitting(!1),i.rudderanalytics.track("Registration_Error",{firstName:e.firstName,lastName:e.lastName,email:e.email.toLowerCase(),...""!==t?{phone:t}:{},error:"Account does not exist. Please try with valid account details."}),g("Account does not exist. Please try with valid account details.")}):(a.setSubmitting(!1),g("Unknown error occurred"))}})},4e3)}).catch(()=>{let r=e.phone.replace(/[^\d+]/g,"");a.setSubmitting(!1),window.rudderanalytics.track("Registration_Error",{firstName:e.firstName,lastName:e.lastName,email:e.email.toLowerCase(),...""!==r?{phone:r}:{},error:"An error occurred while completing your signup. Please reload and try again."}),g("Unknown error: Please reload and try again.")})}(e,a)})};return m?(0,t.jsx)(i.Xk,{className:"register-page bg-white signup-page",elevation:0,children:(0,t.jsxs)(i.rj,{container:!0,children:[(0,t.jsx)(i.rj,{item:!0,lg:6,md:12,sm:12,xs:12,children:(0,t.jsx)(i.xu,{display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",className:"h-full p-2",children:(0,t.jsxs)(i.xu,{className:"register-container signup-container",width:"100% !important",display:"flex",justifyContent:"center",flexDirection:"column",children:[(0,t.jsx)(i.xu,{className:"logo",mb:2,textAlign:"center",maxWidth:"113px",children:(0,t.jsx)(o(),{src:l.Mn.src,width:"113",height:"113",objectFit:"contain",alt:"logo"})}),(0,t.jsxs)(i.xu,{mb:4,children:[(0,t.jsx)(i.ZT,{variant:"h3",gutterBottom:!0,color:"inherit",className:"mb-1",children:"Tell us about yourself"}),(0,t.jsx)(i.ZT,{variant:"body2",gutterBottom:!0,color:"inherit",children:"For a customised ClientPoint Experience"})]}),f&&(0,t.jsx)(i.xu,{mb:2.5,children:(0,t.jsx)(i.bZ,{variant:"filled",severity:"error",className:"alert-danger",children:f})}),w&&(0,t.jsx)(i.xu,{mb:2.5,children:(0,t.jsx)(i.bZ,{variant:"filled",severity:"success",className:"alert-danger",children:(0,t.jsx)("span",{style:{fontWeight:"400"},children:"Congratulations! Please wait while we prepare your account!"})})}),(0,t.jsx)(k,{handleSubmit:y,resetError:function(){g(null)},profileAlias:m?decodeURIComponent(m):"",marketingMessage:u?decodeURIComponent(u):"",f
1irstName:n?decodeURIComponent(n):"",lastName:d?decodeURIComponent(d):"",email:r?decodeURIComponent(r):"",phone:a?decodeURIComponent(a):""})]})})}),(0,t.jsx)(i.rj,{item:!0,lg:6,md:12,sm:12,xs:12,children:(0,t.jsx)(i.xu,{className:"hero-img-wrapper h-full",children:(0,t.jsx)("img",{src:l.xF.src,alt:"signup page image",className:"hero-img w-full"})})})]})}):(0,t.jsx)("div",{className:"h-screen w-full flex items-center justify-center",children:(0,t.jsx)(i.aN,{size:30})})}var S=E},49912:function(e,a,r){"use strict";r.d(a,{b:function(){return h}});var t=r(52322),s=r(66773),i=r(3265),n=r(94757),o=r(5632),l=r(2784),c=r(56189),d=r(95207),m=r(5706),u=r(94449),p=r(78669);let h=e=>{let a=(0,o.useRouter)(),[r,h]=(0,l.useState)(!1),{auth0InstanceForSPA:w}=(0,u.v9)(e=>e.auth0),{SocialProviderType:x,isClaimYourLink:f,connectionUser:g,text:N}=e,{profile_alias:y}=a.query,b=(0,p.MA)(),j=[n.MC.Google,n.MC.ClientPointEnterprise,n.MC.Facebook,n.MC.Twitter],v,C="",k=()=>{h(!1)};switch((0,l.useEffect)(()=>(b&&localStorage.setItem("utms",b),window.addEventListener("pageshow",k),()=>{window.removeEventListener("pageshow",k)}),[]),(0,l.useEffect)(()=>{f&&"string"==typeof y?window.localStorage.setItem("profile_alias",y):window.localStorage.removeItem("profile_alias")},[y]),(0,l.useEffect)(()=>{g&&(localStorage.setItem("connectUserId",g.userId),localStorage.setItem("connection",null==g?void 0:g.profileAlias),localStorage.setItem("connectUser","true"))},[g]),x){case n.MC.Google:v="Google",C=i.ie.src;break;case n.MC.ClientPointEnterprise:v="ClientPoint Enterprise",C=i.Em.src;break;case n.MC.Facebook:v="Facebook",C=i.s1.src;break;case n.MC.Twitter:v="X",C=i.tL.src}let _=async e=>{try{await w.loginWithPopup(e,{timeoutInSeconds:300}).then(()=>{parent.postMessage("CP_LOGIN","*")})}catch(e){if(e instanceof m.nW){e.popup.close();return}}},P=async()=>{try{if(h(!0),(0,d.yL)()){_({authorizationParams:{prompt:"login",connection:x,audience:"https://auth.clientpoint.me",redirect_uri:window.location.origin+"/"}});return}switch(x){case n.MC.Google:case n.MC.Facebook:case n.MC.Twitter:{let{state:e,nonce:a}=(0,d.kB)();s.Z.authorize({responseType:"token id_token",connection:x,prompt:"select_account",scope:"openid profile email offline_access",audience:"https://auth.clientpoint.me",state:e,nonce:a,redirectUri:window.location.origin+"/auth"});break}case n.MC.ClientPointEnterprise:{let{state:e,nonce:a}=(0,d.kB)();s.Z.authorize({responseType:"token id_token",connection:x,state:e,nonce:a,redirectUri:window.location.origin+"/auth"})}}}catch(e){h(!1)}};return j.includes(x)&&v&&C?N?(0,t.jsx)("span",{onClick:P,children:N}):(0,t.jsxs)(c.xu,{className:"flex flex-col items-center",width:"75px",children:[(0,t.jsx)("button",{type:"button",className:"login-with-sso-btn",disabled:r,onClick:P,children:r?(0,t.jsx)(c.aN,{color:"inherit",size:20}):(0,t.jsx)("img",{width:24,src:C,alt:v})}),(0,t.jsx)(c.xu,{className:"text-gray500 text-sm",children:v})]}):null}}},function(e){e.O(0,[3325,2182,5220,2812,5417,3661,6577,9097,1055,524,8834,2270,4128,3850,2888,9774,179],function(){return e(e.s=44250)}),_N_E=e.O()}]);
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.