"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[206],{533:(e,t,a)=>{a.d(t,{f:()=>l,n:()=>s});var i=a(37876),r=a(37477),n=a(40917),o=a(80072);a(14232);let s=new Map([[o.C.PreEligibility,{label:"Age & BMI",icon:r.IconScaleOutline}],[o.C.ContactDetails,{label:"Personal Details",icon:r.IconId}],[o.C.InsuranceDetails,{label:"Insurance Info",icon:r.IconClipboardPlus}]]),l=e=>{var t;let{currentStep:a,steps:r=s}=e,o=null==(t=r.get(a))?void 0:t.label,l=Array.from(r.values());return(0,i.jsx)(n.s,{currentStep:o,steps:l})}},17206:(e,t,a)=>{a.d(t,{D:()=>A});var i=a(37876),r=a(37477),n=a(16741),o=a(34305),s=a(1144),l=a(66885),c=a(62227),d=a(14232),u=a(46884),m=a(76803),g=a(53100),p=a(92261),h=a(96079),b=a(32246),C=a(53310),x=a(47811),f=a(56931),y=a(74161),D=a(45383),v=a(20058),I=a(92749);let E=e=>(0,i.jsx)(r.Flex,{direction:"column",gap:"spacer-2",alignItems:"center",cursor:"pointer",role:"group",tabIndex:0,outline:"none",as:"button",onKeyDown:t=>{"Enter"===t.key&&e.onClick()},...e});E.Image=e=>(0,i.jsx)(r.Image,{flex:1,objectFit:"contain",...e}),E.Description=e=>(0,i.jsx)(r.Text,{variant:"text-body-floating-label-regular",color:"text-secondary",textAlign:"center",...e}),E.Title=e=>(0,i.jsx)(r.Text,{color:"text-secondary",variant:"text-body-meta-medium",transition:"color 100ms linear",_groupHover:{color:"text-link-primary-hover"},_groupActive:{color:"text-link-primary-pressed"},_groupFocusVisible:{color:"text-link-primary-default"},...e}),E.Frame=e=>(0,i.jsx)(r.Flex,{px:"spacer-3",pb:"spacer-5",borderRadius:"radii-1",borderWidth:"1px",borderStyle:"solid",borderColor:"ui-element-outline-active",transition:"background-color 100ms linear, border-color 100ms linear",_groupFocusVisible:{outlineWidth:"3px",outlineStyle:"solid",outlineColor:"primary-focus"},_groupHover:{borderColor:"primary-hover",backgroundColor:"background-action-hover"},_groupActive:{borderColor:"primary-pressed",backgroundColor:"background-action-pressed"},direction:"column",alignItems:"center",minHeight:"160px",width:"100%",...e});let S=e=>{let{onSelectWorkflow:t}=e,{track:a}=(0,y.useAnalytics)(),s=e=>()=>(a("".concat(e,"_selected"),{partner:e}),t(e)),l=Object.entries(I.s);return(0,i.jsxs)(D.s,{direction:"column",gap:"spacer-9",children:[(0,i.jsx)(r.Flex,{direction:"column",gap:"spacer-2",children:(0,i.jsxs)(r.Text,{variant:"text-header-XL",color:"text-secondary-negative",children:["Welcome!"," ",(0,i.jsxs)(r.Text,{as:"span",variant:"text-header-XL",color:"text-primary",children:["To get started, please select your benefit program."," "]})]})}),(0,i.jsxs)(r.Flex,{direction:"column",gap:{base:"spacer-9"},children:[(0,i.jsx)(r.Flex,{direction:"column",gap:"spacer-4",flex:1}),(0,i.jsxs)(r.Flex,{direction:"column",gap:"spacer-4",pb:{base:"spacer-9",md:"spacer-6"},flex:1,children:[(0,i.jsx)(r.Flex,{direction:{base:"column",md:"row"},gap:{base:"spacer-6",md:"spacer-3"},justifyContent:{md:"space-between"},alignItems:{md:"end"},children:(0,i.jsxs)(r.Flex,{gap:"spacer-3",alignItems:"center",flex:1,children:[(0,i.jsx)(r.IconArrowRight,{color:"primary-default",size:"l"}),(0,i.jsx)(r.Text,{variant:"text-body-large-medium",color:"text-primary",children:"Available Programs:"})]})}),(0,i.jsxs)(r.Grid,{spacingX:"spacer-4",spacingY:{base:"spacer-4",lg:"spacer-6"},columns:{base:2,md:3,lg:4,xxl:5},children:[l.map(e=>{let[t,{asset:a,description:r,name:n}]=e;return(0,i.jsxs)(E,{onClick:s(t),children:[(0,i.jsxs)(E.Frame,{children:[(0,i.jsx)(E.Image,{...a}),(0,i.jsx)(E.Description,{children:r})]}),(0,i.jsx)(E.Title,{children:n})]},t)}),(0,i.jsxs)(E,{"aria-label":"Provider Referral",onClick:s(o.fz.Flyte),maxWidth:"16rem",children:[(0,i.jsx)(E.Frame,{p:0,width:"100%",minHeight:{base:"7.5rem",md:"10rem"},children:(0,i.jsx)(E.Image,{src:n.k[o.fz.KaiserPermanente],width:"123px",height:"40px",alt:"Kaiser Permanente Logo"})}),(0,i.jsx)(E.Title,{children:"Provider Referral"})]}),(0,i.jsxs)(E,{onClick:s(o.fz.Flyte),maxWidth:"16rem",children:[(0,i.jsx)(E.Frame,{p:0,width:"100%",minHeight:{base:"7.5rem",md:"10rem"},children:(0,i.jsx)(E.Image,{src:n.k[o.fz.Sone],width:"123px",height:"40px",alt:"Sone Logo"})}),(0,i.jsx)(E.Title,{children:"Provider Referral"})]})]})]})]}),(0,i.jsxs)(r.Flex,{direction:"column",gap:"spacer-1",children:[(0,i.jsx)(r.Text,{color:"text-secondary",variant:"text-body-bold",children:"Need some help?"}),(0,i.jsxs)(r.Text,{color:"text-secondary",variant:"text-body-regular",children:["Please call"," ",(0,i.jsx)(v.C,{})," ","to speak with a Care Coordinator."]})]})]})};var w=a(33841),P=a(65159);let L={WorkflowSelector:"workflowSelector",...w.fz},j=(0,P.mj)({types:{},guards:{isCareCompassSelected:e=>{let{event:t}=e;return t.data.workflow===w.fz.CareCompass},isAetnaSelected:e=>{let{event:t}=e;return t.data.workflow===w.fz.Aetna},isRiverspringSelected:e=>{let{event:t}=e;return t.data.workflow===w.fz.RiverSpringLiving},isPequotSelected:e=>{let{event:t}=e;return t.data.workflow===w.fz.PequotHealthCare},isPyleSelected:e=>{let{event:t}=e;return t.data.workflow===w.fz.PyleFamilyInsurance},isMDSaveSelected:e=>{let{event:t}=e;return t.data.workflow===w.fz.MDSave},isChristianaCareSelected:e=>{let{event:t}=e;return t.data.workflow===w.fz.ChristianaCare},is1199SEIUSelected:e=>{let{event:t}=e;return t.data.workflow===w.fz["1199SEIU"]}}}).createMachine({id:"workflowManagerMachine",initial:L.WorkflowSelector,states:{[L.WorkflowSelector]:{id:L.WorkflowSelector,on:{SUBMIT:[{guard:"isCareCompassSelected",target:L.CareCompass},{guard:"isAetnaSelected",target:L.Aetna},{guard:"isRiverspringSelected",target:L.RiverSpringLiving},{guard:"isPequotSelected",target:L.PequotHealthCare},{guard:"isPyleSelected",target:L.PyleFamilyInsurance},{guard:"isMDSaveSelected",target:L.MDSave},{guard:"isChristianaCareSelected",target:L.ChristianaCare},{guard:"is1199SEIUSelected",target:L["1199SEIU"]},{target:L.Flyte}]}},[L.PequotHealthCare]:{},[L.RiverSpringLiving]:{},[L.CareCompass]:{},[L.Aetna]:{},[L.Flyte]:{},[L.PyleFamilyInsurance]:{},[L.MDSave]:{},[L.ChristianaCare]:{},[L["1199SEIU"]]:{}}}),A=e=>{let{render:t}=e,[a,y]=(0,c.zl)(j),D=(0,d.useMemo)(()=>(0,l.r)(a.value),[a.value]),v=(0,d.useCallback)(e=>{y({type:"SUBMIT",data:{workflow:e}})},[y]);return(0,d.useCallback)(()=>{switch(D){case L.WorkflowSelector:return t({header:(0,i.jsx)(n.E,{partner:o.fz.Flyte}),body:(0,i.jsx)(S,{onSelectWorkflow:v}),currentWorkFlowStep:D});case L.Aetna:return(0,i.jsx)(r.ComposerProvider,{theme:s.w4.aetna,children:(0,i.jsx)(u.j,{render:t})});case L.CareCompass:return(0,i.jsx)(r.ComposerProvider,{theme:s.w4.careCompass,children:(0,i.jsx)(m.Z,{render:t})});case L.RiverSpringLiving:return(0,i.jsx)(r.ComposerProvider,{theme:s.w4.riverspring,children:(0,i.jsx)(x.D,{render:t})});case L.PequotHealthCare:return(0,i.jsx)(r.ComposerProvider,{theme:s.w4.pequot,children:(0,i.jsx)(b.K,{render:t})});case L.PyleFamilyInsurance:return(0,i.jsx)(r.ComposerProvider,{theme:s.w4.pyle,children:(0,i.jsx)(C.A,{render:t})});case L.MDSave:return(0,i.jsx)(r.ComposerProvider,{theme:s.w4.standard,children:(0,i.jsx)(h.Y,{render:t})});case L.ChristianaCare:return(0,i.jsx)(r.ComposerProvider,{theme:s.w4.standard,children:(0,i.jsx)(g.z,{render:t})});case L["1199SEIU"]:return(0,i.jsx)(r.ComposerProvider,{theme:s.w4.standard,children:(0,i.jsx)(f.A,{render:t})});case L.Flyte:default:return(0,i.jsx)(p.q,{render:t})}},[D])()}},32246:(e,t,a)=>{a.d(t,{K:()=>ed});var i=a(37876),r=a(37477),n=a(59004),o=a(91366),s=a(48934),l=a(14901),c=a(16741),d=a(80075),u=a(6770),m=a(39946),g=a(63583),p=a(53154),h=a(30435),b=a(42037),C=a(70587),x=a(11427),f=a(86535),y=a(27297),D=a(43483),v=a(81488),I=a(93511),E=a(34305),S=a(80072),w=a(66885),P=a(62227),L=a(14232),j=a(11969),A=a(10758),R=a(85007),M=a(20411),T=a(31346),k=a(38360),U=a(39648),B=a(77944),F=a(47353),O=a(83928),N=a(33841),_=a(13751),H=a(92323),X=a(86687),V=a(89225),z=a(97793),W=a(68792),q=a(65159),Y=a(39777),K=a(45352),G=a(63826);let Q=e=>e===G.w.FULL_MATCH||e===G.w.ELIGIBLE_MATCH,J=e=>{switch(e){case G.w.PERSON_MATCH:case G.w.INSURANCE_MATCH:case G.w.EXPIRED:case G.w.NOT_FOUND:return E.XN.EligibleWaiting;case G.w.FULL_MATCH:case G.w.ELIGIBLE_MATCH:default:return}};var $=function(e){return e.CreateLead="createLead",e.CreateContact="createContact",e.UpdateContact="updateContact",e.DetermineContactOrLead="determineContactOrLead",e.FetchConsents="fetchConsents",e.UpdateEmail="updateEmail",e.CheckEligibility="checkEligibility",e.CheckBenefits="checkBenefits",e}($||{});let Z={...z.f,...$},ee=V.Ek[N.fz.PequotHealthCare],et={formData:{birthdate:"",comorbidity:"",currentWeightInPounds:"",dateOfHighestWeightValue:"",email:"",firstName:"",heightInFoot:"",heightInInch:"",highestWeightInPounds:"",insuranceCoverage:void 0,insuranceMemberID:"",insurance:void 0,lastName:"",phone:"",state:void 0,termsAgreement:!1,howDidYouFindUS:"",comorbidities:[],diabetes:"",bariatricSurgery:""},eligibilityCheckMatchType:void 0,bmi:void 0,benefitsCheck:void 0,otpData:void 0,consentsData:{items:[],userConsentStatus:[]},contactData:{},passwordData:{password:void 0,confirmPassword:void 0},flyteUserData:void 0,error:void 0,labs:void 0},ea={..._.AU,..._.gQ,..._.pE,..._.UH,..._.yF,..._.n6,..._.uN,..._.yS,..._.RW,..._.i_,...(0,_.rS)(et).reset},ei=(0,q.mj)({types:{},guards:{isPreEligibilityMet:e=>{let{context:{formData:t,bmi:a}}=e;return W.J0.pequotHealthCare({bmi:a,comorbidity:t.comorbidity,birthdate:t.birthdate})},isApplicationReviewRequired:e=>{let{context:{eligibilityCheckMatchType:t,formData:a}}=e;return!O.A.shouldBypassIsApplicationReviewRequired({email:a.email})&&[N.wY.EXPIRED,N.wY.INSURANCE_MATCH,N.wY.PERSON_MATCH,N.wY.NOT_FOUND].includes(t)},isApplicationDetected:X.L,isAthenaRecordCreated:H.z},actions:ea}).createMachine({context:()=>et,id:"pequotMachine",initial:Z.PreEligibility,states:{[Z.PreEligibility]:{id:Z.PreEligibility,initial:Z.Idle,states:{[Z.Idle]:{on:{SUBMIT:{target:Z.Submitting,actions:"updateFormData"}}},[Z.Submitting]:{entry:"assignBMI",always:[{target:"#".concat(Z.ContactDetails),guard:"isPreEligibilityMet"},{target:"#".concat(Z.EligibilityUnmet)}]}}},[Z.ContactDetails]:{id:Z.ContactDetails,initial:Z.Idle,states:{[Z.Idle]:{on:{SUBMIT:{target:"#".concat(Z.InsuranceDetails),actions:"updateFormData"}}}}},[Z.InsuranceDetails]:{id:Z.InsuranceDetails,initial:Z.Idle,states:{[Z.Idle]:{on:{BACK:{target:"#".concat(Z.ContactDetails)},SUBMIT:{target:"#".concat(Z.InsuranceDetailsReview),actions:"updateFormData"}}}}},[Z.InsuranceDetailsReview]:{id:Z.InsuranceDetailsReview,initial:Z.Idle,states:{[Z.Idle]:{on:{SUBMIT:{actions:"updateFormData",target:Z.Submitting}}},[Z.Submitting]:{id:Z.Submitting,initial:Z.CheckEligibility,states:{[Z.CheckEligibility]:{id:Z.CheckEligibility,invoke:{src:(0,Y.Sx)(async e=>{let{input:t}=e,a={...t,insurance:V.w[N.fz.PequotHealthCare],benefitProgram:V.Nl[N.fz.PequotHealthCare]};return await (0,U.w)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:[{actions:(0,K.a)({eligibilityCheckMatchType:e=>{let{event:t}=e;return t.output.data.matchType}}),target:"#".concat(Z.CheckBenefits)}],onError:"#".concat(Z.InsuranceDetailsReview,".").concat(Z.Error)}},[Z.CheckBenefits]:{id:Z.CheckBenefits,invoke:{src:(0,Y.Sx)(async e=>{let{input:t}=e,a={...t,payerCode:V.dT[N.lk["Pequot HealthCare"]]};return await (0,M.R)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:[{actions:(0,K.a)({benefitsCheck:e=>{let{event:t}=e;return t.output.data}}),target:"#".concat(Z.DetermineContactOrLead)}],onError:"#".concat(Z.DetermineContactOrLead)}},[Z.DetermineContactOrLead]:{id:Z.DetermineContactOrLead,always:[{guard:"isApplicationReviewRequired",target:Z.CreateLead},{target:Z.CreateContact}]},[Z.CreateContact]:{id:Z.CreateContact,invoke:{src:(0,Y.Sx)(async e=>{let{input:t}=e,a={...t.formData,...t.formData.insuranceMemberID&&{employmentVerificationCode:t.formData.insuranceMemberID},...t.benefitsCheck&&{benefitsCheck:t.benefitsCheck},eligibilityVerifiedBy:N.h9.Evolve,company:ee,insurance:V.Ft[N.fz.PequotHealthCare],evolveOrganization:N.PM["Pequot Tribal Family Health Plan"],accountId:V.f3[N.fz.PequotHealthCare]};return await (0,k.vY)(a)}),input:e=>{let{context:t}=e;return t},onDone:{actions:"assignContactData",target:"#".concat(Z.EmailVerification)},onError:[{guard:"isApplicationDetected",target:"#".concat(Z.ApplicationDetected)},{target:"#".concat(Z.InsuranceDetailsReview,".").concat(Z.Error)}]}},[Z.CreateLead]:{id:Z.CreateLead,invoke:{src:(0,Y.Sx)(async e=>{let{input:t}=e,a={...t.formData,...t.formData.insuranceMemberID&&{employmentVerificationCode:t.formData.insuranceMemberID},...t.benefitsCheck&&{benefitsCheck:t.benefitsCheck},eligibilityVerifiedBy:N.h9.Evolve,company:ee,insurance:V.Ft[N.fz.PequotHealthCare],evolveOrganization:N.PM["Pequot Tribal Family Health Plan"],leadStatus:J(t.eligibilityCheckMatchType),automateEvolveEnrollment:Q(t.eligibilityCheckMatchType)};return await (0,F.t)(a)}),input:e=>{let{context:t}=e;return t},onDone:[{guard:"isApplicationReviewRequired",target:"#".concat(Z.ApplicationReview)},{target:"#".concat(Z.ApplicationComplete)}],onError:[{guard:"isApplicationDetected",target:"#".concat(Z.ApplicationDetected)},{target:"#".concat(Z.InsuranceDetailsReview,".").concat(Z.Error)}]}}}},[Z.Error]:{id:"".concat(Z.InsuranceDetailsReview,".").concat(Z.Error),on:{SUBMIT:{actions:["updateFormData","resetBenefitsCheck"],target:Z.Submitting}}}}},[Z.EmailVerification]:{id:Z.EmailVerification,initial:Z.Idle,states:{[Z.Idle]:{id:"".concat(Z.EmailVerification,".").concat(Z.Idle),on:{SUBMIT:{actions:"assignOtpCode",target:Z.Submitting},RESEND_EMAIL_VERIFICATION:{target:Z.Idle,reenter:!0},UPDATE_EMAIL:{target:Z.UpdateEmail}},invoke:{input:e=>{var t;let{context:a,event:i}=e;return{email:a.formData.email,firstName:a.formData.firstName,onSuccess:null==i||null==(t=i.data)?void 0:t.onSuccess}},src:(0,Y.Sx)(async e=>{let{input:t}=e,a={email:t.email,firstName:t.firstName};return{token:(await (0,A.v)(a)).data.token,onSuccess:t.onSuccess}}),onDone:{actions:[(0,K.a)({otpData:e=>{let{context:t,event:a}=e;return{...t.otpData,token:a.output.token}}}),e=>{var t;let{event:a}=e;(null==a||null==(t=a.output)?void 0:t.onSuccess)&&a.output.onSuccess()}]},onError:Z.Error}},[Z.Submitting]:{invoke:{src:(0,Y.Sx)(async e=>{let{input:t}=e,a={email:t.formData.email,token:t.otpData.token,otp:t.otpData.otp};return await (0,R.R)(a)}),input:e=>{let{context:t}=e;return t},onDone:"#".concat(Z.OnboardingChecklist),onError:Z.Error}},[Z.Error]:{on:{SUBMIT:{actions:"assignOtpCode",target:Z.Submitting},RESEND_EMAIL_VERIFICATION:{target:Z.Idle},UPDATE_EMAIL:{target:Z.UpdateEmail}}},[Z.UpdateEmail]:{initial:Z.Idle,states:{[Z.Idle]:{invoke:{input:e=>{let{context:t,event:a}=e;return{contactId:t.contactData.contactId,email:a.data.email,onSuccess:a.data.onSuccess}},src:(0,Y.Sx)(async e=>{let{input:t}=e,a={contactId:t.contactId,email:t.email};return await (0,k.CI)(a),{email:t.email,onSuccess:t.onSuccess}}),onDone:{actions:["assignNewEmail",e=>{var t;let{event:a}=e;(null==a||null==(t=a.output)?void 0:t.onSuccess)&&a.output.onSuccess()}],target:"#".concat(Z.EmailVerification,".").concat(Z.Idle)},onError:Z.Error}},[Z.Error]:{on:{SUBMIT:{target:"#".concat(Z.EmailVerification,".").concat(Z.Idle)},RESEND_EMAIL_VERIFICATION:{target:"#".concat(Z.EmailVerification,".").concat(Z.Idle)},UPDATE_EMAIL:{target:Z.Idle}}}}}}},[Z.ReviewConsents]:{id:Z.ReviewConsents,initial:Z.FetchConsents,states:{[Z.Idle]:{on:{SUBMIT:{actions:["assignUserConsentStatus"],target:Z.Submitting}}},[Z.FetchConsents]:{invoke:{src:(0,Y.Sx)(async()=>await (0,T.i)()),onDone:{actions:"assignConsents",target:Z.Idle},onError:Z.Error}},[Z.Submitting]:{invoke:{src:(0,Y.Sx)(async e=>{let{input:t}=e,a={patientIdentifier:t.contactData.contactId,firstName:t.formData.firstName,lastName:t.formData.lastName,phone:t.formData.phone,email:t.formData.email,birthDate:t.formData.birthdate,state:t.formData.state,heightInInch:t.formData.heightInInch,heightInFeet:t.formData.heightInFoot,currentWeightInPounds:t.formData.currentWeightInPounds,evolveOrganization:N.PM["Pequot Tribal Family Health Plan"],consents:t.consentsData.userConsentStatus};return await (0,B.Y)(a)}),input:e=>{let{context:t}=e;return t},onDone:[{actions:"assignFlyteUserData",target:Z.UpdateContact}],onError:"#".concat(Z.OnboardingUserError)}},[Z.UpdateContact]:{invoke:{src:(0,Y.Sx)(async e=>{let{input:t}=e,a={contactId:t.contactData.contactId,evolvePatientID:t.flyteUserData.patientId};return await (0,k.CI)(a)}),input:e=>{let{context:t}=e;return t},onDone:[{guard:"isAthenaRecordCreated",target:"#".concat(Z.CreatePassword)},{target:"#".concat(Z.OnboardingUserError)}],onError:"#".concat(Z.OnboardingUserError)}},[Z.Error]:{on:{SUBMIT:{actions:["assignUserConsentStatus"],target:Z.Submitting}}}}},[Z.CreatePassword]:{id:Z.CreatePassword,initial:Z.Idle,states:{[Z.Idle]:{on:{SUBMIT:{actions:"assignPasswordData",target:Z.Submitting}}},[Z.Submitting]:{invoke:{src:(0,Y.Sx)(async e=>{let{input:t}=e,a={email:t.formData.email,password:t.passwordData.password,confirmPassword:t.passwordData.confirmPassword};return await (0,j.I)(t.flyteUserData.verifyToken,a)}),input:e=>{let{context:t}=e;return t},onDone:"#".concat(Z.RequestLabs),onError:{target:Z.Error,actions:"assignError"}}},[Z.Error]:{on:{SUBMIT:{actions:["resetError","assignPasswordData"],target:Z.Submitting}}}}},[Z.RequestLabs]:{id:Z.RequestLabs,on:{PROCEED_TO_SUBMIT_LABS:"#".concat(Z.SubmitLabs),LAB_REQUESTED:{target:"#".concat(Z.AppDownload),actions:"assignLabLocation"},SUBMIT_LABS_LATER:{actions:"assignLabsSkipped",target:"#".concat(Z.AppDownload)}}},[Z.SubmitLabs]:{id:Z.SubmitLabs,on:{GO_BACK_TO_REQUEST_LABS:"#".concat(Z.RequestLabs),LAB_SUBMITTED:{actions:"registerLabsUploaded",target:"#".concat(Z.AppDownload)},SUBMIT_LABS_LATER:{actions:"assignLabsSkipped",target:"#".concat(Z.AppDownload)}}},[Z.OnboardingChecklist]:{id:Z.OnboardingChecklist,on:{SUBMIT:{target:"#".concat(Z.ReviewConsents)}}},[Z.AppDownload]:{id:Z.AppDownload},[Z.ApplicationReview]:{id:Z.ApplicationReview},[Z.OnboardingUserError]:{id:Z.OnboardingUserError},[Z.ApplicationComplete]:{id:Z.ApplicationComplete},[Z.ApplicationDetected]:{id:Z.ApplicationDetected},[Z.EligibilityUnmet]:{id:Z.EligibilityUnmet,initial:Z.Idle,states:{[Z.Idle]:{on:{SUBMIT:{target:Z.Submitting,actions:"updateFormData"}}},[Z.Submitting]:{invoke:{src:(0,Y.Sx)(async e=>{let{input:t}=e,a={...t,company:ee,leadStatus:N.XN.Ineligible,ineligibilityReason:N.hT.BMI,automateEvolveEnrollment:!1};return await (0,F.t)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:Z.Success,onError:Z.Error}},[Z.Success]:{},[Z.Error]:{on:{SUBMIT:{actions:"updateFormData",target:Z.Submitting}}}}}},on:{RESET:{target:"#".concat(Z.PreEligibility),actions:"reset"}}});var er=a(69443);let en={[S.C.PreEligibility]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-primary",children:"Let's make sure you're eligible for the FlyteHealth program."}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"To be eligible for the FlyteHealth program through your Pequot HealthCare benefits, you must meet specific age and Body Mass Index (BMI)* requirements."})]}),bmiEnrollmentDisclaimer:(0,i.jsx)(r.Text,{variant:"text-body-meta-regular",color:"text-secondary",children:"*We acknowledge that Body Mass Index (BMI) is an imperfect way to screen for excess weight. FlyteHealth providers do not use BMI alone as a measure of overall health. Instead, BMI is used as a data point to see if someone is eligible to join the FlyteHealth program. Once someone joins the program, we'll ask each person more about their health to create a personalized treatment plan."})},[S.C.EligibilityUnmet]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-secondary-negative",children:"Unfortunately, you are not eligible to join FlyteHealth at this time."}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"The FlyteHealth program requires a minimum BMI of 27+ (plus one or more weight-related health conditions) or a BMI of 30+."})]})},[S.C.ContactDetails]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-secondary-negative",children:"Congratulations! You're eligible for the FlyteHealth program"}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"To help us match your information with your employer, tell us about yourself. Next, we'll ask about your Pequot Healthcare membership. Be sure to have your insurance card handy."})]})},[S.C.InsuranceDetails]:{title:(0,i.jsxs)(r.Text,{variant:"text-header-2XL",color:"text-secondary-negative",children:["One more thing:"," ",(0,i.jsx)(r.Text,{as:"span",variant:"text-header-2XL",color:"text-primary",children:"What's your Pequot HealthCare membership number?"})]})},[S.C.InsuranceDetailsReview]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{children:"Let's review: Is your info correct?"}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"Please double-check the information you provided to make sure everything is correct."})]})},[S.C.ApplicationComplete]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-secondary-negative",children:"Welcome aboard! We're so excited you're here."}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"Next, we need to confirm your email. Click the link we sent to:"})]}),description:(0,i.jsx)(r.Text,{mt:"spacer-8",color:"text-secondary",variant:"text-body-regular",children:"Can’t find the email? Make sure to check your Spam folder."})},[S.C.ApplicationReview]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-primary",children:"You're almost finished!"}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"We've received your application, but we need a little more information from you to move forward. Please call us to complete the application process."})]})},[S.C.ApplicationDetected]:{title:(0,i.jsx)(r.Text,{variant:"text-header-2XL",color:"text-primary",children:"We found an existing account for:"}),description:(0,i.jsx)(r.Text,{variant:"text-body-display-S",color:"text-secondary",children:"It looks like you already have an account with us. To continue or update your registration details, please contact our Care Coordinator team."})},[S.C.EmailVerification]:er.M[S.C.EmailVerification],[S.C.OnboardingChecklist]:er.M[S.C.OnboardingChecklist],[S.C.CreatePassword]:er.M[S.C.CreatePassword],[S.C.AppDownload]:er.M[S.C.AppDownload],[S.C.ReviewConsents]:er.M[S.C.ReviewConsents]};var eo=a(82393);let es=[E.UX.BenefitsWebsite,E.UX.ProviderReferral,E.UX.WordOfMouth,E.UX.Other],el={[S.C.ContactDetails]:{state:{options:eo.rI},howDidYouFindUs:{options:es}},[S.C.InsuranceDetails]:{insuranceMemberID:{}},[S.C.InsuranceDetailsReview]:{insuranceMemberID:{}}},ec=E.fz.PequotHealthCare,ed=e=>{let{render:t}=e,[a,j]=(0,P.zl)(ei),A=(0,L.useMemo)(()=>(0,w.r)(a.value),[a.value]);(0,I.t)(A,ec);let R=(0,L.useCallback)(e=>{j({type:"SUBMIT",data:e})},[j]),M=(0,L.useCallback)(()=>{j({type:"BACK"})},[j]),T=(0,L.useCallback)(()=>{var e,t;switch(A){case Z.PreEligibility:return(0,i.jsx)(f.P,{configuration:{contentResources:en[S.C.PreEligibility]},onSubmit:R});case Z.ContactDetails:return(0,i.jsx)(u.x,{configuration:{contentResources:en[S.C.ContactDetails],fields:el[S.C.ContactDetails]},onSubmit:R,defaultValues:a.context.formData});case Z.EligibilityUnmet:return(0,i.jsx)(g.B,{configuration:{contentResources:en[S.C.EligibilityUnmet]},onSubmit:R,loading:a.matches({[Z.EligibilityUnmet]:Z.Submitting}),isEmailSent:a.matches({[Z.EligibilityUnmet]:Z.Success}),hasError:a.matches({[Z.EligibilityUnmet]:Z.Error})});case Z.InsuranceDetails:return(0,i.jsx)(h.d,{configuration:{contentResources:en[S.C.InsuranceDetails],fields:el[S.C.InsuranceDetails]},onSubmit:R,onBack:M});case Z.InsuranceDetailsReview:return(0,i.jsx)(b.h,{configuration:{contentResources:en[S.C.InsuranceDetailsReview],fields:el[S.C.InsuranceDetailsReview]},onSubmit:R,loading:a.matches({[Z.InsuranceDetailsReview]:Z.Submitting}),hasError:a.matches({[Z.InsuranceDetailsReview]:Z.Error}),defaultValues:a.context.formData});case Z.ApplicationComplete:return(0,i.jsx)(o.Q,{...en[S.C.ApplicationComplete],email:a.context.formData.email});case Z.ApplicationReview:return(0,i.jsx)(l.l,{...en[S.C.ApplicationReview]});case Z.ApplicationDetected:return(0,i.jsx)(s.r,{...en[S.C.ApplicationDetected],email:a.context.formData.email});case Z.EmailVerification:return(0,i.jsx)(p.e,{configuration:{contentResources:{title:en[S.C.EmailVerification](a.context.formData.email).title}},email:a.context.formData.email,hasError:a.matches({[Z.EmailVerification]:Z.Error}),loading:a.matches({[Z.EmailVerification]:Z.Submitting}),isUpdateEmailLoading:a.matches({[Z.EmailVerification]:{[Z.UpdateEmail]:Z.Idle}}),hasUpdateEmailError:a.matches({[Z.EmailVerification]:{[Z.UpdateEmail]:Z.Error}}),onSubmit:R,onResendCode:e=>j({type:"RESEND_EMAIL_VERIFICATION",data:{onSuccess:e}}),onEditEmail:(e,t)=>j({type:"UPDATE_EMAIL",data:{email:e,onSuccess:t}})});case Z.OnboardingChecklist:return(0,i.jsx)(C.E,{showLabs:!0,configuration:{contentResources:en[S.C.OnboardingChecklist]},onSubmit:R});case Z.ReviewConsents:return(0,i.jsx)(D.U,{configuration:{contentResources:en[S.C.ReviewConsents]},consents:a.context.consentsData.items,hasError:a.matches({[Z.ReviewConsents]:Z.Error}),loading:a.matches({[Z.ReviewConsents]:Z.FetchConsents})||a.matches({[Z.ReviewConsents]:Z.Submitting})||a.matches({[Z.ReviewConsents]:Z.UpdateContact}),onSubmit:R});case Z.CreatePassword:return(0,i.jsx)(m.i,{configuration:{contentResources:en[S.C.CreatePassword]},loading:a.matches({[Z.CreatePassword]:Z.Submitting}),error:a.context.error,onSubmit:R});case Z.AppDownload:return(0,i.jsx)(n.a,{title:"SUBMIT_LATER"===a.context.labs?en[S.C.AppDownload].titleLabSkipped:"LABS_UPLOADED"===a.context.labs?en[S.C.AppDownload].titleLabSubmitted:en[S.C.AppDownload].titleLabRequested,checklist:en[S.C.AppDownload].checklist});case Z.OnboardingUserError:return(0,i.jsx)(x.C,{});case Z.RequestLabs:return(0,i.jsx)(y.I,{organizationName:"Pequot Tribal Family Health Plan",patientId:null==(e=a.context.flyteUserData)?void 0:e.patientId,onProceedToSubmitLabs:()=>j({type:"PROCEED_TO_SUBMIT_LABS"}),onLabRequested:e=>j({type:"LAB_REQUESTED",data:{lab:e}}),formData:a.context.formData});case Z.SubmitLabs:return(0,i.jsx)(v.x,{onGoBackToRequestLabs:()=>j({type:"GO_BACK_TO_REQUEST_LABS"}),onSubmitLabsLater:()=>j({type:"SUBMIT_LABS_LATER"}),onLabSubmitted:()=>j({type:"LAB_SUBMITTED"}),patientId:null==(t=a.context.flyteUserData)?void 0:t.patientId,diabetes:"yes"===a.context.formData.diabetes,bariatric:"yes"===a.context.formData.bariatricSurgery});default:return null}},[A,a]);return t({header:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.Flex,{gap:"spacer-5",alignItems:"center",children:[(0,i.jsx)(c.E,{partner:E.fz.Flyte}),(0,i.jsx)(r.Divider,{orientation:"vertical",alignSelf:"stretch",height:"auto"}),(0,i.jsx)(c.E,{partner:ec})]}),(0,i.jsx)(d.nV,{currentStep:A})]}),body:T(),currentWorkFlowStep:A})}},46884:(e,t,a)=>{a.d(t,{j:()=>Y});var i=a(37876),r=a(37477),n=a(91366),o=a(48934),s=a(14901),l=a(16741),c=a(533),d=a(6770),u=a(63583),m=a(30435),g=a(42037),p=a(86535),h=a(93511),b=a(34305),C=a(80072),x=a(97793),f=a(66885),y=a(62227),D=a(14232),v=a(20411),I=a(39648),E=a(47353),S=a(83928),w=a(33841),P=a(86687),L=a(89225),j=a(68792),A=a(65159),R=a(45352),M=a(39777),T=a(63826);let k=e=>e===T.w.FULL_MATCH||e===T.w.ELIGIBLE_MATCH,U=e=>{switch(e){case T.w.PERSON_MATCH:case T.w.INSURANCE_MATCH:case T.w.EXPIRED:case T.w.NOT_FOUND:return b.XN.EligibleWaiting;case T.w.FULL_MATCH:case T.w.ELIGIBLE_MATCH:default:return}};var B=function(e){return e.CheckEligibility="checkEligibility",e.CreateLead="createLead",e.CheckBenefits="checkBenefits",e}(B||{});let F={...x.f,...B},O=L.Ek[w.fz.Aetna],N={formData:{birthdate:"",comorbidity:"",currentWeightInPounds:"",dateOfHighestWeightValue:"",email:"",firstName:"",heightInFoot:"",heightInInch:"",highestWeightInPounds:"",insuranceCoverage:void 0,insuranceMemberID:"",insurance:void 0,lastName:"",phone:"",state:void 0,termsAgreement:!1,howDidYouFindUS:"",comorbidities:[],diabetes:"",bariatricSurgery:""},eligibilityCheckMatchType:void 0,bmi:void 0,benefitsCheck:void 0},_=(0,A.mj)({types:{},guards:{isPreEligibilityMet:e=>{let{context:{formData:t,bmi:a}}=e;return j.J0.aetna({bmi:a,comorbidity:t.comorbidity,birthdate:t.birthdate})},isApplicationReviewRequired:e=>{let{context:{eligibilityCheckMatchType:t,formData:a}}=e;return!S.A.shouldBypassIsApplicationReviewRequired({email:a.email})&&[w.wY.EXPIRED,w.wY.INSURANCE_MATCH,w.wY.PERSON_MATCH,w.wY.NOT_FOUND].includes(t)},isApplicationDetected:P.L},actions:{updateFormData:(0,R.a)({formData:e=>{let{context:t,event:a}=e;return{...t.formData,...a.data}}}),assignBMI:(0,R.a)({bmi:e=>{let{context:t}=e,{heightInFoot:a,heightInInch:i,highestWeightInPounds:r}=t.formData;return(0,j.Hv)({heightFeet:(0,j.sC)(a),heightInches:(0,j.sC)(i),weightPounds:(0,j.sC)(r)})}}),reset:(0,R.a)({...N}),resetBenefitsCheck:(0,R.a)({benefitsCheck:void 0})}}).createMachine({context:()=>N,id:"aetnaMachine",initial:F.PreEligibility,states:{[F.PreEligibility]:{id:F.PreEligibility,initial:F.Idle,states:{[F.Idle]:{on:{SUBMIT:{target:F.Submitting,actions:"updateFormData"}}},[F.Submitting]:{entry:"assignBMI",always:[{target:"#".concat(F.ContactDetails),guard:"isPreEligibilityMet"},{target:"#".concat(F.EligibilityUnmet)}]}}},[F.ContactDetails]:{id:F.ContactDetails,initial:F.Idle,states:{[F.Idle]:{on:{SUBMIT:{target:"#".concat(F.InsuranceDetails),actions:"updateFormData"}}}}},[F.InsuranceDetails]:{id:F.InsuranceDetails,initial:F.Idle,states:{[F.Idle]:{on:{BACK:{target:"#".concat(F.ContactDetails)},SUBMIT:{target:"#".concat(F.InsuranceDetailsReview),actions:"updateFormData"}}}}},[F.InsuranceDetailsReview]:{id:F.InsuranceDetailsReview,initial:F.Idle,states:{[F.Idle]:{on:{SUBMIT:{actions:"updateFormData",target:F.Submitting}}},[F.Submitting]:{id:F.Submitting,initial:F.CheckEligibility,states:{[F.CheckEligibility]:{id:F.CheckEligibility,invoke:{src:(0,M.Sx)(async e=>{let{input:t}=e,a={...t,insurance:L.w[w.fz.Aetna],benefitProgram:L.Nl[w.fz.Aetna]};return await (0,I.w)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:[{actions:(0,R.a)({eligibilityCheckMatchType:e=>{let{event:t}=e;return t.output.data.matchType}}),target:"#".concat(F.CheckBenefits)}],onError:"#".concat(F.Error)}},[F.CheckBenefits]:{id:F.CheckBenefits,invoke:{src:(0,M.Sx)(async e=>{let{input:t}=e,a={...t,payerCode:L.dT[w.lk["Aetna Medicare"]]};return await (0,v.R)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:[{actions:(0,R.a)({benefitsCheck:e=>{let{event:t}=e;return t.output.data}}),target:"#".concat(F.CreateLead)}],onError:"#".concat(F.CreateLead)}},[F.CreateLead]:{id:F.CreateLead,invoke:{src:(0,M.Sx)(async e=>{let{input:t}=e,a={...t.formData,...t.formData.insuranceMemberID&&{employmentVerificationCode:t.formData.insuranceMemberID},...t.benefitsCheck&&{benefitsCheck:t.benefitsCheck},eligibilityVerifiedBy:w.h9.Evolve,company:O,insurance:L.Ft[w.fz.Aetna],evolveOrganization:w.PM["State of Connecticut Retirees"],leadStatus:U(t.eligibilityCheckMatchType),automateEvolveEnrollment:k(t.eligibilityCheckMatchType)};return await (0,E.t)(a)}),input:e=>{let{context:t}=e;return t},onDone:[{guard:"isApplicationReviewRequired",target:"#".concat(F.ApplicationReview)},{target:"#".concat(F.ApplicationComplete)}],onError:[{guard:"isApplicationDetected",target:"#".concat(F.ApplicationDetected)},{target:"#".concat(F.Error)}]}}}},[F.Error]:{id:F.Error,on:{SUBMIT:{actions:["updateFormData","resetBenefitsCheck"],target:F.Submitting}}}}},[F.ApplicationReview]:{id:F.ApplicationReview},[F.ApplicationComplete]:{id:F.ApplicationComplete},[F.ApplicationDetected]:{id:F.ApplicationDetected},[F.EligibilityUnmet]:{id:F.EligibilityUnmet,initial:F.Idle,states:{[F.Idle]:{on:{SUBMIT:{target:F.Submitting,actions:"updateFormData"}}},[F.Submitting]:{invoke:{src:(0,M.Sx)(async e=>{let{input:t}=e,a={...t,company:O,leadStatus:w.XN.Ineligible,ineligibilityReason:w.hT.BMI,automateEvolveEnrollment:!1};return await (0,E.t)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:F.Success,onError:F.Error}},[F.Success]:{},[F.Error]:{on:{SUBMIT:{target:F.Submitting}}}}}},on:{RESET:{target:"#".concat(F.PreEligibility),actions:"reset"}}});var H=a(69443);let X={[C.C.PreEligibility]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-primary",children:"Let's make sure you're eligible for the Flyte program."}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"To be eligible for the Flyte program through your Aetna Medicare Advantage benefits, you must meet specific age and Body Mass Index (BMI)* requirements."})]}),bmiEnrollmentDisclaimer:(0,i.jsx)(r.Text,{variant:"text-body-meta-regular",color:"text-secondary",children:"*We acknowledge that Body Mass Index (BMI) is an imperfect way to screen for excess weight. Flyte providers do not use BMI alone as a measure of overall health. Instead, BMI is used as a data point to see if someone is eligible to join the Flyte program. Once someone joins the program, we'll ask each person more about their health to create a personalized treatment plan."})},[C.C.EligibilityUnmet]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-secondary-negative",children:"Unfortunately, you are not eligible to join FlyteHealth at this time."}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"The Flyte program requires a minimum BMI of 27+ (plus one or more weight-related health conditions) or a BMI of 30+."})]})},[C.C.ContactDetails]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-secondary-negative",children:"Congratulations! You're eligible for the FlyteHealth program"}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"To help us match your information with your health plan, tell us about yourself. Next, we'll ask about your Aetna membership. Be sure to have your insurance card handy."})]})},[C.C.InsuranceDetails]:{title:(0,i.jsxs)(r.Text,{variant:"text-header-2XL",color:"text-secondary-negative",children:["One more thing:"," ",(0,i.jsx)(r.Text,{as:"span",variant:"text-header-2XL",color:"text-primary",children:"What's your Aetna membership number?"})]})},[C.C.InsuranceDetailsReview]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{children:"Let's review: Is your info correct?"}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"Please double-check the information you provided to make sure everything is correct."})]})},[C.C.ApplicationComplete]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-secondary-negative",children:"Welcome aboard! We're so excited you're here."}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"Next, we need to confirm your email. Click the link we sent to:"})]}),description:(0,i.jsx)(r.Text,{mt:"spacer-8",color:"text-secondary",variant:"text-body-regular",children:"Can’t find the email? Make sure to check your Spam folder."})},[C.C.ApplicationReview]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-primary",children:"You're almost finished!"}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"We've received your application, but we need a little more information from you to move forward. Please call us to complete the application process."})]})},[C.C.ApplicationDetected]:{title:(0,i.jsx)(r.Text,{variant:"text-header-2XL",color:"text-primary",children:"We found an existing account for:"}),description:(0,i.jsx)(r.Text,{variant:"text-body-display-S",color:"text-secondary",children:"It looks like you already have an account with us. To continue or update your registration details, please contact our Care Coordinator team."})},[C.C.OnboardingChecklist]:H.M[C.C.OnboardingChecklist],[C.C.CreatePassword]:H.M[C.C.CreatePassword],[C.C.AppDownload]:H.M[C.C.AppDownload],[C.C.ReviewConsents]:H.M[C.C.ReviewConsents]};var V=a(82393);let z=[b.UX.BenefitsWebsite,b.UX.ProviderReferral,b.UX.WordOfMouth,b.UX.Other],W={[C.C.ContactDetails]:{state:{options:V.rI},howDidYouFindUs:{options:z}},[C.C.InsuranceDetails]:{insuranceMemberID:{tooltip:(0,i.jsxs)(r.Box,{children:[(0,i.jsx)(r.Text,{variant:"text-body-meta-regular",color:"text-light",children:"Where to find my Membership ID Number:"}),(0,i.jsx)(r.Image,{width:"100%",height:"auto",src:"/static/assets/programs/aetna/aetna-insurance-card.png",alt:"Member ID guidance"})]})}},[C.C.InsuranceDetailsReview]:{insuranceMemberID:{}}},q=b.fz.Aetna,Y=e=>{let{render:t}=e,[a,v]=(0,y.zl)(_),I=(0,D.useMemo)(()=>(0,f.r)(a.value),[a.value]);(0,h.t)(I,q);let E=(0,D.useCallback)(e=>{v({type:"SUBMIT",data:e})},[v]),S=(0,D.useCallback)(()=>{v({type:"BACK"})},[v]),w=(0,D.useCallback)(()=>{switch(I){case x.f.PreEligibility:return(0,i.jsx)(p.P,{configuration:{contentResources:X[C.C.PreEligibility]},onSubmit:E});case x.f.ContactDetails:return(0,i.jsx)(d.x,{configuration:{contentResources:X[C.C.ContactDetails],fields:W[C.C.ContactDetails]},onSubmit:E,defaultValues:a.context.formData});case x.f.EligibilityUnmet:return(0,i.jsx)(u.B,{configuration:{contentResources:X[C.C.EligibilityUnmet]},onSubmit:E,loading:a.matches({[x.f.EligibilityUnmet]:x.f.Submitting}),isEmailSent:a.matches({[x.f.EligibilityUnmet]:x.f.Success}),hasError:a.matches({[x.f.EligibilityUnmet]:x.f.Error})});case x.f.InsuranceDetails:return(0,i.jsx)(m.d,{configuration:{contentResources:X[C.C.InsuranceDetails],fields:W[C.C.InsuranceDetails]},onSubmit:E,onBack:S});case x.f.InsuranceDetailsReview:return(0,i.jsx)(g.h,{configuration:{contentResources:X[C.C.InsuranceDetailsReview],fields:W[C.C.InsuranceDetailsReview]},onSubmit:E,loading:a.matches({[x.f.InsuranceDetailsReview]:x.f.Submitting}),hasError:a.matches({[x.f.InsuranceDetailsReview]:x.f.Error}),defaultValues:a.context.formData});case x.f.ApplicationComplete:return(0,i.jsx)(n.Q,{...X[C.C.ApplicationComplete],email:a.context.formData.email});case x.f.ApplicationDetected:return(0,i.jsx)(o.r,{...X[C.C.ApplicationDetected],email:a.context.formData.email});case x.f.ApplicationReview:return(0,i.jsx)(s.l,{...X[C.C.ApplicationReview]});default:return null}},[I,a]);return t({header:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.Flex,{gap:"spacer-5",alignItems:"center",children:[(0,i.jsx)(l.E,{partner:b.fz.Flyte}),(0,i.jsx)(r.Divider,{orientation:"vertical",alignSelf:"stretch",height:"auto"}),(0,i.jsx)(l.E,{partner:q})]}),(0,i.jsx)(c.f,{currentStep:I})]}),body:w(),currentWorkFlowStep:I})}},47811:(e,t,a)=>{a.d(t,{D:()=>ef});var i=a(37876),r=a(37477),n=a(59004),o=a(91366),s=a(48934),l=a(14901),c=a(16741),d=a(80075),u=a(6770),m=a(39946),g=a(53154),p=a(42037),h=a(70587),b=a(11427),C=a(86535),x=a(27297),f=a(43483),y=a(81488),D=a(93511),v=a(34305),I=a(80072),E=a(61415),S=a(66885),w=a(62227),P=a(14232),L=a(82393),j=a(45383),A=a(76692),R=a(19847),M=a(88992);let T="participantDepartmentorOrg",k=["Hebrew Home at Riverdale","RiverSpring Services Corp","RiverSpring Licensed Home Care Services Agency","RiverSpring Health Plans (ElderServe Health, Inc.)"],U=()=>{let{register:e,watch:t}=(0,M.xW)();return(0,i.jsxs)(r.Flex,{direction:"column",gap:"spacer-2",children:[(0,i.jsx)(r.Text,{as:"label",variant:"text-body-large-bold",color:"text-primary-negative",htmlFor:T,children:"Participating organization"}),(0,i.jsx)(r.Select,{"data-test":T,id:T,size:"l",variant:"flushed",placeholder:"Select organization",...e(T,{required:!0}),value:t(T),children:k.map(e=>(0,i.jsx)("option",{value:e,children:e},e))})]})};var B=a(58892);let F="evolveProgram";var O=function(e){return e.Guided="Guided",e.SelfGuided="Self-Guided",e}({});let N=()=>{let{register:e}=(0,M.xW)();return(0,i.jsxs)(r.Flex,{direction:"column",gap:"spacer-4",children:[(0,i.jsx)(r.Text,{as:"label",variant:"text-body-large-bold",color:"text-primary-negative",children:"Program selection"}),(0,i.jsxs)(r.RadioGroup,{display:"flex",gap:"spacer-3",name:F,flexDirection:{base:"column",md:"row"},"data-test":F,children:[(0,i.jsx)(B.e,{value:"Guided",size:"m",name:F,...e(F,{required:!0}),children:"Physician-guided"}),(0,i.jsx)(B.e,{value:"Self-Guided",size:"m",...e(F),name:F,children:"Self-guided"})]})]})},_=e=>{let{configuration:t,loading:a=!1,onSubmit:n,onBack:o}=e,{contentResources:s,fields:l}=t,c=(0,M.mN)({mode:"onBlur",defaultValues:{insuranceMemberID:"",insurance:void 0,evolveProgram:void 0}}),d=(0,R.a)(),u=()=>(0,i.jsxs)(r.Flex,{gap:{base:"spacer-8",md:"spacer-16"},alignItems:"center",flex:{base:1,lg:"unset"},children:[(0,i.jsx)(r.Button,{size:{base:"m",lg:"l"},isLoading:a,variant:"link","aria-label":"Back",leadingIcon:(0,i.jsx)(r.IconArrowLeft,{}),onClick:o,children:"Back"}),(0,i.jsx)(r.Button,{type:"submit",size:{base:"m",lg:"l"},isDisabled:!c.formState.isValid,flex:1,isLoading:a,trailingIcon:(0,i.jsx)(r.IconArrowRight,{}),"aria-label":"Continue",children:"Continue"})]});return(0,i.jsx)(M.Op,{...c,children:(0,i.jsxs)(j.X,{as:"form",onSubmit:c.handleSubmit(n),noValidate:!0,children:[(0,i.jsx)(j.X.Side,{gap:0,flex:{base:"none",lg:1},children:s.title}),(0,i.jsxs)(j.X.Form,{children:[(null==l?void 0:l.evolveProgram)&&(0,i.jsx)(N,{}),(0,i.jsx)(U,{}),(null==l?void 0:l.insurance)&&(0,i.jsx)(A._8,{isDisabled:a,isRequired:!0,...null==l?void 0:l.insurance}),(0,i.jsx)(A.kV,{isDisabled:a,isRequired:!0,pb:{base:"spacer-24",lg:0},...null==l?void 0:l.insuranceMemberID}),d?(0,i.jsx)(L.cI,{children:u()}):u()]})]})})};var H=a(11969),X=a(10758),V=a(85007),z=a(20411),W=a(31346),q=a(38360),Y=a(77944),K=a(47353),G=a(83928),Q=a(33841),J=a(13751),$=a(92323),Z=a(86687),ee=a(89225),et=a(97793),ea=a(65159),ei=a(45352),er=a(39777);let en={Guided:v.PM["RiverSpring Living - Guided"],"Self-Guided":v.PM["RiverSpring Living - Self Guided"]},eo=(e,t,a)=>{if(a===v.PM["RiverSpring Living - Self Guided"])return!0;switch(e){case v.lk["1199SEIU"]:return!0;case v.lk.Aetna:return[v.yj["New York"],v.yj["New Jersey"],v.yj.Connecticut].includes(t);default:return!1}},es=(e,t,a)=>{if(!eo(e,t,a))return v.XN.EligibleWaiting};var el=function(e){return e.CreateLead="createLead",e.CreateContact="createContact",e.UpdateContact="updateContact",e.CheckBenefits="checkBenefits",e.DetermineContactOrLead="determineContactOrLead",e.FetchConsents="fetchConsents",e.UpdateEmail="updateEmail",e}(el||{});let ec={...et.f,...el},ed=ee.Ek[Q.fz.RiverSpringLiving],eu={formData:{birthdate:"",comorbidity:"",currentWeightInPounds:"",dateOfHighestWeightValue:"",email:"",firstName:"",heightInFoot:"",heightInInch:"",highestWeightInPounds:"",insuranceCoverage:void 0,insuranceMemberID:"",insurance:void 0,lastName:"",phone:"",state:void 0,termsAgreement:!1,howDidYouFindUS:"",participantDepartmentorOrg:"",evolveProgram:void 0,comorbidities:[],diabetes:"",bariatricSurgery:""},evolveOrganization:void 0,bmi:void 0,benefitsCheck:void 0,otpData:void 0,consentsData:{items:[],userConsentStatus:[]},contactData:{},passwordData:{password:void 0,confirmPassword:void 0},flyteUserData:void 0,error:void 0,labs:void 0},em={...J.AU,...J.gQ,...J.pE,...J.UH,...J.yF,...J.n6,...J.uN,...J.yS,...J.RW,...J.i_,...(0,J.rS)(eu)},eg=(0,ea.mj)({types:{},guards:{isApplicationReviewRequired:e=>{let{context:{formData:t,evolveOrganization:a}}=e;return!G.A.shouldBypassIsApplicationReviewRequired({email:t.email})&&!eo(t.insurance,t.state,a)},isApplicationDetected:Z.L,isAthenaRecordCreated:$.z},actions:{...em,assignEvolveOrganization:(0,ei.a)({evolveOrganization:e=>{let{context:t}=e;return en[t.formData.evolveProgram||O.SelfGuided]}})}}).createMachine({context:()=>eu,id:"riverspringMachine",initial:ec.PreEligibility,states:{[ec.PreEligibility]:{id:ec.PreEligibility,initial:ec.Idle,states:{[ec.Idle]:{on:{SUBMIT:{target:ec.Submitting,actions:"updateFormData"}}},[ec.Submitting]:{entry:["assignBMI"],always:"#".concat(ec.ContactDetails)}}},[ec.ContactDetails]:{id:ec.ContactDetails,initial:ec.Idle,states:{[ec.Idle]:{on:{SUBMIT:{target:"#".concat(ec.InsuranceDetails),actions:"updateFormData"}}}}},[ec.InsuranceDetails]:{id:ec.InsuranceDetails,initial:ec.Idle,states:{[ec.Idle]:{on:{BACK:{target:"#".concat(ec.ContactDetails)},SUBMIT:{target:"#".concat(ec.InsuranceDetailsReview),actions:["updateFormData","assignEvolveOrganization"]}}}}},[ec.InsuranceDetailsReview]:{id:ec.InsuranceDetailsReview,initial:ec.Idle,states:{[ec.Idle]:{on:{SUBMIT:{actions:"updateFormData",target:ec.Submitting}}},[ec.Submitting]:{initial:ec.CheckBenefits,states:{[ec.CheckBenefits]:{id:ec.CheckBenefits,invoke:{src:(0,er.Sx)(async e=>{let{input:t}=e,a={...t,payerCode:ee.dT[t.insurance]};return await (0,z.R)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:[{actions:(0,ei.a)({benefitsCheck:e=>{let{event:t}=e;return t.output.data}}),target:"#".concat(ec.DetermineContactOrLead)}],onError:"#".concat(ec.DetermineContactOrLead)}},[ec.DetermineContactOrLead]:{id:ec.DetermineContactOrLead,always:[{guard:"isApplicationReviewRequired",target:ec.CreateLead},{target:ec.CreateContact}]},[ec.CreateLead]:{id:ec.CreateLead,invoke:{src:(0,er.Sx)(async e=>{let{input:t}=e,a={...t.formData,evolveOrganization:t.evolveOrganization,...t.formData.insuranceMemberID&&{employmentVerificationCode:t.formData.insuranceMemberID},...t.benefitsCheck&&{benefitsCheck:t.benefitsCheck},company:ed,leadStatus:es(t.formData.insurance,t.formData.state,t.evolveOrganization),automateEvolveEnrollment:eo(t.formData.insurance,t.formData.state,t.evolveOrganization),evolveProgram:t.formData.evolveProgram||O.SelfGuided};return await (0,K.t)(a)}),input:e=>{let{context:t}=e;return t},onDone:[{guard:"isApplicationReviewRequired",target:"#".concat(ec.ApplicationReview)},{target:"#".concat(ec.ApplicationComplete)}],onError:[{guard:"isApplicationDetected",target:"#".concat(ec.ApplicationDetected)},{target:"#".concat(ec.InsuranceDetailsReview,".").concat(ec.Error)}]}},[ec.CreateContact]:{id:ec.CreateContact,invoke:{src:(0,er.Sx)(async e=>{let{input:t}=e,a={...t.formData,evolveOrganization:t.evolveOrganization,...t.formData.insuranceMemberID&&{employmentVerificationCode:t.formData.insuranceMemberID},...t.benefitsCheck&&{benefitsCheck:t.benefitsCheck},company:ed,accountId:ee.f3[Q.fz.RiverSpringLiving],evolveProgram:t.formData.evolveProgram||O.SelfGuided,eligibilityVerifiedBy:Q.h9.Pverify};return await (0,q.vY)(a)}),input:e=>{let{context:t}=e;return t},onDone:{actions:"assignContactData",target:"#".concat(ec.EmailVerification)},onError:[{guard:"isApplicationDetected",target:"#".concat(ec.ApplicationDetected)},{target:"#".concat(ec.InsuranceDetailsReview,".").concat(ec.Error)}]}}}},[ec.Error]:{id:"".concat(ec.InsuranceDetailsReview,".").concat(ec.Error),on:{SUBMIT:{actions:["updateFormData","resetBenefitsCheck"],target:ec.Submitting}}}}},[ec.EmailVerification]:{id:ec.EmailVerification,initial:ec.Idle,states:{[ec.Idle]:{id:"".concat(ec.EmailVerification,".").concat(ec.Idle),on:{SUBMIT:{actions:"assignOtpCode",target:ec.Submitting},RESEND_EMAIL_VERIFICATION:{target:ec.Idle,reenter:!0},UPDATE_EMAIL:{target:ec.UpdateEmail}},invoke:{input:e=>{var t;let{context:a,event:i}=e;return{email:a.formData.email,firstName:a.formData.firstName,onSuccess:null==i||null==(t=i.data)?void 0:t.onSuccess}},src:(0,er.Sx)(async e=>{let{input:t}=e,a={email:t.email,firstName:t.firstName};return{token:(await (0,X.v)(a)).data.token,onSuccess:t.onSuccess}}),onDone:{actions:[(0,ei.a)({otpData:e=>{let{context:t,event:a}=e;return{...t.otpData,token:a.output.token}}}),e=>{var t;let{event:a}=e;(null==a||null==(t=a.output)?void 0:t.onSuccess)&&a.output.onSuccess()}]},onError:ec.Error}},[ec.Submitting]:{invoke:{src:(0,er.Sx)(async e=>{let{input:t}=e,a={email:t.formData.email,token:t.otpData.token,otp:t.otpData.otp};return await (0,V.R)(a)}),input:e=>{let{context:t}=e;return t},onDone:"#".concat(ec.OnboardingChecklist),onError:ec.Error}},[ec.Error]:{on:{SUBMIT:{actions:"assignOtpCode",target:ec.Submitting},RESEND_EMAIL_VERIFICATION:{target:ec.Idle},UPDATE_EMAIL:{target:ec.UpdateEmail}}},[ec.UpdateEmail]:{initial:ec.Idle,states:{[ec.Idle]:{invoke:{input:e=>{let{context:t,event:a}=e;return{contactId:t.contactData.contactId,email:a.data.email,onSuccess:a.data.onSuccess}},src:(0,er.Sx)(async e=>{let{input:t}=e,a={contactId:t.contactId,email:t.email};return await (0,q.CI)(a),{email:t.email,onSuccess:t.onSuccess}}),onDone:{actions:["assignNewEmail",e=>{var t;let{event:a}=e;(null==a||null==(t=a.output)?void 0:t.onSuccess)&&a.output.onSuccess()}],target:"#".concat(ec.EmailVerification,".").concat(ec.Idle)},onError:ec.Error}},[ec.Error]:{on:{SUBMIT:{target:"#".concat(ec.EmailVerification,".").concat(ec.Idle)},RESEND_EMAIL_VERIFICATION:{target:"#".concat(ec.EmailVerification,".").concat(ec.Idle)},UPDATE_EMAIL:{target:ec.Idle}}}}}}},[ec.ReviewConsents]:{id:ec.ReviewConsents,initial:ec.FetchConsents,states:{[ec.Idle]:{on:{SUBMIT:{actions:["assignUserConsentStatus"],target:ec.Submitting}}},[ec.FetchConsents]:{invoke:{src:(0,er.Sx)(async()=>await (0,W.i)()),onDone:{actions:"assignConsents",target:ec.Idle},onError:ec.Error}},[ec.Submitting]:{invoke:{src:(0,er.Sx)(async e=>{let{input:t}=e,a={patientIdentifier:t.contactData.contactId,firstName:t.formData.firstName,lastName:t.formData.lastName,phone:t.formData.phone,email:t.formData.email,birthDate:t.formData.birthdate,state:t.formData.state,heightInInch:t.formData.heightInInch,heightInFeet:t.formData.heightInFoot,currentWeightInPounds:t.formData.currentWeightInPounds,evolveOrganization:t.evolveOrganization,consents:t.consentsData.userConsentStatus};return await (0,Y.Y)(a)}),input:e=>{let{context:t}=e;return t},onDone:[{actions:"assignFlyteUserData",target:ec.UpdateContact}],onError:"#".concat(ec.OnboardingUserError)}},[ec.UpdateContact]:{invoke:{src:(0,er.Sx)(async e=>{let{input:t}=e,a={contactId:t.contactData.contactId,evolvePatientID:t.flyteUserData.patientId};return await (0,q.CI)(a)}),input:e=>{let{context:t}=e;return t},onDone:[{guard:"isAthenaRecordCreated",target:"#".concat(ec.CreatePassword)},{target:"#".concat(ec.OnboardingUserError)}],onError:"#".concat(ec.OnboardingUserError)}},[ec.Error]:{on:{SUBMIT:{actions:["assignUserConsentStatus"],target:ec.Submitting}}}}},[ec.CreatePassword]:{id:ec.CreatePassword,initial:ec.Idle,states:{[ec.Idle]:{on:{SUBMIT:{actions:"assignPasswordData",target:ec.Submitting}}},[ec.Submitting]:{invoke:{src:(0,er.Sx)(async e=>{let{input:t}=e,a={email:t.formData.email,password:t.passwordData.password,confirmPassword:t.passwordData.confirmPassword};return await (0,H.I)(t.flyteUserData.verifyToken,a)}),input:e=>{let{context:t}=e;return t},onDone:"#".concat(ec.RequestLabs),onError:{target:ec.Error,actions:"assignError"}}},[ec.Error]:{on:{SUBMIT:{actions:["resetError","assignPasswordData"],target:ec.Submitting}}}}},[ec.RequestLabs]:{id:ec.RequestLabs,on:{PROCEED_TO_SUBMIT_LABS:"#".concat(ec.SubmitLabs),LAB_REQUESTED:{target:"#".concat(ec.AppDownload),actions:"assignLabLocation"},SUBMIT_LABS_LATER:{actions:"assignLabsSkipped",target:"#".concat(ec.AppDownload)}}},[ec.SubmitLabs]:{id:ec.SubmitLabs,on:{GO_BACK_TO_REQUEST_LABS:"#".concat(ec.RequestLabs),LAB_SUBMITTED:{actions:"registerLabsUploaded",target:"#".concat(ec.AppDownload)},SUBMIT_LABS_LATER:{actions:"assignLabsSkipped",target:"#".concat(ec.AppDownload)}}},[ec.OnboardingChecklist]:{id:ec.OnboardingChecklist,on:{SUBMIT:{target:"#".concat(ec.ReviewConsents)}}},[ec.AppDownload]:{id:ec.AppDownload},[ec.ApplicationReview]:{id:ec.ApplicationReview},[ec.OnboardingUserError]:{id:ec.OnboardingUserError},[ec.ApplicationComplete]:{id:ec.ApplicationComplete},[ec.ApplicationDetected]:{id:ec.ApplicationDetected}},on:{RESET:{target:"#".concat(ec.PreEligibility),actions:"reset"}}});var ep=a(69443);let eh={[I.C.PreEligibility]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-primary",children:"Let's make sure you're eligible for the FlyteHealth program."}),(0,i.jsxs)(r.TextPairing.SubLabel,{color:"text-secondary",children:["All employees are eligible to access the"," ",(0,i.jsx)("b",{children:"Self-Guided"})," ","program through the RiverSpring Living benefits.",(0,i.jsx)("br",{}),"To be eligible for the"," ",(0,i.jsx)("b",{children:"Physician-Guided"})," ","program, you must meet specific age and Body Mass Index (BMI)* requirements."]})]}),bmiEnrollmentDisclaimer:(0,i.jsx)(r.Text,{variant:"text-body-meta-regular",color:"text-secondary",children:"*We acknowledge that Body Mass Index (BMI) is an imperfect way to screen for excess weight. FlyteHealth providers do not use BMI alone as a measure of overall health. Instead, BMI is used as a data point to see if someone is eligible to join the FlyteHealth program. Once someone joins the program, we'll ask each person more about their health to create a personalized treatment plan."})},[I.C.ContactDetails]:(e,t)=>({title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsxs)(r.TextPairing.Label,{color:"text-primary",children:[(0,i.jsxs)(r.Text,{display:{base:"inline",lg:"block"},as:"label",variant:"text-header-2XL",color:"text-secondary-negative",children:["Congratulations!"," "]}),"You're eligible for the"," ",E.J.riverSpringLiving({bmi:e,comorbidity:t})?"Physician":"Self","-Guided FlyteHealth program"]}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"To help us match your information with your employer, please tell us a bit more about yourself."})]})}),[I.C.InsuranceDetails]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsxs)(r.TextPairing.Label,{color:"text-secondary-negative",children:["Almost done:"," ",(0,i.jsx)(r.Text,{as:"span",variant:"text-header-2XL",color:"text-primary",children:"Select your program and let us know if you have health insurance"})]}),(0,i.jsxs)(r.TextPairing.SubLabel,{color:"text-secondary",children:["Before selecting your program, review summaries below."," ",(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),(0,i.jsx)("b",{children:"Physician-Guided:"})," ","Access to the entire FlyteHealth care team and our patient app.",(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),(0,i.jsx)("b",{children:"Self-Guided:"})," ","Access to the FlyteHealth patient app only."]})]})},[I.C.InsuranceDetailsReview]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{children:"Let's review: Is your info correct?"}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"Please double-check the information you provided to make sure everything is correct."})]})},[I.C.ApplicationComplete]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-secondary-negative",children:"Welcome aboard! We're so excited you're here."}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"Next, we need to confirm your email. Click the link we sent to:"})]}),description:(0,i.jsxs)(r.Text,{color:"text-secondary",mt:"spacer-8",variant:"text-body-meta-regular",children:["Please note that for Physician-Guided users, clinical encounters and prescription costs are covered by RiverSpring Living insurance (either Aetna or 1199SEIU), and out-of-pocket costs will vary based on your plan coverage, deductibles, co-pays, and limits. For more information, please contact the RiverSpring Living Benefits Department or your insurance company.",(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),"If you don't have RiverSpring Living insurance, FlyteHealth also accepts a number of other plans. Please check with a FlyteHealth Patient Coordinator about whether your insurance is accepted.",(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),"For Self-Guided users, there is no cost for RiverSpring Living employees."]})},[I.C.ApplicationReview]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-primary",children:"You're almost finished!"}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"We've received your application, but we need a little more information from you to move forward. Please call us to complete the application process."})]}),note:(0,i.jsxs)(r.Text,{color:"text-secondary",variant:"text-body-meta-regular",children:["Please note that for Guided users, clinical encounters and prescription costs are covered by RiverSpring Living insurance (either Aetna or 1199SEIU), and out-of-pocket costs will vary based on your plan coverage, deductibles, co-pays, and limits. For more information, please contact the RiverSpring Living Benefits Department or your insurance company."," ",(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),"If you don't have RiverSpring Living insurance, FlyteHealth also accepts a number of other plans. Please check with a FlyteHealth Patient Coordinator about whether your insurance is accepted."]})},[I.C.ApplicationDetected]:{title:(0,i.jsx)(r.Text,{variant:"text-header-2XL",color:"text-primary",children:"We found an existing account for:"}),description:(0,i.jsx)(r.Text,{variant:"text-body-display-S",color:"text-secondary",children:"It looks like you already have an account with us. To continue or update your registration details, please contact our Care Coordinator team."})},[I.C.EmailVerification]:ep.M[I.C.EmailVerification],[I.C.OnboardingChecklist]:ep.M[I.C.OnboardingChecklist],[I.C.CreatePassword]:ep.M[I.C.CreatePassword],[I.C.AppDownload]:ep.M[I.C.AppDownload],[I.C.ReviewConsents]:ep.M[I.C.ReviewConsents]},eb=[v.UX.BenefitsWebsite,v.UX.CoworkerReferral,v.UX.OnsiteMonitor,v.UX.Poster,v.UX.ProviderReferral,v.UX.WordOfMouth,v.UX.Other],eC={[I.C.ContactDetails]:{state:{options:L.rI},howDidYouFindUs:{options:eb}},[I.C.InsuranceDetails]:e=>({insurance:{insuranceCarriers:[v.lk.Aetna,v.lk["1199SEIU"]]},insuranceMemberID:{},evolveProgram:e?{}:void 0}),[I.C.InsuranceDetailsReview]:{insurance:{insuranceCarriers:[v.lk.Aetna,v.lk["1199SEIU"]]}}},ex=v.fz.RiverSpringLiving,ef=e=>{let{render:t}=e,[a,L]=(0,w.zl)(eg),j=(0,P.useMemo)(()=>(0,S.r)(a.value),[a.value]);(0,D.t)(j,ex);let A=(0,P.useCallback)(e=>{L({type:"SUBMIT",data:e})},[L]),R=(0,P.useCallback)(()=>{L({type:"BACK"})},[L]),M=(0,P.useCallback)(()=>{var e,t;switch(j){case ec.PreEligibility:return(0,i.jsx)(C.P,{configuration:{contentResources:eh[I.C.PreEligibility]},onSubmit:A});case ec.ContactDetails:return(0,i.jsx)(u.x,{configuration:{contentResources:eh[I.C.ContactDetails](a.context.bmi,a.context.formData.comorbidity),fields:eC[I.C.ContactDetails]},onSubmit:A,defaultValues:a.context.formData});case ec.InsuranceDetails:return(0,i.jsx)(_,{configuration:{contentResources:eh[I.C.InsuranceDetails],fields:eC[I.C.InsuranceDetails](E.J.riverSpringLiving({bmi:a.context.bmi}))},onSubmit:A,onBack:R});case ec.InsuranceDetailsReview:return(0,i.jsx)(p.h,{configuration:{contentResources:eh[I.C.InsuranceDetailsReview],fields:eC[I.C.InsuranceDetailsReview]},onSubmit:A,loading:a.matches({[ec.InsuranceDetailsReview]:ec.Submitting}),hasError:a.matches({[ec.InsuranceDetailsReview]:ec.Error}),defaultValues:a.context.formData});case ec.ApplicationComplete:return(0,i.jsx)(o.Q,{...eh[I.C.ApplicationComplete],email:a.context.formData.email});case ec.ApplicationReview:return(0,i.jsx)(l.l,{...eh[I.C.ApplicationReview]});case ec.ApplicationDetected:return(0,i.jsx)(s.r,{...eh[I.C.ApplicationDetected],email:a.context.formData.email});case ec.EmailVerification:return(0,i.jsx)(g.e,{configuration:{contentResources:{title:eh[I.C.EmailVerification](a.context.formData.email).title}},email:a.context.formData.email,hasError:a.matches({[ec.EmailVerification]:ec.Error}),loading:a.matches({[ec.EmailVerification]:ec.Submitting}),isUpdateEmailLoading:a.matches({[ec.EmailVerification]:{[ec.UpdateEmail]:ec.Idle}}),hasUpdateEmailError:a.matches({[ec.EmailVerification]:{[ec.UpdateEmail]:ec.Error}}),onSubmit:A,onResendCode:e=>L({type:"RESEND_EMAIL_VERIFICATION",data:{onSuccess:e}}),onEditEmail:(e,t)=>L({type:"UPDATE_EMAIL",data:{email:e,onSuccess:t}})});case ec.OnboardingChecklist:return(0,i.jsx)(h.E,{showLabs:!0,configuration:{contentResources:eh[I.C.OnboardingChecklist]},onSubmit:A});case ec.ReviewConsents:return(0,i.jsx)(f.U,{configuration:{contentResources:eh[I.C.ReviewConsents]},consents:a.context.consentsData.items,hasError:a.matches({[ec.ReviewConsents]:ec.Error}),loading:a.matches({[ec.ReviewConsents]:ec.FetchConsents})||a.matches({[ec.ReviewConsents]:ec.Submitting})||a.matches({[ec.ReviewConsents]:ec.UpdateContact}),onSubmit:A});case ec.CreatePassword:return(0,i.jsx)(m.i,{configuration:{contentResources:eh[I.C.CreatePassword]},loading:a.matches({[ec.CreatePassword]:ec.Submitting}),error:a.context.error,onSubmit:A});case ec.AppDownload:return(0,i.jsx)(n.a,{title:"SUBMIT_LATER"===a.context.labs?eh[I.C.AppDownload].titleLabSkipped:"LABS_UPLOADED"===a.context.labs?eh[I.C.AppDownload].titleLabSubmitted:eh[I.C.AppDownload].titleLabRequested,checklist:eh[I.C.AppDownload].checklist});case ec.OnboardingUserError:return(0,i.jsx)(b.C,{});case ec.RequestLabs:return(0,i.jsx)(x.I,{organizationName:a.context.evolveOrganization,patientId:null==(e=a.context.flyteUserData)?void 0:e.patientId,onProceedToSubmitLabs:()=>L({type:"PROCEED_TO_SUBMIT_LABS"}),onLabRequested:e=>L({type:"LAB_REQUESTED",data:{lab:e}}),formData:a.context.formData});case ec.SubmitLabs:return(0,i.jsx)(y.x,{onGoBackToRequestLabs:()=>L({type:"GO_BACK_TO_REQUEST_LABS"}),onSubmitLabsLater:()=>L({type:"SUBMIT_LABS_LATER"}),onLabSubmitted:()=>L({type:"LAB_SUBMITTED"}),patientId:null==(t=a.context.flyteUserData)?void 0:t.patientId,diabetes:"yes"===a.context.formData.diabetes,bariatric:"yes"===a.context.formData.bariatricSurgery});default:return null}},[j,a]);return t({header:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.Flex,{gap:"spacer-5",alignItems:"center",children:[(0,i.jsx)(c.E,{partner:v.fz.Flyte}),(0,i.jsx)(r.Divider,{orientation:"vertical",alignSelf:"stretch",height:"auto"}),(0,i.jsx)(c.E,{partner:ex})]}),(0,i.jsx)(d.nV,{currentStep:j})]}),body:M(),currentWorkFlowStep:j})}},53100:(e,t,a)=>{a.d(t,{z:()=>ec});var i=a(37876),r=a(37477),n=a(59004),o=a(91366),s=a(48934),l=a(14901),c=a(16741),d=a(80075),u=a(6770),m=a(39946),g=a(63583),p=a(53154),h=a(30435),b=a(42037),C=a(70587),x=a(11427),f=a(86535),y=a(27297),D=a(43483),v=a(81488),I=a(93511),E=a(34305),S=a(80072),w=a(66885),P=a(62227),L=a(14232),j=a(11969),A=a(10758),R=a(85007),M=a(20411),T=a(31346),k=a(38360),U=a(77944),B=a(47353),F=a(83928),O=a(33841),N=a(13751),_=a(92323),H=a(86687),X=a(89225),V=a(97793),z=a(68792),W=a(65159),q=a(39777),Y=a(45352);let K=e=>{let{groupNumber:t,status:a}=e;return["10556700","10556701","10556702","10556703","10556704","10556705","10556706","10556707","10556708","10556709","10556710","10556711","10556712","10556713","10556714","10556715","10556716","10556717","10556718","10556719","10556720","10556721","10556722","10556723","10556724","10556725","10556726","10556727","10556728"].includes(t)&&"Active"===a},G=e=>{let{groupNumber:t,status:a}=e;if(!K({groupNumber:t,status:a}))return E.XN.EligibleWaiting};var Q=function(e){return e.CreateLead="createLead",e.CreateContact="createContact",e.UpdateContact="updateContact",e.CheckBenefits="checkBenefits",e.DetermineBenefitsOrLead="determineBenefitsOrLead",e.DetermineContactOrLead="determineContactOrLead",e.FetchConsents="fetchConsents",e.UpdateEmail="updateEmail",e}(Q||{});let J={...V.f,...Q},$=X.Ek[O.fz.ChristianaCare],Z={formData:{birthdate:"",comorbidity:"",currentWeightInPounds:"",dateOfHighestWeightValue:"",email:"",firstName:"",heightInFoot:"",heightInInch:"",highestWeightInPounds:"",insuranceCoverage:void 0,insuranceMemberID:"",insurance:void 0,lastName:"",phone:"",state:void 0,termsAgreement:!1,howDidYouFindUS:"",comorbidities:[],diabetes:"",bariatricSurgery:""},bmi:void 0,benefitsCheck:void 0,otpData:void 0,consentsData:{items:[],userConsentStatus:[]},contactData:{},passwordData:{password:void 0,confirmPassword:void 0},flyteUserData:void 0,error:void 0,labs:void 0},ee={...N.AU,...N.gQ,...N.pE,...N.UH,...N.yF,...N.n6,...N.uN,...N.yS,...N.RW,...N.i_,...(0,N.rS)(Z)},et=(0,W.mj)({types:{},guards:{isPreEligibilityMet:e=>{let{context:{formData:t,bmi:a}}=e;return z.J0.christianaCare({bmi:a,comorbidity:t.comorbidity,birthdate:t.birthdate})},isApplicationReviewRequired:e=>{var t,a;let{context:{benefitsCheck:i,formData:r}}=e;return!F.A.shouldBypassIsApplicationReviewRequired({email:r.email})&&!K({groupNumber:null==i||null==(t=i.coverage)?void 0:t.groupNumber,status:null==i||null==(a=i.coverage)?void 0:a.status})},isApplicationDetected:H.L,isAthenaRecordCreated:_.z},actions:ee}).createMachine({context:()=>Z,id:"christianaCareMachine",initial:J.PreEligibility,states:{[J.PreEligibility]:{id:J.PreEligibility,initial:J.Idle,states:{[J.Idle]:{on:{SUBMIT:{target:J.Submitting,actions:"updateFormData"}}},[J.Submitting]:{entry:"assignBMI",always:[{target:"#".concat(J.ContactDetails),guard:"isPreEligibilityMet"},{target:"#".concat(J.EligibilityUnmet)}]}}},[J.ContactDetails]:{id:J.ContactDetails,initial:J.Idle,states:{[J.Idle]:{on:{SUBMIT:{target:"#".concat(J.InsuranceDetails),actions:"updateFormData"}}}}},[J.InsuranceDetails]:{id:J.InsuranceDetails,initial:J.Idle,states:{[J.Idle]:{on:{BACK:{target:"#".concat(J.ContactDetails)},SUBMIT:{target:"#".concat(J.InsuranceDetailsReview),actions:"updateFormData"}}}}},[J.InsuranceDetailsReview]:{id:J.InsuranceDetailsReview,initial:J.Idle,states:{[J.Idle]:{on:{SUBMIT:{actions:"updateFormData",target:J.Submitting}}},[J.Submitting]:{id:J.Submitting,initial:J.CheckBenefits,states:{[J.CheckBenefits]:{id:J.CheckBenefits,invoke:{src:(0,q.Sx)(async e=>{let{input:t}=e,a={...t,payerCode:X.dT[O.lk.Highmark]};return await (0,M.R)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:[{actions:(0,Y.a)({benefitsCheck:e=>{let{event:t}=e;return t.output.data}}),target:"#".concat(J.DetermineContactOrLead)}],onError:"#".concat(J.DetermineContactOrLead)}},[J.DetermineContactOrLead]:{id:J.DetermineContactOrLead,always:[{guard:"isApplicationReviewRequired",target:J.CreateLead},{target:J.CreateContact}]},[J.CreateContact]:{id:J.CreateContact,invoke:{src:(0,q.Sx)(async e=>{let{input:t}=e,a={...t.formData,...t.benefitsCheck&&{benefitsCheck:t.benefitsCheck},company:$,insurance:X.Ft[O.fz.ChristianaCare],evolveOrganization:O.PM["ChristianaCare - Caregivers"],accountId:X.f3[O.fz.ChristianaCare],eligibilityVerifiedBy:O.h9.Pverify};return await (0,k.vY)(a)}),input:e=>{let{context:t}=e;return t},onDone:{actions:"assignContactData",target:"#".concat(J.EmailVerification)},onError:[{guard:"isApplicationDetected",target:"#".concat(J.ApplicationDetected)},{target:"#".concat(J.InsuranceDetailsReview,".").concat(J.Error)}]}},[J.CreateLead]:{id:J.CreateLead,invoke:{src:(0,q.Sx)(async e=>{var t,a,i,r,n,o,s,l,c,d,u,m;let{input:g}=e,p={...g.formData,...g.formData.insuranceMemberID&&{employmentVerificationCode:g.formData.insuranceMemberID},...g.benefitsCheck&&{benefitsCheck:g.benefitsCheck},...K({groupNumber:null==(a=g.benefitsCheck)||null==(t=a.coverage)?void 0:t.groupNumber,status:null==(r=g.benefitsCheck)||null==(i=r.coverage)?void 0:i.status})&&{eligibilityVerifiedBy:O.h9.Pverify},insurance:X.Ft[O.fz.ChristianaCare],evolveOrganization:O.PM["ChristianaCare - Caregivers"],company:$,leadStatus:G({groupNumber:null==(o=g.benefitsCheck)||null==(n=o.coverage)?void 0:n.groupNumber,status:null==(l=g.benefitsCheck)||null==(s=l.coverage)?void 0:s.status}),automateEvolveEnrollment:K({groupNumber:null==(d=g.benefitsCheck)||null==(c=d.coverage)?void 0:c.groupNumber,status:null==(m=g.benefitsCheck)||null==(u=m.coverage)?void 0:u.status})};return await (0,B.t)(p)}),input:e=>{let{context:t}=e;return t},onDone:[{guard:"isApplicationReviewRequired",target:"#".concat(J.ApplicationReview)},{target:"#".concat(J.ApplicationComplete)}],onError:[{guard:"isApplicationDetected",target:"#".concat(J.ApplicationDetected)},{target:"#".concat(J.InsuranceDetailsReview,".").concat(J.Error)}]}}}},[J.Error]:{id:"".concat(J.InsuranceDetailsReview,".").concat(J.Error),on:{SUBMIT:{actions:["updateFormData","resetBenefitsCheck"],target:J.Submitting}}}}},[J.EmailVerification]:{id:J.EmailVerification,initial:J.Idle,states:{[J.Idle]:{id:"".concat(J.EmailVerification,".").concat(J.Idle),on:{SUBMIT:{actions:"assignOtpCode",target:J.Submitting},RESEND_EMAIL_VERIFICATION:{target:J.Idle,reenter:!0},UPDATE_EMAIL:{target:J.UpdateEmail}},invoke:{input:e=>{var t;let{context:a,event:i}=e;return{email:a.formData.email,firstName:a.formData.firstName,onSuccess:null==i||null==(t=i.data)?void 0:t.onSuccess}},src:(0,q.Sx)(async e=>{let{input:t}=e,a={email:t.email,firstName:t.firstName};return{token:(await (0,A.v)(a)).data.token,onSuccess:t.onSuccess}}),onDone:{actions:[(0,Y.a)({otpData:e=>{let{context:t,event:a}=e;return{...t.otpData,token:a.output.token}}}),e=>{var t;let{event:a}=e;(null==a||null==(t=a.output)?void 0:t.onSuccess)&&a.output.onSuccess()}]},onError:J.Error}},[J.Submitting]:{invoke:{src:(0,q.Sx)(async e=>{let{input:t}=e,a={email:t.formData.email,token:t.otpData.token,otp:t.otpData.otp};return await (0,R.R)(a)}),input:e=>{let{context:t}=e;return t},onDone:"#".concat(J.OnboardingChecklist),onError:J.Error}},[J.Error]:{on:{SUBMIT:{actions:"assignOtpCode",target:J.Submitting},RESEND_EMAIL_VERIFICATION:{target:J.Idle},UPDATE_EMAIL:{target:J.UpdateEmail}}},[J.UpdateEmail]:{initial:J.Idle,states:{[J.Idle]:{invoke:{input:e=>{let{context:t,event:a}=e;return{contactId:t.contactData.contactId,email:a.data.email,onSuccess:a.data.onSuccess}},src:(0,q.Sx)(async e=>{let{input:t}=e,a={contactId:t.contactId,email:t.email};return await (0,k.CI)(a),{email:t.email,onSuccess:t.onSuccess}}),onDone:{actions:["assignNewEmail",e=>{var t;let{event:a}=e;(null==a||null==(t=a.output)?void 0:t.onSuccess)&&a.output.onSuccess()}],target:"#".concat(J.EmailVerification,".").concat(J.Idle)},onError:J.Error}},[J.Error]:{on:{SUBMIT:{target:"#".concat(J.EmailVerification,".").concat(J.Idle)},RESEND_EMAIL_VERIFICATION:{target:"#".concat(J.EmailVerification,".").concat(J.Idle)},UPDATE_EMAIL:{target:J.Idle}}}}}}},[J.ReviewConsents]:{id:J.ReviewConsents,initial:J.FetchConsents,states:{[J.Idle]:{on:{SUBMIT:{actions:["assignUserConsentStatus"],target:J.Submitting}}},[J.FetchConsents]:{invoke:{src:(0,q.Sx)(async()=>await (0,T.i)()),onDone:{actions:"assignConsents",target:J.Idle},onError:J.Error}},[J.Submitting]:{invoke:{src:(0,q.Sx)(async e=>{let{input:t}=e,a={patientIdentifier:t.contactData.contactId,firstName:t.formData.firstName,lastName:t.formData.lastName,phone:t.formData.phone,email:t.formData.email,birthDate:t.formData.birthdate,state:t.formData.state,heightInInch:t.formData.heightInInch,heightInFeet:t.formData.heightInFoot,currentWeightInPounds:t.formData.currentWeightInPounds,evolveOrganization:O.PM["ChristianaCare - Caregivers"],consents:t.consentsData.userConsentStatus};return await (0,U.Y)(a)}),input:e=>{let{context:t}=e;return t},onDone:[{actions:"assignFlyteUserData",target:J.UpdateContact}],onError:"#".concat(J.OnboardingUserError)}},[J.UpdateContact]:{invoke:{src:(0,q.Sx)(async e=>{let{input:t}=e,a={contactId:t.contactData.contactId,evolvePatientID:t.flyteUserData.patientId};return await (0,k.CI)(a)}),input:e=>{let{context:t}=e;return t},onDone:[{guard:"isAthenaRecordCreated",target:"#".concat(J.CreatePassword)},{target:"#".concat(J.OnboardingUserError)}],onError:"#".concat(J.OnboardingUserError)}},[J.Error]:{on:{SUBMIT:{actions:["assignUserConsentStatus"],target:J.Submitting}}}}},[J.CreatePassword]:{id:J.CreatePassword,initial:J.Idle,states:{[J.Idle]:{on:{SUBMIT:{actions:"assignPasswordData",target:J.Submitting}}},[J.Submitting]:{invoke:{src:(0,q.Sx)(async e=>{let{input:t}=e,a={email:t.formData.email,password:t.passwordData.password,confirmPassword:t.passwordData.confirmPassword};return await (0,j.I)(t.flyteUserData.verifyToken,a)}),input:e=>{let{context:t}=e;return t},onDone:"#".concat(J.RequestLabs),onError:{target:J.Error,actions:"assignError"}}},[J.Error]:{on:{SUBMIT:{actions:["resetError","assignPasswordData"],target:J.Submitting}}}}},[J.OnboardingChecklist]:{id:J.OnboardingChecklist,on:{SUBMIT:{target:"#".concat(J.ReviewConsents)}}},[J.RequestLabs]:{id:J.RequestLabs,on:{PROCEED_TO_SUBMIT_LABS:"#".concat(J.SubmitLabs),LAB_REQUESTED:{target:"#".concat(J.AppDownload),actions:"assignLabLocation"},SUBMIT_LABS_LATER:{actions:"assignLabsSkipped",target:"#".concat(J.AppDownload)}}},[J.SubmitLabs]:{id:J.SubmitLabs,on:{GO_BACK_TO_REQUEST_LABS:"#".concat(J.RequestLabs),LAB_SUBMITTED:{actions:"registerLabsUploaded",target:"#".concat(J.AppDownload)},SUBMIT_LABS_LATER:{actions:"assignLabsSkipped",target:"#".concat(J.AppDownload)}}},[J.AppDownload]:{id:J.AppDownload},[J.ApplicationReview]:{id:J.ApplicationReview},[J.OnboardingUserError]:{id:J.OnboardingUserError},[J.ApplicationComplete]:{id:J.ApplicationComplete},[J.ApplicationDetected]:{id:J.ApplicationDetected},[J.EligibilityUnmet]:{id:J.EligibilityUnmet,initial:J.Idle,states:{[J.Idle]:{on:{SUBMIT:{target:J.Submitting,actions:"updateFormData"}}},[J.Submitting]:{invoke:{src:(0,q.Sx)(async e=>{let{input:t}=e,a={...t,company:$,leadStatus:O.XN.Ineligible,ineligibilityReason:O.hT.BMI,automateEvolveEnrollment:!1};return await (0,B.t)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:J.Success,onError:J.Error}},[J.Success]:{},[J.Error]:{on:{SUBMIT:{actions:"updateFormData",target:J.Submitting}}}}}},on:{RESET:{target:"#".concat(J.PreEligibility),actions:"reset"}}});var ea=a(69443);let ei={[S.C.PreEligibility]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-primary",children:"Let's make sure you're eligible for the FlyteHealth program."}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"To be eligible for the FlyteHealth program through ChristianaCare, you must meet specific age and Body Mass Index (BMI)* requirements."})]}),bmiEnrollmentDisclaimer:(0,i.jsx)(r.Text,{variant:"text-body-meta-regular",color:"text-secondary",children:"*We acknowledge that Body Mass Index (BMI) is an imperfect way to screen for excess weight. FlyteHealth providers do not use BMI alone as a measure of overall health. Instead, BMI is used as a data point to see if someone is eligible to join the FlyteHealth program. Once someone joins the program, we'll ask each person more about their health to create a personalized treatment plan."})},[S.C.EligibilityUnmet]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-secondary-negative",children:"Unfortunately, you are not eligible to join FlyteHealth at this time."}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"The FlyteHealth program requires a minimum BMI of 27+ (plus one or more weight-related health conditions) or a BMI of 30+."})]})},[S.C.ContactDetails]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-secondary-negative",children:"Congratulations! You're eligible for the FlyteHealth program"}),(0,i.jsxs)(r.TextPairing.SubLabel,{color:"text-secondary",children:["To help match your information with the ChristianaCare Caregivers with Highmark insurance plan, tell us about yourself.",(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),"Next, we'll ask about your Highmark membership. Be sure to have your insurance card handy."]})]})},[S.C.InsuranceDetails]:{title:(0,i.jsx)(r.TextPairing,{variant:"textpairing-header-2XL",children:(0,i.jsxs)(r.TextPairing.Label,{color:"text-primary",children:[(0,i.jsxs)(r.Text,{display:{base:"inline",lg:"block"},as:"label",variant:"text-header-2XL",color:"text-secondary-negative",children:["One more thing:"," "]}),"What's your Highmark membership number?"]})})},[S.C.InsuranceDetailsReview]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{children:"Let's review: Is your info correct?"}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"Please double-check the information you provided to make sure everything is correct."})]})},[S.C.ApplicationComplete]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-secondary-negative",children:"Welcome aboard! We're so excited you're here."}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"Next, we need to confirm your email. Click the link we sent to:"})]}),description:(0,i.jsx)(r.Text,{mt:"spacer-8",color:"text-secondary",variant:"text-body-regular",children:"Can’t find the email? Make sure to check your Spam folder."})},[S.C.ApplicationReview]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-primary",children:"You're almost finished!"}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"We've received your application, but we need a little more information from you to move forward. Please call us to complete the application process."})]})},[S.C.ApplicationDetected]:{title:(0,i.jsx)(r.Text,{variant:"text-header-2XL",color:"text-primary",children:"We found an existing account for:"}),description:(0,i.jsx)(r.Text,{variant:"text-body-display-S",color:"text-secondary",children:"It looks like you already have an account with us. To continue or update your registration details, please contact our Care Coordinator team."})},[S.C.EmailVerification]:ea.M[S.C.EmailVerification],[S.C.OnboardingChecklist]:ea.M[S.C.OnboardingChecklist],[S.C.CreatePassword]:ea.M[S.C.CreatePassword],[S.C.AppDownload]:ea.M[S.C.AppDownload],[S.C.ReviewConsents]:ea.M[S.C.ReviewConsents]};var er=a(82393);let en=[E.UX.BenefitsWebsite,E.UX.CoworkerReferral,E.UX.PrescriptionDenial,E.UX.ProviderReferral,E.UX.WordOfMouth,E.UX.Other],eo={maxLength:15,minLength:15,registerOptions:{minLength:{value:15,message:"Enter the 15-character member ID number."},maxLength:{value:15,message:"Enter the 15-character member ID number."},pattern:{value:/^(C9I|C9O)/i,message:"Member ID must begin with C9i or C9o."}},label:"Highmark Membership ID Number",placeholder:"C9XXXXXXXXXXXXX"},es={[S.C.ContactDetails]:{state:{options:er.rI},howDidYouFindUs:{options:en}},[S.C.InsuranceDetails]:{insuranceMemberID:{...eo,description:(0,i.jsx)(r.Text,{variant:"text-body-meta-regular",color:"text-secondary",children:"Enter the 15-digit Member ID as displayed on your Highmark Membership ID Card."}),tooltip:(0,i.jsxs)(r.Box,{children:[(0,i.jsx)(r.Text,{variant:"text-body-meta-regular",color:"text-light",children:"Where to find my Membership ID Number:"}),(0,i.jsx)(r.Image,{width:"100%",height:"auto",src:"/static/assets/programs/christiana-care/christiana-care-insurance-card.png",alt:"Member ID guidance"})]})}},[S.C.InsuranceDetailsReview]:{insuranceMemberID:eo}},el=E.fz.ChristianaCare,ec=e=>{let{render:t}=e,[a,j]=(0,P.zl)(et),A=(0,L.useMemo)(()=>(0,w.r)(a.value),[a.value]);(0,I.t)(A,el);let R=(0,L.useCallback)(e=>{j({type:"SUBMIT",data:e})},[j]),M=(0,L.useCallback)(()=>{j({type:"BACK"})},[j]),T=(0,L.useCallback)(()=>{switch(A){case J.PreEligibility:return(0,i.jsx)(f.P,{configuration:{contentResources:ei[S.C.PreEligibility]},onSubmit:R});case J.ContactDetails:return(0,i.jsx)(u.x,{configuration:{contentResources:ei[S.C.ContactDetails],fields:es[S.C.ContactDetails]},onSubmit:R,defaultValues:a.context.formData});case J.EligibilityUnmet:return(0,i.jsx)(g.B,{configuration:{contentResources:ei[S.C.EligibilityUnmet]},onSubmit:R,loading:a.matches({[J.EligibilityUnmet]:J.Submitting}),isEmailSent:a.matches({[J.EligibilityUnmet]:J.Success}),hasError:a.matches({[J.EligibilityUnmet]:J.Error})});case J.InsuranceDetails:return(0,i.jsx)(h.d,{configuration:{contentResources:ei[S.C.InsuranceDetails],fields:es[S.C.InsuranceDetails]},onSubmit:R,onBack:M});case J.InsuranceDetailsReview:return(0,i.jsx)(b.h,{configuration:{contentResources:ei[S.C.InsuranceDetailsReview],fields:es[S.C.InsuranceDetailsReview]},onSubmit:R,loading:a.matches({[J.InsuranceDetailsReview]:J.Submitting}),hasError:a.matches({[J.InsuranceDetailsReview]:J.Error}),defaultValues:a.context.formData});case J.ApplicationComplete:return(0,i.jsx)(o.Q,{...ei[S.C.ApplicationComplete],email:a.context.formData.email});case J.ApplicationDetected:return(0,i.jsx)(s.r,{...ei[S.C.ApplicationDetected],email:a.context.formData.email});case J.ApplicationReview:return(0,i.jsx)(l.l,{...ei[S.C.ApplicationReview]});case J.EmailVerification:return(0,i.jsx)(p.e,{configuration:{contentResources:{title:ei[S.C.EmailVerification](a.context.formData.email).title}},email:a.context.formData.email,hasError:a.matches({[J.EmailVerification]:J.Error}),loading:a.matches({[J.EmailVerification]:J.Submitting}),isUpdateEmailLoading:a.matches({[J.EmailVerification]:{[J.UpdateEmail]:J.Idle}}),hasUpdateEmailError:a.matches({[J.EmailVerification]:{[J.UpdateEmail]:J.Error}}),onSubmit:R,onResendCode:e=>j({type:"RESEND_EMAIL_VERIFICATION",data:{onSuccess:e}}),onEditEmail:(e,t)=>j({type:"UPDATE_EMAIL",data:{email:e,onSuccess:t}})});case J.OnboardingChecklist:return(0,i.jsx)(C.E,{showLabs:!0,configuration:{contentResources:ei[S.C.OnboardingChecklist]},onSubmit:R});case J.ReviewConsents:return(0,i.jsx)(D.U,{configuration:{contentResources:ei[S.C.ReviewConsents]},consents:a.context.consentsData.items,hasError:a.matches({[J.ReviewConsents]:J.Error}),loading:a.matches({[J.ReviewConsents]:J.FetchConsents})||a.matches({[J.ReviewConsents]:J.Submitting})||a.matches({[J.ReviewConsents]:J.UpdateContact}),onSubmit:R});case J.CreatePassword:return(0,i.jsx)(m.i,{configuration:{contentResources:ei[S.C.CreatePassword]},loading:a.matches({[J.CreatePassword]:J.Submitting}),error:a.context.error,onSubmit:R});case J.AppDownload:return(0,i.jsx)(n.a,{title:"SUBMIT_LATER"===a.context.labs?ei[S.C.AppDownload].titleLabSkipped:"LABS_UPLOADED"===a.context.labs?ei[S.C.AppDownload].titleLabSubmitted:ei[S.C.AppDownload].titleLabRequested,checklist:ei[S.C.AppDownload].checklist,image:(0,i.jsx)(r.Image,{m:"auto",mt:8,maxWidth:"300px",src:"/static/assets/app-download.png",alt:"app-download"})});case J.OnboardingUserError:return(0,i.jsx)(x.C,{});case J.RequestLabs:var e;return(0,i.jsx)(y.I,{organizationName:"ChristianaCare - Caregivers",patientId:null==(e=a.context.flyteUserData)?void 0:e.patientId,onProceedToSubmitLabs:()=>j({type:"PROCEED_TO_SUBMIT_LABS"}),onLabRequested:e=>j({type:"LAB_REQUESTED",data:{lab:e}}),formData:a.context.formData});case J.SubmitLabs:return(0,i.jsx)(v.x,{onGoBackToRequestLabs:()=>j({type:"GO_BACK_TO_REQUEST_LABS"}),onSubmitLabsLater:()=>j({type:"SUBMIT_LABS_LATER"}),onLabSubmitted:()=>j({type:"LAB_SUBMITTED"}),patientId:a.context.flyteUserData.patientId,diabetes:"yes"===a.context.formData.diabetes,bariatric:"yes"===a.context.formData.bariatricSurgery});default:return null}},[A,a]);return t({header:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.Flex,{gap:"spacer-5",alignItems:"center",children:[(0,i.jsx)(c.E,{partner:E.fz.Flyte}),(0,i.jsx)(r.Divider,{orientation:"vertical",alignSelf:"stretch",height:"auto"}),(0,i.jsx)(c.E,{partner:el})]}),(0,i.jsx)(d.nV,{currentStep:A})]}),body:T(),currentWorkFlowStep:A})}},53310:(e,t,a)=>{a.d(t,{A:()=>N});var i=a(37876),r=a(37477),n=a(48934),o=a(14901),s=a(16741),l=a(533),c=a(6770),d=a(63583),u=a(86535),m=a(93511),g=a(34305),p=a(80072),h=a(97793),b=a(66885),C=a(62227),x=a(14232),f=a(47353),y=a(33841),D=a(86687),v=a(89225),I=a(68792),E=a(65159),S=a(45352),w=a(39777),P=function(e){return e.CreateLead="createLead",e}(P||{});let L={...h.f,...P},j=v.Ek[y.fz.PyleFamilyInsurance],A={formData:{birthdate:"",comorbidity:"",currentWeightInPounds:"",dateOfHighestWeightValue:"",email:"",firstName:"",heightInFoot:"",heightInInch:"",highestWeightInPounds:"",insuranceCoverage:void 0,insuranceMemberID:"",insurance:void 0,lastName:"",phone:"",state:void 0,termsAgreement:!1,howDidYouFindUS:"",comorbidities:[],diabetes:"",bariatricSurgery:""},bmi:void 0},R=(0,E.mj)({types:{},guards:{isPreEligibilityMet:e=>{let{context:{bmi:t}}=e;return I.J0.pyleFamilyInsurance({bmi:t})},isApplicationDetected:D.L},actions:{updateFormData:(0,S.a)({formData:e=>{let{context:t,event:a}=e;return{...t.formData,...a.data}}}),assignBMI:(0,S.a)({bmi:e=>{let{context:t}=e,{heightInFoot:a,heightInInch:i,highestWeightInPounds:r}=t.formData;return(0,I.Hv)({heightFeet:(0,I.sC)(a),heightInches:(0,I.sC)(i),weightPounds:(0,I.sC)(r)})}}),reset:(0,S.a)({...A})}}).createMachine({context:()=>A,id:"pyleMachine",initial:L.PreEligibility,states:{[L.PreEligibility]:{id:L.PreEligibility,initial:L.Idle,states:{[L.Idle]:{on:{SUBMIT:{target:L.Submitting,actions:"updateFormData"}}},[L.Submitting]:{entry:"assignBMI",always:[{target:"#".concat(L.ContactDetails),guard:"isPreEligibilityMet"},{target:"#".concat(L.EligibilityUnmet)}]}}},[L.ContactDetails]:{id:L.ContactDetails,initial:L.Idle,states:{[L.Idle]:{on:{SUBMIT:{actions:"updateFormData",target:L.Submitting}}},[L.Submitting]:{id:L.Submitting,initial:L.CreateLead,states:{[L.CreateLead]:{id:L.CreateLead,invoke:{src:(0,w.Sx)(async e=>{let{input:t}=e,a={...t.formData,company:j,evolveOrganization:y.PM["A Duie Pyle"],leadStatus:y.XN.EligibleWaiting,automateEvolveEnrollment:!1};return await (0,f.t)(a)}),input:e=>{let{context:t}=e;return t},onDone:"#".concat(L.ApplicationReview),onError:[{guard:"isApplicationDetected",target:"#".concat(L.ApplicationDetected)},{target:"#".concat(L.Error)}]}}}},[L.Error]:{id:L.Error,on:{SUBMIT:{actions:"updateFormData",target:L.Submitting}}}}},[L.ApplicationReview]:{id:L.ApplicationReview},[L.ApplicationDetected]:{id:L.ApplicationDetected},[L.EligibilityUnmet]:{id:L.EligibilityUnmet,initial:L.Idle,states:{[L.Idle]:{on:{SUBMIT:{target:L.Submitting,actions:"updateFormData"}}},[L.Submitting]:{invoke:{src:(0,w.Sx)(async e=>{let{input:t}=e,a={...t,company:j,leadStatus:y.XN.Ineligible,ineligibilityReason:y.hT.BMI,automateEvolveEnrollment:!1};return await (0,f.t)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:L.Success,onError:L.Error}},[L.Success]:{},[L.Error]:{on:{SUBMIT:{target:L.Submitting}}}}}},on:{RESET:{target:"#".concat(L.PreEligibility),actions:"reset"}}});var M=a(69443);let T={[p.C.PreEligibility]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-primary",children:"Let's make sure you're eligible for the FlyteHealth program."}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"To be eligible for the FlyteHealth program through your A-Duie Pyle benefits, you must meet specific age and Body Mass Index (BMI)* requirements."})]}),bmiEnrollmentDisclaimer:(0,i.jsx)(r.Text,{variant:"text-body-meta-regular",color:"text-secondary",children:"*We acknowledge that Body Mass Index (BMI) is an imperfect way to screen for excess weight. FlyteHealth providers do not use BMI alone as a measure of overall health. Instead, BMI is used as a data point to see if someone is eligible to join the FlyteHealth program. Once someone joins the program, we'll ask each person more about their health to create a personalized treatment plan."})},[p.C.EligibilityUnmet]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-secondary-negative",children:"Unfortunately, you are not eligible to join FlyteHealth at this time."}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"The FlyteHealth program requires a minimum BMI of 27+ (plus one or more weight-related health conditions) or a BMI of 30+."})]})},[p.C.ContactDetails]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-secondary-negative",children:"Congratulations! You're eligible for the FlyteHealth program"}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"To help us match your information with your employer, tell us about yourself."})]})},[p.C.ApplicationReview]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-primary",children:"You're almost finished!"}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"We've received your application, but we need a little more information from you to move forward. Please call us to complete the application process."})]}),note:(0,i.jsx)(r.Text,{variant:"text-body-large-regular",color:"text-secondary",children:"There is a one-time $235 FlyteHealth program fee for eligible employees collected during scheduling. A portion of this fee ($150) will be reimbursed by A-Duie Pyle upon confirmation of eligibility and program start. Please contact Pyle HR for instructions on how to obtain this reimbursement."})},[p.C.ApplicationDetected]:{title:(0,i.jsx)(r.Text,{variant:"text-header-2XL",color:"text-primary",children:"We found an existing account for:"}),description:(0,i.jsx)(r.Text,{variant:"text-body-display-S",color:"text-secondary",children:"It looks like you already have an account with us. To continue or update your registration details, please contact our Care Coordinator team."})},[p.C.OnboardingChecklist]:M.M[p.C.OnboardingChecklist],[p.C.CreatePassword]:M.M[p.C.CreatePassword],[p.C.AppDownload]:M.M[p.C.AppDownload],[p.C.ReviewConsents]:M.M[p.C.ReviewConsents]};var k=a(82393);let U=[g.UX.BenefitsWebsite,g.UX.CoworkerReferral,g.UX.ProviderReferral,g.UX.WordOfMouth,g.UX.Other],B={[p.C.ContactDetails]:{state:{options:k.rI},howDidYouFindUs:{options:U}}},F=new Map([[p.C.PreEligibility,l.n.get(p.C.PreEligibility)],[p.C.ContactDetails,l.n.get(p.C.ContactDetails)]]),O=g.fz.PyleFamilyInsurance,N=e=>{let{render:t}=e,[a,f]=(0,C.zl)(R),y=(0,x.useMemo)(()=>(0,b.r)(a.value),[a.value]);(0,m.t)(y,O);let D=(0,x.useCallback)(e=>{f({type:"SUBMIT",data:e})},[f]),v=(0,x.useCallback)(()=>{switch(y){case h.f.PreEligibility:return(0,i.jsx)(u.P,{configuration:{contentResources:T[p.C.PreEligibility]},onSubmit:D});case h.f.ContactDetails:return(0,i.jsx)(c.x,{configuration:{contentResources:T[p.C.ContactDetails],fields:B[p.C.ContactDetails]},loading:a.matches({[h.f.ContactDetails]:h.f.Submitting}),onSubmit:D,defaultValues:a.context.formData});case h.f.EligibilityUnmet:return(0,i.jsx)(d.B,{configuration:{contentResources:T[p.C.EligibilityUnmet]},onSubmit:D,loading:a.matches({[h.f.EligibilityUnmet]:h.f.Submitting}),isEmailSent:a.matches({[h.f.EligibilityUnmet]:h.f.Success}),hasError:a.matches({[h.f.EligibilityUnmet]:h.f.Error})});case h.f.ApplicationReview:return(0,i.jsx)(o.l,{...T[p.C.ApplicationReview]});case h.f.ApplicationDetected:return(0,i.jsx)(n.r,{...T[p.C.ApplicationDetected],email:a.context.formData.email});default:return null}},[y,a]);return t({header:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.Flex,{gap:"spacer-5",alignItems:"center",children:[(0,i.jsx)(s.E,{partner:g.fz.Flyte}),(0,i.jsx)(r.Divider,{orientation:"vertical",alignSelf:"stretch",height:"auto"}),(0,i.jsx)(s.E,{partner:O})]}),(0,i.jsx)(l.f,{currentStep:y,steps:F})]}),body:v(),currentWorkFlowStep:y})}},56931:(e,t,a)=>{a.d(t,{A:()=>eh});var i=a(37876),r=a(37477),n=a(59004),o=a(91366),s=a(48934),l=a(14901),c=a(16741),d=a(533),u=a(6770),m=a(39946),g=a(63583),p=a(53154),h=a(42037),b=a(70587),C=a(11427),x=a(86535),f=a(43483),y=a(93511),D=a(34305),v=a(80072),I=a(66885),E=a(62227),S=a(14232);Object.values(D.lk).filter(e=>e!==D.lk.SelfPay);var w=a(82393),P=a(45383),L=a(19847),j=a(88992),A=a(76692),R=a(43400),M=a(82492);let T="insuranceMemberID",k=(0,i.jsx)(r.Text,{variant:"text-body-meta-regular",color:"text-secondary",children:"Your Unique ID is your ten-digit Benefit Funds’ Member ID Number. For Eligible dependents, use the guidance below:"}),U=e=>{let{label:t="1199SEIU Unique ID",placeholder:a="Unique ID Number",description:n=k,tooltip:o,type:s,maxLength:l,minLength:c,maskOptions:d,inputMode:u,registerOptions:m,isDisabled:g=!1,isRequired:p=!0,...h}=e,{setValue:b,register:C,formState:{errors:x}}=(0,j.xW)(),f=(0,M.Q)(T,x,["minLength","maxLength","pattern"]);return(0,i.jsxs)(r.Flex,{direction:"column",gap:"spacer-2",...h,children:[(0,i.jsxs)(r.Box,{children:[(0,i.jsxs)(r.Flex,{gap:"spacer-2",alignItems:"center",children:[(0,i.jsx)(r.Text,{as:"label",variant:"text-body-large-bold",color:"text-primary-negative",htmlFor:T,children:t}),o&&(0,i.jsx)(r.Tooltip,{label:o,placement:"auto-end",children:(0,i.jsx)(r.Flex,{children:(0,i.jsx)(r.IconInfoCircle,{size:"m",color:"text-link-primary-default"})})})]}),n]}),(0,i.jsx)(R.I,{"data-test":T,id:T,isInvalid:f,isDisabled:g,placeholder:a,type:s,inputMode:u,maxLength:l,minLength:c,maskOptions:d,onInput:e=>{let t=e.currentTarget.value,a=!c||c&&t.length>=c;b(T,t,{shouldValidate:a})},...C(T,{required:p,...m})}),(0,i.jsxs)(r.Text,{variant:"text-body-regular",fontSize:12,color:"text-secondary",children:[(0,i.jsx)("b",{children:"- For Spouse:"})," ","member’s ID number + first nine characters of spouse’s first name + S."," ",(0,i.jsx)("br",{}),"Example: 1234567890JohnathonS",(0,i.jsx)("br",{}),(0,i.jsx)("b",{children:"- For Child (18 or older)"}),": member’s ID number + first nine characters of dependent’s first name + D. Example: 1234567890MariaD"]}),f&&(0,i.jsx)(w.gO,{errors:x,name:T})]})},B=e=>{let{configuration:t,loading:a=!1,onSubmit:n,onBack:o}=e,{contentResources:s,fields:l}=t,c=(0,j.mN)({mode:"onBlur"}),d=(0,L.a)(),u=c.watch(A.uQ)===D.RS.SelfPay,m=c.watch(A.ag)===D.lk.Other;(0,S.useEffect)(()=>{u&&(c.resetField(A.ag),c.resetField(A.JB))},[u,c]),(0,S.useEffect)(()=>{c.resetField(A.E6)},[c.watch(A.ag),c]);let g=()=>(0,i.jsxs)(r.Flex,{gap:{base:"spacer-8",md:"spacer-16"},alignItems:"center",flex:{base:1,lg:"unset"},children:[(0,i.jsx)(r.Button,{size:{base:"m",lg:"l"},isLoading:a,variant:"link","aria-label":"Back",leadingIcon:(0,i.jsx)(r.IconArrowLeft,{}),onClick:o,children:"Back"}),(0,i.jsx)(r.Button,{type:"submit",size:{base:"m",lg:"l"},isDisabled:!c.formState.isValid,flex:1,isLoading:a,trailingIcon:(0,i.jsx)(r.IconArrowRight,{}),"aria-label":"Continue",children:"Continue"})]});return(0,i.jsx)(j.Op,{...c,children:(0,i.jsxs)(P.X,{as:"form",onSubmit:c.handleSubmit(n),noValidate:!0,children:[(0,i.jsx)(P.X.Side,{gap:0,flex:{base:"none",lg:1},children:s.title}),(0,i.jsxs)(P.X.Form,{children:[(null==l?void 0:l.insuranceCoverage)&&(0,i.jsx)(A.Xq,{isDisabled:a}),(null==l?void 0:l.insurance)&&(0,i.jsx)(A._8,{isDisabled:a||u,isRequired:!u,...null==l?void 0:l.insurance},u.toString()),m&&(0,i.jsx)(A.jP,{isDisabled:a,...null==l?void 0:l.insuranceOther}),(0,i.jsx)(U,{isDisabled:a||u,isRequired:!u,pb:{base:"spacer-24",lg:0},...null==l?void 0:l.insuranceMemberID}),d?(0,i.jsx)(w.cI,{children:g()}):g()]})]})})};var F=a(11969),O=a(10758),N=a(85007),_=a(31346),H=a(38360),X=a(39648),V=a(77944),z=a(47353),W=a(83928),q=a(33841),Y=a(13751),K=a(92323),G=a(86687),Q=a(89225),J=a(97793),$=a(68792),Z=a(65159),ee=a(39777),et=a(45352),ea=a(63826);let ei=e=>e===ea.w.FULL_MATCH||e===ea.w.ELIGIBLE_MATCH||e===ea.w.PERSON_MATCH,er=e=>{switch(e){case ea.w.INSURANCE_MATCH:case ea.w.EXPIRED:case ea.w.NOT_FOUND:return D.XN.EligibleWaiting;case ea.w.PERSON_MATCH:case ea.w.FULL_MATCH:case ea.w.ELIGIBLE_MATCH:default:return}};var en=function(e){return e.CreateLead="createLead",e.CreateContact="createContact",e.UpdateContact="updateContact",e.DetermineContactOrLead="determineContactOrLead",e.FetchConsents="fetchConsents",e.UpdateEmail="updateEmail",e.CheckEligibility="checkEligibility",e}(en||{});let eo={...J.f,...en},es=Q.Ek[q.fz["1199SEIU"]],el={formData:{birthdate:"",comorbidity:"",currentWeightInPounds:"",dateOfHighestWeightValue:"",email:"",ssn:"",firstName:"",heightInFoot:"",heightInInch:"",highestWeightInPounds:"",insuranceCoverage:void 0,insuranceMemberID:"",insurance:void 0,lastName:"",phone:"",termsAgreement:!1,howDidYouFindUS:"",diabetes:"",bariatricSurgery:"",comorbidities:[""]},eligibilityCheckMatchType:void 0,matchingRecord:void 0,bmi:void 0,otpData:void 0,consentsData:{items:[],userConsentStatus:[]},contactData:{},passwordData:{password:void 0,confirmPassword:void 0},flyteUserData:void 0,error:void 0},ec={...Y.AU,...Y.gQ,...Y.pE,...Y.UH,...Y.yF,...Y.n6,...Y.uN,...Y.yS,...Y.RW,...(0,Y.rS)(el).reset},ed=(0,Z.mj)({types:{},guards:{isPreEligibilityMet:e=>{let{context:{formData:t,bmi:a}}=e;return $.J0["1199SEIU"]({bmi:a,comorbidity:t.comorbidity,birthdate:t.birthdate})},isApplicationReviewRequired:e=>{let{context:{eligibilityCheckMatchType:t,formData:a}}=e;return!W.A.shouldBypassIsApplicationReviewRequired({email:a.email})&&!ei(t)},isApplicationDetected:G.L,isAthenaRecordCreated:K.z},actions:ec}).createMachine({context:()=>el,id:"SEIUMachine",initial:eo.PreEligibility,states:{[eo.PreEligibility]:{id:eo.PreEligibility,initial:eo.Idle,states:{[eo.Idle]:{on:{SUBMIT:{target:eo.Submitting,actions:"updateFormData"}}},[eo.Submitting]:{entry:"assignBMI",always:[{target:"#".concat(eo.ContactDetails),guard:"isPreEligibilityMet"},{target:"#".concat(eo.EligibilityUnmet)}]}}},[eo.ContactDetails]:{id:eo.ContactDetails,initial:eo.Idle,states:{[eo.Idle]:{on:{SUBMIT:{target:"#".concat(eo.InsuranceDetails),actions:"updateFormData"}}}}},[eo.InsuranceDetails]:{id:eo.InsuranceDetails,initial:eo.Idle,states:{[eo.Idle]:{on:{BACK:{target:"#".concat(eo.ContactDetails)},SUBMIT:{target:"#".concat(eo.InsuranceDetailsReview),actions:"updateFormData"}}}}},[eo.InsuranceDetailsReview]:{id:eo.InsuranceDetailsReview,initial:eo.Idle,states:{[eo.Idle]:{on:{SUBMIT:{actions:"updateFormData",target:eo.Submitting}}},[eo.Submitting]:{id:eo.Submitting,initial:eo.CheckEligibility,states:{[eo.CheckEligibility]:{id:eo.CheckEligibility,invoke:{src:(0,ee.Sx)(async e=>{let{input:t}=e,a={...t,insurance:Q.w[q.fz["1199SEIU"]],benefitProgram:Q.Nl[q.fz["1199SEIU"]]};return await (0,X.w)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:[{actions:(0,et.a)({eligibilityCheckMatchType:e=>{let{event:t}=e;return t.output.data.matchType},matchingRecord:e=>{let{event:t}=e;return t.output.data.matchingRecord}}),target:"#".concat(eo.DetermineContactOrLead)}],onError:"#".concat(eo.InsuranceDetailsReview,".").concat(eo.Error)}},[eo.DetermineContactOrLead]:{id:eo.DetermineContactOrLead,always:[{guard:"isApplicationReviewRequired",target:eo.CreateLead},{target:eo.CreateContact}]},[eo.CreateContact]:{id:eo.CreateContact,invoke:{src:(0,ee.Sx)(async e=>{var t;let{input:a}=e,i=null==(t=a.matchingRecord)?void 0:t.accountName,r={...a.formData,employmentVerificationCode:a.formData.insuranceMemberID,eligibilityVerifiedBy:q.h9.Evolve,insuranceMemberID:a.formData.insuranceMemberID,company:es,insurance:Q.Ft[q.fz["1199SEIU"]],evolveOrganization:q.PM["1199SEIU"],accountId:Q.f3[q.fz["1199SEIU"]],...i&&{participantDepartmentorOrg:i}};return await (0,H.vY)(r)}),input:e=>{let{context:t}=e;return t},onDone:{actions:"assignContactData",target:"#".concat(eo.EmailVerification)},onError:[{guard:"isApplicationDetected",target:"#".concat(eo.ApplicationDetected)},{target:"#".concat(eo.InsuranceDetailsReview,".").concat(eo.Error)}]}},[eo.CreateLead]:{id:eo.CreateLead,invoke:{src:(0,ee.Sx)(async e=>{var t;let{input:a}=e,i=null==(t=a.matchingRecord)?void 0:t.accountName,r={...a.formData,employmentVerificationCode:a.formData.insuranceMemberID,insuranceMemberID:a.formData.insuranceMemberID,company:es,insurance:Q.Ft[q.fz["1199SEIU"]],evolveOrganization:q.PM["1199SEIU"],leadStatus:er(a.eligibilityCheckMatchType),automateEvolveEnrollment:ei(a.eligibilityCheckMatchType),...i&&{participantDepartmentorOrg:i}};return await (0,z.t)(r)}),input:e=>{let{context:t}=e;return t},onDone:[{guard:"isApplicationReviewRequired",target:"#".concat(eo.ApplicationReview)},{target:"#".concat(eo.ApplicationComplete)}],onError:[{guard:"isApplicationDetected",target:"#".concat(eo.ApplicationDetected)},{target:"#".concat(eo.InsuranceDetailsReview,".").concat(eo.Error)}]}}}},[eo.Error]:{id:"".concat(eo.InsuranceDetailsReview,".").concat(eo.Error),on:{SUBMIT:{actions:"updateFormData",target:eo.Submitting}}}}},[eo.EmailVerification]:{id:eo.EmailVerification,initial:eo.Idle,states:{[eo.Idle]:{id:"".concat(eo.EmailVerification,".").concat(eo.Idle),on:{SUBMIT:{actions:"assignOtpCode",target:eo.Submitting},RESEND_EMAIL_VERIFICATION:{target:eo.Idle,reenter:!0},UPDATE_EMAIL:{target:eo.UpdateEmail}},invoke:{input:e=>{var t;let{context:a,event:i}=e;return{email:a.formData.email,firstName:a.formData.firstName,onSuccess:null==i||null==(t=i.data)?void 0:t.onSuccess}},src:(0,ee.Sx)(async e=>{let{input:t}=e,a={email:t.email,firstName:t.firstName};return{token:(await (0,O.v)(a)).data.token,onSuccess:t.onSuccess}}),onDone:{actions:[(0,et.a)({otpData:e=>{let{context:t,event:a}=e;return{...t.otpData,token:a.output.token}}}),e=>{var t;let{event:a}=e;(null==a||null==(t=a.output)?void 0:t.onSuccess)&&a.output.onSuccess()}]},onError:eo.Error}},[eo.Submitting]:{invoke:{src:(0,ee.Sx)(async e=>{let{input:t}=e,a={email:t.formData.email,token:t.otpData.token,otp:t.otpData.otp};return await (0,N.R)(a)}),input:e=>{let{context:t}=e;return t},onDone:"#".concat(eo.OnboardingChecklist),onError:eo.Error}},[eo.Error]:{on:{SUBMIT:{actions:"assignOtpCode",target:eo.Submitting},RESEND_EMAIL_VERIFICATION:{target:eo.Idle},UPDATE_EMAIL:{target:eo.UpdateEmail}}},[eo.UpdateEmail]:{initial:eo.Idle,states:{[eo.Idle]:{invoke:{input:e=>{let{context:t,event:a}=e;return{contactId:t.contactData.contactId,email:a.data.email,onSuccess:a.data.onSuccess}},src:(0,ee.Sx)(async e=>{let{input:t}=e,a={contactId:t.contactId,email:t.email};return await (0,H.CI)(a),{email:t.email,onSuccess:t.onSuccess}}),onDone:{actions:["assignNewEmail",e=>{var t;let{event:a}=e;(null==a||null==(t=a.output)?void 0:t.onSuccess)&&a.output.onSuccess()}],target:"#".concat(eo.EmailVerification,".").concat(eo.Idle)},onError:eo.Error}},[eo.Error]:{on:{SUBMIT:{target:"#".concat(eo.EmailVerification,".").concat(eo.Idle)},RESEND_EMAIL_VERIFICATION:{target:"#".concat(eo.EmailVerification,".").concat(eo.Idle)},UPDATE_EMAIL:{target:eo.Idle}}}}}}},[eo.ReviewConsents]:{id:eo.ReviewConsents,initial:eo.FetchConsents,states:{[eo.Idle]:{on:{SUBMIT:{actions:["assignUserConsentStatus"],target:eo.Submitting}}},[eo.FetchConsents]:{invoke:{src:(0,ee.Sx)(async()=>await (0,_.i)()),onDone:{actions:"assignConsents",target:eo.Idle},onError:eo.Error}},[eo.Submitting]:{invoke:{src:(0,ee.Sx)(async e=>{let{input:t}=e,a={patientIdentifier:t.contactData.contactId,firstName:t.formData.firstName,lastName:t.formData.lastName,phone:t.formData.phone,email:t.formData.email,birthDate:t.formData.birthdate,state:t.formData.state,heightInInch:t.formData.heightInInch,heightInFeet:t.formData.heightInFoot,currentWeightInPounds:t.formData.currentWeightInPounds,evolveOrganization:q.PM["1199SEIU"],consents:t.consentsData.userConsentStatus};return await (0,V.Y)(a)}),input:e=>{let{context:t}=e;return t},onDone:[{actions:"assignFlyteUserData",target:eo.UpdateContact}],onError:"#".concat(eo.OnboardingUserError)}},[eo.UpdateContact]:{invoke:{src:(0,ee.Sx)(async e=>{let{input:t}=e,a={contactId:t.contactData.contactId,evolvePatientID:t.flyteUserData.patientId};return await (0,H.CI)(a)}),input:e=>{let{context:t}=e;return t},onDone:[{guard:"isAthenaRecordCreated",target:"#".concat(eo.CreatePassword)},{target:"#".concat(eo.OnboardingUserError)}],onError:"#".concat(eo.OnboardingUserError)}},[eo.Error]:{on:{SUBMIT:{actions:["assignUserConsentStatus"],target:eo.Submitting}}}}},[eo.CreatePassword]:{id:eo.CreatePassword,initial:eo.Idle,states:{[eo.Idle]:{on:{SUBMIT:{actions:"assignPasswordData",target:eo.Submitting}}},[eo.Submitting]:{invoke:{src:(0,ee.Sx)(async e=>{let{input:t}=e,a={email:t.formData.email,password:t.passwordData.password,confirmPassword:t.passwordData.confirmPassword};return await (0,F.I)(t.flyteUserData.verifyToken,a)}),input:e=>{let{context:t}=e;return t},onDone:"#".concat(eo.AppDownload),onError:{target:eo.Error,actions:"assignError"}}},[eo.Error]:{on:{SUBMIT:{actions:["resetError","assignPasswordData"],target:eo.Submitting}}}}},[eo.OnboardingChecklist]:{id:eo.OnboardingChecklist,on:{SUBMIT:{target:"#".concat(eo.ReviewConsents)}}},[eo.AppDownload]:{id:eo.AppDownload},[eo.ApplicationReview]:{id:eo.ApplicationReview},[eo.OnboardingUserError]:{id:eo.OnboardingUserError},[eo.ApplicationComplete]:{id:eo.ApplicationComplete},[eo.ApplicationDetected]:{id:eo.ApplicationDetected},[eo.EligibilityUnmet]:{id:eo.EligibilityUnmet,initial:eo.Idle,states:{[eo.Idle]:{on:{SUBMIT:{target:eo.Submitting,actions:"updateFormData"}}},[eo.Submitting]:{invoke:{src:(0,ee.Sx)(async e=>{let{input:t}=e,a={...t,company:es,leadStatus:q.XN.Ineligible,ineligibilityReason:q.hT.BMI,automateEvolveEnrollment:!1};return await (0,z.t)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:eo.Success,onError:eo.Error}},[eo.Success]:{},[eo.Error]:{on:{SUBMIT:{target:eo.Submitting}}}}}},on:{RESET:{target:"#".concat(eo.PreEligibility),actions:"reset"}}});var eu=a(69443);let em={[v.C.PreEligibility]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-primary",children:"Let's make sure you're eligible for the FlyteHealth program."}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"To be eligible for the FlyteHealth program through the 1199SEIU Benefit Funds, you must meet specific age and Body Mass Index (BMI)* requirements."})]}),bmiEnrollmentDisclaimer:(0,i.jsx)(r.Text,{variant:"text-body-meta-regular",color:"text-secondary",children:"*We acknowledge that Body Mass Index (BMI) is an imperfect way to screen for excess weight. FlyteHealth providers do not use BMI alone as a measure of overall health. Instead, BMI is used as a data point to see if someone is eligible to join the FlyteHealth program. Once someone joins the program, we'll ask each person more about their health to create a personalized treatment plan."})},[v.C.EligibilityUnmet]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-secondary-negative",children:"Unfortunately, you are not eligible to join FlyteHealth at this time."}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"The FlyteHealth program requires a minimum BMI of 27+ (plus one or more weight-related health conditions) or a BMI of 30+."})]})},[v.C.ContactDetails]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-secondary-negative",children:"Next, tell us about yourself"}),(0,i.jsxs)(r.TextPairing.SubLabel,{color:"text-secondary",children:["To help match your information with the 1199SEIU Health Benefits Plan, we need to verify a few personal details.",(0,i.jsx)("br",{})," ",(0,i.jsx)("br",{}),"Be sure to have your member ID card handy for the next step."]})]})},[v.C.InsuranceDetails]:{title:(0,i.jsxs)(r.Text,{variant:"text-header-2XL",color:"text-secondary-negative",children:["One more thing:"," ",(0,i.jsx)(r.Text,{as:"span",variant:"text-header-2XL",color:"text-primary",children:"Do you have health insurance?"})]})},[v.C.InsuranceDetailsReview]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{children:"Let's review: Is your info correct?"}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"Please double-check the information you provided to make sure everything is correct."})]})},[v.C.ApplicationComplete]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-secondary-negative",children:"Welcome aboard! We're so excited you're here."}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"Next, we need to confirm your email. Click the link we sent to:"})]}),description:(0,i.jsx)(r.Text,{mt:"spacer-8",color:"text-secondary",variant:"text-body-regular",children:"Can’t find the email? Make sure to check your Spam folder."})},[v.C.ApplicationReview]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-primary",children:"You're almost finished!"}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"We've received your application, but we need a little more information from you to move forward. Please call us to complete the application process."})]})},[v.C.ApplicationDetected]:{title:(0,i.jsx)(r.Text,{variant:"text-header-2XL",color:"text-primary",children:"We found an existing account for:"}),description:(0,i.jsx)(r.Text,{variant:"text-body-display-S",color:"text-secondary",children:"It looks like you already have an account with us. To continue or update your registration details, please contact our Care Coordinator team."})},[v.C.EmailVerification]:eu.M[v.C.EmailVerification],[v.C.OnboardingChecklist]:eu.M[v.C.OnboardingChecklist],[v.C.CreatePassword]:eu.M[v.C.CreatePassword],[v.C.AppDownload]:eu.M[v.C.AppDownload],[v.C.ReviewConsents]:eu.M[v.C.ReviewConsents]},eg=[D.UX.BenefitsWebsite,D.UX.CoworkerReferral,D.UX.PrescriptionDenial,D.UX.ProviderReferral,D.UX.WordOfMouth,D.UX.Other],ep={[v.C.ContactDetails]:{state:{options:w.rI},howDidYouFindUs:{options:eg}},[v.C.InsuranceDetails]:{insuranceMemberID:{}},[v.C.InsuranceDetailsReview]:{insuranceMemberID:{}}},eh=e=>{let{render:t}=e,[a,w]=(0,E.zl)(ed),P=(0,S.useMemo)(()=>(0,I.r)(a.value),[a.value]);(0,y.t)(P);let L=(0,S.useCallback)(e=>{w({type:"SUBMIT",data:e})},[w]),j=(0,S.useCallback)(()=>{w({type:"BACK"})},[w]),A=(0,S.useCallback)(()=>{switch(P){case eo.PreEligibility:return(0,i.jsx)(x.P,{configuration:{contentResources:em[v.C.PreEligibility]},onSubmit:L});case eo.ContactDetails:return(0,i.jsx)(u.x,{configuration:{contentResources:em[v.C.ContactDetails],fields:ep[v.C.ContactDetails]},onSubmit:L,defaultValues:a.context.formData});case eo.EligibilityUnmet:return(0,i.jsx)(g.B,{configuration:{contentResources:em[v.C.EligibilityUnmet]},onSubmit:L,loading:a.matches({[eo.EligibilityUnmet]:eo.Submitting}),isEmailSent:a.matches({[eo.EligibilityUnmet]:eo.Success}),hasError:a.matches({[eo.EligibilityUnmet]:eo.Error})});case eo.InsuranceDetails:return(0,i.jsx)(B,{configuration:{contentResources:em[v.C.InsuranceDetails],fields:ep[v.C.InsuranceDetails]},onSubmit:L,onBack:j});case eo.InsuranceDetailsReview:return(0,i.jsx)(h.h,{configuration:{contentResources:em[v.C.InsuranceDetailsReview],fields:ep[v.C.InsuranceDetailsReview]},onSubmit:L,loading:a.matches({[eo.InsuranceDetailsReview]:eo.Submitting}),hasError:a.matches({[eo.InsuranceDetailsReview]:eo.Error}),defaultValues:a.context.formData});case eo.ApplicationComplete:return(0,i.jsx)(o.Q,{...em[v.C.ApplicationComplete],email:a.context.formData.email});case eo.ApplicationDetected:return(0,i.jsx)(s.r,{...em[v.C.ApplicationDetected],email:a.context.formData.email});case eo.ApplicationReview:return(0,i.jsx)(l.l,{...em[v.C.ApplicationReview]});case eo.EmailVerification:return(0,i.jsx)(p.e,{configuration:{contentResources:{title:em[v.C.EmailVerification](a.context.formData.email).title}},email:a.context.formData.email,hasError:a.matches({[eo.EmailVerification]:eo.Error}),loading:a.matches({[eo.EmailVerification]:eo.Submitting}),isUpdateEmailLoading:a.matches({[eo.EmailVerification]:{[eo.UpdateEmail]:eo.Idle}}),hasUpdateEmailError:a.matches({[eo.EmailVerification]:{[eo.UpdateEmail]:eo.Error}}),onSubmit:L,onResendCode:e=>w({type:"RESEND_EMAIL_VERIFICATION",data:{onSuccess:e}}),onEditEmail:(e,t)=>w({type:"UPDATE_EMAIL",data:{email:e,onSuccess:t}})});case eo.OnboardingChecklist:return(0,i.jsx)(b.E,{configuration:{contentResources:em[v.C.OnboardingChecklist]},onSubmit:L});case eo.ReviewConsents:return(0,i.jsx)(f.U,{configuration:{contentResources:em[v.C.ReviewConsents]},consents:a.context.consentsData.items,hasError:a.matches({[eo.ReviewConsents]:eo.Error}),loading:a.matches({[eo.ReviewConsents]:eo.FetchConsents})||a.matches({[eo.ReviewConsents]:eo.Submitting})||a.matches({[eo.ReviewConsents]:eo.UpdateContact}),onSubmit:L});case eo.CreatePassword:return(0,i.jsx)(m.i,{configuration:{contentResources:em[v.C.CreatePassword]},loading:a.matches({[eo.CreatePassword]:eo.Submitting}),error:a.context.error,onSubmit:L});case eo.AppDownload:return(0,i.jsx)(n.a,{title:em[v.C.AppDownload].title,checklist:em[v.C.AppDownload].checklist});case eo.OnboardingUserError:return(0,i.jsx)(C.C,{});default:return null}},[P,a]);return t({header:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.Flex,{gap:"spacer-5",alignItems:"center",children:[(0,i.jsx)(c.E,{partner:D.fz.Flyte}),(0,i.jsx)(r.Divider,{orientation:"vertical",alignSelf:"stretch",height:"auto"}),(0,i.jsx)(c.E,{partner:D.fz["1199SEIU"]})]}),(0,i.jsx)(d.f,{currentStep:P})]}),body:A(),currentWorkFlowStep:P})}},77944:(e,t,a)=>{a.d(t,{Y:()=>i.Y});var i=a(87665)},92261:(e,t,a)=>{a.d(t,{q:()=>eA});var i=a(37876),r=a(59004),n=a(91366),o=a(48934),s=a(14901),l=a(16741),c=a(533),d=a(39946),u=a(63583),m=a(53154),g=a(30435),p=a(42037),h=a(70587),b=a(11427),C=a(86535),x=a(43483),f=a(93511),y=a(34305),D=a(80072),v=a(66885),I=a(62227),E=a(14232),S=a(37477),w=a(82393),P=a(45383),L=a(84441),j=a(15986),A=a(48496),R=a(19847),M=a(88992),T=function(e){return e.NotReferred="Not referred",e.AccessHealthcare="Access Healthcare, PC",e.AnandKanjolia="Anand Kanjolia, MD, LLC",e.AnneMarieVilla="Anne Marie Villa, MD, PC",e.ArthurSkalski="Arthur H Skalski, MD Internal Medicine FACSG LLC",e.AvantaClinic="Avanta Clinic, LLC",e.ComprehensiveMedicalGroup="Comprehensive Medical Group, LLC",e.ConnecticutValleyPediatricCenter="Connecticut Valley Pediatric Center, Inc",e.DushyantParikh="Dushyant Parikh, MD",e.EastGranbyFamilyPractice="East Granby Family Practice, LLC",e.EileenComia="Eileen C Comia, MD, LLC",e.EllenMarmer="Ellen L Marmer, MD",e.FeelWellHealthCenter="Feel Well Health Center of Southington, PC dba Confidia Health Institute",e.HRobertSilverstein="H Robert Silverstein MD, FACC, PC",e.IvelisseViruet="Ivelisse Viruet, MD Internal Medicine, LLC",e.JamesHainesAndWilliamBelcastro="James Haines, MD & William Belcastro, MD",e.JudithMascolo="Judith M Mascolo, MD, LLC",e.JulieSacharko="Julie Sacharko, APRN LLC",e.KaiserPermanente="Kaiser Permanente",e.MahmoodYekta="Mahmood Yekta, MD, PC dba Shafa Medical Clinic",e.MeadowsHealthCenter="Meadows Health Center, PC",e.MobileCarePartners="Mobile Care Partners of Connecticut, PLLC",e.MouliAssociates="Mouli Associates LLC",e.OksanaKloyzner="Oksana Kloyzner, MD, LLC",e.OliverDiaz="Oliver B Diaz, MD",e.PeiSun="Pei Sun MD, LLC",e.PersonalPrimaryCare="Personal Primary Care and Weight Management LLC",e.PreferredHealthcareAssociates="Preferred Healthcare Associates, Inc",e.PrimaryPhysicalMedicine="Primary Physical Medicine, LLC",e.QuinonesMedicalGroup="Quinones Medical Group, LLC",e.RamirezMedicalPractice="Ramirez Medical Practice, PLLC",e.ReviveCenterForHealth="REVIVE Center for Health & Wellness, PLLC",e.RobertCarlson="Robert D Carlson, MD, LLC",e.RockyHillMedicalCenter="Rocky Hill Medical Center, LLC",e.RoyKellerman="Roy A Kellerman, MD, LLC",e.SoNEHealthMedicalGroup="SoNE Health Medical Group, PLLC",e.SuffieldMedicalAssociates="Suffield Medical Associates",e.WarrenPediatrics="Warren Pediatrics, LLC",e.WinstedInternalMedicine="Winsted Internal Medicine Associates",e.YounusMasih="Younus Masih, MD",e.Other="Other",e}({});let k="referralProgram",U=Object.values(T),B=e=>{let{options:t=U,isRequired:a,isDisabled:r,defaultSelectedItem:n,placeholder:o}=e,{watch:s,control:l}=(0,M.xW)(),[c,d]=(0,E.useState)(""),u=c?t.filter(e=>e.toLowerCase().includes(c.toLowerCase())):t;return(0,i.jsxs)(S.Flex,{direction:"column",gap:"spacer-2",children:[(0,i.jsxs)(S.Box,{children:[(0,i.jsx)(S.Text,{as:"label",variant:"text-body-large-bold",color:"text-primary-negative",htmlFor:k,children:"Were you referred to FlyteHealth?"}),(0,i.jsx)(S.Text,{variant:"text-body-meta-regular",color:"text-secondary",children:"If yes, select the healthcare organization, clinic, or provider."})]}),(0,i.jsx)(M.xI,{control:l,name:k,rules:{required:a},render:e=>{let{field:{onChange:t,onBlur:a}}=e;return(0,i.jsxs)(S.Autocomplete,{id:"".concat(k,"-autocomplete"),items:u,onInputValueChange:e=>{let{inputValue:a}=e;d(a||""),a||t(a)},onSelectedItemChange:e=>{let{selectedItem:a}=e;return t(a)},initialSelectedItem:n,selectedItem:s(k)||"",children:[(0,i.jsx)(S.Autocomplete.Input,{"data-test":k,id:k,size:"l",placeholder:o,clearButtonMode:r?"never":"has-value",leadingIcon:(0,i.jsx)(S.IconSearch,{}),variant:"flushed",isDisabled:r,onBlur:a}),(0,i.jsx)(S.Autocomplete.List,{"data-test":"".concat(k,"List"),zIndex:2,renderItem:e=>(0,i.jsx)(S.Text,{variant:"text-body-regular",children:e}),overflowY:"auto",maxHeight:"13.5rem"})]})}})]})},F=[y.yj.California,y.yj.Connecticut,y.yj.Massachusetts,y.yj["New York"],y.yj["Rhode Island"],y.yj["New Hampshire"],y.yj.Vermont],O=[y.yj.California,y.yj.Colorado,y.yj.Oregon,y.yj.Georgia,y.yj.Hawaii,y.yj.Maryland,y.yj.Virginia,y.yj.Washington,y.yj["Washington D.C."]],N=e=>O.includes(e)?[T.KaiserPermanente]:Object.values(T).filter(e=>e!==T.KaiserPermanente&&e!==T.Other&&e!==T.NotReferred),_=e=>{let{configuration:t,loading:a=!1,onSubmit:r,defaultValues:n}=e,{contentResources:o,fields:s}=t,l=(0,M.mN)({mode:"onBlur",defaultValues:n,shouldUnregister:!1}),c=(0,E.useRef)(null==n?void 0:n.state),d=(0,E.useRef)(null==n?void 0:n.referralProgram),{watch:u}=l,m=(0,R.a)(),g=u(A.b),p=u(k),h=g&&(F.includes(g)||O.includes(g)),b=!g||a||!h,C=g&&!h?"There are no organizations or clinics in your state":"Select referral location",x=!!p,f=!g||a||h&&!x,y=h&&!x,D="Not referred"===p||""===p?s.howDidYouFindUs.options.notReferrerOptions:s.howDidYouFindUs.options.referrerOptions;(0,E.useEffect)(()=>{p!==d.current&&(l.resetField(j.l,{defaultValue:""}),d.current=p)},[p,l]),(0,E.useEffect)(()=>{g!==c.current&&(l.resetField(k,{defaultValue:""}),l.resetField(j.l,{defaultValue:""}),c.current=g)},[g,l]);let v=()=>(0,i.jsx)(S.Button,{type:"submit",size:{base:"m",lg:"l"},isDisabled:!l.formState.isValid,width:"100%",isLoading:a,trailingIcon:(0,i.jsx)(S.IconArrowRight,{}),"aria-label":"Continue",children:"Continue"});return(0,i.jsx)(M.Op,{...l,children:(0,i.jsxs)(P.X,{as:"form",onSubmit:l.handleSubmit(r),noValidate:!0,children:[(0,i.jsx)(P.X.Side,{gap:0,flex:{base:"none",lg:1},children:o.title}),(0,i.jsxs)(P.X.Form,{children:[(0,i.jsx)(w.d5,{isDisabled:a}),(0,i.jsx)(w.LP,{inputProps:{isDisabled:a}}),(0,i.jsxs)(S.Flex,{direction:{base:"column",lg:"row"},gap:"spacer-9",children:[(0,i.jsx)(L.PV,{isDisabled:a,flex:1}),(null==s?void 0:s.state)&&(0,i.jsx)(A.X,{isDisabled:a,flex:1,options:s.state.options})]}),(0,i.jsx)(B,{isDisabled:b,isRequired:y,placeholder:C,options:N(g)}),(0,i.jsx)(j.h,{isDisabled:f,options:D}),(0,i.jsx)(L.Ci,{isDisabled:a,pb:{base:"spacer-24",lg:0}}),m?(0,i.jsx)(w.cI,{children:v()}):v()]})]})})};var H=a(11969),X=a(10758),V=a(85007),z=a(20411),W=a(31346),q=a(38360),Y=a(77944),K=a(12342);let G=e=>{let t={bariatricSurgery:2200,diabetes:2199,comorbidities:2201};return{answers:{[t.bariatricSurgery]:{order:1,answer:e.bariatricSurgery},[t.diabetes]:{order:2,answer:e.diabetes},[t.comorbidities]:{order:3,answer:e.comorbidities}},status:"completed",percentage:100,patientId:e.patientId,slug:"screener-questionnaire"}},Q=async e=>{let t=G(e);return await K.A.post("/api/hra-questionnaire",t)};var J=a(47353),$=a(83928),Z=a(33841),ee=a(13751),et=a(92323),ea=a(86687),ei=a(89225),er=a(97793),en=a(68792),eo=a(65159),es=a(39777),el=a(45352),ec=a(99221);let ed=e=>e===T.KaiserPermanente?y.PM["Kaiser Permanente"]:y.PM["SoNE Health"],eu=(e,t)=>{if(e===T.KaiserPermanente)return t},em=(e,t)=>{switch(e){case y.lk["1199SEIU"]:return!0;case y.lk.Aetna:case y.lk.Cigna:return[y.yj["New York"],y.yj["New Jersey"],y.yj.Connecticut].includes(t);case y.lk.BCBS:case y.lk.United:return t===y.yj["New York"];case y.lk.BCBSPPO:case y.lk.Other:case y.lk["Kaiser Colorado"]:case y.lk["Kaiser Georgia"]:case y.lk["Kaiser Hawaii"]:case y.lk["Kaiser MidAtlantic"]:case y.lk["Kaiser Northern California"]:case y.lk["Kaiser Northwest"]:case y.lk["Kaiser Southern California"]:case y.lk["Kaiser Washington"]:case y.lk["Kaiser Washington Options"]:default:return!1}},eg=e=>{let{bmi:t,comorbidity:a,insurance:i,insuranceCoverage:r,state:n}=e;return(!(t>=27)||!(t<=30)||a!==ec.Y9.Yes)&&r!==y.RS.SelfPay&&em(i,n)},ep=e=>{let{insuranceCoverage:t,insurance:a,state:i}=e;return t===y.RS.SelfPay?y.hT.CashPay:em(a,i)?void 0:y.hT.Insurance},eh=e=>{let{bmi:t,comorbidity:a,insuranceCoverage:i,insurance:r,state:n}=e;if(!eg({bmi:t,comorbidity:a,insurance:r,insuranceCoverage:i,state:n}))return y.XN.EligibleWaiting},eb=e=>{let{insurance:t,insuranceCoverage:a}=e;return a===y.RS.SelfPay?y.lk.SelfPay:t};var eC=function(e){return e.CreateLead="createLead",e.CreateContact="createContact",e.UpdateContact="updateContact",e.CheckBenefits="checkBenefits",e.DetermineBenefitsOrLead="determineBenefitsOrLead",e.DetermineContactOrLead="determineContactOrLead",e.FetchConsents="fetchConsents",e.UpdateEmail="updateEmail",e.SubmitHRA="submitHRA",e}(eC||{});let ex={...er.f,...eC},ef=ei.Ek[Z.fz.Flyte],ey={formData:{birthdate:"",comorbidity:"",currentWeightInPounds:"",dateOfHighestWeightValue:"",email:"",firstName:"",heightInFoot:"",heightInInch:"",highestWeightInPounds:"",insuranceCoverage:void 0,insuranceMemberID:"",insuranceOther:void 0,insurance:void 0,lastName:"",phone:"",state:void 0,termsAgreement:!1,howDidYouFindUS:"",referralProgram:void 0,comorbidities:[],diabetes:"",bariatricSurgery:""},bmi:void 0,benefitsCheck:void 0,otpData:void 0,consentsData:{items:[],userConsentStatus:[]},contactData:{},passwordData:{password:void 0,confirmPassword:void 0},flyteUserData:void 0,error:void 0},eD={...ee.AU,...ee.gQ,...ee.pE,...ee.UH,...ee.yF,...ee.n6,...ee.uN,...ee.yS,...ee.RW,...(0,ee.rS)(ey)},ev=(0,eo.mj)({types:{},guards:{isPreEligibilityMet:e=>{let{context:{formData:t,bmi:a}}=e;return en.J0.flyte({bmi:a,comorbidity:t.comorbidity})},isApplicationReviewRequired:e=>{let{context:{formData:t,bmi:a}}=e;return!$.A.shouldBypassIsApplicationReviewRequired({email:t.email})&&!eg({bmi:a,comorbidity:t.comorbidity,insuranceCoverage:t.insuranceCoverage,insurance:t.insurance,state:t.state})},isApplicationDetected:ea.L,isInsurerSelected:e=>{let{context:{formData:t}}=e;return!!t.insurance&&t.insurance!==Z.lk.Other},isAthenaRecordCreated:et.z},actions:eD}).createMachine({context:()=>ey,id:"flyteMachine",initial:ex.PreEligibility,states:{[ex.PreEligibility]:{id:ex.PreEligibility,initial:ex.Idle,states:{[ex.Idle]:{on:{SUBMIT:{target:ex.Submitting,actions:"updateFormData"}}},[ex.Submitting]:{entry:"assignBMI",always:[{guard:"isPreEligibilityMet",target:"#".concat(ex.ContactDetails)},{target:"#".concat(ex.EligibilityUnmet)}]}}},[ex.ContactDetails]:{id:ex.ContactDetails,initial:ex.Idle,states:{[ex.Idle]:{on:{SUBMIT:{target:"#".concat(ex.InsuranceDetails),actions:"updateFormData"}}}}},[ex.InsuranceDetails]:{id:ex.InsuranceDetails,initial:ex.Idle,states:{[ex.Idle]:{on:{BACK:{target:"#".concat(ex.ContactDetails)},SUBMIT:{target:"#".concat(ex.InsuranceDetailsReview),actions:"updateFormData"}}}}},[ex.InsuranceDetailsReview]:{id:ex.InsuranceDetailsReview,initial:ex.Idle,states:{[ex.Idle]:{on:{SUBMIT:{actions:"updateFormData",target:ex.Submitting}}},[ex.Submitting]:{initial:ex.DetermineBenefitsOrLead,states:{[ex.DetermineBenefitsOrLead]:{id:ex.DetermineBenefitsOrLead,always:[{guard:"isInsurerSelected",target:ex.CheckBenefits},{target:ex.CreateLead}]},[ex.CheckBenefits]:{id:ex.CheckBenefits,invoke:{src:(0,es.Sx)(async e=>{let{input:t}=e,a={...t,payerCode:ei.dT[t.insurance]};return await (0,z.R)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:{actions:(0,el.a)({benefitsCheck:e=>{let{event:t}=e;return t.output.data}}),target:ex.DetermineContactOrLead},onError:ex.DetermineContactOrLead}},[ex.DetermineContactOrLead]:{id:ex.DetermineContactOrLead,always:[{guard:"isApplicationReviewRequired",target:ex.CreateLead},{target:ex.CreateContact}]},[ex.CreateContact]:{id:ex.CreateContact,invoke:{src:(0,es.Sx)(async e=>{let{input:t}=e,a={...t.formData,referralProgram:t.formData.referralProgram,...t.benefitsCheck&&{benefitsCheck:t.benefitsCheck},company:ef,insurance:eb({insuranceCoverage:t.formData.insuranceCoverage,insurance:t.formData.insurance}),evolveOrganization:ed(t.formData.referralProgram),participantDepartmentorOrg:eu(t.formData.referralProgram,t.formData.insurance),accountId:ei.f3[Z.fz.Flyte]};return await (0,q.vY)(a)}),input:e=>{let{context:t}=e;return t},onDone:{actions:"assignContactData",target:"#".concat(ex.EmailVerification)},onError:[{guard:"isApplicationDetected",target:"#".concat(ex.ApplicationDetected)},{target:"#".concat(ex.InsuranceDetailsReview,".").concat(ex.Error)}]}},[ex.CreateLead]:{id:ex.CreateLead,invoke:{src:(0,es.Sx)(async e=>{let{input:t}=e,a={...t.formData,referralProgram:t.formData.referralProgram,...t.benefitsCheck&&{benefitsCheck:t.benefitsCheck},company:ef,insurance:eb({insuranceCoverage:t.formData.insuranceCoverage,insurance:t.formData.insurance}),evolveOrganization:ed(t.formData.referralProgram),ineligibilityReason:ep({insuranceCoverage:t.formData.insuranceCoverage,insurance:t.formData.insurance,state:t.formData.state}),leadStatus:eh({bmi:t.bmi,comorbidity:t.formData.comorbidity,insuranceCoverage:t.formData.insuranceCoverage,insurance:t.formData.insurance,state:t.formData.state}),automateEvolveEnrollment:eg({bmi:t.bmi,comorbidity:t.formData.comorbidity,insuranceCoverage:t.formData.insuranceCoverage,insurance:t.formData.insurance,state:t.formData.state}),participantDepartmentorOrg:eu(t.formData.referralProgram,t.formData.insurance)};return await (0,J.t)(a)}),input:e=>{let{context:t}=e;return t},onDone:[{guard:"isApplicationReviewRequired",target:"#".concat(ex.ApplicationReview)},{target:"#".concat(ex.ApplicationComplete)}],onError:[{guard:"isApplicationDetected",target:"#".concat(ex.ApplicationDetected)},{target:"#".concat(ex.InsuranceDetailsReview,".").concat(ex.Error)}]}}}},[ex.Error]:{id:"".concat(ex.InsuranceDetailsReview,".").concat(ex.Error),on:{SUBMIT:{actions:["updateFormData","resetBenefitsCheck"],target:ex.Submitting}}}}},[ex.EmailVerification]:{id:ex.EmailVerification,initial:ex.Idle,states:{[ex.Idle]:{id:"".concat(ex.EmailVerification,".").concat(ex.Idle),on:{SUBMIT:{actions:"assignOtpCode",target:ex.Submitting},RESEND_EMAIL_VERIFICATION:{target:ex.Idle,reenter:!0},UPDATE_EMAIL:{target:ex.UpdateEmail}},invoke:{input:e=>{var t;let{context:a,event:i}=e;return{email:a.formData.email,firstName:a.formData.firstName,onSuccess:null==i||null==(t=i.data)?void 0:t.onSuccess}},src:(0,es.Sx)(async e=>{let{input:t}=e,a={email:t.email,firstName:t.firstName};return{token:(await (0,X.v)(a)).data.token,onSuccess:t.onSuccess}}),onDone:{actions:[(0,el.a)({otpData:e=>{let{context:t,event:a}=e;return{...t.otpData,token:a.output.token}}}),e=>{var t;let{event:a}=e;(null==a||null==(t=a.output)?void 0:t.onSuccess)&&a.output.onSuccess()}]},onError:ex.Error}},[ex.Submitting]:{invoke:{src:(0,es.Sx)(async e=>{let{input:t}=e,a={email:t.formData.email,token:t.otpData.token,otp:t.otpData.otp};return await (0,V.R)(a)}),input:e=>{let{context:t}=e;return t},onDone:"#".concat(ex.OnboardingChecklist),onError:ex.Error}},[ex.Error]:{on:{SUBMIT:{actions:"assignOtpCode",target:ex.Submitting},RESEND_EMAIL_VERIFICATION:{target:ex.Idle},UPDATE_EMAIL:{target:ex.UpdateEmail}}},[ex.UpdateEmail]:{initial:ex.Idle,states:{[ex.Idle]:{invoke:{input:e=>{let{context:t,event:a}=e;return{contactId:t.contactData.contactId,email:a.data.email,onSuccess:a.data.onSuccess}},src:(0,es.Sx)(async e=>{let{input:t}=e,a={contactId:t.contactId,email:t.email};return await (0,q.CI)(a),{email:t.email,onSuccess:t.onSuccess}}),onDone:{actions:["assignNewEmail",e=>{var t;let{event:a}=e;(null==a||null==(t=a.output)?void 0:t.onSuccess)&&a.output.onSuccess()}],target:"#".concat(ex.EmailVerification,".").concat(ex.Idle)},onError:ex.Error}},[ex.Error]:{on:{SUBMIT:{target:"#".concat(ex.EmailVerification,".").concat(ex.Idle)},RESEND_EMAIL_VERIFICATION:{target:"#".concat(ex.EmailVerification,".").concat(ex.Idle)},UPDATE_EMAIL:{target:ex.Idle}}}}}}},[ex.ReviewConsents]:{id:ex.ReviewConsents,initial:ex.FetchConsents,states:{[ex.Idle]:{on:{SUBMIT:{actions:["assignUserConsentStatus"],target:ex.Submitting}}},[ex.FetchConsents]:{invoke:{src:(0,es.Sx)(async()=>await (0,W.i)()),onDone:{actions:"assignConsents",target:ex.Idle},onError:ex.Error}},[ex.Submitting]:{invoke:{src:(0,es.Sx)(async e=>{let{input:t}=e,a={patientIdentifier:t.contactData.contactId,firstName:t.formData.firstName,lastName:t.formData.lastName,phone:t.formData.phone,email:t.formData.email,birthDate:t.formData.birthdate,state:t.formData.state,heightInInch:t.formData.heightInInch,heightInFeet:t.formData.heightInFoot,currentWeightInPounds:t.formData.currentWeightInPounds,evolveOrganization:Z.PM.Flyte,consents:t.consentsData.userConsentStatus};return await (0,Y.Y)(a)}),input:e=>{let{context:t}=e;return t},onDone:[{actions:"assignFlyteUserData",target:ex.SubmitHRA}],onError:"#".concat(ex.OnboardingUserError)}},[ex.SubmitHRA]:{id:ex.SubmitHRA,invoke:{src:(0,es.Sx)(async e=>{let{input:t}=e,a={bariatricSurgery:t.formData.bariatricSurgery,diabetes:t.formData.diabetes,comorbidities:t.formData.comorbidities,patientId:t.flyteUserData.patientId};return await Q(a)}),input:e=>{let{context:t}=e;return t},onDone:{target:ex.UpdateContact},onError:{target:ex.UpdateContact}}},[ex.UpdateContact]:{invoke:{src:(0,es.Sx)(async e=>{let{input:t}=e,a={contactId:t.contactData.contactId,evolvePatientID:t.flyteUserData.patientId};return await (0,q.CI)(a)}),input:e=>{let{context:t}=e;return t},onDone:[{guard:"isAthenaRecordCreated",target:"#".concat(ex.CreatePassword)},{target:"#".concat(ex.OnboardingUserError)}],onError:"#".concat(ex.OnboardingUserError)}},[ex.Error]:{on:{SUBMIT:{actions:["assignUserConsentStatus"],target:ex.Submitting}}}}},[ex.CreatePassword]:{id:ex.CreatePassword,initial:ex.Idle,states:{[ex.Idle]:{on:{SUBMIT:{actions:"assignPasswordData",target:ex.Submitting}}},[ex.Submitting]:{invoke:{src:(0,es.Sx)(async e=>{let{input:t}=e,a={email:t.formData.email,password:t.passwordData.password,confirmPassword:t.passwordData.confirmPassword};return await (0,H.I)(t.flyteUserData.verifyToken,a)}),input:e=>{let{context:t}=e;return t},onDone:"#".concat(ex.AppDownload),onError:{target:ex.Error,actions:"assignError"}}},[ex.Error]:{on:{SUBMIT:{actions:["resetError","assignPasswordData"],target:ex.Submitting}}}}},[ex.OnboardingChecklist]:{id:ex.OnboardingChecklist,on:{SUBMIT:{target:"#".concat(ex.ReviewConsents)}}},[ex.AppDownload]:{id:ex.AppDownload},[ex.ApplicationReview]:{id:ex.ApplicationReview},[ex.OnboardingUserError]:{id:ex.OnboardingUserError},[ex.ApplicationComplete]:{id:ex.ApplicationComplete},[ex.ApplicationDetected]:{id:ex.ApplicationDetected},[ex.EligibilityUnmet]:{id:ex.EligibilityUnmet,initial:ex.Idle,states:{[ex.Idle]:{on:{SUBMIT:{target:ex.Submitting,actions:"updateFormData"}}},[ex.Submitting]:{invoke:{src:(0,es.Sx)(async e=>{let{input:t}=e,a={...t,company:ei.Ek[Z.fz.Flyte],leadStatus:Z.XN.Ineligible,ineligibilityReason:Z.hT.BMI,automateEvolveEnrollment:!1};return await (0,J.t)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:ex.Success,onError:ex.Error}},[ex.Success]:{},[ex.Error]:{on:{SUBMIT:{target:ex.Submitting}}}}}},on:{RESET:{target:"#".concat(ex.PreEligibility),actions:"reset"}}});var eI=a(69443);let eE={[D.C.PreEligibility]:{title:(0,i.jsxs)(S.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsxs)(S.TextPairing.Label,{color:"text-secondary-negative",children:["We're so glad you're here!"," ",(0,i.jsx)(S.Text,{as:"span",variant:"text-header-2XL",color:"text-primary",children:"Let's make sure you're eligible for FlyteHealth."})]}),(0,i.jsx)(S.TextPairing.SubLabel,{color:"text-secondary",children:"You must meet specific age and Body Mass Index (BMI) requirements* to be eligible for the FlyteHealth program."})]}),bmiEnrollmentDisclaimer:(0,i.jsx)(S.Text,{variant:"text-body-meta-regular",color:"text-secondary",children:"*We acknowledge that Body Mass Index (BMI) is an imperfect way to screen for excess weight. FlyteHealth providers do not use BMI alone as a measure of overall health. Instead, BMI is used as a data point to see if someone is eligible to join the FlyteHealth program. Once someone joins the program, we'll ask each person more about their health to create a personalized treatment plan."})},[D.C.EligibilityUnmet]:{title:(0,i.jsxs)(S.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(S.TextPairing.Label,{color:"text-secondary-negative",children:"Unfortunately, you are not eligible to join FlyteHealth at this time."}),(0,i.jsx)(S.TextPairing.SubLabel,{color:"text-secondary",children:"FlyteHealth requires a minimum BMI of 27+ (plus one or more weight-related health conditions) or a BMI of 30+"})]})},[D.C.ContactDetails]:{title:(0,i.jsxs)(S.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(S.TextPairing.Label,{color:"text-secondary-negative",children:"Congratulations! You're eligible for the FlyteHealth program"}),(0,i.jsx)(S.TextPairing.SubLabel,{color:"text-secondary",children:"Tell us a little more about yourself."})]})},[D.C.InsuranceDetails]:{title:(0,i.jsxs)(S.Text,{variant:"text-header-2XL",color:"text-secondary-negative",children:["One more thing:"," ",(0,i.jsx)(S.Text,{as:"span",variant:"text-header-2XL",color:"text-primary",children:"Do you have health insurance?"})]})},[D.C.InsuranceDetailsReview]:{title:(0,i.jsxs)(S.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(S.TextPairing.Label,{children:"Let's review: Is your info correct?"}),(0,i.jsx)(S.TextPairing.SubLabel,{color:"text-secondary",children:"Please double-check the information you provided to make sure everything is correct."})]})},[D.C.ApplicationComplete]:{title:(0,i.jsxs)(S.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(S.TextPairing.Label,{color:"text-secondary-negative",children:"Welcome aboard! We're so excited you're here."}),(0,i.jsx)(S.TextPairing.SubLabel,{color:"text-secondary",children:"Next, we need to confirm your email. Click the link we sent to:"})]}),description:(0,i.jsx)(S.Text,{mt:"spacer-8",color:"text-secondary",variant:"text-body-regular",children:"Can’t find the email? Make sure to check your Spam folder."})},[D.C.ApplicationReview]:{title:(0,i.jsxs)(S.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(S.TextPairing.Label,{color:"text-primary",children:"You're almost finished!"}),(0,i.jsx)(S.TextPairing.SubLabel,{color:"text-secondary",children:"We've received your application, but we need a little more information from you to move forward. Please call us to complete the application process."})]})},[D.C.ApplicationDetected]:{title:(0,i.jsx)(S.Text,{variant:"text-header-2XL",color:"text-primary",children:"We found an existing account for:"}),description:(0,i.jsx)(S.Text,{variant:"text-body-display-S",color:"text-secondary",children:"It looks like you already have an account with us. To continue or update your registration details, please contact our Care Coordinator team."})},[D.C.EmailVerification]:eI.M[D.C.EmailVerification],[D.C.OnboardingChecklist]:eI.M[D.C.OnboardingChecklist],[D.C.CreatePassword]:eI.M[D.C.CreatePassword],[D.C.AppDownload]:eI.M[D.C.AppDownload],[D.C.ReviewConsents]:eI.M[D.C.ReviewConsents]},eS=[y.lk["1199SEIU"],y.lk.Aetna,y.lk.BCBS,y.lk.BCBSPPO,y.lk.Cigna,y.lk["Kaiser Colorado"],y.lk["Kaiser Georgia"],y.lk["Kaiser Hawaii"],y.lk["Kaiser MidAtlantic"],y.lk["Kaiser Northern California"],y.lk["Kaiser Northwest"],y.lk["Kaiser Southern California"],y.lk["Kaiser Washington"],y.lk["Kaiser Washington Options"],y.lk.United,y.lk.Other],ew=[y.UX.Brochure,y.UX.Email,y.UX.Mailer,y.UX.OnsiteMonitor,y.UX.Poster,y.UX.ProviderReferral,y.UX.Other],eP=[y.UX.Brochure,y.UX.CoworkerReferral,y.UX.Email,y.UX.GoogleAd,y.UX.Poster,y.UX.PrintAd,y.UX.ProviderReferral,y.UX.SocialMedia,y.UX.TradeShow,y.UX.TVAd,y.UX.WebSearch,y.UX.WordOfMouth,y.UX.Other],eL={[D.C.ContactDetails]:{state:{options:w.rI},howDidYouFindUs:{options:{referrerOptions:ew,notReferrerOptions:eP}}},[D.C.InsuranceDetails]:{insuranceCoverage:{},insurance:{label:"Insurance Company",insuranceCarriers:eS},insuranceOther:{description:(0,i.jsx)(S.Text,{variant:"text-body-meta-regular",color:"text-secondary",children:"Enter the name of your insurance company"})},insuranceMemberID:{}},[D.C.InsuranceDetailsReview]:{insurance:{label:"Insurance Company",insuranceCarriers:eS}}},ej=y.fz.Flyte,eA=e=>{let{render:t}=e,[a,y]=(0,I.zl)(ev),S=(0,E.useMemo)(()=>(0,v.r)(a.value),[a.value]);(0,f.t)(S,ej);let w=(0,E.useCallback)(e=>{y({type:"SUBMIT",data:e})},[y]),P=(0,E.useCallback)(()=>{y({type:"BACK"})},[y]),L=(0,E.useCallback)(()=>{switch(S){case ex.PreEligibility:return(0,i.jsx)(C.P,{configuration:{contentResources:eE[D.C.PreEligibility]},onSubmit:w});case ex.ContactDetails:return(0,i.jsx)(_,{configuration:{contentResources:eE[D.C.ContactDetails],fields:eL[D.C.ContactDetails]},onSubmit:w,defaultValues:a.context.formData});case ex.EligibilityUnmet:return(0,i.jsx)(u.B,{configuration:{contentResources:eE[D.C.EligibilityUnmet]},onSubmit:w,loading:a.matches({[ex.EligibilityUnmet]:ex.Submitting}),isEmailSent:a.matches({[ex.EligibilityUnmet]:ex.Success}),hasError:a.matches({[ex.EligibilityUnmet]:ex.Error})});case ex.InsuranceDetails:return(0,i.jsx)(g.d,{configuration:{contentResources:eE[D.C.InsuranceDetails],fields:eL[D.C.InsuranceDetails]},onSubmit:w,onBack:P});case ex.InsuranceDetailsReview:return(0,i.jsx)(p.h,{configuration:{contentResources:eE[D.C.InsuranceDetailsReview],fields:eL[D.C.InsuranceDetailsReview]},onSubmit:w,loading:a.matches({[ex.InsuranceDetailsReview]:ex.Submitting}),hasError:a.matches({[ex.InsuranceDetailsReview]:ex.Error}),defaultValues:a.context.formData});case ex.ApplicationComplete:return(0,i.jsx)(n.Q,{...eE[D.C.ApplicationComplete],email:a.context.formData.email});case ex.ApplicationReview:return(0,i.jsx)(s.l,{...eE[D.C.ApplicationReview]});case ex.ApplicationDetected:return(0,i.jsx)(o.r,{...eE[D.C.ApplicationDetected],email:a.context.formData.email});case ex.EmailVerification:return(0,i.jsx)(m.e,{configuration:{contentResources:{title:eE[D.C.EmailVerification](a.context.formData.email).title}},email:a.context.formData.email,hasError:a.matches({[ex.EmailVerification]:ex.Error}),loading:a.matches({[ex.EmailVerification]:ex.Submitting}),isUpdateEmailLoading:a.matches({[ex.EmailVerification]:{[ex.UpdateEmail]:ex.Idle}}),hasUpdateEmailError:a.matches({[ex.EmailVerification]:{[ex.UpdateEmail]:ex.Error}}),onSubmit:w,onResendCode:e=>y({type:"RESEND_EMAIL_VERIFICATION",data:{onSuccess:e}}),onEditEmail:(e,t)=>y({type:"UPDATE_EMAIL",data:{email:e,onSuccess:t}})});case ex.OnboardingChecklist:return(0,i.jsx)(h.E,{configuration:{contentResources:eE[D.C.OnboardingChecklist]},onSubmit:w});case ex.ReviewConsents:return(0,i.jsx)(x.U,{configuration:{contentResources:eE[D.C.ReviewConsents]},consents:a.context.consentsData.items,hasError:a.matches({[ex.ReviewConsents]:ex.Error}),loading:a.matches({[ex.ReviewConsents]:ex.FetchConsents})||a.matches({[ex.ReviewConsents]:ex.Submitting})||a.matches({[ex.ReviewConsents]:ex.UpdateContact})||a.matches({[ex.ReviewConsents]:ex.SubmitHRA}),onSubmit:w});case ex.CreatePassword:return(0,i.jsx)(d.i,{configuration:{contentResources:eE[D.C.CreatePassword]},loading:a.matches({[ex.CreatePassword]:ex.Submitting}),error:a.context.error,onSubmit:w});case ex.AppDownload:return(0,i.jsx)(r.a,{title:eE[D.C.AppDownload].title,checklist:eE[D.C.AppDownload].checklist});case ex.OnboardingUserError:return(0,i.jsx)(b.C,{});default:return null}},[S,a]);return t({header:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.E,{partner:ej}),(0,i.jsx)(c.f,{currentStep:S})]}),body:L(),currentWorkFlowStep:S})}},92749:(e,t,a)=>{a.d(t,{s:()=>n});var i=a(16741),r=a(34305);let n={[r.fz.CareCompass]:{asset:{src:i.k[r.fz.CareCompass],width:"64px",height:"64px",alt:"Care Compass Logo"},name:"Care Compass",description:"State of Connecticut Health Plan Members"},[r.fz.Aetna]:{asset:{src:i.k[r.fz.Aetna],width:"141px",height:"32px",alt:"Aetna Logo"},name:"State of Connecticut: Aetna",description:"Aetna MA for State of Connecticut Retirees"},[r.fz.PequotHealthCare]:{asset:{src:i.k[r.fz.PequotHealthCare],width:"103px",height:"40px",alt:"Pequot Health Care Logo"},name:"Mashantucket Pequot Tribal Nation",description:"Pequot Healthy Weight Program"},[r.fz.RiverSpringLiving]:{asset:{src:i.k[r.fz.RiverSpringLiving],width:"158px",height:"24px",alt:"RiverSpring Living Logo"},name:"RiverSpring Living Employee Program",description:"Employees at The Hebrew Home at Riverdale by RiverSpring Living"},[r.fz.PyleFamilyInsurance]:{asset:{src:i.k[r.fz.PyleFamilyInsurance],width:"157px",height:"48px",alt:"Pyle Family Insurance Logo"},name:"A. Duie Pyle",description:"Pyle Weight Management Program for Employees"},[r.fz.MDSave]:{asset:{src:i.k[r.fz.MDSave],width:"56px",height:"56px",alt:"MDsave Logo"},name:"MDsave",description:"Patients in partnership with MDsave"},[r.fz["1199SEIU"]]:{asset:{src:i.k[r.fz["1199SEIU"]],width:"211px",height:"122px",alt:"1199SEIU Logo"},name:"1199SEIU",description:"1199SEIU"}}},96079:(e,t,a)=>{a.d(t,{Y:()=>N});var i=a(37876),r=a(37477),n=a(48934),o=a(14901),s=a(16741),l=a(533),c=a(6770),d=a(63583),u=a(86535),m=a(93511),g=a(34305),p=a(80072),h=a(97793),b=a(66885),C=a(62227),x=a(14232),f=a(47353),y=a(33841),D=a(86687),v=a(89225),I=a(68792),E=a(65159),S=a(45352),w=a(39777),P=function(e){return e.CreateLead="createLead",e}(P||{});let L={...h.f,...P},j=v.Ek[y.fz.MDSave],A={formData:{birthdate:"",comorbidity:"",currentWeightInPounds:"",dateOfHighestWeightValue:"",email:"",firstName:"",heightInFoot:"",heightInInch:"",highestWeightInPounds:"",insuranceCoverage:void 0,insuranceMemberID:"",insurance:void 0,lastName:"",phone:"",state:void 0,termsAgreement:!1,howDidYouFindUS:"",comorbidities:[],diabetes:"",bariatricSurgery:""},bmi:void 0},R=(0,E.mj)({types:{},guards:{isPreEligibilityMet:e=>{let{context:{bmi:t,formData:a}}=e;return I.J0.mdSave({bmi:t,comorbidity:a.comorbidity})},isApplicationDetected:D.L},actions:{updateFormData:(0,S.a)({formData:e=>{let{context:t,event:a}=e;return{...t.formData,...a.data}}}),assignBMI:(0,S.a)({bmi:e=>{let{context:t}=e,{heightInFoot:a,heightInInch:i,highestWeightInPounds:r}=t.formData;return(0,I.Hv)({heightFeet:(0,I.sC)(a),heightInches:(0,I.sC)(i),weightPounds:(0,I.sC)(r)})}}),reset:(0,S.a)({...A})}}).createMachine({context:()=>A,id:"mdSaveMachine",initial:L.PreEligibility,states:{[L.PreEligibility]:{id:L.PreEligibility,initial:L.Idle,states:{[L.Idle]:{on:{SUBMIT:{target:L.Submitting,actions:"updateFormData"}}},[L.Submitting]:{entry:"assignBMI",always:[{target:"#".concat(L.ContactDetails),guard:"isPreEligibilityMet"},{target:"#".concat(L.EligibilityUnmet)}]}}},[L.ContactDetails]:{id:L.ContactDetails,initial:L.Idle,states:{[L.Idle]:{on:{SUBMIT:{actions:"updateFormData",target:L.Submitting}}},[L.Submitting]:{id:L.Submitting,initial:L.CreateLead,states:{[L.CreateLead]:{id:L.CreateLead,invoke:{src:(0,w.Sx)(async e=>{let{input:t}=e,a={...t.formData,company:j,evolveOrganization:y.PM.MDsave,leadStatus:y.XN.EligibleWaiting,automateEvolveEnrollment:!1};return await (0,f.t)(a)}),input:e=>{let{context:t}=e;return t},onDone:"#".concat(L.ApplicationReview),onError:[{guard:"isApplicationDetected",target:"#".concat(L.ApplicationDetected)},{target:"#".concat(L.Error)}]}}}},[L.Error]:{id:L.Error,on:{SUBMIT:{actions:"updateFormData",target:L.Submitting}}}}},[L.ApplicationReview]:{id:L.ApplicationReview},[L.ApplicationDetected]:{id:L.ApplicationDetected},[L.EligibilityUnmet]:{id:L.EligibilityUnmet,initial:L.Idle,states:{[L.Idle]:{on:{SUBMIT:{target:L.Submitting,actions:"updateFormData"}}},[L.Submitting]:{invoke:{src:(0,w.Sx)(async e=>{let{input:t}=e,a={...t,company:j,leadStatus:y.XN.Ineligible,ineligibilityReason:y.hT.BMI,automateEvolveEnrollment:!1};return await (0,f.t)(a)}),input:e=>{let{context:{formData:t}}=e;return t},onDone:L.Success,onError:L.Error}},[L.Success]:{},[L.Error]:{on:{SUBMIT:{target:L.Submitting}}}}}},on:{RESET:{target:"#".concat(L.PreEligibility),actions:"reset"}}});var M=a(69443);let T={[p.C.PreEligibility]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-primary",children:"Let's make sure you're eligible for the FlyteHealth program."}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"To be eligible for the FlyteHealth program through your MDsave benefits, you must meet specific age and Body Mass Index (BMI)* requirements."})]}),bmiEnrollmentDisclaimer:(0,i.jsx)(r.Text,{variant:"text-body-meta-regular",color:"text-secondary",children:"*We acknowledge that Body Mass Index (BMI) is an imperfect way to screen for excess weight. FlyteHealth providers do not use BMI alone as a measure of overall health. Instead, BMI is used as a data point to see if someone is eligible to join the FlyteHealth program. Once someone joins the program, we'll ask each person more about their health to create a personalized treatment plan."})},[p.C.EligibilityUnmet]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-secondary-negative",children:"Unfortunately, you are not eligible to join FlyteHealth at this time."}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"The FlyteHealth program requires a minimum BMI of 27+ (plus one or more weight-related health conditions) or a BMI of 30+."})]})},[p.C.ContactDetails]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-secondary-negative",children:"Congratulations! You're eligible for the FlyteHealth program"}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"To help us match your information with your employer, tell us about yourself."})]})},[p.C.ApplicationReview]:{title:(0,i.jsxs)(r.TextPairing,{variant:"textpairing-header-2XL",children:[(0,i.jsx)(r.TextPairing.Label,{color:"text-primary",children:"You're almost finished!"}),(0,i.jsx)(r.TextPairing.SubLabel,{color:"text-secondary",children:"We've received your application, but we need a little more information from you to move forward. Please call us to complete the application process."})]})},[p.C.ApplicationDetected]:{title:(0,i.jsx)(r.Text,{variant:"text-header-2XL",color:"text-primary",children:"We found an existing account for:"}),description:(0,i.jsx)(r.Text,{variant:"text-body-display-S",color:"text-secondary",children:"It looks like you already have an account with us. To continue or update your registration details, please contact our Care Coordinator team."})},[p.C.OnboardingChecklist]:M.M[p.C.OnboardingChecklist],[p.C.CreatePassword]:M.M[p.C.CreatePassword],[p.C.AppDownload]:M.M[p.C.AppDownload],[p.C.ReviewConsents]:M.M[p.C.ReviewConsents]};var k=a(82393);let U=[g.UX.WordOfMouth,g.UX.Other],B={[p.C.ContactDetails]:{state:{options:k.rI},howDidYouFindUs:{options:U}}},F=new Map([[p.C.PreEligibility,l.n.get(p.C.PreEligibility)],[p.C.ContactDetails,l.n.get(p.C.ContactDetails)]]),O=g.fz.MDSave,N=e=>{let{render:t}=e,[a,f]=(0,C.zl)(R),y=(0,x.useMemo)(()=>(0,b.r)(a.value),[a.value]);(0,m.t)(y,O);let D=(0,x.useCallback)(e=>{f({type:"SUBMIT",data:e})},[f]),v=(0,x.useCallback)(()=>{switch(y){case h.f.PreEligibility:return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.Alert,{variant:"subtle",status:"warning",borderRadius:"none",justifyContent:"center",children:[(0,i.jsx)(r.Alert.Icon,{}),(0,i.jsxs)(r.Alert.Title,{children:["To continue, you must first purchase the MDsave FlyteHealth bundle. To purchase, click"," ",(0,i.jsx)(r.Link,{isExternal:!0,href:"https://www.mdsave.com/p/flyte-weight-loss-and-nutritional-counseling",fontWeight:"bold",children:"here"}),"."]})]}),(0,i.jsx)(u.P,{configuration:{contentResources:T[p.C.PreEligibility]},onSubmit:D})]});case h.f.ContactDetails:return(0,i.jsx)(c.x,{configuration:{contentResources:T[p.C.ContactDetails],fields:B[p.C.ContactDetails]},loading:a.matches({[h.f.ContactDetails]:h.f.Submitting}),onSubmit:D,defaultValues:a.context.formData});case h.f.EligibilityUnmet:return(0,i.jsx)(d.B,{configuration:{contentResources:T[p.C.EligibilityUnmet]},onSubmit:D,loading:a.matches({[h.f.EligibilityUnmet]:h.f.Submitting}),isEmailSent:a.matches({[h.f.EligibilityUnmet]:h.f.Success}),hasError:a.matches({[h.f.EligibilityUnmet]:h.f.Error})});case h.f.ApplicationReview:return(0,i.jsx)(o.l,{...T[p.C.ApplicationReview]});case h.f.ApplicationDetected:return(0,i.jsx)(n.r,{...T[p.C.ApplicationDetected],email:a.context.formData.email});default:return null}},[y,a]);return t({header:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.Flex,{gap:"spacer-5",alignItems:"center",children:[(0,i.jsx)(s.E,{partner:g.fz.Flyte}),(0,i.jsx)(r.Divider,{orientation:"vertical",alignSelf:"stretch",height:"auto"}),(0,i.jsx)(s.E,{partner:O})]}),(0,i.jsx)(l.f,{currentStep:y,steps:F})]}),body:v(),currentWorkFlowStep:y})}}}]);