1import{u as H,_ as J}from"./OenUiCard.vue_vue_type_script_setup_true_lang-de1a6980.js";import{Q as x,b as E,u as I,z as g,R,S as F,d as Z,f as K,e as Y,F as h,V as ee,j as te,k as T,J as oe,n as t,w as n,Z as ne,o as b,m as i,l as c,t as u,p as w,N as ae,$ as se,a6 as L,c as k,a7 as ie,q as re,a5 as ce,a4 as le,_ as ue}from"./index-79903d46.js";import{_ as de}from"./OenUiInputCheckbox.vue_vue_type_script_setup_true_lang-6d77d379.js";import{_ as pe}from"./XeInputRadioButtons-062be516.js";import{_ as me}from"./XeAlert-a88adcf9.js";import{_ as he}from"./OenUiCardHeader-504075f2.js";import{I as _e,a as fe,b as ve}from"./whatsapp-3ce4d0b7.js";import{u as be}from"./useMetaData-8008bae3.js";import{b as N}from"./route-block-83d24a4e.js";import"./checkmark-29f8fffe.js";import"./metaBrandName-8c88e991.js";function we(){const _=x(),r=E(),e=I(),f=g(()=>_.twoFactorAuthStatus!=="SetupRequired"),v={location:e.currentFlow,setup2FAEnabled:f.value,methodsAvailable:_.phoneNumberIsLandline?"Landline":_.verificationChannels.join(","),accountType:R().segmentAccountType};r.identify({}),f.value?r.track({eventName:F.twoFactorAuth.STARTED,properties:v}):r.track({eventName:F.twoFactorAuth.SETUP_STARTED,properties:v})}const Se={class:"type-h2"},Ae={class:"text-left"},ge={class:"whitespace-nowrap no-font-variant","data-private":""},Fe={class:"mini-card"},ye={class:"link-text-p text-left"},Ce={class:"resend"},Ve={key:0,class:"text-center mt-4"},Te={key:1,class:"text-center mt-4"},M=Z({__name:"phone-validation",setup(_){const r=I(),e=x(),f=E(),v=H(),{t:a}=K(),l=Y(),P=e.phoneNumberIsLandline?"call":"sms";r.setShowStepper(!e.useWebLogin),r.setActiveStepId(3),r.setWithoutStepperPageTitle(a("twoFactorAuth.phoneValidation.heading"));const d=h(e.previousChannel?e.previousChannel:P),p=h(!1),m=h(!1),y=h(!1),B=g(()=>e.formattedPhoneNumber),S=ee({noSmsToLandLine:!1}),U=h([{value:"sms",label:a("twoFactorAuth.phoneValidation.sms"),icon:_e,disabled:e.phoneNumberIsLandline,show:e.verificationChannels.includes("sms")},{value:"whatsapp",label:a("twoFactorAuth.phoneValidation.whatsapp"),icon:fe,disabled:e.phoneNumberIsLandline,show:e.verificationChannels.includes("whatsapp")},{value:"call",label:a("twoFactorAuth.phoneValidation.call"),icon:ve,show:e.verificationChannels.includes("sms")}]),C=g(()=>U.value.filter(o=>o.show));be("twoFactorAuth.phoneValidation"),te(()=>{var o;window.xeSession&&((o=window.xeSession.consentManager)==null||o.updateConsentState({compliance:!0})),we()});const O=async()=>{if(m.value=!0,S.noSmsToLandLine=!1,e.setRememberBrowser(p.value),e.twoFactorAuthStatus==="Locked"){l.push("/2fa/locked");return}try{const o=await e.send2FACode(d.value,!1);o.authenticationResult.success?(e.incrementSendCodeAttempts(),f.track({eventName:F.twoFactorAuth.SELECTION_COMPLETED,properties:{location:r.currentFlow,"2FAMethod":e.channelEventText,accountType:R().segmentAccountType,rememberMe:p.value}}),l.push("/2fa/verify-number")):o.authenticationResult.code==="CannotSendSMSToLandLine"?(C.value.forEach(s=>{s.value==="sms"&&(s.disabled=!0)}),d.value="whatsapp",S.noSmsToLandLine=!0,m.value=!1):(m.value=!1,l.push("/signin/error"))}catch{m.value=!1,l.push("/signin/error")}},$=async()=>{y.value=!0;try{const o=await e.send2FACode("email",!0);o.authenticationResult.success?l.push(await ie(o,!0)):l.push("/signin/error")}catch{l.push("/signin/error")}};return(o,s)=>{const D=he,q=me,V=ne("i18n-t"),W=pe,j=de,Q=re,X=ce,z=le,G=J;return b(),T(G,{sheet:"",centered:""},oe({default:n(()=>[i(se,{name:"fade"},{default:n(()=>[t(S).noSmsToLandLine?(b(),T(q,{key:0,theme:"error"},{title:n(()=>[w(u(t(a)("error.sms.title")),1)]),default:n(()=>[w(" "+u(t(a)("error.sms.body")),1)]),_:1})):ae("",!0)]),_:1}),c("p",Ae,[i(V,{keypath:"twoFactorAuth.phoneValidation.chooseMethod"},{number:n(()=>[c("strong",ge,u(t(B))+".",1)]),_:1})]),s[2]||(s[2]=c("br",null,null,-1)),i(W,{modelValue:t(d),"onUpdate:modelValue":s[0]||(s[0]=A=>L(d)?d.value=A:null),name:"channel",options:t(C)},null,8,["modelValue","options"]),c("div",Fe,[i(j,{modelValue:t(p),"onUpdate:modelValue":s[1]||(s[1]=A=>L(p)?p.value=A:null)},{default:n(()=>[c("p",ye,[i(V,{keypath:"twoFactorAuth.phoneValidation.rememberDevice"},{bold:n(()=>[c("strong",null,u(t(a)("twoFactorAuth.phoneValidation.rememberDeviceBold")),1)]),_:1})])]),_:1},8,["modelValue"])]),i(Q,{type:"submit",class:"submit-button mt-4",loading:t(m),onClick:O},{default:n(()=>[w(u(t(a)("component.button.continueText")),1)]),_:1},8,["loading"]),c("div",Ce,[t(y)===!0?(b(),k("p",Ve,[i(X,{loading:!0,class:"text-oen-ui-primary"})])):(b(),k("p",Te,[i(z,{onClick:$},{default:n(()=>[w(u(t(a)("twoFactorAuth.phoneValidation.changeNumber")),1)]),_:1})]))])]),_:2},[t(v).current!=="xs"?{name:"header",fn:n(()=>[i(D,null,{default:n(()=>[c("h1",Se,u(t(a)("twoFactorAuth.phoneValidation.heading")),1)]),_:1})]),key:"0"}:void 0]),1024)}}});typeof N=="function"&&N(M);const Oe=ue(M,[["__scopeId","data-v-1b8dc986"]]);export{Oe as default}; 2//# sourceMappingURL=phone-validation-dcdc1d3c.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.