-color: ${e=>e.theme.color.black50}; `,Or=ct.ZP.div` display: flex; border: 1px solid rgba(255, 255, 255, 0.25); flex: 1; `,Fr=ct.ZP.div` display: flex; max-width: 300px; position: absolute; top: 4px; text-align: center; font-size: 15px; font-weight: ${({theme:e})=>e.fontWeight.medium}; color: ${({theme:e})=>e.color.white}; @media (min-width: ${ht.AV.tablet}px) { top: ${e=>e.isLoginWeb?"4px":"30px"}; max-width: initial; } `,Ur=ct.ZP.div` display: flex; position: absolute; right: 0; bottom: 4px; left: 0; font-size: 24px; @media (min-width: ${ht.AV.tablet}px) { bottom: ${e=>e.isLoginWeb?"4px":"15px"}; } `,Rr=ct.ZP.div` display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; margin-right: 20px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.75); color: rgba(255, 255, 255, 0.75); `,Nr=ct.ZP.div` display: flex; position: absolute; bottom: 30px; font-size: 15px; font-weight: ${({theme:e})=>e.fontWeight.medium}; color: ${({theme:e})=>e.color.white}; `,Lr=ct.ZP.img` width: 100%; `,Br=(0,n.memo)((0,it.Pi)((function(e){const t=e.webcam,r=e.webcamActive,i=e.side,a=e.preview,c=e.previewImage,l=e.continueCapture,u=e.isSubmitting,d=e.onCapture,p=e.track,f=e.retryCapture,g=e.timer,h="login-web"===e.source,m=(0,ft.kC)().isPhone;(0,n.useEffect)((()=>(document.addEventListener("keydown",T),()=>{document.removeEventListener("keydown",T)})),[]);const b=(0,P.Z)().formatMessage,y=r&&!a,_=!r,v=(0,n.useCallback)((()=>{switch(i){case"face":p("verify_document_face_tapped_take_photo",{loggingId:"aa5abad1-4454-4a0a-aa03-80dcff2472dd",action:M.Us.click,componentType:M.re.button});break;case"text":p("verify_document_text_tapped_take_photo",{loggingId:"9277259a-562d-46f1-a2f8-23dc1e4aeb15",action:M.Us.click,componentType:M.re.button})}}),[i,p]),w=(0,n.useCallback)((()=>{v(),d()}),[d,v]),T=(0,n.useCallback)((e=>{32===e.keyCode&&w()}),[w]),x=(0,n.useCallback)((()=>{switch(i){case"face":p("verify_document_face_retake_tapped_retake",{loggingId:"c47beb88-3dd5-4384-a104-2c1a92732ec5",action:M.Us.click,componentType:M.re.button});break;case"text":p("verify_document_text_retake_tapped_retake",{loggingId:"3d6a29b8-80cd-4821-bb28-d6707215c912",action:M.Us.click,componentType:M.re.button})}}),[i,p]),S=(0,n.useCallback)((()=>{x(),f()}),[f,x]),k=(0,n.useMemo)((()=>g?b(zt.holdStillCapture):"face"===i?b(zt.faceCapture):"text"===i?b(zt.textCapture):""),[b,i,g]);return(0,s.jsxs)(o.Box,{justifyContent:"center",alignItems:"center",flexDirection:m?"column":"row",children:[_&&(0,s.jsx)(st.Spinner,{size:3}),(0,s.jsxs)(o.Box,{flexDirection:h||m?"column":"row",alignContent:"center",display:_?"none":void 0,children:[(0,s.jsx)(Tr,{isLoginWeb:h,children:(0,s.jsx)(dr,{side:i})}),(0,s.jsxs)(Ir,{inactive:_,isLoginWeb:h,children:[!a&&(0,s.jsx)(o.Box,{alignItems:"center",justifyContent:"center",height:"100%",children:(0,s.jsx)(xr,{isLoginWeb:h,children:(0,s.jsxs)(Sr,{children:[(0,s.jsx)(cr,{webcam:t,blur:!1,flipped:!a}),y&&(0,s.jsx)(Cr,{children:(0,s.jsx)(wr,{})})]})})}),y&&(0,s.jsxs)(Cr,{children:[(0,s.jsx)(Fr,{isLoginWeb:h,children:(0,s.jsx)(Mr,{children:k})}),(0,s.jsx)(Ur,{isLoginWeb:h,children:(0,s.jsx)(Mr,{children:g?(0,s.jsx)(Rr,{children:g}):(0,s.jsx)(Te.Button,{compact:!0,onPress:w,testID:"idv-take-photo-button",children:b(zt.takePhoto)})})})]}),a&&(0,s.jsxs)(o.Box,{flexDirection:"row",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",children:[c&&(0,s.jsx)(Lr,{src:c,alt:"Preview"}),c?(0,s.jsxs)(Cr,{children:[(0,s.jsx)(xr,{children:(0,s.jsx)(Sr,{children:(0,s.jsx)(wr,{})})}),(0,s.jsx)(Ur,{children:(0,s.jsx)(Mr,{children:(0,s.jsxs)(o.Box,{children:[(0,s.jsx)(o.Box,{spacingHorizontal:1,children:(0,s.jsx)(Te.Button,{compact:!0,onPress:S,disabled:u,children:b(zt.retake)})}),(0,s.jsx)(o.Box,{spacingHorizontal:1,children:(0,s.jsx)(Te.Button,{compact:!0,onPress:l,testID:"idv-next-photo-button",disabled:u,children:b(zt.continue)})})]})})})]}):(0,s.jsx)(Cr,{children:(0,s.jsx)(Nr,{children:(0,s.jsx)(Mr,{children:b(zt.processing)})})})]}),_&&(0,s.jsx)(Dr,{children:b(zt.enableWebcamCapture)})]})]})]})})));function qr({title:e,subtitle:t,errorMessages:r,actions:n,actionsSubtitle:i}){return(0,s.jsx)(Kt,{title:e,subtitle:t,actions:n,actionsSubtitle:i,testId:"id-capture-verification-error",children:r&&(0,s.jsx)(Vr,{children:r})})}const Vr=ct.ZP.div` width: 100%; margin: 0px 0px 20px; padding: 20px; font-weight: ${({theme:e})=>e.fontWeight.medium}; text-align: center; color: ${({theme:e})=>e.color.text}; border-radius: 8px; background-color: ${({theme:e})=>e.color.accessoryBackground}; `;(0,it.Pi)(qr);const Wr=(e,t)=>{if(!e)return"";const r=e.name;return"string"==typeof r&&r in zt?t(zt[r]):e.message};const $r=(0,it.Pi)((function({error:e,hideRetryButton:t,onRetry:r,source:n}){const i=(0,P.Z)().formatMessage,a=t?null:(0,s.jsx)(ze.Button,{onPress:r,block:!0,children:i(zt.tryAgainFailureView)}),o=(0,s.jsx)("div",{children:Wr(e,i)});return(0,s.jsx)(ot.VStack,{justifyContent:"space-evenly",alignContent:"center",maxWidth:490,spacing:4,testID:"id-capture-failure-view",children:(0,s.jsx)(qr,{title:i(zt.titleFailureView),subtitle:i(zt.subtitleFailureView),errorMessages:"login-web"!==n?o:null,actions:a,actionsSubtitle:i(zt.stillHavingIssues,{troubleShootingTipsLink:(0,s.jsx)(Se.Link,{to:"https://support.coinbase.com/customer/en/portal/articles/1220621-identity-verification",openInNewWindow:!0,children:i(zt.troubleShootingTipsLinkFailureView)})})})})})),zr=e=>"drivers_licence"===e,Yr=e=>"id_card"===e;function Hr(){const e=(0,P.Z)().formatMessage;return(0,s.jsx)(o.Box,{background:"primaryWash",spacing:3,maxWidth:"525px",children:(0,s.jsx)(Se.TextBody,{as:"p",testID:"privacyPolicyNote",children:e(zt.privacyPolicy,{privacyPolicyLink:(0,s.jsx)("a",{href:"https://www.coinbase.com/legal/privacy",target:"_blank",rel:"noopener noreferrer",children:e(zt.privacyPolicyLink)},"one")})})})}function Gr({onSelect:e,idType:t,isInUS:r,width:i}){const a=(0,P.Z)().formatMessage,c=(0,n.useCallback)((()=>e(t.type)),[t.type,e]),l=(0,n.useCallback)((e=>Yr(e)?a(r?zt.id_card_us:zt.id_card_non_us):a(zt[e])),[r,a]);return(0,s.jsxs)(Jt,{onClick:c,highlight:zr(t.type),"data-testid":`idv-id-type-${t.type}`,width:i,children:[zr(t.type)?(0,s.jsx)(bt.Pictogram,{name:"idVerification"}):(0,s.jsx)(bt.Pictogram,{name:"identityCard"}),(0,s.jsxs)(o.VStack,{spacingTop:2,alignItems:"center",children:[l(t.type),zr(t.type)&&(0,s.jsxs)(o.HStack,{alignItems:"center",spacingTop:1,children:[(0,s.jsx)(mt.Icon,{name:"dot",size:"xs",spacingVertical:.5}),(0,s.jsx)(Se.TextLegal,{as:"p",color:"foregroundMuted",children:a(zt.recommended)})]})]})]},t.type)}function Kr({onSelect:e,supportedIdTypes:t,source:r,isInUS:n,hidePrivacyPolicy:i,noMinWidth:a}){const c=(0,P.Z)().formatMessage,l=(0,s.jsx)(Se.Link,{variant:"body",to:"https://support.coinbase.com/customer/portal/articles/2749813",openInNewWindow:!0,children:c(zt.actionOtherIdIdType)});return(0,s.jsx)(o.VStack,{gap:4,children:t?(0,s.jsxs)(Kt,{title:c(zt.titleIdType),subtitle:c(zt.subtitleIdType),actions:l,maintainHeight:!0,children:[(0,s.jsx)(Xt,{source:r,alignSelf:"stretch",children:t.map(((r,i)=>(0,s.jsx)(Gr,{idType:r,isInUS:n,onSelect:e,width:a&&t.length>1?100/t.length+"%":void 0},`select-id-box-${i}`)))}),i?null:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.Spacer,{vertical:4}),(0,s.jsx)(Hr,{})]})]}):(0,s.jsx)(qr,{title:c(zt.errorTitleIdType),errorMessages:c(zt.errorMessageIdType),actions:(0,s.jsx)("div",{})})})}const Zr=(0,n.memo)(Kr),Qr=e=>{let t="";switch(e){case"production":t="https://login.coinbase.com";break;case"staging":t="https://login-staging.cbhq.net";break;default:t="https://login-dev.cbhq.net"}return t};function Jr({onStartWidget:e,environment:t}){const r=At((0,n.useState)(),2),i=r[0],a=r[1],o=Qr(t),c=(0,n.useCallback)((()=>{e()}),[e]);return(0,n.useEffect)((()=>{fetch(`${o}/api/two-factor/v1/idv/token`,{headers:{"Content-Type":"application/json"},credentials:"include"}).then((e=>e.text())).then((e=>{a(e)}))}),[o]),(0,n.useEffect)((()=>{window.document.addEventListener("idv_event",c)}),[]),i?(0,s.jsx)("iframe",{srcDoc:i,title:"IDV Iframe",width:"0",height:"0"}):(0,s.jsx)(s.Fragment,{})}const Xr=e=>e.preventDefault();function en({facematchType:e,idType:t,imageCaptureView:r,isSubmitting:i,backImageRequired:a,frontImage:c,backImage:l,onGoBack:u,onUpload:d,showFrontBlurryMessage:p,track:f,applicationContext:g,allowContinue:h,allowSubmit:m,onSubmit:b,onRenderWebcam:y}){const _=At((0,n.useState)("frontBack"),2),v=_[0],w=_[1],T=At((0,n.useState)(!1),2),x=T[0],S=T[1],k=(0,P.Z)().formatMessage;(0,n.useEffect)((()=>(window.addEventListener("dragover",Xr,!1),window.addEventListener("drop",Xr,!1),()=>{window.removeEventListener("dragover",Xr,!1),window.removeEventListener("drop",Xr,!1)})),[]);const E=(0,n.useCallback)((()=>{w("facematch"),y?.()}),[y]),I=(0,n.useCallback)((()=>{E(),"face"===e?f("verify_document_facematch_viewed",{loggingId:"20d1e4db-98ad-41f5-a4e5-1392a2655e04",action:M.Us.render,componentType:M.re.page}):"text"===e&&f("verify_document_textmatch_viewed",{loggingId:"7fc1f2b0-cead-4614-aade-abe7fced365d",action:M.Us.render,componentType:M.re.page})}),[e,E,f]),C=(0,n.useMemo)((()=>{if(r&&i)return"";switch(v){case"frontBack":return"account_recovery"===g?k(zt.frontBackAccountRecoveryTitle,{idType:k(zt[t])}):k(zt.frontBackTitle);case"facematch":return e?k(zt[`${e}Title`]):"";default:return""}}),[g,e,k,t,r,i,v]),D=(0,n.useMemo)((()=>{if(r&&i)return"";switch(v){case"frontBack":return"account_recovery"===g?"":k(zt.frontBackSubtitle,{idType:k(zt[t]).toLowerCase()});case"facematch":return e?k(zt[`${e}Subtitle`]):"";default:return""}}),[g,e,k,t,r,i,v]),j=(0,n.useCallback)((()=>{f("verify_document_file_upload_tapped_upload",{action:M.Us.render,componentType:M.re.page,loggingId:"4a976c3a-1f2b-4497-9324-07c35dd86ac9"}),b()}),[b,f]),A=(0,n.useMemo)((()=>"frontBack"===v?e?(0,s.jsx)(o.VStack,{spacingBottom:2,children:(0,s.jsx)(Te.Button,{onPress:I,disabled:!h,testID:"idv-image-upload-cta",children:k(zt.continueAction)})}):(0,s.jsx)(o.VStack,{spacingBottom:2,children:(0,s.jsx)(Te.Button,{onPress:j,disabled:!m||i,loading:i,testID:"idv-image-upload-cta",children:k(zt.uploadAction)})}):null),[h,m,e,k,i,I,j,v]),O=(0,n.useCallback)((e=>{const t={front:zt.blurryImageWarningFront,only:zt.blurryImageWarningOneSided};if(e)return t[e]}),[]),F=(0,n.useCallback)((e=>{const t=e.backImageRequired;return e.showFrontBlurryMessage?t?"front":"only":null}),[]),U=F({showFrontBlurryMessage:p,backImageRequired:a}),R=O(U);return p&&f("blurry_message_shown",{action:M.Us.render,componentType:M.re.text,loggingId:"e24ce537-12e9-49af-99cf-1fa27131bd1f",context:"uploads",side:U}),(0,s.jsx)(o.VStack,{children:(0,s.jsx)(Kt,{title:C,subtitle:D,actions:A,onGoBack:i?void 0:u,children:"frontBack"===v?(0,s.jsxs)(o.VStack,{maxWidth:"440px",children:[(0,s.jsxs)(o.HStack,{justifyContent:"center",children:[(0,s.jsx)(tn,{side:"front",onUpload:(e,t)=>{S(!1),d(e,t)},onDropRejected:()=>{S(!0)},file:c,showLabel:"passport"!==t,showWarning:p,track:f}),a&&(0,s.jsx)(tn,{side:"back",onUpload:(e,t)=>{S(!1),d(e,t)},onDropRejected:()=>{S(!0)},file:l,track:f})]}),R&&(0,s.jsxs)(n.Fragment,{children:[(0,s.jsx)(o.VStack,{spacingVertical:2,spacingHorizontal:8,children:(0,s.jsx)(o.Box,{justifyContent:"center",background:"negative",borderRadius:"roundedSmall",spacing:1,bordered:!0,children:(0,s.jsx)(Se.TextLabel2,{as:"p",color:"secondary",children:k(R)})})}),(0,s.jsx)(o.VStack,{children:(0,s.jsx)(Se.TextLabel2,{as:"p",color:"foregroundMuted",children:k(zt.blurryImageWarningText)})})]}),x?(0,s.jsx)(Se.TextLabel2,{as:"p",color:"negative",spacingVertical:1,children:k(zt.rejectionReason)}):null,(0,s.jsx)(o.VStack,{spacingTop:2,children:(0,s.jsx)(Se.TextLabel2,{as:"p",align:"center",children:k(zt.instructions)})})]}):(0,s.jsx)(o.Box,{children:r})})})}const tn=(0,n.memo)((({track:e,side:t,onUpload:r,file:n,showLabel:i=!0,showWarning:a,onDropRejected:c})=>{const l=(0,P.Z)().formatMessage,u=an[t],d=(0,ft.kC)(),p=d.isPhone,f=d.isPhoneLarge;return(0,s.jsxs)(o.VStack,{spacingHorizontal:2,children:[(0,s.jsx)(rn,{onDrop:n=>{"back"===t?e("verify_document_file_upload_tapped_back",{loggingId:"0ee2c860-608e-408c-b27a-b88a0883ccb6",componentType:M.re.card,action:M.Us.select}):"front"===t&&e("verify_document_file_upload_tapped_front",{loggingId:"58ad4d36-9d61-46a8-86a4-86499bce5290",componentType:M.re.card,action:M.Us.select}),n.length>0&&r(t,n[0])},multiple:!1,minSize:5e3,maxSize:15e6,accept:"image/jpeg,image/png",color:a?"warning":"coinbaseLight",onDropRejected:c,"data-testid":`image-upload-drop-${t}`,children:n?(0,s.jsx)(nn,{src:n.preview,alt:"Preview"}):(0,s.jsxs)(o.VStack,{alignContent:"center",alignItems:"center",children:[(0,s.jsx)(o.VStack,{children:(0,s.jsx)(u,{})}),(0,s.jsx)(Se.TextLabel2,{as:"p",color:"foregroundMuted",align:"center",spacingTop:1,spacingHorizontal:2,children:p||f?l(zt.accountRecoveryDropzone,{side:t}):l(zt.dropzone)})]})}),i&&(0,s.jsx)(Se.TextLabel2,{as:"p",align:"center",children:l(zt[t])})]})}));tn.displayName="DropImage";const rn=(0,ct.ZP)(yt.Z).attrs((e=>({activeClassName:"active",color:e.theme.color[e.color]||e.theme.color.textAccent})))` display: flex; justify-content: center; align-items: center; flex-direction: column; width: 140px; min-height: 140px; border: 1px dashed ${({theme:e,color:t})=>e.color[t]}; cursor: pointer; margin-bottom: 10px; &.active { border: 1px solid ${({theme:e})=>e.color.positive}; box-shadow: 0 0 2px ${({theme:e})=>e.color.boxShadow}; transition: border-color 0.5s linear, box-shadow 0.5s; } `,nn=ct.ZP.img` max-width: 100%; max-height: 100%; `,an={front:()=>(0,s.jsx)(bt.Pictogram,{name:"identityCard"}),back:()=>(0,s.jsx)(bt.Pictogram,{name:"identityCard"})},on=(0,n.memo)(en);function sn(){return(0,s.jsx)("svg",{viewBox:".5 1 36 36",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"m11.6 20 4.3 4.2 10.5-10.4"})})}const cn={role:"none",focusable:"false","aria-hidden":"true"};function ln({className:e,size:t="huge",redraw:r,isDecorative:i}){const a=At((0,n.useState)(!1),2),o=a[0],c=a[1],l=!r&&o;(0,n.useEffect)((()=>{if(!r){const e=setTimeout((()=>c(!0)),500);return()=>clearTimeout(e)}c(!1)}),[r]);const u=i?cn:null;return(0,s.jsx)(un,{className:e,size:t,children:(0,s.jsx)(dn,Ft({size:t,drawn:l},u))})}const un=ct.ZP.div` display: flex; align-items: center; justify-content: center; ${({size:e})=>(0,wt.isNumber)(e)&&`width: ${ar(e)}px; height: ${ar(e)}px;`}; ${({size:e})=>"tiny"===e&&"width: 13px;"}; ${({size:e})=>"medium"===e&&"width: 25px;"}; ${({size:e})=>"huge"===e&&"width: 100px;"}; ${({size:e})=>"tiny"===e&&"height: 13px;"}; ${({size:e})=>"medium"===e&&"height: 25px;"}; ${({size:e})=>"huge"===e&&"height: 100px;"}; border-radius: 50%; border: ${({size:e,theme:t})=>"tiny"===e?"none":`${"huge"===e?"4":"2"}px solid ${t.color.border}`}; `,dn=(0,ct.ZP)((e=>{e.drawn;let t=jt(e,It);return(0,s.jsx)(sn,Ft({},t))}))` width: 100%; height: 100%; fill: none; stroke: ${({theme:e})=>e.color.positive}; stroke-width: 3; stroke-linejoin: round; stroke-miterlimit: 10; stroke-dasharray: 50; stroke-dashoffset: 50; ${e=>e.drawn?"\n opacity: 1;\n stroke-dashoffset: 0;\n transition: all 1s ease-out;\n ":""}; `,pn=(0,n.memo)(ln),fn="IdCapture.SuccessView",gn=(0,A.vU)({title:{id:`${fn}.title`,defaultMessage:"Identity verified",description:"Title for successful identity verification"},subtitle:{id:`${fn}.subtitleText`,defaultMessage:"Congrats! Your identity has been successfully verified.",description:"Subtitle for successful identity verification"},continueAction:{id:`${fn}.continueAction`,defaultMessage:"Continue",description:"Label for next button"}});function hn({onContinue:e}){const t=(0,P.Z)().formatMessage;return(0,s.jsx)(lt.Box,{alignContent:"center",justifyContent:"center",testID:"idv-success-view",children:(0,s.jsxs)(Kt,{title:t(gn.title),subtitle:t(gn.subtitle),children:[(0,s.jsx)(lt.Box,{spacingTop:5,alignContent:"center",justifyContent:"center",children:(0,s.jsx)(pn,{})}),(0,s.jsx)(lt.Box,{spacingTop:2,children:(0,s.jsx)(ze.Button,{onPress:e,block:!0,children:t(gn.continueAction)})})]})})}const mn=(0,n.memo)(hn);let bn;const yn=e=>{const t=(0,n.useRef)(),r=At((0,n.useState)(!!bn),2),i=r[0],a=r[1],o=At((0,n.useState)(bn||{}),2),s=o[0],c=o[1],l=(0,n.useCallback)((e=>{c(e),bn=e,a(!0)}),[c,a]),u=(0,n.useCallback)((()=>{c({}),bn=void 0,a(!1)}),[c,a]);return(0,n.useEffect)((()=>{let r=!0;const n=["en","en-US"].includes(e);return n||t.current===e?n&&l({}):(u(),async function(){try{const t=await fetch(`https://translations.coinbase.com/aab9bdc6d/latest/${e}/id-capture-messages.json`);if(!t.ok)throw new Error("Missing translations");{const e=await t.json(),n={};Object.keys(e).forEach((t=>{n[t]=e[t].defaultMessage})),r&&l(n)}}catch(e){r&&l({})}}()),t.current=e,()=>{r=!1}}),[e,l,u]),[i,s]},_n=e=>(0,vt.paletteValueToCssVar)(e),vn=_n(["gray100",.3]),wn=_n(["gray100",.5]),Tn=_n("gray100"),xn=_n(["gray100",1e-4]),Sn=_t.palette.primary,kn=_n("blue70"),En=_n("blue80"),In=_t.palette.primaryWash,Cn=_n(["blue80",.03]),Dn=_n("blue5"),Mn=_n("blue10"),jn=_n("blue20");_n("blue40");const An=_n("gray10"),Pn=_t.palette.positive,On=_n("green50"),Fn=_n("green10"),Un=_n(["gray80",.02]),Rn=_n("gray15"),Nn=_n(["gray80",.33]),Ln=_n("gray40");_n("gray50");const Bn=_n("gray5"),qn=_n("gray60"),Vn=_n("gray90"),Wn=_n("gray10"),$n=_n("gray60"),zn=_t.palette.primaryWash,Yn=_t.palette.negative,Hn=_t.palette.negative,Gn=_t.palette.negativeForeground,Kn=_n("gray0"),Zn=_n(["gray0",.25]),Qn=_n(["gray0",.4]),Jn=_n(["gray0",.6]),Xn=_n(["gray0",.7]),ei=_n(["gray0",1e-4]),ti=_n("yellow30"),ri=_t.palette.line,ni={black50:wn,linkBlue:Sn,vibrantBlue:"#0152c3",lightSkyBlue:"#B0CAFF",positiveGreen:Pn,positiveGreenHover:On,superLightGrey:"#f5f6f8",lightGrey:"#f7f8fa",midLightGrey:Bn,superLightBlueGrey:In,whiteBlueGrey:An,lightBlueGrey:"#90a1b8",midGrey:"#9da6b1",middleDarkBlueGrey:"#5f7285",midDarkBlueGrey:"#4e5c68",darkBlueGrey:"#202a36",oceanBlue:"#0f3256",oceanBlueGrey:"#113355",deepOceanBlue:"#002f6b",darkOceanBlue:"#043169",midOceanBlue:"#0b3466"},ii={hidden:-1,normal:0,elevated:1,high:2,extraHigh:25,backdrop:999,overlay:1e3,top:1001},ai={tiny:"2px",small:"4px",medium:"8px",large:"16px",huge:"24px",enormous:"32px"},oi='-apple-system,\nBlinkMacSystemFont,\n"Segoe UI",\n"Roboto",\n"Oxygen",\n"Ubuntu",\n"Cantarell",\n"Fira Sans",\n"Droid Sans",\n"Helvetica Neue",\nsans-serif',si={fontFamily:`'CoinbaseSans', ${oi}`,sans:`'CoinbaseSans', ${oi}`,text:`'CoinbaseText', ${oi}`,display:`'CoinbaseDisplay', ${oi}`},ci={regular:si.fontFamily,sans:si.sans,text:si.text,display:si.display,monospace:{fontFamily:'\n "Monaco",\n monospace;'}.fontFamily},li={background:Kn,backgroundHover:Un,backgroundSelected:Un,backgroundActive:zn,backgroundPill:In,backgroundAccent:Sn,backgroundAlt:Kn,backgroundHoverAlt:Bn,backgroundAccentAlt:vn,backgroundWash:Cn,text:Tn,textLight:qn,textLightAlt:Ln,textAccent:Sn,textAccentHover:kn,textAccentActive:En,border:ri,borderHover:Wn,borderAccent:Sn,borderAccentHover:En,buttonFill:Sn,buttonFillHover:kn,buttonFillActive:En,buttonOutline:Bn,buttonOutlineHover:Sn,buttonOutlineActive:Sn,positive:Pn,positiveHover:On,positiveLight:Fn,negative:Yn,negativeForeground:Gn,warning:ti,iconBackground:Bn,iconFill:Sn,iconBackgroundAccent:Sn,iconFillAccent:Kn,iconLight:qn,iconWarning:Hn,iconGreyDark:$n,iconGreyDarkAlt:Rn,iconBlue:jn,iconBlueBorder:Dn,placeholder:Ln,disabled:Un,boxShadow:Un,maskDark:"rgba(50, 53, 61, 0.33)",maskLight:Xn,maskBlue:"rgba(26,54,80,0.7)",accessoryActive:Sn,accessoryInactive:Nn,accessoryBackground:Un,twitter:"#499FEC",facebook:"#415894",white:Kn,white25:Zn,white40:Qn,white60:Jn,grey90:Vn,blue10:Mn,black0:xn,white0:ei,transparent:"transparent",slate:qn,slateDark:Tn,cornFlowerBlue:Sn,catalinaBlue:Sn,heather:Bn,midnightBlue:Sn,black:Tn},ui={border:`1px solid ${ri}`,noRadius:"0px",subtleRadius:"2px",borderRadius:`${ai.small}`,mediumBorderRadius:`${ai.medium}`,largeBorderRadius:`${ai.large}`,radius:`${ai.small}`,insetRadius:"3px"},di={default:`0 4px 12px 0 ${li.boxShadow}`,hover:`0 2px 5px ${_n(["gray100",.08])}`,deep:`0 4px 16px ${_n(["blue100",.05])}`,light:`0px 8px 16px ${_n(["gray5",.5])}`},pi={typeVariant:!1,airdrop:{color:{grey5:"#F5F7F8",grey10:"#E7EBEE",grey30:"#B8C2CC",grey50:"#8899AA",grey60:_n("gray60"),grey70:"#587088",grey80:"#113355",background:"#F5F7F8"},spacing:{tiny:"6px",small:"12px",medium:"24px",large:"36px",xl:"48px",xxl:"96px"},pageBackgroundWidth:1440,pageContentPadding:24,borderRadius:"7.68px",fontFamily:'CoinbaseSans-Medium,CoinbaseSans,\'Avenir Next\',-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;'},size:ai,fontSize:{tinier:"10px",tiny:"12px",small:"14px",medium:"16px",large:"18px",huge:"24px",super:"32px",mega:"48px"},fontWeight:{ultraLight:400,thin:400,light:400,regular:400,medium:400,demiBold:500,bold:500,heavy:500},fontFamily:ci,color:Ft(Ft({},ni),li),border:ui,boxShadow:di,layout:{width:1180,padding:24},breakpoints:{giant:1170,desktop:992,tablet:1040,phone:768,phone_small:560},zIndex:ii,_snapshotDisplayName:"defaultTheme"};function fi({children:e,compact:t,locale:r}){const n=At(yn(r),2),i=n[0],a=n[1];return i?(0,s.jsx)(at.Z,{messages:a||{},locale:r,children:(0,s.jsx)(ct.f6,{theme:pi,children:(0,s.jsx)(Yt.Provider,{value:{compact:t},children:e})})}):null}const gi=(e,t,r)=>{const n=((e,t,r)=>{const n=new Uint8ClampedArray(e.length/4);let i=0,a=0;for(let o=0;o{const i=Math.round(Math.sqrt(n.length)),a=Math.floor(i/2),o=new Float32Array(t*r);for(let s=0;s{const t=e.reduce(((e,t)=>e+t))/e.length,r=e.map((e=>Math.pow(e-t,2))).reduce(((e,t)=>e+t))/e.length;return{mean:t,variance:r,std:Math.sqrt(r)}})(i),s=o.mean,c=o.std,l=o.variance,u=function(e){const t=[.52212686,-496936896e-14,-246943824e-19,1.00000771,1,.998165138,.00175438596,0,-453629947e-14,-.00864553314,-.00920201294,-.0851599168],r=[.0713160985,355718077e-13,1.26534093e-9,385350515e-14,.000154822728,.000917431193,.00175438596,.000223914017,453629947e-14,.000120076849,.000143781452,.416606184];return e.map(((e,n)=>e*r[n]+t[n]))}([s,c,l,...a,r,t,r/t]),d=function(e){const t=[-5.90492194,-243.546621,394.601212,-207.437112,25.8128237,187.373979,96.5640019,57.3582572,-121.378124,-1.98053908,-1.84080502,-.261269689];let r=-1.51348298;for(let n=0;n{const t=document.createElement("canvas"),r=Tt().get(e,"tagName"),n="IMG"===r;if("VIDEO"===r)t.width=e.videoWidth||e.clientWidth,t.height=e.videoHeight||e.clientHeight,this.leaveBreadcrumb("ClearCam.snap.photoInterval",{hasVideo:!!e,width:t.width,height:t.height});else{if(!n){const t=r||typeof e;return this.onError?.(new Error(`blurryDetector.getImageData: Unidentified image source. Expected a video or image element, received: ${t}`)),{}}t.width=e.width,t.height=e.height}const i=t.getContext("2d");i?.drawImage(e,0,0,t.width,t.height);const a=document.createElement("canvas");a.width=256,a.height=256;const o=a.getContext("2d");if(!o)throw new Error("unable to create 2d context");o.imageSmoothingQuality="high",o.drawImage(t,0,0,a.width,a.height);return{canvas:t,resizedImgData:o.getImageData(0,0,a.width,a.height)}},this.getImageFromUrl=e=>new Promise(((t,r)=>{const n=new Image;n.onload=()=>{t(n)},n.onerror=e=>{r(e)},n.src=e})),this.calculateBlurry=(e,t,r,n)=>new Promise((i=>{const a=gi(t,r,n);i({variance:a.variance,blurry:a.blurry,position:e})})),this.calculateBlurryFromImageUrl=async e=>{const t=await this.getImageFromUrl(e),r=this.getImageData(t),n=r.resizedImgData,i=r.canvas.width,a=r.canvas.height,o=await this.calculateBlurry(0,n,i,a);return{variance:o.variance,blurry:o.blurry}},Object.assign(this,e)}}const mi={video:{width:{ideal:1280,max:1920},height:{ideal:720,max:1080}},audio:!1};const bi=class{constructor(e){this.reset(),this.blurryDetector=new hi(e),this.leaveBreadcrumb=e.leaveBreadcrumb}reset(){this.canvases=[],this.eventCallback=null,clearTimeout(this.blurTimer),clearInterval(this.photoInterval),clearInterval(this.pollerInterval)}attach(e,t){this.video=document.getElementById(e),this.canvas=document.getElementById(t),this.context=this.canvas.getContext("2d"),this.video.setAttribute("playsinline","true"),this.video.setAttribute("webkit-playsinline","true");const r=(e,t)=>{this.canvas.width=parseInt(e,10),this.canvas.height=parseInt(t,10),this.leaveBreadcrumb("ClearCam.attach.setCanvasSize",{hasVideo:!!this.video,width:e,height:t})};r(this.video.clientWidth,this.video.clientHeight),this.video.onloadedmetadata=()=>{r(this.video.videoWidth,this.video.videoHeight)};let n=!1;const i=e=>{n||(0,M.Kz)("verify_document_webcam_permission",{loggingId:"d02a4e75-26fe-43d4-8ad2-feccd3d7de2e",action:M.Us.measurement,componentType:M.re.content_script,context:"granted"}),this.stream=e,this.eventCallback&&this.eventCallback();try{this.video.srcObject=e}catch(t){window.URL?this.video.src=window.URL.createObjectURL(e):void 0!==this.video.mozSrcObject?this.video.mozSrcObject=e:this.video.src=e}};navigator.mediaDevices&&navigator.mediaDevices.getUserMedia?navigator.mediaDevices.enumerateDevices().then((e=>{const t=e.find((e=>"videoinput"===e.kind));n=""!==t?.label})).finally((()=>{navigator.mediaDevices.getUserMedia(mi).then(i).catch((e=>this.setError({name:e.name,message:"NotAllowedError"===e.name?"Webcam access was denied. Please give webcam permissions and try again.":"Initializing your webcam failed. Please reconnect your webcam and try again, or try from another device."},!1)))})):this.setError({name:"webcamNotSupported",message:"Webcam document verification is not supported on this browser. Please try again with a different browser or the Coinbase mobile app."})}unattach(){this.stream&&(this.stream.stop?this.stream.stop():(this.stream.getAudioTracks().forEach((e=>{e.stop()})),this.stream.getVideoTracks().forEach((e=>{e.stop()}))),this.reset())}onReady(e){this.eventCallback=e}async snap(e,t,r){const n=new Array(e).fill(null).map(((e,r)=>this.getSnapPromise(this.video,t*r))),i=await Promise.all(n),a=new Array(e).fill(null),o=new Array(e).fill(null),s=new Array(e).fill(null),c=i.map(((e,t)=>{const r=e.resizedImgData,n=e.canvas,i=e.canvas.width,o=e.canvas.height;return a[t]=n,this.blurryDetector.calculateBlurry(t,r,i,o)}));(await Promise.all(c)).forEach((e=>{const t=e.variance,r=e.blurry,n=e.position;o[n]=t,s[n]=r}));const l=s.filter((e=>e)),u=0===this.varianceOfVariances(o),d=this.leastBlurry(s);r(a[d].toDataURL("image/jpeg",1),u,a.length,s[d],l)}getSnapPromise(e,t){return new Promise((r=>{setTimeout((()=>{r(this.blurryDetector.getImageData(e))}),t)}))}varianceOfVariances(e){const t=e.reduce(((e,t)=>e+t))/e.length;return e.map((e=>Math.pow(e-t,2))).reduce(((e,t)=>e+t))/e.length}leastBlurry(e){let t=-1,r=1/0;return e.forEach(((e,n)=>{e{const t=(0,n.useRef)(e);return(0,n.useMemo)((()=>t.current()),[t])};function _i(e,t,r,n){r&&Object.defineProperty(e,t,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function vi(e,t,r,n,i){var a={};return Object.keys(n).forEach((function(e){a[e]=n[e]})),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=r.slice().reverse().reduce((function(r,n){return n(e,t,r)||r}),a),i&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(i):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}const wi=["idType","imageUpload","pendingVerification","fallingBack","success","failure","loading"],Ti=[{country:{code:"GN",name:"Guinea",image:"/assets/global/flags_png/GN-c41c6ef0b847ede64439b7a7c32717988b3021481039b01683c8c2d9d0472ad6.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"BI",name:"Burundi",image:"/assets/global/flags_png/BI-7e1d1d5a9096ad964c9e663c04af28daf0528b2ee0ab1c2adc14ad42083e1b78.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"CH",name:"Switzerland",image:"/assets/global/flags_png/CH-96d0794f0c876c6ce6ba6464fb95dcfafd74760ed69e1e3794f47d5ec33b3967.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"SL",name:"Sierra Leone",image:"/assets/global/flags_png/SL-edb53959f517d4d7ce92bd7723a4ba857c2f94ca4013a8c7fb4a645b1eed4f41.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"GM",name:"Gambia",image:"/assets/global/flags_png/GM-59f5013f7e4d041b4ccf99d95e42d9d9988308888095490fb2b7dc45080a6711.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"AI",name:"Anguilla",image:"/global/flags_png/AI.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"MX",name:"Mexico",image:"/assets/global/flags_png/MX-1d218141f71d17d5272ae33d4d11861e90c5115616a4fa2c26bc9a6f995861ee.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"MY",name:"Malaysia",image:"/assets/global/flags_png/MY-76d732c891bffc597ecd5ad5dca8803a4c070722a134680967862b7672bbc72a.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"JO",name:"Jordan",image:"/assets/global/flags_png/JO-e0605553c19ff681d54806aa10ed3fdd787780b95f82cfe3cda0650ac097523b.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"US",name:"United States",image:"/assets/global/flags_png/US-0a82fbea3120e52b5a1f6d5929b3a8dc560e09670a78d3df6898e9e4d0fa885c.png"},supported_id_types:[{type:"id_card",backside_image_required:!1},{type:"drivers_licence",backside_image_required:!0}]},{country:{code:"KW",name:"Kuwait",image:"/assets/global/flags_png/KW-8dd21e63887abd4acf68931cc731301c33afc3124190c2ca3f958ef80ad0d249.png"},supported_id_types:[{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"PH",name:"Philippines",image:"/assets/global/flags_png/PH-c41367dd64579d0bf9333cb7fa3669be470d44a225c92532e959e7cc2c04cfda.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"SN",name:"Senegal",image:"/assets/global/flags_png/SN-f19d2313fc1abf2a3843a616f1ee217302b839f8c4bc593527254820e2875fe5.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"CV",name:"Cape Verde",image:"/assets/global/flags_png/CV-83b39ad0ee12e0d112a28172bc4fb11a04a5daae560ce0a04a53ff724f310af7.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:null,name:null,image:"/global/flags_png/.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"TJ",name:"Tajikistan",image:"/assets/global/flags_png/TJ-ff7aa55531286e8eb20e717a9c4f56d464a4386d5e5c8ce7430ae0bd6a8d15df.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"TG",name:"Togo",image:"/assets/global/flags_png/TG-b1981f7835f811f3aad78a4901a30adff133844e736b333c1d0898caea214417.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"GD",name:"Grenada",image:"/assets/global/flags_png/GD-7dcd8625416c86acd0bee916d563df06bdad28576089480e26ffd4c70ef53b72.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"SM",name:"San Marino",image:"/assets/global/flags_png/SM-a2fd6fedc4a5bda6d637471627e4d3194da0daec4b4150909c631bb2469db7d0.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"GH",name:"Ghana",image:"/assets/global/flags_png/GH-f046768981cc3e2603d655cc328ae2a8d764f97b306c24add6c9bd054e15513e.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"MH",name:"Marshall Islands",image:"/assets/global/flags_png/MH-6a5592db3e3996d02e002b07d71ae4c5bcd9b21ae4f6d6817c7e75dd33b4debc.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"NI",name:"Nicaragua",image:"/assets/global/flags_png/NI-5c218c73c3445f9b60334547e46bb52dd16372130bed2bba0a304a2b711d5a32.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"ET",name:"Ethiopia",image:"/assets/global/flags_png/ET-1327c50e090253f97e405c7a80a72bbdce6e4a246410af583c70e3c2f73e4648.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"DO",name:"Dominican Republic",image:"/assets/global/flags_png/DO-13564ce2f3ead0ff101e535eb55dc8032b8a62937c6880d3d67960aab0232fbe.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"PS",name:"Palestine, State of",image:"/global/flags_png/PS.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"ES",name:"Spain",image:"/assets/global/flags_png/ES-d8209526484cf8c2165c60a7e5c5c504428ebf84c882828743ee6dbd04687124.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"NA",name:"Namibia",image:"/assets/global/flags_png/NA-9e7dd89581ed9da6d82054e341c39c6ba5bd12aafac100455128bc687e415087.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"IL",name:"Israel",image:"/assets/global/flags_png/IL-b6d57d770003e9c55579f9d1eccc54060174702c46abb607ac72d89a1512f6a5.png"},supported_id_types:[{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"CU",name:"Cuba",image:"/assets/global/flags_png/CU-00f9b3412367396ba15a94561cc828f88a576c9083a637ba2bcc7dfa02630f27.png"},supported_id_types:[{type:"id_card",backside_image_required:!0}]},{country:{code:"MT",name:"Malta",image:"/assets/global/flags_png/MT-15b91f7f6e6fb0f948a15ba27eb69204440a9c5681be0608a4f8924fd3fff2ee.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"BM",name:"Bermuda",image:"/assets/global/flags_png/BM-79d46ef928c3d120484d4e18a41b32302a9c6ce931daf01950ba86e4badf68d4.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"FR",name:"France",image:"/assets/global/flags_png/FR-d356ff8d207eae6f3eb531811557fae88625a80d76eeeb30c8963f8177a9c6d4.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"NZ",name:"New Zealand",image:"/assets/global/flags_png/NZ-10c96dc10dbeef13956cdbfb64c08b66014310bb2d98394a1c8a0f9cbb85b5d2.png"},supported_id_types:[{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"IS",name:"Iceland",image:"/assets/global/flags_png/IS-b1e7b94fb01ddbc349ddcebe00c52cba8dc429b1685c332c0224b143f60bac3c.png"},supported_id_types:[{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"VN",name:"Vietnam",image:"/assets/global/flags_png/VN-a174dd1de08805ceb2b500cac6cd788512b6ab2bcdc15522abbed2722f17ca31.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"PY",name:"Paraguay",image:"/assets/global/flags_png/PY-1f6ed141f030569834f7c24aba6a8bf111ee519fad6cf5bbc7920bcda180228e.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"LV",name:"Latvia",image:"/assets/global/flags_png/LV-a017b864c011f9d999e6223c683ff209188a26f0019b90d71b224fa546caa6a4.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"KM",name:"Comoros",image:"/assets/global/flags_png/KM-52c1cab28097094fdd607eff764cd6ae65f5e3e8c876b261495fbd37bd766f27.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"CY",name:"Cyprus",image:"/assets/global/flags_png/CY-e8594ed00c9eca5395083ba3c56f7857eebb67a9b5eed0dd25f72cce6093745e.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"MA",name:"Morocco",image:"/assets/global/flags_png/MA-e747c360cc1be9324f43e291142d7b96b123b88ffa2f69854da3815b67780257.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"VC",name:"Saint Vincent And The Grenadines",image:"/assets/global/flags_png/VC-aed13ed9f164e7747575684d43dfa6b0d0b8f974ceb0413eef68cec4092c1132.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"BJ",name:"Benin",image:"/assets/global/flags_png/BJ-efa2a6fbdc44310eb884bdedaec62158013863f9151b7699f6b1d808149876fe.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"AF",name:"Afghanistan",image:"/assets/global/flags_png/AF-b00e21bc05ca5228358f3ea5ea2d3d18a2865f7f4220dd5f65085e0f615e9f30.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"DJ",name:"Djibouti",image:"/assets/global/flags_png/DJ-5de44ae051604942575cb2f9f578f5fd50bc30dfa2b69b2f0b2b70fdc8f58f90.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"EE",name:"Estonia",image:"/assets/global/flags_png/EE-4861c16101df972293fa5b87d7877207bb09a4c740bf003c4ee5e3d82d71ec65.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"NE",name:"Niger",image:"/assets/global/flags_png/NE-a86f1451872ce48a1da2c9e80dcce543694e01d5e7f87e262632c044c856f0bb.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"TD",name:"Chad",image:"/assets/global/flags_png/TD-7fb7d2ac180f785264ec68fbc495bb8ace12c6a185cbaf03ac0afbbb9605bdeb.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"MG",name:"Madagascar",image:"/assets/global/flags_png/MG-0e0e9e47ad730fbd100a535c775582e3ee66226fee5c3ed2dda51e541c9898f5.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"MS",name:"Montserrat",image:"/global/flags_png/MS.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"HT",name:"Haiti",image:"/assets/global/flags_png/HT-818489b232bf4784bafa605ee06c98316b7a7a4467289ed0f66224035480bdea.png"},supported_id_types:[{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"HR",name:"Croatia",image:"/assets/global/flags_png/HR-0866d54550819bf5348e8cc2bba5c1df67c97ca7262d8e01a366decef5b6dfe3.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"TN",name:"Tunisia",image:"/assets/global/flags_png/TN-a56021b9ede5eef3edd35278cb0aec93b1a76f1e3d659c9d7c6ae2f415ce03eb.png"},supported_id_types:[{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"GQ",name:"Equatorial Guinea",image:"/assets/global/flags_png/GQ-0389bd1e1b57e549489e12b3919b1d6f810c124f371ec38449039d3e4f41e690.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"HN",name:"Honduras",image:"/assets/global/flags_png/HN-121695181ed69962eee6bbe5179c556ef5116cfc1c5b223f6515d8c85c734b7d.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"IE",name:"Ireland",image:"/assets/global/flags_png/IE-60f9072ce15fec70c778c370b70db8dc2b25a0133387c9a9c6a17d2b3a6db615.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"LS",name:"Lesotho",image:"/assets/global/flags_png/LS-98737987866fcafee18364eff7c4aaf408331e09bbc9176824753b4c7891f79b.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"TH",name:"Thailand",image:"/assets/global/flags_png/TH-83a61cd6814771f5dbc332fc9c05ca52223679a2d76efcdaf83d67df11af8dba.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"BS",name:"Bahamas",image:"/assets/global/flags_png/BS-cc60a61ad2dc0ed89fbcfc76f4862d75940fd45313f4860d0e35aff6a85c9fde.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"OM",name:"Oman",image:"/assets/global/flags_png/OM-393773e87aec54f35e473bd597ae18f9509bc0cb6e87769c5228ba0139345f9b.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"LB",name:"Lebanon",image:"/assets/global/flags_png/LB-42914d5b3609bb250a362d275f6e693b113dc8a3da0202334d5043e2e7b62c14.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"GR",name:"Greece",image:"/assets/global/flags_png/GR-c0aa7c3f76f4c04e8a36b18ee7e9daaf35f6fac390015f7f67c8fc8b6c2810fd.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"GT",name:"Guatemala",image:"/assets/global/flags_png/GT-61ad5b69f2cd87073b7b73d7960d153a7ed306bd14b05c81407eb87663547789.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"GY",name:"Guyana",image:"/assets/global/flags_png/GY-cb78de3d91fb4ae1f4633831bfc62f0d31b6457667658c87a58ccb28452f4423.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"DM",name:"Dominica",image:"/assets/global/flags_png/DM-420e352dd71592f007c4c99a0e7d966b61e2cb42ee65e76b1e59027184d13f29.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"TC",name:"Turks and Caicos Islands",image:"/global/flags_png/TC.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"DE",name:"Germany",image:"/assets/global/flags_png/DE-e52ff00b7ab79ef57d15a5ff220821c79ea78eaaaf0ab69d92499fee9c2b90c1.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"TL",name:"Timor-Leste",image:"/assets/global/flags_png/TL-f0e77c5ef7581036cf4a07777c68f76f2a3acafe83a009e8a8716b8bacc95afd.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"LC",name:"Saint Lucia",image:"/assets/global/flags_png/LC-8405db2ded5166278356028f60a78ec7c69a528d51368d2fcfe1ddfdb7aee90f.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"AG",name:"Antigua and Barbuda",image:"/assets/global/flags_png/AG-2619d10c21e6e0cbb5f18c5b7e821acc95e9347d518f8edfdda2dd20e6d5dc75.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"KR",name:"Korea, Republic of",image:"/assets/global/flags_png/KR-99eea7a9cb66c3faa95f805afcc79d738e0cc2e4954c21f5b8ed590573ca2bc1.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"PT",name:"Portugal",image:"/assets/global/flags_png/PT-6e0067bc1836561689312c6416760e869aa6e559cb2a3f84ea5c7680d7904975.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"PR",name:"Puerto Rico",image:"/assets/global/flags_png/PR-27cdbde4e23714d16207d58ade70c3cfffcf460e6d01fef647f977ada4b89e65.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0}]},{country:{code:"LI",name:"Liechtenstein",image:"/assets/global/flags_png/LI-6c5fb9cdedc9541e45341d2d02b0de8bee5e75f5bc0c9a38ffabbe0a3e901803.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"TT",name:"Trinidad and Tobago",image:"/assets/global/flags_png/TT-4dab540bca8a5c7e00778e6e432b22109bfb307fb4fb1cc1c1386cb9bda895ab.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"LT",name:"Lithuania",image:"/assets/global/flags_png/LT-761ae6a739b2e41b32881b6bb4e960c6a8aa19e98af82f5395bfb656b21784a6.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"SS",name:"South Sudan",image:"/assets/global/flags_png/SS-12b91d26a42ec0c4f9c084110701b19f8d327a7023d66cf6631283c186ca055f.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"NO",name:"Norway",image:"/assets/global/flags_png/NO-976cd3d193a265971f90a4e432359892a62276c3c1c71ab8891572bf9f5b0a9d.png"},supported_id_types:[{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"SR",name:"Suriname",image:"/assets/global/flags_png/SR-bebc0e678f32cd54e09e7e4d1fb6ae558475d533baaf494f125f75d108bb64f0.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"BO",name:"Bolivia",image:"/assets/global/flags_png/BO-d96e1b15ca48663e162c568cf1aff2abba9d8bca613cb3e4e10fa4b86e7eb209.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"PK",name:"Pakistan",image:"/assets/global/flags_png/PK-aa21f333720ffd9c3f2b84ba4beee9e201bf343dfdd6f5bb5847626fb1dd98a8.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"BA",name:"Bosnia and Herzegovina",image:"/assets/global/flags_png/BA-6291083a6b780fc4abf6e3bbb79d6b6f3135d676f4e8b6545032a3dc8f711a75.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"JP",name:"Japan",image:"/assets/global/flags_png/JP-b9f8f51047cca19830bfa11791f3b207cd3d5a1e4911cacd7683076349e8f932.png"},supported_id_types:[{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"RS",name:"Serbia",image:"/assets/global/flags_png/RS-b0d3a0f365c2ea45d403d1764bcfd92b84582841bdb7f6523a4a986945280597.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"ZW",name:"Zimbabwe",image:"/assets/global/flags_png/ZW-1f30389ec0ba1293280c6903480dd4480bf5ea968b5ad11ad2187b2b24b68695.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"VE",name:"Venezuela, Bolivarian Republic of",image:"/assets/global/flags_png/VE-25225f9726d9dca96ce03a08b7cba02649c85f72dd0307eaccbbb1d4fffb26ad.png"},supported_id_types:[{type:"id_card",backside_image_required:!1},{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"SI",name:"Slovenia",image:"/assets/global/flags_png/SI-5e411c4452dbc73c6959349ec3488eddabb8d896d544dc957f35a9753a751a29.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"DK",name:"Denmark",image:"/assets/global/flags_png/DK-94ba532301e27f13f7c96b4e73411e5f79f9843a092600dc6df41910eaee5a4d.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"ZM",name:"Zambia",image:"/assets/global/flags_png/ZM-54718800937bb6e9c0f531998361a80665e00d55807253be0340c573836e86d1.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"BT",name:"Bhutan",image:"/assets/global/flags_png/BT-e03afd356b0b4f88019ed875584fca5c84a302be5a85b36f60308a4e3fd99625.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"IT",name:"Italy",image:"/assets/global/flags_png/IT-177a121fdbf392bc52ff0d7b6762f0cd3df55d68cbbbc3736a2ed53a799dd277.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"TZ",name:"Tanzania, United Republic of",image:"/assets/global/flags_png/TZ-7a460cff962df829d59e42e3a6dfdfe1212467451f7e005241bc282060648a0f.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"UG",name:"Uganda",image:"/assets/global/flags_png/UG-2f9509c4719ad1b4216e8ddf7cf3c2355757464f3b7e879988a0531b02870f69.png"},supported_id_types:[{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"SE",name:"Sweden",image:"/assets/global/flags_png/SE-9d5b8c1442c9ee0951f893ce49b8fc2e662f1ef7eed71ca7f02ad1c677d0279f.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"CR",name:"Costa Rica",image:"/assets/global/flags_png/CR-57f6377b73a0388dd9d9ab3b1f8db83439d6b49a7e331deee485bb9823cf76a8.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"BZ",name:"Belize",image:"/assets/global/flags_png/BZ-ab8b66186a2a09c6635f6f7f3ac502f1deea7b48e7d843a207e94f856cfe9f33.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"GW",name:"Guinea-Bissau",image:"/assets/global/flags_png/GW-50a7fbf30fce350a8f491bd11a724e1cbaf598857e0c541be181393c00e62a73.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"FI",name:"Finland",image:"/assets/global/flags_png/FI-f94491eb812ae79a9121f988e183b7ad0db32f199023fca49a08841f646ed3e7.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"GU",name:"Guam",image:"/assets/global/flags_png/GU-bb1320e928531713e8e06a20b2c22930f67be53e4ee31c9b7d31207b45d43808.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"GG",name:"Guernsey",image:"/global/flags_png/GG.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"NP",name:"Nepal",image:"/assets/global/flags_png/NP-8ca9bf85fff30be6ed58fc5263f4beb5947e2ecae9deb4060c54ee8799777db4.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0}]},{country:{code:"MU",name:"Mauritius",image:"/assets/global/flags_png/MU-f9bbe3619de18eec6ab9a2490ecc6da4475d0fc179a3a04a4c4a314c8a9be41a.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"MV",name:"Maldives",image:"/assets/global/flags_png/MV-793d6a0304fcf43f4cc52c5921e45fc3050f4455d4b00b0de22d1ea2f99b41ca.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"TO",name:"Tonga",image:"/assets/global/flags_png/TO-8ec87a63b77e9116f7bbcec0abb7d3b1a507308a747718e66d03b3dad348b3b0.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"BE",name:"Belgium",image:"/assets/global/flags_png/BE-9193210af284b5e2364c2f0a0d9779556d680a24856ab39c71a106c7010da142.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"PL",name:"Poland",image:"/assets/global/flags_png/PL-e263c6d504c793f9a1cd93fdbd47a90eb29d2fbb94ad2579a714c06eacbe559d.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"MC",name:"Monaco",image:"/assets/global/flags_png/MC-dfd18537ca467b1e5f4e41d5dcedaa1f66303febea8410a90529c06a58dd23cb.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"CI",name:"Côte D'Ivoire",image:"/assets/global/flags_png/CI-7bd9410b4a0c69aec7f914a27a396e4d658943535608e3cb38c9e5a97cfd69e7.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"BD",name:"Bangladesh",image:"/assets/global/flags_png/BD-f6860232b45367be320373591a90c772f9fe8a91a4f55d84931858e9c46ed28f.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"LR",name:"Liberia",image:"/assets/global/flags_png/LR-35cdefea5dcf25363d5297fb026fa27c3f346ed678692ff6d457244be501ec45.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"TR",name:"Turkey",image:"/assets/global/flags_png/TR-5d878c72e91fa9685154dfa9472d8a6f7eca59e16c698b0a06a1d472cad4bf87.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"VI",name:"Virgin Islands, U.S.",image:"/assets/global/flags_png/VI-de2cc47f67e4eb5ed6f8290010618db6add1b4141323d154980a263b043f9f6b.png"},supported_id_types:[{type:"drivers_licence",backside_image_required:!0}]},{country:{code:"BB",name:"Barbados",image:"/assets/global/flags_png/BB-9770c2817c834feab0555d36c710976836ac61f4c5d88671d0318f3e4abe6ac4.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"EG",name:"Egypt",image:"/assets/global/flags_png/EG-91a7a3da04deb919f97a20bbb13bccedf9516665427be545b2abc28657ee31dc.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"AM",name:"Armenia",image:"/assets/global/flags_png/AM-f59a74e65dfe725c21cb1ce4520c64a7fd7d608c2bd0cfdc13b8260da83bb64f.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"LY",name:"Libya",image:"/assets/global/flags_png/LY-94adf172d5f62367b29c858aca874e4abad1d684994d653e30d10a90af17b300.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"BG",name:"Bulgaria",image:"/assets/global/flags_png/BG-62fe541732144f22386f9f29d709feb500db4d4f85253ffa46d3b19cd94e28fe.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"PE",name:"Peru",image:"/assets/global/flags_png/PE-169bd7eaed9043ffb6302b092038d92953f7160929216d6eb7a9e0dff1781300.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"YE",name:"Yemen",image:"/assets/global/flags_png/YE-44b072e67aad133f5f33a457a54645474371cd148beb3fd0623d6519d7f2cfef.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"JE",name:"Jersey",image:"/global/flags_png/JE.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"JM",name:"Jamaica",image:"/assets/global/flags_png/JM-63924f81ebc07d6ecd2e6148a3ba0443833b613bc52e37a841ac9cc467188255.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"UZ",name:"Uzbekistan",image:"/assets/global/flags_png/UZ-4a6c34ead6465d7bbd50eb799cfc576bf5ebb66a1d5309ba920308ab15defa4d.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"KN",name:"Saint Kitts And Nevis",image:"/assets/global/flags_png/KN-ef95950cfeff68efcf067aaa96640a77e93778c5ddd960b5d71d2209bf49c4e2.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"LA",name:"Lao People's Democratic Republic",image:"/assets/global/flags_png/LA-9abbf92086fe924725c45d4d679db5b010c884c07af69b994b5dad9855b51f75.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"KY",name:"Cayman Islands",image:"/assets/global/flags_png/KY-e414ee213853a0a51bcee1dffe84139e7589f8f546276419616890c4f0a2eda0.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"TW",name:"Taiwan, Republic Of China",image:"/assets/global/flags_png/TW-b9f0a61c4c41f893da19eaf02a91a0e8ebe2c9b11efb882becffa8469fd63f71.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"KH",name:"Cambodia",image:"/assets/global/flags_png/KH-972f67011028bb4c84c18b384a3b72bb1c93f579704dbbd057975aa7dc919f35.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"RW",name:"Rwanda",image:"/assets/global/flags_png/RW-6dfa4ac9ac2d02dafe7ad92f6e603b953911ff6241db68276653aa004a6122d1.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"HU",name:"Hungary",image:"/assets/global/flags_png/HU-7aac433c376ed9643e9235bdd8b62e794eb52cf66f745ff38f425bd32ed08c53.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"ML",name:"Mali",image:"/assets/global/flags_png/ML-54b0ba0993bfef8e037de9264cd345525302eba8b23df58d823424903e03f10b.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"MR",name:"Mauritania",image:"/assets/global/flags_png/MR-5aa969f5a698ef2ca82230fbab98a0c57e80abd8446c1063231d80c0f8ca05cd.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"CN",name:"China",image:"/assets/global/flags_png/CN-cc03ec5b10004f57ffeb662ffa0e6c08249bbb1e7d350ebef730d20be8cbf049.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"ME",name:"Montenegro",image:"/assets/global/flags_png/ME-f9f18e1397245b45a39a26a1c9f8a6b4f8a0ec17f3d984f1735055c2d5da6bf0.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0}]},{country:{code:"NG",name:"Nigeria",image:"/assets/global/flags_png/NG-8bbf5212669ca125058edbf2bbb12e2db8f001058048ce2bb0ba80c88d959183.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"BH",name:"Bahrain",image:"/assets/global/flags_png/BH-e5a3d35b1c248bf19aa0458b5e8782cf46079f867860e734534a8573c4faab66.png"},supported_id_types:[{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"GA",name:"Gabon",image:"/assets/global/flags_png/GA-16995ed800a3d740c001c74dede462c0ceeb8972828c02242d399dfaa3495f4f.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"IN",name:"India",image:"/assets/global/flags_png/IN-b7738f15a59973c4d1290a15a40fdccba013ff26ca2a042556c22d7b45a5e0c3.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"CZ",name:"Czech Republic",image:"/assets/global/flags_png/CZ-8bf38aa0e1bbf58a5bbc21d42933f13d3a14848158f89ab14f2a8b4690aed263.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"BN",name:"Brunei Darussalam",image:"/assets/global/flags_png/BN-275962ab3a3ddcae04fbd66fb3b926badfa2627aab5263d506889b9942699e1a.png"},supported_id_types:[{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"UY",name:"Uruguay",image:"/assets/global/flags_png/UY-14f7ec76cfd2df8bb0c71ef67a05add3dbb7ddf65a934c381d6cc3ce94b06aa9.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"BR",name:"Brazil",image:"/assets/global/flags_png/BR-c21ce346614adb4e722a26931d85616b012939ce7df101085ed9ca26c43dc5a9.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"TM",name:"Turkmenistan",image:"/assets/global/flags_png/TM-f921889cfdecf7d57dc95111a62e838d26aacc3ab04c8be93ba6f71f1d9bb0d3.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"MW",name:"Malawi",image:"/assets/global/flags_png/MW-c1ecded795dfb4a15559e9ca4844954a8703d369d77a8e4e570c465b8ba27641.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"KG",name:"Kyrgyzstan",image:"/assets/global/flags_png/KG-a291e68377af4cfdf4bd62a088ff157e1b149eb5b43af53ee33c346f36a6c08a.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"PA",name:"Panama",image:"/assets/global/flags_png/PA-bf2a97b5bbd9c338b0b258c23d6e965640b23da16709075b75f1e846375ec1a0.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"MM",name:"Myanmar",image:"/assets/global/flags_png/MM-0e8bcfd70f8da8369a9f113fbd811cabda5fc286342243d3f03fe295d62844c6.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"SA",name:"Saudi Arabia",image:"/assets/global/flags_png/SA-38b8ee14f6ced326dbc63281a12ae9a4afafea19b2d26fe67f63722c4531d5f2.png"},supported_id_types:[{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"SZ",name:"Swaziland",image:"/assets/global/flags_png/SZ-af157145c156d3474d9349a80cca2d3d046ef116d8a35a9619cef0042ebdc6d4.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"FM",name:"Micronesia, Federated States Of",image:"/assets/global/flags_png/FM-c61102237e76e20d2aeed7f163314de1441a1f9e5c9c562d07d5aaede4cd3cea.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"CO",name:"Colombia",image:"/assets/global/flags_png/CO-a55d6e9352a585ea52e99f23f24ec1d7b89bbf285f15eb520787f2e2a811b0b2.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"SC",name:"Seychelles",image:"/assets/global/flags_png/SC-c32e760e2857b7790eb9dca1c24d792de0f78f23fb87344d25a9ae0792df3882.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"ZA",name:"South Africa",image:"/assets/global/flags_png/ZA-b7265aa27cac5b7ac38ae755850979023b06d60b4e09ca9c90ab579e50793598.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"MK",name:"Macedonia, the Former Yugoslav Republic Of",image:"/assets/global/flags_png/MK-2a31049c8fd63434d648f66c1a748e36185621a00e8d8978381faa463aaf6b24.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"AO",name:"Angola",image:"/assets/global/flags_png/AO-2c08a655c0cdab284dcee731a67ef3a2c160b74749e7cb7611ffd41c31b159ae.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"AD",name:"Andorra",image:"/assets/global/flags_png/AD-2355e0d800bab63e14f4bf83f292962b14f71af0a1342b37385b121a857b0fe0.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"SV",name:"El Salvador",image:"/assets/global/flags_png/SV-416a08166a1209f7e7a45564dd91adf35d7a5546b701463df1b43c895f2671e9.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"SK",name:"Slovakia",image:"/assets/global/flags_png/SK-252679b427a918c09afa27c32b1698779e6797586d6da197607342d4220ff528.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"ID",name:"Indonesia",image:"/assets/global/flags_png/ID-a2b35a19da216882c01c2aee459e2298d9941b093ae4dabe07363a36d6e7d430.png"},supported_id_types:[{type:"id_card",backside_image_required:!1},{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"AE",name:"United Arab Emirates",image:"/assets/global/flags_png/AE-28627bc4da520f791467dd0fcb9c2935145c94f8918ac1817b33d1f494f86124.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"GB",name:"United Kingdom",image:"/assets/global/flags_png/GB-159a0d57823209767afb5222800a32c3b9ba131ede295774ed2905d29ca8deb8.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"AT",name:"Austria",image:"/assets/global/flags_png/AT-d8a3142f0a58f389bee5e08bd6333e9b1e8c0ed3026fbdf47d80c58d8a7581a0.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"VU",name:"Vanuatu",image:"/assets/global/flags_png/VU-e5959233ae071d19b1a52e81383ca82c6331f5243124694806e09bbffa87a9f0.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"HK",name:"Hong Kong",image:"/assets/global/flags_png/HK-96e9fb9ea051b3a44aca0b4074444879f4e3421b9c35c773ea7536e3b57cceca.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"QA",name:"Qatar",image:"/assets/global/flags_png/QA-9b85ca4b8e710fe380a6ed3d0cd0fbbf8b1d76d4152eced79d6e6f2061bbb18f.png"},supported_id_types:[{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"SG",name:"Singapore",image:"/assets/global/flags_png/SG-a5f01955b4d5c3ace67f7a78af6b357a330de685dd93ce6b316e26650053783b.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"MZ",name:"Mozambique",image:"/assets/global/flags_png/MZ-2275d08d4be6213bace85042f8dc676bbcb54498ac716df90f376be0daeaa693.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"GI",name:"Gibraltar",image:"/assets/global/flags_png/GI-9eee466a2364ffae21c61cd4384e99a56c15ea6cca151ae329bd728eaa350c10.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"NL",name:"Netherlands",image:"/assets/global/flags_png/NL-440b9f01bb0f10988804081869241c6a8c9faf15058142bbf728eeb0f5ae5947.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"PW",name:"Palau",image:"/assets/global/flags_png/PW-16589de7593a2b6d5feae4c6b4b0e62d1cb539d3de13a814ca770d09690beddb.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"KE",name:"Kenya",image:"/assets/global/flags_png/KE-2f2c658bd12a09938b46977b5508d2a8a77e2f5d8ec7b4a2b6dde3b6b8bd6dbf.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"CA",name:"Canada",image:"/assets/global/flags_png/CA-1405870c5218539f0445c6fcc26550f3ab5d54cd3f1fd1d9c3a9aec11ac6a0e3.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"MN",name:"Mongolia",image:"/assets/global/flags_png/MN-a385a1acbaac2ffc1fe95748016e8a86d19ffe6fd621fbe9759ecb422f7f5904.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"BW",name:"Botswana",image:"/assets/global/flags_png/BW-5c4cee7f63f7de2f0f64fa866d0f6f8cd72fed5f1108d4cb50490a16cbf82360.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"ST",name:"Sao Tome and Principe",image:"/assets/global/flags_png/ST-5aaf251178b4477cce5cb9194ddfc5fd715f001fa96eb20b718a146f850535af.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"PG",name:"Papua New Guinea",image:"/assets/global/flags_png/PG-6b50ce557385ccb68755a8c0aca958b6e8323c153ddbb1cdbc8db3425e096711.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"AU",name:"Australia",image:"/assets/global/flags_png/AU-9ebcb91447a90f787ac94e36a2d2569de90e19604cf0994bdf9883a9a0cd6d26.png"},supported_id_types:[{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"LK",name:"Sri Lanka",image:"/assets/global/flags_png/LK-e369fa29c6acbf1e6841fb18dc0d7a16645a32964e8603e52173743c640be8f9.png"},supported_id_types:[{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"AR",name:"Argentina",image:"/assets/global/flags_png/AR-3629b8c69923e6ac078004ef7486370dd1b1f98425be498383f74daa155c9da6.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"VG",name:"Virgin Islands, British",image:"/global/flags_png/VG.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"CM",name:"Cameroon",image:"/assets/global/flags_png/CM-fc97c68ae8b0643103eee1913cea305321c62e3f4b491e15e0904f093896dfb9.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"AZ",name:"Azerbaijan",image:"/assets/global/flags_png/AZ-7d19711363fd0279b9216a084d3d14a505303b663b2768f9a41fff69f920146b.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"CL",name:"Chile",image:"/assets/global/flags_png/CL-01797d27e524659a3c8446642f3250a9fa3ea0fe91218a023c7ef1ce94aa6acc.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"IM",name:"Isle of Man",image:"/global/flags_png/IM.png"},supported_id_types:[{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"MO",name:"Macao",image:"/assets/global/flags_png/MO-0cb4c6bd0a01fef980609a90a456eeb617f2215674bf80b342feaf43853f3175.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"KZ",name:"Kazakhstan",image:"/assets/global/flags_png/KZ-11089225c353c8c065e1cce14e4c73c32ed3a794d49d549a5a3b72b9b8a50b0b.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"passport",backside_image_required:!1}]},{country:{code:"BF",name:"Burkina Faso",image:"/assets/global/flags_png/BF-24f8033cf685a324be5983f1f831a1f19459059dcb79cdd8b94b6449530ab66f.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"DZ",name:"Algeria",image:"/assets/global/flags_png/DZ-f943da52f45c5d9a85852c5b12ee3c6ce1d9f4df4e24d1b031ef7f225bb1792b.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"CD",name:"Congo, The Democratic Republic Of The",image:"/assets/global/flags_png/CD-af511db089986c5b5609d15e87db2b7256554653b0912458e9cbb8386d6ac342.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"IQ",name:"Iraq",image:"/assets/global/flags_png/IQ-97884b10dc0ddcd42534cb98cc40167a5eb226dea25be9a45c4c530194d5c117.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"LU",name:"Luxembourg",image:"/assets/global/flags_png/LU-ad3c08bc5f6a0ae9400b791531fdb4b02b7648d1358fc367ff7b1fc9d9ff0e19.png"},supported_id_types:[{type:"id_card",backside_image_required:!1},{type:"drivers_licence",backside_image_required:!1},{type:"passport",backside_image_required:!1}]},{country:{code:"FJ",name:"Fiji",image:"/assets/global/flags_png/FJ-503278dfcdcbfa7e2b4d04e03f78af3c7c28c04ea25cdb5375028f5db2dbffc7.png"},supported_id_types:[{type:"passport",backside_image_required:!1}]},{country:{code:"EC",name:"Ecuador",image:"/assets/global/flags_png/EC-8ca5c370182cc69a9befddf30b0bc86247a5906cf3fca8e18ceabad26e71978e.png"},supported_id_types:[{type:"id_card",backside_image_required:!0},{type:"drivers_licence",backside_image_required:!0},{type:"passport",backside_image_required:!1}]}];function xi(e){return function(e){return"object"==typeof e&&null!==e&&"message"in e}(e)?e.message:"unknown-error"}function Si(e,t){return(r,n)=>{(0,M.Kz)(e,Ft({componentType:M.re.content_script,action:M.Us.measurement,loggingId:t,error:xi(r),application_context:"not_set"},n))}}const ki={idvSubmit:(e,t,r,n,i)=>Si("verify_document_error","11913a31-c0e0-42d9-a185-e2f4a05c8439")(e,{context:t,method:r,status_code:n,raw_response:i}),idvProfilePoll:(e,t)=>Si("verify_document_polling_error","0c25266c-ff6c-48e6-9e94-a263b8040e0d")(e,{is_nullish:t}),supportedDocs:e=>Si("supported_docs_fetch_error","4662a90e-32a3-469e-abef-43ecbe6b36bf")(e),idvProfiles:e=>Si("idv_profiles_fetch_error","695070fd-2aa0-4101-8542-d7bfa185e27d")(e),idCaptureLogAnomaly:e=>Si("id_capture_flow_anomaly","026a0cd9-d626-40f5-94e8-24d8687cfe95")(e),createSession:e=>Si("id_capture_create_session_error","92270eb1-38a8-4d29-9369-050c7129d2c1")(e),getSession:e=>Si("id_capture_get_session_error","9e1d17db-9ed3-47e8-9a40-bdfe3b12fea5")(e),submitSession:e=>Si("id_capture_submit_session_error","ec6b6241-794c-4730-a603-44ae49c5ecd7")(e)};function Ei(e,t){const r=e.replace(/[^A-Za-z0-9\+\/]/g,""),n=r.length,i=t?Math.ceil((3*n+1>>2)/t)*t:3*n+1>>2,a=new Uint8Array(i);let o,s,c=0,l=0;for(let e=0;e64&&u<91?u-65:u>96&&u<123?u-71:u>47&&u<58?u+4:43===u?62:47===u?63:0)<<18-6*s,3===s||n-e==1){for(o=0;o<3&&l>>(16>>>o&24)&255;c=0}var u;return a}const Ii=(e,t)=>{if(Array.isArray(e))return e.map((e=>Ii(e,t)));if((0,wt.isPlainObject)(e)){const r={};return Object.keys(e).forEach((n=>{r[t(n)]=Ii(e[n],t)})),r}return e},Ci=Ii,Di=e=>e?Ci(e,(e=>(0,wt.camelCase)(e))):e;function Mi(e){return"object"==typeof e&&null!==e&&"apiClientErrorId"in e&&"message"in e&&"response"in e&&"requestId"in e&&"cfRay"in e&&"statusCode"in e}const ji=({shouldRetry:e})=>t=>{let r=0;return async function n(){let i;try{i=await t()}catch(t){if(await e(t,r))return new Promise((e=>{setTimeout((()=>{r+=1,e(n())}),2**r*1e3)}));throw t}return i}};var Ai,Pi,Oi,Fi,Ui,Ri,Ni,Li,Bi,qi,Vi,Wi,$i,zi,Yi,Hi,Gi,Ki,Zi,Qi,Ji,Xi,ea,ta,ra,na,ia,aa,oa,sa,ca,la,ua,da,pa,fa,ga,ha,ma,ba,ya,_a,va,wa,Ta,xa,Sa,ka,Ea,Ia,Ca,Da,Ma,ja,Aa,Pa,Oa,Fa,Ua,Ra,Na;const La=(Pi=vi((Ai=class{get supportedIdTypes(){let e=null;if(this.supportedIdTypesData){const t=Tt().find(this.supportedIdTypesData,(e=>e.country.code===this.country));t?.supportedIdTypes&&(e=t.supportedIdTypes.slice().reverse())}return e}get facematchRequired(){return"face"===this.forceFacematchType||!!this.eligibilityData?.facematchRequired}get textmatchRequired(){return"text"===this.forceFacematchType||!!this.eligibilityData?.textmatchRequired}get creationType(){return this.textmatchRequired?"textmatch":this.facematchRequired?"face_match":"api_netverify"}get facematchOrTextmatchRequired(){return this.facematchRequired||this.textmatchRequired}get facematchType(){return this.textmatchRequired?"text":this.facematchRequired?"face":void 0}get backsideImageRequired(){if(!this.selectedIdType||!this.supportedIdTypes)return!1;const e=this.supportedIdTypes.find((e=>e.type===this.selectedIdType));return!!e?.backsideImageRequired}get idType(){return Tt().camelCase(this.selectedIdType)}get submissionStatus(){return this.jumioProfileData?.status}get errorMessage(){return this.jumioProfileData?.failureReason?{name:"jumioFailure",message:this.jumioProfileData.failureReason}:this.error}get allowNewSubmission(){return this.submissions<=2}get allowFacematchContinue(){let e;return e=this.backsideImageRequired?!(!this.frontImageData||!this.backImageData):!!this.frontImageData,e}get allowFileUpload(){return!(!this.frontImageData||this.backsideImageRequired&&!this.backImageData||this.facematchOrTextmatchRequired&&!this.faceImageData)}get previewImage(){if(this.preview)return this.faceImageData}get failureCode(){if(this.jumioProfileData?.failureCode)return this.jumioProfileData.failureCode}resetError(){this.error=void 0}unfreeze(){this.preview=!1}reinitializeStore(e){this.resetError(),this.changeStep("loading"),this.webcamDisabled=!!e.webcamDisabled,this.initializeJumioProfileData(e.pendingVerificationId),this.checkMediaDevices()}checkMediaDevices(){navigator.mediaDevices?.enumerateDevices?navigator.mediaDevices.enumerateDevices().then((e=>{e.some((e=>"videoinput"===e.kind))||(this.webcamDisabled=!0)})):(navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia,this.webcamDisabled=!navigator.getUserMedia)}initializeJumioProfileData(e){e?(this.jumioProfileData={id:e},this.step="pendingVerification",this.pollSubmissionStatus()):this.startWidget()}constructor(e){this.onPendingResponse=void 0,_i(this,"step",Pi,this),_i(this,"country",Oi,this),_i(this,"applicationContext",Fi,this),_i(this,"isPhone",Ui,this),_i(this,"legalNameChange",Ri,this),_i(this,"forceFacematchType",Ni,this),_i(this,"allowCountryChange",Li,this),_i(this,"allowMobileUpload",Bi,this),_i(this,"supportedIdTypesData",qi,this),_i(this,"eligibilityData",Vi,this),_i(this,"selectedIdType",Wi,this),_i(this,"timer",$i,this),_i(this,"webcamActive",zi,this),_i(this,"frontImageData",Yi,this),_i(this,"backImageData",Hi,this),_i(this,"faceImageData",Gi,this),_i(this,"preview",Ki,this),_i(this,"jumioProfileData",Zi,this),_i(this,"error",Qi,this),_i(this,"submissions",Ji,this),_i(this,"flashVisible",Xi,this),_i(this,"numberObfuscated",ea,this),_i(this,"recoveryUrl",ta,this),_i(this,"webcamDriverDetected",ra,this),_i(this,"webcamDisabled",na,this),_i(this,"frontWebcamSpoof",ia,this),_i(this,"frontNumSnaps",aa,this),_i(this,"frontBlurryScore",oa,this),_i(this,"frontSnapBlurryScores",sa,this),_i(this,"backWebcamSpoof",ca,this),_i(this,"backNumSnaps",la,this),_i(this,"backBlurryScore",ua,this),_i(this,"backSnapBlurryScores",da,this),_i(this,"faceWebcamSpoof",pa,this),_i(this,"faceNumSnaps",fa,this),_i(this,"faceBlurryScore",ga,this),_i(this,"faceSnapBlurryScores",ha,this),_i(this,"isSubmitting",ma,this),_i(this,"source",ba,this),_i(this,"environment",ya,this),this.client=void 0,this.track=void 0,this.onApiError=void 0,this.blurryDetector=void 0,_i(this,"changeStep",_a,this),_i(this,"setWebcamError",va,this),_i(this,"setError",wa,this),_i(this,"selectIdType",Ta,this),this.logMeasurement=(e,t)=>{let r=t.loggingId,n=jt(t,Ct);this.track(e,Ft({action:M.Us.measurement,componentType:M.re.content_script,loggingId:r},n))},_i(this,"resetWebcamCapture",xa,this),_i(this,"resetImageForWebcamCapture",Sa,this),_i(this,"reset",ka,this),_i(this,"freeze",Ea,this),this.handleWebcamSnapComplete=(e,t,r,n,i)=>{this.faceImageData=e,this.faceWebcamSpoof=t,this.faceNumSnaps=r,this.faceBlurryScore=n,this.faceSnapBlurryScores=i,t&&(this.webcamDriverDetected=t)},_i(this,"snap",Ia,this),_i(this,"snapWithoutTimer",Ca,this),_i(this,"fetchSupportedDocumentTypes",Da,this),_i(this,"fetchEligibility",Ma,this),_i(this,"uploadImage",ja,this),_i(this,"resetIdImage",Aa,this),_i(this,"submitImages",Pa,this),this.clearPollTimer=()=>{clearTimeout(this.pollTimer)},_i(this,"pollSubmissionStatus",Oa,this),_i(this,"markWebcamActive",Fa,this),this.markWebcamActiveOnReady=()=>{this.webcam.onReady((()=>this.markWebcamActive()))},_i(this,"flash",Ua,this),_i(this,"onImageUploadSubmit",Ra,this),_i(this,"startWidget",Na,this),this.handleContinueCapture=()=>{this.onImageUploadSubmit()},this.convertToFormData=(e,t)=>{let r;if("face_image"!==e)r=[e,t];else{0;const n=t.match(/^data:image\/(\w+)/)[1],i=n.replace(/e/,""),a=t.replace(/^data:image\/\w+;base64,/,"");r=[e,new Blob([Ei(a)],{type:`image/${n}`}),`${e}.${i}`]}return r},this.onVerified=void 0,this.webcam=void 0,this.flashUi=void 0,this.isKycFallback=void 0,this.optionalTextmatch=void 0,this.client=e.client,this.track=e.track,this.applicationContext=e.applicationContext||null,this.isPhone=!!e.isPhone,this.onVerified=e.onVerified,this.webcam=e.webcam,this.onApiError=e.onApiError,this.webcam.setError=this.setWebcamError,this.webcamDisabled=!!e.webcamDisabled,this.country=e.country.toUpperCase(),this.legalNameChange=!!e.legalNameChange,this.forceFacematchType=e.forceFacematchType,this.optionalTextmatch=!!e.optionalTextmatch,this.allowCountryChange=!!e.allowCountryChange,this.allowMobileUpload=!!e.allowMobileUpload,this.supportedIdTypesData=Di(Ti),this.submissions=0,this.flashUi=e.flashUi,this.onPendingResponse=e.onPendingResponse,this.isKycFallback=e.isKycFallback||!1,this.blurryDetector=new hi({leaveBreadcrumb:(e,t)=>this.track(e,t),onError:this.onApiError}),this.source=e.source,this.environment=e.environment,"login-web"!==e.source&&this.initializeJumioProfileData(e.pendingVerificationId),this.checkMediaDevices()}}).prototype,"step",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"loading"}}),Oi=vi(Ai.prototype,"country",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Fi=vi(Ai.prototype,"applicationContext",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ui=vi(Ai.prototype,"isPhone",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Ri=vi(Ai.prototype,"legalNameChange",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Ni=vi(Ai.prototype,"forceFacematchType",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Li=vi(Ai.prototype,"allowCountryChange",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Bi=vi(Ai.prototype,"allowMobileUpload",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),qi=vi(Ai.prototype,"supportedIdTypesData",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),Vi=vi(Ai.prototype,"eligibilityData",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Wi=vi(Ai.prototype,"selectedIdType",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"drivers_licence"}}),$i=vi(Ai.prototype,"timer",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),zi=vi(Ai.prototype,"webcamActive",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Yi=vi(Ai.prototype,"frontImageData",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Hi=vi(Ai.prototype,"backImageData",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Gi=vi(Ai.prototype,"faceImageData",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ki=vi(Ai.prototype,"preview",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Zi=vi(Ai.prototype,"jumioProfileData",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Qi=vi(Ai.prototype,"error",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){}}),Ji=vi(Ai.prototype,"submissions",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Xi=vi(Ai.prototype,"flashVisible",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ea=vi(Ai.prototype,"numberObfuscated",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),ta=vi(Ai.prototype,"recoveryUrl",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),ra=vi(Ai.prototype,"webcamDriverDetected",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),na=vi(Ai.prototype,"webcamDisabled",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ia=vi(Ai.prototype,"frontWebcamSpoof",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),aa=vi(Ai.prototype,"frontNumSnaps",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),oa=vi(Ai.prototype,"frontBlurryScore",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),sa=vi(Ai.prototype,"frontSnapBlurryScores",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),ca=vi(Ai.prototype,"backWebcamSpoof",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),la=vi(Ai.prototype,"backNumSnaps",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),ua=vi(Ai.prototype,"backBlurryScore",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),da=vi(Ai.prototype,"backSnapBlurryScores",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),pa=vi(Ai.prototype,"faceWebcamSpoof",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),fa=vi(Ai.prototype,"faceNumSnaps",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),ga=vi(Ai.prototype,"faceBlurryScore",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),ha=vi(Ai.prototype,"faceSnapBlurryScores",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),ma=vi(Ai.prototype,"isSubmitting",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ba=vi(Ai.prototype,"source",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"retail"}}),ya=vi(Ai.prototype,"environment",[xt.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"development"}}),vi(Ai.prototype,"supportedIdTypes",[xt.Fl],Object.getOwnPropertyDescriptor(Ai.prototype,"supportedIdTypes"),Ai.prototype),vi(Ai.prototype,"facematchRequired",[xt.Fl],Object.getOwnPropertyDescriptor(Ai.prototype,"facematchRequired"),Ai.prototype),vi(Ai.prototype,"textmatchRequired",[xt.Fl],Object.getOwnPropertyDescriptor(Ai.prototype,"textmatchRequired"),Ai.prototype),vi(Ai.prototype,"creationType",[xt.Fl],Object.getOwnPropertyDescriptor(Ai.prototype,"creationType"),Ai.prototype),vi(Ai.prototype,"facematchOrTextmatchRequired",[xt.Fl],Object.getOwnPropertyDescriptor(Ai.prototype,"facematchOrTextmatchRequired"),Ai.prototype),vi(Ai.prototype,"facematchType",[xt.Fl],Object.getOwnPropertyDescriptor(Ai.prototype,"facematchType"),Ai.prototype),vi(Ai.prototype,"backsideImageRequired",[xt.Fl],Object.getOwnPropertyDescriptor(Ai.prototype,"backsideImageRequired"),Ai.prototype),vi(Ai.prototype,"idType",[xt.Fl],Object.getOwnPropertyDescriptor(Ai.prototype,"idType"),Ai.prototype),vi(Ai.prototype,"submissionStatus",[xt.Fl],Object.getOwnPropertyDescriptor(Ai.prototype,"submissionStatus"),Ai.prototype),vi(Ai.prototype,"errorMessage",[xt.Fl],Object.getOwnPropertyDescriptor(Ai.prototype,"errorMessage"),Ai.prototype),vi(Ai.prototype,"allowNewSubmission",[xt.Fl],Object.getOwnPropertyDescriptor(Ai.prototype,"allowNewSubmission"),Ai.prototype),vi(Ai.prototype,"allowFacematchContinue",[xt.Fl],Object.getOwnPropertyDescriptor(Ai.prototype,"allowFacematchContinue"),Ai.prototype),vi(Ai.prototype,"allowFileUpload",[xt.Fl],Object.getOwnPropertyDescriptor(Ai.prototype,"allowFileUpload"),Ai.prototype),vi(Ai.prototype,"previewImage",[xt.Fl],Object.getOwnPropertyDescriptor(Ai.prototype,"previewImage"),Ai.prototype),vi(Ai.prototype,"failureCode",[xt.Fl],Object.getOwnPropertyDescriptor(Ai.prototype,"failureCode"),Ai.prototype),_a=vi(Ai.prototype,"changeStep",[xt.aD],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return e=>{if(!wi.includes(e))throw new Error("Unknown step");"success"===e&&this.onVerified&&this.onVerified(),this.step=e}}}),va=vi(Ai.prototype,"setWebcamError",[xt.aD],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return(e,t=!0)=>{this.webcamDisabled=t,this.error={name:e.name,message:e.message},this.changeStep("failure")}}}),wa=vi(Ai.prototype,"setError",[xt.aD],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return e=>{this.error=e,this.changeStep("failure")}}}),vi(Ai.prototype,"resetError",[xt.aD],Object.getOwnPropertyDescriptor(Ai.prototype,"resetError"),Ai.prototype),Ta=vi(Ai.prototype,"selectIdType",[xt.aD],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return e=>{this.selectedIdType=e,this.logMeasurement("verify_document_tapped_document_type",{document_type:e,loggingId:"03d007b3-719f-4782-8745-8fd1813f00aa"}),this.track("idv_start_id_selected",{document_type:e,action:M.Us.click,componentType:M.re.button,loggingId:"436cb29f-8c3b-4236-98d6-38ad60215bd9"}),this.changeStep("imageUpload")}}}),xa=vi(Ai.prototype,"resetWebcamCapture",[xt.aD],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return()=>{this.unfreeze(),this.resetImageForWebcamCapture()}}}),Sa=vi(Ai.prototype,"resetImageForWebcamCapture",[xt.aD],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return()=>{if("imageUpload"!==this.step)throw new Error("switch statements should be exhaustive");this.faceImageData=""}}}),ka=vi(Ai.prototype,"reset",[xt.aD],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return()=>{this.webcam.reset(),this.webcam.unattach(),clearInterval(this.countdownTimer),clearTimeout(this.snapTimer),this.timer=null,this.unfreeze(),this.frontImageData="",this.backImageData="",this.faceImageData="",this.frontBlurryScore=0}}}),Ea=vi(Ai.prototype,"freeze",[xt.aD],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return()=>{this.preview=!0}}}),vi(Ai.prototype,"unfreeze",[xt.aD],Object.getOwnPropertyDescriptor(Ai.prototype,"unfreeze"),Ai.prototype),Ia=vi(Ai.prototype,"snap",[xt.aD],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return()=>{if(this.timer)return;this.timer=3,this.countdownTimer=setInterval((()=>{(0,xt.z)("snap",(()=>{this.timer=this.timer-1,0===this.timer&&(clearInterval(this.countdownTimer),this.timer=null,this.flashUi&&this.flashUi(),this.freeze())}))}),1e3);this.snapTimer=setTimeout((()=>{this.webcam.snap(5,500,((e,t,r,n,i)=>{this.webcam.unattach(),(0,xt.z)("webcam snap callack",(()=>{this.handleWebcamSnapComplete(e,t,r,n,i)}))}))}),500)}}}),Ca=vi(Ai.prototype,"snapWithoutTimer",[xt.aD],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return()=>{this.webcam.snap(5,0,((e,t,r,n,i)=>{this.webcam.unattach(),(0,xt.z)("webcam snap callack",(()=>{this.handleWebcamSnapComplete(e,t,r,n,i),this.freeze()}))}))}}}),Da=vi(Ai.prototype,"fetchSupportedDocumentTypes",[xt.aD],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return async()=>{const e=this.applicationContext?`application_context=${this.applicationContext}`:"";try{const t=await this.client.get(`/v2/jumio-profiles/supported-documents/${this.country}?${e}`);(0,xt.z)("fetchSupportedDocumentTypes",(()=>{this.supportedIdTypesData=[t.data]}))}catch(t){if("invalid country_code"===t.message)try{const t=await this.client.get(`/v2/jumio-profiles/supported-documents?${e}`);(0,xt.z)("fetchSupportedDocumentTypes",(()=>{this.supportedIdTypesData=t.data}))}catch(e){ki.supportedDocs(e),this.setError(e)}else ki.supportedDocs(t),this.setError(t)}}}}),Ma=vi(Ai.prototype,"fetchEligibility",[xt.aD],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return async()=>{try{const e=await this.client.get("/v2/jumio-profiles/eligibility");(0,xt.z)("fetchEligibility",(()=>{this.eligibilityData=e.data}))}catch(e){this.setError(e),ki.idvProfiles(e)}}}}),ja=vi(Ai.prototype,"uploadImage",[xt.aD],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return async(e,t)=>{const r=Tt().get(t,"preview"),n=(await this.blurryDetector.calculateBlurryFromImageUrl(r)).blurry;(0,xt.z)("uploadImage",(()=>{"front"===e?(this.frontImageData=t,this.frontBlurryScore=n):"back"===e?(this.backImageData=t,this.backBlurryScore=n):"face"===e&&(this.faceImageData=t,this.faceBlurryScore=n)}))}}}),Aa=vi(Ai.prototype,"resetIdImage",[xt.aD],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return e=>{(0,xt.z)("resetImage",(()=>{switch(e){case"front":this.frontImageData="",this.frontBlurryScore=0;break;case"back":this.backImageData="",this.backBlurryScore=0}}))}}}),Pa=vi(Ai.prototype,"submitImages",[xt.aD],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return async()=>{(0,M.KQ)("submit_idv");const e=new FormData;this.legalNameChange&&e.append("legal_name_changed","true"),this.allowCountryChange&&e.append("allow_country_change","true"),this.optionalTextmatch&&e.append("optional_textmatch","true"),e.append("country_code",this.country),e.append("id_type",this.selectedIdType),e.append("capture_method","file"),e.append("webcam_spoof_detected",String(this.webcamDriverDetected)),e.append("front_webcam_spoof",String(this.frontWebcamSpoof)),e.append("front_num_snaps",String(this.frontNumSnaps)),e.append("front_variance",String(this.frontBlurryScore)),e.append("front_snap_blurry_scores",JSON.stringify(this.frontSnapBlurryScores)),e.append("back_webcam_spoof",String(this.backWebcamSpoof)),e.append("back_num_snaps",String(this.backNumSnaps)),e.append("back_variance",String(this.backBlurryScore)),e.append("back_snap_blurry_scores",JSON.stringify(this.backSnapBlurryScores)),e.append("face_webcam_spoof",String(this.faceWebcamSpoof)),e.append("face_num_snaps",String(this.faceNumSnaps)),e.append("face_variance",String(this.faceBlurryScore)),e.append("face_snap_blurry_scores",JSON.stringify(this.faceSnapBlurryScores)),e.append("creation_type",this.creationType);const t=this.convertToFormData("front_image",this.frontImageData);if(e.append(...t),this.backsideImageRequired){const t=this.convertToFormData("back_image",this.backImageData);e.append(...t)}if(this.facematchOrTextmatchRequired){const t=this.convertToFormData("face_image",this.faceImageData);e.append(...t)}e.append("is_kyc_fallback",String(this.isKycFallback)),this.track("verify_document_upload_attempt",{action:M.Us.click,componentType:M.re.button,loggingId:"2723d174-e608-47a4-8d2a-305854d8b5c9"});const r=ji({shouldRetry:(e,t)=>Mi(e)&&"generic-error"===e.apiClientErrorId&&t<3})((()=>this.client.post("/v2/jumio-profiles",e)));let n;try{n=await r(),(0,M.KQ)("idv_submitted"),this.logMeasurement("verify_document_uploaded_success",{loggingId:"e0c5d97d-64ce-4ee1-bd33-5d8de75d3547",method:"file",status:n.data.status})}catch(e){this.error={name:"submitImagesError",message:e.message},ki.idvSubmit(e,"onboarding","file",Mi(e)?e.statusCode:void 0,Mi(e)?String(e.response):void 0),this.changeStep("failure")}n&&(this.jumioProfileData=n.data,this.onPendingResponse&&this.onPendingResponse(this.jumioProfileData),this.submissions=++this.submissions,this.pollSubmissionStatus())}}}),Oa=vi(Ai.prototype,"pollSubmissionStatus",[xt.aD],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return async()=>{let e;try{e=await this.client.get(`/v2/jumio-profiles/${this.jumioProfileData.id}`)}catch(e){ki.idvProfilePoll(e,!!this.jumioProfileData?.id),this.setError({name:"pollSubmissionStatusError",message:e.message})}if(e){this.jumioProfileData=e.data;const t=this.jumioProfileData.status;"completed"===t?this.changeStep("success"):"success_pending_choice"===t?window.location.href="/verifications/documents/change_country":"failed"===t?this.changeStep("failure"):"falling_back"===t?this.changeStep("fallingBack"):this.pollTimer=setTimeout(this.pollSubmissionStatus,1e4)}}}}),Fa=vi(Ai.prototype,"markWebcamActive",[xt.aD],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return()=>{this.webcamActive=!0}}}),Ua=vi(Ai.prototype,"flash",[xt.aD],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return(e=250)=>{this.flashVisible=!0,setTimeout((()=>{(0,xt.z)("flash",(()=>{this.flashVisible=!1}))}),e)}}}),Ra=vi(Ai.prototype,"onImageUploadSubmit",[xt.aD],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return async()=>{try{this.isSubmitting=!0,await this.submitImages()}catch(e){this.onApiError(e)}finally{this.isSubmitting=!1}"failure"!==this.step&&this.changeStep("pendingVerification")}}}),Na=vi(Ai.prototype,"startWidget",[xt.aD],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return async()=>{try{await Promise.all([this.fetchSupportedDocumentTypes(),this.fetchEligibility()]),this.error||this.changeStep("idType")}catch(e){this.setError(e)}}}}),vi(Ai.prototype,"reinitializeStore",[xt.aD],Object.getOwnPropertyDescriptor(Ai.prototype,"reinitializeStore"),Ai.prototype),Ai),Ba=e=>e.toLowerCase().split(/[_-]+/)[0]||"en",qa=["es-AR","es-CL","es-CO","es-CR","es-EC","es-mx","es-NI","es-PA","es-PE","es-US","es-VE"],Va=e=>qa.some((t=>t.toLowerCase()===e.toLowerCase()))?"es-LA":"es"===e?"es-ES":"pt"===e?"pt-BR":Ba(e),Wa=["es-LA","pt-PT","de","en","es","fr","ja","it","nl","pl","pt","ru","th","tr"];const $a=()=>(Et.get("coinbase_locale")||(()=>{let e;if(e=navigator.languages&&navigator.languages.length>0?navigator.languages[0]:navigator.language||navigator.userLanguage,e&&!Wa.includes(e)){const r=Va(e);return t=r,Wa.includes(t)?r:null}return e;var t})()||"en").toLowerCase(),za="https://coinbase-dev.cbhq.net/api",Ya="https://www.coinbase.com/api",Ha=()=>{localStorage.clear(),window.location.reload()};class Ga{static constructQueryString(e){const t=(0,wt.omitBy)(e,(e=>null==e));return(0,wt.map)(t,((e,t)=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`)).join("&")}static constructRoute(e,t){const r=Ga.constructQueryString(t);return`${e}${r&&`?${r}`}`}static setApiUrl(e){this.defaultUrl=e?Ya:za}constructor(e){this.baseUrl=void 0,this.cbVersion=void 0,this.cbClient=void 0,this.userLocale=void 0,this.jwtToken=void 0,this.onUnauthorized=void 0,this.getAcceptLanguage=()=>this.userLocale||$a(),this.setUserLocale=e=>this.userLocale=e,this.setJWT=e=>this.jwtToken=e,this.fetch=(e,t,r,n,i)=>{let a,o,s;if("GET"===t){const t=r?Ga.constructQueryString(r):"";o=`${e}${e.includes("?")?"&":"?"}${t}`}else"POST"!==t&&"PUT"!==t||(r instanceof FormData?a=r:(a=JSON.stringify(r),s="application/json"));const c=new Headers(Ft(Ft({Accept:"application/json","Accept-Language":this.getAcceptLanguage(),"CB-VERSION":this.cbVersion,"CB-CLIENT":this.cbClient},n),(0,M.zy)()));s&&c.set("Content-Type",s),this.jwtToken&&c.set("Authorization",`JWT ${this.jwtToken}`),this.deviceFingerprint&&c.set("CB-FP",this.deviceFingerprint),this.newStyleDeviceFingerprint&&c.set("CB-FP2",this.newStyleDeviceFingerprint);let l=null,u=null,d=null;return new Promise(((r,n)=>{fetch(this.baseUrl+(o||e),{method:t,body:a,headers:c,redirect:"follow",credentials:"include"}).then((e=>{if(204===e.status)return r(null);u=Ka(e.headers,"x-request-id"),d=Ka(e.headers,"cf-ray");const t={requestId:u,cfRay:d},n=e.json();return l=e.status,e.status>=200&&e.status<300?n.then((e=>i.preserveKeyNames?r(Ft({headers:t},e)):r(Ft({headers:t},Di(e))))):n.then((e=>{throw e}))})).catch((e=>{let t;if(e?.errors){const r=e.errors[0],n=r.message,i=jt(r,Dt);t=Ft({message:n,response:e,statusCode:l,requestId:u,cfRay:d},i)}else t={message:"Something went wrong, please try again.",response:e,requestId:u,cfRay:d,statusCode:l};const r=e?.errors,a=r?r[0].id:void 0;["expired_token","invalid_token"].includes(a)&&this.onUnauthorized(a),i.preserveKeyNames?n(t):n(Di(t))}))}))},this.post=(e,t,r={},n={})=>this.fetch(e,"POST",t,r,n),this.put=(e,t,r={},n={})=>this.fetch(e,"PUT",t,r,n),this.get=(e,t,r={},n={})=>this.fetch(e,"GET",t,r,n),this.delete=(e,t,r={},n={})=>this.fetch(e,"DELETE",t,r,n),this.baseUrl=this.constructor.defaultUrl,this.cbVersion=e.cbVersion||"2016-08-01",this.cbClient=e.cbClient,this.jwtToken=e.jwtToken,this.onUnauthorized=e.onUnauthorized||Ha}get deviceFingerprint(){return Et.get("df")}get newStyleDeviceFingerprint(){return Et.get("df2")}}function Ka(e=new Headers({}),t){const r=e.get(t)??"";return Array.isArray(r)?r[0]||"":r}Ga.defaultUrl=za;let Za;const Qa=(e,t,r,n)=>{if(Za)return r&&Za.setJWT(r),Za;const i={cbVersion:"2018-06-18",cbClient:"CoinbaseWeb",jwtToken:r,onUnauthorized:n};return Ga.setApiUrl(e),Za=new Ga(i),Za.setUserLocale(t),Za},Ja=(e,t)=>!!e&&(e>=.6&&"front"===t);function Xa(){const e=(0,P.Z)().formatMessage;return(0,s.jsx)(gt.TextBody,{as:"p",align:"center",children:e(zt.kycFallback)})}const eo=(0,it.Pi)((function(e){let t=e.countryCode,r=e.locale,i=e.forceFacematchType,a=e.noBorder,c=e.onRetry,l=e.skipSuccessViewAndDo,u=e.isKycFallback,d=void 0!==u&&u,p=e.showExplanation,f=e.skipPendingViewAndDo,g=e.track,h=e.applicationContext,m=e.flashUi,b=e.client,y=e.onContinue,_=e.onApiError,v=e.isVariant,w=e.environment,T=e.source,x=e.loader,S=e.noMinWidth,k=e.compact,E=jt(e,Mt);const I=(0,ft.kC)().isPhone,C=(0,n.useCallback)(((e,t,r)=>{g(e,Ft(Ft({},t),{},{id_capture_source:T||"none",is_unified_idv:!0,face_match:i||"none",request_source:h||"none"}),r)}),[T,g,h,i]),D=yi((()=>new La(Ft(Ft({webcam:new bi({leaveBreadcrumb:(e,t)=>C(e,t),onError:_})},E),{},{isKycFallback:d,isPhone:I,forceFacematchType:i,applicationContext:h,client:b??Qa("production"===w,r),track:C,flashUi:m?()=>m(650):()=>D.flash(650),onApiError:_,country:t,environment:w||"development",source:T||"retail"}))));(0,n.useEffect)((()=>(C("verify_document_viewed",{action:M.Us.render,componentType:M.re.page,loggingId:"3f44e68f-795a-4a34-931b-4657822a3ffb"}),()=>{D.clearPollTimer()})),[]),(0,n.useEffect)((()=>{"pendingVerification"===D.step&&f&&f(),"success"===D.step&&l&&l()}),[l,f,D.step]);const j=(0,n.useCallback)((()=>{c?.(D.failureCode),D.reinitializeStore({webcamDisabled:D.webcamDisabled,pendingVerificationId:null})}),[c,D]),A=(0,n.useCallback)((()=>{D.changeStep("idType")}),[D]),P=(0,n.useCallback)((()=>(0,s.jsx)(Zr,{isInUS:"US"===t,onSelect:e=>D.selectIdType(e),supportedIdTypes:D.supportedIdTypes,noMinWidth:!!S})),[t,D,S]),O=(0,n.useCallback)((()=>(0,s.jsx)($r,{error:D.errorMessage,onRetry:j,source:T})),[D.errorMessage,j,T]),F=(0,n.useCallback)((()=>{y?.()}),[y]),U=(0,n.useCallback)((()=>(0,s.jsx)(mn,{onContinue:F})),[F]),R=(0,n.useCallback)((()=>(0,s.jsx)(Kt,{maintainHeight:!0,children:(0,s.jsx)(lt.Box,{flexGrow:1,alignItems:"center",justifyContent:"center",minWidth:150,minHeight:150,height:"100%",children:x||(0,s.jsx)(st.Spinner,{size:3})})})),[x]),N=(0,n.useCallback)((()=>Ja(D.frontBlurryScore,"front")),[D.frontBlurryScore]),L=(0,n.useCallback)((({side:e})=>(0,s.jsx)(Br,{track:C,webcam:D.webcam,webcamActive:D.webcamActive,side:e,preview:D.preview,previewImage:D.previewImage,onCapture:D.snap,timer:D.timer,continueCapture:D.handleContinueCapture,retryCapture:D.resetWebcamCapture,isSubmitting:D.isSubmitting,source:T})),[C,D.handleContinueCapture,D.isSubmitting,D.preview,D.previewImage,D.resetWebcamCapture,D.snap,D.timer,D.webcam,D.webcamActive,T]),B=D.backImageData,q=(0,n.useCallback)((()=>(0,s.jsx)(on,{imageCaptureView:D.facematchType?L({side:D.facematchType}):null,track:C,idType:D.selectedIdType,backImageRequired:D.backsideImageRequired,facematchType:D.facematchType,frontImage:D.frontImageData,backImage:B,showFrontBlurryMessage:N(),allowContinue:D.allowFacematchContinue,allowSubmit:D.allowFileUpload,onUpload:D.uploadImage,onSubmit:D.onImageUploadSubmit,onGoBack:()=>{D.reset(),A()},isSubmitting:D.isSubmitting,onRenderWebcam:D.markWebcamActiveOnReady})),[D,L,C,N,A,B]),V=(0,n.useMemo)((function(){let e=(0,s.jsx)(s.Fragment,{});switch(D.step){case"loading":e=R();break;case"idType":C("verify_document_select_document_type_viewed",{action:M.Us.render,componentType:M.re.page,loggingId:"c0501088-9de5-4884-a258-262ff4eaadc6"}),e=P();break;case"imageUpload":C("verify_document_file_upload_viewed",{action:M.Us.render,componentType:M.re.page,loggingId:"6e5757d5-a207-4595-8ff8-02657d46ce6f"}),e=q();break;case"pendingVerification":if(C("verify_document_verification_pending",{action:M.Us.view,componentType:M.re.page,loggingId:"c27212af-0097-4145-8142-a1ff8222c20d",method:D.recoveryUrl?"qr-code":"text-message"}),f)break;e=(0,s.jsx)(ir,{});break;case"fallingBack":C("verify_document_viewed_fallback",{action:M.Us.render,componentType:M.re.page,loggingId:"97d05221-eedc-42d2-8850-107a9da92c44"}),e=(0,s.jsx)(ir,{fallback:!0});break;case"success":if(C("verify_document_viewed_success",{action:M.Us.render,componentType:M.re.page,loggingId:"beafd607-9664-45b8-8593-f35ba886d369"}),l)break;e=U();break;case"failure":C("verify_document_viewed_failure",{action:M.Us.render,componentType:M.re.page,loggingId:"bde8f8a1-6b57-4e1d-95ac-e7a9ba29890e",error:D.error?D.error.name:"No reason given"}),e=O();break;default:{const t=D.step;ki.idCaptureLogAnomaly(new Error(`Unhandled step ${t}`)),e=(0,s.jsxs)("div",{children:["Unhandled step: ",(0,s.jsx)("code",{children:D.step})]})}}return e}),[O,P,q,R,f,l,D.error,D.step,U,C,D.recoveryUrl]);return(0,s.jsx)(fi,{compact:k,locale:r,children:(0,s.jsxs)(o.VStack,{justifyContent:"center",alignItems:"center",testID:"identity-id-capture",children:[p&&"idType"===D.step&&(0,s.jsx)(lt.Box,{maxWidth:"575px",spacingBottom:3,children:(0,s.jsx)(Xa,{})}),"login-web"===T&&(0,s.jsx)(Jr,{environment:w,onStartWidget:D.startWidget}),(0,s.jsx)(to,{isVariant:v,flash:D.flashVisible,noBorder:a,isPhone:I,noMinWidth:S,children:V})]})})})),to=ct.ZP.div` display: flex; align-items: flex-start; align-self: stretch; position: relative; justify-content: center; ${({isPhone:e,noMinWidth:t})=>e||t?"":"min-width: 630px"}; width: 100%; background-color: ${({theme:e,isVariant:t})=>!t&&e.color.background}; overflow: hidden; padding-top: ${({isVariant:e})=>e?"24px":"0"}; font-family: ${({theme:e})=>e.fontFamily.regular}; font-weight: ${({theme:e})=>e.fontWeight.regular}; -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; transition: filter 0.1s ease-in-out; ${({flash:e})=>e?"filter: opacity(0);":""} ${({noBorder:e,theme:t,isPhone:r})=>r||e?"":`${t.border.border};`} ${({isPhone:e})=>e?"align-self: stretch;":""} `,ro=eo;let no;!function(e){e.UNKNOWN="UNKNOWN",e.INACTIVE="INACTIVE",e.INITIATED="INITIATED",e.PENDING="PENDING",e.ACTIVE="ACTIVE",e.ENABLED="ENABLED",e.ACTIVATED="ACTIVATED",e.CANCELLED="CANCELLED",e.DELETED="DELETED",e.DISABLED="DISABLED",e.NEW="NEW",e.SUCCESS_PENDING_CHOICE="SUCCESS_PENDING_CHOICE",e.COMPLETED="COMPLETED",e.FAILED="FAILED",e.FALLING_BACK="FALLING_BACK",e.CONSUMED="CONSUMED"}(no||(no={}));function io(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ao(e){for(var t=1;t`${H}/api/two-factor/v1/idv/activate`;var co=r(1241),lo=r(44),uo=r(1186),po=r(1223),fo=r(2157),go=r(1086);const ho=r.p+"af6cf0e9790a3863.png";var mo=r(7993),bo=r(7994),yo=r(7995);const _o=["children","target"],vo=["size"],wo=["size"],To=["twoFactorType"],xo=["children"],So=["alternateTwoFactorOptions","troubleshootOption"],ko=["step"];function Eo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,s=[],c=!0,l=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Io(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Io(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Io(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Do(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Mo(e){for(var t=1;tb(b(b(b({},t),m),d[o]),{},{target:o,onBoundaryError:l,featureFlags:b(b({},v.featureFlags),f)})),[o,l,f,m]);return(0,p.s)(y.apiHost),(0,s.jsx)(r.Provider,{value:y,children:i})}))}}(zo),Go=Ho.TwoFactorGlobalConfigContext,Ko=Ho.TwoFactorGlobalConfigProvider,Zo=(0,n.memo)((function(e){let t=e.children,r=e.target,n=void 0===r?Yo.target:r,i=Co(e,_o);var a;return a=d[n].apiHost,H=a,(e=>{G=e})(d[n].apiHost),(0,s.jsx)(Ko,Mo(Mo({target:n},i),{},{children:t}))}));function Qo(){return(0,n.useContext)(Go)}const Jo="u2fa";function Xo(){const e=$o().action,t=Qo(),r=t.target,i=function({target:e,version:t,clientId:r,action:i}){const a=(0,n.useCallback)(((n,a)=>B(B({},a),{},{loggingId:n.loggingId,target:e,client_id:r,client_action:i,version:t})),[e,t,r,i]);return{logEvent:(0,n.useCallback)(((e,t,r)=>{(0,M.Kz)(e.label,a(e,t),r)}),[a]),logMetric:(0,n.useCallback)(((e,t=!1,n)=>{const a={client_id:r,client_action:i};(0,M.HR)({metricName:`${e}`,metricType:M.t0.count,value:1,tags:t?B(B({},a),n):void 0})}),[i,r]),getChallengeEventMetadata:(0,n.useCallback)((e=>{const t=e.secondFactorType;switch(void 0===t?w.Y6.TYPE_UNSPECIFIED:t){case w.Y6.SMS:return{provider_name:e.sms?.providerName??""};case w.Y6.DEVICE_VERIFICATION:return{status_id:e.deviceVerification?.statusId??"",trusted:e.deviceVerification?.trusted??""};case w.Y6.IDV:return{country_code:e.idv?.countryCode??""};case w.Y6.PUSH:return{status_id:e.push?.statusId??""};default:return}}),[])}}({clientId:t.clientId,target:r,version:Po,action:e}),a=i.getChallengeEventMetadata,o=i.logEvent,s=i.logMetric;return{logEvent:o,logMetric:(0,n.useCallback)(((e,t)=>{s(`${Jo}.${e}`,!0,t)}),[s]),getChallengeEventMetadata:a}}function es(e){const t=Qo().featureFlags;return(0,n.useMemo)((()=>t[e]??!1),[t,e])}function ts(){const e=$o(),t=e.constraints,r=e.statusId,i=e.action,a=es(j.T9.PasswordEnabled),o=(0,n.useMemo)((()=>{const e=[];return a||e.push(j.QA.Password),e}),[a]);return(0,n.useMemo)((()=>{t?.mode===j.Fw.Allow?t.types=t.types.filter((e=>!o.includes(e))):t?.mode===j.Fw.Disallow&&o.forEach((e=>{t.types.includes(e)||t.types.push(e)}));return{statusId:r,action:i,constraints:t&&{mode:S[t.mode],types:t.types.map((e=>T[e]))}}}),[t,r,i,o])}const rs=(0,A.vU)({u2fIncompatibleBrowser:{id:"TwoFactorError.u2fIncompatibleBrowser",defaultMessage:"Security keys are not available in your current browser. Please try another browser or update your browser version.",description:"Error when attempting to use security keys on an incompatible or outdated browser"},u2fTimeoutOrDisallowed:{id:"TwoFactorError.u2fTimeoutOrDisallowed",defaultMessage:"Try your security key again or check that you are using the right one.",description:"Error when security key validation times out or is otherwise disallowed"},walletConnectionFailed:{id:"TwoFactorError.walletConnectionFailed",defaultMessage:"Connection with wallet was unsuccessful",description:"Error when Coinbase was not able to connect to the user’s wallet"},walletSignatureDenied:{id:"TwoFactorError.walletSignatureDenied",defaultMessage:"Message was not signed",description:"Error when the message failed to be signed by the user’s wallet"}});function ns(){const e=(0,P.Z)().formatMessage,t=W((0,n.useCallback)((t=>{switch(t){case be.D1.U2FIncompatibleBrowser:return e(rs.u2fIncompatibleBrowser);case be.D1.U2FTimeoutOrDisallowed:case be.D1.U2FFetchPublicKeyError:case be.D1.U2FMissingCredentialsError:case be.D1.U2FUnknowError:case be.D1.U2FCredentialError:return e(rs.u2fTimeoutOrDisallowed);case be.D1.WalletConnectionFailed:return e(rs.walletConnectionFailed);case be.D1.WalletSignatureDenied:return e(rs.walletSignatureDenied);default:return}}),[e])),r=t.parseTwoFactorApiError,i=t.getTwoFactorError;return{parseTwoFactorApiError:r,getTwoFactorError:(0,n.useCallback)(((e,t)=>Mo(Mo({},i(e)),{},{error:t})),[i])}}function is(){const e=Eo((0,n.useState)(!1),2),t=e[0],r=e[1],i=Eo((0,n.useState)(),2),a=i[0],o=i[1],s=Eo((0,n.useState)(),2),c=s[0],l=s[1],u=(0,U.Lo)(),d=ts(),p=ns().parseTwoFactorApiError;return{loading:t,error:a,challengeMetadata:c,challengeTwoFactor:(0,n.useCallback)((async e=>{r(!0);const t=await u(Mo(Mo({},d),e));if(r(!1),t instanceof Error){const e=p(t);return o(e),void l(void 0)}return o(void 0),l(t),t}),[u,d,p]),resetState:(0,n.useCallback)((()=>{r(!1),o(void 0),l(void 0)}),[])}}function as(){const e=$o(),t=e.onError,r=e.onToast,i=(0,n.useCallback)(((e,t)=>{t&&r({type:j.k.Error,message:e.message})}),[r]);return{handleError:(0,n.useCallback)(((e,r=!0)=>{t?t(e,(e=>i(e,!!r))):i(e,!!r)}),[t,i])}}const os=[{name:"Windows",value:"Win"},{name:"iPhone",value:"iPhone"},{name:"iPad",value:"iPad"},{name:"Android",value:"Android"},{name:"Mac OS",value:"Mac"},{name:"Linux",value:"Linux"},{name:"Palm",value:"Palm"}],ss=[{name:"Chrome",value:"Chrome"},{name:"Chrome",value:"CriOS"},{name:"Firefox",value:"Firefox"},{name:"Firefox",value:"FxiOS"},{name:"Safari",value:"Safari"},{name:"Internet Explorer",value:"MSIE"},{name:"Opera",value:"Opera"},{name:"Mozilla",value:"Mozilla"}];function cs(e,t){for(const r of t){if(new RegExp(r.value,"i").test(e))return r.name}return""}function ls(e){const t=(0,n.useMemo)((()=>{const e=[navigator.platform,navigator.userAgent,navigator.appVersion,navigator.vendor].join(" ");return{os:cs(e,os),browser:cs(e,ss)||"Unknown"}}),[]),r=t.browser,i=t.os,o=$o().config,s=(0,a.Ge)().account,c=(0,n.useMemo)((()=>`${r}${i?` (${i})`:""}`),[r,i]);return(0,n.useMemo)((()=>{const t=(o?.push??{}).templateName,r=void 0===t?"":t;switch(e){case w.Y6.PUSH:return{push:{device:c,pushTemplateId:r}};case w.Y6.WALLET:return{wallet:{address:s??""}};default:return{}}}),[c,e,o,s])}function us({enabledTwoFactorIndex:e,twoFactorMethodIndex:t}){const r=function(){const e=Eo((0,n.useState)(!1),2),t=e[0],r=e[1],i=Eo((0,n.useState)(),2),a=i[0],o=i[1],s=Eo((0,n.useState)(),2),c=s[0],l=s[1],u=(0,U.CM)(),d=ts(),p=ns(),f=p.getTwoFactorError,g=p.parseTwoFactorApiError,h=Xo().logEvent;return{loading:t,error:a,enabledTwoFactorOptions:c,getEnabledTwoFactor:(0,n.useCallback)((async()=>{r(!0);const e=await u(d);if(r(!1),e instanceof Error){const t=g(e);return t.type===be.D1.Unauthorized&&h(No.TwoFactorUnauthorized,{action:M.Us.view,componentType:M.re.page,result:j.x4.Failure}),o(t),void l(void 0)}const t=e.enabledTypes,n=t?.every((({methods:e})=>e?.every((e=>e.type!==w.Y6.TYPE_UNSPECIFIED))));if(n)o(void 0),l(t);else{const e=f(be.D1.UnknownError);o(e),l(void 0)}}),[u,d,g,f,h])}}(),i=r.loading,a=r.error,o=r.enabledTwoFactorOptions,s=r.getEnabledTwoFactor,c=(0,n.useMemo)((()=>o?.[e]),[o,e]),l=(0,n.useMemo)((()=>c?.methods?.[t]),[c,t]);return{loadingEnabled:i,enabledError:a,enabledTwoFactorOptions:o,getEnabledTwoFactor:s,enabledTwoFactor:c,twoFactorMethod:l}}function ds({currentTwoFactorEventData:e,twoFactorType:t,advanceTwoFactorMethod:r}){const i=Xo(),a=i.logEvent,o=i.logMetric,s=as().handleError,c=(0,n.useCallback)(((r,n)=>{t&&a(No.TwoFactorSubmit,Mo(Mo(Mo(Mo({},function(e){switch(e){case w.Y6.NO_2FA:case w.Y6.BYPASS:case w.Y6.DEVICE_VERIFICATION:case w.Y6.IDV:case w.Y6.PUSH:return{action:M.Us.render,componentType:M.re.page};case w.Y6.SMS:case w.Y6.TOTP:case w.Y6.RECOVERY_CODE:case w.Y6.EMAIL:return{action:M.Us.keyPress,componentType:M.re.text_input};case w.Y6.U2F:case w.Y6.WALLET:return{action:M.Us.click,componentType:M.re.button};default:return(0,M.Kz)(No.TwoFactorGeneralError.label,{action:M.Us.measurement,componentType:M.re.page,loggingId:No.TwoFactorGeneralError.loggingId,message:`Invalid event data: unspecified action and componentType for ${e}`}),{action:M.Us.measurement,componentType:M.re.page}}}(t)),n&&{error_type:n}),e),{},{result:r}),M.E3.high)}),[t,e,a]),l=(0,n.useCallback)((e=>{o("verify",{result:e,method:t??"unknown"})}),[o,t]);return{handleVerifySuccess:(0,n.useCallback)((e=>{c(j.x4.Success),l(j.x4.Success),r(e)}),[c,l,r]),handleVerifyError:(0,n.useCallback)(((e,t)=>{c(j.x4.Failure,e.type),l(j.x4.Failure),s(e,t)}),[s,c,l])}}const ps={twoFactorMethodIndex:0,enabledTwoFactorIndex:0,setEnabledTwoFactor:C,loadingChallenge:!1,loadingEnabled:!1,challengeTwoFactor:async()=>{},handleChallengeError:I,getEnabledTwoFactor:I,handleVerifySuccess:C,handleVerifyError:I},fs=(0,n.createContext)(ps),gs=(0,n.memo)((function({children:e}){const t=function(){const e=Eo((0,n.useState)({enabledTwoFactorIndex:0,twoFactorMethodIndex:0,proofTokens:[]}),2),t=e[0],r=e[1],i=(0,n.useCallback)(((e,t,n)=>{r((r=>{const i=r.proofTokens.length===t;if(!t||i)return r;let a=r.twoFactorMethodIndex;return r.twoFactorMethodIndex===t-1||(a+=1,n()),Mo(Mo({},r),{},{proofTokens:[...r.proofTokens,e],twoFactorMethodIndex:a})}))}),[]),a=(0,n.useCallback)(((e,t)=>{r((r=>r.enabledTwoFactorIndex===e?r:(t(),{proofTokens:[],twoFactorMethodIndex:0,enabledTwoFactorIndex:e})))}),[]);return Mo(Mo({},t),{},{advanceTwoFactorMethod:i,setEnabledTwoFactor:a})}(),r=t.twoFactorMethodIndex,i=t.enabledTwoFactorIndex,a=t.advanceTwoFactorMethod,o=t.setEnabledTwoFactor,c=t.proofTokens,l=us({enabledTwoFactorIndex:i,twoFactorMethodIndex:r}),u=l.loadingEnabled,d=l.enabledError,p=l.enabledTwoFactorOptions,f=l.getEnabledTwoFactor,g=l.enabledTwoFactor,h=l.twoFactorMethod,m=(0,n.useMemo)((()=>function({enabledTwoFactorOptions:e,enabledTwoFactor:t,twoFactorMethod:r,enabledTwoFactorIndex:n,twoFactorMethodIndex:i}){return e&&t?.methods&&r?.type?{option_index:n,method_index:i,num_options:e.length,num_methods:t.methods.length,method:r.type}:{}}({enabledTwoFactorOptions:p,enabledTwoFactor:g,twoFactorMethod:h,enabledTwoFactorIndex:i,twoFactorMethodIndex:r})),[p,g,i,h,r]),b=function({twoFactorType:e,currentTwoFactorEventData:t}){const r=Xo(),i=r.logEvent,a=r.getChallengeEventMetadata,o=r.logMetric,s=as().handleError,c=is(),l=c.loading,u=c.error,d=c.challengeMetadata,p=c.challengeTwoFactor,f=c.resetState,g=ls(e),h=(0,n.useCallback)(((e,r,n)=>{const o=a(n??{});i(No.TwoFactorRequest,Mo(Mo(Mo(Mo({},r&&{error_type:r}),t),o),{},{action:M.Us.render,componentType:M.re.page,result:e}))}),[t,i,a]),m=(0,n.useCallback)((t=>{o("challenge",{result:t,method:e??"unknown"})}),[o,e]),b=(0,n.useCallback)(((e,t)=>{h(j.x4.Failure,e.type),m(j.x4.Failure),s(e,t)}),[s,h,m]);return{loadingChallenge:l,challengeError:u,challengeMetadata:d,challengeTwoFactor:(0,n.useCallback)((async()=>{if(!e)return;const t=await p(Mo({secondFactorType:e},g));return t&&(h(j.x4.Success,void 0,t),m(j.x4.Success)),t}),[e,p,g,h,m]),handleChallengeError:b,resetChallengeState:f}}({currentTwoFactorEventData:m,twoFactorType:h?.type}),y=b.loadingChallenge,_=b.challengeError,v=b.challengeMetadata,w=b.challengeTwoFactor,T=b.handleChallengeError,x=b.resetChallengeState,S=(0,n.useCallback)((e=>{o(e,x)}),[o,x]),k=(0,n.useMemo)((()=>g?.methods?.length),[g]),E=(0,n.useCallback)((e=>{k&&a(e,k,x)}),[a,k,x]),I=ds({currentTwoFactorEventData:m,twoFactorType:h?.type,advanceTwoFactorMethod:E}),C=I.handleVerifyError,D=I.handleVerifySuccess,A=(0,n.useMemo)((()=>{if(c.length===k)return function(e){return e.join("")}(c)}),[k,c]),P=(0,n.useMemo)((()=>({twoFactorMethodIndex:r,enabledTwoFactorIndex:i,setEnabledTwoFactor:S,getEnabledTwoFactor:f,loadingEnabled:u,enabledError:d,enabledTwoFactorOptions:p,enabledTwoFactor:g,twoFactorMethod:h,loadingChallenge:y,challengeError:_,challengeMetadata:v,challengeTwoFactor:w,handleChallengeError:T,handleVerifySuccess:D,handleVerifyError:C,proofToken:A})),[r,i,S,f,u,d,p,g,h,w,T,y,_,v,D,C,A]);return(0,s.jsx)(fs.Provider,{value:P,children:e})})),hs=(0,n.memo)((function(e){let t=e.size,r=void 0===t?150:t,n=Co(e,vo);return(0,s.jsx)(o.Box,Mo(Mo({flexGrow:1,alignItems:"center",justifyContent:"center",testID:"base-loader"},n),{},{children:(0,s.jsx)(ye.LottieStatusAnimation,{width:r,status:"loading"})}))})),ms=(0,n.memo)((function(e){let t=e.size,r=void 0===t?150:t,n=Co(e,wo);const i=$o().loader;return i?(0,s.jsx)(o.Box,Mo(Mo({flexGrow:1,alignItems:"center",justifyContent:"center",testID:"loader",minWidth:r,minHeight:r},n),{},{children:i})):(0,s.jsx)(hs,Mo({size:r},n))})),bs={loading:!1,setLoading:C},ys=(0,n.createContext)(bs),_s=(0,n.memo)((function({children:e}){const t=Eo((0,n.useState)({}),2),r=t[0],i=t[1],a=(0,n.useCallback)(((e,t)=>{i((r=>{const n=Mo({},r);return t?n[e]=!0:delete n[e],n}))}),[]),o=(0,n.useMemo)((()=>Object.values(r).some((e=>e))),[r]),c=(0,n.useMemo)((()=>({loading:o,setLoading:a})),[o,a]),l=(0,n.useMemo)((()=>o?{maxHeight:0,overflow:"hidden"}:{}),[o]);return(0,s.jsxs)(ys.Provider,{value:c,children:[o&&(0,s.jsx)(ms,{testID:"global-loader"}),(0,s.jsx)(Ao,Mo(Mo({},l),{},{children:e}))]})}));function vs(){const e=Qo().target;return{isMockEnv:(0,n.useMemo)((()=>e===j.TN.Mock),[e]),isMSW:(0,n.useMemo)((()=>"true"==={NODE_ENV:"production",NODE_DEBUG:void 0}.MSW_API),[])}}function ws(e){const t=(0,n.useCallback)(((t,r)=>{const n=function(e){const t=new URL(e).pathname.split("/api/two-factor/v1");return t[t.length-1].toLowerCase()}(t),i={body:r?.body,config:e};switch(n){case"/enabled-types":return function({config:e}){const t=e.enabledTypes,r=(void 0===t?[]:t).map((e=>e.map((e=>T[e]))));return{enabled_types:(n=r,n.map(((e,t)=>({name:`Method ${t+1}`,methods:e.map((e=>({type:e,options:ue(e)})))}))))};var n}(i);case"/challenge":return pe(i);case"/verify":return he(i);case"/status":return me(i);case"/idv/activate":return{status:w.U5.ACTIVATED};case"/recovery-code/cancel":return{status:w.U5.CANCELLED};default:return}}),[e]);return{getMockResponse:t}}function Ts(){const e=(0,ve.rH)(),t=function(){const e=Qo().mockConfig,t=ws(Mo(Mo({},ae),e)).getMockResponse,r=(0,n.useCallback)((()=>async(e,r)=>{console.log(`mocked request: ${e}, init:`,r);const n=t(e,r);return console.log(`mocked response: ${e}`,n),n instanceof O.ApiError?n:{requestTime:0,timeUntilFirstByte:0,timeUntilFirstChunk:0,headers:r?.headers,status:200,json:async()=>n,text:async()=>JSON.stringify(n),ok:!0,body:r?.body,url:e}}),[t]);return r}(),r=function(){const e=Qo().clientId,t=(0,n.useCallback)((t=>async(r,n)=>{const i=Mo(Mo({},n),{},{headers:Mo(Mo({},n?.headers),{},{"two-factor-client-id":e})});return t(r,i)}),[e]);return t}(),i=vs().isMockEnv,a=(0,n.useMemo)((()=>i?t():e),[i,t,e]);return(0,n.useMemo)((()=>(0,_e.iE)(r(a))),[a,r])}const xs=(0,n.memo)((function({children:e}){const t=Ts();return(0,s.jsx)(_e.N5,{fetch:t,children:e})}));function Ss(e){const t=(0,n.useRef)(Math.random()),r=(0,n.useContext)(ys),i=r.setLoading,a=r.loading;return(0,n.useEffect)((()=>{"boolean"==typeof e&&i(t.current,e)}),[i,t,e]),a}const ks=(0,n.memo)((function({children:e}){const t=Eo((0,n.useState)(!0),2),r=t[0],i=t[1],a=(0,P.Z)().locale,o=Qo().target;Ss(r);const c=(0,n.useCallback)((()=>{i(!1)}),[]);return(0,s.jsx)(we.l0,{locale:a,isProd:o===j.TN.Production,serviceIdentifier:"unified-two-factor-web",onLoadMessages:c,awaitLoadMessages:!1,children:!r&&e})})),Es=(0,A.vU)({title:{id:"Fallback.title",defaultMessage:"We're having connection issues",description:"Title of fallback error screen"},description:{id:"Fallback.description",defaultMessage:"Please try again later today.",description:"Description of fallback error screen"},back:{id:"Fallback.back",defaultMessage:"Back",description:"Button text to exit component and go back to parent application"},tryAgain:{id:"Fallback.tryAgain",defaultMessage:"Try again",description:"Button text to try again"}}),Is=(0,n.memo)((function({onReloadPress:e,event:t,title:r,showDescription:i=!0}){const a=(0,P.Z)().formatMessage,c=Xo().logEvent,l=$o().onCancel,u=(0,n.useCallback)((()=>{c(No.TwoFactorClickButton,Mo(Mo({},t),{},{action:M.Us.click,componentType:M.re.button,button_type:Lo.Back})),l()}),[l,t,c]),d=(0,n.useCallback)((()=>{c(No.TwoFactorClickButton,Mo(Mo({},t),{},{action:M.Us.click,componentType:M.re.button,button_type:Lo.ReloadTwoFactor})),e?.()}),[e,t,c]);return(0,s.jsxs)(o.VStack,{flexGrow:1,alignItems:"center",testID:"fallback",children:[(0,s.jsx)(xe.HeroSquare,{name:"coinbaseIsDown"}),(0,s.jsx)(Se.TextTitle1,{as:"h3",spacingTop:2,align:"center",children:r??a(Es.title)}),i&&(0,s.jsx)(Se.TextBody,{as:"p",align:"center",spacingTop:1,children:a(Es.description)}),(0,s.jsx)(o.VStack,{alignSelf:"stretch",spacingHorizontal:4,spacingTop:4,children:(0,s.jsxs)(Te.ButtonGroup,{accessibilityLabel:"fallback-button-group",vertical:!0,children:[e&&(0,s.jsx)(Te.Button,{onPress:d,variant:"primary",testID:"fallback-reload-button",children:a(Es.tryAgain)}),(0,s.jsx)(Te.Button,{onPress:u,variant:"secondary",testID:"fallback-back-button",children:a(Es.back)})]})})]})})),Cs=(0,n.memo)((function({children:e}){const t=$o(),r=t.action,i=t.onError,a=Qo().onBoundaryError,o=ns().getTwoFactorError,c=Xo().logEvent,l=(0,n.useCallback)(((e,t)=>{c(No.TwoFactorErrorBoundaryLoad,{action:M.Us.render,componentType:M.re.page}),i?.(o(be.D1.BoundaryError),C),a(function(e,t,r,n){return{error:e,errorInfo:t,context:n.name,details:{version:n.version,action:r}}}(e,t,r,{name:Oo,version:Po}))}),[o,i,r,a,c]);return(0,s.jsx)(_,{fallback:(0,s.jsx)(Is,{}),onError:l,children:e})}));function Ds(){return(0,n.useContext)(fs)}const Ms=(0,n.memo)((function({onReload:e,event:t,error:r}){const i=Ds().twoFactorMethod,a=(0,n.useMemo)((()=>Mo(Mo({},t),i&&{method:i?.type})),[t,i]);return(0,s.jsx)(Is,{event:a,onReloadPress:e,title:r,showDescription:!1})})),js=(0,n.memo)((function({loading:e,onReload:t,event:r,error:i,children:a=null}){Ss(e);const o=(0,n.useMemo)((()=>e?{maxHeight:0,overflow:"hidden"}:{}),[e]);return i?(0,s.jsx)(Ms,{onReload:t,event:r,error:i}):(0,s.jsx)(Ao,Mo(Mo({testID:"load-view-wrapper"},o),{},{children:a}))}));let As=function(e){return e.BackButton="back_button",e}({});const Ps={enter:"e1yceb0m",enterActive:"e10xbcef",exit:"e1jmug54",exitActive:"ei9sigy"},Os={enter:"efq8fi5",enterActive:"e8rzqn2",exit:"ek6jerg",exitActive:"esd2c3y",exitDone:"e14kilz9"},Fs=(0,n.memo)((function({BaseView:e,DrawerView:t,onOpenDrawer:r,onCloseDrawer:i,toggleText:a,toggleType:c,toggleTestID:l="responsive-drawer-toggle"}){const u=Eo((0,n.useState)(!1),2),d=u[0],p=u[1],f=Eo((0,n.useState)(!1),2),g=f[0],h=f[1],m=(0,n.useCallback)((()=>{p((e=>(e||r?.(),!0)))}),[r]),b=(0,n.useCallback)((e=>{p((t=>(t&&i?.(e),!1)))}),[i]),y=(0,n.useCallback)((async e=>{b(),e&&(h(!0),await function(e){let t;const r=new Promise(((r,n)=>{const i=setTimeout(r,e);t=()=>{n(new Error(D)),clearTimeout(i)}}));return r.cancel=()=>t(),r}(750),h(!1))}),[b]),_=(0,n.useCallback)((()=>{b(As.BackButton)}),[b]);return(0,s.jsx)(o.VStack,{flexGrow:1,width:"100%",children:(0,s.jsxs)(o.VStack,{flexGrow:1,position:"relative",overflow:"hidden",children:[(0,s.jsx)(Ve,{mountOnEnter:!0,timeout:750,in:!d,classNames:Os,children:(0,s.jsxs)(o.VStack,{children:[(0,s.jsx)(e,{}),g&&(0,s.jsx)(ms,{position:"absolute",left:0,right:0,bottom:0,top:0,background:!0,testID:"responsive-drawer-loader"}),"link"===c?(0,s.jsx)(o.Box,{spacingVertical:3,justifyContent:"center",testID:"responsive-drawer-toggle-link",children:(0,s.jsx)(Se.Link,{variant:"body",color:"primary",onPress:m,testID:l,children:a})}):(0,s.jsx)(o.Box,{spacingTop:2,testID:"responsive-drawer-toggle-button",children:(0,s.jsx)(Te.Button,{block:!0,onPress:m,variant:"secondary",testID:l,children:a})})]})}),(0,s.jsx)(Ve,{mountOnEnter:!0,unmountOnExit:!0,timeout:750,in:d,classNames:Ps,children:(0,s.jsxs)(o.VStack,{background:!0,spacingHorizontal:We.gutter,children:[(0,s.jsx)(o.Box,{spacingTop:.5,children:(0,s.jsx)(Te.IconButton,{name:"backArrow",onPress:_,testID:"responsive-drawer-back-button"})}),(0,s.jsx)(o.Box,{spacingVertical:2,children:(0,s.jsx)(t,{onCloseDrawer:y})})]})})]})})})),Us=(0,A.vU)({havingTrouble:{id:"ViewWithHelpDrawer.havingTrouble",defaultMessage:"Having trouble? Try another way",description:"A question asking if the user is having trouble"}}),Rs=(0,n.memo)((function(e){let t=e.twoFactorType,r=Co(e,To);const i=(0,P.Z)().formatMessage,a=Xo().logEvent,o=(0,n.useCallback)((()=>{a(No.TwoFactorClickButton,{action:M.Us.click,componentType:M.re.button,button_type:Lo.TryAnotherWay,method:t})}),[a,t]),c=(0,n.useCallback)((e=>{e&&a(No.TwoFactorClickButton,{action:M.Us.click,componentType:M.re.button,button_type:Lo.CloseTryAnotherWay,close_type:e,method:t})}),[a,t]),l=(0,n.useMemo)((()=>i(Us.havingTrouble)),[i]);return(0,s.jsx)(Fs,Mo(Mo({},r),{},{onOpenDrawer:o,onCloseDrawer:c,toggleText:l,toggleType:"link"}))}));function Ns({id:e,showErrorToast:t,onSuccess:r,onError:i}){const a=Ds(),o=a.handleVerifySuccess,s=a.handleVerifyError,l=function({id:e,secret:t}){const r=R((0,n.useState)(),2),i=r[0],a=r[1],o=R((0,n.useState)(),2),s=o[0],l=o[1],u=(0,n.useCallback)((e=>!(!e?.status?.completed&&!e?.status?.proofToken||(a(e.status.proofToken??c),l(e?.status?.secondFactorType),0))),[]),d=Y({id:e,secret:t,onResponse:u}),p=d.loading,f=d.error,g=d.startPoll,h=d.cancelPoll;return{loading:p,error:f,startPoll:(0,n.useCallback)((()=>{e&&g()}),[e,g]),cancelPoll:h,proofToken:i,twoFactorType:s}}({id:e}),u=l.error,d=l.loading,p=l.proofToken,f=l.startPoll,g=l.cancelPoll;return(0,$e.d)(f,g),(0,n.useEffect)((()=>{Wo(p)&&(r?.(),o(p))}),[p,o,r]),(0,n.useEffect)((()=>{u&&(i?.(u),s(u,t))}),[u,s,i,t]),{error:u,loading:d,startPoll:f}}const Ls=(0,n.memo)((function({title:e,description:t,align:r,spacingBottom:i=5}){const a=(0,n.useMemo)((()=>"string"==typeof t?[t]:Array.isArray(t)?t:void 0),[t]);return(0,s.jsxs)(o.VStack,{spacingBottom:i,children:[(0,s.jsx)(Se.TextTitle1,{as:"h2",align:r,children:e}),a&&(0,s.jsx)(o.VStack,{gap:3,spacingTop:1,testID:"description",children:a.map((e=>(0,s.jsx)(Se.TextBody,{as:"p",color:"foregroundMuted",align:r,dangerouslySetClassName:"twue83p",children:e},e)))})]})})),Bs=(0,A.vU)({resendCodeSuccess:{id:"ResendChallenge.resendCodeSuccess",defaultMessage:"Your code is on the way",description:"Toast for when SMS code is successfully resent"},resendPushSuccess:{id:"ResendChallenge.resendPushSuccess",defaultMessage:"Your security prompt is on the way",description:"Toast for when security prompt is successfully resent"},resendEmailSuccess:{id:"ResendChallenge.resendEmailSuccess",defaultMessage:"Email sent to {email}",description:"Toast for when verification email is successfully resent"}}),qs=(0,A.vU)({yourPrimaryPhoneNumber:{id:"TwoFactorOption.yourPrimaryPhoneNumber",defaultMessage:"your primary phone number",description:"Fallback text used in place of user's phone number"},yourEmail:{id:"TwoFactorOption.yourEmail",defaultMessage:"your email",description:"Placeholder text for missing email"}});function Vs(){const e=(0,P.Z)().formatMessage;return(0,n.useCallback)((t=>{const r=t?.options?.[0];if(r)return r;switch(t?.type){case w.Y6.SMS:return e(qs.yourPrimaryPhoneNumber);case w.Y6.DEVICE_VERIFICATION:return e(qs.yourEmail);default:return""}}),[e])}const Ws=(0,A.vU)({resendCode:{id:"ResendChallengeButton.resendCode",defaultMessage:"Resend code",description:"Button text to resend code"},resendEmail:{id:"ResendChallengeButton.resendEmail",defaultMessage:"Resend email",description:"Button text to resend email"},resendPush:{id:"ResendChallengeButton.resendPush",defaultMessage:"Resend",description:"Button text to resend push"},resendCodeAfterWait:{id:"ResendChallengeButton.resendCodeAfterWait",defaultMessage:"Resend code in {seconds}",description:"Button text to resend code after waiting a specific number of seconds"},resendEmailAfterWait:{id:"ResendChallengeButton.resendEmailAfterWait",defaultMessage:"Resend email in {seconds}",description:"Button text to resend email after waiting a specific number of seconds"},resendPushAfterWait:{id:"ResendChallengeButton.resendPushAfterWait",defaultMessage:"Resend in {seconds}",description:"Button text to resend push after waiting a specific number of seconds"}}),$s=(0,n.memo)((function({startWithCooldown:e,twoFactorType:t}){const r=function(){const e=(0,P.Z)().formatMessage,t=$o().onToast,r=Ds(),i=r.challengeTwoFactor,a=r.loadingChallenge,o=r.twoFactorMethod,s=Vs(),c=(0,n.useMemo)((()=>{switch(o?.type){case w.Y6.SMS:return e(Bs.resendCodeSuccess);case w.Y6.DEVICE_VERIFICATION:return e(Bs.resendEmailSuccess,{email:s(o)});case w.Y6.PUSH:return e(Bs.resendPushSuccess);default:return}}),[e,s,o]);return{resendChallenge:(0,n.useCallback)((async()=>{const e=await i();return e&&c&&t({type:j.k.Reaction,message:c}),e}),[i,t,c]),loading:a}}(),i=r.resendChallenge,a=r.loading,o=Xo().logEvent,c=Eo((0,n.useState)(e?30:0),2),l=c[0],u=c[1],d=(0,P.Z)().formatMessage,p=(0,n.useMemo)((()=>0!==l),[l]);(0,n.useEffect)((()=>{let e;return l&&(e=window.setTimeout((()=>{u((e=>e-1))}),1e3)),()=>{e&&clearTimeout(e)}}),[l]);const f=(0,n.useMemo)((()=>{switch(t){case w.Y6.SMS:return d(Ws.resendCode);case w.Y6.DEVICE_VERIFICATION:return d(Ws.resendEmail);case w.Y6.PUSH:return d(Ws.resendPush);case w.Y6.EMAIL:return d(Ws.resendCode);default:return""}}),[t,d]),g=(0,n.useMemo)((()=>{const e={seconds:l};switch(t){case w.Y6.SMS:return d(Ws.resendCodeAfterWait,e);case w.Y6.DEVICE_VERIFICATION:return d(Ws.resendEmailAfterWait,e);case w.Y6.PUSH:return d(Ws.resendPushAfterWait,e);case w.Y6.EMAIL:return d(Ws.resendCodeAfterWait,e);default:return""}}),[t,l,d]),h=(0,n.useMemo)((()=>p?g:f),[p,f,g]),m=(0,n.useCallback)((async()=>{o(No.TwoFactorClickButton,{action:M.Us.click,componentType:M.re.button,method:t,button_type:Lo.ResendChallenge});await i()&&u(30)}),[i,u,o,t]);return(0,s.jsx)(ze.Button,{block:!0,variant:"secondary",onPress:m,disabled:p,loading:a,testID:"resend-challenge-button",children:h})})),zs={[w.Y6.SMS]:{token:"0000000"},[w.Y6.TOTP]:{token:"000000"},[w.Y6.U2F]:{clientDataJson:k((new TextEncoder).encode("000000"))}};const Ys=(0,A.vU)({simulateVerify:{id:"SimulateButton.simulateVerify",defaultMessage:"Simulate",description:"An action that simulates a 2FA verification by bypassing the usual requirements"}}),Hs=(0,n.memo)((function({twoFactorType:e}){const t=Eo((0,n.useState)(!1),2),r=t[0],i=t[1],a=(0,P.Z)().formatMessage,o=Ds(),l=o.challengeMetadata,u=o.handleVerifySuccess,d=o.handleVerifyError,p=function(){const e=Eo((0,n.useState)(!1),2),t=e[0],r=e[1],i=Eo((0,n.useState)(),2),a=i[0],o=i[1],s=(0,U.yl)(),l=(0,Ye.$H)(),u=ts(),d=ns().parseTwoFactorApiError;return{loading:t,error:a,simulateVerifyTwoFactor:(0,n.useCallback)((async(e,t)=>{let n;r(!0);const i=u;if(e===w.Y6.DEVICE_VERIFICATION)i.deviceVerification=`dv_${t?.statusId}`,n=await l(i);else{switch(e){case w.Y6.SMS:i.sms=zs.SMS;break;case w.Y6.TOTP:i.totp=zs.TOTP;break;case w.Y6.U2F:i.u2f=zs.U2F}n=await s(i)}if(r(!1),n instanceof O.ApiError){const e=n.status;if(0===e||302===e)return o(void 0),null}if(n instanceof Error){const e=d(n);return o(e),null}return o(void 0),n.proofToken??c}),[s,l,u,d])}}(),f=p.error,g=p.simulateVerifyTwoFactor,h=Qo().target;(0,n.useEffect)((()=>{f&&d(f)}),[f,d]);const m=(0,n.useCallback)((async()=>{i(!0);const t=l?.deviceVerification?.statusId,r=await g(e,{statusId:t});Wo(r)?u(r):i(!1)}),[g,u,e,l]);return h===j.TN.Production?null:(0,s.jsx)(Te.Button,{block:!0,variant:"secondary",testID:"simulate-verify-button",onPress:m,loading:r,children:a(Ys.simulateVerify)})})),Gs=(0,n.memo)((function(e){let t=e.children,r=Co(e,xo);return(0,s.jsx)(o.Box,Mo(Mo({},r),{},{children:(0,s.jsxs)(o.HStack,{borderRadius:"standard",spacingVertical:2,spacingHorizontal:3,flexGrow:1,alignItems:"center",gap:2,dangerouslySetClassName:"wywvfly",children:[(0,s.jsx)(He.Icon,{name:"warning",size:"m",color:"foreground",testID:"warning-icon"}),(0,s.jsx)(Se.TextBody,{as:"p",children:t})]})}))})),Ks=(0,A.vU)({title:{id:"DVConfirmation.title",defaultMessage:"We don’t recognize this device",description:"Title for the Device Verification Confirmation screen telling user that device is unrecognized"},description:{id:"DVConfirmation.description",defaultMessage:"Confirm this is your device from the email we just sent to {email}.",description:"Description for the Device Verification Confirmation screen prompting user to go to inbox and confirm email"},rateLimitWarning:{id:"DVConfirmation.rateLimitWarning",defaultMessage:"Wait a few minutes for your email to arrive or tap the help button below to update your email",description:"Rate limit warning that advises user to wait or press help button"}}),Zs=(0,n.memo)((function(){const e=(0,P.Z)().formatMessage,t=Ds(),r=t.twoFactorMethod,i=t.challengeError,a=Vs(),c=(0,$e.b)(),l=(0,n.useMemo)((()=>c?"phoneUnknown":"desktopUnknown"),[c]),u=(0,n.useMemo)((()=>i?.type===be.D1.TooManyRequests),[i]);return(0,s.jsxs)(o.VStack,{testID:"device-verification-confirmation",flexGrow:1,children:[(0,s.jsx)(o.Box,{spacingBottom:5,justifyContent:"center",children:(0,s.jsx)(xe.HeroSquare,{alt:l,name:l,testID:"device-verification-confirmation-image",scaleMultiplier:.683})}),(0,s.jsx)(Ls,{title:e(Ks.title),description:e(Ks.description,{email:a(r)}),align:"center"}),u&&(0,s.jsx)(Gs,{spacingBottom:3,testID:"device-verification-confirmation-warning",children:e(Ks.rateLimitWarning)}),(0,s.jsxs)(Te.ButtonGroup,{vertical:!0,accessibilityLabel:"Validation Actions",children:[(0,s.jsx)(Hs,{twoFactorType:w.Y6.DEVICE_VERIFICATION}),(0,s.jsx)($s,{twoFactorType:w.Y6.DEVICE_VERIFICATION})]})]})})),Qs={spacingHorizontal:0},Js=(0,n.memo)((function({id:e,title:t,description:r,onPress:i,onCloseDrawer:a,to:o,twoFactorType:c,menuType:l,closeOnPress:u,switchBaseView:d=!1,openBlankWindow:p=!0,isRecoveryOption:f=!1}){const g=Xo().logEvent,h=(0,n.useCallback)((async t=>{g(No.TwoFactorClickHelpOption,Mo({action:M.Us.click,componentType:M.re.button,menu_type:l,option_id:e,method:c,isRecoveryOption:f},o&&{option_link:o}),M.E3.high),o&&p&&window.open(o,"_blank","noopener"),o&&!p&&window.location.assign(o),u&&await a(d),i?.(t)}),[o,i,a,u,d,g,e,c,l,p,f]);return(0,s.jsx)(Ge.ListCell,{multiline:!0,accessory:"arrow",title:t,description:r,onPress:h,outerSpacing:Qs})})),Xs=(0,n.memo)((function({title:e,options:t,onCloseDrawer:r,twoFactorType:n,menuType:i,testID:a}){return(0,s.jsxs)(o.VStack,{testID:a,width:"100%",children:[(0,s.jsx)(Se.TextTitle1,{as:"h2",spacingBottom:1,children:e}),t.map((e=>(0,s.jsx)(Js,Mo({onCloseDrawer:r,twoFactorType:n,menuType:i},e),e.id)))]})})),ec=(0,A.vU)({title:{id:"TryAnotherWay.title",defaultMessage:"Try another way",description:"Title for the Try Another Way screen"},troubleshootTitle:{id:"TryAnotherWay.troubleshootTitle",defaultMessage:"Troubleshoot",description:"Title for the Try Another Way option to troubleshoot and navigate to help center"},troubleshootDescription:{id:"TryAnotherWay.troubleshootDescription",defaultMessage:"Visit our Help Center to find quick solutions and troubleshoot.",description:"Description for the Try Another Way option to troubleshoot and navigate to help center"},contactUsTitle:{id:"TryAnotherWay.contactUsTitle",defaultMessage:"Contact us",description:"Title for the Try Another Way option to help center"},contactUsDescription:{id:"TryAnotherWay.contactUsDescription",defaultMessage:"For better security of your account, please reach out to our Customer Support team to help you with your account access.",description:"Description for the Try Another Way option to troubleshoot and navigate to help center"}}),tc=(0,n.memo)((function(e){let t=e.alternateTwoFactorOptions,r=e.troubleshootOption,i=Co(e,So);const a=(0,P.Z)().formatMessage,o=es(j.T9.ContactUsHelpOption),c=(0,n.useMemo)((()=>Mo({title:a(o?ec.contactUsTitle:ec.troubleshootTitle),description:a(o?ec.contactUsDescription:ec.troubleshootDescription)},r)),[a,o,r]),l=(0,n.useMemo)((()=>[...t,c]),[t,c]);return(0,s.jsx)(Xs,Mo({title:a(ec.title),options:l,menuType:Bo.TryAnotherWay},i))})),rc=(0,A.vU)({smsTitle:{id:"AlternateTwoFactorOptions.smsTitle",defaultMessage:"Receive a text (SMS)",description:"Title for Help Menu option to switch back to SMS as two-factor authentication"},smsDescription:{id:"AlternateTwoFactorOptions.smsDescription",defaultMessage:"We’ll text you a 7 digit code to {phoneNumber}",description:"Description for Help Menu option to receive code and switch back to SMS as two-factor authentication"},totpTitle:{id:"AlternateTwoFactorOptions.totpTitle",defaultMessage:"Use your authenticator app",description:"Title for Help Menu option to switch back to TOTP / authenticator app as two-factor authentication"},totpDescription:{id:"AlternateTwoFactorOptions.totpDescription",defaultMessage:"Enter the 6-digit code from your authenticator app.",description:"Description for Help Menu option to receive code and switch back to TOTP / authenticator app as two-factor authentication"},idvTitle:{id:"AlternateTwoFactorOptions.idvTitle",defaultMessage:"Verify your info",description:"Title for Help Menu option to switch back to IDV (ID verification) as two-factor authentication"},idvDescription:{id:"AlternateTwoFactorOptions.idvDescription",defaultMessage:"Upload a photo of yourself and your ID to prove you own this account.",description:"Description for Help Menu option to upload photos of self and ID, and switch back to IDV (ID verification) as two-factor authentication"},pushTitle:{id:"AlternateTwoFactorOptions.pushTitle",defaultMessage:"Tap a push notification",description:"Title for Help Menu option to switch to push two-factor authentication"},pushDescription:{id:"AlternateTwoFactorOptions.pushDescription",defaultMessage:"Tap “Yes” on a push notification from your Coinbase app.",description:"Description for Help Menu option to receive push notification on app and switch back to push two-factor authentication"},walletTitle:{id:"AlternateTwoFactorOptions.walletTitle",defaultMessage:"Connect your wallet",description:"Title for Help Menu option to switch to wallet two-factor authentication"},walletDescription:{id:"AlternateTwoFactorOptions.walletDescription",defaultMessage:"Sign a message with your crypto wallet to prove it’s you.",description:"Description for Help Menu option to sign a message with a connected crypto wallet and switch back to wallet two-factor authentication"},emailTitle:{id:"AlternateTwoFactorOptions.emailTitle",defaultMessage:"Receive an email",description:"Title for Help Menu option to switch back to email as two-factor authentication"},emailDescription:{id:"AlternateTwoFactorOptions.emailDescription",defaultMessage:"We’ll email you a 6 digit code to {email}",description:"Description for Help Menu option to receive code and switch back to email as two-factor authentication"},questionsTitle:{id:"AlternateTwoFactorOptions.questionsTitle",defaultMessage:"Verify your credentials",description:"Title for Help Menu option to switch back to email as two-factor authentication"},questionsDescription:{id:"AlternateTwoFactorOptions.questionsDescription",defaultMessage:"Answer a few identity questions to prove you own this account.",description:"Description for Help Menu option to receive code and switch back to email as two-factor authentication"}});function nc({showDefaultIDVOption:e,idvOption:t,legacyRecoveryOption:r}){const i=(0,P.Z)().formatMessage,a=function(){const e=Ds(),t=e.enabledTwoFactorOptions,r=e.enabledTwoFactorIndex;return(0,n.useMemo)((()=>Boolean(t?.some((({methods:e},t)=>r!==t&&e?.some((({type:e})=>e===w.Y6.IDV)))))),[r,t])}(),o=es(j.T9.LegacyAccountRecovery),s=Ds(),c=s.setEnabledTwoFactor,l=s.enabledTwoFactorIndex,u=s.enabledTwoFactorOptions,d=s.twoFactorMethod,p=Vs(),f=Xo().logEvent,g=(0,n.useCallback)((e=>{f(No.TwoFactorTryAnotherWayOptions,{action:M.Us.measurement,componentType:M.re.page,twoFactorType:d?.type??"UNKNOWN",optionIds:e.map((e=>e.id)),isIDVAvailable:a,isLegacyRecovery:o})}),[f,d?.type,o,a]),h=(0,n.useCallback)((e=>()=>{c(e)}),[c]),m=(0,n.useCallback)((({methods:r},n)=>{if(n===l)return[];const a=r?.[0],o={onPress:h(n),switchBaseView:!0,closeOnPress:!0};switch(a?.type){case w.Y6.SMS:return[Mo(Mo({},o),{},{id:qo.SwitchToSMS,title:i(rc.smsTitle),description:i(rc.smsDescription,{phoneNumber:p(a)})})];case w.Y6.TOTP:return[Mo(Mo({},o),{},{id:qo.SwitchToTOTP,title:i(rc.totpTitle),description:i(rc.totpDescription)})];case w.Y6.IDV:{const r=[];return e?r.push(Mo(Mo({},o),{},{id:qo.SwitchToIDV,title:i(rc.idvTitle),description:i(rc.idvDescription),isRecoveryOption:!0})):t&&r.push(Mo(Mo(Mo({},o),t),{},{isRecoveryOption:!0})),r}case w.Y6.PUSH:return[Mo(Mo({},o),{},{id:qo.SwitchToPush,title:i(rc.pushTitle),description:i(rc.pushDescription)})];case w.Y6.WALLET:return[Mo(Mo({},o),{},{id:qo.SwitchToWallet,title:i(rc.walletTitle),description:i(rc.walletDescription)})];case w.Y6.EMAIL:return[Mo(Mo({},o),{},{id:qo.SwitchToEmail,title:i(rc.emailTitle),description:i(rc.emailDescription,{email:p(a)})})];case w.Y6.SECURITY_QUESTION:return[Mo(Mo({},o),{},{id:qo.SwitchToSecurityQuestions,title:i(rc.questionsTitle),description:i(rc.questionsDescription)})];default:return[]}}),[l,h,i,p,e,t]);return(0,n.useMemo)((()=>{const e=[];return u?.forEach(((t,r)=>{const n=m(t,r);e.push(...n)})),o&&r&&e.push(r),g(e),e}),[u,m,o,r,g])}const ic="/account_recovery",ac="/email_recovery";function oc(){const e=(0,P.Z)().locale,t=es(j.T9.ContactUsHelpOption),r=`https://help.coinbase.com/${e}/coinbase/managing-my-account/get-back-into-my-account/2-step-verification-troubleshooting`,i=`https://help.coinbase.com/${e}/contact-us`,a=`https://help.coinbase.com/${e}/coinbase/managing-my-account/verify-my-identity/why-didnt-i-receive-a-verification-email`,o=`https://help.coinbase.com/${e}/contact-us?product=coinbase&topic=login_authentication_and_verification_issues&category=2FA&subCategory=2fa_security_key`,s=(0,n.useMemo)((()=>t?i:r),[i,r,t]);return{HELP_OPTION_URLS:{[w.Y6.SMS]:s,[w.Y6.TOTP]:s,[w.Y6.U2F]:s,[w.Y6.PUSH]:s,[w.Y6.WALLET]:s,[w.Y6.EMAIL]:s,[w.Y6.DEVICE_VERIFICATION]:a,[w.Y6.PASSWORD]:s},ACCOUNT_RECOVERY_LEGACY_URL:ic,EMAIL_RECOVERY_LEGACY_URL:ac,U2F_CONTACT_SUPPORT_LEGACY_URL:o}}const sc=(0,A.vU)({legacyEmailTitle:{id:"DVTryAnotherWay.updateEmailTitle",defaultMessage:"Update your email",description:"Title for the Device Verification Try Another Way option to update email"},legacyEmailDescription:{id:"DVTryAnotherWay.updateEmailDescription",defaultMessage:"New email address? Verify your identity and change it here.",description:"Description for the Device Verification Try Another Way option to verify identity and update email"},emailRecoveryTitle:{id:"DVTryAnotherWay.emailRecoveryTitleNew",defaultMessage:"Update your email address",description:"Title for the Device Verification Try Another Way option to update email"},emailRecoveryDescription:{id:"DVTryAnotherWay.emailRecoveryIDVDescriptionNew",defaultMessage:"New email address? Verify your identity to change it here.",description:"Description for the Device Verification Try Another Way option to verify identity and update email"}}),cc=(0,n.memo)((function({onCloseDrawer:e}){const t=(0,P.Z)().formatMessage,r=`${Qo().apiHost}${ac}`,i=(0,n.useMemo)((()=>({id:qo.DVUpdateEmail2dot0,title:t(sc.emailRecoveryTitle),description:t(sc.emailRecoveryDescription)})),[t]);(0,n.useMemo)((()=>({title:t(sc.legacyEmailTitle),description:t(sc.legacyEmailDescription),id:qo.DVUpdateEmailLegacy,to:r,openBlankWindow:!1})),[r,t]);const a=nc({showDefaultIDVOption:!1,idvOption:i,legacyRecoveryOption:void 0}),o=oc().HELP_OPTION_URLS,c=(0,n.useMemo)((()=>({id:qo.DVTroubleshoot,to:o[w.Y6.DEVICE_VERIFICATION]})),[o]);return(0,s.jsx)(tc,{onCloseDrawer:e,twoFactorType:w.Y6.DEVICE_VERIFICATION,alternateTwoFactorOptions:a,troubleshootOption:c,testID:"device-verification-try-another-way"})})),lc=(0,n.memo)((function(){const e=function(){const e=Ds(),t=e.challengeError,r=e.challengeMetadata,i=e.challengeTwoFactor,a=e.handleChallengeError;return(0,n.useEffect)((()=>{i()}),[i]),(0,n.useEffect)((()=>{if(t){const e=t.type!==be.D1.TooManyRequests;a(t,e)}}),[t,a]),{loading:(0,n.useMemo)((()=>!(t||r&&!r?.deviceVerification?.proofToken&&!r?.deviceVerification?.trusted)),[t,r]),statusId:r?.deviceVerification?.statusId}}(),t=e.loading,r=e.statusId;!function(){const e=Ds(),t=e.challengeMetadata,r=e.handleVerifySuccess;(0,n.useEffect)((()=>{const e=t?.deviceVerification?.proofToken;e?r(e):t?.deviceVerification?.trusted&&r(c)}),[t,r])}();const i=Ns({id:r,showErrorToast:!1}),a=i.startPoll,o=i.error,l=i.loading,u=(0,n.useMemo)((()=>t||!!o&&l),[t,o,l]);return(0,s.jsx)(js,{loading:u,error:o?.message,onReload:a,children:(0,s.jsx)(Rs,{BaseView:Zs,DrawerView:cc,toggleTestID:"device-verification-toggle-help-button",twoFactorType:w.Y6.DEVICE_VERIFICATION})})})),uc=[be.D1.TooManyRequests,be.D1.AttemptLimitReached];const dc=(0,A.vU)({inputGroupA11yLabel:{id:"InputCode.inputGroupA11yLabel",defaultMessage:"numerical code inputs",description:"Accessibility label for group of individual digit inputs used to enter numerical code"},digitInputA11yLabel:{id:"InputCode.digitInputA11yLabel",defaultMessage:"{codeLength} digit code, digit {index}",description:"Accessibility label for digit input at given index, ranging from 1 to N for a group of N inputs"}}),pc=(0,n.memo)((function({twoFactorType:e,codeLength:t,errorTestID:r,onError:i,onSuccess:a}){const o=function(){const e=Eo((0,n.useState)(!1),2),t=e[0],r=e[1],i=Eo((0,n.useState)(),2),a=i[0],o=i[1],s=(0,U.yl)(),l=ts(),u=ns().parseTwoFactorApiError;return{loading:t,error:a,verifyCode:(0,n.useCallback)((async(e,t)=>{r(!0);const n=l;switch(e){case w.Y6.SMS:n.sms={token:t};break;case w.Y6.TOTP:n.totp={token:t};break;case w.Y6.RECOVERY_CODE:n.rc={token:t};break;case w.Y6.EMAIL:n.email={token:t}}const i=await s(n);if(r(!1),i instanceof Error){const e=u(i);return o(e),null}return o(void 0),i.proofToken??c}),[s,l,u])}}(),l=o.error,u=o.verifyCode,d=Eo((0,n.useState)(!1),2),p=d[0],f=d[1],g=function(){const e=(0,n.useRef)(!1);return(0,n.useEffect)((()=>(e.current=!0,()=>{e.current=!1})),[]),(0,n.useCallback)((()=>e.current),[])}();(0,n.useEffect)((()=>{l&&i(l)}),[l,i]);const h=(0,n.useCallback)((async t=>{f(!0);const r=await u(e,t),n=Wo(r);let i=!n;return n&&(i=a(r)),!!i&&(g()&&f(!1),!0)}),[g,e,u,a]);return(0,s.jsx)(we.hF,{codeLength:t,onSubmit:h,loading:p,error:l?.message,errorTestID:r,inputGroupA11yLabel:dc.inputGroupA11yLabel,digitInputA11yLabel:dc.digitInputA11yLabel})})),fc=(0,n.memo)((function(e){const t=Ds(),r=t.twoFactorMethodIndex,i=t.enabledTwoFactor,a=t.handleVerifySuccess,o=t.handleVerifyError,c=(0,n.useMemo)((()=>{const e=i?.methods?.length;return!!e&&r===e-1}),[r,i]),l=(0,n.useCallback)((e=>{o(e,!1)}),[o]),u=(0,n.useCallback)((e=>(a(e),!c)),[c,a]);return(0,s.jsx)(pc,Mo({onSuccess:u,onError:l},e))})),gc=(0,A.vU)({title:{id:"EmailInputCode.title",defaultMessage:"Enter the 6-digit code we emailed to {email}",description:"Title for the Email Code Input screen prompting user to input the code"},description:{id:"EmailInputCode.description",defaultMessage:"This helps us keep your account secure by verifying that it’s really you.",description:"Description for the Email Code Input screen explaining the reason for requiring 2FA"},attemptLimitReached:{id:"EmailInputCode.attemptLimitReached",defaultMessage:"You’ve tried to enter your code too many times. Please wait for 5 minutes to try again.",description:"Error when user reaches the attempt limit for Email"}}),hc=[be.D1.TooManyRequests,be.D1.AttemptLimitReached],mc=(0,n.memo)((function(){const e=(0,P.Z)().formatMessage,t=Ds(),r=t.twoFactorMethod,i=t.challengeError,a=Vs(),c=(0,n.useMemo)((()=>i?.type&&hc.includes(i.type)),[i]);return(0,s.jsxs)(o.VStack,{testID:"email-input-code",children:[(0,s.jsx)(Ls,{title:e(gc.title,{email:a(r)}),description:e(gc.description)}),c&&(0,s.jsx)(Gs,{spacingBottom:3,testID:"email-input-code-warning",children:e(gc.attemptLimitReached)}),(0,s.jsx)(fc,{codeLength:6,twoFactorType:w.Y6.EMAIL,errorTestID:"email-input-code-error"}),(0,s.jsx)($s,{twoFactorType:w.Y6.EMAIL,startWithCooldown:!0})]})})),bc=(0,A.vU)({updateEmailTitle:{id:"EmailTryAnotherWay.updateEmailTitle",defaultMessage:"Verify by ID",description:"Title for the Email Try Another Way option to update phone number"},updateEmailDescription:{id:"EmailTryAnotherWay.updateEmailDescription",defaultMessage:"New email? Verify your identity update your email.",description:"Description for the Email Try Another Way option to verify identity and update phone number"}}),yc=(0,n.memo)((function({onCloseDrawer:e}){const t=(0,P.Z)().formatMessage,r=oc().HELP_OPTION_URLS,i=(0,n.useMemo)((()=>({id:qo.EmailTroubleshoot,to:r[w.Y6.EMAIL]})),[r]),a=nc({showDefaultIDVOption:!1,idvOption:(0,n.useMemo)((()=>({id:qo.EmailTroubleshoot,title:t(bc.updateEmailTitle),description:t(bc.updateEmailDescription)})),[t])});return(0,s.jsx)(tc,{onCloseDrawer:e,twoFactorType:w.Y6.EMAIL,alternateTwoFactorOptions:a,troubleshootOption:i,testID:"email-try-another-way"})})),_c=(0,n.memo)((function(){return function(){const e=Ds(),t=e.challengeError,r=e.challengeTwoFactor,i=e.handleChallengeError;(0,n.useEffect)((()=>{r()}),[r]),(0,n.useEffect)((()=>{if(t){const e=t.type&&!uc.includes(t.type);i(t,e)}}),[t,i])}(),(0,s.jsx)(Rs,{BaseView:mc,DrawerView:yc,toggleTestID:"email-toggle-help-button",twoFactorType:w.Y6.EMAIL})})),vc=(0,A.vU)({cancel:{id:"Footer.cancel",defaultMessage:"Cancel ID verification",description:"Button text to cancel the ID verification process"},lostPin:{id:"Footer.lostPin",defaultMessage:"I lost my pin and need to start over",description:"Button text for when the user has lost their recovery pin and needs to start the process over"},customerSupport:{id:"IDVFooter.customerSupport",defaultMessage:"Customer Support does not have this information",description:"message to inform user customer support does not have access to their pin"}}),wc=(0,A.vU)({title:{id:"CancelModal.title",defaultMessage:"Cancel ID Verification?",description:"Modal title to cancel identity verification"},description:{id:"CancelModal.description",defaultMessage:"You haven't finished ID verification yet. You'll have to start this process over if you cancel now.",description:"Modal Description to inform user that cancellation would lead to restarting the process all over again."},cancel:{id:"CancelModal.cancel",defaultMessage:"Yes, cancel",description:"Cancel the identity verification"},goBack:{id:"CancelModal.goBack",defaultMessage:"No, go back",description:"Go back and not cancel the identity verification"}}),Tc=(0,n.memo)((function({onCancel:e,visible:t,onClose:r}){const i=(0,P.Z)().formatMessage,a=(0,n.useCallback)((async()=>{await e()}),[e]);return(0,s.jsx)(Qe.Alert,{title:i(wc.title),body:i(wc.description),visible:t,stacked:!0,actionLayout:"vertical",preferredActionLabel:i(wc.cancel),onPreferredActionPress:a,dismissActionLabel:i(wc.goBack),onRequestClose:r,testID:"idv-cancel-modal"})})),xc=(0,n.memo)((function({step:e,status:t}){const r=(0,P.Z)().formatMessage,i=Xo().logEvent,a=$o().onCancel,c=Eo((0,Ke.useToggler)(!1),2),l=c[0],u=c[1],d=u.toggleOn,p=u.toggleOff,f=(0,n.useCallback)((async()=>{i(No.TwoFactorClickButton,Mo({action:M.Us.click,componentType:M.re.button,button_type:Lo.IdvCancel,step_type:e},t&&{idv_status:t})),p(),a()}),[e,t,i,p,a]),g=(0,n.useMemo)((()=>r(e===be.yg.InputRecoveryCode?vc.lostPin:vc.cancel)),[e,r]);return(0,s.jsxs)(o.VStack,{spacingVertical:3,justifyContent:"center",testID:"idv-footer",children:[(0,s.jsx)(Ze.Link,{variant:"body",onPress:d,testID:"idv-footer-cancel-btn",children:g}),e===be.yg.InputRecoveryCode&&(0,s.jsx)(Se.TextLabel2,{color:"foregroundMuted",as:"p",align:"center",spacingTop:2,children:r(vc.customerSupport)}),(0,s.jsx)(Tc,{onCancel:f,visible:l,onClose:p})]})}));const Sc="idv-status-id";function kc(){const e=Eo((0,n.useState)(),2),t=e[0],r=e[1],i=function(){const e=Eo((0,n.useState)(!1),2),t=e[0],r=e[1],i=Eo((0,n.useState)(),2),a=i[0],o=i[1],s=(0,U.$z)(),c=ns().parseTwoFactorApiError,l=Xo().logEvent,u=(0,n.useCallback)(((e,t,r)=>{l(No.TwoFactorIdvStatus,Mo(Mo(Mo({},!!t&&{error_type:t}),!!r&&r),{},{action:M.Us.render,componentType:M.re.page,result:e}))}),[l]);return{getStatus:(0,n.useCallback)((async()=>{r(!0);const e={type:w.Y6.RECOVERY_CODE,rc:{associatedSecondFactorType:w.Y6.IDV},id:Sc},t=await s(e);if(r(!1),t instanceof Error){const e=c(t);return o(e),u(j.x4.Failure,e.type),null}const n=function(e){return{isSameDevice:e.status?.rc?.isSameDevice,idvStatus:e.status?.rc?.idvStatus,recoveryCodeStatus:e.status?.rc?.rcStatus}}(t);return u(j.x4.Success,void 0,n),n}),[s,c,u]),loading:t,error:a}}(),a=i.getStatus,o=i.loading,s=i.error,c=function(){const e=Eo((0,n.useState)(!1),2),t=e[0],r=e[1],i=Eo((0,n.useState)(),2),a=i[0],o=i[1],s=nt(),c=ns().parseTwoFactorApiError,l=Xo().logEvent,u=(0,n.useCallback)(((e,t)=>{l(No.TwoFactorIdvInvalidate,Mo(Mo({},!!t&&{error_type:t}),{},{action:M.Us.render,componentType:M.re.page,result:e}))}),[l]);return{loading:t,error:a,invalidateRecoveryCode:(0,n.useCallback)((async()=>{r(!0);const e=await s({});if(r(!1),e instanceof Error){const t=c(e);return o(t),u(j.x4.Failure,t.type),!1}return u(j.x4.Success),!0}),[s,c,u])}}(),l=c.invalidateRecoveryCode,u=c.error,d=as().handleError,p=Xo().logEvent,f=(0,n.useCallback)((async()=>{if(!t)return;await l()&&r(be.yg.Idv)}),[l,t]),g=(0,n.useCallback)((()=>{switch(t){case be.yg.Idv:r(be.yg.SaveRecoveryCode);break;case be.yg.InputRecoveryCode:case be.yg.SaveRecoveryCode:r(be.yg.Status)}}),[t]),h=(0,n.useMemo)((()=>o||!s&&!t),[o,s,t]),m=(0,n.useCallback)((async()=>{const e=await a(),t=e?.idvStatus,n=e?.recoveryCodeStatus;if(!t)return void p(No.TwoFactorIdvProgress,{action:M.Us.measurement,componentType:M.re.page,progress_type:Vo.IdvStatusMissing});if(t===w.U5.INACTIVE)return p(No.TwoFactorIdvProgress,{action:M.Us.measurement,componentType:M.re.page,progress_type:Vo.IdvStarted}),void r(be.yg.Idv);let i;i=n===w.U5.INACTIVE?be.yg.SaveRecoveryCode:e.isSameDevice?be.yg.Status:be.yg.InputRecoveryCode,p(No.TwoFactorIdvProgress,{action:M.Us.view,componentType:M.re.page,progress_type:Vo.ReturnToIdv,step_type:i,is_same_device:Boolean(e.isSameDevice)}),r(i)}),[a,p]);return(0,n.useEffect)((()=>{m()}),[m]),(0,n.useEffect)((()=>{s&&d(s,!1)}),[s,d]),(0,n.useEffect)((()=>{u&&d(u)}),[u,d]),{step:t,loading:h,error:s,handleResetIdv:f,handleAdvanceStep:g,handleLoadInitialStep:m}}const Ec=(0,n.memo)((function(e){let t=e.step,r=Co(e,ko);const i=(0,n.useMemo)((()=>({step_type:t})),[t]);return(0,s.jsx)(js,Mo({event:i},r))}));function Ic(){const e=Eo((0,n.useState)(!1),2),t=e[0],r=e[1],i=Eo((0,n.useState)(),2),a=i[0],o=i[1],s=(()=>{const e=(0,_e.Db)(),t=(0,n.useCallback)((async(t,r)=>{const n={profile_id:t.profileId},i=ao(ao({},r||{}),{},{method:"POST"}),a=so();return await e(a,n,i)}),[e]);return t})(),c=ns().parseTwoFactorApiError,l=Xo().logEvent,u=(0,n.useCallback)(((e,t)=>{l(No.TwoFactorIdvActivate,Mo(Mo({},!!t&&{error_type:t}),{},{action:M.Us.render,componentType:M.re.page,result:e}))}),[l]);return{loading:t,error:a,activateIdv:(0,n.useCallback)((async e=>{r(!0);const t=await s({profileId:e});if(r(!1),t instanceof Error){const e=c(t);return o(e),u(j.x4.Failure,e.type),!1}return u(j.x4.Success),!0}),[s,c,u])}}const Cc=(0,n.memo)((function({onContinue:e,countryCode:t}){const r=Eo((0,n.useState)(),2),i=r[0],a=r[1],c=(0,P.Z)().locale,l=$o(),u=l.loader,d=l.action,p=Ic(),f=p.activateIdv,g=p.loading,h=p.error,m=as().handleError,b=Qo().target,y=ns().getTwoFactorError,_=Xo().logEvent,v=(0,n.useCallback)((async({id:e})=>{_(No.TwoFactorIdvProgress,{action:M.Us.measurement,componentType:M.re.page,progress_type:Vo.IdCaptureComplete,verification_id:e}),a(e)}),[_]),w=(0,n.useCallback)((async()=>{if(!i)return;const t=await f(i);_(No.TwoFactorIdvProgress,{action:M.Us.measurement,componentType:M.re.page,progress_type:Vo.IdvActivated,result:t}),t&&e()}),[i,f,_,e]),T=(0,n.useCallback)(((e,t,r)=>{(0,M.Kz)(e,Mo(Mo({},t),{},{twoFactorAction:d}),r)}),[d]),x=(0,n.useCallback)((e=>{_(No.TwoFactorIdCaptureError,{action:M.Us.measurement,componentType:M.re.page,errorName:e.name??"unknown"},M.E3.high);const t=y(be.D1.IdCaptureApiError,e);m(t,!0)}),[y,_,m]);return(0,n.useEffect)((()=>{_(No.TwoFactorIdvProgress,{action:M.Us.measurement,componentType:M.re.page,progress_type:Vo.IdCaptureStarted})}),[_]),(0,n.useEffect)((()=>{w()}),[w]),(0,n.useEffect)((()=>{h&&m(h,!1)}),[h,m]),(0,s.jsx)(Ec,{loading:g&&!!h,error:h?.message,onReload:w,step:be.yg.Idv,children:(0,s.jsx)(o.VStack,{testID:"idv-id-capture",alignItems:"center",children:(0,s.jsx)(ro,{allowMobileUpload:!0,forceFacematchType:"face",noBorder:!0,onPendingResponse:v,countryCode:t,locale:c,environment:b,source:"login-web",loader:u,applicationContext:"two-factor-web",onApiError:x,track:T,noMinWidth:!0,compact:!0})})})})),Dc=(0,n.memo)((function({onContinue:e}){const t=Ds(),r=t.challengeTwoFactor,i=t.challengeMetadata,a=t.handleChallengeError,o=t.loadingChallenge,c=t.challengeError,l=Xo().logEvent;(0,n.useEffect)((()=>{r(),l(No.TwoFactorIdvProgress,{action:M.Us.measurement,componentType:M.re.page,progress_type:Vo.IdvChallenged})}),[r,l]),(0,n.useEffect)((()=>{c&&a(c,!1)}),[c,a]);const u=(0,n.useMemo)((()=>o||!c&&!i),[o,c,i]),d=(0,n.useMemo)((()=>{if(i)return i.idv?.countryCode?i.idv.countryCode:(l({label:"idv.missing_country",loggingId:"9a3ea1a6-8d7c-4c26-8a5c-8a369151ce74"},{action:M.Us.measurement,componentType:M.re.page}),"US")}),[i,l]);return(0,s.jsx)(Ec,{loading:u,error:c?.message,onReload:r,step:be.yg.Idv,children:d&&(0,s.jsx)(Cc,{onContinue:e,countryCode:d})})})),Mc=(0,A.vU)({title:{id:"InputRecoveryCode.title",defaultMessage:"Enter your recovery pin",description:"Page main heading"},description:{id:"InputRecoveryCode.description",defaultMessage:"You have started your account recovery, but we don’t recognize this device. Enter the pin from the account recovery process to help us verify that it’s really you.",description:"Information about why pin is required"}}),jc=(0,n.memo)((function({onContinue:e}){const t=(0,P.Z)().formatMessage,r=Xo().logEvent,i=as().handleError;(0,n.useEffect)((()=>{r(No.TwoFactorIdvProgress,{action:M.Us.view,componentType:M.re.page,progress_type:Vo.RecoveryCodeRequested})}),[r]);const a=(0,n.useCallback)(((e,t)=>{r(No.TwoFactorIdvProgress,Mo(Mo({},t&&{error_type:t}),{},{action:M.Us.keyPress,componentType:M.re.text_input,progress_type:Vo.RecoveryCodeProvided,result:e}))}),[r]),c=(0,n.useCallback)((e=>{a(j.x4.Failure,e.type),i(e,!1)}),[a,i]),l=(0,n.useCallback)((()=>(a(j.x4.Success),e(),!1)),[e,a]),u=(0,n.useMemo)((()=>[t(Mc.description)]),[t]);return(0,s.jsxs)(o.VStack,{testID:"idv-input-recovery-code",children:[(0,s.jsx)(Ls,{title:t(Mc.title),description:u}),(0,s.jsx)(pc,{twoFactorType:w.Y6.RECOVERY_CODE,codeLength:6,onSuccess:l,onError:c,errorTestID:"idv-input-recovery-code-error"})]})}));const Ac=(0,A.vU)({title:{id:"SaveCodePrompt.title",defaultMessage:"Please don’t lose this pin",description:"Page main heading"},description:{id:"SaveCodePrompt.description",defaultMessage:"If you leave and come back on another device, you’ll need this recovery pin to finish verifying your ID.",description:"Information about why the pin is important"},toastWarnCopyCode:{id:"SaveCodePrompt.toastWarnCopyCode",defaultMessage:"Save pin to continue",description:"Toast message to show when user clicks continue without copying and downloading the code"},iSavedMyPin:{id:"SaveCodePrompt.iSavedMyPin",defaultMessage:"I saved my pin",description:"Button text to continue to next screen"},warning:{id:"SaveCodePrompt.warning",defaultMessage:"For security reasons, do not save this to your email or give this pin to anyone.",description:"Warning to not share pin"},writeDown:{id:"SaveCodePrompt.writeDown",defaultMessage:"Write down your pin",description:"Write down your pin for future references"},screenshot:{id:"SaveCodePrompt.screenshot",defaultMessage:"Screenshot your pin",description:"Take screenshot of the pin for future references"},store:{id:"SaveCodePrompt.store",defaultMessage:"Store in a safe place",description:"Store the written pin in a safe place"},save:{id:"SaveCodePrompt.save",defaultMessage:"Save locally on your device",description:"Save the screenshot locally on your device"},secure:{id:"SaveCodePrompt.secure",defaultMessage:"Secure",description:"Extremely secure way of storing the pin"},moderate:{id:"SaveCodePrompt.moderate",defaultMessage:"Moderate",description:"Moderately secure way of storing the pin"},copiedPinToast:{id:"SaveCodePrompt.copiedPinToast",defaultMessage:"Copied pin to clipboard",description:"Toast message telling user that pin was copied to clipboard"}}),Pc=(0,A.vU)({title:{id:"SaveConfirmationModal.title",defaultMessage:"Did you save your pin code?",description:"Confirmation from the user that the pin is saved"},description:{id:"SaveConfirmationModal.description",defaultMessage:"Confirm that you have saved your pin code to continue.",description:"Confirmation from the user that the pin is saved in order to continue"},goBack:{id:"SaveConfirmationModal.goBack",defaultMessage:"No, go back",description:"Go back to the screen showing the recovery pin"},continue:{id:"SaveConfirmationModal.continue",defaultMessage:"Yes, I saved my pin",description:"Continue to the next screen as the pin is saved"}}),Oc=(0,n.memo)((function({onContinue:e,visible:t,onClose:r}){const i=(0,P.Z)().formatMessage,a=(0,n.useCallback)((()=>{e()}),[e]);return(0,s.jsx)(Qe.Alert,{title:i(Pc.title),body:i(Pc.description),visible:t,stacked:!0,actionLayout:"vertical",preferredActionLabel:i(Pc.continue),onPreferredActionPress:a,dismissActionLabel:i(Pc.goBack),onRequestClose:r,testID:"idv-cancel-modal"})})),Fc=(0,n.memo)((function({image:e,title:t,description:r,securityLevel:n}){return(0,s.jsxs)(o.HStack,{justifyContent:"space-between",children:[(0,s.jsxs)(o.HStack,{alignItems:"center",children:[(0,s.jsx)(bt.Pictogram,{scaleMultiplier:.66,dimension:"48x48",name:e}),(0,s.jsxs)(o.VStack,{spacingHorizontal:2,children:[(0,s.jsx)(Se.TextHeadline,{as:"p",children:t}),(0,s.jsx)(Se.TextBody,{as:"p",color:"foregroundMuted",children:r})]})]}),(0,s.jsx)(Se.TextBody,{as:"p",children:n})]})})),Uc=(0,n.memo)((function({onContinue:e,code:t}){const r=(0,P.Z)().formatMessage,i=Xo().logEvent,a=Eo((0,Ke.useToggler)(!1),2),c=a[0],l=a[1],u=l.toggleOn,d=l.toggleOff,p=$o().onToast,f=(0,n.useCallback)((()=>{i(No.TwoFactorClickButton,{action:M.Us.click,componentType:M.re.button,button_type:Lo.IdvSavePin}),u()}),[u,i]),g=(0,n.useCallback)((()=>{i(No.TwoFactorClickButton,{action:M.Us.click,componentType:M.re.button,button_type:Lo.IdvSavePinConfirm}),e()}),[e,i]),h=(0,n.useCallback)((async()=>{await async function(e){return navigator.clipboard?.writeText(e)}(t),p({type:j.k.Reaction,message:r(Ac.copiedPinToast)})}),[t,p,r]);return(0,n.useEffect)((()=>{i(No.TwoFactorIdvProgress,{action:M.Us.view,componentType:M.re.page,progress_type:Vo.RecoveryCodeIssued})}),[i]),(0,s.jsxs)(o.VStack,{justifyContent:"space-between",testID:"idv-save-recovery-code",children:[(0,s.jsx)(Ls,{title:r(Ac.title),description:r(Ac.description),spacingBottom:3}),(0,s.jsxs)(o.VStack,{alignItems:"center",background:"primary",borderRadius:"standard",spacing:3,onClick:h,dangerouslySetClassName:"c1t1xw7q",children:[(0,s.jsx)(Se.TextDisplay1,{as:"h2",color:"negativeForeground",spacingBottom:1,testID:"idv-code",children:(0,s.jsxs)(o.HStack,{justifyContent:"center",gap:1,children:[(0,s.jsx)("span",{children:t.substring(0,3)}),(0,s.jsx)("span",{children:t.substring(3)})]})}),(0,s.jsx)(Se.TextLabel2,{as:"p",align:"center",color:"negativeForeground",children:r(Ac.warning)})]}),(0,s.jsxs)(o.VStack,{gap:4,spacingVertical:5,children:[(0,s.jsx)(Fc,{image:"completeQuiz",title:r(Ac.writeDown),description:r(Ac.store),securityLevel:r(Ac.secure)}),(0,s.jsx)(Fc,{image:"camera",title:r(Ac.screenshot),description:r(Ac.save),securityLevel:r(Ac.moderate)})]}),(0,s.jsx)(Te.Button,{variant:"secondary",testID:"idv-i-saved-my-pin-btn",block:!0,onPress:f,children:(0,s.jsx)(Se.TextHeadline,{as:"p",children:r(Ac.iSavedMyPin)})}),(0,s.jsx)(Oc,{onContinue:g,visible:c,onClose:d})]})})),Rc=(0,n.memo)((function({onContinue:e}){const t=function(){const e=Eo((0,n.useState)(""),2),t=e[0],r=e[1],i=is(),a=i.challengeTwoFactor,o=i.loading,s=i.error,c=as().handleError,l=(0,n.useCallback)((async()=>{const e=await a({secondFactorType:w.Y6.RECOVERY_CODE,recoveryCode:{associatedSecondFactorType:w.Y6.IDV}}),t=e?.recoveryCode?.codes?.[0];t&&r(t)}),[a]);return(0,n.useEffect)((()=>{l()}),[l]),(0,n.useEffect)((()=>{s&&c(s,!1)}),[s,c]),{getRecoveryCode:l,code:t,loading:o,error:s}}(),r=t.getRecoveryCode,i=t.code,a=t.loading,o=t.error,c=(0,n.useMemo)((()=>a||!i&&!o),[a,i,o]);return(0,s.jsx)(Ec,{loading:c,error:o?.message,onReload:r,step:be.yg.SaveRecoveryCode,children:(0,s.jsx)(Uc,{code:i,onContinue:e})})}));function Nc(){const e=Eo((0,n.useState)(),2),t=e[0],r=e[1],i=Ds(),a=i.handleVerifySuccess,o=i.handleVerifyError,s=function(){const e=Ds(),t=e.enabledTwoFactorIndex,r=e.getEnabledTwoFactor,i=e.setEnabledTwoFactor;return(0,n.useCallback)((()=>{0===t?r():i(0)}),[t,r,i])}(),l=Xo().logEvent,u=(0,n.useCallback)((e=>{l(No.TwoFactorIdvProgress,{action:M.Us.view,componentType:M.re.page,progress_type:Vo.IdvComplete,result:e})}),[l]),d=(0,n.useCallback)((e=>{const t=e.status?.proofToken,n=e.status?.rc?.rcStatus,i=e.status?.rc?.idvStatus;return i&&r(i),n===w.U5.ACTIVE?(u(j.x4.Success),a(t??c),!0):n===w.U5.INACTIVE?(s(),!0):i===w.U5.FAILED&&(u(j.x4.Failure),!0)}),[a,s,u]),p=Y({type:w.Y6.RECOVERY_CODE,rc:{associatedSecondFactorType:w.Y6.IDV},id:"idv-status-id",onResponse:d}),f=p.error,g=p.startPoll,h=p.loading;return(0,n.useEffect)((()=>{f&&o(f,!1)}),[f,o]),(0,n.useEffect)((()=>{g()}),[g]),{idvStatus:t,error:f,loading:h,startPoll:g}}const Lc=(0,n.memo)((function({title:e,description:t,onActionButtonPress:r,actionButtonText:n,actionButtonTestID:i,iconName:a,iconColor:c="primary",align:l="center",testID:u}){return(0,s.jsxs)(o.VStack,{testID:u,alignItems:l,children:[a&&(0,s.jsx)(o.Box,{height:128,width:128,alignItems:"center",justifyContent:"center",spacingBottom:4,children:(0,s.jsx)(mt.Icon,{testID:"base-status-icon",name:a,size:"l",color:c})}),(0,s.jsx)(Se.TextTitle1,{as:"h2",children:e}),(0,s.jsx)(o.Box,{spacingTop:2,spacingBottom:5,children:"string"==typeof t?(0,s.jsx)(Se.TextBody,{testID:"base-status-string-description",as:"p",color:"foregroundMuted",align:"center",children:t}):t}),(0,s.jsx)(Te.Button,{block:!0,onPress:r,testID:i,children:n})]})})),Bc=(0,A.vU)({title:{id:"IdvStatusFailed.title",defaultMessage:"We couldn’t verify your ID",description:"Page main heading"},instructionListTitle:{id:"IdvStatusFailed.instructionListTitle",defaultMessage:"Please make sure:",description:"Label for list of instruction to check"},useValidId:{id:"IdvStatusFailed.useValidId",defaultMessage:"You’re using a valid government-issued ID",description:"Instruction to verfiy if user is using valid id"},idMatchesTheInfo:{id:"IdvStatusFailed.idMatchesTheInfo",defaultMessage:"Your ID matches the personal info for your account exactly",description:"Instruction to make sure if the user info matches with the user id"},clearTextAndVisibleCard:{id:"IdvStatusFailed.clearTextAndVisibleCard",defaultMessage:"The text is clear and your entire card is visible",description:"Instruction to make sure the text is clear and enire id is visible"},needHelp:{id:"IdvStatusFailed.needHelp",defaultMessage:"Need help?",description:"Need help text"},tryAgain:{id:"IdvStatusFailed.tryAgain",defaultMessage:"Try again",description:"Button text to retry ID verification"},learnMore:{id:"IdvStatusFailed.learnMore",defaultMessage:"Learn more",description:"Link text for learn more"}});function qc(){const e=(0,P.Z)().formatMessage,t=(0,n.useMemo)((()=>[e(Bc.useValidId),e(Bc.idMatchesTheInfo),e(Bc.clearTextAndVisibleCard)]),[e]),r=(0,P.Z)().locale;return(0,s.jsxs)(o.VStack,{children:[(0,s.jsx)(Se.TextBody,{as:"p",color:"foregroundMuted",children:e(Bc.instructionListTitle)}),(0,s.jsx)(o.VStack,{spacingStart:3,spacingTop:1,spacingBottom:3,children:t.map((e=>(0,s.jsxs)(o.HStack,{gap:1,children:[(0,s.jsx)(Se.TextBody,{as:"p",color:"foregroundMuted",children:"•"}),(0,s.jsx)(Se.TextBody,{as:"p",color:"foregroundMuted",children:e})]},e)))}),(0,s.jsx)(o.Box,{alignItems:"center",children:(0,s.jsxs)(Se.TextBody,{as:"p",color:"foregroundMuted",children:[e(Bc.needHelp)," ",(0,s.jsx)(Se.Link,{variant:"body",to:`https://help.coinbase.com/${r}/coinbase/getting-started/getting-started-with-coinbase/id-doc-verification`,target:"_blank",rel:"noopener noreferrer",children:e(Bc.learnMore)})]})})]})}const Vc=(0,n.memo)((function({onRetry:e}){const t=(0,P.Z)().formatMessage,r=Xo().logEvent,i=(0,n.useCallback)((()=>{r(No.TwoFactorClickButton,{action:M.Us.click,componentType:M.re.button,button_type:Lo.IdvRestart}),e()}),[r,e]);return(0,s.jsx)(Lc,{title:t(Bc.title),align:"flex-start",description:(0,s.jsx)(qc,{}),actionButtonText:t(Bc.tryAgain),onActionButtonPress:i,actionButtonTestID:"idv-failed-try-again-button",testID:"idv-failed-status"})})),Wc=(0,A.vU)({title:{id:"IdvStatusPending.title",defaultMessage:"We’re verifying your ID",description:"Page main heading"},description:{id:"IdvStatusPending.description",defaultMessage:"You can close this page. This should take about 10 minutes; we’ll email you when we’re done.",description:"Description and info about loading time."}}),$c=(0,n.memo)((function(){const e=(0,P.Z)().formatMessage,t=Xo().logEvent;return(0,n.useEffect)((()=>{t(No.TwoFactorIdvProgress,{action:M.Us.view,componentType:M.re.page,progress_type:Vo.IdvProcessing})}),[t]),(0,s.jsxs)(o.VStack,{testID:"idv-pending-status",children:[(0,s.jsx)(hs,{size:240,testID:"idv-pending-loader"}),(0,s.jsx)(Se.TextTitle1,{as:"h1",align:"center",children:e(Wc.title)}),(0,s.jsx)(Se.TextBody,{as:"p",align:"center",color:"foregroundMuted",spacingTop:2,children:e(Wc.description)})]})})),zc=(0,n.memo)((function({onRetry:e,onUpdateStatus:t}){const r=Nc(),i=r.idvStatus,a=r.startPoll,o=r.error,c=r.loading;(0,n.useEffect)((()=>{i&&t(i)}),[t,i]);const l=(0,n.useMemo)((()=>i?i===w.U5.FAILED?(0,s.jsx)(Vc,{onRetry:e}):(0,s.jsx)($c,{}):null),[i,e]),u=(0,n.useMemo)((()=>!i||(i===w.U5.COMPLETED||!!o&&c)),[i,o,c]);return(0,s.jsx)(Ec,{loading:u,error:o?.message,onReload:a,step:be.yg.Status,children:l})})),Yc=(0,n.memo)((function(){const e=Eo((0,n.useState)(),2),t=e[0],r=e[1],i=kc(),a=i.step,c=i.loading,l=i.error,u=i.handleResetIdv,d=i.handleLoadInitialStep,p=i.handleAdvanceStep,f=(0,n.useMemo)((()=>{switch(a){case be.yg.Idv:return(0,s.jsx)(Dc,{onContinue:p});case be.yg.SaveRecoveryCode:return(0,s.jsx)(Rc,{onContinue:p});case be.yg.InputRecoveryCode:return(0,s.jsx)(jc,{onContinue:p});case be.yg.Status:return(0,s.jsx)(zc,{onRetry:u,onUpdateStatus:r});default:return null}}),[a,p,u]);return(0,s.jsx)(js,{loading:c,error:l?.message,onReload:d,children:(0,s.jsxs)(o.VStack,{children:[f,f&&a&&(0,s.jsx)(xc,{step:a,status:t})]})})}));const Hc=(0,n.memo)((function(){const e=function(){const e=Ds(),t=e.challengeTwoFactor,r=e.handleChallengeError,i=e.challengeError,a=e.loadingChallenge;return(0,n.useEffect)((()=>{i&&r(i,!1)}),[i,r]),{loading:(0,n.useMemo)((()=>!i||a),[i,a]),challengeTwoFactor:t,error:i}}(),t=e.error,r=e.challengeTwoFactor,i=function(){const e=Eo((0,n.useState)(!1),2),t=e[0],r=e[1],i=Eo((0,n.useState)(),2),a=i[0],o=i[1],s=(0,U.yl)(),l=ts(),u=ns().parseTwoFactorApiError;return{loading:t,error:a,verifyNo2FA:(0,n.useCallback)((async e=>{r(!0);const t=l;e===w.Y6.BYPASS?t.bypass={}:e===w.Y6.NO_2FA&&(t.no2fa={});const n=await s(t);if(r(!1),n instanceof Error){const e=u(n);return o(e),null}return o(void 0),n.proofToken??c}),[s,l,u])}}(),a=i.error,o=i.verifyNo2FA,l=Ds(),u=l.handleVerifySuccess,d=l.twoFactorMethod,p=(0,n.useCallback)((async()=>{if(!d?.type)return;if(!await r())return;const e=await o(d?.type);Wo(e)&&u(e)}),[d,r,o,u]),f=(0,n.useMemo)((()=>t?.message??a?.message),[t,a]);return(0,n.useEffect)((()=>{p()}),[p]),(0,s.jsx)(js,{loading:!f,error:f,onReload:p})})),Gc="a1ir2zrf";function Kc({avatarSrc:e}){return(0,s.jsx)("div",{className:Gc,children:e?(0,s.jsx)("img",{src:e,alt:"Avatar"}):(0,s.jsx)("div",{className:"iconContainer",children:(0,s.jsx)(mt.Icon,{name:"profile",size:"s",color:"foregroundMuted"})})})}function Zc({onPress:e,username:t,avatarSrc:r}){return(0,s.jsx)(lo.Pressable,{onPress:e,backgroundColor:"background",borderColor:"line",borderWidth:"button",borderRadius:"input",width:"100%",className:"p86exkd",children:(0,s.jsxs)(o.HStack,{alignItems:"center",gap:1,spacing:2,children:[(0,s.jsx)(Kc,{avatarSrc:r}),(0,s.jsx)(Se.TextHeadline,{as:"p",overflow:"truncate",children:t})]})})}const Qc=(0,A.vU)({title:{id:"PasswordInputCode.title",defaultMessage:"Sign in to Coinbase",description:"Title for the Email Code Input screen prompting user to input the code"},description:{id:"PasswordInputCode.description",defaultMessage:"Not your device? Use a private or incognito window to sign in.",description:"Description for the Email Code Input screen explaining the reason for requiring 2FA"},attemptLimitReached:{id:"PasswordInputCode.attemptLimitReached",defaultMessage:"You’ve tried to enter your code too many times. Please wait for 5 minutes to try again.",description:"Error when user reaches the attempt limit for Email"}});const Jc=(0,n.memo)((function(){const e=(0,P.Z)().formatMessage,t=Ds(),r=t.twoFactorMethod,i=(t.challengeError,t.challengeMetadata),a=t.handleVerifySuccess,l=(t.handleVerifyError,Vs()),u=Eo((0,n.useState)(!i?.identify),2),d=u[0],p=u[1],f=function(){const e=Eo((0,n.useState)(!1),2),t=e[0],r=e[1],i=Eo((0,n.useState)(),2),a=i[0],o=i[1],s=(0,U.yl)(),l=ts(),u=ns().parseTwoFactorApiError;return{loading:t,error:a,verifyPassword:(0,n.useCallback)((async(e,t)=>{r(!0);const n={password:t,email:e},i=l;i.password=n;const a=await s(i);if(r(!1),a instanceof Error){const e=u(a);return o(e),null}return o(void 0),a.proofToken??c}),[s,l,u])}}(),g=f.verifyPassword,h=Eo((0,n.useState)(!1),2),m=(h[0],h[1]),b=Eo((0,n.useState)(""),2),y=b[0],_=b[1],v=Eo((0,n.useState)("foregroundMuted"),2),w=v[0],T=v[1],x=function(){const e=Eo((0,n.useState)(!1),2),t=e[0],r=e[1],i=(0,n.useCallback)((()=>r((e=>!e))),[r]);return[(0,n.useMemo)((()=>t?"text":"password"),[t]),(0,s.jsx)(Te.IconButton,{name:t?"visibleActive":"visibleInactive",transparent:!0,variant:"foregroundMuted",onPress:i,accessibilityLabel:"show-password"})]}(),S=Eo(x,2),k=S[0],E=S[1],I=Eo((0,n.useState)(""),2),C=I[0],D=I[1],M=Eo((0,n.useState)(""),2),j=M[0],A=M[1],O=Eo((0,n.useState)(""),2),F=O[0],R=(O[1],(0,n.useCallback)((()=>{p(!1)}),[])),N=(0,n.useCallback)((e=>(e.preventDefault(),D(""),T("foregroundMuted"),m(e.target.value.length>5),_(e.target.value))),[]),L=(0,n.useCallback)((e=>(e.preventDefault(),A(e.target.value))),[]),B=(0,n.useCallback)((async e=>{if(e.preventDefault(),d){const e=await g(j,y);Wo(e)&&a(e)}else p(!0)}),[j,d,y,g,a]);return(0,s.jsxs)(o.VStack,{testID:"password-input-code",children:[(0,s.jsx)(Ls,{title:e(Qc.title,{email:l(r)}),description:e(Qc.description)}),(0,s.jsxs)("form",{onSubmit:B,children:[!d&&(0,s.jsx)(co.TextInput,{autoFocus:!0,label:"Email",placeholder:"Your email address",onChange:L,testID:"email-input"}),d&&(0,s.jsxs)(o.VStack,{spacingBottom:3,children:[(0,s.jsx)(o.Box,{spacingBottom:3,children:(0,s.jsx)(Zc,{username:j,avatarSrc:F,onPress:R})}),(0,s.jsx)(co.TextInput,{autoFocus:!0,label:"Enter your password",value:y,onChange:N,variant:w,helperText:C,type:k,end:E,testID:"password-input"})]}),(0,s.jsx)(o.VStack,{spacingBottom:5,spacingTop:2,children:(0,s.jsx)(Te.Button,{type:"submit",testID:"password-submit-button",children:"Continue"})})]})]})})),Xc=(0,A.vU)({updatePasswordTitle:{id:"PasswordTryAnotherWay.updatePasswordTitle",defaultMessage:"Verify by ID",description:"Title for the Password Try Another Way option to update phone number"},updatePasswordDescription:{id:"PasswordTryAnotherWay.updatePasswordDescription",defaultMessage:"New password? Verify your identity update your email.",description:"Description for the Password Try Another Way option to verify identity and update phone number"}}),el=(0,n.memo)((function({onCloseDrawer:e}){const t=(0,P.Z)().formatMessage,r=oc().HELP_OPTION_URLS,i=(0,n.useMemo)((()=>({id:qo.PasswordTroubleshoot,to:r[w.Y6.PASSWORD]})),[r]),a=nc({showDefaultIDVOption:!1,idvOption:(0,n.useMemo)((()=>({id:qo.PasswordTroubleshoot,title:t(Xc.updatePasswordTitle),description:t(Xc.updatePasswordDescription)})),[t])});return(0,s.jsx)(tc,{onCloseDrawer:e,twoFactorType:w.Y6.PASSWORD,alternateTwoFactorOptions:a,troubleshootOption:i,testID:"password-try-another-way"})})),tl=(0,n.memo)((function(){return(0,s.jsx)(Rs,{BaseView:Jc,DrawerView:el,toggleTestID:"password-toggle-help-button",twoFactorType:w.Y6.PASSWORD})})),rl=(0,A.vU)({pushRateLimitError:{id:"ChallengePush.pushRateLimitError",defaultMessage:"Please wait 30 seconds before resending a new Coinbase security prompt.",description:"Error message informing user to wait before sending new push security prompt"}});const nl="PUSH_VERIFIED_COUNT";function il(){const e=parseInt(window.localStorage.getItem(nl)??"0");return Number.isNaN(e)?0:e}const al=(0,A.vU)({title:{id:"PushFailed.title",defaultMessage:"Verification denied",description:"Generic title message for the user to inform them that the push verification was stopped"},description:{id:"PushFailed.description",defaultMessage:"You indicated that you do not recognize this activity in the Security Prompt sent to your mobile device.",description:"Generic description informing user that the push verification attempt was stopped"},tryAgainDescription:{id:"PushFailed.tryAgainDescription",defaultMessage:"If this was a mistake, you can re-send the prompt and try again.",description:"Message informing user that they can try again if stopping the verification was a mistake"},tryAgain:{id:"PushFailed.tryAgain",defaultMessage:"Try again",description:"Button text telling user to try again"}}),ol=(0,n.memo)((function({onTryAgainPress:e}){const t=(0,P.Z)().formatMessage,r=Xo().logEvent,i=$o().config,a=(0,n.useCallback)((()=>{r(No.TwoFactorClickButton,{action:M.Us.click,componentType:M.re.button,button_type:Lo.PushTryAgain}),e()}),[r,e]),c=i?.push??{},l=c.failedTitle,u=c.failedDescription,d=(0,n.useMemo)((()=>({title:l??t(al.title),description:u??t(al.description),body:t(al.tryAgainDescription)})),[l,u,t]);return(0,s.jsxs)(o.VStack,{testID:"push-failed",children:[(0,s.jsx)(Ls,{title:d.title,description:d.description,spacingBottom:1}),(0,s.jsx)(Se.TextBody,{as:"p",color:"foregroundMuted",children:d.body}),(0,s.jsx)(o.Box,{spacingTop:5,children:(0,s.jsx)(Te.Button,{block:!0,onPress:a,testID:"push-try-again-button",children:t(al.tryAgain)})})]})})),sl=(0,A.vU)({title:{id:"PushMultipleTabs.title",defaultMessage:"Multiple Tabs Open",description:"Title inform user that they have multiple tabs open trying to sign-in"},description:{id:"PushMultipleTabs.description",defaultMessage:"Continue signing in on the new browser page you opened.",description:"Instructs user that this page is no longer valid because a newer sign in attempt was started on another browser page"}}),cl=(0,n.memo)((function(){const e=(0,P.Z)().formatMessage;return(0,s.jsxs)(o.VStack,{flexGrow:1,alignItems:"center",spacing:4,testID:"push-multiple-tabs",children:[(0,s.jsx)(xe.Pictogram,{alt:"browserMultiPlatform",name:"browserMultiPlatform",dimension:"64x64",scaleMultiplier:2,testID:"push-multiple-tabs-open-image"}),(0,s.jsx)(Se.TextTitle1,{as:"h3",spacingTop:6,align:"center",color:"foreground",children:e(sl.title)}),(0,s.jsx)(Se.TextBody,{as:"p",spacingTop:2,align:"center",color:"foregroundMuted",children:e(sl.description)})]})})),ll=(0,A.vU)({title:{id:"PushPrompt.title",defaultMessage:"Open the Coinbase app on your mobile device",description:"Title for user instructing them to open coinbase app in their device"},description:{id:"PushPrompt.description",defaultMessage:'To protect your account, we’re making sure this is actually you. Please open Coinbase on your mobile device and tap "Yes" on the prompt.',description:'Informs user we are confirming the activity was initiated by them, and that they should click "Yes" on the mobile prompt to continue'},openFAQButtonLabel:{id:"PushPrompt.openFAQButtonLabel",defaultMessage:"Why am I receiving this message?",description:"Label of the button which opens FAQs"}}),ul=(0,A.vU)({changeQuestion:{id:"PushFAQModal.changeQuestion",defaultMessage:"Why did this change?",description:"FAQ question, why user is seeing Push two factor"},changeAnswer:{id:"PushFAQModal.changeAnswer",defaultMessage:"We've updated your 2-step verification method to Coinbase Security Prompt. Security Prompt is faster and more reliable because you don't need to get a text message, and it will help you stay more secure.",description:"FAQ answer, explaining user that the push is more secure, and we updated their two factor method to push notifications by default."},updateSettingsQuestion:{id:"PushFAQModal.updateSettingsQuestion",defaultMessage:"How can I change my 2-step verification method?",description:"FAQ question, how can user change the 2-step verification method"},updateSettingsAnswer:{id:"PushFAQModal.updateSettingsAnswer",defaultMessage:"You can change your 2-step verification method within your Coinbase account Settings in the Security tab.",description:"FAQ answer, instruction for user to change their default two factor method"}}),dl=(0,n.memo)((function({visible:e,onClose:t}){const r=(0,P.Z)().formatMessage,i=(0,n.useMemo)((()=>[{question:r(ul.changeQuestion),answer:r(ul.changeAnswer)},{question:r(ul.updateSettingsQuestion),answer:r(ul.updateSettingsAnswer)}]),[r]);return(0,s.jsxs)(po.Modal,{visible:e,hideCloseButton:!1,hideDividers:!0,onRequestClose:t,children:[(0,s.jsx)(Qe.ModalHeader,{}),(0,s.jsx)(fo.ModalBody,{children:(0,s.jsx)(o.VStack,{testID:"faq-list",children:i.map((({question:e,answer:t})=>(0,s.jsxs)(o.VStack,{spacingBottom:3,children:[(0,s.jsx)(Se.TextBody,{as:"p",spacingBottom:1,children:e}),(0,s.jsx)(Se.TextBody,{as:"p",color:"foregroundMuted",children:t})]},e)))})})]})})),pl=(0,n.memo)((function(){const e=(0,P.Z)().formatMessage,t=Eo((0,Ke.useToggler)(),2),r=t[0],i=t[1],a=i.toggleOn,c=i.toggleOff,l=il()<3,u=Xo().logEvent,d=(0,n.useCallback)((()=>{u(No.TwoFactorClickButton,{action:M.Us.click,componentType:M.re.button,button_type:Lo.PushOpenFAQ}),a()}),[a,u]),p=(0,n.useMemo)((()=>({title:e(ll.title),description:e(ll.description),openFAQButtonLabel:e(ll.openFAQButtonLabel)})),[e]);return(0,s.jsxs)(o.VStack,{testID:"push-prompt",children:[(0,s.jsx)(Ls,{title:p.title,description:p.description,spacingBottom:1}),l&&(0,s.jsx)(o.Box,{spacingTop:3,children:(0,s.jsx)(Se.Link,{variant:"body",onPress:d,testID:"open-faq-button",children:p.openFAQButtonLabel})}),(0,s.jsx)(o.Box,{justifyContent:"center",spacingTop:5,children:(0,s.jsx)(uo.SpotSquare,{name:"phoneNotifications",testID:"device-notification-image",scaleMultiplier:2})}),(0,s.jsx)(o.Box,{spacingTop:5,children:(0,s.jsx)($s,{twoFactorType:w.Y6.PUSH,startWithCooldown:!0})}),(0,s.jsx)(dl,{visible:r,onClose:c})]})})),fl=(0,A.vU)({troubleshootDescription:{id:"PushTryAnotherWay.troubleshootDescription",defaultMessage:"Not receiving your security prompt? Install the latest version of the Coinbase app or try refreshing the app. For other issues, visit our Help Center.",description:"Description for Troubleshoot option telling user how to resolve issues around not receiving security prompts for two-factor authentication"}}),gl=(0,n.memo)((function({onCloseDrawer:e}){const t=(0,P.Z)().formatMessage,r=nc({showDefaultIDVOption:!1}),i=oc().HELP_OPTION_URLS,a=(0,n.useMemo)((()=>({id:qo.PushTroubleshoot,to:i[w.Y6.PUSH],description:t(fl.troubleshootDescription)})),[i,t]);return(0,s.jsx)(tc,{onCloseDrawer:e,twoFactorType:w.Y6.PUSH,alternateTwoFactorOptions:r,troubleshootOption:a,testID:"push-try-another-way"})})),hl=[j.mu.VerifyDenied,j.mu.MissingCacheKey,j.mu.ChallengeInvalidated],ml=(0,n.memo)((function(){const e=Eo((0,n.useState)(!1),2),t=e[0],r=e[1],i=function(){const e=(0,P.Z)().formatMessage,t=Ds(),r=t.challengeTwoFactor,i=t.challengeError,a=t.handleChallengeError,o=t.challengeMetadata;return(0,n.useEffect)((()=>{r()}),[r]),(0,n.useEffect)((()=>{i&&(i.type===be.D1.TooManyRequests&&(i.message=e(rl.pushRateLimitError)),a(i))}),[i,a,e]),{statusId:o?.push?.statusId,challengeTwoFactor:r}}(),a=i.statusId,o=i.challengeTwoFactor,c=Ns({id:a,showErrorToast:!1,onSuccess:(0,n.useCallback)((()=>{!function(){const e=il();window.localStorage.setItem(nl,(e+1).toString())}()}),[]),onError:(0,n.useCallback)((e=>{e.type===j.mu.VerifyDenied&&r(!0)}),[])}).error,l=(0,n.useCallback)((()=>{r(!1),o()}),[o]),u=(0,n.useCallback)((()=>{o()}),[o]),d=(0,n.useMemo)((()=>{if(!c||!hl.includes(c.type))return c?.message}),[c]),p=(0,n.useMemo)((()=>{if(c?.type===j.mu.ChallengeInvalidated)return(0,s.jsx)(cl,{});const e=t?()=>(0,s.jsx)(ol,{onTryAgainPress:l}):pl;return(0,s.jsx)(Rs,{BaseView:e,DrawerView:gl,twoFactorType:w.Y6.PUSH,toggleTestID:"push-toggle-help-button"})}),[c,t,l]);return(0,s.jsx)(js,{error:d,onReload:u,children:p})}));function bl(){const e=Eo((0,n.useState)("security_questions"),2),t=e[0],r=e[1],i=Eo((0,n.useState)(),2),a=i[0],o=i[1],s=function(){const e=Eo((0,n.useState)(!1),2),t=e[0],r=e[1],i=(0,U.yl)(),a=ts(),o=ns().parseTwoFactorApiError;return{loading:t,verifyQuestions:(0,n.useCallback)((async(e,t)=>{r(!0);const n=a;e===w.Y6.SECURITY_QUESTION&&(n.securityQuestion={answers:[...t]});const s=await i(n);return r(!1),s instanceof Error?{error:o(s)}:{proofToken:s?.proofToken??c}}),[a,i,o])}}().verifyQuestions,l=$o().onSuccess,u=as().handleError,d=(0,n.useCallback)((()=>{switch(t){case"security_questions":r("identity_card_number");break;case"identity_card_number":r("status")}}),[t]),p=(0,n.useCallback)((()=>{r("security_questions")}),[]),f=(0,n.useCallback)((async e=>{d();try{if(!e)throw new Error("Payload was empty");const t=await s(w.Y6.SECURITY_QUESTION,e),r=t.proofToken,n=t.error;o(w.U5.PENDING),r?l(r,j.QA.SecurityQuestions):n&&n.type===be.D1.InvalidSecurityQuestionAttempt?(o(w.U5.FAILED),u({error:n,type:n.type,message:n.message},!1)):n&&n.type===be.D1.SQAttemptLimitReached&&(o(w.U5.UNKNOWN),u({error:n,type:n.type,message:n.message},!1))}catch(e){console.error(e)}}),[u,l,d,s]),g=(0,n.useCallback)((e=>{f(e)}),[f]);return{step:t,status:a,setSecurtityStep:d,handleRetryFlow:p,handleSubmitQuestions:g}}const yl=(0,A.vU)({idPrompt:{id:"IDCard.idPrompt",defaultMessage:"Enter your {placeholder1} number",description:"Title for the ID card page"},driverLicense:{id:"IDCard.driverLicense",defaultMessage:"Driver's License",description:"US ID for driving"},continue:{id:"IDCard.continue",defaultMessage:"Continue",description:"Button to proceed to the next page"},verifyQuestionsPrompt:{id:"IDCard.verifyQuestionsPrompt",defaultMessage:"Providing information below will give you access to your account for 24 hours. Make sure info entered matches what we have on file.",description:"Modal title to cancel identity verification"},dLIdPlaceholder:{id:"IDCard.dLIdPlaceholder",defaultMessage:"ID",description:"General identification"},passportPlaceholder:{id:"IDCard.passportPlaceholder",defaultMessage:"passport",description:'name for travel ID "passport" for travel'},nationalId:{id:"IDCard.nationalId",defaultMessage:"national ID",description:"name for national ID for travel"},nameErrorTxt:{id:"IDCard.nameErrorTxt",defaultMessage:"Please enter your card number",description:"Notify user they need to enter a number befor proceeding"}}),_l=(0,n.memo)((function({handleSubmit:e,idNumber:t,userIdCardType:r,updateIdNumber:i,payload:a}){const c=(0,P.Z)().formatMessage,l=Eo((0,n.useState)(!1),2),u=l[0],d=l[1],p=Eo((0,n.useState)(),2),f=p[0],g=p[1],h=Eo((0,n.useState)(),2),m=h[0],b=h[1],y=(0,n.useCallback)((e=>{d(!1),b(void 0),g(""),""===e?(d(!1),b("negative"),g(c(yl.nameErrorTxt))):d(!0)}),[c]),_=(0,n.useCallback)((e=>{const t=e.currentTarget.value;i(t),y(t)}),[i,y]),v=(0,n.useCallback)((()=>c("SECURITY_QUESTION_ID_DRIVING_LICENSE"===r?yl.dLIdPlaceholder:"SECURITY_QUESTION_ID_PASSPORT"===r?yl.passportPlaceholder:yl.nationalId)),[c,r]),w=(0,n.useCallback)((()=>{e(a)}),[e,a]),T=(0,n.useMemo)((()=>{const e=v();return{placeholder1:(0,s.jsx)(Se.TextTitle2,{color:"primary",as:"label",children:e})}}),[v]);return(0,s.jsxs)(o.VStack,{gap:1,children:[(0,s.jsx)(lt.Box,{spacingBottom:2,width:"100%",children:(0,s.jsx)(Se.TextTitle2,{as:"h2",children:c(yl.idPrompt,T)})}),(0,s.jsx)(lt.Box,{spacingBottom:3,children:(0,s.jsx)(Se.TextBody,{as:"p",children:c(yl.verifyQuestionsPrompt)})}),(0,s.jsx)(o.VStack,{gap:2,children:(0,s.jsx)(co.TextInput,{variant:m,helperText:f,value:t,onChange:_,label:c(yl.idPrompt,{placeholder1:v()}),placeholder:v(),type:"text",autoComplete:"off"})}),(0,s.jsx)(lt.Box,{spacingTop:4,children:(0,s.jsx)(ze.Button,{disabled:!u,onPress:w,block:!0,children:c(yl.continue)})})]})})),vl=(0,A.vU)({socialSecurity:{id:"SecurityQuestion.socialSecurity",defaultMessage:"Enter your Social Security Number",description:"Lable to prompt user to enter their social security"},socialPlaceholder:{id:"SecurityQuestion.socialPlaceholder",defaultMessage:"000-00-0000",description:"Placeholder of the social security input"},verifyTitle:{id:"SecurityQuestion.verifyTitle",defaultMessage:"Verify your Identity",description:"Modal title to cancel identity verification"},verifyQuestionsPrompt:{id:"SecurityQuestion.verifyQuestionsPrompt",defaultMessage:"Providing information below will give you access to your account for 24 hours. Make sure info entered matches what we have on file.",description:"Modal title to cancel identity verification"},nameLabel:{id:"SecurityQuestion.nameLabel",defaultMessage:"Enter your name",description:"Title for a user to state their name in the input"},firstNamePlaceholder:{id:"SecurityQuestion.firstNamePlaceholder",defaultMessage:"First name",description:"Placeholder for a users given name appearing in the input"},familyNamePlaceholder:{id:"SecurityQuestion.familyNamePlaceholder",defaultMessage:"Family name",description:"Placeholder for a users family or last name appearing in the input"},dobLabel:{id:"SecurityQuestion.dobLable",defaultMessage:"Date of Birth",description:"Label for a users date of birth "},continue:{id:"SecurityQuestion.continue",defaultMessage:"Continue",description:"Button to proceed to the next page"},socialErrorTxt:{id:"SecurityQuestion.socialErrorTxt",defaultMessage:"Please check the format of your social",description:"Error to let users know they need to enter their social in an appropriate format"},nameErrorTxt:{id:"SecurityQuestion.nameErrorTxt",defaultMessage:"Please enter your name",description:"A prompt to tell users to enter their name"},dateErrorTxt:{id:"SecurityQuestion.dateErrorTxt",defaultMessage:"Please enter a valid birthday",description:"A prompt to ensure the user puts in a valid birthday"}}),wl=(0,n.memo)((function({handleContinue:e,firstName:t,updateFirstName:r,familyName:i,updateFamilyName:a,dob:o,updateDob:c,socialSecurity:l,updateSocialSecurity:u,hasSocialSecurityNo:d}){const p=(0,P.Z)().formatMessage,f=Eo((0,n.useState)(),2),g=f[0],h=f[1],m=Eo((0,n.useState)(),2),b=m[0],y=m[1],_=Eo((0,n.useState)(),2),v=_[0],w=_[1],T=Eo((0,n.useState)(),2),x=T[0],S=T[1],k=Eo((0,n.useState)(),2),E=k[0],I=k[1],C=Eo((0,n.useState)(),2),D=C[0],M=C[1],j=Eo((0,n.useState)(!1),2),A=j[0],O=j[1],F=Eo((0,n.useState)(),2),U=F[0],R=F[1],N=Eo((0,n.useState)(),2),L=N[0],B=N[1],q=Eo((0,n.useState)(!1),2),V=q[0],W=q[1],$=Eo((0,n.useState)(),2),z=$[0],Y=$[1],H=Eo((0,n.useState)(),2),G=H[0],K=H[1],Z=(0,n.useCallback)((e=>{h(!1),w(void 0),y(""),""===e?(h(!1),w("negative"),y(p(vl.nameErrorTxt))):h(!0)}),[p]),Q=(0,n.useCallback)((e=>{S(!1),M(void 0),I(""),""===e?(S(!1),M("negative"),I(p(vl.nameErrorTxt))):S(!0)}),[p]),J=(0,n.useCallback)((e=>{O(!1),B(void 0),R("");const t=/^(19|20)\d\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])$/.test(e);t?O(t):(O(t),B("negative"),R(p(vl.dateErrorTxt)))}),[p]),X=(0,n.useCallback)((e=>{W(!1),K(void 0),Y("");const t=/^(?!666|000|9\d{2})\d{3}-(?!00)\d{2}-(?!0{4})\d{4}$/.test(e);t?W(t):(W(t),K("negative"),Y(p(vl.socialErrorTxt)))}),[p]),ee=d&&!V||!g||!x||!A,te=(0,n.useCallback)((e=>{const t=e.currentTarget.value;r(t),Z(t)}),[r,Z]),re=(0,n.useCallback)((e=>{const t=e.currentTarget.value;a(t),Q(t)}),[a,Q]),ne=(0,n.useCallback)((e=>{const t=e.currentTarget.value;c(t),J(t)}),[c,J]),ie=(0,n.useCallback)((e=>{const t=e.currentTarget.value;u(t),X(t)}),[u,X]);return(0,s.jsxs)(ot.VStack,{gap:1,children:[(0,s.jsx)(lt.Box,{spacingBottom:2,children:(0,s.jsx)(go.TextTitle2,{as:"h2",children:p(vl.verifyTitle)})}),(0,s.jsx)(lt.Box,{spacingBottom:3,children:(0,s.jsx)(gt.TextBody,{as:"p",children:p(vl.verifyQuestionsPrompt)})}),(0,s.jsxs)(ot.VStack,{gap:2,children:[(0,s.jsx)(co.TextInput,{variant:v,helperText:b,value:t,onChange:te,label:p(vl.nameLabel),placeholder:p(vl.firstNamePlaceholder),type:"text",autoComplete:"off"}),(0,s.jsx)(co.TextInput,{variant:D,helperText:E,value:i,onChange:re,placeholder:p(vl.familyNamePlaceholder),type:"text",autoComplete:"off"})]}),(0,s.jsx)(lt.Box,{children:(0,s.jsx)(co.TextInput,{variant:L,helperText:U,value:o,onChange:ne,type:"date",label:p(vl.dobLabel),autoComplete:"off"})}),d&&(0,s.jsx)(lt.Box,{children:(0,s.jsx)(co.TextInput,{helperText:z,variant:G,onChange:ie,value:l,label:p(vl.socialSecurity),placeholder:p(vl.socialPlaceholder),autoComplete:"off"})}),(0,s.jsx)(lt.Box,{spacingTop:4,children:(0,s.jsx)(ze.Button,{disabled:ee,onPress:e,block:!0,children:p(vl.continue)})})]})})),Tl=(0,A.vU)({notVerifiedTitle:{id:"FailedPageOne.notVerifiedTitle",defaultMessage:"We couldn't verify your information",description:"Title of the first attempt failure page after security questions"},notVerifiedDescription:{id:"FailedPageOne.verifiedDescription",defaultMessage:"Please make sure that your info matches the personal info on your account exactly.",description:"Description letting users know double check the info they provided that it is correct"},uploadID:{id:"FailedPageOne.uploadID",defaultMessage:"Upload",description:"Button to take the user to the ID upload page to try the other recovery method"},retry:{id:"FailedPageOne.retry",defaultMessage:"Retry",description:"Button to let users attempt the process again"},needHelp:{id:"FailedPageOne.needHelp",defaultMessage:"Need help? {placeholder}",description:"Let users know they can press the blue words to contact customer service"},helpPlaceholder:{id:"FailedPageOne.PageOne",defaultMessage:"Contact us.",description:"Link within the need help text for users to click on to reach out to coinbase"}}),xl=(0,n.memo)((function({handleRetry:e}){const t=(0,P.Z)().formatMessage,r=(0,n.useMemo)((()=>({placeholder:(0,s.jsx)(Se.TextBody,{color:"primary",as:"label",children:t(Tl.helpPlaceholder)})})),[t]);return(0,s.jsxs)(o.VStack,{width:"100%",gap:4,alignItems:"center",children:[(0,s.jsxs)(o.VStack,{width:"100%",gap:2,children:[(0,s.jsx)(lt.Box,{children:(0,s.jsx)(Se.TextTitle2,{as:"h1",children:t(Tl.notVerifiedTitle)})}),(0,s.jsx)(lt.Box,{children:(0,s.jsx)(Se.TextBody,{as:"p",children:t(Tl.notVerifiedDescription)})})]}),(0,s.jsx)(lt.Box,{width:"100%",children:(0,s.jsx)(Te.Button,{onPress:e,block:!0,children:t(Tl.retry)})}),(0,s.jsx)(lt.Box,{width:"100%",children:(0,s.jsx)(Te.Button,{variant:"secondary",onPress:e,block:!0,children:t(Tl.uploadID)})}),(0,s.jsx)(lt.Box,{minHeight:"60%",alignItems:"center",children:(0,s.jsx)(Se.TextBody,{as:"p",children:t(Tl.needHelp,r)})})]})})),Sl=(0,A.vU)({notVerifiedTitle:{id:"FailedPageTwo.notVerifiedTitle",defaultMessage:"We couldn't verify your information",description:"Title of the second attempt failure page after security questions"},failedAttemptTwoDescription:{id:"FailedPageTwo.failedAttemptTwoDescription",defaultMessage:"The information you provided doesn't match the information we have on file. Please contact our Customer Support team.",description:"Let users know the information they entered does not match what we have in our system and to reach out to CX"},contactUs:{id:"FailedPageTwo.contactUs",defaultMessage:"Contact us.",description:"Button to allow users to reach out to coinbase via customer service"},toSignIn:{id:"FailedPageTwo.toSignIn",defaultMessage:"Back to sign in",description:"Button to take users to the sign in page"}}),kl=(0,n.memo)((function(){const e=(0,P.Z)().formatMessage,t=(0,n.useCallback)((()=>{}),[]),r=(0,n.useCallback)((()=>{}),[]);return(0,s.jsxs)(o.VStack,{width:"100%",gap:4,alignItems:"center",children:[(0,s.jsx)(lt.Box,{children:(0,s.jsx)(xe.HeroSquare,{name:"verifyInfo"})}),(0,s.jsxs)(o.VStack,{width:"100%",alignItems:"center",gap:2,children:[(0,s.jsx)(lt.Box,{children:(0,s.jsx)(Se.TextTitle2,{as:"h1",children:e(Sl.notVerifiedTitle)})}),(0,s.jsx)(lt.Box,{children:(0,s.jsx)(Se.TextBody,{align:"center",as:"p",children:e(Sl.failedAttemptTwoDescription)})})]}),(0,s.jsx)(lt.Box,{width:"100%",children:(0,s.jsx)(Te.Button,{onPress:t,block:!0,children:e(Sl.contactUs)})}),(0,s.jsx)(lt.Box,{width:"100%",children:(0,s.jsx)(Te.Button,{variant:"secondary",onPress:r,block:!0,children:e(Sl.toSignIn)})})]})})),El=(0,A.vU)({title:{id:"PendingPage.title",defaultMessage:" ... we are verifying your questions",description:"Place holder for loading page"}}),Il=(0,n.memo)((function(){const e=(0,P.Z)().formatMessage;return(0,s.jsxs)(ot.VStack,{spacingStart:3,spacingBottom:4,children:[(0,s.jsx)(hs,{size:240,testID:"idv-pending-loader"}),(0,s.jsx)(Se.TextTitle2,{as:"h2",align:"center",children:e(El.title)})]})})),Cl=(0,n.memo)((function({status:e,handleRetry:t}){const r=(0,n.useMemo)((()=>{if(!e)return null;switch(e){case w.U5.FAILED:return(0,s.jsx)(xl,{handleRetry:t});case w.U5.UNKNOWN:return(0,s.jsx)(kl,{});case w.U5.PENDING:default:return(0,s.jsx)(Il,{})}}),[t,e]);return(0,s.jsx)(lt.Box,{width:"100%",height:"100%",children:r})})),Dl=(0,n.memo)((function(){const e=bl(),t=e.step,r=e.status,i=e.setSecurtityStep,a=e.handleRetryFlow,c=e.handleSubmitQuestions,l=function(){const e=Eo((0,n.useState)([]),2),t=e[0],r=e[1],i=Ds(),a=i.loadingChallenge,o=i.challengeError,s=i.challengeTwoFactor,c=i.handleChallengeError,l=(0,n.useCallback)((async()=>{const e=await s();e?.securityQuestion?.questions?r(e.securityQuestion.questions):o&&c(o)}),[o,s,c]);(0,n.useEffect)((()=>{l()}),[l]);const u=(0,n.useMemo)((()=>Boolean(t.find((e=>"SECURITY_QUESTION_ID_SSN"===e.id)))),[t]),d=(0,n.useMemo)((()=>t.find((e=>"SECURITY_QUESTION_ID_PASSPORT"===e.id||"SECURITY_QUESTION_ID_NATIONAL_ID"===e.id||"SECURITY_QUESTION_ID_DRIVING_LICENSE"===e.id))?.id),[t]);return{loadingChallenge:a,securityQuestionList:t,challengeQuestionList:l,hasSocialSecurityNo:u,userIdCardType:d}}(),u=l.loadingChallenge,d=l.hasSocialSecurityNo,p=l.userIdCardType,f=function(e,t){const r=Eo((0,n.useState)(""),2),i=r[0],a=r[1],o=Eo((0,n.useState)(""),2),s=o[0],c=o[1],l=Eo((0,n.useState)(""),2),u=l[0],d=l[1],p=Eo((0,n.useState)(""),2),f=p[0],g=p[1],h=Eo((0,n.useState)(),2),m=h[0],b=h[1],y=(0,n.useCallback)((e=>{a(e)}),[]),_=(0,n.useCallback)((e=>{c(e)}),[]),v=(0,n.useCallback)((e=>{d(e)}),[]),w=(0,n.useCallback)((e=>{g(e)}),[]),T=(0,n.useCallback)((e=>{b(e)}),[]),x=(0,n.useMemo)((()=>[t?{questionId:"SECURITY_QUESTION_ID_SSN",answer:f}:{questionId:"SECURITY_QUESTION_ID_NATIONAL_ID",answer:f},{questionId:"SECURITY_QUESTION_ID_DATE_OF_BIRTH",answer:u},{questionId:"SECURITY_QUESTION_ID_FIRST_NAME",answer:i},{questionId:"SECURITY_QUESTION_ID_LAST_NAME",answer:s},{questionId:e,answer:m}]),[u,s,i,t,m,f,e]);return{firstName:i,updateFirstName:y,familyName:s,updateFamilyName:_,dob:u,updateDob:v,socialSecurity:f,updateSocialSecurity:w,idNumber:m,updateIdNumber:T,payload:x}}(p,d),g=f.firstName,h=f.updateFirstName,m=f.familyName,b=f.updateFamilyName,y=f.dob,_=f.updateDob,v=f.socialSecurity,w=f.updateSocialSecurity,T=f.idNumber,x=f.updateIdNumber,S=f.payload,k=(0,n.useMemo)((()=>{switch(t){case"security_questions":return(0,s.jsx)(wl,{firstName:g,updateFirstName:h,familyName:m,updateFamilyName:b,dob:y,updateDob:_,socialSecurity:v,updateSocialSecurity:w,handleContinue:i,hasSocialSecurityNo:d});case"identity_card_number":return(0,s.jsx)(_l,{userIdCardType:p,idNumber:T,updateIdNumber:x,handleSubmit:c,payload:S});case"status":return(0,s.jsx)(Cl,{status:r,handleRetry:a});default:return null}}),[t,g,h,m,b,y,_,v,w,i,d,p,T,x,c,S,r,a]);return(0,s.jsx)(js,{loading:u,error:"",onReload:a,children:(0,s.jsx)(o.VStack,{children:k})})}));const Ml=(0,A.vU)({title:{id:"WhatsAppBanner.title",defaultMessage:"We sent this code through WhatsApp",description:"Title that informs the user a code was sent using WhatsApp messaging"},description:{id:"WhatsAppBanner.description",defaultMessage:"If you don’t want to use WhatsApp or don’t have a WhatsApp account, you can resend code as an SMS",description:"Informs the user that they can attempt to resend the code using SMS"}}),jl=(0,n.memo)((function(){const e=(0,Ke.useSpectrum)(),t=(0,P.Z)().formatMessage,r=(0,n.useMemo)((()=>"light"===e?"#F5FFFB":"#00331E"),[e]);return(0,s.jsx)(o.Box,{spacingVertical:2,spacingHorizontal:3,testID:"whatsapp-banner",children:(0,s.jsxs)(o.HStack,{spacing:2,borderColor:"line",borderRadius:"standard",dangerouslySetBackground:r,children:[(0,s.jsx)("img",{src:ho,alt:"WhatsApp Logo",width:20,height:20}),(0,s.jsxs)(o.VStack,{spacingStart:2,children:[(0,s.jsx)(Se.TextHeadline,{as:"p",color:"foreground",children:t(Ml.title)}),(0,s.jsx)(Se.TextBody,{as:"p",color:"foregroundMuted",children:t(Ml.description)})]})]})})})),Al=(0,A.vU)({title:{id:"SMSInputCode.title",defaultMessage:"Enter the 7-digit code we texted to {phoneNumber}",description:"Title for the SMS Code Input screen prompting user to input code"},description:{id:"SMSInputCode.description",defaultMessage:"This helps us keep your account secure by verifying that it’s really you.",description:"Description for the SMS Code Input screen explaining the reason for requiring 2FA"},rateLimitWarning:{id:"SMSInputCode.rateLimitWarning",defaultMessage:"That’s too many attempts. Wait a few minutes before trying again, or click Try Another Way for more options.",description:"Rate limit warning that advises user to wait for a few minutes, or use the Try Another Way menu for more options"}}),Pl=(0,n.memo)((function(){const e=(0,P.Z)().formatMessage,t=Ds(),r=t.twoFactorMethod,i=t.challengeError,a=t.challengeMetadata,c=Vs(),l=(0,n.useMemo)((()=>i?.type===be.D1.TooManyRequests),[i]),u=(a?.sms??{}).providerName;return(0,s.jsxs)(o.VStack,{testID:"sms-input-code",children:["WhatsApp"===u&&(0,s.jsx)(jl,{}),(0,s.jsx)(Ls,{title:e(Al.title,{phoneNumber:c(r)}),description:e(Al.description)}),l&&(0,s.jsx)(Gs,{spacingBottom:3,testID:"sms-input-code-warning",children:e(Al.rateLimitWarning)}),(0,s.jsx)(fc,{codeLength:7,twoFactorType:w.Y6.SMS,errorTestID:"sms-input-code-error"}),(0,s.jsx)($s,{twoFactorType:w.Y6.SMS,startWithCooldown:!0})]})}));function Ol(){return`${Qo().apiHost}${ic}`}const Fl=(0,A.vU)({updatePhoneNumberTitle:{id:"SMSTryAnotherWay.updatePhoneNumberTitle",defaultMessage:"Update your phone number",description:"Title for the SMS Try Another Way option to update phone number"},updatePhoneNumberDescription:{id:"SMSTryAnotherWay.updatePhoneNumberDescription",defaultMessage:"New number? Verify your identity and change it here.",description:"Description for the SMS Try Another Way option to verify identity and update phone number"}}),Ul=(0,n.memo)((function({onCloseDrawer:e}){const t=(0,P.Z)().formatMessage,r=Ol(),i=es(j.T9.LegacyAccountRecovery),a=(0,n.useMemo)((()=>({title:t(Fl.updatePhoneNumberTitle),description:t(Fl.updatePhoneNumberDescription)})),[t]),o=nc({showDefaultIDVOption:i,idvOption:(0,n.useMemo)((()=>Mo(Mo({},a),{},{id:qo.SMSUpdatePhoneNumber2dot0})),[a]),legacyRecoveryOption:(0,n.useMemo)((()=>Mo(Mo({},a),{},{id:qo.SMSUpdatePhoneNumberLegacy,to:r,openBlankWindow:!1})),[a,r])}),c=oc().HELP_OPTION_URLS,l=(0,n.useMemo)((()=>({id:qo.SMSTroubleshoot,to:c[w.Y6.SMS]})),[c]);return(0,s.jsx)(tc,{onCloseDrawer:e,twoFactorType:w.Y6.SMS,alternateTwoFactorOptions:o,troubleshootOption:l,testID:"sms-try-another-way"})})),Rl=(0,n.memo)((function(){return function(){const e=Ds(),t=e.challengeError,r=e.challengeTwoFactor,i=e.handleChallengeError;(0,n.useEffect)((()=>{r()}),[r]),(0,n.useEffect)((()=>{if(t){const e=t.type!==be.D1.TooManyRequests;i(t,e)}}),[t,i])}(),(0,s.jsx)(Rs,{BaseView:Pl,DrawerView:Ul,toggleTestID:"sms-toggle-help-button",twoFactorType:w.Y6.SMS})}));const Nl=(0,A.vU)({title:{id:"TOTPInputCode.title",defaultMessage:"Enter the 6-digit code from your authenticator app",description:"Title for the TOTP Code Input screen prompting user to input code"},description:{id:"TOTPInputCode.description",defaultMessage:"This helps us keep your account secure by verifying that it’s really you.",description:"Description for the TOTP Code Input screen explaining the reason for requiring 2FA"}}),Ll=(0,n.memo)((function(){const e=(0,P.Z)().formatMessage;return(0,s.jsxs)(o.VStack,{testID:"totp-input-code",children:[(0,s.jsx)(Ls,{title:e(Nl.title),description:e(Nl.description)}),(0,s.jsx)(fc,{codeLength:6,twoFactorType:w.Y6.TOTP,errorTestID:"totp-input-code-error"})]})})),Bl=(0,A.vU)({updateAuthenticatorAppTitle:{id:"TOTPTryAnotherWay.updateAuthenticatorAppTitle",defaultMessage:"Update your authenticator app",description:"Title for the TOTP Try Another Way option to update authenticator app"},updateAuthenticatorAppDescription:{id:"TOTPTryAnotherWay.updateAuthenticatorAppDescription",defaultMessage:"New authenticator app? Verify your identity and change it here.",description:"Description for the TOTP Try Another Way option to verify identity and update authenticator app"}}),ql=(0,n.memo)((function({onCloseDrawer:e}){const t=(0,P.Z)().formatMessage,r=Ol(),i=es(j.T9.LegacyAccountRecovery),a=(0,n.useMemo)((()=>({title:t(Bl.updateAuthenticatorAppTitle),description:t(Bl.updateAuthenticatorAppDescription)})),[t]),o=nc({showDefaultIDVOption:i,idvOption:(0,n.useMemo)((()=>Mo(Mo({},a),{},{id:qo.TOTPUpdateAuthenticatorApp2dot0})),[a]),legacyRecoveryOption:(0,n.useMemo)((()=>Mo(Mo({},a),{},{id:qo.TOTPUpdateAuthenticatorAppLegacy,to:r,openBlankWindow:!1})),[a,r])}),c=oc().HELP_OPTION_URLS,l=(0,n.useMemo)((()=>({id:qo.TOTPTroubleshoot,to:c[w.Y6.TOTP]})),[c]);return(0,s.jsx)(tc,{onCloseDrawer:e,twoFactorType:w.Y6.TOTP,alternateTwoFactorOptions:o,troubleshootOption:l,testID:"totp-try-another-way"})})),Vl=(0,n.memo)((function(){return function(){const e=Ds(),t=e.challengeTwoFactor,r=e.challengeError,i=e.handleChallengeError;(0,n.useEffect)((()=>{t()}),[t]),(0,n.useEffect)((()=>{r&&i(r)}),[r,i])}(),(0,s.jsx)(Rs,{BaseView:Ll,DrawerView:ql,toggleTestID:"totp-toggle-help-button",twoFactorType:w.Y6.TOTP})}));function Wl(e){return e.toLowerCase().replace(/_/g,"-")}function $l(){const e=Eo((0,n.useState)(!1),2),t=e[0],r=e[1],i=Ds(),a=i.challengeTwoFactor,o=i.challengeError,s=i.handleChallengeError,l=i.handleVerifySuccess,u=i.handleVerifyError,d=function(){const e=Eo((0,n.useState)(!1),2),t=e[0],r=e[1],i=Eo((0,n.useState)(),2),a=i[0],o=i[1],s=(0,U.yl)(),l=ts(),u=ns(),d=u.getTwoFactorError,p=u.parseTwoFactorApiError,f=vs(),g=f.isMockEnv,h=f.isMSW,m=(0,n.useCallback)((async e=>{if(!navigator.credentials)return{error:d(be.D1.U2FIncompatibleBrowser)};let t;try{t=Mo(Mo({},e),{},{challenge:E(e?.challenge??""),allowCredentials:e?.allowCredentials?.map((e=>Mo(Mo({},e),{},{type:Wl(e?.type??""),id:E(e?.id??"")}))),userVerification:e?.userVerification?Wl(e.userVerification):void 0})}catch(e){return{error:d(be.D1.U2FFetchPublicKeyError,e)}}return new Promise((e=>{navigator.credentials.get({publicKey:t}).then((t=>{try{if(!t)return void e({error:d(be.D1.U2FMissingCredentialsError)});const r=t,n=r.response;e({credentials:{id:k(r.rawId),clientDataJson:k(n.clientDataJSON),authenticatorData:k(n.authenticatorData),signature:k(n.signature),userHandle:n.userHandle?k(n.userHandle):""}})}catch(t){e({error:d(be.D1.U2FUnknowError,t)})}})).catch((t=>{e({error:d(be.D1.U2FCredentialError,t)})}))}))}),[d]);return{loading:t,error:a,verifyU2F:(0,n.useCallback)((async e=>{if(r(!0),h||g)return r(!1),o(void 0),window.confirm("Please confirm your security key")?`2FAPT~${k(new Uint8Array(26))}`:null;const t=await m(e),n=t.credentials,i=t.error;if(i)return r(!1),o(i),null;const a=Mo(Mo({},l),{},{u2f:n}),u=await s(a);if(r(!1),u instanceof Error){const e=p(u);return o(e),null}return o(void 0),u.proofToken??c}),[s,m,l,p,h,g])}}(),p=d.error,f=d.verifyU2F;(0,n.useEffect)((()=>{o&&s(o)}),[o,s]),(0,n.useEffect)((()=>{p&&u(p)}),[p,u]);return{authenticateKey:(0,n.useCallback)((async()=>{r(!0);const e=await a(),t=e?.u2f;if(!t)return void r(!1);const n=await f(t);Wo(n)?l(n):r(!1)}),[a,l,f]),loading:t}}const zl=(0,A.vU)({title:{id:"U2FConnectKeys.title",defaultMessage:"Connect your security key and tap it",description:"Title for the U2F Connect Key screen prompting user to connect security key"},description:{id:"U2FConnectKeys.description",defaultMessage:"This helps us keep your account secure by verifying that it’s really you.",description:"Description for U2F Connect Key screen explaining the reason for requiring 2FA"},verify:{id:"U2FConnectKeys.verify",defaultMessage:"Verify",description:"Button text to start the process of verifying a security key"}}),Yl=(0,n.memo)((function(){const e=Xo().logEvent,t=(0,P.Z)().formatMessage,r=$l(),i=r.authenticateKey,a=r.loading,c=(0,n.useCallback)((()=>{e(No.TwoFactorClickButton,{action:M.Us.click,componentType:M.re.button,button_type:Lo.U2FVerify}),i()}),[i,e]);return(0,n.useEffect)((()=>{(0,ve.Dt)()||(0,ve.gn)()||i()}),[i]),(0,s.jsxs)(o.VStack,{testID:"u2f-connect-key",flexGrow:1,children:[(0,s.jsx)(Ls,{title:t(zl.title),description:t(zl.description)}),(0,s.jsxs)(Te.ButtonGroup,{vertical:!0,accessibilityLabel:"Validation Actions",children:[(0,s.jsx)(Hs,{twoFactorType:w.Y6.U2F}),(0,s.jsx)(Te.Button,{block:!0,variant:"primary",onPress:c,loading:a,testID:"u2f-verify-button",children:t(zl.verify)})]})]})})),Hl=(0,A.vU)({updateKeyTitle:{id:"U2FTryAnotherWay.updateKeyTitle",defaultMessage:"Update your security key",description:"Title for the U2F Try Another Way option to update security key"},updateKeySupportDescription:{id:"U2FTryAnotherWay.updateKeySupportDescription",defaultMessage:"New security key? Contact our support team to change it.",description:"Description for the U2F Try Another Way option to contact support team and update security key"},updateKeyVerifyDescription:{id:"U2FTryAnotherWay.updateKeyVerifyDescription",defaultMessage:"New security key? Verify your identity and change it here.",description:"Description for the U2F Try Another Way option to verify identity and update security key"}}),Gl=(0,n.memo)((function({onCloseDrawer:e}){const t=(0,P.Z)().formatMessage,r=es(j.T9.LegacyAccountRecovery),i=(0,n.useMemo)((()=>({title:t(Hl.updateKeyTitle)})),[t]),a=(0,n.useMemo)((()=>Mo(Mo({},i),{},{id:qo.U2FUpdateKey2dot0,description:t(Hl.updateKeyVerifyDescription)})),[i,t]),o=oc(),c=o.HELP_OPTION_URLS,l=o.U2F_CONTACT_SUPPORT_LEGACY_URL,u=(0,n.useMemo)((()=>({id:qo.U2FTroubleshoot,to:c[w.Y6.U2F]})),[c]),d=nc({showDefaultIDVOption:r,idvOption:a,legacyRecoveryOption:(0,n.useMemo)((()=>Mo(Mo({},i),{},{id:qo.U2FUpdateKeySupport,description:t(Hl.updateKeySupportDescription),to:l})),[l,i,t])});return(0,s.jsx)(tc,{onCloseDrawer:e,twoFactorType:w.Y6.U2F,alternateTwoFactorOptions:d,troubleshootOption:u,testID:"u2f-try-another-way"})})),Kl=(0,n.memo)((function(){return(0,s.jsx)(Rs,{BaseView:Yl,DrawerView:Gl,toggleTestID:"u2f-toggle-help-button",twoFactorType:w.Y6.U2F})}));function Zl(){const e=Eo((0,n.useState)(!1),2),t=e[0],r=e[1],i=Eo((0,n.useState)(),2),o=i[0],s=i[1],c=ns().getTwoFactorError,l=(0,a.Ge)(),u=l.activate,d=l.account,p=l.deactivate,f=l.library,g=(0,n.useCallback)((()=>{p()}),[p]),h=(0,n.useCallback)((async e=>{r(!0);try{await u(e,void 0,!0);const t=await e.getAccount();return r(!1),s(void 0),t}catch(e){return s(c(be.D1.WalletConnectionFailed)),g(),null}finally{r(!1)}}),[u,c,g]),m=(0,n.useCallback)((async e=>{if(d&&f){r(!0);try{const t=await f.getSigner(d).signMessage(e);return s(void 0),t}catch(e){e instanceof Error&&s(c(be.D1.WalletSignatureDenied))}finally{r(!1)}}}),[d,f,c]);return{loading:t,disconnect:g,connectWallet:h,signMessage:m,error:o}}const Ql=new mo._k({supportedChainIds:[1]}),Jl=new bo.zw({bridge:"https://bridge.walletconnect.org",qrcode:!0}),Xl={coinbaseWallet:{wallet:new yo.J({url:"https://coinbase.com",appName:"Coinbase"}),asset:"https://static-assets.coinbase.com/coinbase/coinbase-logo-round.svg"},walletConnect:{wallet:Jl,asset:"https://static-assets.coinbase.com/international/walletconnect.png"},browserWalletExtensions:{wallet:Ql,asset:"https://static-assets.coinbase.com/international/otherWallet.png"}},eu=(0,A.vU)({title:{id:"WalletConnect.title",defaultMessage:"Connect your wallet using one of the providers below.",description:"Title for the Wallet Connection screen instructing user to connect their wallet using a provider"},description:{id:"WalletConnect.description",defaultMessage:"Your wallet signature can be used to prove your identity.",description:"Description for the Wallet Connection screen explaining the reason for connecting a wallet"}}),tu=(0,A.vU)({coinbaseWallet:{defaultMessage:"Coinbase Wallet",description:"Coinbase Wallet"},walletConnect:{defaultMessage:"WalletConnect",description:"WalletConnect"},browserWalletExtensions:{defaultMessage:"Browser Wallet Extensions",description:"Browser wallet extensions"}}),ru=(0,n.memo)((function({onAdvanceStep:e,onComplete:t,onError:r}){const i=(0,P.Z)().formatMessage,a=Zl(),c=a.loading,l=a.connectWallet,u=a.error,d=r=>async()=>{const n=Xl[r].wallet;e("CONNECTING");const i=await l(n);if(i)return e("CONNECTED"),void t(i);e("NOT_CONNECTED")};return(0,n.useEffect)((()=>{u&&r(u)}),[u,r]),(0,s.jsxs)(o.VStack,{testID:"wallet-connect",children:[(0,s.jsx)(Ls,{title:i(eu.title),description:i(eu.description),spacingBottom:1}),(0,s.jsx)(o.Divider,{spacingVertical:2}),(0,s.jsx)(o.VStack,{gap:0,children:Object.keys(Xl).map((e=>{const t=Xl[e].asset;return(0,s.jsx)(Ge.ListCell,{disabled:c,testID:`test-${e}`,description:(0,s.jsx)(Se.TextHeadline,{as:"span",children:i(tu[e])}),onPress:d(e),media:(0,s.jsx)(Ge.CellMedia,{type:"asset",source:t,title:e}),accessory:"arrow"},e)}))})]})})),nu=(0,n.memo)((function({messageToSign:e,onAdvanceStep:t,onComplete:r,onError:i}){const a=Zl(),c=a.signMessage,l=a.loading,u=a.error,d=ns().getTwoFactorError,p=(0,n.useCallback)((async()=>{if(e){t("SIGNING");try{const t=await c(e);t&&r(t)}catch(e){const t=d(be.D1.UnknownError);i(t)}}}),[e,c,t,r,d,i]);return(0,n.useEffect)((()=>{e&&p()}),[e,p]),(0,n.useEffect)((()=>{u&&i(u)}),[u,i]),(0,s.jsxs)(o.VStack,{testID:"wallet-sign",children:[(0,s.jsx)(Ls,{title:"Sign the message we sent with your wallet",description:"We'll use your signature to verify your identity",spacingBottom:1}),(0,s.jsx)(o.Divider,{}),(0,s.jsx)(ms,{}),(0,s.jsx)(o.Box,{spacingTop:5,children:(0,s.jsx)(Te.Button,{block:!0,variant:"secondary",disabled:l,onPress:p,testID:"resend-wallet-message",children:"Resend Message"})})]})})),iu=(0,n.memo)((function({onCloseDrawer:e}){const t=nc({showDefaultIDVOption:!1}),r=oc().HELP_OPTION_URLS,i=(0,n.useMemo)((()=>({id:qo.WalletTroubleshoot,to:r[w.Y6.WALLET]})),[r]);return(0,s.jsx)(tc,{onCloseDrawer:e,twoFactorType:w.Y6.WALLET,alternateTwoFactorOptions:t,troubleshootOption:i,testID:"wallet-try-another-way"})})),au=[be.D1.WalletConnectionFailed,be.D1.WalletSignatureDenied],ou=(0,n.memo)((function(){const e=Eo((0,n.useState)(),2),t=e[0],r=e[1],i=Eo((0,n.useState)(),2),o=i[0],l=i[1],u=function(){const e=Eo((0,n.useState)("NOT_CONNECTED"),2),t=e[0],r=e[1],i=(0,a.Ge)().deactivate,o=(0,n.useCallback)((e=>{r(e)}),[]);return{step:t,handleResetWallet:(0,n.useCallback)((()=>{i(),r("NOT_CONNECTED")}),[i]),handleAdvanceStep:o}}(),d=u.handleAdvanceStep,p=Zl(),f=p.loading,g=p.disconnect,h=function(){const e=Eo((0,n.useState)(),2),t=e[0],r=e[1],i=Ds().handleChallengeError,a=is(),o=a.challengeTwoFactor,s=a.loading,c=a.error,l=(0,n.useCallback)((async e=>{const t=await o({secondFactorType:w.Y6.WALLET,wallet:{address:e}});return r(t?.wallet?.message),t?.wallet?.message}),[o]);return(0,n.useEffect)((()=>{if(c){const e=c.type!==be.D1.WalletMismatch;i(c,e)}}),[c,i]),{challenge:l,messageToSign:t,loading:s,error:c}}(),m=h.challenge,b=h.loading,y=function(){const e=Eo((0,n.useState)(!1),2),t=e[0],r=e[1],i=Eo((0,n.useState)(),2),a=i[0],o=i[1],s=(0,U.yl)(),l=ts(),u=ns().parseTwoFactorApiError;return{loading:t,error:a,verify:(0,n.useCallback)((async e=>{r(!0);const t=l;t.wallet={signedMessage:e};const n=await s(t);if(r(!1),n instanceof Error){const e=u(n);return o(e),null}return o(void 0),n.proofToken??c}),[l,s,u])}}(),_=y.verify,v=y.loading,T=y.error,x=as().handleError,S=Ds().handleVerifySuccess,k=(0,n.useCallback)((e=>{t!==e&&(au.includes(e.type)?x(e,!0):r(e))}),[t,x]),E=(0,n.useCallback)((()=>{g(),l(void 0),r(void 0),d("NOT_CONNECTED")}),[g,d]),I=(0,n.useCallback)((async e=>{const t=await m(e);l(t)}),[m]),C=(0,n.useCallback)((async e=>{const t=await _(e);Wo(t)&&S(t)}),[_,S]),D=(0,n.useCallback)((()=>o&&""!==o?(0,s.jsx)(nu,{messageToSign:o,onComplete:C,onAdvanceStep:d,onError:k}):(0,s.jsx)(ru,{onAdvanceStep:d,onComplete:I,onError:k})),[o,d,I,C,k]);(0,n.useEffect)((()=>{T&&k(T)}),[T,k]);const M=(0,n.useMemo)((()=>f??b??v),[f,b,v]);return(0,s.jsx)(js,{loading:M,onReload:E,error:t?.message,children:(0,s.jsx)(Rs,{BaseView:D,DrawerView:iu,twoFactorType:w.Y6.WALLET,toggleTestID:"wallet-toggle-help-button"})})}));const su=(0,n.memo)((function(){const e=Ds().twoFactorMethod,t=function(){const e=Ds(),t=e.twoFactorMethod,r=e.loadingEnabled,i=e.enabledError,a=e.enabledTwoFactorOptions,o=e.getEnabledTwoFactor,s=as().handleError,c=Xo(),l=c.logEvent,u=c.logMetric,d=Qo().featureFlags;(0,n.useEffect)((()=>{o()}),[o]);const p=(0,n.useCallback)(((e,t)=>{l(No.TwoFactorLoad,Mo(Mo({},t),{},{action:M.Us.render,componentType:M.re.page,result:e}))}),[l]),f=(0,n.useCallback)((e=>{u("getAllEnabled",{result:e})}),[u]);return(0,n.useEffect)((()=>{l(No.TwoFactorFeatureFlags,{action:M.Us.measurement,componentType:M.re.page,featureFlags:d})}),[l,d]),(0,n.useEffect)((()=>{if(a){const e=a?.map((e=>e?.methods?.map((e=>e.type))));p(j.x4.Success,{options:JSON.stringify(e),num_options:a.length}),f(j.x4.Success)}}),[a,p,f]),(0,n.useEffect)((()=>{i&&(s(i,!1),p(j.x4.Failure,{error_type:i.type}),f(j.x4.Failure))}),[i,s,p,f]),{loading:(0,n.useMemo)((()=>r||!i&&!t),[t,r,i]),handleReload:o,error:i}}(),r=t.loading,i=t.error,a=t.handleReload;!function(){const e=Ds(),t=e.proofToken,r=e.twoFactorMethod,i=$o().onSuccess,a=(0,n.useRef)(!1);(0,n.useEffect)((()=>{if(Wo(t)&&r?.type&&!a.current){const e=x[r.type];i(t,e),a.current=!0}}),[i,t,r])}();const o=(0,n.useMemo)((()=>{if(r)return null;switch(e?.type){case w.Y6.NO_2FA:case w.Y6.BYPASS:return(0,s.jsx)(Hc,{});case w.Y6.IDV:case w.Y6.RECOVERY_CODE:return(0,s.jsx)(Yc,{});case w.Y6.SMS:return(0,s.jsx)(Rl,{});case w.Y6.TOTP:return(0,s.jsx)(Vl,{});case w.Y6.U2F:return(0,s.jsx)(Kl,{});case w.Y6.DEVICE_VERIFICATION:return(0,s.jsx)(lc,{});case w.Y6.EMAIL:return(0,s.jsx)(_c,{});case w.Y6.PUSH:return(0,s.jsx)(ml,{});case w.Y6.WALLET:return(0,s.jsx)(ou,{});case w.Y6.PASSWORD:return(0,s.jsx)(tl,{});case w.Y6.SECURITY_QUESTION:return(0,s.jsx)(Dl,{})}return(0,s.jsx)(Ms,{})}),[r,e]);return(0,s.jsx)(js,{loading:r,onReload:a,error:i?.message,children:o})}));function cu(e){const t=new i.Q(e);return t.pollingInterval=12e3,t}u.loggingPrefix=`${Oo}:`;const lu=(0,n.memo)((function(e){return(0,s.jsx)(Ro,{clientProps:e,children:(0,s.jsx)(Ao,Mo(Mo({},e.rootBoxProps),{},{children:(0,s.jsx)(_s,{children:(0,s.jsx)(ks,{children:(0,s.jsx)(Cs,{children:(0,s.jsx)(xs,{children:(0,s.jsx)(a.Ht,{getLibrary:cu,children:(0,s.jsx)(gs,{children:(0,s.jsx)(su,{})})})})})})})}))})}))},7898:e=>{"use strict";for(var t="qpzry9x8gf2tvdw0s3jn54khce6mua7l",r={},n=0;n<32;n++){var i=t.charAt(n);if(void 0!==r[i])throw new TypeError(i+" is ambiguous");r[i]=n}function a(e){var t=e>>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function o(e){for(var t=1,r=0;r126)return"Invalid prefix ("+e+")";t=a(t)^n>>5}for(t=a(t),r=0;rt)return"Exceeds length limit";var n=e.toLowerCase(),i=e.toUpperCase();if(e!==n&&e!==i)return"Mixed-case string "+e;var s=(e=n).lastIndexOf("1");if(-1===s)return"No separator character for "+e;if(0===s)return"Missing prefix for "+e;var c=e.slice(0,s),l=e.slice(s+1);if(l.length<6)return"Data too short";var u=o(c);if("string"==typeof u)return u;for(var d=[],p=0;p=l.length||d.push(g)}return 1!==u?"Invalid checksum for "+e:{prefix:c,words:d}}function c(e,t,r,n){for(var i=0,a=0,o=(1<=r;)a-=r,s.push(i>>a&o);if(n)a>0&&s.push(i<=t)return"Excess padding";if(i<n)throw new TypeError("Exceeds length limit");var i=o(e=e.toLowerCase());if("string"==typeof i)throw new Error(i);for(var s=e+"1",c=0;c>5!=0)throw new Error("Non 5-bit word");i=a(i)^l,s+=t.charAt(l)}for(c=0;c<6;++c)i=a(i);for(i^=1,c=0;c<6;++c){s+=t.charAt(i>>5*(5-c)&31)}return s},toWordsUnsafe:function(e){var t=c(e,8,5,!0);if(Array.isArray(t))return t},toWords:function(e){var t=c(e,8,5,!0);if(Array.isArray(t))return t;throw new Error(t)},fromWordsUnsafe:function(e){var t=c(e,5,8,!1);if(Array.isArray(t))return t},fromWords:function(e){var t=c(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}}},7762:function(e,t,r){var n;e=r.nmd(e),function(){var i,a="Expected a function",o="__lodash_hash_undefined__",s="__lodash_placeholder__",c=16,l=32,u=64,d=128,p=256,f=1/0,g=9007199254740991,h=NaN,m=4294967295,b=[["ary",d],["bind",1],["bindKey",2],["curry",8],["curryRight",c],["flip",512],["partial",l],["partialRight",u],["rearg",p]],y="[object Arguments]",_="[object Array]",v="[object Boolean]",w="[object Date]",T="[object Error]",x="[object Function]",S="[object GeneratorFunction]",k="[object Map]",E="[object Number]",I="[object Object]",C="[object Promise]",D="[object RegExp]",M="[object Set]",j="[object String]",A="[object Symbol]",P="[object WeakMap]",O="[object ArrayBuffer]",F="[object DataView]",U="[object Float32Array]",R="[object Float64Array]",N="[object Int8Array]",L="[object Int16Array]",B="[object Int32Array]",q="[object Uint8Array]",V="[object Uint8ClampedArray]",W="[object Uint16Array]",$="[object Uint32Array]",z=/\b__p \+= '';/g,Y=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,G=/&(?:amp|lt|gt|quot|#39);/g,K=/[&<>"']/g,Z=RegExp(G.source),Q=RegExp(K.source),J=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,re=/^\w*$/,ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ie=/[\\^$.*+?()[\]{}|]/g,ae=RegExp(ie.source),oe=/^\s+/,se=/\s/,ce=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,le=/\{\n\/\* \[wrapped with (.+)\] \*/,ue=/,? & /,de=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,pe=/[()=,{}\[\]\/\s]/,fe=/\\(\\)?/g,ge=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,me=/^[-+]0x[0-9a-f]+$/i,be=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,_e=/^0o[0-7]+$/i,ve=/^(?:0|[1-9]\d*)$/,we=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Te=/($^)/,xe=/['\n\r\u2028\u2029\\]/g,Se="\\ud800-\\udfff",ke="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ee="\\u2700-\\u27bf",Ie="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",De="\\ufe0e\\ufe0f",Me="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",je="['’]",Ae="["+Se+"]",Pe="["+Me+"]",Oe="["+ke+"]",Fe="\\d+",Ue="["+Ee+"]",Re="["+Ie+"]",Ne="[^"+Se+Me+Fe+Ee+Ie+Ce+"]",Le="\\ud83c[\\udffb-\\udfff]",Be="[^"+Se+"]",qe="(?:\\ud83c[\\udde6-\\uddff]){2}",Ve="[\\ud800-\\udbff][\\udc00-\\udfff]",We="["+Ce+"]",$e="\\u200d",ze="(?:"+Re+"|"+Ne+")",Ye="(?:"+We+"|"+Ne+")",He="(?:['’](?:d|ll|m|re|s|t|ve))?",Ge="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ke="(?:"+Oe+"|"+Le+")"+"?",Ze="["+De+"]?",Qe=Ze+Ke+("(?:"+$e+"(?:"+[Be,qe,Ve].join("|")+")"+Ze+Ke+")*"),Je="(?:"+[Ue,qe,Ve].join("|")+")"+Qe,Xe="(?:"+[Be+Oe+"?",Oe,qe,Ve,Ae].join("|")+")",et=RegExp(je,"g"),tt=RegExp(Oe,"g"),rt=RegExp(Le+"(?="+Le+")|"+Xe+Qe,"g"),nt=RegExp([We+"?"+Re+"+"+He+"(?="+[Pe,We,"$"].join("|")+")",Ye+"+"+Ge+"(?="+[Pe,We+ze,"$"].join("|")+")",We+"?"+ze+"+"+He,We+"+"+Ge,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Fe,Je].join("|"),"g"),it=RegExp("["+$e+Se+ke+De+"]"),at=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ot=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],st=-1,ct={};ct[U]=ct[R]=ct[N]=ct[L]=ct[B]=ct[q]=ct[V]=ct[W]=ct[$]=!0,ct[y]=ct[_]=ct[O]=ct[v]=ct[F]=ct[w]=ct[T]=ct[x]=ct[k]=ct[E]=ct[I]=ct[D]=ct[M]=ct[j]=ct[P]=!1;var lt={};lt[y]=lt[_]=lt[O]=lt[F]=lt[v]=lt[w]=lt[U]=lt[R]=lt[N]=lt[L]=lt[B]=lt[k]=lt[E]=lt[I]=lt[D]=lt[M]=lt[j]=lt[A]=lt[q]=lt[V]=lt[W]=lt[$]=!0,lt[T]=lt[x]=lt[P]=!1;var ut={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},dt=parseFloat,pt=parseInt,ft="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,gt="object"==typeof self&&self&&self.Object===Object&&self,ht=ft||gt||Function("return this")(),mt=t&&!t.nodeType&&t,bt=mt&&e&&!e.nodeType&&e,yt=bt&&bt.exports===mt,_t=yt&&ft.process,vt=function(){try{var e=bt&&bt.require&&bt.require("util").types;return e||_t&&_t.binding&&_t.binding("util")}catch(e){}}(),wt=vt&&vt.isArrayBuffer,Tt=vt&&vt.isDate,xt=vt&&vt.isMap,St=vt&&vt.isRegExp,kt=vt&&vt.isSet,Et=vt&&vt.isTypedArray;function It(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Ct(e,t,r,n){for(var i=-1,a=null==e?0:e.length;++i-1}function Ot(e,t,r){for(var n=-1,i=null==e?0:e.length;++n-1;);return r}function nr(e,t){for(var r=e.length;r--&&Wt(t,e[r],0)>-1;);return r}var ir=Gt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),ar=Gt({"&":"&","<":"<",">":">",'"':""","'":"'"});function or(e){return"\\"+ut[e]}function sr(e){return it.test(e)}function cr(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function lr(e,t){return function(r){return e(t(r))}}function ur(e,t){for(var r=-1,n=e.length,i=0,a=[];++r",""":'"',"'":"'"});var br=function e(t){var r,n=(t=null==t?ht:br.defaults(ht.Object(),t,br.pick(ht,ot))).Array,se=t.Date,Se=t.Error,ke=t.Function,Ee=t.Math,Ie=t.Object,Ce=t.RegExp,De=t.String,Me=t.TypeError,je=n.prototype,Ae=ke.prototype,Pe=Ie.prototype,Oe=t["__core-js_shared__"],Fe=Ae.toString,Ue=Pe.hasOwnProperty,Re=0,Ne=(r=/[^.]+$/.exec(Oe&&Oe.keys&&Oe.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Le=Pe.toString,Be=Fe.call(Ie),qe=ht._,Ve=Ce("^"+Fe.call(Ue).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),We=yt?t.Buffer:i,$e=t.Symbol,ze=t.Uint8Array,Ye=We?We.allocUnsafe:i,He=lr(Ie.getPrototypeOf,Ie),Ge=Ie.create,Ke=Pe.propertyIsEnumerable,Ze=je.splice,Qe=$e?$e.isConcatSpreadable:i,Je=$e?$e.iterator:i,Xe=$e?$e.toStringTag:i,rt=function(){try{var e=pa(Ie,"defineProperty");return e({},"",{}),e}catch(e){}}(),it=t.clearTimeout!==ht.clearTimeout&&t.clearTimeout,ut=se&&se.now!==ht.Date.now&&se.now,ft=t.setTimeout!==ht.setTimeout&&t.setTimeout,gt=Ee.ceil,mt=Ee.floor,bt=Ie.getOwnPropertySymbols,_t=We?We.isBuffer:i,vt=t.isFinite,Bt=je.join,Gt=lr(Ie.keys,Ie),yr=Ee.max,_r=Ee.min,vr=se.now,wr=t.parseInt,Tr=Ee.random,xr=je.reverse,Sr=pa(t,"DataView"),kr=pa(t,"Map"),Er=pa(t,"Promise"),Ir=pa(t,"Set"),Cr=pa(t,"WeakMap"),Dr=pa(Ie,"create"),Mr=Cr&&new Cr,jr={},Ar=Na(Sr),Pr=Na(kr),Or=Na(Er),Fr=Na(Ir),Ur=Na(Cr),Rr=$e?$e.prototype:i,Nr=Rr?Rr.valueOf:i,Lr=Rr?Rr.toString:i;function Br(e){if(rs(e)&&!zo(e)&&!(e instanceof $r)){if(e instanceof Wr)return e;if(Ue.call(e,"__wrapped__"))return La(e)}return new Wr(e)}var qr=function(){function e(){}return function(t){if(!ts(t))return{};if(Ge)return Ge(t);e.prototype=t;var r=new e;return e.prototype=i,r}}();function Vr(){}function Wr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function $r(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function zr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function ln(e,t,r,n,a,o){var s,c=1&t,l=2&t,u=4&t;if(r&&(s=a?r(e,n,a,o):r(e)),s!==i)return s;if(!ts(e))return e;var d=zo(e);if(d){if(s=function(e){var t=e.length,r=new e.constructor(t);t&&"string"==typeof e[0]&&Ue.call(e,"index")&&(r.index=e.index,r.input=e.input);return r}(e),!c)return Mi(e,s)}else{var p=ha(e),f=p==x||p==S;if(Ko(e))return Si(e,c);if(p==I||p==y||f&&!a){if(s=l||f?{}:ba(e),!c)return l?function(e,t){return ji(e,ga(e),t)}(e,function(e,t){return e&&ji(t,Ps(t),e)}(s,e)):function(e,t){return ji(e,fa(e),t)}(e,an(s,e))}else{if(!lt[p])return a?e:{};s=function(e,t,r){var n=e.constructor;switch(t){case O:return ki(e);case v:case w:return new n(+e);case F:return function(e,t){var r=t?ki(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case U:case R:case N:case L:case B:case q:case V:case W:case $:return Ei(e,r);case k:return new n;case E:case j:return new n(e);case D:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case M:return new n;case A:return i=e,Nr?Ie(Nr.call(i)):{}}var i}(e,p,c)}}o||(o=new Kr);var g=o.get(e);if(g)return g;o.set(e,s),ss(e)?e.forEach((function(n){s.add(ln(n,t,r,n,e,o))})):ns(e)&&e.forEach((function(n,i){s.set(i,ln(n,t,r,i,e,o))}));var h=d?i:(u?l?aa:ia:l?Ps:As)(e);return Dt(h||e,(function(n,i){h&&(n=e[i=n]),tn(s,i,ln(n,t,r,i,e,o))})),s}function un(e,t,r){var n=r.length;if(null==e)return!n;for(e=Ie(e);n--;){var a=r[n],o=t[a],s=e[a];if(s===i&&!(a in e)||!o(s))return!1}return!0}function dn(e,t,r){if("function"!=typeof e)throw new Me(a);return ja((function(){e.apply(i,r)}),t)}function pn(e,t,r,n){var i=-1,a=Pt,o=!0,s=e.length,c=[],l=t.length;if(!s)return c;r&&(t=Ft(t,Xt(r))),n?(a=Ot,o=!1):t.length>=200&&(a=tr,o=!1,t=new Gr(t));e:for(;++i-1},Yr.prototype.set=function(e,t){var r=this.__data__,n=rn(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Hr.prototype.clear=function(){this.size=0,this.__data__={hash:new zr,map:new(kr||Yr),string:new zr}},Hr.prototype.delete=function(e){var t=ua(this,e).delete(e);return this.size-=t?1:0,t},Hr.prototype.get=function(e){return ua(this,e).get(e)},Hr.prototype.has=function(e){return ua(this,e).has(e)},Hr.prototype.set=function(e,t){var r=ua(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Gr.prototype.add=Gr.prototype.push=function(e){return this.__data__.set(e,o),this},Gr.prototype.has=function(e){return this.__data__.has(e)},Kr.prototype.clear=function(){this.__data__=new Yr,this.size=0},Kr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Kr.prototype.get=function(e){return this.__data__.get(e)},Kr.prototype.has=function(e){return this.__data__.has(e)},Kr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Yr){var n=r.__data__;if(!kr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Hr(n)}return r.set(e,t),this.size=r.size,this};var fn=Oi(wn),gn=Oi(Tn,!0);function hn(e,t){var r=!0;return fn(e,(function(e,n,i){return r=!!t(e,n,i)})),r}function mn(e,t,r){for(var n=-1,a=e.length;++n0&&r(s)?t>1?yn(s,t-1,r,n,i):Ut(i,s):n||(i[i.length]=s)}return i}var _n=Fi(),vn=Fi(!0);function wn(e,t){return e&&_n(e,t,As)}function Tn(e,t){return e&&vn(e,t,As)}function xn(e,t){return At(t,(function(t){return Jo(e[t])}))}function Sn(e,t){for(var r=0,n=(t=vi(t,e)).length;null!=e&&rt}function Cn(e,t){return null!=e&&Ue.call(e,t)}function Dn(e,t){return null!=e&&t in Ie(e)}function Mn(e,t,r){for(var a=r?Ot:Pt,o=e[0].length,s=e.length,c=s,l=n(s),u=1/0,d=[];c--;){var p=e[c];c&&t&&(p=Ft(p,Xt(t))),u=_r(p.length,u),l[c]=!r&&(t||o>=120&&p.length>=120)?new Gr(c&&p):i}p=e[0];var f=-1,g=l[0];e:for(;++f=s?c:c*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}))}function Yn(e,t,r){for(var n=-1,i=t.length,a={};++n-1;)s!==e&&Ze.call(s,c,1),Ze.call(e,c,1);return e}function Gn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==a){var a=i;_a(i)?Ze.call(e,i,1):pi(e,i)}}return e}function Kn(e,t){return e+mt(Tr()*(t-e+1))}function Zn(e,t){var r="";if(!e||t<1||t>g)return r;do{t%2&&(r+=e),(t=mt(t/2))&&(e+=e)}while(t);return r}function Qn(e,t){return Aa(Ia(e,t,ic),e+"")}function Jn(e){return Qr(qs(e))}function Xn(e,t){var r=qs(e);return Fa(r,cn(t,0,r.length))}function ei(e,t,r,n){if(!ts(e))return e;for(var a=-1,o=(t=vi(t,e)).length,s=o-1,c=e;null!=c&&++aa?0:a+t),(r=r>a?a:r)<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var o=n(a);++i>>1,o=e[a];null!==o&&!ls(o)&&(r?o<=t:o=200){var l=t?null:Zi(e);if(l)return dr(l);o=!1,i=tr,c=new Gr}else c=t?[]:s;e:for(;++n=n?e:ii(e,t,r)}var xi=it||function(e){return ht.clearTimeout(e)};function Si(e,t){if(t)return e.slice();var r=e.length,n=Ye?Ye(r):new e.constructor(r);return e.copy(n),n}function ki(e){var t=new e.constructor(e.byteLength);return new ze(t).set(new ze(e)),t}function Ei(e,t){var r=t?ki(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Ii(e,t){if(e!==t){var r=e!==i,n=null===e,a=e==e,o=ls(e),s=t!==i,c=null===t,l=t==t,u=ls(t);if(!c&&!u&&!o&&e>t||o&&s&&l&&!c&&!u||n&&s&&l||!r&&l||!a)return 1;if(!n&&!o&&!u&&e1?r[a-1]:i,s=a>2?r[2]:i;for(o=e.length>3&&"function"==typeof o?(a--,o):i,s&&va(r[0],r[1],s)&&(o=a<3?i:o,a=1),t=Ie(t);++n-1?a[o?t[s]:s]:i}}function Bi(e){return na((function(t){var r=t.length,n=r,o=Wr.prototype.thru;for(e&&t.reverse();n--;){var s=t[n];if("function"!=typeof s)throw new Me(a);if(o&&!c&&"wrapper"==sa(s))var c=new Wr([],!0)}for(n=c?n:r;++n1&&v.reverse(),f&&u<_&&(v.length=u),this&&this!==ht&&this instanceof d&&(E=y||Ni(E)),E.apply(k,v)}}function Vi(e,t){return function(r,n){return function(e,t,r,n){return wn(e,(function(e,i,a){t(n,r(e),i,a)})),n}(r,e,t(n),{})}}function Wi(e,t){return function(r,n){var a;if(r===i&&n===i)return t;if(r!==i&&(a=r),n!==i){if(a===i)return n;"string"==typeof r||"string"==typeof n?(r=ui(r),n=ui(n)):(r=li(r),n=li(n)),a=e(r,n)}return a}}function $i(e){return na((function(t){return t=Ft(t,Xt(la())),Qn((function(r){var n=this;return e(t,(function(e){return It(e,n,r)}))}))}))}function zi(e,t){var r=(t=t===i?" ":ui(t)).length;if(r<2)return r?Zn(t,e):t;var n=Zn(t,gt(e/fr(t)));return sr(t)?Ti(gr(n),0,e).join(""):n.slice(0,e)}function Yi(e){return function(t,r,a){return a&&"number"!=typeof a&&va(t,r,a)&&(r=a=i),t=gs(t),r===i?(r=t,t=0):r=gs(r),function(e,t,r,i){for(var a=-1,o=yr(gt((t-e)/(r||1)),0),s=n(o);o--;)s[i?o:++a]=e,e+=r;return s}(t,r,a=a===i?tc))return!1;var u=o.get(e),d=o.get(t);if(u&&d)return u==t&&d==e;var p=-1,f=!0,g=2&r?new Gr:i;for(o.set(e,t),o.set(t,e);++p-1&&e%1==0&&e1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(ce,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return Dt(b,(function(r){var n="_."+r[0];t&r[1]&&!Pt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(le);return t?t[1].split(ue):[]}(n),r)))}function Oa(e){var t=0,r=0;return function(){var n=vr(),a=16-(n-r);if(r=n,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Fa(e,t){var r=-1,n=e.length,a=n-1;for(t=t===i?n:t;++r1?e[t-1]:i;return r="function"==typeof r?(e.pop(),r):i,ao(e,r)}));function fo(e){var t=Br(e);return t.__chain__=!0,t}function go(e,t){return t(e)}var ho=na((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,a=function(t){return sn(t,e)};return!(t>1||this.__actions__.length)&&n instanceof $r&&_a(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:go,args:[a],thisArg:i}),new Wr(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(a)}));var mo=Ai((function(e,t,r){Ue.call(e,r)?++e[r]:on(e,r,1)}));var bo=Li(Wa),yo=Li($a);function _o(e,t){return(zo(e)?Dt:fn)(e,la(t,3))}function vo(e,t){return(zo(e)?Mt:gn)(e,la(t,3))}var wo=Ai((function(e,t,r){Ue.call(e,r)?e[r].push(t):on(e,r,[t])}));var To=Qn((function(e,t,r){var i=-1,a="function"==typeof t,o=Ho(e)?n(e.length):[];return fn(e,(function(e){o[++i]=a?It(t,e,r):jn(e,t,r)})),o})),xo=Ai((function(e,t,r){on(e,r,t)}));function So(e,t){return(zo(e)?Ft:Bn)(e,la(t,3))}var ko=Ai((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]}));var Eo=Qn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&va(e,t[0],t[1])?t=[]:r>2&&va(t[0],t[1],t[2])&&(t=[t[0]]),zn(e,yn(t,1),[])})),Io=ut||function(){return ht.Date.now()};function Co(e,t,r){return t=r?i:t,t=e&&null==t?e.length:t,Ji(e,d,i,i,i,i,t)}function Do(e,t){var r;if("function"!=typeof t)throw new Me(a);return e=hs(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=i),r}}var Mo=Qn((function(e,t,r){var n=1;if(r.length){var i=ur(r,ca(Mo));n|=l}return Ji(e,n,t,r,i)})),jo=Qn((function(e,t,r){var n=3;if(r.length){var i=ur(r,ca(jo));n|=l}return Ji(t,n,e,r,i)}));function Ao(e,t,r){var n,o,s,c,l,u,d=0,p=!1,f=!1,g=!0;if("function"!=typeof e)throw new Me(a);function h(t){var r=n,a=o;return n=o=i,d=t,c=e.apply(a,r)}function m(e){var r=e-u;return u===i||r>=t||r<0||f&&e-d>=s}function b(){var e=Io();if(m(e))return y(e);l=ja(b,function(e){var r=t-(e-u);return f?_r(r,s-(e-d)):r}(e))}function y(e){return l=i,g&&n?h(e):(n=o=i,c)}function _(){var e=Io(),r=m(e);if(n=arguments,o=this,u=e,r){if(l===i)return function(e){return d=e,l=ja(b,t),p?h(e):c}(u);if(f)return xi(l),l=ja(b,t),h(u)}return l===i&&(l=ja(b,t)),c}return t=bs(t)||0,ts(r)&&(p=!!r.leading,s=(f="maxWait"in r)?yr(bs(r.maxWait)||0,t):s,g="trailing"in r?!!r.trailing:g),_.cancel=function(){l!==i&&xi(l),d=0,n=u=o=l=i},_.flush=function(){return l===i?c:y(Io())},_}var Po=Qn((function(e,t){return dn(e,1,t)})),Oo=Qn((function(e,t,r){return dn(e,bs(t)||0,r)}));function Fo(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Me(a);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(Fo.Cache||Hr),r}function Uo(e){if("function"!=typeof e)throw new Me(a);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Fo.Cache=Hr;var Ro=wi((function(e,t){var r=(t=1==t.length&&zo(t[0])?Ft(t[0],Xt(la())):Ft(yn(t,1),Xt(la()))).length;return Qn((function(n){for(var i=-1,a=_r(n.length,r);++i=t})),$o=An(function(){return arguments}())?An:function(e){return rs(e)&&Ue.call(e,"callee")&&!Ke.call(e,"callee")},zo=n.isArray,Yo=wt?Xt(wt):function(e){return rs(e)&&En(e)==O};function Ho(e){return null!=e&&es(e.length)&&!Jo(e)}function Go(e){return rs(e)&&Ho(e)}var Ko=_t||bc,Zo=Tt?Xt(Tt):function(e){return rs(e)&&En(e)==w};function Qo(e){if(!rs(e))return!1;var t=En(e);return t==T||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!as(e)}function Jo(e){if(!ts(e))return!1;var t=En(e);return t==x||t==S||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xo(e){return"number"==typeof e&&e==hs(e)}function es(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=g}function ts(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function rs(e){return null!=e&&"object"==typeof e}var ns=xt?Xt(xt):function(e){return rs(e)&&ha(e)==k};function is(e){return"number"==typeof e||rs(e)&&En(e)==E}function as(e){if(!rs(e)||En(e)!=I)return!1;var t=He(e);if(null===t)return!0;var r=Ue.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Fe.call(r)==Be}var os=St?Xt(St):function(e){return rs(e)&&En(e)==D};var ss=kt?Xt(kt):function(e){return rs(e)&&ha(e)==M};function cs(e){return"string"==typeof e||!zo(e)&&rs(e)&&En(e)==j}function ls(e){return"symbol"==typeof e||rs(e)&&En(e)==A}var us=Et?Xt(Et):function(e){return rs(e)&&es(e.length)&&!!ct[En(e)]};var ds=Hi(Ln),ps=Hi((function(e,t){return e<=t}));function fs(e){if(!e)return[];if(Ho(e))return cs(e)?gr(e):Mi(e);if(Je&&e[Je])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Je]());var t=ha(e);return(t==k?cr:t==M?dr:qs)(e)}function gs(e){return e?(e=bs(e))===f||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function hs(e){var t=gs(e),r=t%1;return t==t?r?t-r:t:0}function ms(e){return e?cn(hs(e),0,m):0}function bs(e){if("number"==typeof e)return e;if(ls(e))return h;if(ts(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ts(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Jt(e);var r=be.test(e);return r||_e.test(e)?pt(e.slice(2),r?2:8):me.test(e)?h:+e}function ys(e){return ji(e,Ps(e))}function _s(e){return null==e?"":ui(e)}var vs=Pi((function(e,t){if(Sa(t)||Ho(t))ji(t,As(t),e);else for(var r in t)Ue.call(t,r)&&tn(e,r,t[r])})),ws=Pi((function(e,t){ji(t,Ps(t),e)})),Ts=Pi((function(e,t,r,n){ji(t,Ps(t),e,n)})),xs=Pi((function(e,t,r,n){ji(t,As(t),e,n)})),Ss=na(sn);var ks=Qn((function(e,t){e=Ie(e);var r=-1,n=t.length,a=n>2?t[2]:i;for(a&&va(t[0],t[1],a)&&(n=1);++r1),t})),ji(e,aa(e),r),n&&(r=ln(r,7,ta));for(var i=t.length;i--;)pi(r,t[i]);return r}));var Rs=na((function(e,t){return null==e?{}:function(e,t){return Yn(e,t,(function(t,r){return Cs(e,r)}))}(e,t)}));function Ns(e,t){if(null==e)return{};var r=Ft(aa(e),(function(e){return[e]}));return t=la(t),Yn(e,r,(function(e,r){return t(e,r[0])}))}var Ls=Qi(As),Bs=Qi(Ps);function qs(e){return null==e?[]:er(e,As(e))}var Vs=Ri((function(e,t,r){return t=t.toLowerCase(),e+(r?Ws(t):t)}));function Ws(e){return Qs(_s(e).toLowerCase())}function $s(e){return(e=_s(e))&&e.replace(we,ir).replace(tt,"")}var zs=Ri((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Ys=Ri((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Hs=Ui("toLowerCase");var Gs=Ri((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}));var Ks=Ri((function(e,t,r){return e+(r?" ":"")+Qs(t)}));var Zs=Ri((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Qs=Ui("toUpperCase");function Js(e,t,r){return e=_s(e),(t=r?i:t)===i?function(e){return at.test(e)}(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.match(de)||[]}(e):e.match(t)||[]}var Xs=Qn((function(e,t){try{return It(e,i,t)}catch(e){return Qo(e)?e:new Se(e)}})),ec=na((function(e,t){return Dt(t,(function(t){t=Ra(t),on(e,t,Mo(e[t],e))})),e}));function tc(e){return function(){return e}}var rc=Bi(),nc=Bi(!0);function ic(e){return e}function ac(e){return Un("function"==typeof e?e:ln(e,1))}var oc=Qn((function(e,t){return function(r){return jn(r,e,t)}})),sc=Qn((function(e,t){return function(r){return jn(e,r,t)}}));function cc(e,t,r){var n=As(t),i=xn(t,n);null!=r||ts(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=xn(t,As(t)));var a=!(ts(r)&&"chain"in r&&!r.chain),o=Jo(e);return Dt(i,(function(r){var n=t[r];e[r]=n,o&&(e.prototype[r]=function(){var t=this.__chain__;if(a||t){var r=e(this.__wrapped__);return(r.__actions__=Mi(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,Ut([this.value()],arguments))})})),e}function lc(){}var uc=$i(Ft),dc=$i(jt),pc=$i(Lt);function fc(e){return wa(e)?Ht(Ra(e)):function(e){return function(t){return Sn(t,e)}}(e)}var gc=Yi(),hc=Yi(!0);function mc(){return[]}function bc(){return!1}var yc=Wi((function(e,t){return e+t}),0),_c=Ki("ceil"),vc=Wi((function(e,t){return e/t}),1),wc=Ki("floor");var Tc,xc=Wi((function(e,t){return e*t}),1),Sc=Ki("round"),kc=Wi((function(e,t){return e-t}),0);return Br.after=function(e,t){if("function"!=typeof t)throw new Me(a);return e=hs(e),function(){if(--e<1)return t.apply(this,arguments)}},Br.ary=Co,Br.assign=vs,Br.assignIn=ws,Br.assignInWith=Ts,Br.assignWith=xs,Br.at=Ss,Br.before=Do,Br.bind=Mo,Br.bindAll=ec,Br.bindKey=jo,Br.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return zo(e)?e:[e]},Br.chain=fo,Br.chunk=function(e,t,r){t=(r?va(e,t,r):t===i)?1:yr(hs(t),0);var a=null==e?0:e.length;if(!a||t<1)return[];for(var o=0,s=0,c=n(gt(a/t));oa?0:a+r),(n=n===i||n>a?a:hs(n))<0&&(n+=a),n=r>n?0:ms(n);r>>0)?(e=_s(e))&&("string"==typeof t||null!=t&&!os(t))&&!(t=ui(t))&&sr(e)?Ti(gr(e),0,r):e.split(t,r):[]},Br.spread=function(e,t){if("function"!=typeof e)throw new Me(a);return t=null==t?0:yr(hs(t),0),Qn((function(r){var n=r[t],i=Ti(r,0,t);return n&&Ut(i,n),It(e,this,i)}))},Br.tail=function(e){var t=null==e?0:e.length;return t?ii(e,1,t):[]},Br.take=function(e,t,r){return e&&e.length?ii(e,0,(t=r||t===i?1:hs(t))<0?0:t):[]},Br.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?ii(e,(t=n-(t=r||t===i?1:hs(t)))<0?0:t,n):[]},Br.takeRightWhile=function(e,t){return e&&e.length?gi(e,la(t,3),!1,!0):[]},Br.takeWhile=function(e,t){return e&&e.length?gi(e,la(t,3)):[]},Br.tap=function(e,t){return t(e),e},Br.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new Me(a);return ts(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Ao(e,t,{leading:n,maxWait:t,trailing:i})},Br.thru=go,Br.toArray=fs,Br.toPairs=Ls,Br.toPairsIn=Bs,Br.toPath=function(e){return zo(e)?Ft(e,Ra):ls(e)?[e]:Mi(Ua(_s(e)))},Br.toPlainObject=ys,Br.transform=function(e,t,r){var n=zo(e),i=n||Ko(e)||us(e);if(t=la(t,4),null==r){var a=e&&e.constructor;r=i?n?new a:[]:ts(e)&&Jo(a)?qr(He(e)):{}}return(i?Dt:wn)(e,(function(e,n,i){return t(r,e,n,i)})),r},Br.unary=function(e){return Co(e,1)},Br.union=to,Br.unionBy=ro,Br.unionWith=no,Br.uniq=function(e){return e&&e.length?di(e):[]},Br.uniqBy=function(e,t){return e&&e.length?di(e,la(t,2)):[]},Br.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?di(e,i,t):[]},Br.unset=function(e,t){return null==e||pi(e,t)},Br.unzip=io,Br.unzipWith=ao,Br.update=function(e,t,r){return null==e?e:fi(e,t,_i(r))},Br.updateWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:fi(e,t,_i(r),n)},Br.values=qs,Br.valuesIn=function(e){return null==e?[]:er(e,Ps(e))},Br.without=oo,Br.words=Js,Br.wrap=function(e,t){return No(_i(t),e)},Br.xor=so,Br.xorBy=co,Br.xorWith=lo,Br.zip=uo,Br.zipObject=function(e,t){return bi(e||[],t||[],tn)},Br.zipObjectDeep=function(e,t){return bi(e||[],t||[],ei)},Br.zipWith=po,Br.entries=Ls,Br.entriesIn=Bs,Br.extend=ws,Br.extendWith=Ts,cc(Br,Br),Br.add=yc,Br.attempt=Xs,Br.camelCase=Vs,Br.capitalize=Ws,Br.ceil=_c,Br.clamp=function(e,t,r){return r===i&&(r=t,t=i),r!==i&&(r=(r=bs(r))==r?r:0),t!==i&&(t=(t=bs(t))==t?t:0),cn(bs(e),t,r)},Br.clone=function(e){return ln(e,4)},Br.cloneDeep=function(e){return ln(e,5)},Br.cloneDeepWith=function(e,t){return ln(e,5,t="function"==typeof t?t:i)},Br.cloneWith=function(e,t){return ln(e,4,t="function"==typeof t?t:i)},Br.conformsTo=function(e,t){return null==t||un(e,t,As(t))},Br.deburr=$s,Br.defaultTo=function(e,t){return null==e||e!=e?t:e},Br.divide=vc,Br.endsWith=function(e,t,r){e=_s(e),t=ui(t);var n=e.length,a=r=r===i?n:cn(hs(r),0,n);return(r-=t.length)>=0&&e.slice(r,a)==t},Br.eq=qo,Br.escape=function(e){return(e=_s(e))&&Q.test(e)?e.replace(K,ar):e},Br.escapeRegExp=function(e){return(e=_s(e))&&ae.test(e)?e.replace(ie,"\\$&"):e},Br.every=function(e,t,r){var n=zo(e)?jt:hn;return r&&va(e,t,r)&&(t=i),n(e,la(t,3))},Br.find=bo,Br.findIndex=Wa,Br.findKey=function(e,t){return qt(e,la(t,3),wn)},Br.findLast=yo,Br.findLastIndex=$a,Br.findLastKey=function(e,t){return qt(e,la(t,3),Tn)},Br.floor=wc,Br.forEach=_o,Br.forEachRight=vo,Br.forIn=function(e,t){return null==e?e:_n(e,la(t,3),Ps)},Br.forInRight=function(e,t){return null==e?e:vn(e,la(t,3),Ps)},Br.forOwn=function(e,t){return e&&wn(e,la(t,3))},Br.forOwnRight=function(e,t){return e&&Tn(e,la(t,3))},Br.get=Is,Br.gt=Vo,Br.gte=Wo,Br.has=function(e,t){return null!=e&&ma(e,t,Cn)},Br.hasIn=Cs,Br.head=Ya,Br.identity=ic,Br.includes=function(e,t,r,n){e=Ho(e)?e:qs(e),r=r&&!n?hs(r):0;var i=e.length;return r<0&&(r=yr(i+r,0)),cs(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&Wt(e,t,r)>-1},Br.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:hs(r);return i<0&&(i=yr(n+i,0)),Wt(e,t,i)},Br.inRange=function(e,t,r){return t=gs(t),r===i?(r=t,t=0):r=gs(r),function(e,t,r){return e>=_r(t,r)&&e=-9007199254740991&&e<=g},Br.isSet=ss,Br.isString=cs,Br.isSymbol=ls,Br.isTypedArray=us,Br.isUndefined=function(e){return e===i},Br.isWeakMap=function(e){return rs(e)&&ha(e)==P},Br.isWeakSet=function(e){return rs(e)&&"[object WeakSet]"==En(e)},Br.join=function(e,t){return null==e?"":Bt.call(e,t)},Br.kebabCase=zs,Br.last=Za,Br.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var a=n;return r!==i&&(a=(a=hs(r))<0?yr(n+a,0):_r(a,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,a):Vt(e,zt,a,!0)},Br.lowerCase=Ys,Br.lowerFirst=Hs,Br.lt=ds,Br.lte=ps,Br.max=function(e){return e&&e.length?mn(e,ic,In):i},Br.maxBy=function(e,t){return e&&e.length?mn(e,la(t,2),In):i},Br.mean=function(e){return Yt(e,ic)},Br.meanBy=function(e,t){return Yt(e,la(t,2))},Br.min=function(e){return e&&e.length?mn(e,ic,Ln):i},Br.minBy=function(e,t){return e&&e.length?mn(e,la(t,2),Ln):i},Br.stubArray=mc,Br.stubFalse=bc,Br.stubObject=function(){return{}},Br.stubString=function(){return""},Br.stubTrue=function(){return!0},Br.multiply=xc,Br.nth=function(e,t){return e&&e.length?$n(e,hs(t)):i},Br.noConflict=function(){return ht._===this&&(ht._=qe),this},Br.noop=lc,Br.now=Io,Br.pad=function(e,t,r){e=_s(e);var n=(t=hs(t))?fr(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return zi(mt(i),r)+e+zi(gt(i),r)},Br.padEnd=function(e,t,r){e=_s(e);var n=(t=hs(t))?fr(e):0;return t&&nt){var n=e;e=t,t=n}if(r||e%1||t%1){var a=Tr();return _r(e+a*(t-e+dt("1e-"+((a+"").length-1))),t)}return Kn(e,t)},Br.reduce=function(e,t,r){var n=zo(e)?Rt:Kt,i=arguments.length<3;return n(e,la(t,4),r,i,fn)},Br.reduceRight=function(e,t,r){var n=zo(e)?Nt:Kt,i=arguments.length<3;return n(e,la(t,4),r,i,gn)},Br.repeat=function(e,t,r){return t=(r?va(e,t,r):t===i)?1:hs(t),Zn(_s(e),t)},Br.replace=function(){var e=arguments,t=_s(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Br.result=function(e,t,r){var n=-1,a=(t=vi(t,e)).length;for(a||(a=1,e=i);++ng)return[];var r=m,n=_r(e,m);t=la(t),e-=m;for(var i=Qt(n,t);++r=o)return e;var c=r-fr(n);if(c<1)return n;var l=s?Ti(s,0,c).join(""):e.slice(0,c);if(a===i)return l+n;if(s&&(c+=l.length-c),os(a)){if(e.slice(c).search(a)){var u,d=l;for(a.global||(a=Ce(a.source,_s(he.exec(a))+"g")),a.lastIndex=0;u=a.exec(d);)var p=u.index;l=l.slice(0,p===i?c:p)}}else if(e.indexOf(ui(a),c)!=c){var f=l.lastIndexOf(a);f>-1&&(l=l.slice(0,f))}return l+n},Br.unescape=function(e){return(e=_s(e))&&Z.test(e)?e.replace(G,mr):e},Br.uniqueId=function(e){var t=++Re;return _s(e)+t},Br.upperCase=Zs,Br.upperFirst=Qs,Br.each=_o,Br.eachRight=vo,Br.first=Ya,cc(Br,(Tc={},wn(Br,(function(e,t){Ue.call(Br.prototype,t)||(Tc[t]=e)})),Tc),{chain:!1}),Br.VERSION="4.17.21",Dt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Br[e].placeholder=Br})),Dt(["drop","take"],(function(e,t){$r.prototype[e]=function(r){r=r===i?1:yr(hs(r),0);var n=this.__filtered__&&!t?new $r(this):this.clone();return n.__filtered__?n.__takeCount__=_r(r,n.__takeCount__):n.__views__.push({size:_r(r,m),type:e+(n.__dir__<0?"Right":"")}),n},$r.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Dt(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;$r.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:la(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),Dt(["head","last"],(function(e,t){var r="take"+(t?"Right":"");$r.prototype[e]=function(){return this[r](1).value()[0]}})),Dt(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");$r.prototype[e]=function(){return this.__filtered__?new $r(this):this[r](1)}})),$r.prototype.compact=function(){return this.filter(ic)},$r.prototype.find=function(e){return this.filter(e).head()},$r.prototype.findLast=function(e){return this.reverse().find(e)},$r.prototype.invokeMap=Qn((function(e,t){return"function"==typeof e?new $r(this):this.map((function(r){return jn(r,e,t)}))})),$r.prototype.reject=function(e){return this.filter(Uo(la(e)))},$r.prototype.slice=function(e,t){e=hs(e);var r=this;return r.__filtered__&&(e>0||t<0)?new $r(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==i&&(r=(t=hs(t))<0?r.dropRight(-t):r.take(t-e)),r)},$r.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},$r.prototype.toArray=function(){return this.take(m)},wn($r.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),a=Br[n?"take"+("last"==t?"Right":""):t],o=n||/^find/.test(t);a&&(Br.prototype[t]=function(){var t=this.__wrapped__,s=n?[1]:arguments,c=t instanceof $r,l=s[0],u=c||zo(t),d=function(e){var t=a.apply(Br,Ut([e],s));return n&&p?t[0]:t};u&&r&&"function"==typeof l&&1!=l.length&&(c=u=!1);var p=this.__chain__,f=!!this.__actions__.length,g=o&&!p,h=c&&!f;if(!o&&u){t=h?t:new $r(this);var m=e.apply(t,s);return m.__actions__.push({func:go,args:[d],thisArg:i}),new Wr(m,p)}return g&&h?e.apply(this,s):(m=this.thru(d),g?n?m.value()[0]:m.value():m)})})),Dt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=je[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Br.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(zo(i)?i:[],e)}return this[r]((function(r){return t.apply(zo(r)?r:[],e)}))}})),wn($r.prototype,(function(e,t){var r=Br[t];if(r){var n=r.name+"";Ue.call(jr,n)||(jr[n]=[]),jr[n].push({name:t,func:r})}})),jr[qi(i,2).name]=[{name:"wrapper",func:i}],$r.prototype.clone=function(){var e=new $r(this.__wrapped__);return e.__actions__=Mi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Mi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Mi(this.__views__),e},$r.prototype.reverse=function(){if(this.__filtered__){var e=new $r(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},$r.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=zo(e),n=t<0,i=r?e.length:0,a=function(e,t,r){var n=-1,i=r.length;for(;++n=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Br.prototype.plant=function(e){for(var t,r=this;r instanceof Vr;){var n=La(r);n.__index__=0,n.__values__=i,t?a.__wrapped__=n:t=n;var a=n;r=r.__wrapped__}return a.__wrapped__=e,t},Br.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof $r){var t=e;return this.__actions__.length&&(t=new $r(this)),(t=t.reverse()).__actions__.push({func:go,args:[eo],thisArg:i}),new Wr(t,this.__chain__)}return this.thru(eo)},Br.prototype.toJSON=Br.prototype.valueOf=Br.prototype.value=function(){return hi(this.__wrapped__,this.__actions__)},Br.prototype.first=Br.prototype.head,Je&&(Br.prototype[Je]=function(){return this}),Br}();ht._=br,(n=function(){return br}.call(t,r,t,e))===i||(e.exports=n)}.call(this)},3645:()=>{},7763:()=>{}}]); //# sourceMappingURL=vendors~AccountRecovery-UpdateInformation~DepositTrigger~LinkDenebIMPS~OpenBanking~advanced-portfoli~8eb4dbc5-b62e34fb47eec5da.chunk.js.mapA Eo