import{D as c,E as l}from"./chunk-INYFUTXB.js";import{Kh as r,Lh as u,g as t,h as f}from"./chunk-2GUKPKKM.js";import{Sd as d,ta as o,ya as h}from"./chunk-XJKQ67XR.js";import{a,e as m}from"./chunk-SZAW6ZBW.js";var I,A=m(()=>{f();u();d();l();I=(()=>{class n{constructor(i){this.serverInformationService=i,this.subscribeToPublicServerInformationChange()}getMainAuthentication(){let i;return this.authenticationsDetails.forEach(e=>{if(e.type===t.Domain){let s=e.domains?.find(v=>v.isMain===!0);s&&(i=new r(a({},e)),i.domains=[s])}else e.isMain===!0&&(i=new r(e))}),i}subscribeToPublicServerInformationChange(){this.serverInformationService.publicServerInformationChange.subscribe(i=>this.initServerProperties(i))}initServerProperties(i){this.serverVersion=i?.version,this.authenticationsDetails=i?.authenticationsDetails??[],this.hasAuthenticationWithAD=!!i?.authenticationsDetails.find(e=>e.type===t.Domain),this.hasAuthenticationAzureAD=this.serverInformationService.isAuthenticationProviderEnabled(t.AzureAD),this.hasAuthenticationWithDvls=this.serverInformationService.isAuthenticationProviderEnabled(t.Builtin),this.hasAuthenticationWithDatabase=this.serverInformationService.isAuthenticationProviderEnabled(t.SqlServer),this.hasAuthenticationWithOkta=this.serverInformationService.isAuthenticationProviderEnabled(t.Okta),this.hasAuthenticationWithPingOne=this.serverInformationService.isAuthenticationProviderEnabled(t.PingOne),this.hasAuthenticationWithContractor=this.serverInformationService.isAuthenticationProviderEnabled(t.Contractor),this.hasEmergencyLogin=i?.enableEmergencyLogin||!1,this.hasServerInformationError=this.serverInformationService?.hasError,this.isSSOEnabled=i?.windowsAuthenticationEnabled??!1,this.hideDomainLoginWhenSSOEnabled=i?.hideDomainLoginWhenSSOEnabled??!1,this.serverCustomImage=i?.serverLogoLarge?`data:image/png;base64,${this.serverInformationService.publicServerInformation.serverLogoLarge}`:""}static{this.\u0275fac=function(e){return new(e||n)(h(c))}}static{this.\u0275prov=o({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})()});export{I as a,A as b};
