1import{a as Xt,b as V,c as G,d as z}from"./chunk-MV55Q3DB.js";import{c as qt}from"./chunk-52EFNO2Q.js";import{a as Gt,b as Zt,c as Ht,d as Wt}from"./chunk-7XUYVGZB.js";import{a as st}from"./chunk-U3BRQGNM.js";import{a as M,b as J}from"./chunk-436EVQ55.js";import{a as rt}from"./chunk-4PITZC2I.js";import{a as Vt,b as j,c as nt,d as it,e as Yt,f as Jt,h as Kt}from"./chunk-LEYH4QNS.js";import"./chunk-CXXSOED6.js";import"./chunk-MZBEODNZ.js";import{a as te,b as Y,c as ee,d as oe}from"./chunk-EEXDJAPS.js";import{g as Qt}from"./chunk-6LMEUQ2F.js";import{a as b,k as zt}from"./chunk-EKTNBCSF.js";import{a as tt,d as N}from"./chunk-2EZTRW42.js";import{i as F,j as P,k as ne}from"./chunk-HLOADYOM.js";import{a as ie,l as re}from"./chunk-EMEDVJAZ.js";import{$c as Et,Bd as kt,Cd as Nt,Ea as l,Fa as c,Fd as jt,Ga as mt,Gd as $t,Hd as X,Ja as A,Ka as C,La as g,Lc as r,Mc as Q,Nc as $,Oc as St,Qa as v,Rc as wt,Sa as gt,Sc as Mt,Tc as k,Vb as vt,W as ct,X as _,Z as W,a as S,b as w,bb as pt,bd as et,ca as h,cb as O,cd as bt,da as u,dd as It,eb as dt,ed as yt,fb as B,ga as R,hc as Ot,hd as ot,id as Tt,jc as Ft,ka as lt,kd as Rt,lb as E,lc as q,ld as Dt,mb as ht,na as ft,oa as p,oc as Pt,od as At,pd as xt,ra as a,rb as ut,rd as Lt,sa as L,sb as Ct,ta as U,ub as _t,ud as Bt,vb as Ut,wa as D,za as m}from"./chunk-PJFFJJEK.js";O();O();var K=(()=>{class e{constructor(t,n){this._http=t,this.configService=n,this.mainConfig=this.configService.getConfig(),this.devOrStg=r(this.mainConfig,"name")==="staging"||r(this.mainConfig,"name")==="dev"}login(t,n){let o=encodeURIComponent(n)||"",i=new ut().set("redirect-url",o),s=`${r(this.mainConfig,"identity_url")}/login`;return this.devOrStg&&(i=i.append(zt.Skip2Fa,String(!0))),this._http.post(s,t,w(S({},Gt),{params:i}))}static{this.\u0275fac=function(n){return new(n||e)(W(Ct),W(b))}}static{this.\u0275prov=ct({token:e,factory:e.\u0275fac})}}return e})();var x=function(e){return e[e.SUCCESS_OK=200]="SUCCESS_OK",e[e.SUCCESS_CREATED=201]="SUCCESS_CREATED",e[e.SUCCESS_NO_CONTENT=204]="SUCCESS_NO_CONTENT",e[e.REDIRECT_FOUND=302]="REDIRECT_FOUND",e[e.BADREQUEST=400]="BADREQUEST",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.CONFLICT=409]="CONFLICT",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e}(x||{});var y=function(e){return e.PASSWORD="password",e.EMAIL="email",e}(y||{});O();function pe(e,Z){if(e&1&&(l(0,"a",17),v(1,"Contact Support"),c()),e&2){let t=g();m("href",t.contactSupportLink,ft)}}function de(e,Z){if(e&1){let t=A();l(0,"div",18)(1,"span"),v(2," Don\u2019t have an account? "),c(),l(3,"span",19),C("click",function(){h(t);let o=g();return u(o.signup())}),v(4,"Sign Up"),c()()}}var se=(()=>{class e{constructor(t,n,o,i,s,f,d,T){this.loginService=t,this.validationService=n,this.commonService=o,this.configService=i,this.detector=s,this.googleService=f,this.office365Service=d,this.platformId=T,this.emailErrorMessage="Please enter a valid email address",this.loginBtnText="Log In Now",this.passwordMessage="Please use at least 1 letter & 1 number, 8-20 characters",this.mainBtnDisabled=!1,this.allSubscriptions=[],this.displayContactSupport=!1,this.nyze=nt,this.enterPressClass=kt,this.formIds=y,this.loading=!1,this.socialsIcon=wt,this.buttonSize=St,this.displayGoToSignUp=!0,this.deviceId=void 0,this.goToSignUp=new R,this.loginResponse=new R,this.goToForgotPassword=new R,this.loginClicked=new R,this.mainConfig=this.configService.getConfig(),this.iconType=Vt,this.loginForm=new yt({email:new ot("",[this.validationService.validateEmail,et.required]),password:new ot("",[this.validationService.validatePassword,et.required])}),this.email=this.loginForm.get("email"),this.password=this.loginForm.get("password"),this.contactSupportLink=`mailto:${r(this.mainConfig,"support_link")}`}onInputFocus(t){this.nyze=w(S({},this.nyze),{angry:this.loginForm.get("email").dirty&&this.loginForm.get("email").invalid,emotion:t===Xt.PASSWORD?tt.CLOSED:tt.Default}),this.detector.markForCheck()}elementOnFocusOut(t){if(t===y.PASSWORD)return;let n=this.getFormControlNameById(t);this.loginForm.get(n).invalid?this.nyze=it:this.nyze=nt,this.detector.markForCheck()}getFormControlNameById(t){switch(t){case y.PASSWORD:return"password";case y.EMAIL:return"email"}}ngOnInit(){this.errorMessage="",this.imagesUrl=r(this.mainConfig,"images_url"),this.redirectUrl=this.commonService.checkForRedirectUrl(),this.googleApiKey=r(this.mainConfig,"google_api_key")}
1login(){if(this.loginClicked.emit(z.EMAIL),this.loginForm.get("email").invalid){this.commonService.showFormErrors(this.loginForm);return}this.loading=!0,this.errorMessage="",this.displayContactSupport=!1;let t={email:this.email.value.trim(),password:this.password.value.trim(),deviceId:this.deviceId,verificationId:this.verificationId};this.loginSubscription=this.loginSub(t),this.allSubscriptions.push(this.loginSubscription)}loginSub(t){return this.loginService.login(t,this.redirectUrl).pipe().subscribe(n=>{this.loading=!1;let o={success:!0,message:n,email:this.email.value.trim()};this.loginResponse.emit(o)},n=>{this.loading=!1,this.nyze=it;let o={success:!1,message:n,email:this.email.value.trim(),errorType:r(n,"error.errorCode"),twoFactorAuthToken:r(n,"error.twoFactorAuthToken"),codeToken:r(n,"error.codeToken")};this.loginResponse.emit(o),this.handleErrorMsg(n)})}handleErrorMsg(t){let n=r(t,"status"),o=r(t,"error.errorCode"),i=r(t,"error.message",[]);switch(n){case x.UNAUTHORIZED:switch(o){case M.USER_BLOCKED:this.displayContactSupport=!0,this.errorMessage="The account is blocked. Please ";break;default:this.errorMessage="Your password or email is incorrect.";break}break;case x.BADREQUEST:i.length?this.errorMessage=i[0]:this.errorMessage="Your password or email is incorrect.";break;case x.CONFLICT:this.errorMessage="Please verify your account.";break;default:break}this.detector.markForCheck()}forgotPassword(){this.goToForgotPassword.emit()}signup(){this.goToSignUp.emit()}ngOnDestroy(){this.allSubscriptions.forEach(t=>{t.unsubscribe()})}officeLoginClick(){let{urlCallback:t}=this.office365Service.getAuthUrl();this.mainBtnDisabled=!0,this.loginClicked.emit(z.OFFICE365),this.detector.detectChanges(),this.openedDialog=this.office365Service.openOauthDialog(t),this.listenToCloseEvent(),this.responseListener("office365")}googleLoginClick(){let{urlCallback:t}=this.googleService.getAuthUrl();this.mainBtnDisabled=!0,this.loginClicked.emit(z.GOOGLE),this.detector.detectChanges(),this.openedDialog=this.googleService.openOauthDialog(t),this.listenToCloseEvent(),this.responseListener("google")}responseListener(t){let n;if(t==="google")n=this.googleService;else if(t==="office365")n=this.office365Service;else throw new Error("no provider in responseListener login");n.getUrlCallbackResponse().subscribe(o=>{let{code:i,error:s}=o;if(s)throw new Error(s);n.login(i,this.deviceId).subscribe(f=>{let d={success:!0,message:f};this.loginResponse.emit(d)},f=>{let d={success:!1,message:w(S({},f),{isGoogle:t==="google",isOffice:t==="office365"}),errorType:r(f,"error.errorCode"),twoFactorAuthToken:r(f,"error.twoFactorAuthToken"),codeToken:r(f,"error.codeToken")};this.mainBtnDisabled=!1,this.handleErrorMsg(f),this.loginResponse.emit(d),this.detector.markForCheck()})})}listenToCloseEvent(){if(ht(this.platformId)){let t=null;t=setInterval(()=>{this.openedDialog.closed&&(this.mainBtnDisabled=!1,this.detector.detectChanges(),clearInterval(t))},1e3)}}static{this.\u0275fac=function(n){return new(n||e)(a(K),a(k),a(j),a(b),a(pt),a(V),a(G),a(lt))}}static{this.\u0275cmp=L({type:e,selectors:[["dn-login"]],inputs:{displayGoToSignUp:"displayGoToSignUp",deviceId:"deviceId",verificationId:"verificationId"},outputs:{goToSignUp:"goToSignUp",loginResponse:"loginResponse",goToForgotPassword:"goToForgotPassword",loginClicked:"loginClicked"},standalone:!1,decls:24,vars:31,consts:[[1,"container"],[1,"content"],[1,"title"],[1,"social-btns-container"],[3,"clickButton","text","loading","size","icon"],[1,"form-separator"],[1,"form",3,"formGroup"],[1,"form-inputs"],["inputType","text",3,"componentFocus","focusOut","placeholder","inputId","formControlName","formGroup","iconType","errorMessage"],["inputType","password",3,"componentFocus","focusOut","showValidationIndicators","placeholder","inputId","formControlName","errorMessage","formGroup","iconType","showValueStatus","showViewPassword"],[1,"error-wrapper"],[1,"error"],["class","link","target","_blank",3,"href",4,"ngIf"],["EnterPress","",1,"btn-wrapper"],["type","submit",3,"clickButton","loading","ngClass","disabled","text"],[1,"forgot-password",3,"click"],["class","signup",4,"ngIf"],["target","_blank",1,"link",3,"href"],[1,"signup"],[1,"goto",3,"click"]],template:function(n,o){n&1&&(l(0,"div",0)(1,"div",1)(2,"h1",2),v(3,"Log In to Datanyze"),c(),l(4,"div",3)(5,"dn-social-btn",4),C("clickButton",function(){return o.googleLoginClick()}),c(),l(6,"dn-social-btn",4),C("clickButton",function(){return o.officeLoginClick()}),c()(),l(7,"div",5),v(8,"Or"),c(),l(9,"form",6)(10,"div",7)(11,"div")(12,"dn-form-input",8),C("componentFocus",function(s){return o.onInputFocus(s)})("focusOut",function(s){return o.elementOnFocusOut(s)}),c()(),l(13,"div")(14,"dn-form-input",9),C("componentFocus",function(s){return o.onInputFocus(s)})("focusOut",function(s){return o.elementOnFocusOut(s)}),c()()()(),l(15,"div",10)(16,"span",11),v(17),c(),D(18,pe,2,1,"a",12),c(),l(19,"div",13)(20,"dn-primary-btn",14),C("clickButton",function(){return o.login()}),c()(),l(21,"div",15),C("click",function(){return o.forgotPassword()}),v(22," Forgot Password? "),c(),D(23,de,5,0,"div",16),c()()),n&2&&(p(5),m("text","Log in with Google")("loading",o.mainBtnDisabled)("size",o.buttonSize.EXTRA_LARGE)("icon",o.socialsIcon.GOOG
1LE),p(),m("text","Log in with Office 365")("loading",o.mainBtnDisabled)("size",o.buttonSize.EXTRA_LARGE)("icon",o.socialsIcon.OFFICE),p(3),m("formGroup",o.loginForm),p(3),m("placeholder","Email Address")("inputId",o.formIds.EMAIL)("formControlName","email")("formGroup",o.loginForm)("iconType",o.iconType.EMAIL)("errorMessage",o.emailErrorMessage),p(2),m("showValidationIndicators",!1)("placeholder","Password")("inputId",o.formIds.PASSWORD)("formControlName","password")("errorMessage",o.passwordMessage)("formGroup",o.loginForm)("iconType",o.iconType.LOCK)("showValueStatus",!1)("showViewPassword",!0),p(3),gt(" ",o.errorMessage," "),p(),m("ngIf",o.displayContactSupport),p(2),m("loading",o.loading)("ngClass",o.enterPressClass)("disabled",o.mainBtnDisabled)("text",o.loginBtnText),p(3),m("ngIf",o.displayGoToSignUp))},dependencies:[dt,B,Et,Lt,Bt,Nt,Tt,bt,It,Rt,Dt,Yt],styles:[`@font-face{font-family:Lato;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/lato/v25/S6uyw4BMUTPHjxAwXjeu.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Lato;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/lato/v25/S6uyw4BMUTPHjx4wXg.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/robotoslab/v36/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjojISmYmRjRdE.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/robotoslab/v36/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjojISma2RjRdE.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/robotoslab/v36/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjojISmY2RjRdE.woff2) format("woff2");unicode-range:U+1F00-1FFF}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/robotoslab/v36/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjojISmbGRjRdE.woff2) format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/robotoslab/v36/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjojISmYGRjRdE.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/robotoslab/v36/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjojISmYWRjRdE.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/robotoslab/v36/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjojISmb2Rj.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{margin:0;padding:0;height:100%;width:100%;background-color:#fff;font-family:Lato}html[_ngcontent-%COMP%] p[_ngcontent-%COMP%], body[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}html[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], body[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{height:56px;margin:16px 0 0 16px;color:#0b1e1f;font-size:22px;font-weight:600}html[_ngcontent-%COMP%] input[_ngcontent-%COMP%], html[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], body[_ngcontent-%COMP%] input[_ngcontent-%COMP%], body[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{box-sizing:border-box;font-family:Lato;font-size:12px;color:#0b1e1f;font-weight:400;width:100%;height:30px;border-radius:2px;padding-left:5px}html[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::placeholder, html[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:not(:focus), html[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::placeholder, html[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:not(:focus), body[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::placeholder, body[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:not(:focus), body[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::placeholder, body[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:not(:focus){font-family:Lato;font-size:12px;color:#547786;font-weight:400}.grecaptcha-badge[_ngcontent-%COMP%]{visibility:hidden}.container[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap;align-items:stretch;flex-direction:row;justify-content:center}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{box-shadow:0 19px 45px #50679c26;border-radius:20px;padding:20px;min-width:380px;min-height:562px;display:flex;flex-wrap:nowrap;align-items:center;flex-direction:column;justify-content:flex-start}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .social-btns-container[_ngcontent-%COMP%]{display:flex;flex-direction:column}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .social-btns-container[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{margin-bottom:16px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .social-btns-container[_ngcontent-%COMP%]:last-child{margin-bottom:0}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-family:Roboto Slab;font-size:30px;color:#0b1e1f;font-weight:400;display:flex;flex-wrap:nowrap;align-items:stretch;flex-direction:row;justify-content:center;line-height:40px;margin-bottom:24px}
1.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .form-separator[_ngcontent-%COMP%]{display:flex;flex-direction:row;width:100%;max-width:320px;font-family:Lato;font-size:14px;color:#547786;font-style:normal;font-weight:400;padding-bottom:16px;margin-top:24px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .form-separator[_ngcontent-%COMP%]:before, .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .form-separator[_ngcontent-%COMP%]:after{content:"";flex:1 1;border-bottom:1px solid #CCD6DB;margin:auto}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .form-separator[_ngcontent-%COMP%]:before{margin-right:24px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .form-separator[_ngcontent-%COMP%]:after{margin-left:24px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .form[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap;align-items:stretch;flex-direction:row;justify-content:flex-start;margin-bottom:27px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .form-inputs[_ngcontent-%COMP%]{width:320px;height:100%;position:relative;top:10%}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .btn-wrapper[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap;align-items:stretch;flex-direction:row;justify-content:center}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .error-wrapper[_ngcontent-%COMP%]{margin-bottom:8px;padding:0 15px;text-align:center;min-height:40px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .error-wrapper[_ngcontent-%COMP%] .error[_ngcontent-%COMP%]{font-family:Lato;font-size:16px;color:#d52a49;font-weight:400}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .error-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{font-family:Lato;font-size:16px;color:#3690f0;font-weight:400;cursor:pointer}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .grecaptcha-terms[_ngcontent-%COMP%]{margin:24px 0;width:274px;text-align:center;font-family:Lato;font-size:12px;color:#88a3af;font-weight:400}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .grecaptcha-terms[_ngcontent-%COMP%] .glink[_ngcontent-%COMP%]{white-space:nowrap;cursor:pointer;color:#88a3af;text-decoration:none}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .grecaptcha-terms[_ngcontent-%COMP%] .glink[_ngcontent-%COMP%]:hover{cursor:pointer;text-decoration:underline}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .forgot-password[_ngcontent-%COMP%]{margin:24px 0;text-align:center;display:flex;flex-wrap:nowrap;align-items:center;flex-direction:row;justify-content:flex-start;font-family:Lato;font-size:16px;color:#3690f0;font-weight:400}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .forgot-password[_ngcontent-%COMP%]:hover{cursor:pointer;text-decoration:underline}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .signup[_ngcontent-%COMP%]{font-family:Lato;font-size:16px;color:#0b1e1f;font-weight:400}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .signup[_ngcontent-%COMP%] .goto[_ngcontent-%COMP%]{font-family:Lato;font-size:16px;color:#3690f0;font-weight:400;margin-left:6px;cursor:pointer}@media (max-width: 500px){.grecaptcha-badge[_ngcontent-%COMP%]{transform:scale(.95);transform-origin:0 0}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{background:none;box-shadow:none;border-radius:10px;min-width:unset;min-height:unset}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{margin:24px 0;font-family:Lato;font-size:26px;color:#0b1e1f;font-weight:400}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .form-separator[_ng
1content-%COMP%]{max-width:262px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{display:none}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .form-inputs[_ngcontent-%COMP%]{width:262px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .error-wrapper[_ngcontent-%COMP%]{margin-bottom:14px}} 2/*# sourceMappingURL=dn-login-page.component-QWL4HK4A.css.map */`],changeDetection:0})}}return e})();O();var at=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=U({type:e})}static{this.\u0275inj=_({providers:[b,j,K,k,V,G],imports:[E,jt,At,xt,N,Jt,Kt]})}}return e})();O();var ae=(()=>{class e{static forRoot(t){return{ngModule:e,providers:[{provide:"env",useValue:t}]}}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=U({type:e})}static{this.\u0275inj=_({providers:[_t(Ut())],imports:[E,at,N,at]})}}return e})();O();function ue(e,Z){if(e&1){let t=A();l(0,"dn-login",4),C("loginResponse",function(o){h(t);let i=g();return u(i.loginResponse(o))})("goToSignUp",function(o){h(t);let i=g();return u(i.goToSignUp(o))})("goToForgotPassword",function(o){h(t);let i=g();return u(i.goToForgotPassword(o))})("loginClicked",function(o){h(t);let i=g();return u(i.loginClicked(o))}),c()}if(e&2){let t=g();m("deviceId",t.deviceId)("verificationId",t.verificationId)}}function Ce(e,Z){if(e&1){let t=A();l(0,"dn-verification",5),C("resendEmailClick",function(o){h(t);let i=g();return u(i.resendEmailClick(o))})("resendSuccess",function(o){h(t);let i=g();return u(i.resendSuccess(o))})("resendFail",function(o){h(t);let i=g();return u(i.resendFailed(o))})("goToLogin",function(o){h(t);let i=g();return u(i.goToLogin(o))}),c()}if(e&2){let t=g();m("email",t.email)("verificationType",t.verificationType)("verificationId",t.verificationId)}}var ce=(()=>{class e{constructor(t,n,o,i,s,f,d,T,H){this.store=t,this.router=n,this.activatedRoute=o,this.analyticsService=i,this.extractorService=s,this.tokenValidatorService=f,this.tokenExtractorService=d,this.notyService=T,this.appConfig=H,this.displayVerification=!1,this.subs=[],this.logoUrl=`${this.appConfig.images_url}/datanyze-logo.png`}ngOnInit(){this.verificationId=this.tokenExtractorService.getCookieVerificationId();let t=this.extractorService.getCookieDeviceId().subscribe(n=>{n&&(this.deviceId=n)});this.subs.push(t),this.queryParams=r(this.activatedRoute,"snapshot.queryParams"),this.redirectUrl=new URLSearchParams(this.queryParams).get(this.appConfig.REDIRECT_KEY)||""}loginClicked(t){this.analyticsService.sendGtmLoginEvent(F.LOGIN_CLICK,P.LOGIN_SCREEN,""),this.analyticsService.sendGtmLoginEvent(F.LOGIN_ATTEMPT,t,"na")}loginResponse(t){let{success:n}=t,o=r(t,"message.accessToken"),i=r(t,"message.isGoogle"),s=r(t,"message.isOffice"),f=this.tokenValidatorService.getTokenDecodedValues(o),d=r(f,"userId",null);n?this.handleLoginSuccess(o,d,i,s):this.handleLoginFailure(t,d,i,s)}handleLoginSuccess(t,n,o,i){let s=o?P.GOOGLE:i?P.OFFICE:P.EMAIL;this.store.dispatch(Pt({accessToken:t})),this.analyticsService.sendGtmLoginEvent(F.LOGIN_SUCCESS,s,"na",n),this.redirectUrl&&te(this.redirectUrl,this.appConfig)?window.location.href=this.redirectUrl:window.location.href=this.appConfig.platform_url}handleLoginFailure(t,n,o,i){let s=t.twoFactorAuthToken||r(t,"message.error.twoFactorAuthToken"),f=r(t,"errorType"),d=r(t,"message.error.message",null),T=o?P.GOOGLE:i?P.OFFICE:P.EMAIL;switch(f){case M.NOT_TRUSTED_AND_NOT_PHONE_VERIFIED:this.store.dispatch(Y({twoFactorAuthToken:s})),this.router.navigate(["/two-factor-auth/phone"],{queryParams:this.queryParams,state:{authFlow:J.LOGIN}});break;case M.NOT_EMAIL_VERIFIED:this.email=r(t,"email",""),this.verificationType=Zt.VERIFICATION_NOT_VERIFIED,this.displayVerification=!0;break;case M.PHONE_NOT_REGISTERED:this.store.dispatch(Y({twoFactorAuthToken:s})),this.router.navigate(["/two-factor-auth/phone"],{queryParams:this.queryParams,state:{authFlow:J.LOGIN}});break;case M.TWO_FA_UNKNOWN_DEVICE:let{codeToken:H}=t;this.store.dispatch(Y({twoFactorAuthToken:s})),this.store.dispatch(ee({codeToken:H})),this.store.dispatch(oe({phone:r(t,"message.error.phone")})),this.router.navigate(["/two-factor-auth/verify"],{queryParams:this.queryParams,state:{authFlow:J.LOGIN}});break;default:this.analyticsService.sendGtmLoginEvent(F.LOGIN_FAILED,T,d,n);break}}goToSignUp(){this.router.navigate(["/signup"],{queryParams:w(S({},this.queryParams),{[this.appConfig.SF_CAMP_ID]:r(this.queryParams,`${this.appConfig.SF_CAMP_ID}`)||this.appConfig.SALESFORCE_CAMP_ID.goTo_signup})})}goToForgotPassword(){this.router.navigate(["/forgot-password"])}goToLogin(){this.displayVerification=!1}resendEmailClick(t){this.analyticsService.sendGtmSignupEvent(F.RESEND_EMAIL_VERIFICATION_CLICK,"na",t)}resendSuccess(){this.notyService.postMessage(new $(Q.SUCCESS,st.EMAIL_VERIFICATION_SENT_SUCCESS)),this.analyticsService.sendGtmSignupEvent(F.RESEND_EMAIL_VERIFICATION_SUCCESS,"na")}resendFailed(){this.notyService.postMessage(new $(Q.ERROR,st.OOPS_SOMETHING_WENT_WRONG)),this.analyticsService.sendGtmSignupEvent(F.RESEND_EMAIL_VERIFICATION_FAILED,"na")}
2ngOnDestroy(){this.subs.forEach(t=>t.unsubscribe())}static{this.\u0275fac=function(n){return new(n||e)(a(vt),a(Ft),a(Ot),a(ne),a(rt),a(Qt),a(rt),a(Mt),a($t))}}static{this.\u0275cmp=L({type:e,selectors:[["app-login"]],standalone:!1,decls:5,vars:2,consts:[[1,"login-layout"],[1,"login-container"],[3,"deviceId","verificationId","loginResponse","goToSignUp","goToForgotPassword","loginClicked",4,"ngIf"],[3,"email","verificationType","verificationId","resendEmailClick","resendSuccess","resendFail","goToLogin",4,"ngIf"],[3,"loginResponse","goToSignUp","goToForgotPassword","loginClicked","deviceId","verificationId"],[3,"resendEmailClick","resendSuccess","resendFail","goToLogin","email","verificationType","verificationId"]],template:function(n,o){n&1&&(l(0,"div",0),mt(1,"app-dn-logo"),l(2,"div",1),D(3,ue,1,2,"dn-login",2)(4,Ce,1,3,"dn-verification",3),c()()),n&2&&(p(3),m("ngIf",!o.displayVerification),p(),m("ngIf",o.displayVerification))},dependencies:[B,ie,se,Ht],styles:[`@font-face{font-family:Lato;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/lato/v25/S6uyw4BMUTPHjxAwXjeu.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Lato;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/lato/v25/S6uyw4BMUTPHjx4wXg.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/robotoslab/v36/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjojISmYmRjRdE.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/robotoslab/v36/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjojISma2RjRdE.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/robotoslab/v36/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjojISmY2RjRdE.woff2) format("woff2");unicode-range:U+1F00-1FFF}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/robotoslab/v36/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjojISmbGRjRdE.woff2) format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/robotoslab/v36/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjojISmYGRjRdE.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/robotoslab/v36/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjojISmYWRjRdE.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/robotoslab/v36/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjojISmb2Rj.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;min-height:100%;display:flex;margin:0;padding:0;background:radial-gradient(76.21% 73.19% at -4.77% 70.83%,#acc1e25c,#fff0),radial-gradient(82.34% 260.25% at 28.52% 22.64%,#fff 53.12%,#daecff),#fff;font-family:Lato}.app-cookie-consent[_ngcontent-%COMP%] + app-checkout[_ngcontent-%COMP%] .layout[_ngcontent-%COMP%] .layout-container[_ngcontent-%COMP%]{margin-bottom:6%!important}.login-container[_ngcontent-%COMP%]{margin-top:44px} 3/*# sourceMappingURL=login.component-PXQ273ET.css.map */`]})}}return e})();O();var _e=[{path:"",component:ce},{path:"**",redirectTo:""}],le=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=U({type:e})}static{this.\u0275inj=_({imports:[q.forChild(_e),q]})}}return e})();O();var cn=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=U({type:e})}static{this.\u0275inj=_({imports:[E,le,re,ae.forRoot(X.name),Wt.forRoot(X.name),qt.forRoot(X.name)]})}}return e})();export{cn as LoginModule}; 4//# sourceMappingURL=chunk-PORT5I66.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.