1"use strict";(self.webpackChunkng_portal=self.webpackChunkng_portal||[]).push([[5959],{95959(Ot,X,r){r.d(X,{AddMFAModule:()=>Et});var C=r(49769),j=r(41838),M=r(25596),E=r(93049),a=r(85802),A=r(37702),$=r(87167),t=r(35547),f=r(10467),p=r(89417),h=r(2505),N=r(34640),I=r(29749),P=r(84412),v=r(21413),F=r(93207),g=r(96697),w=r(53993),D=r(84572),b=r(95416),S=r(47144),_=r(61676),U=r(4902),H=r(68314),O=r(75410),L=r(83801),y=r(62302),R=r(43740),T=r(79296),B=r(40100),G=r(88834),V=r(9183),k=r(21518),Y=r(25887);const Q=()=>({textAlign:"center"});function W(n,c){1&n&&(t.j41(0,"h3",2),t.EFF(1," A text message containing a verification code will be sent to the mobile phone number entered below. Data rates may apply. "),t.k0s())}function J(n,c){1&n&&(t.j41(0,"h3",3),t.EFF(1," Two-factor authentication adds an additional layer of security to your account by requiring more than just a password to sign in. "),t.k0s())}function K(n,c){if(1&n){const e=t.RV6();t.j41(0,"div",12)(1,"div",13)(2,"mat-icon"),t.EFF(3),t.k0s()(),t.j41(4,"div",14)(5,"div",15),t.EFF(6),t.k0s(),t.j41(7,"div"),t.EFF(8),t.k0s()(),t.j41(9,"button",16),t.bIt("click",function(){a.eBV(e);const i=t.XpG().$implicit,l=t.XpG(3);return a.Njj(l.selectMfa(i.value))}),t.EFF(10," Add "),t.k0s()()}if(2&n){const e=t.XpG().$implicit;t.R7$(3),t.JRh(e.icon),t.R7$(3),t.JRh(e.label),t.R7$(2),t.JRh(e.description),t.R7$(),t.Y8G("animationColor","white")}}function z(n,c){if(1&n&&(t.j41(0,"div",11),t.nVh(1,K,11,4,"div",12),t.k0s()),2&n){const e=c.$implicit;t.R7$(),t.vxM(e.show?1:-1)}}function Z(n,c){if(1&n&&(t.j41(0,"div",4)(1,"h3",10),t.EFF(2," Two Factor Methods "),t.k0s(),t.j41(3,"div"),t.Z7z(4,z,2,1,"div",11,t.fX1),t.k0s()()),2&n){const e=t.XpG(2);t.R7$(4),t.Dyx(e.methods)}}function q(n,c){1&n&&(t.j41(0,"mat-error"),t.EFF(1," Invalid phone number "),t.k0s())}function tt(n,c){1&n&&(t.j41(0,"div"),t.nrm(1,"mat-spinner",23),t.k0s())}function et(n,c){if(1&n){const e=t.RV6();t.j41(0,"div",5)(1,"form",17),t.bIt("ngSubmit",function(){a.eBV(e);const i=t.XpG(2);return a.Njj(i.onSMSSubmit())}),t.j41(2,"mat-form-field",18)(3,"mat-label"),t.EFF(4,"Mobile"),t.k0s(),t.j41(5,"span",19),t.EFF(6,"+1 \xa0"),t.k0s(),t.nrm(7,"input",20),t.nVh(8,q,2,0,"mat-error"),t.k0s(),t.j41(9,"div",21),t.nVh(10,tt,2,0,"div"),t.nI1(11,"async"),t.j41(12,"button",22),t.nI1(13,"async"),t.EFF(14," Send Verification Code"),t.k0s()()()()}if(2&n){const e=t.XpG(2);t.R7$(),t.Y8G("formGroup",e.smsForm),t.R7$(7),t.vxM(e.smsForm.get("phoneNumber").hasError("invalidNumber")?8:-1),t.R7$(2),t.vxM(t.bMT(11,5,e.sendingSMS$)?10:-1),t.R7$(2),t.Y8G("animationColor","white")("disabled",t.bMT(13,7,e.sendingSMS$))}}function nt(n,c){if(1&n){const e=t.RV6();t.j41(0,"div",30),t.EFF(1,"Unable to scan? You can use the "),t.j41(2,"span",31),t.bIt("click",function(){a.eBV(e);const i=t.XpG(3);return a.Njj(i.revealSecretKey())}),t.EFF(3,"setup key"),t.k0s(),t.EFF(4," to manually configure your authenticator app:"),t.k0s(),t.j41(5,"div",32)(6,"label",33),t.EFF(7,"Setup Key:"),t.k0s(),t.j41(8,"div",34),t.nrm(9,"textarea",35),t.j41(10,"button",36),t.bIt("click",function(){a.eBV(e);const i=t.XpG(3);return a.Njj(i.clipboardClicked())}),t.j41(11,"mat-icon"),t.EFF(12,"content_copy"),t.k0s()()()(),t.j41(13,"mat-form-field",37)(14,"mat-label"),t.EFF(15,"Verification code"),t.k0s(),t.j41(16,"input",38),t.mxI("ngModelChange",function(i){a.eBV(e);const l=t.XpG(3);return t.DH7(l.verificationCode,i)||(l.verificationCode=i),a.Njj(i)}),t.k0s()(),t.j41(17,"button",39),t.nI1(18,"async"),t.bIt("click",function(){const i=a.eBV(e),l=t.XpG(3);return a.Njj(l.verifyTOTPCode(i))}),t.EFF(19,"Verify"),t.k0s()}if(2&n){const e=c,o=t.XpG(3);t.R7$(5),t.Y8G("fxShow",o.showSecretKey),t.R7$(4),t.Y8G("value",e.secretKey),t.R7$(),t.Y8G("cdkCopyToClipboard",e.secretKey),t.R7$(6),t.R50("ngModel",o.verificationCode),t.R7$(),t.Y8G("disabled",t.bMT(18,5,o.verifyingCode$))}}function ot(n,c){if(1&n&&(t.j41(0,"div",6)(1,"div",24)(2,"div",25),t.nrm(3,"img",26),t.k0s(),t.j41(4,"div",27)(5,"div",28),t.EFF(6," Scan the QR code below into your Authentication App to begin generating keys. When ready, click Verify to complete enrollment."),t.k0s(),t.nrm(7,"div",29),t.nVh(8,nt,20,7),t.nI1(9,"async"),t.k0s()()()),2&n){let e;const o=t.XpG(2);t.R7$(3),t.Y8G("src",o.authImageSrc,t.B4B)("height",300)("width",400),t.R7$(5),t.vxM((e=t.bMT(9,4,o.totpSecret$))?8:-1,e)}}function it(n,c){if(1&n){const e=t.RV6();t.j41(0,"button",40),t.bIt("click",function(){a.eBV(e);const i=t.XpG(2);return a.Njj(i.optOutUser())}),t.EFF(1,"Need Help?"),t.k0s()}}function at(n,c){if(1&n){const e=t.RV6();t.j41(0,"div"),t.nVh(1,W,2,0,"h3",2)(2,J,2,0,"h3",3),t.nVh(3,Z,6,0,"div",4),t.nVh(4,et,15,9,"div",5),t.nVh(5,ot,10,6,"div",6),t.j41(6,"div",7)(7,"button",8),t.bIt("click",function(){a.eBV(e);const i=t.XpG();return a.Njj(i.backToProfile())}),t.EFF(8,"Back"),t.k0s(),t.nVh(9,it,2,0,"button",9),t.k0s()()}if(2&n){let e;const o=t.XpG();t.R7$(),t.vxM("phone"===(e=o.selectedMFAOption)?1:2),t.R7$(2),t.vxM(o.selectedMFAOption?-1:3),t.R7$(),t.vxM("phone"===o.selectedMFAOption?4:-1),t.R7$(),t.vxM(o.showTOTP&&"totp"===o.selectedMFAOption?5:-1),t.R7$(4),t.vxM(o.showHelp?9:-1)}}function rt(n,c){if(1&n&&(t.j41(0,"h3",44),t.EFF(1),t.k0s(),t.j41(2,"p",45),t.EFF(3,' If this mobile phone number is incorrect, select the "Back" button to update. '),t.nrm(4,"br"),t.EFF(5," Please enter the verification code below: "),t.k0s()),2&n){const e=t.XpG(2);t.R7$(),t.SpI(" ","A text message has been sent to "+("+1"+e.smsForm.get("phoneNumber").value||0)," ")}}function ct(n,c){1&n&&(t.j41(0,"div"),t.nrm(1,"mat-spinner",23),t.k0s())}function lt(n,c){if(1&n){const e=t.RV6();t.j41(0,"div",42),t.nVh(1,ct,2,0,"div"),t.nI1(2,"async"),t.j41(3,"p"),t.EFF(4,"Didn't receive your co
1de? "),t.j41(5,"a",46),t.bIt("click",function(){a.eBV(e);const i=t.XpG(2);return a.Njj(i.onSMSSubmit())}),t.EFF(6,"Resend code"),t.k0s()(),t.j41(7,"button",47),t.nI1(8,"async"),t.bIt("click",function(){a.eBV(e);const i=t.XpG(2);return a.Njj(i.verifySMSCode())}),t.EFF(9," Verify Code"),t.k0s()()}if(2&n){const e=t.XpG(2);t.R7$(),t.vxM(t.bMT(2,2,e.verifyingCode$)?1:-1),t.R7$(6),t.Y8G("disabled",t.bMT(8,4,e.verifyingCode$))}}function st(n,c){if(1&n){const e=t.RV6();t.nVh(0,rt,6,1),t.j41(1,"div",41)(2,"mat-form-field",18)(3,"mat-label"),t.EFF(4,"Verification code"),t.k0s(),t.j41(5,"input",38),t.mxI("ngModelChange",function(i){a.eBV(e);const l=t.XpG();return t.DH7(l.verificationCode,i)||(l.verificationCode=i),a.Njj(i)}),t.k0s()(),t.nVh(6,lt,10,6,"div",42),t.j41(7,"div",43)(8,"button",8),t.bIt("click",function(){a.eBV(e);const i=t.XpG();return a.Njj(i.backToProfile())}),t.EFF(9,"Back"),t.k0s()()()}if(2&n){const e=t.XpG();t.vxM("phone"===e.selectedMFAOption?0:-1),t.R7$(5),t.R50("ngModel",e.verificationCode),t.R7$(),t.vxM("phone"===e.selectedMFAOption?6:-1)}}let dt=(()=>{class n{firebaseAuthService=(0,a.WQX)(I.F);authFacade=(0,a.WQX)($.B);snackBar=(0,a.WQX)(b.UG);router=(0,a.WQX)(A.Ix);route=(0,a.WQX)(A.nX);optOutDialog=(0,a.WQX)(_.r0T);matSnackBar=(0,a.WQX)(b.UG);authImageSrc="../../../assets/img/authentication.png";showSecretKey=!1;showHelp;showTOTP=O.c.enableTOTP||!1;selectedMFAOption="";captcha;awaitingCode$=new P.t(!1);sendingSMS$=new v.B;enrollingTOTP$=new v.B;verifyingCode$=new v.B;totpSecret$=new v.B;totpSecret;qrCodeReady$=new v.B;smsForm=new p.gE({phoneNumber:new p.MJ("",{validators:[(0,_.olR)()]})});displayedColumns=["description","select"];methods=[{show:!0,value:"phone",label:"SMS/Text Message",icon:"textsms",description:"Get one-time codes sent to your phone via sms to complete authentication requests"},{show:this.showTOTP,value:"totp",label:"Authenticator App",icon:"security_update_good",description:"Use an authentication app or browser extension to get two-factor authentication codes when prompted"}];selectMfa(e){var o=this;return(0,f.A)(function*(){"totp"===e&&(yield o.getTOTPSecret()),o.selectedMFAOption=e})()}verificationId;verificationCode;ngAfterViewInit(){this.captcha=new N.kT(this.firebaseAuthService.auth,"recaptcha-container",{size:"invisible"}),this.captcha.render()}getTOTPSecret(){var e=this;return(0,f.A)(function*(){try{e.selectedMFAOption="totp";const o=yield e.firebaseAuthService.getMultiFactorSession(),i=yield e.firebaseAuthService.generateTOTPSecret(o);e.totpSecret$.next(i),e.totpSecret=i,e.createQRCode(i)}catch(o){S.q.error(o)}})()}clipboardClicked(){this.snackBar.open("Copied to clipboard!","OK")}revealSecretKey(){this.showSecretKey=!0}createQRCode(e){var o=this;return(0,f.A)(function*(){try{const i=yield(0,F.s)(o.firebaseAuthService.getLatestUserName$());if(!i)return;const l=O.c.totpAccountLabel;if(!l)throw new Error("TOTP account label not set");const s=e?.generateQrCodeUrl(i,l);if(!s)throw new Error("TOTP URI not generated");H.mo(s,(d,u)=>{d&&o.snackBar.open("Error setting up MFA, try again","ok"),u.id="qrCodeCanvas",u.style.height="150px",u.style.width="150px";const x=document?.getElementById("qrCode");if(!x)throw new Error("Container not found");x.appendChild(u)}),o.qrCodeReady$.next(!0)}catch(i){S.q.error(i)}})()}onSMSSubmit(){var e=this;return(0,f.A)(function*(){if(!e.smsForm.valid)return;e.sendingSMS$.next(!0);const o=h.XO_.getFormattedNumber(e.smsForm.get("phoneNumber").value);try{const l={session:yield e.firebaseAuthService.getMultiFactorSession(),phoneNumber:o},s=yield e.firebaseAuthService.sendSMS({phoneInfoOptions:l,captcha:e.captcha});e.snackBar.open("Code Sent!","Ok"),e.verificationId=s,e.awaitingCode$.next(!0),e.sendingSMS$.next(!1)}catch(i){S.q.error(i),e.snackBar.open("Error sending SMS,try again","ok"),e.sendingSMS$.next(!1)}})()}onTOTPContinue(){var e=this;return(0,f.A)(function*(){e.awaitingCode$.next(!0)})()}verifyTOTPCode(e){var o=this;return(0,f.A)(function*(){try{o.verifyingCode$.next(!0);const i=yield o.firebaseAuthService.verifyTOTPCode({secret:e,enrolling:!0,verificationCode:o.verificationCode});if(yield o.firebaseAuthService.enrollMFA(i,"TOTP"),o.route.parent.snapshot.url.find(l=>l.path.includes("add-mfa"))){const l=yield(0,F.s)(o.firebaseAuthService.getLatestToken$()),s=yield(0,F.s)(o.firebaseAuthService.getLatestUserName$());return void o.authFacade.login({username:s,idToken:l}).pipe((0,g.s)(1),(0,w.E)(o.authFacade.user$)).subscribe(([d,u])=>{const x=new Set(u.enrolledMFA||[]);x.add(h.g_4.TOTP),"[AUTH] LOGIN_SUCCESS"===d.type&&o.authFacade.updateUser({hasMFA:!0,hasMFADisabled:!1,enrolledMFA:Array.from(x)})})}o.authFacade.updateUser({hasMFA:!0,enrolledMFA:[h.g_4.TOTP]}),o.snackBar.open("Added MFA succesfully!","ok"),o.authFacade.clearInUp
1dateSensitiveInfoFlow(),o.router.navigate(["/profile"])}catch(i){if(o.verifyingCode$.next(!1),"auth/invalid-verification-code"===i.code)return void o.snackBar.open("Invalid verification code","ok");o.snackBar.open("Error verifying code, try again","ok")}})()}backToProfile(){this.router.navigate(["/profile"])}verifySMSCode(){var e=this;return(0,f.A)(function*(){try{e.verifyingCode$.next(!0);const o=yield e.firebaseAuthService.verifySMSCode({verificationCode:e.verificationCode,verificationId:e.verificationId});if(yield e.firebaseAuthService.enrollMFA(o,"My phone number"),e.route.parent.snapshot.url.find(i=>i.path.includes("add-mfa"))){const i=yield(0,F.s)(e.firebaseAuthService.getLatestToken$()),l=yield(0,F.s)(e.firebaseAuthService.getLatestUserName$());return void e.authFacade.login({username:l,idToken:i}).pipe((0,g.s)(1),(0,w.E)(e.authFacade.user$)).subscribe(([s,d])=>{const u=new Set(d.enrolledMFA||[]);u.add(h.g_4.SMS),"[AUTH] LOGIN_SUCCESS"===s.type&&e.authFacade.updateUser({hasMFA:!0,hasMFADisabled:!1,enrolledMFA:Array.from(u)})})}e.authFacade.updateUser({hasMFA:!0,enrolledMFA:[h.g_4.SMS]}),e.snackBar.open("Added MFA succesfully!","ok"),e.authFacade.clearInUpdateSensitiveInfoFlow(),e.router.navigate(["/profile"])}catch(o){if(e.verifyingCode$.next(!1),"auth/invalid-verification-code"===o.code)return void e.snackBar.open("Invalid verification code","ok");e.snackBar.open("Error verifying code, try again","ok")}})()}optOutUser(){var e=this;this.optOutDialog.open().pipe((0,g.s)(1)).subscribe(function(){var o=(0,f.A)(function*(i){if(i){const[l,s]=yield(0,F.s)((0,D.z)([e.firebaseAuthService.getLatestToken$().pipe((0,g.s)(1)),e.firebaseAuthService.getLatestUserName$().pipe((0,g.s)(1))])),d=yield(0,F.s)(e.authFacade.login({idToken:l,username:s,optOutMFA:!0}).pipe((0,g.s)(1)));return d.type===U.I.loginSuccess.type?void 0:(S.q.log("error logging in",{action:d}),e.matSnackBar.open("Invalid login","Ok"))}});return function(i){return o.apply(this,arguments)}}())}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=t.VBU({type:n,selectors:[["app-setup-mfa-form"]],inputs:{showHelp:"showHelp"},standalone:!1,decls:6,vars:5,consts:[[2,"justify-self","center",3,"ngStyle.lt-md"],["fxLayout","column","fxLayoutAlign","center center","id","recaptcha-container",2,"margin-top","15px"],[2,"text-align","center","margin-top","16px","margin-bottom","32px","color","#233151","max-width","600px"],["fxHide.lt-md","true",1,"twoFactorDescription"],[2,"padding-bottom","30px"],["fxLayout","column","fxLayoutAlign","center center","fxLayoutGap","10px",2,"padding-bottom","20px"],["fxLayout","column","fxLayoutGap","10px",2,"padding-bottom","20px"],["fxLayout","row","fxLayoutGap","10px",2,"justify-content","space-between !important","width","100%"],["mat-stroked-button","",3,"click"],["mat-button",""],[1,"table-header"],[2,"border-color","lightgray","border-width","1px","border-style","solid"],["fxLayout.gt-sm","row","fxLayout.lt-md","column","fxLayoutAlign","space-evenly center"],["fxLayout","column","fxLayoutAlign","center center",2,"padding","8px"],["fxLayout","column","fxLayoutAlign.lt-md","center center",2,"padding","8px","max-width","400px"],[2,"font-weight","bold"],["mat-flat-button","","color","primary",2,"margin","8px",3,"click","ehsButtonAnimation","animationColor"],["fxLayout","column","fxLayoutAlign","center center",3,"ngSubmit","formGroup"],["appearance","fill"],["matPrefix",""],["type","tel","matInput","","formControlName","phoneNumber","placeholder","555-555-1234",1,"mobile-input"],["fxLayout","row","fxLayoutGap","10px"],["mat-flat-button","","color","primary","type","submit",2,"margin-top","10px",3,"ehsButtonAnimation","animationColor","disabled"],["diameter","36",1,"circle-center"],["fxLayout","row","ngStyle.gt-sm","justify-content:space-between","ngStyle.lt-md","justify-content:center","fxLayoutGap","10px"],["fxHide.lt-md","true",2,"align-content","center"],[3,"src","height","width"],["fxLayout","column","fxLayoutAlign","center center",2,"max-width","500px","margin-left","50px","margin-right","50px"],[2,"max-width","500px","text-align","center"],["id","qrCode"],[2,"max-width","400px","text-align","center"],[1,"showManualCode",3,"click"],["id","secretKey",3,"fxShow"],["for","clipboard-textarea"],["fxLayout","row",2,"max-width","400px"],["id","clipboard-textarea","cols","32","rows","1","readonly","",3,"value"],[3,"click","cdkCopyToClipboard"],["appearance","fill",2,"max-width","300px"],["matInput","",1,"mobile-input",3,"ngModelChange","ngModel"],["mat-flat-button","","color","primary",2,"max-width","300px",3,"click","disabled"],["mat-button","",3,"click"],["fxLayout","column","fxLayoutAlign","center center"],["fxLayout","column","fxLayoutGap","10px",2,"justify-content","center !important"],["fxLayout","row","fxLayoutGap","10px",2,"justify-content","start !important","
1width","100%"],[2,"margin-top","16px","color","#233151","text-align","center"],[2,"font-size","12px","line-height","18px","color","gray","margin-bottom","30px","text-align","center"],[1,"resendLink",3,"click"],["mat-flat-button","","color","primary",2,"margin-top","10px",3,"click","disabled"]],template:function(o,i){1&o&&(t.j41(0,"h2",0),t.EFF(1,"Enable Two-Factor Authentication"),t.k0s(),t.nVh(2,at,10,5,"div"),t.nI1(3,"async"),t.vZN(4,st,10,3),t.nrm(5,"div",1)),2&o&&(t.Y8G("ngStyle.lt-md",t.lJ4(4,Q)),t.R7$(2),t.vxM(!1===t.bMT(3,2,i.awaitingCode$)?2:4))},dependencies:[p.qT,p.me,p.BC,p.cb,p.vS,L.dF,p.j4,p.JD,y.DJ,y.BO,y.sA,R.Om,R.eI,T.rl,T.nJ,T.TL,T.JW,B.fg,G.$z,V.LG,k.An,Y.S,C.Jj],styles:["a.resendLink[_ngcontent-%COMP%]{color:#3f51b5}a.resendLink[_ngcontent-%COMP%]:hover{text-decoration:underline;cursor:pointer}#qrCode[_ngcontent-%COMP%]{align-self:center}.showManualCode[_ngcontent-%COMP%]{color:#00f;cursor:pointer;text-decoration:underline}#secretKey[_ngcontent-%COMP%]{align-self:center;margin-top:16px;margin-bottom:16px}#qrCodeCanvas[_ngcontent-%COMP%]{height:100px;width:100px}.needHelpContainer[_ngcontent-%COMP%]{position:absolute;bottom:10px;right:10px}.twoFactorDescription[_ngcontent-%COMP%]{margin-top:16px;margin-bottom:32px;color:#233151;max-width:600px;text-align:center;justify-self:center}.table-header[_ngcontent-%COMP%]{margin-bottom:0;color:#233151;background-color:#f9f9f9;padding:16px;border-color:#d3d3d3;border-width:1px;border-style:solid}"]})}return n})();var m=r(27516),mt=r(92367);function pt(n,c){1&n&&(t.j41(0,"th",9),t.EFF(1," Remove "),t.k0s())}function ut(n,c){if(1&n){const e=t.RV6();t.j41(0,"td",10)(1,"button",11),t.bIt("click",function(){const i=a.eBV(e).$implicit,l=t.XpG(3);return a.Njj(l.onDelete(i.uid,i.factorId))}),t.j41(2,"mat-icon"),t.EFF(3,"delete"),t.k0s()()()}}function ft(n,c){1&n&&(t.j41(0,"th",9),t.EFF(1," Added At "),t.k0s())}function ht(n,c){if(1&n&&(t.j41(0,"td",10),t.EFF(1),t.k0s()),2&n){const e=c.$implicit;t.R7$(),t.SpI(" ",e.enrollmentTime," ")}}function Ft(n,c){1&n&&(t.j41(0,"th",9),t.EFF(1," Type "),t.k0s())}function gt(n,c){if(1&n&&(t.j41(0,"td",10),t.EFF(1),t.k0s()),2&n){const e=c.$implicit;t.R7$(),t.SpI(" ",e.factorId," ")}}function Ct(n,c){1&n&&t.nrm(0,"tr",12)}function _t(n,c){1&n&&t.nrm(0,"tr",13)}function xt(n,c){if(1&n&&(t.j41(0,"div")(1,"h3",0),t.EFF(2," Manage Two-Step Verification "),t.k0s(),t.j41(3,"table",1),t.qex(4,2),t.DNE(5,pt,2,0,"th",3)(6,ut,4,0,"td",4),t.bVm(),t.qex(7,5),t.DNE(8,ft,2,0,"th",3)(9,ht,2,1,"td",4),t.bVm(),t.qex(10,6),t.DNE(11,Ft,2,0,"th",3)(12,gt,2,1,"td",4),t.bVm(),t.DNE(13,Ct,1,0,"tr",7)(14,_t,1,0,"tr",8),t.k0s()()),2&n){const e=t.XpG(),o=t.XpG();t.R7$(3),t.Y8G("dataSource",e),t.R7$(10),t.Y8G("matHeaderRowDef",o.displayedColumns),t.R7$(),t.Y8G("matRowDefColumns",o.displayedColumns)}}function vt(n,c){if(1&n&&(t.j41(0,"div"),t.nVh(1,xt,15,3,"div"),t.k0s()),2&n){const e=c;t.R7$(),t.vxM(null!=e&&e.length?1:-1)}}let yt=(()=>{class n{firebaseAuthService=(0,a.WQX)(I.F);confirmDialog=(0,a.WQX)(_.gW5);authFacade=(0,a.WQX)($.B);snackBar=(0,a.WQX)(b.UG);router=(0,a.WQX)(A.Ix);userEnrolledFactors$;displayedColumns=["remove","addedAt","type"];ngOnInit(){this.userEnrolledFactors$=this.firebaseAuthService.getUserEnrolledFactors()}onDelete(e,o){this.confirmDialog.open({title:"Remove MFA",message:"Are you sure you want to remove this MFA entry?"}).pipe((0,g.s)(1),(0,w.E)(this.authFacade.user$)).subscribe(([i,l])=>{!i||!l||this.firebaseAuthService.unEnrollMFA(e).then(()=>{this.snackBar.open("MFA removed succesfully","ok");let d,s=l.enrolledMFA||[];switch(o){case"phone":d=h.g_4.SMS;break;case"totp":d=h.g_4.TOTP}if(d){const u=s.indexOf(d);s=s.filter((x,It)=>It!==u)}this.authFacade.updateUser({hasMFA:!1,enrolledMFA:s}),this.authFacade.clearInUpdateSensitiveInfoFlow(),this.router.navigate(["/profile"])}).catch(()=>{this.snackBar.open("Error removing MFA","ok")})})}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=t.VBU({type:n,selectors:[["app-manage-mfa-table"]],standalone:!1,decls:2,vars:3,consts:[[2,"margin-top","16px","margin-bottom","0","color","#233151"],["mat-table","",3,"dataSource"],["matColumnDef","remove"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","addedAt"],["matColumnDef","type"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-icon-button","",3,"click"],["mat-header-row",""],["mat-row",""]],template:function(o,i){if(1&o&&(t.nVh(0,vt,2,1,"div"),t.nI1(1,"async")),2&o){let l;t.vxM((l=t.bMT(1,1,i.userEnrolledFactors$))?0:-1,l)}},dependencies:[m.Zl,m.tL,m.ji,m.cC,m.YV,m.iL,m.KS,m.$R,m.YZ,m.NB,mt.iY,k.An,C.Jj],encapsulation:2})}return n})();const Mt=()=>({margin:"64px;"}),At=()=>({width:"90%"});function bt(n,c){1&n&&(t.j41(0,"div"),t.nrm(1,"app-manage-mfa-table"),t.k0s())}function St(n,c){if(1&n&&t.nrm(0,"app-setup-mfa-form",5),2&n){const e=t.XpG();t.Y8G("showHelp",e.showHelp)}}const Tt=[{path:"",component:(()=>{class n{authFacade=(0,a.WQX)($.B);router=(0,a.WQX)(A.Ix);hasMFA$;showHelp=!0;ngOnInit(){this.hasMFA$=this.authFacade.userHasMFA$,this.showHelp=this.router.url.includes("add-mfa")}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=t.VBU({type:n,selectors:[["app-add-mfa-page"]],standalone:!1,decls:9,vars:7,consts:[[1,"center-page-container","mobile-mt","mobile-mb"],["fxLayout","column","fxLayoutAlign","center center",1,"mat-typography",3,"ngStyle.gt-sm"],[1,"center-container",3,"ngStyle.lt-md"],["fxLayout","row","fxLayoutAlign","center"],["src","/assets/img/ehs_logo.png",1,"ehs-logo"],[3,"showHelp"]],template:function(o,i){1&o&&(t.j41(0,"div",0)(1,"div",1)(2,"mat-card",2)(3,"mat-card-content")(4,"div",3),t.nrm(5,"img",4),t.k0s(),t.nVh(6,bt,2,0,"div"),t.nI1(7,"async"),t.vZN(8,St,1,1,"app-setup-mfa-form",5),t.k0s()()()()),2&o&&(t.R
17$(),t.Y8G("ngStyle.gt-sm",t.lJ4(5,Mt)),t.R7$(),t.Y8G("ngStyle.lt-md",t.lJ4(6,At)),t.R7$(4),t.vxM(t.bMT(7,3,i.hasMFA$)?6:8))},dependencies:[dt,yt,y.DJ,y.sA,R.eI,M.RN,M.m2,C.Jj],styles:["mat-card.center-container.mdc-card.mat-mdc-card[_ngcontent-%COMP%]{max-width:max-content!important}.mat-card.container-body[_ngcontent-%COMP%]{width:500px;max-width:500px}.mat-card.container-body[_ngcontent-%COMP%] .mat-card-content[_ngcontent-%COMP%]{padding:0 32px;color:#5d5c62}@media only screen and (max-width:600px){.center-container[_ngcontent-%COMP%]{padding:0%}}"],changeDetection:0})}return n})()}];let kt=(()=>{class n{static \u0275fac=function(o){return new(o||n)};static \u0275mod=t.$C({type:n});static \u0275inj=a.G2t({imports:[E.iI.forChild(Tt),E.iI]})}return n})();var jt=r(53719),$t=r(90450),wt=r(82765);let Rt=(()=>{class n{static \u0275fac=function(o){return new(o||n)};static \u0275mod=t.$C({type:n});static \u0275inj=a.G2t({imports:[C.MD,p.YN,L.FQ,p.X1,$t.tA,_.gBd,j.YF,jt.RG,B.fS,G.Hl,V.D6,M.Hu,m.tP,b._T,k.m_,wt.g7,_.aT_]})}return n})(),Gt=(()=>{class n{static \u0275fac=function(o){return new(o||n)};static \u0275mod=t.$C({type:n});static \u0275inj=a.G2t({imports:[C.MD,j.YF,_.l5y,m.tP,G.Hl,k.m_]})}return n})(),Et=(()=>{class n{static \u0275fac=function(o){return new(o||n)};static \u0275mod=t.$C({type:n});static \u0275inj=a.G2t({imports:[C.MD,kt,Rt,Gt,j.YF,M.Hu]})}return n})()}}]);
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.