1import{a as Ke}from"./chunk-3JJAIKGA.js";import{a as Ye,i as Ze}from"./chunk-PHE35NED.js";import{b as We,d as et}from"./chunk-W352ZYGH.js";import{a as Je,b as we}from"./chunk-N6XGQUGV.js";import{a as I}from"./chunk-VW2GWKBU.js";import{a as tt}from"./chunk-SHBCU2IV.js";import{a as $e}from"./chunk-BSKLAPJ7.js";import{a as it}from"./chunk-BDEGYAVX.js";import{a as pe}from"./chunk-VE5CXONE.js";import"./chunk-ENLCSWIY.js";import"./chunk-BBWI5BRC.js";import"./chunk-5WRB4FCB.js";import{A as H,B as K,C as ye,D as Qe,Y as Xe,z as _e}from"./chunk-IE3GEG6D.js";import{E as He,F as $,c as M,e as b,g as B,h as G,n as qe,s as z,v as q}from"./chunk-JLQQPUG2.js";import{a as ee}from"./chunk-E3GK6ZJN.js";import{a as ze,b as x}from"./chunk-OYHRIJHA.js";import{E as ve,G as be,H as Z,d as Me,e as W,f as w,j as Be,s as L,t as Y,x as X,z as ge}from"./chunk-JLTXE2K3.js";import{$b as T,Aa as Ne,Hb as v,Hc as De,Ia as Ue,Ja as p,La as y,Ma as se,Ob as h,Ra as g,Sc as Oe,Tb as Pe,U as le,Ub as A,V as ne,Vb as Ve,W as ae,X as P,_b as E,ab as n,b as he,ba as F,bb as c,c as Re,ca as j,cb as s,db as a,dd as O,ed as Ge,fd as U,gd as J,i as fe,id as Te,nb as V,ra as ke,sb as C,ta as me,tc as N,ua as _,ub as u,v as Le,vc as R,ya as l}from"./chunk-Y66N7V4O.js";import"./chunk-7CEBWOAQ.js";var Ct=e=>({whitelabel:e});function xt(e,t){if(e&1&&(c(0,"div",14)(1,"div",11)(2,"div",26),a(3,"span",27),s()()()),e&2){let m=u(2);l(3),n("transloco",h(m.error))}}function It(e,t){if(e&1){let m=V();c(0,"div",9)(1,"div",10)(2,"div",11),a(3,"p",12),s()(),g(4,xt,4,2,"div",13),c(5,"div",14)(6,"div",11)(7,"span",15),a(8,"sa-app-icon",16),v(9,"\xA0"),a(10,"span",17),s()()(),c(11,"div",18),a(12,"label",19),c(13,"div",20),a(14,"input",21),s(),a(15,"sa-validation-message",22),s(),c(16,"div",18),a(17,"label",23),c(18,"div",20),a(19,"input",24),s(),a(20,"sa-validation-message",22),s(),c(21,"div",18)(22,"button",25),C("click",function(){F(m);let i=u();return j(i.activate())}),s()()()}if(e&2){let m=u();n("formGroup",m.activateForm),l(4),n("ngIf",m.error),l(4),n("name","info"),l(7),n("control",m.activateForm.controls.password)("messageKey","auth.activate.password"),l(5),n("control",m.activateForm.controls.passwordConfirmation)("messageKey","auth.activate.password"),l(2),n("disabled",m.activateForm.invalid)}}function At(e,t){e&1&&(c(0,"div",28)(1,"div",10)(2,"div",11),a(3,"h1",29),s()(),c(4,"div",10)(5,"div",11),a(6,"p",30),s()()())}function Et(e,t){e&1&&(c(0,"div",28)(1,"div",10)(2,"div",11),a(3,"h1",31),s()(),c(4,"div",10)(5,"div",11),a(6,"a",32),s()()())}function Tt(e,t){e&1&&(c(0,"div",33)(1,"p"),a(2,"a",34),s()())}function Ft(e,t){if(e&1&&a(0,"img",35),e&2){let m=u();n("src",h(m.env.CDN+"logos/pointerpro_logo_purple.png"),_)}}var rt=(()=>{let t=class t{constructor(r,i,o,d,f){this.app=r,this.api=i,this.currentRoute=o,this.fb=d,this.utils=f,this.env=w,this.error="",this.success=!1,this.activationCode=""}ngOnInit(){this.logo=this.app.getLogo();let r=this.utils.fetchUrlParams(this.currentRoute);this.activationCode=r.code,this.buildForm()}buildForm(){this.activateForm=this.fb.group({password:["",[b.required,b.minLength(8),H.capitals(1),H.numbers(1)]],passwordConfirmation:["",[b.required,b.minLength(8),b.maxLength(200),H.capitals(1),H.numbers(1)]]})}activate(){if(this.activateForm.invalid)return;let r={password:this.activateForm.get("password").value,password_confirmation:this.activateForm.get("passwordConfirmation").value,code:this.activationCode};this.api.activate(r).subscribe({next:()=>this.success=!0,error:i=>this.error=i.error})}};t.\u0275fac=function(i){return new(i||t)(p(x),p(I),p(O),p($),p(X))},t.\u0275cmp=y({type:t,selectors:[["ng-component"]],standalone:!1,decls:12,vars:10,consts:[[1,"row-container"],[1,"auth-content"],["alt","logo",3,"src"],["class","form-controls activate-form",3,"formGroup",4,"ngIf"],["class","form-controls auth-message",4,"ngIf"],["class","get-help",4,"ngIf"],[1,"auth-sidebar",3,"ngClass"],["class","logo-mobile","alt","logo",3,"src",4,"ngIf"],["transloco","auth.activate.sidebar.title"],[1,"form-controls","activate-form",3,"formGroup"],[1,"row"],[1,"col-12"],["transloco","auth.activate.intro"],["class","form-group row",4,"ngIf"],[1,"form-group","row"],[1,"help-block"],[3,"name"],["transloco","auth.activate.form.password.helper"],[1,"form-group"],["transloco","auth.activate.form.password.label",1,"bold"],[1,"input-group"],["type","password","name","password","formControlName","password","saValidateOnBlur","",1,"form-control"],[3,"control","messageKey"],["transloco","auth.activate.form.password_confirmation.label",1,"bold"],["type","password","name","passwordConfirmation","formControlName","passwordConfirmation","saValidateOnBlur","",1,"form-control"],["transloco","auth.activate.form.submit.label",1,"btn","btn-primary",3,"click","disabled"],[1,"alert","alert-danger"],[3,"transloco"],[1,"form-control
1s","auth-message"],["transloco","auth.activate.messages.fail.text"],["transloco","auth.activate.messages.fail.cta"],["transloco","auth.activate.messages.success.text"],["routerLink","/login","transloco","auth.activate.messages.success.cta",1,"btn","btn-primary"],[1,"get-help"],["href","mailto:[email protected]?subject=Help","transloco","auth.helper"],["alt","logo",1,"logo-mobile",3,"src"]],template:function(i,o){i&1&&(c(0,"div",0)(1,"div",1)(2,"header"),a(3,"img",2),s(),g(4,It,23,8,"div",3)(5,At,7,0,"div",4)(6,Et,7,0,"div",4)(7,Tt,3,0,"div",5),s(),c(8,"div",6)(9,"div"),g(10,Ft,1,2,"img",7),a(11,"h1",8),s()()()),i&2&&(l(3),n("src",h(o.logo),_),l(),n("ngIf",o.activationCode&&!o.success),l(),n("ngIf",!o.activationCode),l(),n("ngIf",o.success),l(),n("ngIf",o.app.isWhiteLabel===!1),l(),n("ngClass",A(8,Ct,o.app.isWhiteLabel===!0)),l(2),n("ngIf",o.app.isWhiteLabel===!1))},dependencies:[N,R,M,B,G,z,q,L,_e,K,ye,J],encapsulation:2});let e=t;return e})();var ce=(()=>{let t=class t{constructor(r,i,o,d){this.app=r,this.router=i,this.renderer2=o,this.toast=d}ngOnInit(){typeof localStorage!="object"&&this.toast.error('Your web browser does not support storing settings locally. In Safari, the most common cause of this is using "Private Browsing Mode". Please adjust your browser settings before logging into the app.');try{this.addTracking()}catch(r){console.error(r)}}addTracking(){if(w.envName==="development")return;let r=this.renderer2.createElement("script");r.type="text/javascript",r.text=`(function (d,s,i) { 2 var j = d.createElement('script'); 3 j.async = true; 4 j.id = 'notifia'; 5 j.src = 'https://static.notifia.io/widget.js'; 6 j.setAttribute('initialize',i); 7 d.head.appendChild(j); 8 })( document, 'script', 'IpBNLmrT3p');`,this.renderer2.appendChild(document.body,r)}};t.\u0275fac=function(i){return new(i||t)(p(x),p(U),p(Ue),p(Me))},t.\u0275cmp=y({type:t,selectors:[["ng-component"]],standalone:!1,decls:4,vars:0,consts:[[1,"auth-wrapper"],[1,"auth-container"],[1,"auth-container-row"]],template:function(i,o){i&1&&(c(0,"div",0)(1,"div",1)(2,"div",2),a(3,"router-outlet"),s()()())},dependencies:[Ge],styles:[`[_ngcontent-%COMP%]:root{--pp-font-family-sans: "Plus Jakarta Sans", sans-serif;--pp-brand-purple: #421f3c;--pp-brand-purple-rgb: 66, 31, 60;--pp-brand-orange: #ff7418;--pp-brand-orange-rgb: 255, 116, 24;--pp-brand-orange-hover: #e66910;--pp-brand-sunshine-rgb: 255, 174, 60;--pp-app-system-white: #fff;--pp-app-system-almost-white: #f5f5f5;--pp-app-system-border: #ccc}.text-pp-brand-orange[_ngcontent-%COMP%]{color:var(--pp-brand-orange)}.text-pp-brand-purple[_ngcontent-%COMP%]{color:var(--pp-brand-purple)}.auth-wrapper[_ngcontent-%COMP%]{width:100%;min-height:100%;background-color:var(--secondary-color)} .auth-container{display:flex;align-items:center;justify-content:center;min-height:100vh;max-width:100%;padding:0 15em}@media screen and (max-width:1400px){ .auth-container{padding:0 10em}}@media screen and (max-width:1200px){ .auth-container{padding:0 5em}}@media screen and (max-width:992px){ .auth-container{background:var(--surface-color-300);padding:0}} .auth-container .ohnohoney{opacity:0;position:absolute;top:0;left:0;height:0;width:0;z-index:-1} .auth-container .auth-container-row{background:var(--surface-color-300);width:100%;max-width:1200px} .auth-container .auth-container-row .row-container{display:flex;min-height:50vh}@media screen and (max-width:992px){ .auth-container .auth-container-row .row-container{min-height:100vh;flex-direction:column}} .auth-container .auth-container-row .row-container a:not(.btn){color:var(--primary-color);text-decoration:underline} .auth-container .auth-container-row .row-container .auth-sidebar{background-color:var(--primary-color);text-align:center;width:50%;background-image:url(https://assets.pointerpro.com/app/v3/authentication/people_v2.png);background-position:center bottom;background-size:auto 50%;background-repeat:no-repeat}@media screen and (max-width:992px){ .auth-container .auth-container-row .row-container .auth-sidebar{width:100%;order:0}} .auth-container .auth-container-row .row-container .auth-sidebar div{max-width:80%;margin:0 auto;padding:6em 1em 0;text-align:left}@media screen and (max-width:992px){ .auth-container .auth-container-row .row-container .auth-sidebar div{max-width:60%;min-height:150px;padding:1em 1em 0 2.5em;margin:unset}} .auth-container .auth-container-row .row-container .auth-sidebar div h1{color:var(--surface-color-300);font-size:4em;text-align:center;line-height:1em} .auth-container .auth-container-row .row-container .auth-sidebar div h1.register{text-align:left;font-size:3em;line-height:1.2em}@media screen and (max-width:992px){ .auth-container .auth-container-row .row-container .auth-sidebar div h1{text-align:left;font-size:2em;margin-bottom:1em} .auth-container .auth-container-row .row-container .auth-sidebar div h1.register{font-size:2em}} .auth-container .auth-container-row .row-container .auth-sidebar div h2{font-size:1.5em;font-weight:200}@media screen and (max-width:992px){ .auth-container .auth-container-row .row-container .auth-sidebar div h2{font-size:1em}} .auth-container .auth-container-row .row-container .auth-sidebar div .logo-mobile{display:none}@media screen and (max-width:992px){ .auth-container .auth-container-row .row-container .auth-sidebar div .logo-mobile{display:block;margin-bottom:1em;max-width:130px}}@media screen and (max-width:992px){ .auth-container .auth-container-row .row-container .auth-sidebar{flex-direction:column;background-position:right bottom;background-size:auto 70%}} .auth-container .auth-container-row .row-container .auth-sidebar.whitelabel{background-image:none!important} .auth-container .auth-container-row .row-container .auth-content{padding:1.5em 2.5em;background-color:var(--surface-color-300);width:50%;position:relative;display:flex;justify-content:space-between;flex-direction:column}@media screen and (max-width:992px){ .auth-container .auth-container-row .row-container .auth-content{width:100%;order:1;flex:1}} .auth-container .auth-container-row .row-container .auth-content .form-control
8s{padding:2em}@media screen and (max-width:992px){ .auth-container .auth-container-row .row-container .auth-content .form-controls{padding:0}} .auth-container .auth-container-row .row-container .auth-content .row{margin-top:13px}@media screen and (max-width:992px){ .auth-container .auth-container-row .row-container .auth-content header{display:none}} .auth-container .auth-container-row .row-container .auth-content header img{max-width:130px} .auth-container .auth-container-row .row-container .auth-content .get-help{font-size:.9em;width:fit-content} .auth-container .auth-container-row .row-container .register-form .alert-danger a{color:unset;text-decoration:underline} 9/*# sourceMappingURL=auth.component-DH3SKAKN.css.map */`]});let e=t;return e})();var kt=e=>({whitelabel:e}),Nt=e=>({email:e}),Ut=()=>({trial:!0,plan:"professional"}),Pt=(e,t)=>({browser:e,os:t});function Vt(e,t){if(e&1&&a(0,"sa-otp-submit",10),e&2){let m=u();n("redirectUrl",m.returnUrl)}}function Dt(e,t){if(e&1&&(c(0,"div",17)(1,"div",14)(2,"div",28),a(3,"span",29),s()()()),e&2){let m=u(2);l(3),n("transloco",h(m.error))}}function Ot(e,t){if(e&1&&(a(0,"a",30),E(1,"transloco")),e&2){let m=u(2);n("title",h(T(1,3,"auth.login.form.password.helper")))("queryParams",A(5,Nt,m.loginForm.controls.email.value))}}function Mt(e,t){e&1&&(a(0,"a",31),E(1,"transloco")),e&2&&n("title",h(T(1,2,"auth.login.form.password.helper")))}function Bt(e,t){e&1&&(c(0,"div"),v(1,` 10 `),c(2,"p",32),a(3,"strong",33),s(),v(4,` 11 `),c(5,"p"),v(6,` 12 `),a(7,"small",34),v(8,` 13 `),c(9,"a",35),E(10,"transloco"),v(11,` 14 `),a(12,"small",36),v(13,` 15 `),s(),v(14,` 16 `),s(),v(15,` 17 `),s()),e&2&&(l(9),n("title",h(T(10,3,"auth.login.go_to_register.link")))("queryParams",Pe(5,Ut)))}function Gt(e,t){if(e&1){let m=V();c(0,"div",11)(1,"form",12),C("ngSubmit",function(){F(m);let i=u();return j(i.login())}),c(2,"div",13)(3,"div",14),a(4,"p",15),s()(),g(5,Dt,4,2,"div",16),c(6,"div",17)(7,"div",14),a(8,"label",18)(9,"input",19)(10,"sa-validation-message",20),s()(),c(11,"div",17)(12,"div",14),a(13,"label",21)(14,"input",22)(15,"sa-validation-message",20),c(16,"span",23),g(17,Ot,2,7,"a",24)(18,Mt,2,4,"a",25),s()()(),c(19,"div",17)(20,"div",14),a(21,"button",26),s()()(),g(22,Bt,16,6,"div",27),s()}if(e&2){let m=u();l(),n("formGroup",m.loginForm),l(4),n("ngIf",m.error),l(5),n("control",m.loginForm.controls.email)("messageKey","auth.login.email"),l(5),n("control",m.loginForm.controls.password)("messageKey","auth.login.password"),l(2),n("ngIf",m.loginForm.controls.email.value),l(),n("ngIf",!m.loginForm.controls.email.value),l(3),n("disabled",m.loginForm.invalid),l(),n("ngIf",!m.app.isWhiteLabel)}}function zt(e,t){if(e&1&&a(0,"h1",43),e&2){let m=u(2);n("translocoParams",Ve(1,Pt,m.browser,m.os))}}function qt(e,t){e&1&&a(0,"h1",44)}function Ht(e,t){e&1&&(c(0,"p"),a(1,"a",45),s())}function Kt(e,t){if(e&1){let m=V();c(0,"div",37)(1,"div",13)(2,"div",38),g(3,zt,1,4,"h1",39)(4,qt,1,0,"h1",40)(5,Ht,2,0,"p",27),s()(),c(6,"div",13)(7,"div",38)(8,"button",41),C("click",function(){F(m);let i=u();return j(i.login(!0))}),s(),c(9,"button",42),C("click",function(){F(m);let i=u();return j(i.confirmLogin=!1)}),s()()()()}if(e&2){let m=u();l(3),n("ngIf",m.browser&&m.os),l(),n("ngIf",!m.browser||!m.os),l(),n("ngIf",!m.app.isWhiteLabel)}}function Wt(e,t){e&1&&(c(0,"div",46)(1,"p"),a(2,"a",47),s()())}function Jt(e,t){if(e&1&&a(0,"img",48),e&2){let m=u();n("src",h(m.env.CDN+"logos/pointerpro_logo_purple.png"),_)}}var ot=(()=>{let t=class t{constructor(r,i,o,d,f,S,k,Ie,Ae,Ee){this.app=r,this.router=i,this.currentRoute=o,this.fb=d,this.dateTime=f,this.authApiService=S,this.userService=k,this.utils=Ie,this.featureFlagService=Ae,this.hubspot=Ee,this.env=w,this.origin="",this.survey="",this.returnUrl="",this.error="",this.confirmLogin=!1,this.browser="",this.os="",this.showTwoFactorStep=!1}ngOnInit(){this.logo=this.app.getLogo();let r=this.utils.fetchUrlParams(this.currentRoute);this.origin=r.origin,this.survey=r.survey,this.returnUrl=r.returnUrl,this.buildForm(r.email)}buildForm(r=""){this.loginForm=this.fb.group({email:[r,[b.required,H.ghostUserEmail]],password:["",[b.required,b.minLength(8),b.maxLength(200)]]})}
17login(r=!1){if(this.loginForm.invalid)return;let i={email:this.loginForm.get("email").value,password:this.loginForm.get("password").value,force:r,timezone:this.dateTime.getTimezoneGuess()};this.origin&&(i.origin=this.origin),this.survey&&(i.survey=this.survey),this.authApiService.login(i).subscribe({next:o=>{let d=o.user,f=o.token;if(this.userService.login(d,f),this.userService.setUser(d,!this.app.isWhiteLabel),this.hubspot.boot(d),this.app.bootGoogleTagManager(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"sa_login",email:d.username,plan:d.role.role,is_trial:d.is_trial,user_type:d.user_type}),!this.returnUrl&&o.redirect_uri.charAt(0)==="/"&&(this.returnUrl=o.redirect_uri),o.user.needs_password_reset){this.router.navigateByUrl("reset-expired-password");return}if(this.featureFlagService.isActive(this.featureFlagService.TWO_FACTOR_AUTHENTICATION_USER)){if(o.user.has_2fa_enabled===!0){this.showTwoFactorStep=!0;return}if(this.featureFlagService.isActive(this.featureFlagService.TWO_FACTOR_AUTHENTICATION_ORGANIZATION)&&o.user.organization.google2fa_required===!0){this.router.navigateByUrl("two-factor-authentication/configure");return}}if(o.user.is_ghost_user){this.router.navigateByUrl("/impersonate-reason");return}if(this.returnUrl){this.router.navigateByUrl(this.returnUrl);return}this.router.navigate(["/home"])},error:o=>{switch(o.key){case"invalid_credentials":case"reset_account":case"login_failed_backoff":case"not_live":return this.error=o.message;case"duplicate_login":return this.browser=o.meta?o.meta.browser:null,this.os=o.meta?o.meta.os:null,this.confirmLogin=!0;case"sso_login_required":return this.router.navigate(["sso"]),this.error=o.message;default:return this.error="app.notifications.error.default"}}})}};t.\u0275fac=function(i){return new(i||t)(p(x),p(U),p(O),p($),p(ge),p(I),p(Z),p(X),p(be),p(ve))},t.\u0275cmp=y({type:t,selectors:[["ng-component"]],standalone:!1,decls:12,vars:10,consts:[[1,"row-container"],[1,"auth-content"],["alt","logo",3,"src"],[3,"redirectUrl",4,"ngIf"],["class","form-controls",4,"ngIf"],["class","form-controls auth-message",4,"ngIf"],["class","get-help",4,"ngIf"],[1,"auth-sidebar",3,"ngClass"],["class","logo-mobile","alt","logo",3,"src",4,"ngIf"],["transloco","auth.login.sidebar.intro"],[3,"redirectUrl"],[1,"form-controls"],[1,"login-form",3,"ngSubmit","formGroup"],[1,"row"],[1,"col-12"],["transloco","auth.login.intro"],["class","form-group row",4,"ngIf"],[1,"form-group","row"],["transloco","auth.login.form.email.label",1,"bold"],["data-cy","email","type","email","name","email","formControlName","email",1,"form-control"],[3,"control","messageKey"],["transloco","auth.login.form.password.label",1,"bold"],["data-cy","password","type","password","name","password","formControlName","password",1,"form-control"],[1,"help-block","mt-2"],["routerLink","/recover","transloco","auth.login.form.password.helper",3,"queryParams","title",4,"ngIf"],["routerLink","/recover","transloco","auth.login.form.password.helper",3,"title",4,"ngIf"],["data-cy","login-btn","type","submit","transloco","auth.login.form.submit.label",1,"btn","btn-primary",3,"disabled"],[4,"ngIf"],[1,"alert","alert-danger"],[3,"transloco"],["routerLink","/recover","transloco","auth.login.form.password.helper",3,"queryParams","title"],["routerLink","/recover","transloco","auth.login.form.password.helper",3,"title"],[1,"mt-4","mb-1"],["transloco","auth.login.go_to_register.prefix_1",1,"me-1"],["transloco","auth.login.go_to_register.prefix_2"],["data-cy","register-link","routerLink","/register",3,"queryParams","title"],["transloco","auth.login.go_to_register.prefix_3"],[1,"form-controls","auth-message"],[1,"col-12","text-center"],["transloco","auth.login.confirm.browser_message",3,"translocoParams",4,"ngIf"],["transloco","auth.login.confirm.anon_message",4,"ngIf"],["transloco","app.modals.buttons.confirm",1,"btn","btn-primary","me-1",3,"click"],["transloco","app.modals.buttons.cancel",1,"btn","btn-secondary",3,"click"],["transloco","auth.login.confirm.browser_message",3,"translocoParams"],["transloco","auth.login.confirm.anon_message"],["href","https://help.pointerpro.com/en/support/solutions/articles/35000106325-simultaneous-logins","target","_blank","transloco","app.links.why",1,"bold"],[1,"get-help"],["href","mailto:[email protected]?subject=Help","transloco","auth.helper"],["alt","logo",1,"logo-mobile",3,"src"]],template:function(i,o){i&1&&(c(0,"div",0)(1,"div",1)(2,"header"),a(3,"img",2),s(),g(4,Vt,1,1,"sa-otp-submit",3)(5,Gt,23,10,"div",4)(6,Kt,10,3,"div",5)(7,Wt,3,0,"div",6),s(),c(8,"div",7)(9,"div"),g(10,Jt,1,2,"img",8),a(11,"h1",9),s()()()),i&2&&(l(3),n("src",h(o.logo),_),l(),n("ngIf",o.showTwoFactorStep===!0),l(),n("ngIf",!o.confirmLogin&&o.showTwoFactorStep===!1),l(),n("ngIf",o.confirmLogin&&o.showTwoFactorStep===!1),l(),n("ngIf",o.app.isWhiteLabel===!1),l(),n("ngClass",A(8,kt,o.app.isWhiteLabel===!0)),l(2),n("ngIf",o.app.isWhiteLabel===!1))},dependencies:[N,R,qe,M,B,G,z,q,L,K,J,We,Y],encapsulation:2});let e=t;return e})();var nt=(()=>{let t=class t{constructor(r,i,o,d,f,S){this.api=r,this.auth0=i,this.ls=o,this.router=d,this.user=f,this.store=S}ngOnInit(){this.logout()}logout(){this.api.logout().subscribe({next:r=>{if(this.user.logout(),this.ssoLogout(),this.store.dispatch(new Ze),r.redirect_url){this.ls.setItem("user_id",r.user_id,!0);let i=this.ls.getItem(W.LAST_PAGE);window.location.replace("https://"+r.redirect_url+i||"")}},error:r=>console.error(r)})}ssoLogout(){let r=this.ls.getItem("sa_sso_app");if(!r){location.href="/login";return}let i=this.auth0.validateSsoApp(r);if(!i){location.href="/login";return}this.auth0.localAuthSetup(i),this.auth0.logout(i)}};t.\u0275fac=function(i){return new(i||t)(p(I),p(Je),p(W),p(U),p(Z),p(Ye))},t.\u0275cmp=y({type:t,selectors:[["ng-component"]],standalone:!1,decls:0,vars:0,template:function(i,o){},encapsulation:2});let e=t;return e})();var Zt=e=>({whitelabel:e});function $t(e,t){if(e&1&&(c(0,"div",14)(1,"div",11)(2,"div",27),a(3,"span",28),s()()()),e&2){let m=u(2);l(3),n("transloco",h(m.error))}}function Qt(e,t){if(e&1){let m=V();c(0,"div",9)(1,"div",10)(2,"div",11),a(3,"p",12),s()(),g(4,$t,4,2,"div",13),c(5,"div",14)(6,"div",11),a(7,"label",15)(8,"input",16)(9,"sa-validation-message",17),s()(),c(10,"div",14)(11,"div",18)(12,"button",19),C("click",function(){F(m);let i=u();return j(i.recover())}),s()()(),c(13,"p"),a(14,"small",20),c(15,"a",21),E(16,"transloco"),v(17,` 18 `),a(18,"small",22),v(19," "),a(20,"small",23),v(21,` 19 `),s()(),c(22,"p"),v(23,` 20 `),a(24,"small",24),v(25,` 21 `),c(26,"a",25),E(27,"transloco"),v(28,` 22 `),a(29,"small",26),v(30,` 23 `),s(),v(31,` 24 `),s()()}if(e&2){let m=u();
24n("formGroup",m.recoverForm),l(4),n("ngIf",m.error),l(5),n("control",m.recoverForm.get("email"))("messageKey","auth.recover.email"),l(3),n("disabled",m.recoverForm.invalid),l(3),n("title",h(T(16,9,"auth.login.go_to_register.link"))),l(11),n("title",h(T(27,11,"auth.register.go_to_login.link")))}}function Xt(e,t){e&1&&(c(0,"div",29)(1,"div",10)(2,"div",30)(3,"h1"),v(4,"We've sent you an email with a link allowing you to reset your password"),s()()(),c(5,"div",10)(6,"div",30)(7,"p"),v(8,"Didn't receive the email? "),c(9,"a",31),v(10,"Get help"),s()(),c(11,"p"),v(12,` 25 `),a(13,"span",24),v(14,` 26 `),c(15,"a",25),E(16,"transloco"),v(17,` 27 `),a(18,"span",26),v(19,` 28 `),s(),v(20,` 29 `),s()()()()),e&2&&(l(15),n("title",h(T(16,2,"auth.register.go_to_login.link"))))}function ei(e,t){e&1&&(c(0,"div",32)(1,"p"),a(2,"a",33),s()())}function ti(e,t){if(e&1&&a(0,"img",34),e&2){let m=u();n("src",h(m.env.CDN+"logos/pointerpro_logo_purple.png"),_)}}var at=(()=>{let t=class t{constructor(r,i,o,d){this.app=r,this.authApiService=i,this.fb=o,this.route=d,this.env=w,this.error="",this.success=!1}ngOnInit(){this.logo=this.app.getLogo(),this.buildForm()}buildForm(){let r=this.route.snapshot.queryParams.email;this.recoverForm=this.fb.group({email:[r||"",[b.required,b.email]]})}
29recover(){if(this.recoverForm.invalid)return;let r={email:this.recoverForm.get("email").value};this.authApiService.recover(r).subscribe({next:()=>this.success=!0,error:()=>this.error="auth.recover.error"})}};t.\u0275fac=function(i){return new(i||t)(p(x),p(I),p($),p(O))},t.\u0275cmp=y({type:t,selectors:[["ng-component"]],standalone:!1,decls:11,vars:9,consts:[[1,"row-container"],[1,"auth-content"],["alt","logo",3,"src"],["class","form-controls recover-form",3,"formGroup",4,"ngIf"],["class","auth-message",4,"ngIf"],["class","get-help",4,"ngIf"],[1,"auth-sidebar",3,"ngClass"],["class","logo-mobile","alt","logo",3,"src",4,"ngIf"],["transloco","auth.recover.sidebar.title"],[1,"form-controls","recover-form",3,"formGroup"],[1,"row"],[1,"col-12"],["transloco","auth.recover.intro"],["class","form-group row",4,"ngIf"],[1,"form-group","row"],["transloco","auth.recover.form.email.label",1,"bold"],["type","email","name","email","formControlName","email","saValidateOnBlur","",1,"form-control"],[3,"control","messageKey"],[1,"col-12","col-lg-6"],["transloco","auth.recover.form.submit.label",1,"btn","btn-primary",3,"click","disabled"],["transloco","auth.login.go_to_register.prefix_1"],["routerLink","/register",3,"title"],["transloco","auth.login.go_to_register.prefix_2"],["transloco","auth.login.go_to_register.prefix_3"],["transloco","auth.recover.go_to_login.prefix"],["routerLink","/login",3,"title"],["transloco","auth.register.go_to_login.link"],[1,"alert","alert-danger"],[3,"transloco"],[1,"auth-message"],[1,"col-12","text-center"],["href","mailto:[email protected]","title","Get help"],[1,"get-help"],["href","mailto:[email protected]?subject=Help","transloco","auth.helper"],["alt","logo",1,"logo-mobile",3,"src"]],template:function(i,o){i&1&&(c(0,"div",0)(1,"div",1)(2,"header"),a(3,"img",2),s(),g(4,Qt,32,13,"div",3)(5,Xt,21,4,"div",4)(6,ei,3,0,"div",5),s(),c(7,"div",6)(8,"div"),g(9,ti,1,2,"img",7),a(10,"h1",8),s()()()),i&2&&(l(3),n("src",h(o.logo),_),l(),n("ngIf",!o.success),l(),n("ngIf",o.success),l(),n("ngIf",o.app.isWhiteLabel===!1),l(),n("ngClass",A(7,Zt,o.app.isWhiteLabel===!0)),l(2),n("ngIf",o.app.isWhiteLabel===!1))},dependencies:[N,R,M,B,G,z,q,L,K,ye,J,Y],encapsulation:2});let e=t;return e})();var ii=new ae("recaptcha-language"),ri=new ae("recaptcha-base-url"),oi=new ae("recaptcha-nonce-tag");var Ce=new ae("recaptcha-v3-site-key"),ni=new ae("recaptcha-loader-options");function ai(e,t,m,{url:r,lang:i,nonce:o}={}){window.ng2recaptchaloaded=()=>{m(grecaptcha)};let d=document.createElement("script");d.innerHTML="";let{url:f,nonce:S}=t(new URL(r||"https://www.google.com/recaptcha/api.js"));f.searchParams.set("render",e==="explicit"?e:e.key),f.searchParams.set("onload","ng2recaptchaloaded"),f.searchParams.set("trustedtypes","true"),i&&f.searchParams.set("hl",i),d.src=f.href;let k=S||o;k&&d.setAttribute("nonce",k),d.async=!0,d.defer=!0,document.head.appendChild(d)}function si({v3SiteKey:e,onBeforeLoad:t,onLoaded:m}){let r=e?{key:e}:"explicit";st.loadScript(r,t,m)}var st={loadScript:ai,newLoadScript:si};function ci(e){return e.asObservable().pipe(Le(t=>t!==null))}var ct=(()=>{let t=class t{constructor(r,i,o,d,f,S){this.platformId=r,this.language=i,this.baseUrl=o,this.nonce=d,this.v3SiteKey=f,this.options=S;let k=this.init();this.ready=k?ci(k):fe()}init(){if(t.ready)return t.ready;if(!De(this.platformId))return;let r=new Re(null);return t.ready=r,st.newLoadScript({v3SiteKey:this.v3SiteKey,onBeforeLoad:i=>{if(this.options?.onBeforeLoad)return this.options.onBeforeLoad(i);let o=new URL(this.baseUrl??i);return this.language&&o.searchParams.set("hl",this.language),{url:o,nonce:this.nonce}},onLoaded:i=>{let o=i;this.options?.onLoaded&&(o=this.options.onLoaded(i)),r.next(o)}}),r}};t.ready=null,t.\u0275fac=function(i){return new(i||t)(P(ke),P(ii,8),P(ri,8),P(oi,8),P(Ce,8),P(ni,8))},t.\u0275prov=le({token:t,factory:t.\u0275fac});let e=t;return e})();var je=(()=>{let t=class t{constructor(r,i,o){this.recaptchaLoader=i,this.zone=r,this.siteKey=o,this.init()}get onExecute(){return this.onExecuteSubject||(this.onExecuteSubject=new he,this.onExecuteObservable=this.onExecuteSubject.asObservable()),this.onExecuteObservable}get onExecuteError(){return this.onExecuteErrorSubject||(this.onExecuteErrorSubject=ne
29w he,this.onExecuteErrorObservable=this.onExecuteErrorSubject.asObservable()),this.onExecuteErrorObservable}execute(r){let i=new he;return this.grecaptcha?this.executeActionWithSubject(r,i):(this.actionBacklog||(this.actionBacklog=[]),this.actionBacklog.push([r,i])),i.asObservable()}executeActionWithSubject(r,i){let o=d=>{this.zone.run(()=>{i.error(d),this.onExecuteErrorSubject&&this.onExecuteErrorSubject.next({action:r,error:d})})};this.zone.runOutsideAngular(()=>{try{this.grecaptcha.execute(this.siteKey,{action:r}).then(d=>{this.zone.run(()=>{i.next(d),i.complete(),this.onExecuteSubject&&this.onExecuteSubject.next({action:r,token:d})})},o)}catch(d){o(d)}})}init(){this.recaptchaLoader.ready.subscribe(r=>{this.grecaptcha=r,this.actionBacklog&&this.actionBacklog.length>0&&(this.actionBacklog.forEach(([i,o])=>this.executeActionWithSubject(i,o)),this.actionBacklog=void 0)})}};t.\u0275fac=function(i){return new(i||t)(P(Ne),P(ct),P(Ce))},t.\u0275prov=le({token:t,factory:t.\u0275fac});let e=t;return e})(),lt=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=se({type:t}),t.\u0275inj=ne({providers:[je,ct]});let e=t;return e})();var mi=e=>({whitelabel:e}),mt=e=>({plan:e});function pi(e,t){if(e&1&&a(0,"p",32),e&2){let m=u();n("translocoParams",A(1,mt,m.plan))}}function di(e,t){if(e&1&&a(0,"p",33),e&2){let m=u();n("translocoParams",A(1,mt,m.plan))}}function ui(e,t){if(e&1&&(c(0,"div",9)(1,"div",5)(2,"div",34),a(3,"span",19),E(4,"transloco"),E(5,"trustHtml"),s()()()),e&2){let m=u();l(3),n("innerHTML",T(5,3,T(4,1,m.error)),me)}}function hi(e,t){e&1&&(c(0,"div",35)(1,"p"),a(2,"a",36),s()())}function fi(e,t){if(e&1&&a(0,"img",37),e&2){let m=u();n("src",h(m.env.CDN+"logos/pointerpro_logo_purple.png"),_)}}var pt=(()=>{let t=class t{constructor(r,i,o,d,f,S,k,Ie,Ae,Ee,bt,_t,yt){this.app=r,this.authApiService=i,this.currentRoute=o,this.fb=d,this.router=f,this.userService=S,this.utils=k,this.event=Ie,this.dateTime=Ae,this.featureFlagService=Ee,this.hubspot=bt,this.recaptchaV3Service=_t,this.reditusService=yt,this.env=w,this.plan="",this.isTrial=!1,this.origin="",this.survey="",this.busy=!1,this.error=""}ngOnInit(){if(this.app.isWhiteLabel){this.router.navigate(["login"]);return}this.logo=this.app.getLogo();let r=this.utils.fetchUrlParams(this.currentRoute);this.plan=r.plan,this.isTrial=!!r.trial,this.origin=r.origin,this.survey=r.survey,this.buildForm(r.email)}buildForm(r=""){this.registerForm=this.fb.group({name:["",[b.required,b.maxLength(45)]],email:[r,[b.required,b.email]],password:["",[b.required,b.minLength(12)]],acceptTOU:[!1,[b.requiredTrue]]})}
29register(){if(this.registerForm.invalid){for(let d of Object.keys(this.registerForm.controls))this.registerForm.controls[d].markAsTouched();return}if(document.getElementById("email").value){this.error="auth.register.form.validation.bot";let d=this.registerForm.get("email").value;throw Error(`Bot signup with email ${d}`)}this.busy=!0;let i={name:this.registerForm.get("name").value,email:this.registerForm.get("email").value,password:this.registerForm.get("password").value,timezone:this.dateTime.getTimezoneGuess()};this.plan&&(i.plan=this.plan),this.isTrial&&(i.trial=this.isTrial),this.origin&&(i.origin=this.origin),this.survey&&(i.survey=this.survey);let o=this.recaptchaV3Service.execute("importantAction").subscribe({next:d=>{i.recaptcha_token=d,this.authApiService.register(i).subscribe({next:f=>{let S=f.user,k=f.token;this.userService.login(S,k),this.hubspot.boot(S),this.app.bootGoogleTagManager(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"eventTracking",category:"signup",action:"freesignup",label:""}),this.reditusService.trackUser(S),this.event.trigger("auth.register"),this.plan&&!this.isTrial?this.router.navigate(["/pricing"],{queryParams:{plan:this.plan}}):this.router.navigate(["/questionnaires"],{queryParams:{origin:"register"}}),this.busy=!1,o.unsubscribe()},error:f=>{if(f.errors){let k=f.errors.name||f.errors.email||f.errors.password||f.errors.recaptcha_token;this.error=k[0]||f.message,this.busy=!1;return}let S={user_exists:"auth.register.form.validation.user_exists",suspicious_activity:"auth.register.form.validation.suspicious_activity",fraud_detected:"auth.register.form.validation.fraud_detected",recaptcha_failure:"auth.register.form.validation.recaptcha_failure"};this.error=S[f.key]||f.message,this.busy=!1,o.unsubscribe()}})},error:()=>{this.error="auth.register.form.validation.recaptcha_failure",this.busy=!1,o.unsubscribe()}})}};t.\u0275fac=function(i){return new(i||t)(p(x),p(I),p(O),p($),p(U),p(Z),p(X),p(ze),p(ge),p(be),p(ve),p(je),p(Ke))},t.\u0275cmp=y({type:t,selectors:[["ng-component"]],standalone:!1,decls:48,vars:26,consts:[[1,"row-container"],[1,"auth-content"],["alt","logo",3,"src"],[1,"form-controls","register-form",3,"formGroup"],[1,"row"],[1,"col-12"],["transloco","auth.register.intros.plan",3,"translocoParams",4,"ngIf"],["transloco","auth.register.intros.trial",3,"translocoParams",4,"ngIf"],["class","form-group row",4,"ngIf"],[1,"form-group","row"],["for","nameoriginal","transloco","auth.register.form.name.label",1,"bold"],["
29id","nameoriginal","type","text","data-cy","name","formControlName","name","placeholder","John",1,"form-control"],[3,"control","messageKey"],["for","emailoriginal","transloco","auth.register.form.email.label",1,"bold"],["id","emailoriginal","type","email","data-cy","email","formControlName","email","placeholder","[email protected]",1,"form-control"],["for","passwordoriginal","transloco","auth.register.form.password.label",1,"bold"],[1,"input-group"],["id","passwordoriginal","data-cy","password","type","password","formControlName","password",1,"form-control"],[1,"form-element","v-center-label"],[3,"innerHTML"],["data-cy","toc-toggle","formControlName","acceptTOU",3,"id"],["for","email",1,"ohnohoney"],["autocomplete","off","type","text","id","email","name","email","readonly","",1,"ohnohoney"],["data-cy","register-btn","transloco","auth.register.form.submit.label",1,"btn","btn-primary",3,"click","disabled"],["transloco","auth.register.go_to_login.prefix"],["routerLink","/login",3,"title"],["transloco","auth.register.go_to_login.link"],["class","get-help",4,"ngIf"],[1,"auth-sidebar",3,"ngClass"],["class","logo-mobile","alt","logo",3,"src",4,"ngIf"],["transloco","auth.register.intros.default"],["transloco","auth.register.intros.sign_up",1,"register"],["transloco","auth.register.intros.plan",3,"translocoParams"],["transloco","auth.register.intros.trial",3,"translocoParams"],[1,"alert","alert-danger"],[1,"get-help"],["href","mailto:[email protected]?subject=Help","transloco","auth.helper"],["alt","logo",1,"logo-mobile",3,"src"]],template:function(i,o){i&1&&(c(0,"div",0)(1,"div",1)(2,"header"),a(3,"img",2),s(),c(4,"div",3)(5,"div",4)(6,"div",5),g(7,pi,1,3,"p",6)(8,di,1,3,"p",7),s()(),g(9,ui,6,5,"div",8),c(10,"div",9)(11,"div",5),a(12,"label",10)(13,"input",11)(14,"sa-validation-message",12),s()(),c(15,"div",9)(16,"div",5),a(17,"label",13)(18,"input",14)(19,"sa-validation-message",12),s()(),c(20,"div",9)(21,"div",5),a(22,"label",15),c(23,"div",16),a(24,"input",17),s(),a(25,"sa-validation-message",12),s()(),c(26,"div",9)(27,"div",5)(28,"div",18),a(29,"label",19),E(30,"transloco"),a(31,"sa-toggle-button",20),s()()(),a(32,"label",21)(33,"input",22),c(34,"div",9)(35,"div",5)(36,"button",23),C("click",function(){return o.register()}),s()()(),c(37,"p"),a(38,"small",24),c(39,"a",25),E(40,"transloco"),a(41,"small",26),s()()(),g(42,hi,3,0,"div",27),s(),c(43,"div",28)(44,"div"),g(45,fi,1,2,"img",29),a(46,"h2",30)(47,"h1",31),s()()()),i&2&&(l(3),n("src",h(o.logo),_),l(),n("formGroup",o.registerForm),l(3),n("ngIf",!o.isTrial&&o.plan&&(o.plan==="essential"||o.plan==="professional")),l(),n("ngIf",o.isTrial&&o.plan&&(o.plan==="essential"||o.plan==="professional")),l(),n("ngIf",o.error),l(5),n("control",o.registerForm.controls.name)("messageKey","auth.register.name"),l(5),n("control",o.registerForm.controls.email)("messageKey","auth.register.email"),l(6),n("control",o.registerForm.controls.password)("messageKey","auth.register.password"),l(4),n("innerHTML",T(30,20,"auth.register.form.accept_tou.label"),me),l(2),n("id","toc"),l(5),n("disabled",o.registerForm.invali
29d||o.busy),l(3),n("title",h(T(40,22,"auth.register.go_to_login.link"))),l(3),n("ngIf",o.app.isWhiteLabel===!1),l(),n("ngClass",A(24,mi,o.app.isWhiteLabel===!0)),l(2),n("ngIf",o.app.isWhiteLabel===!1))},dependencies:[N,R,M,B,G,z,q,L,K,J,$e,Y,Qe],encapsulation:2});let e=t;return e})();var gi=e=>({whitelabel:e});function vi(e,t){if(e&1&&(c(0,"div",15)(1,"div",12)(2,"div",34),a(3,"span",35),s()()()),e&2){let m=u(2);l(3),n("transloco",h(m.error))}}function bi(e,t){e&1&&a(0,"input",36)}function _i(e,t){e&1&&a(0,"input",37)}function yi(e,t){e&1&&a(0,"input",38)}function wi(e,t){e&1&&a(0,"input",39)}function Si(e,t){if(e&1){let m=V();c(0,"div",10)(1,"div",11)(2,"div",12),a(3,"p",13),s()(),g(4,vi,4,2,"div",14),c(5,"div",15)(6,"div",12)(7,"span",16),a(8,"sa-app-icon",17),v(9,"\xA0"),a(10,"span",18),s()()(),c(11,"div",19),a(12,"label",20),c(13,"div",21),g(14,bi,1,0,"input",22)(15,_i,1,0,"input",23),c(16,"div",24)(17,"button",25),C("click",function(){F(m);let i=u();return j(i.showPassword=!i.showPassword)}),a(18,"sa-app-icon",17),s()()(),a(19,"sa-validation-message",26),s(),c(20,"div",19),a(21,"label",27),c(22,"div",21),g(23,yi,1,0,"input",28)(24,wi,1,0,"input",29),c(25,"div",24)(26,"button",25),C("click",function(){F(m);let i=u();return j(i.showPasswordConfirmation=!i.showPasswordConfirmation)}),a(27,"sa-app-icon",17),s()()(),a(28,"sa-validation-message",26),s(),c(29,"div",19)(30,"button",30),C("click",function(){F(m);let i=u();return j(i.reset())}),s()(),c(31,"p"),v(32,` 30 `),a(33,"small",31),v(34,` 31 `),c(35,"a",32),E(36,"transloco"),v(37,` 32 `),a(38,"small",33),v(39,` 33 `),s(),v(40,` 34 `),s()()}if(e&2){let m=u();n("formGroup",m.resetForm),l(4),n("ngIf",m.error),l(4),n("name","info"),l(6),n("ngIf",!m.showPassword),l(),n("ngIf",m.showPassword),l(3),n("name","eye"),l(),n("control",m.resetForm.controls.password)("messageKey","auth.reset.password"),l(4),n("ngIf",!m.showPasswordConfirmation),l(),n("ngIf",m.showPasswordConfirmation),l(3),n("name","eye"),l(),n("control",m.resetForm.controls.passwordConfirmation)("messageKey","auth.reset.password"),l(2),n("disabled",m.resetForm.invali
34d),l(5),n("title",h(T(36,16,"auth.register.go_to_login.link")))}}function Ci(e,t){e&1&&(c(0,"div",40)(1,"div",11)(2,"div",12),a(3,"h1",41),s()(),c(4,"div",11)(5,"div",12),a(6,"a",42),s()()())}function xi(e,t){e&1&&(c(0,"div",43)(1,"div",11)(2,"div",44),a(3,"h1",45),s()(),c(4,"div",11)(5,"div",44),a(6,"a",46),s()()())}function Ii(e,t){e&1&&(c(0,"div",47)(1,"p"),a(2,"a",48),s()())}function Ai(e,t){if(e&1&&a(0,"img",49),e&2){let m=u();n("src",h(m.env.CDN+"logos/pointerpro_logo_purple.png"),_)}}var dt=(()=>{let t=class t{constructor(r,i,o,d,f){this.app=r,this.api=i,this.currentRoute=o,this.fb=d,this.utils=f,this.env=w,this.error="",this.success=!1,this.showPassword=!1,this.showPasswordConfirmation=!1,this.resetCode=""}ngOnInit(){this.logo=this.app.getLogo();let r=this.utils.fetchUrlParams(this.currentRoute);this.resetCode=r.code,this.buildForm()}buildForm(){this.resetForm=this.fb.group({password:["",[b.required,b.minLength(8),b.maxLength(200),H.capitals(1),H.numbers(1)]],passwordConfirmation:["",[b.required,b.minLength(8),b.maxLength(200),H.capitals(1),H.numbers(1)]]})}
34reset(){if(this.resetForm.invalid)return;let r={code:this.resetCode,password:this.resetForm.get("password").value,password_confirmation:this.resetForm.get("passwordConfirmation").value};this.api.reset(r).subscribe({next:()=>this.success=!0,error:i=>this.error=i.error})}};t.\u0275fac=function(i){return new(i||t)(p(x),p(I),p(O),p($),p(X))},t.\u0275cmp=y({type:t,selectors:[["ng-component"]],standalone:!1,decls:12,vars:10,consts:[[1,"row-container"],[1,"auth-content"],["alt","logo",3,"src"],["class","form-controls reset-form",3,"formGroup",4,"ngIf"],["class","form-controls auth-message justify-content-center align-items-center",4,"ngIf"],["class","form-controls auth-message",4,"ngIf"],["class","get-help",4,"ngIf"],[1,"auth-sidebar",3,"ngClass"],["class","logo-mobile","alt","logo",3,"src",4,"ngIf"],["transloco","auth.reset.sidebar.title"],[1,"form-controls","reset-form",3,"formGroup"],[1,"row"],[1,"col-12"],["transloco","auth.reset.intro"],["class","form-group row",4,"ngIf"],[1,"form-group","row"],[1,"help-block"],[3,"name"],["transloco","auth.reset.form.password.helper"],[1,"form-group"],["transloco","auth.reset.form.password.label",1,"bold"],[1,"input-group"],["type","password","name","password","class","form-control","formControlName","password",4,"ngIf"],["type","text","name","password","class","form-control","formControlName","password",4,"ngIf"],[1,"input-group-append"],["type","button",1,"btn","btn-plain","show-password-btn",3,"click"],[3,"control","messageKey"],["transloco","auth.reset.form.password_confirmation.label",1,"bold"],["type","password","name","passwordConfirmation","class","form-control","formControlName","passwordConfirmation",4,"ngIf"],["type","text","name","passwordConfirmation","class","form-control","formControlName","passwordConfirmation",4,"ngIf"],["transloco","auth.reset.form.submit.label",1,"btn","btn-primary",3,"click","disabled"],["transloco","auth.recover.go_to_login.prefix"],["routerLink","/login",3,"title"],["transloco","auth.register.go_to_login.link"],[1,"alert","alert-danger"],[3,"transloco"],["type","password","name","password","formControlName","password",1,"form-control"],["type","text","name","password","formControlName","password",1,"form-control"],["type","password","name","passwordConfirmation","formControlName","passwordConfirmation",1,"form-control"],["type","text","name","passwordConfirmation","formControlName","passwordConfirmation",1,"form-control"],[1,"form-controls","auth-message","justify-content-center","align-items-center"],["transloco","auth.reset.messages.fail.text"],["routerLink","/recover","transloco","auth.reset.messages.fail.cta",1,"btn","btn-primary"],[1,"form-controls","auth-message"],[1,"col-12","text-center"],["transloco","auth.reset.messages.success.text"],["routerLink","/login","transloco","auth.reset.messages.success.cta",1,"btn","btn-primary"],[1,"get-help"],["href","mailto:[email protected]?subject=Help","transloco","auth.helper"],["alt","logo",1,"logo-mobile",3,"src"]],template:function(i,o){i&1&&(c(0,"div",0)(1,"div",1)(2,"header"),a(3,"img",2),s(),g(4,Si,41,18,"div",3)(5,Ci,7,0,"div",4)(6,xi,7,0,"div",5)(7,Ii,3,0,"div",6),s(),c(8,"div",7)(9,"div"),g(10,Ai,1,2,"img",8),a(11,"h1",9),s()()()),i&2&&(l(3),n("src",h(o.logo),_),l(),n("ngIf",o.resetCode&&!o.success),l(),n("ngIf",!o.resetCode),l(),n("ngIf",o.success),l(),n("ngIf",o.app.isWhiteLabel===!1),l(),n("ngClass",A(8,gi,o.app.isWhiteLabel===!0)),l(2),n("ngIf",o.app.isWhiteLabel===!1))},dependencies:[N,R,M,B,G,z,q,L,_e,K,J,Y],encapsulation:2});let e=t;return e})();var Ei=e=>({whitelabel:e});function Ti(e,t){if(e&1){let m=V();c(0,"div")(1,"div",7)(2,"div",8)(3,"h5"),a(4,"strong",9),s()()(),c(5,"div",7)(6,"div",8),a(7,"p",10),s()(),c(8,"div",11)(9,"div",8)(10,"a",12),C("click",function(){F(m);let i=u();return j(i.sendNotification())}),s()()()()}}function Fi(e,t){e&1&&(c(0,"div")(1,"div",7)(2,"div",13),a(3,"h1",14),s()(),c(4,"div",7)(5,"div",13),a(6,"p",15),E(7,"transloco"),s()()()),e&2&&(l(6),n("innerHTML",T(7,1,"auth.verification-required.message.resend.text"),me))}function ji(e,t){if(e&1&&a(0,"img",16),e&2){let m=u();n("src",h(m.env.CDN+"logos/pointerpro_logo_purple.png"),_)}}var ht=(()=>{let t=class t{constructor(r,i,o,d){this.app=r,this.api=i,this.router=o,this.userApi=d,this.env=w,this.error=!1,this.success=!1}ngOnInit(){this.logo=this.app.getLogo(),this.userApi.getUser().subscribe(r=>{r.verified===!0&&this.router.navigate(["/home"])})}sendNotification(){this.api.sendEmailVerificationNotification().subscribe({next:()=>{this.error=!1,this.success=!0},error:r=>{console.error(r),this.error=!0}})}};t.\u0275fac=function(i){return new(i||t)(p(x),p(I),p(U),p(ee))},t.\u0275cmp=y({type:t,selectors:[["ng-component"]],standalone:!1,decls:10,vars:8,consts:[[1,"row-container"],[1,"auth-content"],["alt","logo",3,"src"],[4,"ngIf"],[1,"auth-sidebar",3,"ngClass"],["class","logo-mobile","alt","logo",3,"src",4,"ngIf"],["transloco","auth.verification-required.sidebar.title"],[1,"row"],[1,"col-12","col-lg-6"],["transloco","auth.verification-required.intros.default"],["transloco","auth.verification-required.text.default"],[1,"form-group","row"],["transloco","auth.verification-required.resend.label",1,"btn","btn-primary",3,"click"],[1,"col-12","text-center"],["transloco","auth.verification-required.message.resend.label"],[3,"innerHTML"],["alt","logo",1,"logo-mobile",3,"src"]],template:function(i,o){i&1&&(c(0,"div",0)(1,"div",1)(2,"header"),a(3,"img",2),s(),g(4,Ti,11,0,"div",3)(5,Fi,8,3,"div",3),s(),c(6,"div",4)(7,"div"),g(8,ji,1,2,"img",5),a(9,"h1",6),s()()()),i&2&&(l(3),n("src",h(o.logo),_),l(),n("ngIf",o.success===!1),l(),n("ngIf",o.success===!0),l(),n("ngClass",A(6,Ei,o.app.isWhiteLabel===!0)),l(2),n("ngIf",o.app.isWhiteLabel===!1))},dependencies:[N,R,L,Y],encapsulation:2});let e=t;return e})();var Ri=e=>({whitelabel:e});function Li(e,t){e&1&&(c(0,"div",11)(1,"div",4),a(2,"p",12),s()())}function ki(e,t){e&1&&(c(0,"div",11)(1,"div",4)(2,"div",13),a(3,"span",14),s()()())}function Ni(e,t){if(e&1&&(c(0,"div")(1,"div",11)(2,"div",4)(3,"div",15),a(4,"span",16),s()()(),c(5,"div",11)(6,"div",4),a(7,"a",17),s()()()),e&2){let m=u();l(4),n("transloco",h(m.error))}}function Ui(e,t){if(e&1&&a(0,"img",18),e&2){let m=u();n("src",h(m.env.CDN+"logos/pointerpro_logo_purple.png"),_)}}var ft=(()=>{let t=class t{constructor(r,i,o,d,f,S){this.app=r,this.api=i,this.route=o,this.router=d,this.userApi=f,this.userService=S,this.env=w,this.success=!1,this.error=""}ngOnInit(){this.logo=this.app.getLogo(),this.userApi.getUser().subscribe(r=>{if(r.verified===!0){this.router.navigate(["/home"]);return}this.verify()})}verify(){this.route.params.subscribe(r=>{this.api.verifyEmail(r.hash,r.code).subscribe({next:()=>{this.success=!0;let i=this.userService.getUser();i&&(i.verified=!0,this.userService.setUser(i)),setTimeout(()=>{this.router.navigate(["/home"])},5e3)},error:i=>this.error=i.error})})}};t.\u0275fac=function(i){return new(i||t)(p(x),p(I),p(O),p(U),p(ee),p(Z))},t.\u0275cmp=y({type:t,selectors:[["ng-component"]],standalone:!1,decls:15,vars:9,consts:[[1,"row-container"],[1,"auth-content"],["alt","logo",3,"src"],[1,"row"],[1,"col-12"],["transloco","auth.verify.intros.default"],["class","form-group row",4,"ngIf"],[4,"ngIf"],[1,"auth-sidebar",3,"ngClass"],["class","logo-mobile","alt","logo",3,"src",4,"ngIf"],["transloco","auth.verify.sidebar.title"],[1,"form-group","row"],["transloco","auth.verify.loading.default"],[1,"alert","alert-success","text-white"],["transloco","auth.verify.success.default"],[1,"alert","alert-danger"],[3,"transloco"],["transloco","auth.verify.go_back.label","href","/ver
34ify",1,"btn","btn-primary"],["alt","logo",1,"logo-mobile",3,"src"]],template:function(i,o){i&1&&(c(0,"div",0)(1,"div",1)(2,"header"),a(3,"img",2),s(),c(4,"div",3)(5,"div",4)(6,"h5"),a(7,"strong",5),s()()(),g(8,Li,3,0,"div",6)(9,ki,4,0,"div",6)(10,Ni,8,2,"div",7),s(),c(11,"div",8)(12,"div"),g(13,Ui,1,2,"img",9),a(14,"h1",10),s()()()),i&2&&(l(3),n("src",h(o.logo),_),l(5),n("ngIf",o.success===!1&&o.error.length===0),l(),n("ngIf",o.success),l(),n("ngIf",o.error),l(),n("ngClass",A(7,Ri,o.app.isWhiteLabel===!0)),l(2),n("ngIf",o.app.isWhiteLabel===!1))},dependencies:[N,R,L],encapsulation:2});let e=t;return e})();var xe=(()=>{let t=class t{constructor(r,i){this.http=r,this.apiService=i}submitImpersonateReason(r){return this.http.post(`${this.apiService.getV3ApiDomain()}audit/impersonate`,{reason:r},{headers:this.apiService.addSaTokenHttpHeader()})}};t.\u0275fac=function(i){return new(i||t)(P(Oe),P(Be))},t.\u0275prov=le({token:t,factory:t.\u0275fac});let e=t;return e})();function Vi(e,t){if(e&1&&(c(0,"div",9)(1,"div",6)(2,"div",17),a(3,"span",18),s()()()),e&2){let m=u(2);l(3),n("transloco",h(m.error))}}function Di(e,t){if(e&1){let m=V();c(0,"div",1)(1,"div",2)(2,"header"),a(3,"img",3),s(),c(4,"div",4)(5,"div",5)(6,"div",6),a(7,"p",7),s()(),g(8,Vi,4,2,"div",8),c(9,"div",9)(10,"div",6),a(11,"label",10)(12,"textarea",11)(13,"sa-validation-message",12),s()(),c(14,"div",9)(15,"div",6)(16,"button",13),C("click",function(){F(m);let i=u();return j(i.submit())}),s()()()()(),c(17,"div",14)(18,"div"),a(19,"img",15)(20,"h1",16),s()()()}if(e&2){let m=u();l(),n("formGroup",m.form),l(2),n("src",h(m.logo),_),l(5),n("ngIf",m.error),l(5),n("control",m.form.controls.reason)("messageKey","auth.impersonating.reason"),l(3),n("disabled",m.form.invalid),l(3),n("src",h(m.env.CDN+"logos/pointerpro_logo_purple.png"),_)}}var gt=(()=>{let t=class t{constructor(r,i,o,d,f,S,k){this.app=r,this.userService=i,this.userApiService=o,this.router=d,this.fb=f,this.auditApiService=S,this.localStorage=k,this.env=w,this.error=""}ngOnInit(){this.logo=this.app.getLogo();let r=this.userService.getUser();(r?fe(r):this.userApiService.getUser()).subscribe(o=>{let d=o.is_ghost_user||!1;if(d===!1||d===!0&&o.has_impersonating_reason===!0){this.router.navigate(["/home"]);return}let f=this.localStorage.getItem(W.IMPERSONATE_REASONS,!0)||{};this.form=this.fb.group({reason:this.fb.control(f[o.organization_id]||"",{validators:[b.required,b.maxLength(255)]})})})}submit(){this.auditApiService.submitImpersonateReason(this.form.controls.reason.value).subscribe({next:()=>{let r=this.userService.getUser();r.has_impersonating_reason=!0,this.userService.setUser(r);let i=this.localStorage.getItem(W.IMPERSONATE_REASONS,!0)||{};i[r.organization_id]=this.form.controls.reason.value,this.localStorage.setItem(W.IMPERSONATE_REASONS,JSON.stringify(i)),this.router.navigate(["/home"])},error:r=>{this.error=r.error}})}};t.\u0275fac=function(i){return new(i||t)(p(x),p(Z),p(ee),p(U),p(He),p(xe),p(W))},t.\u0275cmp=y({type:t,selectors:[["ng-component"]],standalone:!1,decls:1,vars:1,consts:[["class","row-container",4,"ngIf"],[1,"row-container"],["id","impersonate",1,"auth-content",3,"formGroup"],["alt","logo",3,"src"],[1,"form-container"],[1,"row"],[1,"col-12"],["transloco","auth.impersonate.description"],["class","form-group row",4,"ngIf"],[1,"form-group","row"],["for","reason","transloco","auth.impersonate.form.reason.label",1,"bold"],["
34id","reason","type","text","name","reason","formControlName","reason",1,"form-control"],[3,"control","messageKey"],["data-cy","login-btn","type","submit","transloco","auth.impersonate.form.submit.label",1,"btn","btn-primary",3,"click","disabled"],[1,"auth-sidebar"],["alt","logo",1,"logo-mobile",3,"src"],["transloco","auth.impersonate.sidebar.title"],[1,"alert","alert-danger"],[3,"transloco"]],template:function(i,o){i&1&&g(0,Di,21,9,"div",0),i&2&&n("ngIf",o.form)},dependencies:[R,M,B,G,z,q,L,K],styles:[`.auth-content#impersonate[_ngcontent-%COMP%]{display:block}.auth-content[_ngcontent-%COMP%] .form-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;justify-content:center} 35/*# sourceMappingURL=impersonate-reason.component-OQNB37OT.css.map */`]});let e=t;return e})();var Oi=[{path:"",component:ce,canActivate:[we],children:[{path:"",redirectTo:"login",pathMatch:"full"},{path:"login",component:ot},{path:"register",component:pt},{path:"recover",component:at},{path:"reset",component:dt},{path:"activate",component:rt}]},{path:"verify",canActivate:[pe],component:ce,children:[{path:"",component:ht},{path:":hash/:code",component:ft}]},{path:"impersonate-reason",canActivate:[pe],component:ce,children:[{path:"",component:gt}]},{path:"two-factor-authentication",component:ce,loadChildren:()=>import("./chunk-GGINHIDI.js").then(e=>e.AuthTwoFactorAuthenticationModule)},{path:"reset-expired-password",component:ce,loadChildren:()=>import("./chunk-AL7D3EWR.js").then(e=>e.ExpiredPasswordModule)},{path:"logout",component:nt}],vt=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=se({type:t}),t.\u0275inj=ne({imports:[Te.forChild(Oi),Te]});let e=t;return e})();var Sa=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=se({type:t}),t.\u0275inj=ne({providers:[I,xe,we,ee,pe,it,{provide:Ce,useValue:w.google.recaptcha_v3.site_key}],imports:[Xe,vt,tt,et,lt]});let e=t;return e})();export{Sa as AuthModule}; 36//# sourceMappingURL=chunk-RZRFD2RN.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.