PageSourceSearch

https://my.castandcrew.com/assets/index-BVmGX9gJ.js

js castandcrew.com collected 2026-09-24 19:45:55 UTC 79,668 bytes, 3 lines download raw bytes

1import{j as e,L as ut}from"./logger-KgGCinx1.js";import{m as I}from"./mycnc__loadShare__react__loadShare__-PAyoiw_s.js";import{u as mt}from"./index-BEIdKsB3.js";import{f as st,a as xt,w as ft}from"./withPayrollStatusProtection-B7ctBfWb.js";import{w as gt}from"./withAuthProtection-BhkOVgnT.js";import{C as X}from"./ContentBox-BPLlvzE9.js";import{T as a}from"./Typography-D-W-z5Q1.js";import{I as jt,a0 as le,G as t,x as W,bI as K,b as Je,D as F,aS as Ze,P as yt,f as Re,A as bt,an as _t,r as be,au as Qe,d as Ke,aD as Ct,B as rt,cV as Nt,ao as Ye,ap as it,z as R,y as ve,cW as Xe}from"./useRouting-Dqp11Q-s.js";import{C as O,R as se,S as ue}from"./SearchFieldAddress-D_1c5MlQ.js";import{s as ae}from"./support-Du98BZ_F.js";import{m as vt}from"./mycnc__loadShare__react_mf_2_router__loadShare__-BQVaZBX4.js";import{R as H}from"./Radio-DMkIs5gG.js";import{T as We}from"./Tooltip-Bj_krePP.js";import{g as ht}from"./getImagePath-LH39WJcP.js";import{T as D}from"./TextField-BOADulpL.js";import{T as St,a as At}from"./TextFieldSin-tSBkEJtc.js";import"./createNumberMask-K9oEwSPn.js";import{v as It,d as Pt,V as wt}from"./valid-DeVcQFyE.js";import{T as et}from"./TextFieldEmail-DX1hMSzo.js";import{C as pt}from"./Checkbox-DVILyJZW.js";import{M as de}from"./Modal-DjqOW1xk.js";import{u as Mt}from"./useCheckAuthentication-CHWEesE-.js";import{u as Tt}from"./useSnackbar-DniIwToJ.js";import $t from"./MobileDocumentSignerReskin-DOMDsOX8.js";import{M as Ge}from"./Modal-BCnxBDiq.js";import{p as Lt,a as Dt}from"./parseDocument-DF0rSSFm.js";/* empty css                         */import{M as ot,u as tt}from"./useMuiTheme-FYS5ZDPz.js";import{b as kt}from"./ProfileReskin-DfXUmxO4.js";import{E as G}from"./fmsEnums-DBJtWmIu.js";import{u as Ft}from"./useMinors-BjEVRhaE.js";import{g as _e}from"./get-D9TZbSFc.js";import{E as me}from"./enumHelper-BV8V_ezu.js";import{T as re}from"./TextFieldPhone-zjEp7Bi7.js";import{D as he}from"./Dropdown-BPYJmZiV.js";import{P as Et}from"./PrivacyPolicyFooter-DUjB9kgL.js";import"./_commonjsHelpers-DaWZu8wl.js";import"./mycnc__mf_v__runtimeInit__mf_v__-CPFIg_re.js";import"./replacePathRoot-D-2F2OYE.js";import"./useQuery-O5MA9QFW.js";import"./useWarnRemovedOption-DEHXyrmh.js";import"./preload-helper-CkTZxt06.js";import"./mycnc__loadShare__react_mf_2_dom__loadShare__-Byf9slX8.js";import"./Loqate-B1MW1oIL.js";import"./states-EsdVJD7S.js";import"./validateEmail-CnibqrCJ.js";import"./deepMerge-BQgLu7NS.js";import"./Layout-CuGUsDJS.js";import"./useConfiguration-DQJ3-Fg4.js";import"./SpotlightDataTable-MTMQm_lR.js";import"./index-CyDsmSCi.js";import"./phoneMask-tT-yE8Lg.js";import"./phoneMaskUSA-om6p_SLe.js";const Bt=h=>{const{maxChars:o=9,minChars:u=9,...d}=h,[x,s]=I.useState(!0);return e.jsx(D,{type:x?"text":"password",endIcon:e.jsx(jt,{size:"sm",buttonVariant:"ghost","aria-label":"toggle tax id visibility",iconName:x?"eye":"eye-slash",onClick:()=>s(!x),onMouseDown:c=>c.preventDefault()}),inputProps:{pattern:"[0-9]*",inputMode:"numeric",maxLength:o,minLength:u},...d})},Be={caps:1,cnc:2,ms:16},Rt="SupportFooter-module__footer___-zjj6",Wt="SupportFooter-module__iconContainer___EPbwg",Yt="SupportFooter-module__icon___C6-l-",Gt="SupportFooter-module__privacy___xcFlO",zt="SupportFooter-module__noPadding___w62n1",qt="SupportFooter-module__title___wMjgc",Ot="SupportFooter-module__hugRight___fIIAy",Vt="SupportFooter-module__hugLeft___z3GAd",Ht="SupportFooter-module__label___m6j2r",Ut="SupportFooter-module__labelContainer___VRWdr",Jt="SupportFooter-module__reverse___J-rfX",Zt="SupportFooter-module__short___4ptvw",Qt="SupportFooter-module__divider___uRQH8",Kt="SupportFooter-module__subHeader___LhRP2",M={footer:Rt,iconContainer:Wt,icon:Yt,privacy:Gt,noPadding:zt,title:qt,hugRight:Ot,hugLeft:Vt,label:Ht,labelContainer:Ut,reverse:Jt,short:Zt,divider:Qt,subHeader:Kt},nt=h=>{const{showPrivacy:o,whichSupport:u="helpDesk",variant:d,title:x}=h,s=ae&&u?ae[u]:ae.helpDesk,c=u==="helpDesk",f=c?ae.mediaServices:null;let l;return d==="box"?l=le(M.footer,M.noPadding):l=M.footer,e.jsxs(t,{container:!0,className:l,spacing:0,children:[e.jsx(t,{item:!0,xs:12,children:e.jsx(a,{className:M.title,variant:"h6",children:x||`Contact ${s.title} for Assistance`})}),c&&s?.subHeader&&e.jsx(t,{item:!0,xs:12,children:e.jsx(a,{variant:"caption",noMargin:!0,className:M.subHeader,children:s?.subHeader})}),e.jsxs(t,{item:!0,xs:12,md:6,className:M.hugRight,children:[e.jsxs("div",{className:M.labelContainer,children:[e.jsx("div",{className:M.iconContainer,children:e.jsx(W,{iconName:"phone",className:M.icon})}),e.jsx("span",{className:M.label,children:e.jsx(a,{className:M.short,children:"Phone"})})]}),e.jsx(a,{style:{marginBottom:0},children:e.jsx(K,{href:s&&s.phone&&s.phone.link,children:s&&s.phone&&s.phone.display})})]}),e.jsxs(t,{item:!0,xs:12,md:6,className:M.hugLeft,children:[e.jsxs("div",{className:le(M.labelContainer,M.reverse),children:[e.jsx("span",{className:M.label,children:e.jsx(a,{className:M.short,children:"Email"})}),e.jsx("div",{className:M.iconContainer,children:e.jsx(W,{iconName:"envelope",className:M.icon})})]})," ",e.jsx(a,{style:{marginBottom:0},children:e.jsx(K,{href:s&&s.email&&s.email.link,children:s&&s.email&&s.email.display})})]}),c&&f?.title&&e.jsxs(e.Fragment,{children:[e.jsx(t,{item:!0,xs:12,style:{display:"flex",justifyContent:"center"},children:e.jsx("div",{className:M.divider})}),e.jsx(t,{item:!0,xs:12,children:e.jsx(a,{variant:"caption",noMargin:!0,className:M.subHeader,children:f?.title})}),e.jsxs(t,{item:!0,xs:12,md:6,className:M.hugRight,children:[e.jsxs("div",{className:M.labelContainer,children:[e.jsx("div",{className:M.iconContainer,children:e.jsx(W,{iconName:"phone",className:M.icon})}),e.jsx("span",{className:M.label,children:e.jsx(a,{className:M.short,children:"Phone"})})]}),e.jsx(a,{children:e.jsx(K,{href:f?.phone?.link,children:f?.phone?.display})})]}),e.jsxs(t,{item:!0,xs:12,md:6,className:M.hugLeft,children:[e.jsxs("div",{className:le(M.labelContainer,M.reverse),children:[e.jsx("span",{className:M.label,children:e.jsx(a,{className:M.short,children:"Email"})}),e.jsx("div",{className:M.iconContainer,children:e.jsx(W,{iconName:"envelope",className:M.icon})})]})," ",e.jsx(a,{children:e.jsx(K,{href:f?.email?.link,children:f?.email?.display})})]})]}),o&&e.jsx(t,{item:!0,className:M.privacy,children:e.jsx(a,{variant:"caption",noMargin:!0,children:"The privacy and security of your data is important to us. We use 128-bit encryption to keep your data safe and will never sell your data to any third-parties."})})]})},Xt="Error-module__box___QNJSx",en={box:Xt},tn=h=>{const{root:o}=Je(),{state:u}=h,d=u?.error?.message||u?.error||"";return e.jsx(e.Fragment,{children:e.jsx(X,{className:en.box,id:"Error",children:e.jsxs(t,{container:!0,spacing:3,direction:"column",alignItems:"center",children:[!d&&e.jsxs(e.Fragment,{children:[e.jsx(t,{item:!0,xs:12,children:e.jsx(a,{variant:"h3",align:"center",id:"ErrorTitle",children:"Registration cannot be completed"})}),e.jsx(t,{item:!0,xs:12,children:e.jsxs(a,{variant:"body2",align:"center",children:["We're sorry, but the registration cannot be completed at this time.",e.jsx("br",{}),"For more information, please contact Customer Support."]}
1)}),e.jsx(t,{item:!0,xs:12,children:e.jsx(F,{href:"https://www.castandcrew.com/contact/",children:"Go to Customer Support"})})]}),d.includes("existing:")&&e.jsxs(e.Fragment,{children:[e.jsx(t,{item:!0,xs:12,children:e.jsx(a,{variant:"h3",align:"center",id:"ErrorTitle",children:"Registration cannot be completed"})}),e.jsx(t,{item:!0,xs:12,children:e.jsxs(a,{variant:"body2",align:"center",children:["We're sorry, but the registration cannot be completed at this time.",e.jsx("br",{}),"The minor you are trying to register is already registered.",e.jsx("br",{}),e.jsx("br",{}),"For more information, please contact Customer Support."]})}),e.jsx(t,{item:!0,xs:12,children:e.jsx(F,{href:"https://www.castandcrew.com/contact/",children:"Go to Customer Support"})})]}),d==="Minor not paid by C&C"&&e.jsxs(e.Fragment,{children:[e.jsx(t,{item:!0,xs:12,children:e.jsx(a,{variant:"h3",align:"center",id:"ErrorTitle",children:"Heads up!"})}),e.jsx(t,{item:!0,xs:12,children:e.jsxs(a,{variant:"body2",align:"center",children:["You selected “NO, I have not”. This portal is ONLY for people that have been paid by Cast & Crew, CAPS, or Media Services.",e.jsx("br",{}),e.jsx("br",{}),"Please contact Customer Support"]})}),e.jsxs(t,{item:!0,xs:12,container:!0,direction:"row",justifyContent:"flex-end",children:[e.jsx(F,{href:o,secondary:!0,children:"Close"}),"   ",e.jsx(F,{href:"https://www.castandcrew.com/contact/",children:"Go to Customer Support"})]})]})]})})})},nn="Wrong-module__contentBox___-guTC",sn="Wrong-module__subtitle___HmAN8",rn="Wrong-module__linkContainer___xhAGX",on="Wrong-module__link___7aV-Q",an="Wrong-module__cardContent___Iz5od",Q={contentBox:nn,subtitle:sn,linkContainer:rn,link:on,cardContent:an},ln=ae.helpDesk,cn=h=>{const{root:o}=Je(),{support:u=ln,title:d,desc:x}=h,s=x||e.jsxs(e.Fragment,{children:["There was a problem with your registration.",e.jsx("br",{}),"Please contact ",u?.title," for assistance."]});return e.jsx(e.Fragment,{children:e.jsx(X,{id:"Wrong",dense:!0,className:Q.contentBox,children:e.jsxs(t,{container:!0,spacing:2,className:Q.wrapper,justifyContent:"center",children:[e.jsx(t,{item:!0,xs:12,sm:8,md:12,children:e.jsx(a,{variant:"h3",id:"Error-Title",align:"center",children:d||"Something went wrong"})}),e.jsx(t,{item:!0,xs:12,sm:8,md:12,children:e.jsx(a,{id:"Error-subtitle",align:"center",className:Q.subtitle,variant:"body2",size:"short",children:s})}),e.jsx(t,{item:!0,xs:12,sm:8,md:12,children:e.jsxs(O,{children:[e.jsx(O.Title,{align:"center",children:`Contact ${u?.title}`}),e.jsx(O.Content,{children:e.jsxs(t,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",spacing:3,className:Q.cardContent,children:[e.jsxs(t,{item:!0,children:[e.jsx(a,{variant:"caption",children:"Phone"}),e.jsx(a,{variant:"body1",size:"short",className:Q.link,children:e.jsx(K,{className:le(Q.link),href:u?.phone2?.link||u?.phone?.link,children:u?.phone2?.display||u?.phone?.display})})]}),e.jsxs(t,{item:!0,children:[e.jsx(a,{variant:"caption",children:"Email"}),e.jsx(a,{variant:"body1",size:"short",className:Q.link,children:e.jsx(K,{className:le(Q.link),href:u?.email?.link,children:u?.email?.display})})]})]})})]})}),e.jsx(t,{item:!0,xs:12,sm:8,md:12,className:Q.linkContainer,children:e.jsx(K,{className:Q.withIcon,to:`${o}login`,id:"Back-ToDashboardLink",children:e.jsx(F,{id:"UpdateProfile-BackButton",fullWidth:!0,tertiary:!0,href:o,startIcon:e.jsx(W,{iconName:"chevron-left"}),className:Q.button,children:"Back to Dashboard"})})})]})})})},dn="Welcome-module__root___jbaFq",un="Welcome-module__leftPanel___wt0V6",mn="Welcome-module__rightPanel___Iste7",hn="Welcome-module__paper___DVi7o",pn="Welcome-module__innerLeft___UOpdI",xn="Welcome-module__hiddenLink___9O3El",fn="Welcome-module__withIcon___mrcGw",gn="Welcome-module__noHeight___pZ-mM",jn="Welcome-module__mobileExpand___u-PBU",yn="Welcome-module__group___Pg4LS",bn="Welcome-module__button___JMmdo",_n="Welcome-module__logo___lqBWI",Cn="Welcome-module__subtitle___Kmde4",Nn="Welcome-module__paperWrapper___U1-8U",V={root:dn,leftPanel:un,rightPanel:mn,paper:hn,innerLeft:pn,hiddenLink:xn,withIcon:fn,noHeight:gn,mobileExpand:jn,group:yn,button:bn,logo:_n,subtitle:Cn,paperWrapper:Nn},vn=ht("CnCLogoRegister.svg"),Sn=h=>{const{root:o}=Je(),u=Ze(),{flags:d,setStep:x,changeState:s,isMobile:c,state:f}=h,[l,m]=I.useState({paid:""}),{lockedEmail:n=!1}=f;if(I.useEffect(()=>{d.idvRedesign&&(s({hasBeenPaid:"true",email:u?.email,form:{guardianFirstName:u?.firstName,guardianLastName:u?.lastName}}),x("Affidavit"))},[]),d.idvRedesign)return null;const y=C=>{m({paid:C}),s({hasBeenPaid:C})},_=()=>{["true","maybe"].includes(l.paid)?x("FindAccount"):(s({error:new Error("Minor not paid by C&C")}
1),x("Error"))};return e.jsxs(I.Fragment,{children:[e.jsxs(t,{container:!0,spacing:0,className:V.root,id:"Welcome",children:[e.jsx(t,{item:!0,xs:12,md:6,className:V.leftPanel,children:e.jsx(t,{container:!0,spacing:0,justifyContent:"space-between",direction:"column",className:V.innerLeft,children:e.jsx(t,{item:!0,children:e.jsx(t,{container:!0,spacing:0,justifyContent:"center",children:e.jsxs(t,{item:!0,xs:12,sm:8,md:12,children:[e.jsx("div",{className:V.logo,children:e.jsx("img",{src:vn,alt:"CastandCrew Logo"})}),e.jsx(a,{variant:"h3",white:!0,children:"Minor Registration"}),e.jsx(a,{variant:"h5",white:!0,className:V.subtitle,children:"Tell us about the minor so that Cast & Crew can find and securely retrieve the data and link it to your MyCast&Crew account."})]})})})})}),c&&e.jsx(t,{item:!0,xs:12,className:V.noHeight,children:e.jsx("div",{className:V.mobileExpand,children:e.jsx(W,{iconName:"chevron-down"})})}),e.jsx(t,{item:!0,xs:12,md:6,className:V.rightPanel,children:e.jsx(yt,{className:V.paper,children:e.jsxs(t,{container:!0,spacing:0,className:V.paperWrapper,justifyContent:"center",children:[e.jsx(t,{item:!0,xs:12,sm:10,md:12,children:e.jsx(a,{variant:"h4",children:"Has this minor ever been paid by Cast & Crew, CAPS, or Media Services?"})}),e.jsx(t,{item:!0,xs:12,sm:10,md:12,children:e.jsxs(H.Group,{"aria-label":"Have been paid",name:"paid",id:"WelcomeRadioGroupPaid",className:V.group,value:l.paid,onChange:C=>y(C.target.value),children:[e.jsx(H,{value:"true",size:"short",id:"WelcomeRadioPaidYes",labelPosition:"right",children:"YES, I have"}),e.jsx(H,{value:"false",size:"short",id:"WelcomeRadioPaidNo",labelPosition:"right",children:"NO, I have not"}),e.jsx(H,{value:"maybe",size:"short",id:"WelcomeRadioPaidMaybe",labelPosition:"right",children:"I don't remember"})]})}),e.jsx(t,{item:!0,xs:12,sm:10,md:12,children:e.jsx(F,{fullWidth:!0,disabled:!l.paid,onClick:_,id:"WelcomeNextButton",className:V.button,children:"Next"})}),e.jsx(t,{item:!0,xs:12,sm:10,md:12,className:V.hiddenLink,children:e.jsxs(vt.Link,{className:V.withIcon,to:`${o}login`,id:"WelcomeToLoginLink",children:[e.jsx(W,{iconName:"chevron-left"})," Back to"," ",n?"dashboard":"login page"]})})]})})})]}),e.jsx(nt,{})]})},An="AgentNotAllowed-module__root___ctZqX",In="AgentNotAllowed-module__title___MOZH6",Pn="AgentNotAllowed-module__content___93oE-",ze={root:An,title:In,content:Pn},wn=h=>{const{show:o,onClose:u}=h,d="Agent Guardian Verification",x=e.jsx(e.Fragment,{children:"We’re sorry, as of this moment, we cannot verify agent minor guardianship. If you wish to be informed when we will be able to accommodate your request, please email us at [email protected]. We will be in contact with you shortly."});return e.jsxs(de,{open:o,onClose:u,id:"AgentNotAllowed",className:ze.root,children:[e.jsxs(de.Title,{className:ze.title,onClose:u,children:[e.jsx(W,{iconName:"triangle-exclamation"})," ",d]}),e.jsx(de.Content,{className:ze.content,children:e.jsx(de.ContentText,{id:"AgentNotAllowedMessage",children:x})})]})},Mn="FindAccount-module__box___uidmg",Tn="FindAccount-module__helpIcon___le7a9",$n="FindAccount-module__gridItems___B1J4x",Ln="FindAccount-module__toolTip___aZrFQ",Dn="FindAccount-module__nextButton___JlEYu",kn="FindAccount-module__backButton___6iw5C",Fn="FindAccount-module__leftArrow___33Ysr",En="FindAccount-module__group___3BT93",Bn="FindAccount-module__sample___8xv1n",Rn="FindAccount-module__future___U6uG-",Wn="FindAccount-module__link___O7jAP",B={box:Mn,helpIcon:Tn,gridItems:$n,toolTip:Ln,nextButton:Dn,backButton:kn,leftArrow:Fn,group:En,sample:Bn,future:Rn,link:Wn},at=/^[a-zA-Z \-.']*$/,Se=/^[0-9]*$/,Yn=h=>{const o=Tt(),{setStep:u,changeState:d,state:x,isMobile:s,canadaEnabled:c}=h,{lockedEmail:f}=x,[l,m]=I.useState(31),[n,y]=I.useState({firstName:"",lastName:"",email:"",ssn:"",sin:"",dob:"",month:"",year:"",day:"",representativeType:"",guardianFirstName:"",guardianLastName:""}),_=!!f,[C,p]=I.useState(f||""),[r,i]=I.useState("ssn"),[N,w]=I.useState(!1),[$,v]=I.useState(!1),[g,A]=I.useState(!1),[Y,T]=I.useState(!1),L=new Date().getFullYear(),j=L-105;I.useEffect(()=>{if(n?.year?.length===4){const S=st(n.month),te=st(n.day),U=n.year;w(!1);const pe=`${S}/${te}/${U}`;y({...n,dob:pe}),w(new Date(pe)>new Date),m(xt(S,U)||31),n.month&&n.day&&T(Re().diff(new Date(pe),"years")>18)}},[n.year,n.month,n.day]),I.useEffect(()=>{n.representativeType==="agent"&&A(!0)},[n.representativeType]);const b=()=>{A(!1)};Mt(S=>{if(S){const{email:te,given_name:U,family_name:pe}=S.claims||{};d({lockedEmail:te}),p(te),y({...n,email:te,guardianFirstName:U,guardianLastName:pe})}});const k=!(n.firstName&&n.lastName&&n.month>0&&n.month<13&&n.day>0&&n.day<=l&&n.year>j&&n.year<=L&&new Date(n.dob)<new Date&&It(Pt,n.dob||"")&&(!s&&r==="ssn"&&n?.ssn?.length===11||!s&&r==="sin"&&n?.sin?.length===11||s&&r==="ssn"&&n?.ssn.length===9||s&&r==="sin"&&n?.sin.length===9)&&_&&$),z=()=>{Y||(r==="sin"?n.sin=n.sin.length===9?n.sin.substring(0,3)+"-"+n.sin.substring(3,6)+"-"+n.sin.substring(n.sin.length-3,n.sin.length):n.sin||null:n.ssn=n.ssn.length===9?n.ssn.substring(0,3)+"-"+n.ssn.substring(3,5)+"-"+n.ssn.substring(n.ssn.length-4,n.ssn.length):n.ssn||null,d({form:n,email:C,idType:r}),u("Affidavit"))},Z=S=>{o({type:"error",message:`The ${S}
1 you provided is not valid. Please update your ${S} to proceed.`})},P=()=>{const S=r==="sin"?n.sin:n.ssn;wt[r](S)?z():Z(r.toUpperCase())},E=e.jsxs(a,{variant:"caption",children:["You accept this"," ",e.jsx(_t,{href:"https://www.castandcrew.com/privacy-policy/",target:"_blank",rel:"noopener noreferrer",id:"FindAccount-PrivacyPolicyLink",className:B.link,children:"Privacy Policy"}),", including verification of your identity with third parties, when you sign up for access, or use our products, services, content, features, technologies or functions offered on our website and all related sites, applications, and services.",e.jsx("br",{}),e.jsx("br",{}),"You authorize your wireless carrier to use or disclose information about your account and your wireless device, if available, to Cast & Crew or its service provider for the duration of your business relationship, solely to help them identify you or your wireless device and to prevent fraud. See our Privacy Policy for how to see how we treat your data."]});return e.jsxs(e.Fragment,{children:[e.jsx(X,{className:B.box,id:"FindAccount",children:e.jsxs(t,{container:!0,spacing:3,direction:"column",alignItems:"center",children:[e.jsx(t,{item:!0,xs:12,sm:8,md:12,children:e.jsx(a,{variant:"h3",center:!0,children:"Let's find your minor's account"})}),e.jsx(t,{item:!0,xs:12,sm:8,md:12,style:{marginBottom:28},children:e.jsxs(a,{variant:"body2",align:"center",children:["We'll use this information to find them in our database.",e.jsx("br",{}),"Please use their full, legal name.",e.jsx("br",{}),e.jsx("br",{}),"* Denotes required field"]})}),e.jsx(t,{item:!0,xs:12,sm:8,md:12,children:e.jsxs(t,{container:!0,spacing:1,children:[e.jsx(t,{item:!0,xs:12,children:e.jsx(D,{value:n.firstName,onChange:S=>{at.test(S.target.value)&&y({...n,firstName:S.target.value})},required:!0,className:B.gridItems,label:"First Name of Minor",id:"FindAccountFirstName"})}),e.jsx(t,{item:!0,xs:12,children:e.jsx(D,{value:n.lastName,onChange:S=>{at.test(S.target.value)&&y({...n,lastName:S.target.value})},required:!0,className:B.gridItems,label:"Last Name of Minor",id:"FindAccountLastName"})}),e.jsxs(t,{item:!0,xs:12,children:[e.jsx(a,{size:"long",noMargin:!0,children:"Select the identification number type below that they use for taxes and payroll. *"}),e.jsxs(H.Group,{"aria-label":"Identification Number",name:"identification number",id:"FindAccountRadioGroupId",className:B.group,value:r,onChange:S=>{i(S.target.value),y({...n,ssn:"",sin:""}),v(!1)},children:[e.jsx(H,{value:"ssn",id:"FindAccountRadioSsn",labelPosition:"right",children:"American SSN"}),e.jsx(H,{value:"sin",id:"FindAccountRadioSin",labelPosition:"right",children:"Canadian SIN"})]})]}),e.jsxs(t,{item:!0,xs:11,children:[!s&&r==="ssn"?e.jsx(St,{onChange:S=>{y({...n,ssn:S.target.value})},value:n.ssn,className:B.gridItems,toggle:!0,required:!0,label:"SSN of minor",id:"FindAccountSsn",inputProps:{pattern:"[0-9]*",inputMode:"numeric"}}):!s&&r==="sin"?e.jsx(At,{onChange:S=>{y({...n,sin:S.target.value})},value:n.sin,className:B.gridItems,toggle:!0,required:!0,label:"SIN of minor",id:"FindAccountSin",inputProps:{pattern:"[0-9]*",inputMode:"numeric"}}):e.jsx(Bt,{onChange:S=>{Se.test(S.target.value)&&y(r==="ssn"?{...n,ssn:S.target.value}:{...n,sin:S.target.value})},value:r==="ssn"?n.ssn:n.sin,className:B.gridItems,required:!0,label:r==="ssn"?"SSN of minor":"SIN of minor",id:r==="ssn"?"FindAccountSsn":"FindAccountSin",inputProps:{pattern:"[0-9]*",inputMode:"numeric",maxLength:9}}),e.jsx(a,{children:"Date of Birth of minor *"}),e.jsx(a,{className:B.sample,italic:!0,children:"example: 04 28 2010"})]}),e.jsx(t,{item:!0,xs:1,children:e.jsx("div",{className:B.toolTip,children:e.jsx(We,{id:"FindAccountToolTip",enterTouchDelay:100,position:s?"top-right":"right-center",size:s?"small":"large",content:c?"We require their SSN or SIN to verify your identity. If they are a dual national, you will need to register them with two separate emails, one for each ID number.":`We require their Social Security Number to verify their identity.
2              We use 128-bit encryption to keep your data safe and will never sell
3              your data to any third-parties.`,children:e.jsx(W,{iconName:"
3circle-question",className:B.helpIcon})})})}),e.jsx(t,{item:!0,xs:12,sm:8,children:e.jsxs(t,{container:!0,spacing:2,children:[e.jsxs(t,{item:!0,xs:3,children:[e.jsx(D,{value:n.month,onChange:S=>{Se.test(S.target.value)&&y({...n,month:S.target.value})},error:parseInt(n.month)>12||parseInt(n.month)<1||N,helperText:parseInt(n.month)>12||parseInt(n.month)<1?"Invalid month":"",required:!0,className:B.gridItems,label:"Month",id:"FindAccount-DobMonth",inputProps:{maxLength:2,pattern:"[0-9]*",inputMode:"numeric"}}),N&&e.jsx(a,{variant:"caption",className:B.future,children:"Date of Birth can't be in the future."}),Y&&e.jsx(a,{variant:"caption",className:B.future,children:"This form is only for registering minors."})]}),e.jsx(t,{item:!0,xs:3,children:e.jsx(D,{value:n.day,onChange:S=>{Se.test(S.target.value)&&y({...n,day:S.target.value})},error:parseInt(n.day)>l||parseInt(n.day)<1||N,helperText:parseInt(n.day)>l||parseInt(n.day)<1?"Invalid day":"",required:!0,className:B.gridItems,label:"Day",id:"FindAccount-DobDay",inputProps:{maxLength:2,pattern:"[0-9]*",inputMode:"numeric"}})}),e.jsx(t,{item:!0,xs:6,sm:5,children:e.jsx(D,{value:n.year,onChange:S=>{Se.test(S.target.value)&&y({...n,year:S.target.value})},error:parseInt(n.year)<j||parseInt(n.year)>L||N,helperText:(parseInt(n.year)<j||parseInt(n.year)>L)&&!N?"Invalid year":"",required:!0,className:B.gridItems,label:"Year",id:"FindAccount-DobYear",inputProps:{maxLength:4,pattern:"[0-9]*",inputMode:"numeric"}})})]})}),!Y&&e.jsx(t,{item:!0,xs:12,children:e.jsx(bt,{warning:!0,title:"Crew Member is a Minor",children:"Minor (under 18 years old) will not be able to provide an email address, create a digital profile, or directly access any of the Cast & Crew digital products. Their profile must be linked to a guardian who can access the MyCast&Crew profile on their behalf."})}),e.jsxs(t,{item:!0,xs:12,children:[e.jsx(a,{size:"long",noMargin:!0,children:"Plese make a selection to determine if you could move forward *"}),e.jsxs(H.Group,{"aria-label":"Representative Type",name:"representativeType",id:"findAccountRepresentativeType",className:B.group,value:n.representativeType,onChange:S=>{y({...n,representativeType:S.target.value})},children:[e.jsx(H,{value:"guardian",id:"FindAccountRadioGuardian",labelPosition:"right",children:"Legal Guardian"}),e.jsx(H,{value:"agent",id:"FindAccountRadioAgent",labelPosition:"right",children:"Agent"})]})]}),e.jsx(wn,{show:g,onClose:b}),e.jsxs(t,{item:!0,xs:12,children:[e.jsx(a,{variant:"h5",noMargin:!0,style:{marginTop:16},children:"Guardian Account Email"}),e.jsx(a,{size:"short",noMargin:!0,style:{marginBottom:20},children:"We’ll send an activation email to this address."})]}),e.jsx(t,{item:!0,xs:12,children:e.jsx(D,{value:n.guardianFirstName,onChange:()=>{},disabled:!0,className:B.gridItems,label:"Guardian First Name",id:"FindAccountGuardianFirstName"})}),e.jsx(t,{item:!0,xs:12,children:e.jsx(D,{value:n.guardianLastName,onChange:()=>{},disabled:!0,className:B.gridItems,label:"Guardian Last Name",id:"FindAccountGuardianLastName"})}),e.jsx(t,{item:!0,xs:12,children:e.jsx(et,{value:C,onChange:()=>{},id:"FindAccountGuardianEmail",required:!0,label:"Guardian Email",disabled:!!_,className:B.gridItems})}),e.jsxs(t,{item:!0,xs:12,children:[E,e.jsx(pt,{id:"FindAccountReadAcceptCheckbox",checked:$,onChange:S=>v(S.target.checked),disabled:n.representativeType==="agent",children:"I have read this agreement and accept"})]}),e.jsx(t,{item:!0,xs:12,children:e.jsx(F,{id:"FindAccountNextButton",disabled:k||n.representativeType==="agent"||Y,onClick:P,className:B.nextButton,children:"Next"})}),e.jsx(t,{item:!0,xs:12,children:e.jsxs(F,{tertiary:!0,id:"CreatePasswordBackButton",className:B.backButton,onClick:()=>u("Welcome"),children:[e.jsx(W,{iconName:"chevron-left",className:B.leftArrow}),"Back"]})})]})})]})}),e.jsx(nt,{isMobile:s,showPrivacy:!0,canadaEnabled:c})]})},Gn="Affidavit-module__warningRow___IzyH5",zn="Affidavit-module__warningText___oSrxM",lt={warningRow:Gn,warningText:zn},qn=(h,o)=>{const u=h?.form||{},d=[u.guardianFirstName,u.guardianLastName].filter(Boolean);return{name:d.join(" "),email:h?.email,initials:d.map(x=>x[0]).join(""),lastName:u.guardianLastName,firstName:u.guardianFirstName,uid:o.uid}},On=h=>{const{flags:o,state:u,changeState:d,setStep:x}=h,[s,c]=I.useState(null),[f,l]=I.useState(!0),[m,n]=I.useState(!1),[y,_]=I.useState(!1),C=Ze(),p=ut("Minors.Internal.Registration.Affidavit"),r=qn(u,C),i={type:"crew"},N=mt({query:"(max-width: 960px)"}),w=be("createAffidavitDocument",{scopes:null,request:j=>({input:JSON.stringify(j)}),response:j=>j.data.createAffidavitDocument||null}),$=be("submitAffidavitDocument",{scopes:null,request:j=>({input:JSON.stringify(j)}),response:j=>j.data.submitAffidavitDocument||!1}),v=Qe("getAffidavitDocumentImages",{scopes:null,request:j=>({input:JSON.stringify(j)}),response:j=>(j.data.getAffidavitDocumentImages||[]).map(({url:b})=>b)});if(I.useEffect(()=>{(async()=>{o.idvRedesign||Re().diff(new Date(u?.form?.dob),"years")>=18&&(p.error(new Error("Attempt was made using a non-minor dob")),x("Wrong"));try{let b=await w(r);if(b.document||(b=await w({id:b.id,...r})),!b.document){console.error(b),l(!1);return}const k=Lt(b.document);d({affidavitDocumentId:b.document.id}),c(k),_(!!k),l(!1)}catch(b){p.error(b),l(!1),d({error:new Error("Could not create Affidavit Document")}),x("Error")}})()},[]),f)return e.jsx(Ke,{CompleteScreen:!0});const g=j=>{p.debug("Document Data",{data:j});const b=j.id,k=j.fields.map(({id:Z,value:P})=>({id:Z,value:P}));$({id:b,fields:k,actorInfo:r}).then(()=>{p.debug("Submitted"),x(o.idvRedesign?"CompleteProfile":"ConfirmIdentity")}).catch(Z=>{p.error(Z),x("Wrong")})},A=()=>{_(!1),n(!0)},Y=()=>{x("Error")},T=j=>{g(j[0])},L={submit:{text:"Submit",action:j=>
3T(j)},cancel:{text:"Cancel",action:Y}};return e.jsxs(e.Fragment,{children:[e.jsxs(Ge,{open:y,title:"Guardianship Acknowledgment",maxWidth:450,children:[e.jsx(Ge.Content,{"data-test-id":"GuardianshipAcknowledgment-content",children:e.jsxs("div",{className:lt.warningRow,children:[e.jsx(Ct,{iconName:"triangle-exclamation",iconFamilyVariant:"solid",tone:"attention",size:"md","aria-hidden":!0}),e.jsx("p",{className:`spotlight_body-md ${lt.warningText}`,children:"Only one guardian will be able to access this minor's information. Guardianship cannot be changed once it is set."})]})}),e.jsxs(Ge.Actions,{children:[e.jsx(rt,{buttonVariant:"outlined",onPress:Y,children:"Cancel"}),e.jsx(rt,{buttonVariant:"solid",onPress:A,children:"Acknowledge"})]})]}),e.jsx(de,{fullScreen:!0,open:m,style:{zIndex:1100},children:e.jsx(de.Content,{children:N?e.jsx($t,{documents:[s],actor:r,getDocumentImageUrls:({documentId:j,page:b})=>v({documentId:j,page:b,uid:r.uid}),throwFatalError:j=>p.error(j),actions:L,title:"Guardianship Acknowledgment",alertMessage:""}):e.jsx(Nt.DocumentSigner,{styledEngineInjectFirst:!0,params:i,documents:[s],actor:r,getDocumentImageUrls:({documentId:j,page:b})=>v({documentId:j,page:b,uid:r.uid}),actions:{submit:{text:"Submit",action:j=>g(j[0])},cancel:{text:"Cancel",action:Y}},throwFatalError:j=>p.error(j)})})})]})},Vn="ThankYou-module__root___-Fs7V",Hn="ThankYou-module__content___mmdhw",Un="ThankYou-module__center___4-nwA",xe={root:Vn,content:Hn,center:Un},Jn=ht("trophy.svg"),Zn=()=>{const h=ae.helpDesk,o=ae.mediaServices;return e.jsx(e.Fragment,{children:e.jsxs(t,{container:!0,spacing:2,justifyContent:"center",className:xe.root,children:[e.jsx(t,{item:!0,xs:12,md:8,lg:4,xl:3,children:e.jsx(X,{className:xe.content,id:"ThankYou",children:e.jsx(t,{container:!0,spacing:7,className:xe.center,children:e.jsx(t,{item:!0,xs:12,children:e.jsxs(t,{container:!0,spacing:3,children:[e.jsx(t,{item:!0,xs:12,children:e.jsx(a,{h3:!0,noMargin:!0,children:"Thank you for registering"})}),e.jsx(t,{item:!0,xs:12,children:e.jsxs(a,{body2:!0,short:!0,noMargin:!0,children:["Check your inbox for an email containing a link to activate and secure your account. ",e.jsx("br",{}),e.jsx("br",{}),"You should receive an email within 24 hours if your information matches our records. If not, contact our Employee Help Desk."]})}),e.jsx(t,{item:!0,xs:12,children:e.jsx("img",{src:Jn,alt:"Verified trophy"})})]})})})})}),e.jsx(t,{item:!0,xs:12,md:4,lg:3,xl:2,children:e.jsx(t,{container:!0,spacing:2,children:e.jsx(t,{item:!0,xs:12,children:e.jsx(X,{className:xe.content,children:e.jsxs(t,{container:!0,spacing:4,className:xe.center,children:[e.jsx(t,{item:!0,xs:12,children:e.jsx(a,{h4:!0,noMargin:!0,children:"Employee Help Desk"})}),e.jsx(t,{item:!0,xs:12,children:e.jsxs(t,{container:!0,spacing:3,children:[e.jsxs(t,{item:!0,xs:12,style:{paddingBottom:4},children:[e.jsx(a,{h5:!0,children:"Cast & Crew"}),e.jsx(a,{caption:!0,medium:!0,noMargin:!0,children:"Email"}),e.jsx(a,{body1:!0,short:!0,noMargin:!0,children:e.jsx(K,{href:h?.email?.link,children:h?.email?.display})}),e.jsx(a,{caption:!0,medium:!0,noMargin:!0,style:{marginTop:8},children:"Phone"}),e.jsx(a,{body1:!0,short:!0,noMargin:!0,children:e.jsx(K,{href:h?.phone?.link,children:h?.phone?.display})})]}),e.jsxs(t,{item:!0,xs:12,style:{marginTop:0,paddingTop:0},children:[e.jsx(a,{h5:!0,children:o.title}),e.jsx(a,{caption:!0,medium:!0,noMargin:!0,children:"Email"}),e.jsx(a,{body1:!0,short:!0,noMargin:!0,children:e.jsx(K,{href:o?.email?.link,children:o?.email?.display})}),e.jsx(a,{caption:!0,medium:!0,noMargin:!0,style:{marginTop:8},children:"Phone"}),e.jsx(a,{body1:!0,short:!0,noMargin:!0,children:e.jsx(K,{href:o?.phone?.link,children:o?.phone?.display})})]})]})})]})})})})})]})})},qe=G.typeofContact.primary,Qn=G.typeofContact.secondary,Kn=G.typeofContact.mailing,Xn=G.typeofContact.emergency,es=h=>{const{state:o,changeState:u,setStep:d}=h,{form:x}=o,s=Ze(),{country:c}=kt(),[f,l]=I.useState(!1),m=o?.email?.toLowerCase(),n=e.jsx(Ye,{noMargin:!0,style:{marginTop:8},children:"Update your information below."}),y=i=>{u({profileForm:i})},_=be("createMinorProfile",{request:i=>({input:i}),response:i=>i.data.createMinorProfile||!1}),r={variant:"large",noInfo:!0,useSingleAddress:!0,excludedFields:["isGenderNonBinary","screenName"],setForm:y,onSubmit:i=>{const N={country:c,ssn:i.ssn||i.sin,birthDate:i.birthDate,firstName:i.firstName,lastName:i.lastName,affidavit:o?.affidavitDocumentId,guardianFirstName:s.firstName,guardianLastName:s.lastName,basicInfo:{gender:parseInt(i.gender,10),ethnicity:parseInt(i.ethnicity,10),isGenderNonBinary:i.isGenderNonBinary||!1,birthDate:i.birthDate,sameasprimaryAddress:i.sameAsPrimary},phoneNumbers:[{typeofContact:qe,countryCode:parseInt(i.phoneCountryCode,10),cell:(i?.phoneNumber||"").replace(/\D/g,"")}],addresses:[{typeofContact:qe,addressLine1:i.primaryAddressLine1,addressLine2:i.primaryAddressLine2,city:i.primaryAddressCity,state:i.primaryAddressState,zipCode:i.primaryAddressZip?.replaceAll('"',""),country:i.primaryAddressCountry},{typeofContact:Kn,addressLine1:i.mailingAddressLine1,addressLine2:i.mailingAddressLine2,city:i.mailingAddressCity,state:i.mailingAddressState,zipCode:i.mailingAddressZip?.replaceAll('"',""),country:i.mailingAddressCountry}],alternativeContacts:[{basicInfo:{name:i.emergencyContact},addresses:{typeofContact:Xn,addressLine1:i.emergencyContactAddressLine1,addressLine2:i.emergencyContactAddressLine2,city:i.emergencyContactAddressCity,state:i.emergencyContactAddressState,zipCode:i.emergencyContactAddressZip?.replaceAll('"',""),country:i.emergencyContactAddressCountry},phoneNumbers:[{typeofContact:qe,countryCode:parseInt(i.emergencyContactPhoneCountryCode,10),cell:(i?.emergencyContactPhoneNumber||"").replace(/\D/g,"")},{typeofContact:Qn,countryCode:parseInt(i.emergencyContactMobileCountryCode,10),cell:(i?.emergencyContactMobileNumber||"").replace(/\D/g,"")}],relationship:parseInt(i.emergencyContactRelationship,10)}]};_(N).then(()=>d("ThankYou")).catch(w=>{console.error(w),d("Wrong")})},onCancel:()=>l(!0),getProfileData:()=>({guardian:{firstName:x?.guardianFirstName,lastName:x?.guardianLastName,email:m}}),getProfileMappings:()=>null,isMyCnC:!0,isCanada:c==="CAN"||!1,genderEnabledCan:!0,notifyOnArrestEnabled:!0,isSsn:c!=="CAN",isMinor:!0,readOnly:{firstName:!1,lastName:!1,middleName:!1,email:!1,ssn:!1,birthDate:!1},forceRequired:["emergencyContact","gender","ethnicity","emergencyContactRelationship","emergencyContactPhoneNumber"],refreshProfileData:()=>{},submitButtonLabel:"Save"};return e.jsxs(e.Fragment,{children:[e.jsx(Dt,{title:"Complete Your Minor's Profile",paragraph:n,config:r}),e.jsx(ot,{open:f,onClose:()=>l(!1),disableBackdropClick:!0,disableEscapeKeyDown:!0,children:e.jsx(ot.Content,{sx:{padding:"24px !important",maxWidth:360},children:e.jsxs(t,{container:!0,spacing:2,children:[e.jsx(t,{item:!0,xs:12,children:e.jsx(Ye,{h4:!0,noMargin:!0,children:"Are you sure?"})}),e.jsx(t,{item:!0,xs:12,children:e.jsxs(Ye,{noMargin:!0,children:["Are you sure you want to cancel your registration? ",e.jsx("br",{}),"All progress will be lost."]})}),e.jsx(t,{item:!0,xs:12,children:e.jsxs(t,{container:!0,spacing:2,justifyContent:"flex-end",children:[e.jsx(t,{item:!0,children:e.jsx(it,{secondary:!0,onClick:()=>l(!1),children:"Back"})}),e.jsx(t,{item:!0,children:e.jsx(it,{onClick:()=>d("Error"),children:"I'm Sure"})})]})})]})})})]})},ts=h=>{const[o,u]=I.useState([]),[d,x]=I.useState(!0),[s,c]=I.useState(null),f=Qe("GetVerificationAddresses",{request:()=>({input:h}),response:l=>l.data.getVerificationAddresses||[]});return I.useEffect(()=>{(async()=>{try{u(await f()),x(!1)}catch(m){c(m.message),x(!1)}})()},[]),[o,d,s]},ns="ConfirmIdentity-module__box___-dhdQ",ss="ConfirmIdentity-module__nextButton___mIKCL",rs="ConfirmIdentity-module__backButton___tROID",is="ConfirmIdentity-module__leftArrow___NSdHf",Ae={box:ns,nextButton:ss,backButton:rs,leftArrow:is},os=h=>{const{refresh:o}=Ft(),{state:u,changeState:d,setStep:x,isMobile:s}=h,{form:c,idType:f,email:l}=u,[m,n]=I.useState(c),[y,_]=I.useState(void 0),[C,p]=I.useState(!1),r=be("verifyMinor",{request:g=>({input:g}),response:g=>g.data.verifyMinor||!1}),[i,N,w]=ts({ssn:c.ssn||"",sin:c.sin||"",countryFlag:f==="sin"?"CAN":null,minorName:[c.firstName,c.lastName].join(" "),isMinor:!0,idType:f,email:l});if(N)return e.jsx(Ke,{});w&&(d({error:new Error(w)}),x("Error"));const $=g=>{_(g.target.value),n({...m,address:g.target.value})},v=async()=>{d({form:m});try{p(!0);const g={ssn:f==="sin"?m.sin:m.ssn,firstName:m.firstName,lastName:m.lastName,dob:m.dob,address:m.address,countryFlag:f==="sin"?"CAN":null,affidavit:u.affidavitDocumentId,guardianFirstName:m.guardianFirstName,guardianLastName:m.guardianLastName,idType:f,email:l};setTimeout(()=>{r(g).then(A=>{o(),d({minorId:A}),x("SelectProfile")}).catch(A=>{console.error(A),x("Wrong")})},500)}catch(g){console.error(g),x("Wrong")}};return e.jsxs(e.Fragment,{children:[e.jsx(X,{className:Ae.box,id:"VerifyAddress",children:e.jsxs(t,{container:!0,spacing:3,direction:"column",alignItems:"center",children:[e.jsx(t,{item:!0,xs:12,sm:8,md:12,children:e.jsx(a,{variant:"h3",children:"Confirm minor identity"})}),e.jsx(t,{item:!0,xs:12,sm:8,md:12,children:e.jsx(a,{variant:"body2",children:"Please select your current or previous address."})}),e.jsx(t,{item:!0,xs:12,sm:8,md:12,children:e.jsx(H.Group,{children:e.jsxs(t,{container:!0,spacing:0,children:[i.map((g,A)=>e.jsx(t,{item:!0,xs:12,children:e.jsx(H,{value:g,labelPosition:"right",id:`VerifyAddressRadio${A}`,onClick:$,children:g})},A)),e.jsx(t,{item:!0,xs:12,children:e.jsx(H,{labelPosition:"right",value:"none",onClick:$,children:"NONE OF THE ABOVE"})})]})})}),e.jsx(t,{item:!0,xs:12,sm:8,md:12,style:{width:"100%"},children:e.jsx(F,{fullWidth:!0,id:"VerifyAddressNextButton",className:Ae.nextButton,disabled:!y||C,onClick:()=>v(),loading:C,children:"Next"})}),e.jsx(t,{item:!0,xs:12,sm:8,md:12,style:{width:"100%"},children:e.jsxs(F,{tertiary:!0,fullWidth:!0,id:"VerifyAddressBackButton",className:Ae.backButton,onClick:()=>
3x("FindAccount"),children:[e.jsx(W,{iconName:"chevron-left",className:Ae.leftArrow}),"Back"]})})]})}),e.jsx(nt,{isMobile:s})]})},as="Chooser-module__radioCard___8Sfs0",ls="Chooser-module__radioGroup___xcbuZ",cs="Chooser-module__field___3IRH6",ds="Chooser-module__value___3MkJa",Ie={radioCard:as,radioGroup:ls,field:cs,value:ds},us=G.typeofContact.primary,ms=G.typeofContact.secondary,hs=({mappings:h,profiles:o,onSelect:u})=>{const[d,x]=I.useState("0"),s=o?.length||0;I.useEffect(()=>u(o[parseInt(d,10)]),[]);const c=o.map((l,m)=>{const n=l.dataSource===Be.caps?"CAPS Profile":l.dataSource===Be.ms?"Media Services Profile":l?.basicInfo?.countryFlag==="CA"?"C&C Canada Profile":"Cast & Crew Profile",y=l?.basicInfo?.countryFlag==="CA",_=_e(l,"phoneNumbers",[])||[],C=o.length===1?6:s===3?4:5,p=(r,i)=>e.jsxs("tr",{children:[e.jsx("td",{align:"right",children:e.jsx(a,{short:!0,body1:!0,noMargin:!0,className:Ie.field,children:r})}),e.jsx("td",{children:e.jsx(a,{short:!0,body2:!0,noMargin:!0,className:Ie.value,children:i})})]});return e.jsx(t,{item:!0,xs:12,md:C,children:e.jsx(se,{id:`ChooseProfile-DetailsBox-${m}`,value:`${m}`,label:n,className:Ie.radioCard,children:e.jsx("table",{style:{borderCollapse:"collapse"},children:e.jsxs("tbody",{children:[p("First Name",l.basicInfo.firstName),p("Middle Initial",l.basicInfo.middleName),p("Last Name",l.basicInfo.lastName),p("Suffix",l.basicInfo.suffix),p("Screen Credit Name",l.basicInfo.screenName?l.basicInfo.screenName:l.basicInfo.firstName),p("Date of Birth",l.basicInfo.birthDate),p("SSN",l.basicInfo.socialSecurityMask),!y&&p("Gender",me.valueToOptionLabel(h.gender,l.basicInfo.gender)),!y&&p("Ethnicity",me.valueToOptionLabel(h.ethnicity,l.basicInfo.ethnicity)),p("Email Address",_e(l,"emailAddresses[0].emailAddress","")),p("Phone Number",_.find(r=>r.typeofContact===us)?.cell||""),p("Mobile Number",_.find(r=>r.typeofContact===ms)?.cell||"")]})})})},`Profile-DetailsBox-${m}`)}),f=l=>{x(l.target.value),u(o[parseInt(l.target.value,10)])};return e.jsx(se.Group,{value:d,onChange:f,className:Ie.radioGroup,children:e.jsx(t,{container:!0,alignItems:"center",justifyContent:"center",spacing:2,children:c})})},ps="ProfileForm-module__tooltipIcon___JHotJ",xs="ProfileForm-module__title___AJ1Rn",fs="ProfileForm-module__disabled___Zcd-R",fe={tooltipIcon:ps,title:xs,disabled:fs},gs=h=>{const{idType:o,mappings:u={},data:d={},control:x,errors:s}=h,c="UpdateMinorsProfile",f=p=>p&&Re(p).format("MM/DD/YYYY"),l=new Date(f(d.birthDate)).getMonth()+1,m=new Date(f(d.birthDate)).getDate(),n=new Date(f(d.birthDate)).getFullYear(),_=e.jsx(We,{enterTouchDelay:100,position:"top-center",content:'Please choose from the following options. You may opt out by selecting "Choose Not to Disclose".',children:e.jsx(W,{iconName:"circle-question",className:fe.tooltipIcon})}),C={validate:p=>!p||p?.replace(/\D/g,"")?.length===10};return e.jsxs(t,{container:!0,spacing:1,children:[e.jsx(t,{item:!0,xs:12,className:fe.title,children:e.jsx(a,{variant:"body2",size:"short",children:"*Denotes required field"})}),e.jsx(t,{item:!0,md:9,xs:12,children:e.jsx(D,{id:`${c}-firstName`,label:"First Name",helperText:" ",fullWidth:!0,disabled:!0,value:d.firstName})}),e.jsx(t,{item:!0,md:3,xs:12,children:e.jsx(D,{id:`${c}-middleInitial`,label:"Middle Initial",helperText:" ",fullWidth:!0,disabled:!0,value:d.middleInitial})}),e.jsx(t,{item:!0,md:9,xs:12,children:e.jsx(D,{id:`${c}-lastName`,label:"Last Name",helperText:" ",fullWidth:!0,disabled:!0,value:d.lastName})}),e.jsx(t,{item:!0,md:3,xs:12,children:e.jsx(D,{id:`${c}-suffix`,label:"Suffix",helperText:" ",fullWidth:!0,disabled:!0,value:d.suffix})}),e.jsx(t,{item:!0,xs:12,children:e.jsx(R,{name:"screenName",rules:{required:"Please provide screen credit name"},control:x,render:({field:{value:p,onChange:r,ref:i}})=>e.jsx(D,{fullWidth:!0,required:!0,id:`${c}-screenName`,label:"Screen Credit Name",inputRef:i,value:p||"",onChange:r,error:!!s.screenName,helperText:s.screenName&&s.screenName.message||" ",inputProps:{maxLength:50}})})}),e.jsxs(t,{item:!0,xs:12,sm:8,style:{marginTop:-16,paddingTop:0,paddingBottom:16},children:[e.jsx(a,{className:fe.disabled,children:"Date of Birth"}),e.jsxs(t,{container:!0,spacing:2,children:[e.jsx(t,{item:!0,xs:3,children:e.jsx(D,{value:`${l}`.length===1?`0${l}`:l,disabled:!0,label:"Month",id:`${c}-DobMonth`})}),e.jsx(t,{item:!0,xs:3,children:e.jsx(D,{value:`${m}`.length===1?`0${m}`:m,disabled:!0,label:"Day",id:`${c}-DobDay`})}),e.jsx(t,{item:!0,xs:6,sm:5,children:e.jsx(D,{value:n,disabled:!0,label:"Year",id:`${c}-DobYear`})})]})]}),e.jsx(t,{item:!0,xs:12,children:e.jsx(D,{id:`${c}-ssn`,label:o==="sin"?"Social Insurance Number":"Social Security Number",helperText:" ",fullWidth:!0,disabled:!0,value:d.ssn})}),e.jsx(t,{item:!0,xs:12,children:e.jsx(R,{name:"gender",rules:{required:"Select a gender"},control:x,render:({field:{value:p,onChange:r,ref:i}})=>e.jsx(he,{required:!0,id:`${c}
3-gender`,label:"Gender",value:p||"",data:u.gender,onChange:r,inputRef:i,error:!!s.gender,helperText:s.gender&&s.gender.message||" ",fullWidth:!0,className:fe.dropdown,inputProps:{id:`${c}-gender-input`}})})}),e.jsx(t,{item:!0,xs:12,children:e.jsxs(t,{container:!0,spacing:2,children:[e.jsx(t,{item:!0,xs:11,children:e.jsx(R,{name:"ethnicity",rules:{required:"Select an ethnicity"},control:x,render:({field:{value:p,onChange:r,ref:i}})=>e.jsx(he,{required:!0,id:`${c}-ethnicity`,label:"Ethnicity",value:p||"",data:u.ethnicity,onChange:r,inputRef:i,error:!!s.ethnicity,helperText:s.ethnicity&&s.ethnicity.message||" ",fullWidth:!0,className:fe.dropdown,inputProps:{id:`${c}-ethnicity-input`}})})}),e.jsx(t,{item:!0,xs:1,children:_})]})}),e.jsx(t,{item:!0,xs:12,children:e.jsx(et,{id:`${c}-email`,label:"Email",value:d.email,helperText:" ",fullWidth:!0,disabled:!0})}),e.jsx(t,{item:!0,xs:12,children:e.jsx(R,{name:"phone",control:x,rules:C,render:({field:{value:p,onChange:r}})=>e.jsx(re,{fullWidth:!0,id:`${c}-phone`,label:"Phone Number",value:p||"",onChange:i=>{r(i.currentTarget.value)},error:!!s.phone||p?.replace(/\D/g,"")?.length>0&&p?.replace(/\D/g,"")?.length!==10,helperText:s?.phone?.message||p?.replace(/\D/g,"")?.length>0&&p?.replace(/\D/g,"")?.length!==10?"This field should be a valid phone number":" ",inputProps:{inputMode:"numeric"}})})}),e.jsx(t,{item:!0,xs:12,children:e.jsx(R,{name:"mobile",control:x,rules:C,render:({field:{value:p,onChange:r}})=>e.jsx(re,{fullWidth:!0,id:`${c}-mobile`,label:"Mobile Number",value:p||"",onChange:i=>{r(i.currentTarget.value)},error:!!s.phone||p?.replace(/\D/g,"")?.length>0&&p?.replace(/\D/g,"")?.length!==10,helperText:s?.phone?.message||p?.replace(/\D/g,"")?.length>0&&p?.replace(/\D/g,"")?.length!==10?"This field should be a valid phone number":" ",inputProps:{inputMode:"numeric"}})})})]})},js="EditProfile-module__contentBox___nDEBY",ys="EditProfile-module__subtitle___fuqRI",bs="EditProfile-module__required___QGjYn",_s="EditProfile-module__buttonContainer___TN2T1",Cs="EditProfile-module__button___75kgp",ie={contentBox:js,subtitle:ys,required:bs,buttonContainer:_s,button:Cs},Pe=G.typeofContact.primary,we=G.typeofContact.secondary,Ns=h=>{const{state:o,mappings:u,changeState:d,setStep:x,idType:s,onBack:c}=h,f=o.profileSelected,l=f.basicInfo,m=_e(f,"phoneNumbers",[])||[],n={firstName:l.firstName||"",middleInitial:l.middleInitial||"",lastName:l.lastName||"",screenName:l.screenName?l.screenName:l.firstName,suffix:l.suffix||"",birthDate:l.birthDate||"",ssn:l.socialSecurityMask||"",gender:l.gender||"",ethnicity:l.ethnicity||"",phone:m.find(N=>N.typeofContact===Pe)?.cell||"",mobile:m.find(N=>N.typeofContact===we)?.cell||"",email:_e(f,"emailAddresses[0].emailAddress","")},{control:y,handleSubmit:_,formState:{errors:C,isValid:p}}=ve({mode:"all",defaultValues:n});return e.jsx(X,{dense:!0,className:ie.contentBox,children:e.jsx("form",{onSubmit:_(N=>{const w={...f,basicInfo:{...f.basicInfo,screenName:N.screenName?N.screenName:f.basicInfo.firstName,gender:N.gender,ethnicity:N.ethnicity}},$={extension:0,countryCode:0},v=w.phoneNumbers||[];if(w.phoneNumbers=v.filter(g=>![Pe,we].includes(g.typeofContact)),N.phone){const g=v.find(A=>A.typeofContact===Pe);w.phoneNumbers.push(g?{...g,cell:N.phone}:{...$,typeofContact:Pe,cell:N.phone})}if(N.mobile){const g=v.find(A=>A.typeofContact===we);w.phoneNumbers.push(g?{...g,cell:N.mobile}:{...$,typeofContact:we,cell:N.mobile})}d({profileSelected:w}),x("SelectAddress")}),children:e.jsxs(t,{container:!0,spacing:2,className:ie.wrapper,justifyContent:"center",children:[e.jsx(t,{item:!0,xs:12,children:e.jsx(a,{variant:"h3",id:"UpdateProfile-Title",align:"center",children:"Update Your Profile"})}),e.jsx(t,{item:!0,xs:12,children:e.jsx(a,{id:"UpdateProfile-subtitle",align:"center",className:ie.subtitle,variant:"body2",size:"short",children:"Ensure your information below is up-to-date."})}),e.jsx(t,{item:!0,xs:12,children:e.jsx(a,{align:"center",className:ie.required,variant:"body2",size:"short",children:"* Denotes required field"})}),e.jsx(t,{item:!0,xs:12,sm:8,md:12,children:e.jsx(gs,{idType:s,mappings:u,data:n,control:y,errors:C})}),e.jsxs(t,{item:!0,xs:12,sm:8,md:12,className:ie.buttonContainer,children:[e.jsx(F,{type:"submit",fullWidth:!0,disabled:!p,className:ie.button,children:"Next"}),e.jsx(F,{fullWidth:!0,tertiary:!0,onClick:c,startIcon:e.jsx(W,{iconName:"
3chevron-left"}),className:ie.button,children:"Back"})]})]})})})},vs=(h,o,u)=>{const[d,x]=I.useState({profiles:[],mappings:[]}),[s,c]=I.useState(!0),[f,l]=I.useState(null),m=Qe("getMinorProfiles",{request:()=>({id:h,country:o}),response:n=>({profiles:n.data.getMinorProfiles,mappings:n.data.getProfileMappingOptions})});return I.useEffect(()=>{(async()=>{try{c(!0);const y=await m();x(y),u({minor:y}),c(!1)}catch{l("Error getting minor profiles"),c(!1)}})()},[h]),[d.profiles,d.mappings,s,f]},Ss="SelectProfile-module__contentBox___8D07u",As="SelectProfile-module__subtitle___QIGBs",Is="SelectProfile-module__buttonContainer___RMS1m",Me={contentBox:Ss,subtitle:As,buttonContainer:Is},Ps=h=>{const{state:o,changeState:u,setStep:d,idType:x}=h,{minorId:s}=o,[c,f]=I.useState(!1),[l,m,n]=vs(s,x==="sin"?"CAN":"US",u);if(n)return e.jsx(Ke,{});const y=()=>{const{profileSelected:_={}}=o;return _?.basicInfo?.gender&&_?.basicInfo?.ethnicity};return e.jsx(e.Fragment,{children:c?e.jsx(Ns,{state:o,mappings:m,changeState:u,setStep:d,idType:x,onBack:()=>f(!1)}):e.jsx(X,{dense:!0,className:Me.contentBox,children:e.jsxs(t,{container:!0,spacing:2,justifyContent:"center",children:[e.jsx(t,{item:!0,xs:12,children:e.jsx(a,{h3:!0,center:!0,children:"Select a profile"})}),e.jsx(t,{item:!0,xs:12,children:e.jsx(a,{short:!0,body2:!0,center:!0,className:Me.subtitle,children:"Review your profile information and edit your profile if necessary."})}),e.jsx(t,{item:!0,xs:12,sm:8,md:12,children:e.jsx(hs,{idType:x,mappings:m,profiles:l,onSelect:_=>u({profileSelected:_})})}),e.jsx(t,{item:!0,xs:12,sm:8,md:12,className:Me.buttonContainer,children:e.jsxs(t,{container:!0,spacing:2,alignItems:"center",justifyContent:"center",children:[e.jsx(t,{item:!0,xs:6,md:4,lg:4,children:e.jsx(F,{secondary:!0,fullWidth:!0,disabled:!o.profileSelected,onClick:()=>f(!0),children:"Edit Selection"})}),e.jsx(t,{item:!0,xs:6,md:4,lg:4,children:e.jsx(We,{position:"top-center",size:"large",content:y()?"":"Gender and ethnicity are required fields.",children:e.jsx("span",{children:e.jsx(F,{fullWidth:!0,className:Me.button,disabled:!y(),onClick:()=>d("SelectAddress"),children:"Next"})})})})]})})]})})})},ne=(h,o,u=void 0)=>{const d=_e(h,o,u);return d??u},Ce=h=>o=>o.typeofContact===h,Ne=(h,o,u)=>ne(h,o,[]).find(Ce(u))||{},q={phone:h=>{if(!h)return"";const o=h&&h.replace(/\D/g,"").match(/(\d{3})(\d{3})(\d{4})/);return o&&o.length===4&&`(${o[1]}) ${o[2]}-${o[3]}`||h},address:(h={})=>{if(!(h||{}).addressLine1)return"";const{city:o,state:u,zipCode:d}=h,{addressLine1:x,addressLine2:s}=h,c=[x,s].filter(Boolean).join(" "),f=[u,d].filter(Boolean).join(" ");return[c,o,f].filter(Boolean).join(", ")},title:h=>h==="new"?"New Contact":h===Be.cnc?"Cast & Crew Profile":h===Be.ms?"Media Services Profile":"CAPS Profile"},ws="SelectAddress-module__contentBox___wlTzY",Ms="SelectAddress-module__radioGroup___B1ZlN",Ts="SelectAddress-module__radioCard___dfPfx",$s="SelectAddress-module__addAddress___GMYGK",Ls="SelectAddress-module__buttonContainer___m-SON",Ds="SelectAddress-module__button___MM2Mm",ks="SelectAddress-module__between___MNdXI",Fs="SelectAddress-module__threeRows___f-0v6",J={contentBox:ws,radioGroup:Ms,radioCard:Ts,addAddress:$s,buttonContainer:Ls,button:Ds,between:ks,threeRows:Fs},Te=G.typeofContact.primary,ce=G.typeofContact.mailing,Oe=h=>({addressLine1:"",addressLine2:"",city:"",state:"",zipCode:"",country:"",typeofContact:h}),Es=h=>{const{state:o,changeState:u,setStep:d}=h,x=o?.minor?.profiles||[],[s,c]=tt({list:{primary:[],mailing:[]},index:{primary:"0",mailing:"0"},address:{primary:{},mailing:{}},sameAsPrimary:!0}),f=r=>r?.addressLine1?`${r.addressLine1||""}, ${r.city||""}, ${r.state||""} ${r.zipCode||""} ${r.country}`:"",l=()=>(x||[]).map(r=>({source:r.dataSource,list:r.addresses})).map(({source:r,list:i})=>{const N=i.find(Ce(Te));return N?{...N,source:r}:null}).filter(Boolean),m=()=>(x||[]).map(r=>({source:r.dataSource,list:r.addresses})).map(({source:r,list:i})=>{const N=i.find(Ce(ce));return N?{...N,source:r}:null}).filter(Boolean);I.useEffect(()=>{const r=m(),i=r.length===0;
3c({list:{primary:[...l(),Oe(Te)].filter(Boolean),mailing:[...r,Oe(ce)].filter(Boolean)},index:{primary:"0",mailing:"0"},sameAsPrimary:i})},[x]);const n=(r,i)=>{if(!r||!i)return!1;const N=w=>(r[w]||"").toString().toLowerCase()===(i[w]||"").toString().toLowerCase();return N("addressLine1")&&N("addressLine2")&&N("city")&&N("state")&&N("zipCode")&&N("country")};I.useEffect(()=>{const r=n(s?.address?.primary,s?.address?.mailing);r&&!s?.sameAsPrimary?c({sameAsPrimary:!0}):!r&&s?.sameAsPrimary&&c({sameAsPrimary:!1})},[JSON.stringify(s?.address?.primary),JSON.stringify(s?.address?.mailing),s?.sameAsPrimary]);const y=s?.list?.primary?.[s?.index?.primary]?.addressLine1&&(s.sameAsPrimary?s?.list?.mailing?.[s?.index?.mailing]?.addressLine1:s?.address?.mailing?.addressLine1),_=s.list.primary.map((r,i)=>{if(!r)return;const N=i===s.list.primary.length-1,w=N?"New Address":q.title(r.source);return e.jsx(t,{item:!0,children:e.jsx(se,{id:`ChooseAddress-permanent-${i}`,value:`${i}`,label:w,className:J.radioCard,contentProps:{style:{display:"flex",padding:"0 16px",textAlign:"center",height:124,alignItems:"center",maxWidth:320,minWidth:320}},onClick:()=>c({index:{primary:`${i}`}}),children:e.jsx(t,{container:!0,justifyContent:"center",alignItems:"center",children:e.jsx(t,{item:!0,xs:12,children:N?e.jsx(e.Fragment,{children:s.index.primary===`${i}`?e.jsx(ue,{fullWidth:!0,label:"Permanent Address",FieldProps:{light:!0},value:f(s.address.primary),onSelect:$=>{const v={typeofContact:Te,addressLine1:$.Line1,addressLine2:$.Line2,city:$.City,state:$.Province,zipCode:$.PostalCode,country:$.CountryIso2},g=s.list.primary;g[g.length-1]=v,c({address:{primary:v},list:{primary:g}})}}):e.jsx(a,{className:J.addAddress,children:"click to add new address"})}):e.jsxs(a,{children:[`${r.addressLine1} ${r.addressLine2}`,e.jsx("br",{}),`${r.city}, ${r.state} ${r.zipCode}`]})})})})},`Address-Primary-${i}`)}),C=s?.list?.mailing?.map((r,i)=>{if(!r)return;const N=i===s?.list?.mailing?.length-1,w=N?"New Address":q.title(r.source);return e.jsx(t,{item:!0,children:e.jsx(se,{id:`ChooseAddress-mailing-${i}`,value:`${i}`,label:w,className:J.radioCard,contentProps:{style:{display:"flex",padding:"0 16px",textAlign:"center",height:124,alignItems:"center",minWidth:320,maxWidth:320}},onClick:()=>c({index:{mailing:`${i}`}}),children:e.jsx(t,{container:!0,justifyContent:"center",alignItems:"center",children:e.jsx(t,{item:!0,xs:12,children:N?e.jsx(e.Fragment,{children:s.index.mailing===`${i}`?e.jsx(ue,{fullWidth:!0,label:"Mailing Address",FieldProps:{light:!0},value:f(s.address.mailing),onSelect:$=>{const v={typeofContact:ce,addressLine1:$.Line1,addressLine2:$.Line2,city:$.City,state:$.Province,zipCode:$.PostalCode,country:$.CountryIso2},g=s.list.mailing;g[g.length-1]=v,c({address:{mailing:v},list:{mailing:g}})}}):e.jsx(a,{className:J.addAddress,children:"click to add new address"})}):e.jsxs(a,{children:[`${r.addressLine1} ${r.addressLine2}`,e.jsx("br",{}),`${r.city}, ${r.state} ${r.zipCode}`]})})})})},`ChooseAddress-mailing-${i}`)}),p=()=>{const r=o.profileSelected.addresses.filter(i=>![Te,ce].includes(i.typeofContact));r.push(s.list.primary[parseInt(s.index.primary,10)]),r.push(s.sameAsPrimary?{...s.list.primary[parseInt(s.index.primary,10)],typeofContact:ce}:s.list.mailing[parseInt(s.index.mailing,10)]),u({profileSelected:{...o.profileSelected,addresses:r}}),d("SelectContact")};return e.jsx(t,{container:!0,spacing:0,justifyContent:"center",children:e.jsx(t,{item:!0,xs:12,lg:10,children:e.jsx(X,{dense:!0,className:le(J.contentBox,s?.list?.primary?.length===3&&J.threeRows),children:e.jsxs(t,{container:!0,spacing:2,justifyContent:"center",children:[e.jsx(t,{item:!0,xs:12,sm:8,md:12,children:e.jsx(a,{variant:"h3",id:"ChooseAddress-Title",align:"center",children:"Set your address"})}),e.jsxs(t,{item:!0,xs:12,sm:8,md:12,children:[e.jsx(a,{variant:"h4",align:"center",children:"Permanent Address"}),e.jsx(a,{variant:"body2",size:"short",align:"center",children:"Your permanent address is the physical address that reflects where you reside for tax purposes."})]}),e.jsx(t,{item:!0,xs:12,sm:8,md:12,children:e.jsx(se.Group,{value:s.index.primary,onChange:r=>c({index:{primary:r.target.value}}),className:J.radioGroup,children:e.jsx(t,{container:!0,spacing:2,justifyContent:"center",children:_})})}),e.jsxs(t,{item:!0,xs:12,sm:8,md:12,children:[e.jsx(a,{variant:"h4",align:"center",className:J.between,children:"Mailing Address"}),e.jsx(a,{variant:"body2",size:"short",align:"center",children:"Your mailing address is where you receive mail."})]}),e.jsx(t,{item:!0,xs:12,sm:8,md:12,align:"center",children:e.jsx(pt,{checked:s.sameAsPrimary,onChange:r=>{const i=r.target.checked;c({sameAsPrimary:i}),c(i?{address:{...s.address,mailing:{...s.address.primary}}}:{address:{mailing:Oe(ce)}})},children:"Same as Permanent Address"})}),!s.sameAsPrimary&&e.jsx(t,{item:!0,xs:12,sm:8,md:12,children:e.jsx(se.Group,{value:s.index.mailing,onChange:r=>c({index:{mailing:r.target.value}}),className:J.radioGroup,children:e.jsx(t,{container:!0,spacing:2,justifyContent:"center",children:C})})}),e.jsxs(t,{item:!0,xs:12,sm:8,md:12,className:J.buttonContainer,children:[e.jsx(F,{id:"ChooseAddress-NextButton",fullWidth:!0,disabled:!y,onClick:()=>p(),className:J.button,children:"Next"}),e.jsx(F,{id:"ChooseAddress-BackButton",fullWidth:!0,tertiary:!0,onClick:()=>
3d("SelectProfile"),startIcon:e.jsx(W,{iconName:"chevron-left"}),className:J.button,children:"Back"})]})]})})})})},Bs="SelectContact-module__contentBox___-qcHO",Rs="SelectContact-module__radioGroup___E6Tew",Ws="SelectContact-module__buttonContainer___IizTW",Ys="SelectContact-module__button___dz-OS",Gs="SelectContact-module__addContact___aWDiL",zs="SelectContact-module__field___-qGjT",qs="SelectContact-module__value___KVJTE",Os="SelectContact-module__threeRows___Y5AxE",Vs="SelectContact-module__subtitle___Oade1",ee={contentBox:Bs,radioGroup:Rs,buttonContainer:Ws,button:Ys,addContact:Gs,field:zs,value:qs,threeRows:Os,subtitle:Vs},Hs=/^[a-zA-Z \-']*$/,$e=G.typeofContact.primary,ct=G.typeofContact.secondary,ge={required:"This field is required"},Us={source:"new",name:"",address:{},phone:"",mobile:"",relationship:""},Js=h=>{const{state:o,changeState:u,setStep:d}=h,{minor:x}=o,{profiles:s,mappings:c}=x,[f,l]=tt({index:"0",list:[]}),m=(v,g)=>{const A=f.list;A[A.length-1][v]=g,l({list:A})},{formState:{errors:n},control:y,formState:_,handleSubmit:C}=ve({mode:"all",reValidateMode:"onChange",defaultValues:{name:"",address:"",phone:"",mobile:"",relationship:""}}),p=()=>(s||[]).map(v=>(v.alternativeContacts||[]).map(g=>({source:v.dataSource,id:ne(g,"id",null),name:ne(g,"basicInfo.name",""),address:ne(g,"addresses",[]).find(A=>A.typeofContact===$e),phone:Ne(g,"phoneNumbers",$e)?.cell||"",mobile:Ne(g,"phoneNumbers",ct)?.cell||"",relationship:g.relationship,contact:g})).filter(g=>["name","address.addressLine1","phone","mobile","relationship"].every(A=>ne(g,A,"")))).flat().filter(Boolean);I.useEffect(()=>{const v=p();l({list:[...v,Us],index:"0"})},[s]);const{isValid:r}=_,i=r&&["name","address.addressLine1","phone","mobile","relationship"].every(v=>ne(f.list[f.index],v)),N=(v,g)=>e.jsxs("tr",{children:[e.jsx("td",{align:"right",children:e.jsx(a,{short:!0,body1:!0,noMargin:!0,className:ee.field,children:v})}),e.jsx("td",{children:e.jsx(a,{short:!0,body2:!0,noMargin:!0,className:ee.value,children:g})})]}),w=f.list.map((v,g)=>{const A=g===f.list.length-1,Y=q.title(v.source);return e.jsx(t,{item:!0,children:e.jsx(se,{value:`${g}`,label:Y,contentProps:{style:{display:"flex",textAlign:"center",alignItems:"center",paddingBottom:0,minHeight:230,minWidth:320,maxWidth:320}},onClick:()=>l({index:`${g}`}),children:A?e.jsx(e.Fragment,{children:f.index===`${g}`?e.jsxs(t,{container:!0,spacing:0,children:[e.jsx(t,{item:!0,xs:12,children:e.jsx(R,{name:"name",control:y,rules:ge,render:({field:{name:T,value:L,onBlur:j,onChange:b}})=>e.jsx(D,{id:"EmergencyContact-name",name:T,value:L,label:"Name *",error:!!n.name,helperText:n?.name?.message||" ",onBlur:j,onChange:k=>{Hs.test(k.currentTarget.value)&&(b(k.currentTarget.value),m("name",k.target.value))},fullWidth:!0,light:!0})})}),e.jsx(t,{item:!0,xs:12,children:e.jsx(R,{name:"address",control:y,rules:ge,render:({field:{value:T,onBlur:L,onChange:j}})=>e.jsx(ue,{fullWidth:!0,label:"Search Address *",value:T,FieldProps:{error:!!n.address,helperText:n?.address?.message||" ",light:!0},onBlur:L,onSelect:b=>{const k={typeofContact:$e,addressLine1:b.Line1,addressLine2:b.Line2,city:b.City,state:b.Province,zipCode:b.PostalCode,country:b.CountryIso2};j(q.address(k)),m("address",k)},onEmpty:()=>{j(""),m("address",{})}})})}),e.jsx(t,{item:!0,xs:12,children:e.jsx(R,{name:"phone",control:y,rules:ge,render:({field:{value:T,onBlur:L,onChange:j}})=>e.jsx(re,{id:"EmergencyContact-phone",label:"Phone Number *",value:T,onChange:b=>{j(b.currentTarget.value),m("phone",b.currentTarget.value)},onBlur:L,error:!!n.phone,helperText:n?.phone?.message||" ",fullWidth:!0,light:!0,inputProps:{inputMode:"numeric"}})})}),e.jsx(t,{item:!0,xs:12,children:e.jsx(R,{name:"mobile",control:y,rules:ge,render:({field:{value:T,onBlur:L,onChange:j}})=>e.jsx(re,{id:"EmergencyContact-mobilePhone",label:"Mobile Number *",value:T,onChange:b=>{j(b.currentTarget.value),m("mobile",b.currentTarget.value)},onBlur:L,error:!!n.mobile,helperText:n?.mobile?.message||" ",fullWidth:!0,light:!0,inputProps:{inputMode:"numeric"}})})}),e.jsx(t,{item:!0,xs:12,children:e.jsx(R,{name:"relationship",control:y,rules:ge,render:({field:{value:T,onChange:L,ref:j}})=>e.jsx(he,{id:"EmergencyContact-relationship",label:"Relationship *",value:T||"",data:c.relationship,onChange:b=>{L(b.target.value),m("relationship",b.target.value)},inputRef:j,error:!!n.relationship,helperText:n?.relationship?.message||" ",fullWidth:!0,light:!0})})})]}):e.jsx(t,{container:!0,justifyContent:"center",alignItems:"center",children:e.jsx(t,{item:!0,children:e.jsx(a,{className:ee.addContact,children:"Click to add new emergency address"})})})}):e.jsx(t,{container:!0,spacing:2,children:e.jsx(t,{item:!0,xs:12,children:e.jsx("table",{style:{borderCollapse:"collapse"},children:e.jsxs("tbody",{children:[N("Full Name",v.name),N("Address",q.address(v.address)),N("Phone Number",q.phone(v.phone)),N("Mobile Number",q.phone(v.mobile)),N("Relationship",me.valueToOptionLabel(c.relationship,v.relationship
3))]})})})})})},`SelectContact-${g}`)}),$=()=>{const v=f.list[parseInt(f.index,0)],g=v.contact?v.contact:{basicInfo:{name:v.name},phoneNumbers:[{typeofContact:$e,cell:v.phone},{typeofContact:ct,cell:v.mobile}],addresses:[v.address],relationship:v.relationship};u({profileSelected:{...o.profileSelected,alternativeContacts:[g]}}),d("Review")};return e.jsx(X,{dense:!0,className:le(ee.contentBox,f.list.length===2&&ee.threeRows),children:e.jsx("form",{onSubmit:C($),children:e.jsxs(t,{container:!0,spacing:2,children:[e.jsx(t,{item:!0,xs:12,children:e.jsx(a,{variant:"h3",id:"ChooseEmergencyContact-Title",align:"center",children:"Set your emergency contact"})}),e.jsx(t,{item:!0,xs:12,children:e.jsx(a,{id:"ChooseEmergencyContact-subtitle",align:"center",className:ee.subtitle,variant:"body2",size:"short",children:"Select or add the emergency contact you would like to have on file."})}),e.jsx(t,{item:!0,xs:12,children:e.jsx(se.Group,{value:f.index,onChange:v=>l({index:v.target.value}),className:ee.radioGroup,direction:"row",children:e.jsx(t,{container:!0,spacing:2,style:{justifyContent:"center"},children:w})})}),e.jsxs(t,{item:!0,sm:8,xs:12,className:ee.buttonContainer,children:[e.jsx(F,{fullWidth:!0,type:"submit",disabled:!i,className:ee.button,children:"Next"}),e.jsx(F,{fullWidth:!0,tertiary:!0,onClick:()=>d("SelectAddress"),startIcon:e.jsx(W,{iconName:"chevron-left"}),className:ee.button,children:"Back"})]})]})})})},Zs="ProfileCard-module__title___1VYMa",Qs="ProfileCard-module__cardContent___ozB9l",Ks="ProfileCard-module__field___TpTAe",Xs="ProfileCard-module__value___4HbzP",oe={title:Zs,cardContent:Qs,field:Ks,value:Xs},Le=G.typeofContact.primary,De=G.typeofContact.secondary,er=h=>{const{state:o,changeState:u}=h,{profileSelected:d,minor:x,idType:s}=o,{mappings:c}=x,[f,l]=I.useState(!1),m=(P,E="")=>ne(d,P,E),n=(P,E)=>Ne(d,P,E),y={gender:m("basicInfo.gender"),ethnicity:m("basicInfo.ethnicity"),screenName:m("basicInfo.screenName"),phone:n("phoneNumbers",Le)?.cell||"",mobile:n("phoneNumbers",De)?.cell||""},{formState:{errors:_},control:C,handleSubmit:p,reset:r,formState:i}=ve({mode:"all",defaultValues:{...y}}),{isValid:N,isSubmitSuccessful:w}=i;I.useEffect(()=>{w&&r({...y})},[y,w,r]);const $=P=>{const E={...d,basicInfo:{...d.basicInfo,screenName:P.screenName,gender:P.gender,ethnicity:P.ethnicity}},S={extension:0,countryCode:0},te=E.phoneNumbers||[];if(E.phoneNumbers=te.filter(U=>![Le,De].includes(U.typeofContact)),P.phone){const U=te.find(Ce(Le));E.phoneNumbers.push(U?{...U,cell:P.phone}:{...S,typeofContact:Le,cell:P.phone})}if(P.mobile){const U=te.find(Ce(De));E.phoneNumbers.push(U?{...U,cell:P.mobile}:{...S,typeofContact:De,cell:P.mobile})}u({profileSelected:E}),l(!1)},v=()=>{r({...y}),l(!1)},g=e.jsxs(Xe,{size:"small",onClick:()=>l(!0),children:[e.jsx(W,{iconName:"pen"}),e.jsx(a,{variant:"body1",size:"short",children:"edit"})]}),A=(P,E)=>e.jsxs("tr",{children:[e.jsx("td",{align:"right",children:e.jsx(a,{short:!0,body1:!0,noMargin:!0,className:oe.field,children:P})}),e.jsx("td",{children:e.jsx(a,{short:!0,body2:!0,noMargin:!0,className:oe.value,children:E})})]}),Y=m("basicInfo.birthDate"),T=Re(Y).format("MM/DD/YYYY"),L=new Date(T).getMonth()+1,j=new Date(T).getDate(),b=new Date(T).getFullYear(),z=e.jsx(We,{enterTouchDelay:100,position:"top-center",content:'Please choose from the following options. You may opt out by selecting "Choose Not to Disclose".',children:e.jsx(W,{iconName:"circle-question",className:oe.tooltipIcon})}),Z={validate:P=>!P||P?.replace(/\D/g,"")?.length===10};return e.jsx("form",{onSubmit:p($),children:e.jsxs(O,{children:[e.jsx(O.Title,{action:g,align:"left",className:oe.title,children:"Profile Information"}),e.jsx(O.Content,{className:oe.cardContent,children:f?e.jsxs(t,{container:!0,spacing:1,children:[e.jsx(t,{item:!0,xs:12,className:oe.title,children:e.jsx(a,{variant:"body2",size:"short",children:"*Denotes required field"})}),e.jsx(t,{item:!0,md:9,xs:12,children:e.jsx(D,{disabled:!0,fullWidth:!0,label:"First Name",helperText:" ",value:m("basicInfo.firstName")})}),e.jsx(t,{item:!0,md:3,xs:12,children:e.jsx(D,{disabled:!0,fullWidth:!0,label:"Middle Initial",helperText:" ",value:m("basicInfo.middleInitial")})}),e.jsx(t,{item:!0,md:9,xs:12,children:e.jsx(D,{disabled:!0,fullWidth:!0,label:"Last Name",helperText:" ",value:m("basicInfo.lastName")}
3)}),e.jsx(t,{item:!0,md:3,xs:12,children:e.jsx(D,{disabled:!0,fullWidth:!0,label:"Suffix",helperText:" ",value:m("basicInfo.suffix")})}),e.jsx(t,{item:!0,xs:12,children:e.jsx(R,{name:"screenName",rules:{required:"Please provide screen credit name "},control:C,render:({field:{value:P,onChange:E,ref:S}})=>e.jsx(D,{fullWidth:!0,required:!0,label:"Screen Credit Name",inputRef:S,value:P||"",onChange:E,error:!!_.screenName,helperText:_.screenName&&_.screenName.message||" ",inputProps:{maxLength:50}})})}),e.jsxs(t,{item:!0,xs:12,sm:8,style:{marginTop:-16,paddingTop:0,paddingBottom:16},children:[e.jsx(a,{className:oe.disabled,children:"Date of Birth"}),e.jsxs(t,{container:!0,spacing:2,children:[e.jsx(t,{item:!0,xs:3,children:e.jsx(D,{disabled:!0,label:"Month",value:`${L}`.length===1?`0${L}`:L})}),e.jsx(t,{item:!0,xs:3,children:e.jsx(D,{disabled:!0,label:"Day",value:`${j}`.length===1?`0${j}`:j})}),e.jsx(t,{item:!0,xs:6,sm:5,children:e.jsx(D,{disabled:!0,label:"Year",value:b})})]})]}),e.jsx(t,{item:!0,xs:12,children:e.jsx(D,{disabled:!0,fullWidth:!0,label:s==="sin"?"Social Insurance Number":"Social Security Number",value:m("basicInfo.socialSecurityMask"),helperText:" "})}),e.jsx(t,{item:!0,xs:12,children:e.jsx(R,{name:"gender",rules:{required:"Select a gender"},control:C,render:({field:{value:P,onChange:E,ref:S}})=>e.jsx(he,{required:!0,fullWidth:!0,label:"Gender",value:P||"",data:c.gender,onChange:E,inputRef:S,error:!!_.gender,helperText:_.gender&&_.gender.message||" "})})}),e.jsx(t,{item:!0,xs:12,children:e.jsxs(t,{container:!0,spacing:2,children:[e.jsx(t,{item:!0,xs:11,children:e.jsx(R,{name:"ethnicity",rules:{required:"Select an ethnicity"},control:C,render:({field:{value:P,onChange:E,ref:S}})=>e.jsx(he,{required:!0,fullWidth:!0,label:"Ethnicity",value:P||"",data:c.ethnicity,onChange:E,inputRef:S,error:!!_.ethnicity,helperText:_.ethnicity&&_.ethnicity.message||" "})})}),e.jsx(t,{item:!0,xs:1,children:z})]})}),e.jsx(t,{item:!0,xs:12,children:e.jsx(et,{disabled:!0,fullWidth:!0,label:"Email",value:m("emailAddresses[0].emailAddress"),helperText:" "})}),e.jsx(t,{item:!0,xs:12,children:e.jsx(R,{name:"phone",control:C,rules:Z,render:({field:{value:P,onChange:E}})=>e.jsx(re,{fullWidth:!0,label:"Phone Number",value:P||"",onChange:S=>{E(S.currentTarget.value)},error:!!_.phone||P?.replace(/\D/g,"")?.length>0&&P?.replace(/\D/g,"")?.length!==10,helperText:_?.phone?.message||P?.replace(/\D/g,"")?.length>0&&P?.replace(/\D/g,"")?.length!==10?"This field should be a valid phone number":" ",inputProps:{inputMode:"numeric"}})})}),e.jsx(t,{item:!0,xs:12,children:e.jsx(R,{name:"mobile",control:C,rules:Z,render:({field:{value:P,onChange:E}})=>e.jsx(re,{fullWidth:!0,label:"Mobile Number",value:P||"",onChange:S=>{E(S.currentTarget.value)},error:!!_.phone||P?.replace(/\D/g,"")?.length>0&&P?.replace(/\D/g,"")?.length!==10,helperText:_?.phone?.message||P?.replace(/\D/g,"")?.length>0&&P?.replace(/\D/g,"")?.length!==10?"This field should be a valid phone number":" ",inputProps:{inputMode:"numeric"}})})})]}):e.jsx("table",{style:{borderCollapse:"collapse"},children:e.jsxs("tbody",{children:[A("First Name",m("basicInfo.firstName")),A("Middle Initial",m("basicInfo.middleInitial")),A("Last Name",m("basicInfo.lastName")),A("Suffix",m("basicInfo.suffix")),A("Screen Credit Name",y.screenName),A("Date of Birth",m("basicInfo.birthDate")),A("SSN",m("basicInfo.socialSecurityMask")),A("Gender",me.valueToOptionLabel(c.gender,y.gender)),A("Ethnicity",me.valueToOptionLabel(c.ethnicity,y.ethnicity)),A("Email Address",m("emailAddresses[0].emailAddress")),A("Phone Number",y.phone),A("Mobile Number",y.mobile)]})})}),f&&e.jsx(O.Actions,{children:e.jsxs(t,{container:!0,spacing:2,justifyContent:"flex-end",children:[e.jsx(t,{item:!0,children:e.jsx(F,{secondary:!0,onClick:v,children:"Cancel"})}),e.jsx(t,{item:!0,children:e.jsx(F,{type:"submit",disabled:!N,children:"Save"})})]})})]})})},tr="AddressCard-module__title___fT-oz",nr="AddressCard-module__cardContent___aa6lu",sr="AddressCard-module__field___dsQ00",rr="AddressCard-module__value___S8M0d",ke={title:tr,cardContent:nr,field:sr,value:rr},Ve=G.typeofContact.primary,He=G.typeofContact.mailing,ir=h=>{const{state:o,changeState:u}=h,{profileSelected:d}=o,[x,s]=I.useState(!1),c=(g,A)=>Ne(d,g,A),[f,l]=tt({primary:c("addresses",Ve),mailing:c("addresses",He)}),m={primary:q.address(f.primary),mailing:q.address(f.mailing)},{formState:{errors:n}
3,control:y,handleSubmit:_,reset:C,formState:p}=ve({mode:"all",defaultValues:{...m}}),{isValid:r,isSubmitSuccessful:i}=p;I.useEffect(()=>{i&&C({...m})},[m,i,C]);const N=()=>{const g=d.addresses.filter(A=>![Ve,He].includes(A.typeofContact));g.push(f.primary),g.push(f.mailing),u({profileSelected:{...d,addresses:g}}),C({primary:q.address(f.primary),mailing:q.address(f.mailing)}),s(!1)},w=()=>{C({...m}),s(!1)},$=e.jsxs(Xe,{size:"small",onClick:()=>s(!0),children:[e.jsx(W,{iconName:"pen"}),e.jsx(a,{variant:"body1",size:"short",children:"edit"})]}),v=(g,A)=>e.jsxs("tr",{children:[e.jsx("td",{align:"right",children:e.jsx(a,{short:!0,body1:!0,noMargin:!0,className:ke.field,children:g})}),e.jsx("td",{children:e.jsx(a,{short:!0,body2:!0,noMargin:!0,className:ke.value,children:A})})]});return e.jsx("form",{onSubmit:_(N),children:e.jsxs(O,{children:[e.jsx(O.Title,{action:$,align:"left",className:ke.title,children:"Addresses"}),e.jsx(O.Content,{className:ke.cardContent,children:x?e.jsxs(t,{container:!0,spacing:1,children:[e.jsx(t,{item:!0,xs:12,children:e.jsx(R,{name:"primary",control:y,rules:{required:"Select a permanent address"},render:({field:{value:g,onBlur:A,onChange:Y}})=>e.jsx(ue,{light:!0,fullWidth:!0,label:"Search Permanent Address",value:g,FieldProps:{error:!!n.primary,helperText:n.primary&&n.primary.message||" ",light:!0},onBlur:A,onSelect:T=>{const L={typeofContact:Ve,addressLine1:T.Line1,addressLine2:T.Line2,city:T.City,state:T.Province,zipCode:T.PostalCode,country:T.CountryIso2};l({primary:L}),Y(q.address(L))}})})}),e.jsx(t,{item:!0,xs:12,children:e.jsx(R,{name:"mailing",control:y,rules:{required:"Select a mailing address"},render:({field:{value:g,onBlur:A,onChange:Y}})=>e.jsx(ue,{label:"Search Mailing Address",fullWidth:!0,light:!0,value:g,FieldProps:{error:!!n.mailing,helperText:n.mailing&&n.mailing.message||" ",light:!0},onBlur:A,onSelect:T=>{const L={typeofContact:He,addressLine1:T.Line1,addressLine2:T.Line2,city:T.City,state:T.Province,zipCode:T.PostalCode,country:T.CountryIso2};l({mailing:L}),Y(q.address(L))}})})})]}):e.jsx("table",{style:{borderCollapse:"collapse"},children:e.jsxs("tbody",{children:[v("Permanent Address",m.primary),v("Mailing Address",m.mailing)]})})}),x&&e.jsx(O.Actions,{children:e.jsxs(t,{container:!0,spacing:2,justifyContent:"flex-end",children:[e.jsx(t,{item:!0,children:e.jsx(F,{secondary:!0,onClick:w,children:"Cancel"})}),e.jsx(t,{item:!0,children:e.jsx(F,{type:"submit",disabled:!r,children:"Save"})})]})})]})})},or="ContactCard-module__title___pp2no",ar="ContactCard-module__cardContent___wMWkx",lr="ContactCard-module__field___ZIpbK",cr="ContactCard-module__value___a-8GC",Fe={title:or,cardContent:ar,field:lr,value:cr},dr=/^[a-zA-Z \-']*$/,je=G.typeofContact.primary,dt=G.typeofContact.secondary,ye={required:"This field is required"},ur=h=>{const{state:o,changeState:u}=h,{profileSelected:d,minor:x}=o,{mappings:s}=x,[c,f]=I.useState(!1),m=((j,b="")=>ne(d,j,b))("alternativeContacts[0]",{}),n=(j,b="")=>ne(m,j,b),y=(j,b)=>Ne(m,j,b),_={name:n("basicInfo.name"),address:q.address(y("addresses",je)),phone:q.phone(y("phoneNumbers",je)?.cell),mobile:q.phone(y("phoneNumbers",dt)?.cell),relationship:n("relationship")},[C,p]=I.useState(y("addresses",je)),{formState:{errors:r},control:i,handleSubmit:N,reset:w,formState:$}=ve({mode:"all",defaultValues:{..._}}),{isValid:v,isSubmitSuccessful:g}=$;I.useEffect(()=>{g&&w({..._})},[_,g,w]);const A=j=>{const b={basicInfo:{name:j.name},phoneNumbers:[{typeofContact:je,cell:j.phone},{typeofContact:dt,cell:j.mobile}],addresses:[C],relationship:j.relationship};u({profileSelected:{...o.profileSelected,alternativeContacts:[b]}}),w(j),f(!1)},Y=()=>{w({..._}),f(!1)},T=e.jsxs(Xe,{size:"small",onClick:()=>f(!0),children:[e.jsx(W,{iconName:"pen"}),e.jsx(a,{variant:"body1",size:"short",children:"edit"})]}),L=(j,b)=>e.jsxs("tr",{children:[e.jsx("td",{align:"right",children:e.jsx(a,{short:!0,body1:!0,noMargin:!0,className:Fe.field,children:j})}),e.jsx("td",{children:e.jsx(a,{short:!0,body2:!0,noMargin:!0,className:Fe.value,children:b})})]});return e.jsx("form",{onSubmit:N(A),children:e.jsxs(O,{children:[e.jsx(O.Title,{action:T,align:"left",className:Fe.title,children:"Emergency Contact"}),e.jsx(O.Content,{className:Fe.cardContent,children:c?e.jsxs(t,{container:!0,spacing:0,children:[e.jsx(t,{item:!0,xs:12,children:e.jsx(R,{name:"name",control:i,rules:ye,render:({field:{value:j,onChange:b}})=>e.jsx(D,{name,value:j,label:"Name *",error:!!r.name,helperText:r?.name?.message||" ",onBlur,onChange:k=>{dr.test(k.currentTarget.value)&&b(k.currentTarget.value)},fullWidth:!0,light:!0})})}),e.jsx(t,{item:!0,xs:12,children:e.jsx(R,{name:"address",control:i,rules:ye,render:({field:{value:j,onBlur:b,onChange:k}})=>e.jsx(ue,{fullWidth:!0,label:"Search Address *",value:j,FieldProps:{error:!!r.address,helperText:r?.address?.message||" ",light:!0},onBlur:b,onSelect:z=>{const Z={typeofContact:je,addressLine1:z.Line1,addressLine2:z.Line2,city:z.City,state:z.Province,zipCode:z.PostalCode,country:z.CountryIso2};k(q.address(Z)),p(Z)},onEmpty:()=>{k(""),p({})}})})}),e.jsx(t,{item:!0,xs:12,children:e.jsx(R,{name:"phone",control:i,rules:ye,render:({field:{value:j,onBlur:b,onChange:k}})=>e.jsx(re,{light:!0,fullWidth:!0,label:"Phone Number *",value:j,onChange:z=>k(z.currentTarget.value),onBlur:b,error:!!r.phone,helperText:r?.phone?.message||" ",inputProps:{inputMode:"numeric"}})})}),e.jsx(t,{item:!0,xs:12,children:e.jsx(R,{name:"mobile",control:i,rules:ye,render:({field:{value:j,onBlur:b,onChange:k}})=>e.jsx(re,{id:"EmergencyContact-mobilePhone",label:"Mobile Number *",value:j,onChange:z=>k(z.currentTarget.value),onBlur:b,error:!!r.mobile,helperText:r?.mobile?.message||" ",fullWidth:!0,light:!0,inputProps:{inputMode:"numeric"}})})}),e.jsx(t,{item:!0,xs:12,children:e.jsx(R,{name:"relationship",control:i,rules:ye,render:({field:{value:j,onChange:b,ref:k}})=>e.jsx(he,{label:"Relationship *",value:j||"",data:s.relationship,onChange:z=>b(z.target.value),inputRef:k,error:!!r.relationship,helperText:r?.relationship?.message||" ",fullWidth:!0,light:!0})})})]}):e.jsx("table",{style:{borderCollapse:"collapse"},children:e.jsxs("tbody",{children:[L("Full Name",_.name),L("Address",_.address),L("Phone Number",_.phone),L("Mobile Number",_.mobile),L("Relationship",me.valueToOptionLabel(s.relationship,_.relationship
3))]})})}),c&&e.jsx(O.Actions,{children:e.jsxs(t,{container:!0,spacing:2,justifyContent:"flex-end",children:[e.jsx(t,{item:!0,children:e.jsx(F,{secondary:!0,onClick:Y,children:"Cancel"})}),e.jsx(t,{item:!0,children:e.jsx(F,{type:"submit",disabled:!v,children:"Save"})})]})})]})})},mr="Review-module__contentBox___J0oTl",hr="Review-module__buttonContainer___-jq26",pr="Review-module__button___ISubD",xr="Review-module__subtitle___7MwaU",Ee={contentBox:mr,buttonContainer:hr,button:pr,subtitle:xr},fr=h=>{const{state:o,setStep:u,changeState:d}=h,{minor:x,minorId:s,idType:c}=o,f=c==="sin"?"CAN":"US",[l,m]=I.useState(!1),n=be("updateMinorProfile",{request:_=>({id:s,input:{countryFlag:f,..._}}),response:_=>_.data.updateMinorProfile||!1}),y=()=>{m(!0);const _={dataSource:x.profiles.map(C=>C.dataSource),basicInfo:{gender:parseInt(o.profileSelected.basicInfo.gender,10),ethnicity:parseInt(o.profileSelected.basicInfo.ethnicity,10)},phoneNumbers:o.profileSelected?.phoneNumbers?.map(C=>({typeofContact:C.typeofContact,cell:(C.cell||"").replace(/\D/g,"")}))||[],addresses:o.profileSelected?.addresses?.map(C=>({city:C.city,state:C.state,addressLine1:C.addressLine1,addressLine2:C.addressLine2,addressLine3:C.addressLine3,typeofContact:C.typeofContact,zipCode:C.zipCode,country:C.country}))||[],alternativeContacts:o.profileSelected?.alternativeContacts?.map(C=>({basicInfo:{name:C.basicInfo.name},phoneNumbers:C.phoneNumbers?.map(p=>({typeofContact:p.typeofContact,cell:(p.cell||"").replace(/\D/g,"")}))||[],addresses:C.addresses?.map(p=>({city:p.city,state:p.state,addressLine1:p.addressLine1,addressLine2:p.addressLine2,addressLine3:p.addressLine3,typeofContact:p.typeofContact,zipCode:p.zipCode,country:p.country}))||[],relationship:parseInt(C.relationship,10)}))||[]};n(_).then(()=>u("ThankYou")).catch(C=>{console.error(C),u("Wrong")})};return e.jsx(X,{dense:!0,className:Ee.contentBox,children:e.jsxs(t,{container:!0,spacing:2,justifyContent:"center",children:[e.jsx(t,{item:!0,xs:12,sm:8,lg:10,children:e.jsx(a,{variant:"h3",id:"Review-Title",align:"center",children:"Review your profile updates"})}),e.jsx(t,{item:!0,xs:12,sm:8,lg:10,children:e.jsx(a,{id:"Review-subtitle",align:"center",className:Ee.subt
3itle,variant:"body2",size:"short",children:'Check to make sure everything below is correct, then click "Finish."'})}),e.jsx(t,{item:!0,xs:12,sm:8,lg:10,children:e.jsx(er,{state:o,changeState:d})}),e.jsx(t,{item:!0,xs:12,sm:8,lg:10,children:e.jsx(ir,{state:o,changeState:d})}),e.jsx(t,{item:!0,xs:12,sm:8,lg:10,children:e.jsx(ur,{state:o,changeState:d})}),e.jsx(t,{item:!0,xs:12,sm:8,lg:10,className:Ee.buttonContainer,children:e.jsx(F,{id:"Review-finishButton",loading:l,fullWidth:!0,className:Ee.button,onClick:()=>y(),children:"Finish Profile Update"})})]})})},gr="MinorsRegistration-module__scrollContainer___o-CHR",jr="MinorsRegistration-module__root___qBufU",yr="MinorsRegistration-module__footerWrapper___2RZYN",Ue={scrollContainer:gr,root:jr,footerWrapper:yr},br=()=>{const h=ut("MinorReg"),[o,u]=I.useState("Welcome"),d=(m,n)=>({...m,...n}),[x,s]=I.useReducer(d,{}),c=mt({query:"(max-width: 960px)"});I.useEffect(()=>{["Error","Wrong"].includes(o)&&x.error&&h.error(x.error)},[o]);const l={Welcome:Sn,FindAccount:Yn,Affidavit:On,ThankYou:Zn,CompleteProfile:es,ConfirmIdentity:os,SelectProfile:Ps,SelectAddress:Es,SelectContact:Js,Review:fr,Error:tn,Wrong:cn}[o];return e.jsxs("div",{className:Ue.scrollContainer,children:[e.jsx("div",{className:Ue.root,children:e.jsx(l,{state:x,changeState:s,flags:{idvRedesign:!0},setStep:u,isMobile:c})}),!["Welcome","ThankYou","Error","Wrong"].includes(o)&&e.jsx("div",{className:Ue.footerWrapper,children:e.jsx(Et,{})})]})},bi=gt()(ft()(br));export{bi as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.