try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="df84c624-d2e2-486f-8e0d-b71a2110080f",e._sentryDebugIdIdentifier="sentry-dbid-df84c624-d2e2-486f-8e0d-b71a2110080f")}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4966],{81389:function(e,t,s){Promise.resolve().then(s.bind(s,99233))},99233:function(e,t,s){"use strict";var a=s(57437),o=s(71462),l=s(61575),n=s(22007),r=s(19840),i=s(85434),c=s(67365),d=s(52985),p=s(47193),m=s(65905),u=s(66648),x=s(87138),f=s(2265),h=s(39343);t.default=(0,r.b)(function(){let e=(0,m.kM)(),[t,s]=(0,f.useState)(!1),[r,b]=(0,f.useState)(!1),[g,y]=(0,f.useState)(!1),[w,j]=(0,f.useState)(""),[v,N]=(0,f.useState)(!1),[C,k]=(0,f.useState)(null),{register:G,setValue:Z,control:I,handleSubmit:_}=(0,h.cI)({defaultValues:{firstname:"",lastname:"",phone:"",email:"",password:""}}),S=(0,h.qo)({control:I});(0,f.useEffect)(()=>{k(new URLSearchParams(window.location.search).get("practitioner_id"))},[]),(0,f.useEffect)(()=>{let e=S.password.length>=6,t=/[A-Z]/.test(S.password),s=/[0-9]/.test(S.password);b(e&&t&&s)},[S.password]);let E=async()=>{var t,s,a;if(y(!0),j(""),!(null===(t=(await (0,i.ZP)({core:!0}).post("ext/validate/reg-email/",{email:S.email})).data)||void 0===t?void 0:t.success)){y(!1),j("This email is already registered. Please log in.");return}try{await (0,i.ZP)().post("create/practitioner",{email:S.email,firstname:S.firstname,lastname:S.lastname,mobile:S.phone?"+1 ".concat(S.phone):"",password:S.password,redirect_uri:"".concat((0,c.P$)(),"/verify/")});let t=await e.startLogin({projectId:"cd8c1e7a-ea08-4b32-b8f7-842d9fe6c54d",resourceType:"Practitioner",email:S.email,password:S.password});if(await e.processCode(t.code),C)try{await (0,i.hi)({core:!0}).post("v1/referrals/accept-invite/",{practitioner_id:C,email:S.email},{headers:{"Content-Type":"application/json",Authorization:e.getAccessToken()}})}catch(e){console.error("Accept invite failed",e)}N(!0)}catch(e){(0,i.IZ)(e)?j((null===(a=e.response)||void 0===a?void 0:null===(s=a.data)||void 0===s?void 0:s.message)||e.message):j("Signup failed")}finally{y(!1)}};return v?(0,a.jsxs)("div",{className:"fixed inset-0 z-[99] flex flex-col items-center justify-center bg-metoWhite",children:[(0,a.jsx)(l.Z,{init:!0}),(0,a.jsxs)("div",{className:"text-center text-sm",children:[(0,a.jsx)("p",{children:"Getting everything sorted,"}),(0,a.jsx)("p",{children:"just a few seconds..."})]})]}):(0,a.jsxs)("main",{className:"flex min-h-screen flex-col bg-metoBrown50",children:[(0,a.jsx)(o.Z,{}),(0,a.jsx)("section",{className:"mx-auto my-10",children:(0,a.jsxs)("div",{className:"grid w-full grid-cols-1 gap-10 lg:grid-cols-2 lg:gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center gap-10 px-4",children:[(0,a.jsx)("div",{className:"h-fit w-[320px] overflow-hidden rounded-[40px] border border-black",children:(0,a.jsx)(u.default,{src:"/images/login-image.png",alt:"",className:"w-full object-contain",width:0,height:0,priority:!0,unoptimized:!0})}),(0,a.jsxs)("div",{className:"flex max-w-[560px] flex-col gap-4 text-center",children:[(0,a.jsx)("p",{className:"text-sm font-medium uppercase text-metoCoral",children:"THE HOME OF HEALTHY CHOICES"}),(0,a.jsx)("h2",{className:"font-nib text-5xl text-metoGrey900",children:"Deliver the care your patients deserve."}),(0,a.jsx)("p",{className:"text-lg text-metoGrey700",children:"Access essential tools, resources, and support to streamline operations, enhance patient care, and boost practice viability."})]})]}),(0,a.jsx)("div",{className:"flex justify-center",children:(0,a.jsxs)("div",{className:"mx-8 h-fit w-full rounded-2xl bg-metoWhite p-6 shadow-sm max-sm:mx-4 lg:mx-0 lg:max-w-[400px]",children:[(0,a.jsx)("h2",{className:"py-3 text-left font-nib text-3xl text-metoGrey900",children:"Sign up as a provider"}),(0,a.jsx)("form",{onSubmit:_(E),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4 py-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"group relative w-full",children:[(0,a.jsx)("span",{className:"absolute left-3 top-2 ".concat(S.firstname?"block":"hidden"," text-xs font-medium text-metoGrey400 group-focus-within:block"),children:"First name"}),(0,a.jsx)("input",{...G("firstname"),required:!0,type:"text",value:S.firstname,placeholder:"First name",className:"h-[56px] w-full rounded-lg border border-metoGrey300 px-3 py-2 text-base outline-none placeholder:text-metoGrey900/40 focus:border-metoBlack ".concat(S.firstname?"pt-5":"focus:pt-5"," focus:placeholder-transparent")})]}),(0,a.jsxs)("div",{className:"group relative w-full",children:[(0,a.jsx)("span",{className:"absolute left-3 top-2 ".concat(S.lastname?"block":"hidden"," text-xs font-medium text-metoGrey400 group-focus-within:block"),children:"Last name"}),(0,a.jsx)("input",{...G("lastname"),required:!0,type:"text",value:S.lastname,placeholder:"Last name",className:"h-[56px] w-full rounded-lg border border-metoGrey300 px-3 py-2 text-base outline-none placeholder:text-metoGrey900/40 focus:border-metoBlack ".concat(S.lastname?"pt-5":"focus:pt-5"," focus:placeholder-transparent")})]})]}),(0,a.jsxs)("div",{className:"group relative",children:[(0,a.jsx)("span",{className:"absolute left-3 top-2 ".concat(S.email?"block":"hidden"," text-xs font-medium text-metoGrey400 group-focus-within:block"),children:"Email address"}),(0,a.jsx)("input",{...G("email"),required:!0,type:"email",value:S.email,placeholder:"Email address",className:"h-[56px] w-full rounded-lg border border-metoGrey300 px-3 py-2 text-base outline-none placeholder:text-metoGrey900/40 focus:border-metoBlack ".concat(S.email?"pt-5":"focus:pt-5"," focus:placeholder-transparent")})]}),(0,a.jsxs)("div",{className:"group relative flex items-center",children:[(0,a.jsx)("span",{className:"absolute left-3 top-2 ".concat(S.phone?"block":"hidden"," text-xs font-medium text-metoGrey400 group-focus-within:block"),children:"Mobile phone number"}),(0,a.jsx)("input",{required:!0,type:"text",value:S.phone,onChange:e=>{let t=e.target.value.replace(/\D/g,"");Z("phone",(0,c.un)(t))},placeholder:"Mobile phone number",className:"h-[56px] w-full rounded-lg border border-metoGrey300 px-3 py-2 pl-8 text-base outline-none placeholder:text-metoGrey900/40 focus:border-metoBlack ".concat(S.phone?"pt-5":"focus:pt-5"," focus:placeholder-transparent")}),(0,a.jsx)("span",{className:"absolute left-3 text-base text-metoGrey900 ".concat(S.phone?"top-[22px]":"group-focus-within:top-[22px]"),children:"+1"})]}),(0,a.jsxs)("div",{className:"group relative",children:[(0,a.jsx)("span",{className:"absolute left-3 top-2 ".concat(S.password?"block":"hidden"," text-xs font-medium text-metoGrey400 group-focus-within:block"),children:"Password"}),(0,a.jsx)("input",{...G("password"),required:!0,type:t?"text":"password",value:S.password,placeholder:"Password",className:"h-[56px] w-full rounded-lg border border-metoGrey300 px-3 py-2 pr-12 text-base outline-none placeholder:text-metoGrey900/40 focus:border-metoBlack ".concat(S.password?"pt-5":"focus:pt-5"," focus:placeholder-transparent"),autoComplete:"off"}),(0,a.jsx)("button",{type:"button",onClick:()=>s(!t),className:"absolute bottom-0 right-3 top-0 self-center outline-none",children:t?(0,a.jsx)(d.Z,{className:"size-6"}):(0,a.jsx)(p.Z,{className:"size-6"})})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(n.Z,{isChecked:S.password.length>=6,title:"Minimum 6 password length."}),(0,a.jsx)(n.Z,{isChecked:/[A-Z]/.test(S.password),title:"Requires at least one uppercase letter."}),(0,a.jsx)(n.Z,{isChecked:/[0-9]/.test(S.password),title:"Requires at least one number."})]}),(0,a.jsxs)("button",{type:"submit",className:"flex items-center justify-center gap-1 rounded-lg bg-metoBlack px-4 py-3 text-sm font-medium text-metoWhite hover:bg-metoGrey800 disabled:bg-metoGrey400",disabled:g||!r,children:[g&&(0,a.jsx)("span",{className:"icon-[svg-spinners--3-dots-bounce] text-[1.5em]"}),"Sign up"]}),(0,a.jsx)("button",{type:"button",onClick:()=>{if(""===S.firstname||""===S.lastname||""===S.email){j("Please enter your name and email address.");return}j(""),window.open("https://cal.com/meto-os/demo-call-with-meto?firstName=".concat(encodeURIComponent(S.firstname),"&lastName=").concat(encodeURIComponent(S.lastname),"&email=").concat(encodeURIComponent(S.email)),"_blank")},className:"flex items-center justify-center rounded-lg border border-black px-4 py-3 text-sm font-medium text-black hover:bg-gray-50 disabled:opacity-40",children:"Request a demo"}),w&&(0,a.jsx)("span",{className:"text-center text-xs font-medium text-metoRed500",children:w}),(0,a.jsxs)("p",{className:"text-center text-xs text-metoGrey500",children:["By clicking the Sign up button, I have fully read, understood and I agree with the Meto"," ",(0,a.jsx)(x.default,{href:"https://meto.co/privacy-policy",target:"_blank",className:"text-metoGrey900",children:"Privacy Policy"})," ","for which I authorize Meto Health to share my personal information with Meto Health, Medplum, and other necessary parties in accordance with said policy for the purpose of gaining access and enabling me to use the service."]})]})})]})})]})})]})})},22007:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});var a=s(57437),o=s(2265);function l(e){let{onChange:t,isChecked:s=!1,title:l=""}=e,[n,r]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{r(s)},[s]),(0,a.jsxs)("button",{type:"button",onClick:()=>{r(!n),null==t||t(!n)},className:"pointer-events-none flex items-center gap-1 max-sm:text-left max-sm:text-sm",children:[n?(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.00156 14.4C11.5362 14.4 14.4016 11.5346 14.4016 7.99998C14.4016 4.46535 11.5362 1.59998 8.00156 1.59998C4.46694 1.59998 1.60156 4.46535 1.60156 7.99998C1.60156 11.5346 4.46694 14.4 8.00156 14.4ZM11.0868 6.55288C11.2817 6.28489 11.2225 5.90964 10.9545 5.71473C10.6865 5.51983 10.3112 5.57908 10.1163 5.84707L7.32932 9.6792L5.82583 8.17571C5.59151 7.9414 5.21161 7.9414 4.9773 8.17571C4.74298 8.41003 4.74298 8.78992 4.9773 9.02424L6.9773 11.0242C7.10138 11.1483 7.27356 11.2119 7.44849 11.1981C7.62343 11.1844 7.78359 11.0948 7.8868 10.9529L11.0868 6.55288Z",fill:"#84CC16"})}):(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.00156 14.4001C11.5362 14.4001 14.4016 11.5347 14.4016 8.0001C14.4016 4.46547 11.5362 1.6001 8.00156 1.6001C4.46694 1.6001 1.60156 4.46547 1.60156 8.0001C1.60156 11.5347 4.46694 14.4001 8.00156 14.4001ZM11.0868 6.553C11.2817 6.28501 11.2225 5.90976 10.9545 5.71486C10.6865 5.51995 10.3112 5.5792 10.1163 5.84719L7.32932 9.67932L5.82583 8.17583C5.59151 7.94152 5.21161 7.94152 4.9773 8.17583C4.74298 8.41015 4.74298 8.79005 4.9773 9.02436L6.9773 11.0244C7.10138 11.1484 7.27356 11.212 7.44849 11.1983C7.62343 11.1845 7.78359 11.0949 7.8868 10.953L11.0868 6.553Z",fill:"#D6D3D1"})}),(0,a.jsx)("span",{children:l})]})}}},function(e){e.O(0,[3252,4745,5066,5145,4595,9343,7138,9749,4604,458,5946,991,2971,2627,1744],function(){return e(e.s=81389)}),_N_E=e.O()}]);