import{Fa as f,p as h}from"./chunk-RTOZFW5D.js";import{a as v}from"./chunk-QF2OXJMJ.js";import{C as g}from"./chunk-3T7NQNCJ.js";import{j as a}from"./chunk-SGK554CS.js";import{e as s,j as t}from"./chunk-YR2ZOLW3.js";import{fa as c,x as n}from"./chunk-VI2VOVRS.js";var b=(()=>{class e{constructor(o,i,r,m){this.authenticationService=o,this.navigationService=i,this.botsService=r,this.configService=m}canActivate(o){let i=this.authenticationService.isLogged();if(!i)if(this.botsService.isBot())this.botsService.setUnauthorized();else{if(this.configService.getLoginType()===a.OpenID)return this.authenticationService.$tokenResponse.pipe(c(1),n(()=>(this.authenticationService.isLogged()||this.navigationService.goToHome(),!0)));this.navigationService.goToHomeWithOpenLogin(o)}return i}static{this.\u0275fac=function(i){return new(i||e)(t(f),t(h),t(v),t(g))}}static{this.\u0275prov=s({token:e,factory:e.\u0275fac})}}return e})();export{b as a};