import{a as U,b as $,c as F}from"./chunk-3K6JMQJG.js";import{B as N,C as G,P as D,Q as T}from"./chunk-DCSOZT4N.js";import{Aj as W,Bj as C,kg as O,lg as k,s as j,t as y}from"./chunk-5XZEGBWY.js";import{g as I,h as B}from"./chunk-AIHAZUSZ.js";import{b as w,c as A}from"./chunk-IOINCEV4.js";import{Gd as p,R as d,T as b,Ya as v,g as S,h as s,ha as m,ka as c,ma as f,na as x,sa as n,x as a,xa as h,ya as o}from"./chunk-JSJB5BKT.js";import{a as g,b as l,e as u}from"./chunk-SZAW6ZBW.js";var z,E=u(()=>{f();p();z=(()=>{class i{constructor(){this.toggleWhatsNewSubject=new s({visible:!1,section:"releaseNotes"}),this._sectionToShow=null,this.toggleWhatsNewIconSubject=new s(!1)}get toggleWhatsNew$(){return this.toggleWhatsNewSubject.asObservable()}toggleWhatsNew(e=!0,t){this.toggleWhatsNewSubject.next({visible:e,section:t})}get toggleWhatsNewIcon$(){return this.toggleWhatsNewIconSubject.asObservable()}toggleWhatsNewIcon(e=!0){this.toggleWhatsNewIconSubject.next(e)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=n({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})()});var ie,M=u(()=>{p();C();k();x();y();f();F();T();G();p();A();B();ie=(()=>{class i extends j{constructor(e,t){super(e,t),this.assetsService=o(W),this.currentUserService=o(D),this.privateServerInformationChange=o(N).privateServerInformationChange,this.showOnboarding$=new s(!1),this.enableOnboarding=$(this.privateServerInformationChange.pipe(a(r=>r.enableOnboarding))),this.steps=v([]),this.save$=new S,this.currentUserService.isAdministrator&&this.loadSteps(),this.save$.pipe(d(1e3),U(),m(()=>this.updateOnBoardingStepDone())).subscribe()}toggleOnboarding(){if(this.enableOnboarding()){let e=this.currentUserService.webSettingsSnapshot.clone();e.hideOnboarding=!e.hideOnboarding,this.currentUserService.saveUserWebSettings(e)}else this.showOnboarding$.next(!this.showOnboarding$.value)}loadSteps(){this.getSteps().pipe(b(1)).subscribe(e=>this.steps.set(e))}getSteps(){return this.assetsService.GetAllOnBoardingStep().pipe(c(e=>this.handleGetApiResult(e)),a(e=>this.returnWhenSuccessful(e,()=>e.data)))}toggleStepIsDone(e){return this.steps.update(t=>t.map(r=>new O(r.id===e?l(g({},r),{isDone:!r.isDone}):r))),this.save$.next(),!!this.steps().find(t=>t.id===e)?.isDone}updateOnBoardingStepDone(){let e=this.steps().filter(t=>t.isDone).map(t=>t.id);return this.assetsService.UpdateOnBoardingStepDone(e).pipe(c(t=>this.handleGetApiResult(t)))}static{this.\u0275fac=function(t){return new(t||i)(h(w),h(I))}}static{this.\u0275prov=n({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})()});export{z as a,E as b,ie as c,M as d};
