{"version":3,"file":"open-rlb-ng-app.mjs","names":[],"sources":["../../../../projects/rlb/ng-app/src/lib/configuration.ts","../../../../projects/rlb/ng-app/src/lib/auth/providers/token-cookies.service.ts","../../../../projects/rlb/ng-app/src/lib/services/utils/app-storage.service.ts","../../../../projects/rlb/ng-app/src/lib/auth/providers/token-session.service.ts","../../../../projects/rlb/ng-app/src/lib/auth/providers/token-store.service.ts","../../../../projects/rlb/ng-app/src/lib/services/apps/app-logger.service.ts","../../../../projects/rlb/ng-app/src/lib/store/auth/auth.actions.ts","../../../../projects/rlb/ng-app/src/lib/store/auth/auth.model.ts","../../../../projects/rlb/ng-app/src/lib/services/acl/user-resources.service.ts","../../../../projects/rlb/ng-app/src/lib/store/acl/acl.model.ts","../../../../projects/rlb/ng-app/src/lib/services/apps/rlb-init-provider.ts","../../../../projects/rlb/ng-app/src/lib/store/acl/acl.store.ts","../../../../projects/rlb/ng-app/src/lib/auth/services/provider-resolution.ts","../../../../projects/rlb/ng-app/src/lib/auth/renewal/boot-session-restore.ts","../../../../projects/rlb/ng-app/src/lib/services/utils/cookies.service.ts","../../../../projects/rlb/ng-app/src/lib/auth/services/parse-jwt.service.ts","../../../../projects/rlb/ng-app/src/lib/auth/services/auth.service.ts","../../../../projects/rlb/ng-app/src/lib/auth/token-oauth-interceptor.ts","../../../../projects/rlb/ng-app/src/lib/store/app-context/app-context.model.ts","../../../../projects/rlb/ng-app/src/lib/auth/company.interceptor.ts","../../../../projects/rlb/ng-app/src/lib/auth/renewal/token-renewal.service.ts","../../../../projects/rlb/ng-app/src/lib/auth/renewal/token-oauth-retry.interceptor.ts","../../../../projects/rlb/ng-app/src/lib/auth/auth.provider.ts","../../../../projects/rlb/ng-app/src/lib/modals/error-modal.component.ts","../../../../projects/rlb/ng-app/src/lib/modals/modal-apps.component.ts","../../../../projects/rlb/ng-app/src/lib/services/cms/md.service.ts","../../../../projects/rlb/ng-app/src/lib/services/cache/local-cache.service.ts","../../../../projects/rlb/ng-app/src/lib/services/cms/strapi.service.ts","../../../../projects/rlb/ng-app/src/lib/services/i18n/language.service.ts","../../../../projects/rlb/ng-app/src/lib/pipes/cms/cms.pipe.ts","../../../../projects/rlb/ng-app/src/lib/templates/cms/cms.component.ts","../../../../projects/rlb/ng-app/src/lib/templates/cms/cms.component.html","../../../../projects/rlb/ng-app/src/lib/pages/cms-content/cms-content.component.ts","../../../../projects/rlb/ng-app/src/lib/pages/cms-content/cms-content.component.html","../../../../projects/rlb/ng-app/src/lib/pages/cookies/cookies.component.ts","../../../../projects/rlb/ng-app/src/lib/pages/cookies/cookies.component.html","../../../../projects/rlb/ng-app/src/lib/pages/not-found/not-found.component.ts","../../../../projects/rlb/ng-app/src/lib/pages/not-found/not-found.component.html","../../../../projects/rlb/ng-app/src/lib/pages/privacy/privacy.component.ts","../../../../projects/rlb/ng-app/src/lib/pages/privacy/privacy.component.html","../../../../projects/rlb/ng-app/src/lib/services/abstraction/abstract-support.service.ts","../../../../projects/rlb/ng-app/src/lib/pages/support/support.component.ts","../../../../projects/rlb/ng-app/src/lib/pages/support/support.component.html","../../../../projects/rlb/ng-app/src/lib/pages/terms-and-conditions/terms-and-conditions.component.ts","../../../../projects/rlb/ng-app/src/lib/pages/terms-and-conditions/terms-and-conditions.component.html","../../../../projects/rlb/ng-app/src/lib/store/app-context/app-context.actions.ts","../../../../projects/rlb/ng-app/src/lib/pages/default-routes.config.ts","../../../../projects/rlb/ng-app/src/lib/services/apps/apps.service.ts","../../../../projects/rlb/ng-app/src/lib/pages/apps/app-selector/app-selector.component.ts","../../../../projects/rlb/ng-app/src/lib/pages/apps/app-selector/app-selector.component.html","../../../../projects/rlb/ng-app/src/lib/services/errors/http-error-description.ts","../../../../projects/rlb/ng-app/src/lib/services/errors/error-management.service.ts","../../../../projects/rlb/ng-app/src/lib/auth/keycloak/keycloak-account.service.ts","../../../../projects/rlb/ng-app/src/lib/pages/apps/user-account/user-account.component.ts","../../../../projects/rlb/ng-app/src/lib/pages/apps/user-account/user-account.component.html","../../../../projects/rlb/ng-app/src/lib/pages/settings/settings-core/settings-core.component.ts","../../../../projects/rlb/ng-app/src/lib/pages/settings/settings-core/settings-core.component.html","../../../../projects/rlb/ng-app/src/lib/pages/settings/settings-list/settings-list.component.ts","../../../../projects/rlb/ng-app/src/lib/pages/settings/settings-list/settings-list.component.html","../../../../projects/rlb/ng-app/src/lib/auth/guards/oauth.guard.ts","../../../../projects/rlb/ng-app/src/lib/auth/guards/permission.guard.ts","../../../../projects/rlb/ng-app/src/lib/pages/forbidden/forbidden.component.ts","../../../../projects/rlb/ng-app/src/lib/pages/shared.routes.ts","../../../../projects/rlb/ng-app/src/lib/pipes/as/as.pipe.ts","../../../../projects/rlb/ng-app/src/lib/services/apps/app-visibility.ts","../../../../projects/rlb/ng-app/src/lib/store/navbar/navbar.actions.ts","../../../../projects/rlb/ng-app/src/lib/store/sidebar/sidebar.actions.ts","../../../../projects/rlb/ng-app/src/lib/store/navbar/navbar.model.ts","../../../../projects/rlb/ng-app/src/lib/store/sidebar/sidebar.model.ts","../../../../projects/rlb/ng-app/src/lib/pages/settings/settings-dropdown-selector/settings-dropdown-selector.component.ts","../../../../projects/rlb/ng-app/src/lib/pages/settings/settings-dropdown-selector/settings-dropdown-selector.component.html","../../../../projects/rlb/ng-app/src/lib/pipes/left-component/left-component.pipe.ts","../../../../projects/rlb/ng-app/src/lib/pipes/right-component/right-component.pipe.ts","../../../../projects/rlb/ng-app/src/lib/pipes/mobile-component/mobile-component.pipe.ts","../../../../projects/rlb/ng-app/src/lib/pipes/sidebar-footer-component/sidebar-footer-component.pipe.ts","../../../../projects/rlb/ng-app/src/lib/auth/directives/role.directive.ts","../../../../projects/rlb/ng-app/src/lib/pages/apps/app-dropdown-selector/app-dropdown-selector.component.ts","../../../../projects/rlb/ng-app/src/lib/pages/apps/app-dropdown-selector/app-dropdown-selector.component.html","../../../../projects/rlb/ng-app/src/lib/templates/app/app.component.ts","../../../../projects/rlb/ng-app/src/lib/templates/app/app.component.html","../../../../projects/rlb/ng-app/src/lib/templates/base/base.component.ts","../../../../projects/rlb/ng-app/src/lib/templates/base/base.component.html","../../../../projects/rlb/ng-app/src/lib/templates/content/content.component.ts","../../../../projects/rlb/ng-app/src/lib/templates/content/content.component.html","../../../../projects/rlb/ng-app/src/lib/pipes/autolink/autolink.pipe.ts","../../../../projects/rlb/ng-app/src/lib/pipes/truncate/truncate.pipe.ts","../../../../projects/rlb/ng-app/src/lib/services/utils/pwa-updater.service.ts","../../../../projects/rlb/ng-app/src/lib/templates/app-container/app-container.component.ts","../../../../projects/rlb/ng-app/src/lib/templates/app-container/app-container.component.html","../../../../projects/rlb/ng-app/src/lib/rlb-app.module.ts","../../../../projects/rlb/ng-app/src/lib/services/i18n/rlb-translate-adapter.service.ts","../../../../projects/rlb/ng-app/src/lib/services/i18n/i18n.provider.ts","../../../../projects/rlb/ng-app/src/lib/store/auth/auth-feature.service.ts","../../../../projects/rlb/ng-app/src/lib/store/app-context/app-context.effects.ts","../../../../projects/rlb/ng-app/src/lib/store/app-context/app-context.reducer.ts","../../../../projects/rlb/ng-app/src/lib/store/auth/auth.effects.ts","../../../../projects/rlb/ng-app/src/lib/store/auth/auth.reducer.ts","../../../../projects/rlb/ng-app/src/lib/store/navbar/navbar.reducer.ts","../../../../projects/rlb/ng-app/src/lib/store/sidebar/sidebar.reducer.ts","../../../../projects/rlb/ng-app/src/lib/toasts/error-toast.component.ts","../../../../projects/rlb/ng-app/src/lib/auth/services/oauth-password.service.ts","../../../../projects/rlb/ng-app/src/lib/auth/guards/oauth-password.guard.ts","../../../../projects/rlb/ng-app/src/lib/auth/keycloak/keycloak-account-api.service.ts","../../../../projects/rlb/ng-app/src/lib/services/apps/app-breadcrumb.service.ts","../../../../projects/rlb/ng-app/src/lib/services/apps/provide-for-domains.ts","../../../../projects/rlb/ng-app/src/lib/services/i18n/translate-browser.loader.ts","../../../../projects/rlb/ng-app/src/lib/services/utils/utils.service.ts","../../../../projects/rlb/ng-app/src/lib/guards/verify-deactivate.guard.ts","../../../../projects/rlb/ng-app/src/public-api.ts"],"sourcesContent":["import { InjectionToken, Type } from '@angular/core';\nimport { OpenIdConfiguration } from 'angular-auth-oidc-client';\nimport { LogLevel } from './services/apps/log-level';\n\n// export const RLB_CFG = 'rlb.options';\nexport const RLB_CFG = new InjectionToken<ProjectConfiguration>('rlb.options');\nexport const RLB_CFG_CMS = new InjectionToken<CmsConfiguration>(`${RLB_CFG}:cms`);\nexport const RLB_CFG_I18N = new InjectionToken<InternationalizationConfiguration>(\n  `${RLB_CFG}:i18n`,\n);\nexport const RLB_CFG_PAGES = new InjectionToken<PagesConfiguration>(`${RLB_CFG}:pages`);\nexport const RLB_CFG_ENV = new InjectionToken<EnvironmentConfiguration>(`${RLB_CFG}:env`);\nexport const RLB_CFG_AUTH = new InjectionToken<AuthConfiguration>(`${RLB_CFG}:auth`);\nexport const RLB_APP_NAVCOMP = new InjectionToken<NavbarComponents>(`rlb.app.navcomp`);\nexport const RLB_APP_SIDEBARCOMP = new InjectionToken<SidebarComponents>(`rlb.app.sidebarcomp`);\nexport const RLB_CFG_ACL = new InjectionToken<AclConfiguration>(`${RLB_CFG}:acl`);\n\n/**\n * Which chrome surface a custom navbar component is currently rendered in.\n * Provided by the shell around each component outlet. Inject it with\n * `{ optional: true }` — components registered before this token existed\n * simply don't see it.\n */\nexport type NavSurface = 'navbar' | 'mobile-menu';\nexport const RLB_NAV_SURFACE = new InjectionToken<NavSurface>('rlb.nav.surface');\n\nexport type AuthUrlHandler = (url: string) => void | Promise<void>;\nexport const RLB_AUTH_URL_HANDLER = new InjectionToken<AuthUrlHandler>('rlb.auth.urlHandler');\n\nexport interface InterceptorMapping {\n  // Key: The name of the Query Parameter to add to the request\n  // Value: The property name to look for in Store data object\n  [k: string]: string;\n}\n\nexport interface ProviderAclConfiguration {\n  endpointKey: string;\n  path: string;\n}\n\nexport interface AclConfiguration {\n  // endpointKey: string; // The key in the 'endpoints'\n  // path: string;        // The path\n  interceptorMapping?: InterceptorMapping;\n  businessIdKey: string; // The key in the Store data object to match with businessId\n  resourceIdKey: string; // The key in the Store data object to match with resourceId\n}\n\nexport interface ProviderConfiguration extends OpenIdConfiguration {\n  configId: string;\n  domains?: string[];\n  roleClaim?: (data: any) => string | string[];\n  acl?: ProviderAclConfiguration;\n}\n\nexport interface NavbarComponent {\n  component: Type<any>;\n  name: string;\n}\n\nexport interface NavbarComponents {\n  left: NavbarComponent[];\n  right: NavbarComponent[];\n  /**\n   * Components available to the mobile menu (offcanvas below the `lg` breakpoint),\n   * activated with `NavbarActions.setMobileItems`. Falls back to `right` when omitted,\n   * so an app can register one component for both surfaces and branch on\n   * {@link RLB_NAV_SURFACE}.\n   */\n  mobile?: NavbarComponent[];\n}\n\nexport interface SidebarComponents {\n  footer: {\n    component: Type<any>;\n    name: string;\n  }[];\n}\n\nexport interface CmsConfiguration {\n  endpoint: string;\n  chacheDuration: number;\n  useAppLanguage: boolean;\n  contentLanguages: string[];\n  markdown: 'ignore' | 'html' | 'text';\n}\n\n/**\n * Tuning for the `'oauth-code-ep-retry'` interceptor and the token watchdog behind it.\n *\n * The defaults are the ones this design was audited with; change them only with a reason.\n */\nexport interface TokenRenewalConfiguration {\n  /**\n   * How far ahead of expiry to renew, in seconds. Default 90.\n   *\n   * Wide enough that the retry ladder below has room to run before the token actually expires: at\n   * the defaults the first three retries all land with time to spare.\n   *\n   * This used to be justified as staying ahead of the 30s the OIDC library uses for its own periodic\n   * check, on the reasoning that ours would land first and the library's would then find a fresh\n   * token and stand down. That only held while ours succeeded — through an outage it never does, and\n   * the library's unguarded check went on to destroy the refresh token. The library's check is\n   * switched off under this interceptor now, so there is no second renewer to stay ahead of.\n   */\n  renewLeadSeconds?: number;\n  /** Waits between the first failed attempts, in seconds. Default `[5, 20, 60]`. */\n  retryDelaysSeconds?: number[];\n  /** Cadence of the slow heartbeat once the ladder above is spent, in seconds. Default 120. */\n  transientRetrySeconds?: number;\n  /**\n   * How long to keep retrying one outage before standing down, in seconds. Default 1800.\n   *\n   * A dead refresh token is indistinguishable from an unreachable host by the time the failure\n   * arrives — the library replaces the provider's response body with its own `Error` — so this\n   * budget, not any classification of the error, is what stops a rejected token being retried\n   * forever. The interceptor still recovers on the next 401.\n   *\n   * It also bounds how long `oauthGuard` will let a signed-out-looking session keep navigating: for\n   * as long as the watchdog is working on an outage the user stays in the app, and once it stands\n   * down they are sent to the login page. Lower this if you would rather a revoked session reached\n   * the login page sooner, at the cost of giving up on a long outage sooner too.\n   */\n  maxOutageSeconds?: number;\n  /** Start the watchdog once the user is authenticated. Default true. */\n  autoStart?: boolean;\n  /**\n   * Renew once at bootstrap when the stored access token has expired but a refresh token outlived\n   * it. Default true.\n   *\n   * This is what makes a session survive the browser being closed. The OIDC library decides\n   * authentication at startup by reading storage — an expired access token means unauthenticated,\n   * and it never tries the refresh token it is holding. So a user coming back the next morning is\n   * sent to the login host, and only stays signed in for as long as the provider's own SSO cookie\n   * outlives the tab. Past that they get a login form, with a perfectly good refresh token still in\n   * storage. With `offline_access` in the provider's `scope` and `storage: 'localStorage'`, one\n   * renewal here is the difference between that and a session that lasts as long as the refresh\n   * token does.\n   *\n   * A failed attempt leaves the startup exactly as it is without this: unauthenticated, guards\n   * redirecting. The refresh token survives it — the renewal runs through the watchdog's\n   * snapshot-protected path — so reloading during an outage cannot destroy the stored session.\n   */\n  restoreOnBoot?: boolean;\n  /**\n   * Paths on authenticated endpoints that anonymous callers may legitimately reach, matched as\n   * substrings of the request URL (e.g. `['/register']`).\n   *\n   * The interceptor otherwise refuses to send a request to an authenticated endpoint without a\n   * token; registration and similar front-door calls happen before an account exists and would\n   * fail. Default `[]`.\n   */\n  publicPaths?: string[];\n}\n\nexport interface AuthConfiguration {\n  protocol: 'oauth';\n  storage: 'cookies' | 'localStorage' | 'sessionStorage';\n  /**\n   * Which HTTP interceptor attaches the token.\n   *\n   * - `'oauth-code-all'` — the OIDC library's own, matching `allowedUrls`.\n   * - `'oauth-code-ep'` — attaches to the `endpoints` marked `auth`. Sends the request anyway when\n   *   there is no token, so the backend sees an anonymous call.\n   * - `'oauth-code-ep-retry'` — as above, plus: never sends an authenticated request without a\n   *   token, retries a 401 once with a fresh one, and keeps a watchdog renewing the token so a\n   *   single failed refresh cannot end renewal for the life of the page. Tune with {@link renewal}.\n   *\n   * `'oauth-code-ep-retry'` also switches the OIDC library's own `silentRenew` off, because the\n   * watchdog owns renewal in that mode and two renewers spending one refresh token is how a session\n   * dies mid-outage. Set `silentRenew: true` on an individual provider to put it back.\n   */\n  interceptor?: 'oauth-code-all' | 'oauth-code-ep' | 'oauth-code-ep-retry' | 'none';\n  enableCompanyInterceptor?: boolean;\n  allowedUrls: string[];\n  providers: ProviderConfiguration[];\n  /** Only read when {@link interceptor} is `'oauth-code-ep-retry'`. */\n  renewal?: TokenRenewalConfiguration;\n}\n\nexport interface InternationalizationConfiguration {\n  availableLangs: string[];\n  defaultLanguage: string;\n  useLanguageBrowser: boolean;\n  storeSelectedLanguage: boolean;\n  cookieStoreName: string;\n}\n\nexport interface PageConfiguration {\n  path: string;\n  /**\n   * ACL action required to see this page — the entry in the settings dropdown and list, and the\n   * route itself (guarded with `pagePermissionGuard`). A list grants on **any** of its actions.\n   *\n   * Omitted means visible to everyone, which is what every configuration written before this\n   * existed says. The check is \"does the user hold it on any resource\", not \"in the current app\":\n   * these pages belong to no app, and while one is open there is no current app to scope to.\n   *\n   * Routes the kit does not register — `status`, `logger`, anything else the consumer owns — get\n   * their button gated here, but you have to put `pagePermissionGuard` on the route yourself.\n   */\n  action?: string | string[];\n}\n\nexport interface PagesConfiguration {\n  [key: string]: PageConfiguration;\n}\n\n/**\n * Per-status messages `ErrorManagementService` renders for a failed HTTP call.\n *\n * For an `HttpErrorResponse` the lookup is, first group that resolves a message wins:\n * `{keyPrefix}.{status}` → `{keyPrefix}.default` → the backend's own text\n * (`\"{status}: {message}\"` under an `HttpErrorResponse` title), which is what the handler has\n * always shown. A key ngx-translate cannot resolve counts as a miss, so a consumer opts in one\n * status at a time just by adding keys to its i18n files — nothing has to be configured here.\n *\n * Each group holds `title`, `message` and an optional `messageRetry` used instead of `message`\n * when the wait is known (see {@link defaultRetryMinutes}); `messageRetry` may interpolate\n * `{{minutes}}`, `{{seconds}}` and `{{status}}`.\n */\nexport interface HttpErrorMessagesConfiguration {\n  /** i18n namespace holding the per-status groups. Default `'errors.http'`. */\n  keyPrefix?: string;\n  /**\n   * How long to say the caller must wait when the response carries no usable `Retry-After`.\n   *\n   * `Retry-After` is not a CORS-safelisted response header: a cross-origin gateway has to name it\n   * in `Access-Control-Expose-Headers` or the browser hides it and every 429 looks like it has\n   * none. Without either, only the `message` variant of a group can be used.\n   */\n  defaultRetryMinutes?: number;\n  /**\n   * Window in ms within which the same (output, title, message) is shown once.\n   *\n   * A rate limit rejects every request already in flight, so without this the user gets one modal\n   * per request instead of one modal. Default 1000; set `0` to show every error.\n   */\n  dedupeMs?: number;\n}\n\nexport interface EnvironmentConfiguration {\n  appLogo: string;\n  appTitle: string;\n  navbarDisabled?: boolean;\n  baseUrl: string;\n  ssr: boolean;\n  phone: boolean;\n  errorDialogName?: string;\n  errorDialogSize?: 'sm' | 'lg' | 'xl' | 'md';\n  errorToastName?: string;\n  errorToastContainer?: string;\n  httpErrors?: HttpErrorMessagesConfiguration;\n  pwaUpdateEnabled?: boolean;\n  logLevel?: LogLevel;\n}\n\nexport interface Endpoint {\n  baseUrl: string;\n  healthPath: string;\n  auth?: boolean;\n  wss?: boolean;\n}\n\nexport interface IConfiguration {\n  environment?: EnvironmentConfiguration;\n  cms?: CmsConfiguration;\n  auth?: AuthConfiguration;\n  i18n?: InternationalizationConfiguration;\n  pages?: PagesConfiguration;\n  acl?: AclConfiguration;\n  endpoints?: { [key: string]: Endpoint };\n}\n\nexport type ProjectConfiguration<T = { [k: string]: any }> = IConfiguration & {\n  production: boolean;\n} & T;\n","import { Injectable } from '@angular/core';\nimport { AbstractSecurityStorage } from 'angular-auth-oidc-client';\nimport { SsrCookieService } from 'ngx-cookie-service-ssr';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class TokenCookiesService implements AbstractSecurityStorage {\n\n  constructor(private cookies: SsrCookieService) {\n\n  }\n\n  read(key: string): string {\n    return this.cookies.get(key);\n  }\n\n  remove(key: string): void {\n    this.cookies.delete(key);\n  }\n\n  write(key: string, data: string): void {\n    this.cookies.set(key, data);\n  }\n\n  clear(): void {\n\n  }\n}\n","import { Injectable } from '@angular/core';\nimport { AbstractSecurityStorage } from 'angular-auth-oidc-client';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class AppStorageService  {\n\n  readLocal(key: string) {\n    return localStorage.getItem(key);\n  }\n\n  writeLocal(key: string, value: any): void {\n    localStorage.setItem(key, value);\n  }\n\n  removeLocal(key: string): void {\n    localStorage.removeItem(key);\n  }\n\n  clearLocal(): void {\n    localStorage.clear();\n  }\n\n  readSession(key: string) {\n    return sessionStorage.getItem(key);\n  }\n\n  writeSession(key: string, value: any): void {\n    localStorage.setItem(key, value);\n  }\n\n  removeSession(key: string): void {\n    sessionStorage.removeItem(key);\n  }\n\n  clearSession(): void {\n    sessionStorage.clear();\n  }\n}\n","import { Injectable } from '@angular/core';\nimport { AbstractSecurityStorage } from 'angular-auth-oidc-client';\nimport { AppStorageService } from '../../services/utils/app-storage.service';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class TokenSessionService implements AbstractSecurityStorage {\n\n  constructor(private readonly store: AppStorageService) { }\n\n  read(key: string) {\n    return this.store.readSession(key);\n  }\n\n  write(key: string, value: any): void {\n    this.store.writeSession(key, value);\n  }\n\n  remove(key: string): void {\n    this.store.readSession(key);\n  }\n\n  clear(): void {\n    this.store.clearSession();\n  }\n}\n","import { Injectable } from '@angular/core';\nimport { AbstractSecurityStorage } from 'angular-auth-oidc-client';\nimport { AppStorageService } from '../../services/utils/app-storage.service';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class TokenStoreService implements AbstractSecurityStorage {\n\n  constructor(private readonly store: AppStorageService) { }\n\n  read(key: string) {\n    return this.store.readLocal(key);\n  }\n\n  write(key: string, value: any): void {\n    this.store.writeLocal(key, value);\n  }\n\n  remove(key: string): void {\n    this.store.removeLocal(key);\n  }\n\n  clear(): void {\n    this.store.clearLocal();\n  }\n}\n","import { Inject, Injectable } from '@angular/core';\nimport { EnvironmentConfiguration, RLB_CFG_ENV } from \"../../configuration\";\n\nimport { LogLevel } from './log-level';\nexport type { LogLevel };\n\nexport type LoggerContext = {\n\terror: (...args: any[]) => void;\n\twarn: (...args: any[]) => void;\n\tinfo: (...args: any[]) => void;\n\tdebug: (...args: any[]) => void;\n\tlog: (...args: any[]) => void;\n};\n\nconst LEVEL_PRIORITIES: Record<LogLevel, number> = {\n\toff: 0,\n\terror: 1,\n\twarn: 2,\n\tinfo: 3,\n\tdebug: 4,\n\tlog: 5,\n};\n\n@Injectable({ providedIn: 'root' })\nexport class AppLoggerService {\n\tprivate currentLevel: LogLevel = 'off';\n\tprivate timestamps = true;\n\n\tconstructor(@Inject(RLB_CFG_ENV) environment?: EnvironmentConfiguration) {\n    this.currentLevel = environment?.logLevel || 'off';\n\t}\n\n\tsetLogLevel(level: LogLevel) {\n\t\tif (!(level in LEVEL_PRIORITIES)) {\n\t\t\tthrow new Error(`Unknown log level: ${level}`);\n\t\t}\n\t\tthis.currentLevel = level;\n\t}\n\n\tgetLogLevel(): LogLevel {\n\t\treturn this.currentLevel;\n\t}\n\n\tenableTimestamps(enabled: boolean) {\n\t\tthis.timestamps = enabled;\n\t}\n\n\t/**\n\t * returns logger with context / class name\n\t */\n\tfor(context: string): LoggerContext {\n\t\treturn {\n\t\t\terror: (...args: any[]) => this.logError(context, ...args),\n\t\t\twarn: (...args: any[]) => this.logWarning(context, ...args),\n\t\t\tinfo: (...args: any[]) => this.logInfo(context, ...args),\n\t\t\tdebug: (...args: any[]) => this.logDebug(context, ...args),\n\t\t\tlog: (...args: any[]) => this.log(context, ...args),\n\t\t};\n\t}\n\n\tlogError(contextOrMessage: any, ...args: any[]): void {\n\t\tthis.print('error', contextOrMessage, args);\n\t}\n\tlogWarning(contextOrMessage: any, ...args: any[]): void {\n\t\tthis.print('warn', contextOrMessage, args);\n\t}\n\tlogDebug(contextOrMessage: any, ...args: any[]): void {\n\t\tthis.print('debug', contextOrMessage, args);\n\t}\n\tlogInfo(contextOrMessage: any, ...args: any[]): void {\n\t\tthis.print('info', contextOrMessage, args);\n\t}\n\tlog(contextOrMessage: any, ...args: any[]): void {\n\t\tthis.print('log', contextOrMessage, args);\n\t}\n\n\tprivate print(level: LogLevel, contextOrMessage: any, args: any[]) {\n\t\tif (LEVEL_PRIORITIES[level] > LEVEL_PRIORITIES[this.currentLevel]) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst colors: Record<LogLevel, string> = {\n\t\t\terror: 'color:#e57373;',\n\t\t\twarn: 'color:#ffb74d;',\n\t\t\tinfo: 'color:#64b5f6;',\n\t\t\tdebug: 'color:#90a4ae;',\n\t\t\tlog: 'color:#757575;',\n\t\t\toff: 'color:inherit;',\n\t\t};\n\n\t\tlet context = 'GLOBAL';\n\t\tlet messageArgs: any[] = [];\n\n\t\tif (args.length > 0) {\n\t\t\tcontext = contextOrMessage;\n\t\t\tmessageArgs = args;\n\t\t} else {\n\t\t\tmessageArgs = [contextOrMessage];\n\t\t}\n\n\t\tconst timePrefix = this.timestamps ? `[${new Date().toISOString()}]` : '';\n\t\tconst prefix = `[${level.toUpperCase()}][${context}]${timePrefix} -`;\n\n\t\tswitch (level) {\n\t\t\tcase 'error':\n\t\t\t\tconsole.error(`%c${prefix}`, colors.error, ...messageArgs);\n\t\t\t\tbreak;\n\t\t\tcase 'warn':\n\t\t\t\tconsole.warn(`%c${prefix}`, colors.warn, ...messageArgs);\n\t\t\t\tbreak;\n\t\t\tcase 'info':\n\t\t\t\tconsole.info(`%c${prefix}`, colors.info, ...messageArgs);\n\t\t\t\tbreak;\n\t\t\tcase 'debug':\n\t\t\t\tconsole.debug(`%c${prefix}`, colors.debug, ...messageArgs);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tconsole.log(`%c${prefix}`, colors.log, ...messageArgs);\n\t\t}\n\t}\n}\n","import { createActionGroup, emptyProps, props } from '@ngrx/store';\n\nexport const AuthActionsInternal = createActionGroup({\n  source: 'Auth/Internal',\n  events: {\n    'SetCurrentProvider': props<{ currentProvider: string; }>(),\n    'SetLoading': props<{ loading: boolean; }>(),\n    'Reset': emptyProps(),\n  }\n});\n\n\nexport const AuthActions = createActionGroup({\n  source: 'Auth/API',\n  events: {\n    'Login': emptyProps(),\n    'Logout': emptyProps(),\n    'SetCurrentProvider': props<{ currentProvider: string; }>(),\n  }\n});\n","export const authsFeatureKey = 'auth';\n\nexport interface Auth {\n  currentProvider: string | null;\n  loading: boolean;\n}\n\nexport const initialAuthState: Auth = {\n  currentProvider: null,\n  loading: false,\n};\n\nexport interface AuthState { [authsFeatureKey]: Auth; }\n","import { Inject, Injectable, Optional } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { AclConfiguration, ProjectConfiguration, RLB_CFG, RLB_CFG_ACL } from '../../configuration';\nimport { UserResource } from '../../store/acl/acl.model';\nimport { Observable, of } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class AdminApiService {\n  constructor(\n    private httpClient: HttpClient,\n    @Optional() @Inject(RLB_CFG) private config: ProjectConfiguration,\n    @Optional() @Inject(RLB_CFG_ACL) private aclConfig: AclConfiguration,\n  ) {}\n\n  resourcesByUser$(endpointKey: string, path: string): Observable<UserResource[]> {\n    if (!this.aclConfig) {\n      console.error(\"ACL configuration is missing. Provide 'acl' in ProjectConfiguration.\");\n      return of([]);\n    }\n\n    const endpoint = this.config.endpoints?.[endpointKey];\n\n    if (!endpoint) {\n      throw new Error(`Endpoint '${endpointKey}' not found in configuration.`);\n    }\n\n    if (!path) {\n      throw new Error(`Path '${path}' not found in configuration.`);\n    }\n\n    const url = `${endpoint.baseUrl}/${path}`;\n    return this.httpClient.get<UserResource[]>(url).pipe();\n  }\n}\n","export const aclFeatureKey = 'acl';\n\n\nexport interface UserResource {\n  companyId: string;\n  resources: Resource[];\n}\n\nexport interface Resource {\n  resourceId: string;\n  actions: string[];\n  friendlyName?: string;\n}\n\nexport interface Acl {\n  resources: UserResource[] | null;\n  loading: boolean;\n  loaded: boolean;\n  error: any;\n}\n\nexport const initialAclState: Acl = {\n  resources: null,\n  loading: false,\n  loaded: false,\n  error: null\n};\n\nexport interface AclState { [aclFeatureKey]: Acl }\n\n/**\n * What a caller may pass where an ACL action is expected: one action, or a list the user only has\n * to hold **one** of (\"management and superior\" style checks).\n */\nexport type AclAction = string | string[];\n\n/**\n * Reduces an action input to the list actually checked.\n *\n * `undefined`, `null`, `''` and `[]` all collapse to an empty list, which every consumer of this\n * helper reads as \"no action asked for\" — public, or \"any grant on the resource\", depending on the\n * caller. An empty array must never mean \"deny\": a consumer computing the list dynamically would\n * otherwise get a blank UI the first time the list comes back empty.\n */\nexport function normalizeAclActions(action?: AclAction | null): string[] {\n  if (action === undefined || action === null) return [];\n  const list = Array.isArray(action) ? action : [action];\n  return list.filter((a): a is string => typeof a === 'string' && a.length > 0);\n}\n","import { InjectionToken } from \"@angular/core\";\nimport { Store } from \"@ngrx/store\";\nimport { UserResource } from '../../store/acl/acl.model';\nimport { BaseState } from '../../store/base-state';\nimport { AclConfiguration, RLB_CFG } from '../../configuration'\n\nexport const RLB_INIT_PROVIDER = new InjectionToken<RlbInitProvider>(`${RLB_CFG}:init.provider`);\nexport interface RlbInitProvider {\n  finalizeApps(resources: UserResource[], store: Store<BaseState>, acl: AclConfiguration | null): Promise<void>;\n}\n","import { inject } from '@angular/core';\nimport { patchState, signalStore, withMethods, withState } from '@ngrx/signals';\nimport { AdminApiService } from '../../services/acl/user-resources.service';\nimport { AclAction, initialAclState, normalizeAclActions } from './acl.model';\nimport { catchError, from, map, of, switchMap, tap } from 'rxjs';\nimport { RLB_INIT_PROVIDER } from '../../services/apps/rlb-init-provider';\nimport { ProviderAclConfiguration, RLB_CFG_ACL } from '../../configuration';\nimport { Store } from '@ngrx/store';\nimport { BaseState } from '../base-state';\n\nexport const AclStore = signalStore(\n  { providedIn: 'root' },\n  withState(initialAclState),\n  withMethods(\n    (\n      store,\n      adminApi = inject(AdminApiService),\n      baseStore = inject(Store<BaseState>),\n      rlbInitProvider = inject(RLB_INIT_PROVIDER, { optional: true }),\n      aclConfiguration = inject(RLB_CFG_ACL, { optional: true }),\n    ) => ({\n      /**\n       * Whether the user holds `action` on the `(busId, resId)` resource.\n       *\n       * `action` may be a list, in which case **any** of them grants — this is the single\n       * implementation of that OR, shared by the `*roles` directive and the guards, so nobody\n       * re-implements the loop against a subset of the semantics.\n       *\n       * No action (or an empty list) keeps its original meaning: *any* grant on that resource.\n       */\n      hasPermission: (busId: string, resId: string, action?: AclAction) => {\n        const resources = store.resources();\n        if (!resources) return false;\n        const actions = normalizeAclActions(action);\n        return resources.some(\n          company =>\n            company.companyId === busId &&\n            company.resources.some(res => {\n              const matchRes = res.resourceId === resId;\n              if (!matchRes) return false;\n              return actions.length === 0 || actions.some(a => res.actions.includes(a));\n            }),\n        );\n      },\n\n      /**\n       * Whether the user holds `action` on **any** resource they have, ignoring which app is\n       * current.\n       *\n       * Chrome that is not owned by an app — the `pages.*` entries rendered in the settings\n       * dropdown and list — has no `(busId, resId)` to check against, and while one of those pages\n       * is open `AppsService` has deselected the current app anyway. Resource-scoped checks answer\n       * \"no\" there for the wrong reason, so those surfaces use this one.\n       */\n      hasPermissionAnywhere: (action?: AclAction) => {\n        const resources = store.resources();\n        if (!resources) return false;\n        const actions = normalizeAclActions(action);\n        return resources.some(company =>\n          company.resources.some(\n            res => actions.length === 0 || actions.some(a => res.actions.includes(a)),\n          ),\n        );\n      },\n\n      // Load Logic: Replaces both Effects. Get user res + call via bridge finalizeApps\n      // Accept the provider's ACL config\n      loadACL(providerAcl?: ProviderAclConfiguration) {\n        // IF NO ACL CONFIGURATION -> BYPASS\n        if (!providerAcl) {\n          patchState(store, { resources: [], loaded: true, loading: false });\n\n          // Even if empty, we execute finalizeApps so the pipeline doesn't hang\n          if (rlbInitProvider) {\n            return from(rlbInitProvider.finalizeApps([], baseStore, aclConfiguration)).pipe(\n              map(() => []),\n              catchError(err => {\n                console.error('Finalization failed during bypass', err);\n                return of([]);\n              }),\n            );\n          }\n          return of([]);\n        }\n\n        // IF ACL CONFIG EXISTS -> FETCH RESOURCES\n        patchState(store, { loading: true, loaded: false });\n\n        return adminApi.resourcesByUser$(providerAcl.endpointKey, providerAcl.path).pipe(\n          tap(resources => patchState(store, { resources, loaded: true, loading: false })),\n          switchMap(resources => {\n            if (!rlbInitProvider) {\n              return of(resources);\n            }\n            return from(rlbInitProvider.finalizeApps(resources, baseStore, aclConfiguration)).pipe(\n              map(() => resources),\n              catchError(err => {\n                console.error('Finalization failed', err);\n                return of(resources);\n              }),\n            );\n          }),\n        );\n      },\n      reset: () => patchState(store, initialAclState),\n    }),\n  ),\n);\n","import { ProviderConfiguration } from '../../configuration';\n\n/**\n * Why {@link resolveProvider} answered the way it did.\n *\n * The three failures are kept apart because they need different words in front of a developer:\n * nothing configured is a different mistake from a hostname no provider claims, which is a\n * different mistake again from two providers claiming the same one.\n */\nexport type ProviderResolutionReason =\n  | 'store'\n  | 'single'\n  | 'domain'\n  | 'no-providers'\n  | 'no-domain-match'\n  | 'ambiguous-domain-match';\n\nexport interface ProviderResolution {\n  /** The provider to use, or undefined when none could be resolved. */\n  provider?: ProviderConfiguration;\n  reason: ProviderResolutionReason;\n  /** Every provider that claimed the hostname. Only interesting for 'ambiguous-domain-match'. */\n  matched: ProviderConfiguration[];\n}\n\n/**\n * Picks the auth provider this page should be using.\n *\n * One algorithm, shared by `AuthenticationService` and `AppsService`, because the two used to\n * re-derive it separately and could therefore disagree: the store-backed getter would return\n * undefined while the OIDC library — handed that undefined — silently used the first registered\n * configuration instead, a different realm holding none of this tenant's tokens.\n *\n * The order runs from most to least specific:\n *\n * 1. the id the store already holds, when it names a configured provider — this is the normal path\n *    once `checkAuthMultiple` or `AppsService` has settled the question;\n * 2. the only provider there is, when a single one is configured;\n * 3. the provider whose `domains` claims this hostname, when exactly one does.\n *\n * Resolution is by **hostname, never by configId**: the domain is what identifies a portal, while\n * `configId` is only the OIDC library's storage key and is free to differ between environments.\n *\n * Pure and side-effect-free — callers decide how loudly to react to a failure.\n */\nexport function resolveProvider(\n  providers: ProviderConfiguration[] | undefined,\n  storeConfigId: string | null | undefined,\n  hostname: string,\n): ProviderResolution {\n  if (!providers?.length) return { reason: 'no-providers', matched: [] };\n\n  const stored = storeConfigId\n    ? providers.find(provider => provider.configId === storeConfigId)\n    : undefined;\n  if (stored) return { provider: stored, reason: 'store', matched: [] };\n\n  if (providers.length === 1) return { provider: providers[0], reason: 'single', matched: [] };\n\n  const matched = providers.filter(provider => provider.domains?.includes(hostname));\n\n  if (matched.length === 1) return { provider: matched[0], reason: 'domain', matched };\n  if (matched.length > 1) return { reason: 'ambiguous-domain-match', matched };\n\n  return { reason: 'no-domain-match', matched };\n}\n\n/** Whether a resolution failed to name a provider. */\nexport function isProviderResolutionFailure(resolution: ProviderResolution): boolean {\n  return !resolution.provider;\n}\n\n/**\n * The message to put in front of whoever has to fix a failed resolution.\n *\n * Names the hostname, every configured provider with the domains it claims, and the change that\n * would resolve it — a misconfigured domain used to surface as a console warning and an app that\n * stayed silently unauthenticated forever, which is the failure mode this text exists to end.\n */\nexport function describeProviderResolutionFailure(\n  resolution: ProviderResolution,\n  hostname: string,\n  providers: ProviderConfiguration[] | undefined,\n  operation?: string,\n): string {\n  const where = operation ? ` (required by ${operation})` : '';\n  const configured = (providers ?? [])\n    .map(provider => `${provider.configId} -> [${(provider.domains ?? []).join(', ') || 'no domains'}]`)\n    .join('; ');\n\n  if (resolution.reason === 'ambiguous-domain-match') {\n    const ids = resolution.matched.map(provider => provider.configId).join(', ');\n    return (\n      `Several auth providers claim the domain '${hostname}'${where}: ${ids}. ` +\n      `Give exactly one provider a 'domains' entry containing '${hostname}'. Configured: ${configured}`\n    );\n  }\n\n  if (resolution.reason === 'no-providers') {\n    return `No auth providers are configured${where}. Add at least one entry to auth.providers.`;\n  }\n\n  return (\n    `No auth provider is configured for the domain '${hostname}'${where}. ` +\n    `Add '${hostname}' to the 'domains' of the provider that serves it. Configured: ${configured}`\n  );\n}\n","import { InjectionToken } from '@angular/core';\nimport { Observable } from 'rxjs';\n\n/**\n * The one renewal `AuthenticationService` runs at startup, before deciding nobody is signed in.\n *\n * `TokenRenewalService` is what implements this, and it is deliberately reached through a token\n * rather than injected: it injects `AuthenticationService` itself, and asking for it from a\n * constructor that is mid-construction on the other side of that edge is a circular dependency\n * (NG0200). The factory in `auth.provider.ts` resolves it lazily for the same reason.\n *\n * Only `'oauth-code-ep-retry'` provides it, so nothing changes for any other interceptor: the\n * injection is optional and a startup without it behaves as it always did.\n */\nexport interface BootSessionRestorer {\n  /** Whether storage still holds a refresh token worth spending on the attempt. */\n  canRestore(): boolean;\n  /**\n   * Renews through the watchdog's snapshot-protected path, so a failure that wipes storage is put\n   * back rather than costing the session. An empty token means the attempt failed.\n   */\n  refresh(): Observable<string>;\n}\n\nexport const RLB_BOOT_SESSION_RESTORER = new InjectionToken<BootSessionRestorer>(\n  'RLB_BOOT_SESSION_RESTORER',\n);\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class CookiesService {\n  public getCookie(name: string): string | undefined {\n    let ca: Array<string> = document.cookie.split(';');\n    let caLen: number = ca.length;\n    let cookieName = `${name}=`;\n    let c: string;\n\n    for (let i: number = 0; i < caLen; i += 1) {\n      c = ca[i].replace(/^\\s+/g, '');\n      if (c.indexOf(cookieName) == 0) {\n        return c.substring(cookieName.length, c.length);\n      }\n    }\n    return undefined;\n  }\n\n  public deleteCookie(name: string) {\n    this.setCookie(name, '', -1);\n  }\n\n  public setCookie(name: string, value: string, expireDays?: number, path: string = '') {\n    let cookie = `${name}=${value};`;\n    if (expireDays) {\n      let d: Date = new Date();\n      d.setTime(d.getTime() + expireDays * 24 * 60 * 60 * 1000);\n      let expires: string = `expires=${d.toUTCString()};`;\n      cookie += `${expires}`\n    }\n    if (path) {\n      cookie += `path=${path};`\n    }\n    document.cookie = cookie;\n  }\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class ParseJwtService {\n\n  // `atob` rather than Node's `Buffer`, which is not defined in a browser: decoding a JWT with it\n  // threw, taking `roles$` and `matchRoles` with it. Available in every browser and in Node >= 16.\n  private _atob(string: string): string {\n    return atob(string);\n  }\n\n  public parseJwt(token?: string) {\n    if (token !== undefined && token !== null && token !== \"\") {\n      var base64Url = token.split(\".\")[1];\n      var base64 = base64Url.replace(/-/g, \"+\").replace(/_/g, \"/\");\n      var jsonPayload = decodeURIComponent(\n        this._atob(base64)\n          .split(\"\")\n          .map(c => (\"%\" + (\"00\" + c.charCodeAt(0).toString(16)).slice(-2)))\n          .join(\"\")\n      );\n      return JSON.parse(jsonPayload);\n    } else {\n      return {};\n    }\n  };\n}\n","import { DOCUMENT } from '@angular/common';\nimport { inject, Inject, Injectable, isDevMode, Optional, Signal } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { Store } from '@ngrx/store';\nimport { LoginResponse, OidcSecurityService } from 'angular-auth-oidc-client';\nimport {\n  catchError,\n  EMPTY,\n  lastValueFrom,\n  map,\n  Observable,\n  of,\n  ReplaySubject,\n  switchMap,\n  tap,\n} from 'rxjs';\nimport {\n  AuthConfiguration,\n  AuthUrlHandler,\n  EnvironmentConfiguration,\n  IConfiguration,\n  RLB_AUTH_URL_HANDLER,\n  RLB_CFG,\n  RLB_CFG_AUTH,\n  RLB_CFG_ENV,\n} from '../../configuration';\nimport { AppLoggerService, LoggerContext } from '../../services/apps/app-logger.service';\nimport { AppStorageService } from '../../services/utils/app-storage.service';\nimport { CookiesService } from '../../services/utils/cookies.service';\nimport { AuthActions } from '../../store/auth/auth.actions';\nimport { authsFeatureKey } from '../../store/auth/auth.model';\nimport { BaseState } from '../../store/base-state';\nimport { ParseJwtService } from './parse-jwt.service';\nimport { AdminApiService } from '../../services/acl/user-resources.service';\nimport { AclStore } from '../../store/acl/acl.store';\nimport {\n  describeProviderResolutionFailure,\n  ProviderResolution,\n  resolveProvider,\n} from './provider-resolution';\n// Imported from the file rather than the renewal barrel: that barrel also exports the watchdog,\n// which imports this service, and the cycle would be back.\nimport { BootSessionRestorer, RLB_BOOT_SESSION_RESTORER } from '../renewal/boot-session-restore';\n\n@Injectable({\n  providedIn: 'root',\n})\nexport class AuthenticationService {\n  modal!: Window | null;\n  private logger: LoggerContext;\n  private readonly aclStore = inject(AclStore);\n  private readonly document = inject(DOCUMENT);\n  private readonly _authReady$ = new ReplaySubject<void>(1);\n  public readonly authReady$ = this._authReady$.asObservable();\n  private readonly _authenticated$ = new ReplaySubject<void>(1);\n  public readonly authenticated$ = this._authenticated$.asObservable();\n\n  /** Reasons already reported, so a broken configuration logs once instead of once per call. */\n  private readonly reportedFailures = new Set<string>();\n\n  private storedProviderId!: Signal<string | null | undefined>;\n\n  constructor(\n    private oidcSecurityService: OidcSecurityService,\n    private cookiesService: CookiesService,\n    private router: Router,\n    private readonly parseJwtService: ParseJwtService,\n    private readonly store: Store<BaseState>,\n    private readonly log: AppLoggerService,\n    private readonly localStorage: AppStorageService,\n    private readonly adminApi: AdminApiService,\n    @Optional() @Inject(RLB_CFG_ENV) private envConfig: EnvironmentConfiguration,\n    @Optional() @Inject(RLB_CFG_AUTH) private authConfig: AuthConfiguration,\n    @Optional() @Inject(RLB_CFG) private appconfig: IConfiguration,\n    @Optional() @Inject(RLB_AUTH_URL_HANDLER) private authUrlHandler: AuthUrlHandler | null,\n    @Optional() @Inject(RLB_BOOT_SESSION_RESTORER) private bootRestorer: BootSessionRestorer | null,\n  ) {\n    this.logger = this.log.for(this.constructor.name);\n    this.storedProviderId = this.store.selectSignal(\n      state => state[authsFeatureKey].currentProvider,\n    );\n    this.logger.log('AuthenticationService initialized');\n  }\n\n  public get oidc(): OidcSecurityService {\n    return this.oidcSecurityService;\n  }\n\n  get config(): AuthConfiguration {\n    return this.authConfig;\n  }\n\n  private get hostname(): string {\n    return this.document.defaultView?.location.hostname ?? '';\n  }\n\n  /** A method rather than a field, so specs can override it to exercise the production branch. */\n  protected isDevelopmentMode(): boolean {\n    return isDevMode();\n  }\n\n  private resolve(): ProviderResolution {\n    return resolveProvider(this.authConfig?.providers, this.storedProviderId(), this.hostname);\n  }\n\n  /**\n   * The provider this page is using, or undefined when none resolves.\n   *\n   * Read speculatively — from templates, and from `KeycloakProfileService` for its base URL — so it\n   * stays quiet and never throws. {@link resolvedConfigId} is the loud path.\n   */\n  get currentProvider() {\n    return this.resolve().provider;\n  }\n\n  /**\n   * The configId to hand the OIDC library, or undefined when none resolves.\n   *\n   * Never returns undefined *to the library*: callers must skip the call instead. Passing undefined\n   * makes `getConfig` fall back to the first registered configuration, so on a domain whose\n   * provider failed to resolve every token read, login and logout would silently target a different\n   * realm — one holding none of this tenant's tokens. That is invisible wherever environments share\n   * a realm (dev, staging) and only bites in production, which is exactly how it reached production.\n   *\n   * A misconfigured domain throws in dev and logs at error level in prod. Having no providers at\n   * all is not a misconfiguration — it is an app without auth — so that stays silent.\n   */\n  private resolvedConfigId(operation: string): string | undefined {\n    const resolution = this.resolve();\n    if (resolution.provider) return resolution.provider.configId;\n    if (resolution.reason === 'no-providers') return undefined;\n\n    const message = describeProviderResolutionFailure(\n      resolution,\n      this.hostname,\n      this.authConfig?.providers,\n      operation,\n    );\n    if (this.isDevelopmentMode()) throw new Error(message);\n\n    if (!this.reportedFailures.has(resolution.reason)) {\n      this.reportedFailures.add(resolution.reason);\n      this.logger.error(message);\n    }\n    return undefined;\n  }\n\n  public checkAuthMultiple(url?: string | undefined): Observable<LoginResponse[]> {\n    return this.oidc.checkAuthMultiple(url).pipe(\n      switchMap(responses => this.restoreSessionIfPossible(responses)),\n      switchMap((responses: LoginResponse[]) => {\n        let authenticatedConfig = responses.find(o => o.isAuthenticated);\n\n        if (authenticatedConfig && authenticatedConfig.configId) {\n          this.store.dispatch(\n            AuthActions.setCurrentProvider({ currentProvider: authenticatedConfig.configId }),\n          );\n          const activeProviderConfig = this.authConfig?.providers.find(\n            p => p.configId === authenticatedConfig?.configId,\n          );\n          return this.aclStore.loadACL(activeProviderConfig?.acl).pipe(\n            tap(() => this.handleRedirect()),\n            map(() => responses),\n          );\n        } else {\n          // GUEST/ANONYMOUS USER: Trigger loadACL with undefined.\n          return this.aclStore.loadACL(undefined).pipe(map(() => responses));\n        }\n      }),\n      tap({\n        next: (responses) => {\n          this._authReady$.next();\n          if (responses.some(r => r.isAuthenticated)) {\n            this._authenticated$.next();\n          }\n          this._authenticated$.complete();\n        },\n        error: () => {\n          this._authReady$.next();\n          this._authenticated$.complete();\n        },\n      }),\n    );\n  }\n\n  /**\n   * One renewal before a startup with expired tokens is called a guest session.\n   *\n   * The library decides authentication by reading storage: an expired access token is\n   * unauthenticated, and the refresh token sitting next to it is never tried. That is fine while a\n   * tab stays open — the watchdog renews long before expiry — but a browser that was closed comes\n   * back past it every time, and the user is sent to the login host to be recognised by its SSO\n   * cookie. Once that cookie is gone they get a login form, holding a refresh token that would\n   * have worked. Renewing here is what makes `offline_access` mean anything.\n   *\n   * Only reached when nothing is authenticated, so a callback page — where the library has just\n   * exchanged a code and says so — is left alone, and no refresh runs alongside that exchange.\n   * A success is indistinguishable from an ordinary authenticated startup downstream: the same ACL\n   * load, the same redirect handling, the same `authenticated$`, and so the watchdog starts as\n   * usual. A failure leaves the startup as it would have been, with the refresh token restored by\n   * the path in {@link BootSessionRestorer.refresh}.\n   *\n   * This runs inside the app initializer, so it is finished before the router's first navigation\n   * and no guard can see the in-between state — true while the host leaves initial navigation on\n   * its default, and worth knowing before turning that off.\n   */\n  private restoreSessionIfPossible(responses: LoginResponse[]): Observable<LoginResponse[]> {\n    if (responses.some(response => response.isAuthenticated)) return of(responses);\n\n    // Quiet resolution: the store has nothing in it this early, so this is the hostname match, and\n    // a domain no provider claims is already reported by every other path.\n    const provider = this.currentProvider;\n    if (!provider || !this.bootRestorer?.canRestore()) return of(responses);\n\n    this.logger.log('access token expired at startup, renewing from the stored refresh token');\n    return this.bootRestorer.refresh().pipe(\n      map(token => {\n        // An empty token means the renewal resolved without one, which is a failure like any other.\n        if (!token) return responses;\n\n        this.logger.log('session restored without a trip to the login host');\n        return responses.map(response =>\n          response.configId === provider.configId\n            ? { ...response, isAuthenticated: true, accessToken: token }\n            : response,\n        );\n      }),\n      // The startup must finish either way: a rejected refresh token is a guest session, not a\n      // failed bootstrap.\n      catchError(() => of(responses)),\n    );\n  }\n\n  public login(targetUrl?: string) {\n    const configId = this.resolvedConfigId('login');\n    // No provider means no realm to send the user to. Authorizing anyway would use whichever\n    // configuration is registered first and bring them back still unauthenticated, which reads as\n    // an endless login loop rather than as the configuration error it is.\n    if (!configId) return;\n\n    const returnUrl = targetUrl || this.router.url || '/';\n    this.localStorage.writeLocal('loginRedirectUrl', returnUrl);\n    this.logger.log(`call login method, loginRedirectUrl: ${returnUrl}`);\n\n    const urlHandler = this.electronUrlHandler ?? this.authUrlHandler;\n    if (urlHandler) {\n      return this.oidc.authorize(configId, { urlHandler });\n    }\n    return this.oidc.authorize(configId);\n  }\n\n  private get electronUrlHandler(): AuthUrlHandler | null {\n    const proc = (globalThis as any)['process'];\n    if (proc?.version !== undefined && proc?.versions?.['electron'] !== undefined) {\n      return (authUrl: string) => {\n        this.modal = window.open(authUrl, '_blank', 'nodeIntegration=no');\n      };\n    }\n    return null;\n  }\n\n  async logout() {\n    const configId = this.resolvedConfigId('logout');\n    // Guarded before lastValueFrom: an EMPTY logoff would reject with EmptyError.\n    if (!configId) return;\n    await lastValueFrom(this.oidc.logoff(configId));\n  }\n\n  logout$() {\n    const configId = this.resolvedConfigId('logout');\n    if (!configId) return EMPTY;\n    return this.oidc.logoff(configId);\n  }\n\n  public get userInfo$(): Observable<any> {\n    const configId = this.resolvedConfigId('userInfo$');\n    if (!configId) return of(null);\n\n    return this.oidc.userData$.pipe(\n      map(userData => {\n        const user = userData.allUserData.find(o => o.configId === configId);\n        return user ? user.userData : null;\n      }),\n    );\n  }\n\n  public get isAuthenticated$(): Observable<boolean> {\n    const configId = this.resolvedConfigId('isAuthenticated$');\n    if (!configId) return of(false);\n\n    return this.oidc.isAuthenticated$.pipe(\n      map(\n        isAuthenticated =>\n          isAuthenticated.allConfigsAuthenticated.find(o => o.configId === configId)\n            ?.isAuthenticated || false,\n      ),\n    );\n  }\n\n  public get accessToken$(): Observable<string | undefined> {\n    const configId = this.resolvedConfigId('accessToken$');\n    return configId ? this.oidc.getAccessToken(configId) : of(undefined);\n  }\n\n  public get idToken$(): Observable<string | undefined> {\n    const configId = this.resolvedConfigId('idToken$');\n    return configId ? this.oidc.getIdToken(configId) : of(undefined);\n  }\n\n  public get refreshToken$(): Observable<string | undefined> {\n    const configId = this.resolvedConfigId('refreshToken$');\n    return configId ? this.oidc.getRefreshToken(configId) : of(undefined);\n  }\n\n  public get roles$(): Observable<string[]> {\n    return this.accessToken$.pipe(\n      map(token => this.parseJwtService.parseJwt(token)),\n      map(payload => payload['roles'] as string[]),\n    );\n  }\n\n  public matchRoles(roles: string[]): Observable<boolean> {\n    return this.accessToken$.pipe(\n      map(token => this.parseJwtService.parseJwt(token)),\n      map(payload => payload['roles'] as string[]),\n      map(userRoles => roles.some(role => userRoles.includes(role))),\n    );\n  }\n\n  private handleRedirect() {\n    const redirect = this.localStorage.readLocal('loginRedirectUrl');\n    if (redirect) {\n      this.localStorage.removeLocal('loginRedirectUrl');\n      setTimeout(() => {\n        this.router.navigateByUrl(redirect, { replaceUrl: true });\n      }, 0);\n    }\n  }\n}\n","import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from \"@angular/common/http\";\nimport { Inject, Injectable } from \"@angular/core\";\nimport { Observable, switchMap, map } from 'rxjs';\nimport { AuthenticationService } from \"./services/auth.service\";\nimport { IConfiguration, RLB_CFG } from \"../configuration\";\n\n@Injectable()\nexport class TokenOauthInterceptor implements HttpInterceptor {\n\n  constructor(\n    private authenticationService: AuthenticationService,\n    @Inject(RLB_CFG) private appconfig: IConfiguration\n  ) { }\n  intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n    const endpoints = !this.appconfig.endpoints ? [] : Object.values(this.appconfig.endpoints).filter(e => e.auth && !e.wss)\n    if (!endpoints.some(e => request.url.includes(e.baseUrl))) {\n      return next.handle(request);\n    }\n    return this.authenticationService.accessToken$.pipe(\n      switchMap(token => {\n        if (token) {\n          const newRequest = request.clone({\n            setHeaders: { Authorization: `Bearer ${token}` }\n          });\n          return next.handle(newRequest);\n        }\n        return next.handle(request);\n      })\n    );\n  }\n}\n","import { InjectionToken } from \"@angular/core\";\nimport { AppInfo } from \"../../services/apps/app\";\nimport { AppDescriber } from \"../../services/apps/app-describer\";\n\nexport const appContextFeatureKey = 'app';\nexport type AppTheme = 'light' | 'dark';\nexport type PageTemplate = 'app' | 'basic' | 'cms' | 'content';\nexport const RLB_APPS = new InjectionToken<AppDescriber>(`rlb.apps`);\n\nexport interface AppContext {\n  apps: AppInfo[];\n  currentApp: AppInfo | null,\n  language: string | null,\n  theme: AppTheme,\n  supportedLanguages: string[];\n}\n\nexport const initialAppContextState: AppContext = {\n  apps: [],\n  currentApp: null,\n  language: null,\n  supportedLanguages: ['en'],\n  theme: 'light',\n};\n\nexport interface AppState { [appContextFeatureKey]: AppContext; }\n","import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';\nimport { inject, Injectable } from '@angular/core';\nimport { Store } from '@ngrx/store';\nimport { Observable } from 'rxjs';\nimport { appContextFeatureKey } from '../store/app-context/app-context.model';\nimport { ProjectConfiguration, RLB_CFG } from '../configuration';\n\n@Injectable()\nexport class CompanyInterceptor implements HttpInterceptor {\n  private store = inject(Store);\n  private config = inject(RLB_CFG) as ProjectConfiguration;\n\n  intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n    const authConfig = this.config.auth;\n    const isAllowed = authConfig?.allowedUrls?.some(url => req.url.includes(url));\n    if (!isAllowed || !authConfig?.enableCompanyInterceptor) {\n      return next.handle(req);\n    }\n    const currentApp = this.store.selectSignal(state => state[appContextFeatureKey].currentApp)();\n    const data = currentApp?.data as { [key: string]: string } | undefined;\n    const mapping = this.config.acl?.interceptorMapping || {};\n    let params = req.params;\n    for (const key of Object.keys(mapping)) {\n      const storeKey = mapping[key];\n      const value = data?.[storeKey];\n      if (!!value) {\n        params = params.set(storeKey, value);\n      }\n    }\n    const clonedReq = req.clone({ params });\n    return next.handle(clonedReq);\n  }\n}\n","import { DestroyRef, Injectable, inject } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { AbstractSecurityStorage, OidcSecurityService } from 'angular-auth-oidc-client';\nimport {\n  EMPTY,\n  Observable,\n  Subject,\n  catchError,\n  defer,\n  expand,\n  finalize,\n  map,\n  mergeMap,\n  of,\n  shareReplay,\n  switchMap,\n  take,\n  tap,\n  throwError,\n  timer,\n} from 'rxjs';\nimport { RLB_CFG_AUTH, TokenRenewalConfiguration } from '../../configuration';\nimport { AuthenticationService } from '../services/auth.service';\n\n/** Floor on the wait, so a token that is already expiring cannot spin the timer. */\nconst MIN_DELAY_SECONDS = 5;\n\nconst MS_PER_SECOND = 1000;\n\nconst DEFAULTS: Required<\n  Pick<\n    TokenRenewalConfiguration,\n    'renewLeadSeconds' | 'retryDelaysSeconds' | 'transientRetrySeconds' | 'maxOutageSeconds'\n  >\n> = {\n  renewLeadSeconds: 90,\n  retryDelaysSeconds: [5, 20, 60],\n  transientRetrySeconds: 120,\n  maxOutageSeconds: 30 * 60,\n};\n\n/**\n * The shape of the OIDC library's per-config entry in storage, reduced to the two places a refresh\n * token can live.\n */\ninterface StoredAuthState {\n  authnResult?: { refresh_token?: string };\n  reusable_refresh_token?: string;\n}\n\n/** Where the watchdog stands: what it is waiting for, and how long the current outage has run. */\ninterface RenewalState {\n  /** Consecutive failures so far; 0 while healthy. Indexes the retry ladder. */\n  attempt: number;\n  /** When the current outage started, or 0 while healthy. Bounds the heartbeat. */\n  failingSince: number;\n  /** Seconds to wait before the next attempt. */\n  delaySeconds: number;\n}\n\n/**\n * Keeps the access token fresh for as long as the tab is open.\n *\n * The OIDC library already does this, but its periodic check is one-strike: a failed renewal ends\n * in `finalize(() => refreshTokenFailed && this.intervalService.stopPeriodicTokenCheck())`, which\n * unsubscribes the interval and nulls the handle — and `startTokenValidationPeriodically` is only\n * ever reached from the `checkAuth` path, so nothing starts it again. One failed refresh therefore\n * disables renewal for the life of the page: the token expires a few minutes later, every request\n * comes back 401, and the route guard bounces the user out to the login host. Reloading appears to\n * fix it only because bootstrap runs `checkAuth`, which refreshes once and starts the countdown\n * again.\n *\n * This watchdog keeps its own clock, so a failure costs one attempt rather than the mechanism.\n *\n * The library has a second, nastier failure mode: on any refresh error that is not a pure network\n * error — a gateway 504 while the login host is down qualifies — `resetAuthorizationData` erases\n * the access, id AND refresh token from storage before the error ever reaches this service. The\n * session is still perfectly alive on the provider's side; only the local copy of the refresh token\n * is gone, and with it any chance of recovering without a full login. So a snapshot of the stored\n * auth state is taken before every attempt and put back after a failure ({@link restoreIfWiped}),\n * so the next attempt has something to work with. A {@link lastKnownGood} copy is carried across\n * attempts as well, so a wipe by something this service does not drive is recoverable too.\n *\n * It should not have to be: `'oauth-code-ep-retry'` switches the library's own periodic check off,\n * so this is the only renewer running (`auth.provider.ts`). Both were live until 2026-08-11, and\n * through an outage the library's unguarded check destroyed the refresh token about a minute after\n * this one's first failed attempt. A host that deliberately puts the library's check back with a\n * per-provider `silentRenew: true` gets the restore rather than the session loss.\n *\n * Retries follow a short ladder and then a slow heartbeat, for as long as a refresh token survives\n * in storage and the outage stays inside its budget. There is deliberately no attempt to tell a\n * dead token from an unreachable host: the library destroys that information before the error\n * arrives, so the budget is what stops a rejected token being retried forever. Once the watchdog\n * stands down, the retry interceptor still recovers on the next 401 and calls {@link rearm}.\n *\n * Everything runs on one chain. {@link start} and {@link rearm} push onto a single trigger whose\n * `switchMap` cancels whatever was scheduled, so no amount of rearming can leave two chains racing\n * to spend the same refresh token — with rotation enabled, the second spend revokes the session.\n *\n * Provided in root but inert: nothing happens until something starts it. `'oauth-code-ep-retry'`\n * starts it for you unless `auth.renewal.autoStart` is false.\n */\n@Injectable({ providedIn: 'root' })\nexport class TokenRenewalService {\n  private readonly oidc = inject(OidcSecurityService);\n  private readonly authService = inject(AuthenticationService);\n  private readonly destroyRef = inject(DestroyRef);\n  private readonly storage = inject(AbstractSecurityStorage);\n  private readonly config = inject(RLB_CFG_AUTH, { optional: true })?.renewal;\n\n  private readonly renewLeadSeconds = this.config?.renewLeadSeconds ?? DEFAULTS.renewLeadSeconds;\n  private readonly retryDelaysSeconds =\n    this.config?.retryDelaysSeconds ?? DEFAULTS.retryDelaysSeconds;\n  private readonly transientRetrySeconds =\n    this.config?.transientRetrySeconds ?? DEFAULTS.transientRetrySeconds;\n  private readonly maxOutageSeconds = this.config?.maxOutageSeconds ?? DEFAULTS.maxOutageSeconds;\n\n  /**\n   * The refresh currently in flight, shared by every caller.\n   *\n   * Parallel refreshes are the failure this whole service exists to avoid: several requests failing\n   * at once would each spend the same refresh token, and with rotation enabled all but the first\n   * are rejected — taking the session with them.\n   */\n  private inFlight?: Observable<string>;\n\n  /**\n   * The last stored state seen holding a refresh token, kept across attempts.\n   *\n   * A snapshot taken immediately before an attempt only covers a wipe by that attempt. Storage can\n   * also be emptied between attempts by something this service does not drive — the OIDC library's\n   * own periodic check is the case that cost a live session on 2026-08-11 — and by the time the next\n   * attempt reads storage there is nothing left to snapshot. This is what it falls back to.\n   */\n  private lastKnownGood?: string;\n\n  private started = false;\n\n  /**\n   * Every request to (re)schedule the watchdog. One subscription, `switchMap`ped, so the chain\n   * already on the clock is cancelled rather than joined by a second one.\n   */\n  private readonly restart$ = new Subject<void>();\n\n  constructor() {\n    this.restart$\n      .pipe(\n        switchMap(() => this.watch()),\n        takeUntilDestroyed(this.destroyRef),\n      )\n      .subscribe();\n  }\n\n  /** Begins watching the current token. Safe to call more than once. */\n  start(): void {\n    if (this.started) return;\n    this.rearm();\n  }\n\n  /** The token as currently stored, without renewing anything. */\n  accessToken(): Observable<string> {\n    return this.oidc.getAccessToken(this.configId()).pipe(take(1));\n  }\n\n  /**\n   * Whether a session the OIDC library reports as unauthenticated can still be expected to come\n   * back — because this watchdog is still working on it and storage still holds a refresh token.\n   *\n   * The library's `isAuthenticated$` is a `BehaviorSubject` that only moves when the library itself\n   * sets it, while `AuthStateService.isAuthenticated()` is a pure function of storage. A failed\n   * refresh calls `resetAuthorizationData`, which does both: it empties storage _and_ pushes\n   * `false`. {@link restoreIfWiped} then puts the whole storage blob back — so the storage-backed\n   * truth recovers and the subject does not, and there is no way to correct it: `AuthStateService`\n   * is not exported from the package.\n   *\n   * So a guard reading `isAuthenticated$` sees a signed-out user through an outage and sends them\n   * to a login host that is, by construction, the thing that is down. This is what {@link oauthGuard}\n   * consults instead of bouncing. Once the outage budget is spent the watchdog stands down, this\n   * turns false, and a genuinely dead session reaches the login page as it always did.\n   */\n  isRecoverable(): boolean {\n    return this.started && this.hasStoredRefreshToken();\n  }\n\n  /**\n   * Whether storage holds a refresh token to renew with, in either of the two slots the library\n   * keeps one in.\n   *\n   * Read at startup, before the watchdog is running, to decide whether a session the library calls\n   * unauthenticated is worth one renewal — see {@link BootSessionRestorer}. Deliberately not\n   * `oidc.getRefreshToken()`: that returns nothing unless the access and id tokens are also still\n   * in storage, which is precisely what has expired by then.\n   */\n  hasStoredRefreshToken(): boolean {\n    return hasRefreshToken(this.readStoredState());\n  }\n\n  /** Renews the token, joining the attempt already running rather than starting a second one. */\n  refresh(): Observable<string> {\n    if (!this.inFlight) {\n      this.inFlight = defer(() => {\n        // Taken before the library runs, because on failure the library erases the refresh token\n        // from storage even when the token itself was fine and only the host was unreachable.\n        const snapshot = this.readStoredState();\n\n        return this.oidc.forceRefreshSession(undefined, this.configId()).pipe(\n          map(response => response?.accessToken ?? ''),\n          // An empty token means the refresh resolved without one — the wipe still happened.\n          tap(token => {\n            // Read for its side effect: a success rotated the refresh token, and reading it now\n            // keeps {@link lastKnownGood} from naming the one this attempt has just spent.\n            if (token) this.readStoredState();\n            else this.restoreIfWiped(snapshot);\n          }),\n          catchError((error: unknown) => {\n            this.restoreIfWiped(snapshot);\n            return throwError(() => error);\n          }),\n        );\n      }).pipe(\n        finalize(() => (this.inFlight = undefined)),\n        shareReplay({ bufferSize: 1, refCount: false }),\n      );\n    }\n    return this.inFlight;\n  }\n\n  /**\n   * Puts the watchdog back on the clock after an outside refresh — the interceptor calls this so a\n   * request that recovered on its own also revives automatic renewal.\n   */\n  rearm(): void {\n    this.started = true;\n    this.restart$.next();\n  }\n\n  /**\n   * One renewal cycle, from the token as it stands now until the watchdog stands down.\n   *\n   * `expand` feeds each attempt's outcome back in as the next wait, so the whole cycle is a single\n   * chain: there is no second timer that could fall out of step with this one.\n   */\n  private watch(): Observable<RenewalState> {\n    return this.accessToken().pipe(\n      map(token => ({ attempt: 0, failingSince: 0, delaySeconds: this.delayFor(token) })),\n      expand(state => this.runAttempt(state)),\n    );\n  }\n\n  /** Waits out a state's delay, renews, and reports where that leaves the watchdog. */\n  private runAttempt(state: RenewalState): Observable<RenewalState> {\n    return timer(state.delaySeconds * MS_PER_SECOND).pipe(\n      switchMap(() => this.refresh()),\n      // An empty token means the refresh resolved without one: a failed attempt, not a schedule.\n      map(token => (token ? this.afterSuccess(token) : this.afterFailure(state))),\n      catchError(() => of(this.afterFailure(state))),\n      // No next state means the watchdog stands down, which ends the chain.\n      mergeMap(next => (next ? of(next) : EMPTY)),\n    );\n  }\n\n  /** Back on the normal schedule, with the outage budget reset. */\n  private afterSuccess(token: string): RenewalState {\n    return { attempt: 0, failingSince: 0, delaySeconds: this.delayFor(token) };\n  }\n\n  /**\n   * Where a failed attempt leaves the watchdog, or undefined to stand down.\n   *\n   * The ladder always runs in full; only once it is spent does the watchdog ask whether carrying on\n   * can still help. It cannot if storage holds no refresh token to try with, or if this outage has\n   * already had its budget.\n   */\n  private afterFailure(state: RenewalState): RenewalState | undefined {\n    const now = Date.now();\n    const failingSince = state.failingSince || now;\n    const attempt = state.attempt + 1;\n\n    if (attempt <= this.retryDelaysSeconds.length) {\n      return { attempt, failingSince, delaySeconds: this.retryDelaysSeconds[attempt - 1] };\n    }\n\n    const budgetSpent = now - failingSince >= this.maxOutageSeconds * MS_PER_SECOND;\n    if (budgetSpent || !hasRefreshToken(this.readStoredState())) {\n      // Standing down beats hammering the login host; the interceptor still recovers on the next\n      // 401 and calls rearm(). Set here rather than in a finalize on the chain: switchMap tears the\n      // chain down on every rearm(), and a finalize would clear the flag on a healthy restart.\n      this.started = false;\n      return undefined;\n    }\n    return { attempt, failingSince, delaySeconds: this.transientRetrySeconds };\n  }\n\n  /** Seconds to wait before the next renewal, derived from the token's own expiry. */\n  private delayFor(token: string): number {\n    const secondsLeft = secondsUntilExpiry(token);\n    // No usable expiry: fall back to the lead time so the watchdog still ticks instead of stalling.\n    if (secondsLeft === undefined) return this.renewLeadSeconds;\n\n    // Scale the lead down for short-lived tokens, so it can never exceed the token's own life.\n    const lead = Math.min(this.renewLeadSeconds, Math.floor(secondsLeft / 3));\n    return Math.max(secondsLeft - lead, MIN_DELAY_SECONDS);\n  }\n\n  /**\n   * The provider for this domain.\n   *\n   * `AuthenticationService` resolves it from the store, or by hostname when the store has not\n   * settled it, and reports a domain no provider claims rather than letting the OIDC library fall\n   * back to the first registered configuration.\n   */\n  private configId(): string | undefined {\n    return this.authService.currentProvider?.configId;\n  }\n\n  /**\n   * The library's whole stored state for this config, as the raw string it keeps in storage.\n   *\n   * The single read point, so remembering a usable state here is enough to keep\n   * {@link lastKnownGood} current without a second code path to keep in step with this one.\n   */\n  private readStoredState(): string | null {\n    const configId = this.configId();\n    const raw = configId ? ((this.storage.read(configId) as string | null) ?? null) : null;\n    if (hasRefreshToken(raw)) this.lastKnownGood = raw ?? undefined;\n    return raw;\n  }\n\n  /**\n   * Puts a refresh token back after storage was wiped over a failed refresh.\n   *\n   * The pre-attempt snapshot is preferred, and {@link lastKnownGood} covers the case it cannot: a\n   * wipe by a renewer this service does not drive, which leaves the next attempt nothing to\n   * snapshot. Either way the write is guarded twice — the candidate must actually hold a refresh\n   * token, and the current storage must not. If another tab renewed in the meantime its fresher\n   * tokens win, since restoring an already-rotated token would only earn a rejection next round.\n   *\n   * A token the provider has genuinely rejected does get restored here, whichever source it came\n   * from, because nothing in the error says it was rejected; the outage budget is what stops that\n   * becoming a loop.\n   */\n  private restoreIfWiped(snapshot: string | null): void {\n    const candidate = hasRefreshToken(snapshot) ? snapshot : (this.lastKnownGood ?? null);\n    if (!candidate || hasRefreshToken(this.readStoredState())) return;\n\n    const configId = this.configId();\n    if (configId) this.storage.write(configId, candidate);\n  }\n}\n\n/** Whether a raw storage entry still holds a refresh token to try with. */\nfunction hasRefreshToken(raw: string | null): boolean {\n  if (!raw) return false;\n  try {\n    const state = JSON.parse(raw) as StoredAuthState;\n    return Boolean(state.authnResult?.refresh_token || state.reusable_refresh_token);\n  } catch {\n    return false;\n  }\n}\n\n/**\n * Seconds left on a JWT, or undefined when it carries no readable `exp`.\n *\n * Reading the claim beats asking the library: its expiry helpers are not part of the public API,\n * and a token we cannot read is a case the caller has to handle anyway.\n */\nexport function secondsUntilExpiry(token: string): number | undefined {\n  const payload = token?.split('.')[1];\n  if (!payload) return undefined;\n\n  try {\n    const json = JSON.parse(\n      decodeURIComponent(\n        atob(payload.replace(/-/g, '+').replace(/_/g, '/'))\n          .split('')\n          .map(char => `%${`00${char.charCodeAt(0).toString(16)}`.slice(-2)}`)\n          .join(''),\n      ),\n    ) as { exp?: number };\n\n    if (typeof json.exp !== 'number') return undefined;\n    return json.exp - Math.floor(Date.now() / MS_PER_SECOND);\n  } catch {\n    return undefined;\n  }\n}\n","import {\n  HttpErrorResponse,\n  HttpEvent,\n  HttpHandler,\n  HttpInterceptor,\n  HttpRequest,\n} from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { Observable, catchError, map, of, switchMap, throwError } from 'rxjs';\nimport { IConfiguration, RLB_CFG, RLB_CFG_AUTH } from '../../configuration';\nimport { AuthenticationService } from '../services/auth.service';\nimport { TokenRenewalService } from './token-renewal.service';\n\nconst UNAUTHORIZED = 401;\nconst AUTHORIZATION = 'Authorization';\nconst BEARER = 'Bearer ';\n\n/**\n * Attaches the access token to calls on authenticated endpoints, and recovers the two failures\n * `TokenOauthInterceptor` leaves to the caller.\n *\n * **It never sends an authenticated request anonymously.** `TokenOauthInterceptor` attaches\n * whatever token it finds and, finding none, sends the request anyway with no `Authorization`\n * header — so the backend gets a call it cannot attribute to anyone, which is how a stalled\n * renewal turns into a flood of \"missing user id\" errors rather than a visible auth failure. Here a\n * request either leaves with a token or does not leave at all, failing with a 401 raised locally.\n *\n * **It retries a 401 once**, with a freshly renewed token. Retrying a 401 is safe in a way retrying\n * a 500 is not: 401 means the request was rejected before it was acted on, so replaying it cannot\n * repeat a side effect. The retry is issued downstream of this interceptor, so its own failure\n * travels straight to the caller and cannot loop back through here.\n *\n * Selected with `auth.interceptor: 'oauth-code-ep-retry'`, which also brings up\n * {@link TokenRenewalService}. It replaces `TokenOauthInterceptor` rather than stacking on it.\n *\n * Three things pass through untouched: calls that are not on an authenticated endpoint, calls to\n * `auth.renewal.publicPaths` — set that for front-door calls like registration, which anonymous\n * visitors legitimately make — and every call on a domain where no auth provider resolves, which\n * behaves exactly as `'oauth-code-ep'` did.\n */\n@Injectable()\nexport class TokenOauthRetryInterceptor implements HttpInterceptor {\n  private readonly renewal = inject(TokenRenewalService);\n  private readonly authService = inject(AuthenticationService);\n  private readonly appconfig = inject<IConfiguration>(RLB_CFG);\n  private readonly publicPaths = inject(RLB_CFG_AUTH, { optional: true })?.renewal?.publicPaths ?? [];\n\n  intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n    if (!this.isAuthenticatedEndpoint(request.url)) return next.handle(request);\n    if (this.publicPaths.some(path => request.url.includes(path))) return next.handle(request);\n    // No provider for this domain means no token to attach and nothing a retry could fix. Behaving\n    // like the plain interceptor keeps a shell that serves several tenants working on the ones this\n    // build has no provider for.\n    if (!this.authService.currentProvider) return next.handle(request);\n\n    if (bearerOf(request)) return this.handleWithRetry(request, next);\n    return this.sendAuthenticated(request, next);\n  }\n\n  /** Gets a token before the request leaves, rather than letting it go out anonymous. */\n  private sendAuthenticated(\n    request: HttpRequest<any>,\n    next: HttpHandler,\n  ): Observable<HttpEvent<any>> {\n    return this.renewal.accessToken().pipe(\n      switchMap(current => (current ? of(unrenewed(current)) : renewed(this.renewal.refresh()))),\n      catchError(() => of(unrenewed(''))),\n      switchMap(attempt => {\n        if (!attempt.token) return throwError(() => unauthenticated(request));\n        this.rearmIfRenewed(attempt);\n        return this.handleWithRetry(withBearer(request, attempt.token), next);\n      }),\n    );\n  }\n\n  /**\n   * Puts the watchdog back on the clock, but only when this request actually renewed the token.\n   *\n   * Rearming cancels and restarts the renewal chain, which also restarts the outage budget. Doing\n   * that for every request would mean ordinary traffic silently resets the bound that stops a dead\n   * refresh token being retried forever — so only a real renewal counts as recovery.\n   */\n  private rearmIfRenewed(attempt: RefreshAttempt): void {\n    if (attempt.renewed) this.renewal.rearm();\n  }\n\n  private handleWithRetry(\n    request: HttpRequest<any>,\n    next: HttpHandler,\n  ): Observable<HttpEvent<any>> {\n    return next.handle(request).pipe(\n      catchError((error: unknown) => {\n        if (!(error instanceof HttpErrorResponse) || error.status !== UNAUTHORIZED) {\n          return throwError(() => error);\n        }\n        return this.retryOnce(request, next, error);\n      }),\n    );\n  }\n\n  private retryOnce(\n    request: HttpRequest<any>,\n    next: HttpHandler,\n    original: HttpErrorResponse,\n  ): Observable<HttpEvent<any>> {\n    const sentWith = bearerOf(request);\n\n    return this.renewal.accessToken().pipe(\n      // A token that changed under us means another request refreshed while this one was in\n      // flight; reusing it avoids spending the refresh token twice for the same expiry. This only\n      // holds when the request actually carried a token — without one there is nothing to compare\n      // against, and taking the shortcut would retry with a token that was never the problem.\n      switchMap(current =>\n        sentWith && current && current !== sentWith\n          ? of(unrenewed(current))\n          : renewed(this.renewal.refresh()),\n      ),\n      catchError(() => of(unrenewed(''))),\n      switchMap(attempt => {\n        if (!attempt.token) return throwError(() => original);\n        this.rearmIfRenewed(attempt);\n        return next.handle(withBearer(request, attempt.token));\n      }),\n    );\n  }\n\n  /** The same endpoints `TokenOauthInterceptor` matches: only those can answer 401. */\n  private isAuthenticatedEndpoint(url: string): boolean {\n    return Object.values(this.appconfig.endpoints ?? {})\n      .filter(endpoint => endpoint.auth && !endpoint.wss)\n      .some(endpoint => url.includes(endpoint.baseUrl));\n  }\n}\n\n/** A token, and whether getting it cost a refresh — which is what makes it worth rearming on. */\ninterface RefreshAttempt {\n  token: string;\n  renewed: boolean;\n}\n\nconst unrenewed = (token: string): RefreshAttempt => ({ token, renewed: false });\n\nconst renewed = (refresh: Observable<string>): Observable<RefreshAttempt> =>\n  refresh.pipe(map(token => ({ token, renewed: true })));\n\nfunction bearerOf(request: HttpRequest<any>): string {\n  const header = request.headers.get(AUTHORIZATION) ?? '';\n  return header.startsWith(BEARER) ? header.slice(BEARER.length) : '';\n}\n\n/** The 401 the request would have earned, raised without spending a round trip to find out. */\nfunction unauthenticated(request: HttpRequest<any>): HttpErrorResponse {\n  return new HttpErrorResponse({\n    status: UNAUTHORIZED,\n    statusText: 'Unauthorized',\n    url: request.url,\n    error: 'No access token available for an authenticated endpoint.',\n  });\n}\n\nfunction withBearer(request: HttpRequest<any>, token: string): HttpRequest<any> {\n  return request.clone({ setHeaders: { [AUTHORIZATION]: `${BEARER}${token}` } });\n}\n","import { HTTP_INTERCEPTORS } from \"@angular/common/http\";\nimport { EnvironmentProviders, inject, Injector, makeEnvironmentProviders, provideAppInitializer, Provider } from \"@angular/core\";\nimport {\n  AbstractLoggerService,\n  AbstractSecurityStorage,\n  AuthInterceptor,\n  AuthModule,\n  OpenIdConfiguration,\n  provideAuth\n} from \"angular-auth-oidc-client\";\nimport { AuthConfiguration, RLB_CFG_AUTH } from \"../configuration\";\nimport { TokenCookiesService } from \"./providers/token-cookies.service\";\nimport { TokenSessionService } from \"./providers/token-session.service\";\nimport { TokenStoreService } from \"./providers/token-store.service\";\nimport { AppLoggerService } from \"../services/apps/app-logger.service\";\nimport { TokenOauthInterceptor } from \"./token-oauth-interceptor\";\nimport { CompanyInterceptor } from \"./company.interceptor\";\nimport { TokenOauthRetryInterceptor } from \"./renewal/token-oauth-retry.interceptor\";\nimport { TokenRenewalService } from \"./renewal/token-renewal.service\";\nimport { BootSessionRestorer, RLB_BOOT_SESSION_RESTORER } from \"./renewal/boot-session-restore\";\nimport { AuthenticationService } from \"./services/auth.service\";\n\n/**\n * The OIDC library configuration each provider is registered with. Exported for its spec — the\n * providers this file returns are opaque `EnvironmentProviders`, so nothing else can read them back.\n *\n * Everything here is written after the spread, so a provider cannot override it — except\n * `silentRenew`, which a host may need to set explicitly. See below.\n */\nexport function oidcConfigsFor(auth: AuthConfiguration): OpenIdConfiguration[] {\n  // Under 'oauth-code-ep-retry' the watchdog owns renewal, so the library's own periodic check is\n  // switched off. Leaving it on means two renewers spending one refresh token, and only the\n  // watchdog's attempts are snapshot-protected: on a non-network failure the library's check ends in\n  // resetAuthorizationData, which erases the refresh token nothing then puts back. Through an outage\n  // that costs the session about a minute after the watchdog's first failed attempt.\n  const librarySilentRenew = auth.interceptor !== 'oauth-code-ep-retry';\n\n  return auth.providers.map((_auth) => ({\n    ..._auth,\n    secureRoutes: auth.allowedUrls,\n    responseType: 'code',\n    useRefreshToken: true,\n    autoUserInfo: true,\n    renewUserInfoAfterTokenRenew: true,\n    ignoreNonceAfterRefresh: true,\n    renewTimeBeforeTokenExpiresInSeconds: 30,\n    // Read back off the provider so a host can put the library's check back if it has a reason to.\n    silentRenew: _auth.silentRenew ?? librarySilentRenew,\n  }));\n}\n\n/**\n * The startup renewal `AuthenticationService` runs before concluding nobody is signed in.\n *\n * Exported for its spec, like {@link oidcConfigsFor}. The `TokenRenewalService` lookups are\n * deliberately inside the methods rather than in the factory: the factory runs while\n * `AuthenticationService` is being constructed — it is the thing injecting this — and that service\n * injects `AuthenticationService` right back, so resolving it here would be NG0200. By the time\n * either method is called both exist.\n */\nexport function bootSessionRestorer(injector: Injector): BootSessionRestorer {\n  return {\n    canRestore: () => injector.get(TokenRenewalService).hasStoredRefreshToken(),\n    // The watchdog's own path, so a failure that wipes storage is restored rather than ending the\n    // session. Calling oidc.forceRefreshSession directly here would give up exactly that.\n    refresh: () => injector.get(TokenRenewalService).refresh(),\n  };\n}\n\nexport function provideRlbCodeBrowserOAuth(auth: AuthConfiguration | undefined): EnvironmentProviders {\n  if (!auth || auth.protocol !== 'oauth') return makeEnvironmentProviders([]);\n  const providers: (Provider | EnvironmentProviders)[] = [\n    { provide: RLB_CFG_AUTH, useValue: auth },\n    { provide: AbstractLoggerService, useClass: AppLoggerService },\n    AuthModule,\n    provideAuth({ config: oidcConfigsFor(auth) }),\n  ];\n  if (auth.interceptor === 'oauth-code-all') {\n    providers.push({ provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true });\n  }\n  if (auth.interceptor === 'oauth-code-ep') {\n    providers.push({ provide: HTTP_INTERCEPTORS, useClass: TokenOauthInterceptor, multi: true });\n  }\n  if (auth.interceptor === 'oauth-code-ep-retry') {\n    // Replaces TokenOauthInterceptor rather than stacking on it: it attaches the token itself.\n    providers.push({ provide: HTTP_INTERCEPTORS, useClass: TokenOauthRetryInterceptor, multi: true });\n    if (auth.renewal?.restoreOnBoot !== false) {\n      providers.push({\n        provide: RLB_BOOT_SESSION_RESTORER,\n        useFactory: () => bootSessionRestorer(inject(Injector)),\n      });\n    }\n    if (auth.renewal?.autoStart !== false) {\n      providers.push(\n        provideAppInitializer(() => {\n          const renewal = inject(TokenRenewalService);\n          // authenticated$ emits only once some configuration is authenticated, and completes\n          // either way, so a guest session never starts the watchdog. It is a ReplaySubject, so\n          // subscribing after checkAuthMultiple has already run still works.\n          inject(AuthenticationService).authenticated$.subscribe(() => renewal.start());\n        }),\n      );\n    }\n  }\n  if (auth.enableCompanyInterceptor) {\n    providers.push({ provide: HTTP_INTERCEPTORS, useClass: CompanyInterceptor, multi: true });\n  }\n  if (auth.storage === 'cookies') {\n    providers.push({ provide: AbstractSecurityStorage, useClass: TokenCookiesService });\n  }\n  if (auth.storage === 'localStorage') {\n    providers.push({ provide: AbstractSecurityStorage, useClass: TokenStoreService },);\n  }\n  if (auth.storage === 'sessionStorage') {\n    providers.push({ provide: AbstractSecurityStorage, useClass: TokenSessionService },);\n  }\n\n  return makeEnvironmentProviders(providers);\n}\n","import { ChangeDetectionStrategy, Component, input, model, OnInit } from '@angular/core';\nimport { IModal, ModalData, ModalDirective } from '@open-rlb/ng-bootstrap';\n\n@Component({\n  imports: [],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  template: `\n    <div class=\"modal-header\">\n      <h5 class=\"modal-title\">{{ data().title }}</h5>\n      <button\n        type=\"button\"\n        class=\"btn-close\"\n        aria-label=\"Close\"\n        data-modal-reason=\"close\"\n      ></button>\n    </div>\n    <div class=\"modal-body\">\n      <span>{{ data().content }}</span>\n    </div>\n    <div class=\"modal-footer\">\n      <button\n        type=\"button\"\n        class=\"btn btn-primary\"\n        data-modal-reason=\"close\"\n      >\n        {{ data().ok }}\n      </button>\n    </div>\n  `,\n  hostDirectives: [\n    {\n      directive: ModalDirective,\n      inputs: ['id', 'data-instance', 'data-options'],\n    },\n  ],\n})\nexport class ErrorModalComponent implements IModal<string, void>, OnInit {\n  data = input.required<ModalData<any>>();\n  valid = model(true);\n\n  onEnter() {}\n\n  ngOnInit(): void {\n    console.log(this.data());\n  }\n}\n","import { ChangeDetectionStrategy, Component, input, model } from '@angular/core';\nimport { IModal, ModalData, ModalDirective, TooltipDirective } from '@open-rlb/ng-bootstrap';\nimport { AppInfo } from '../services/apps/app';\nimport { CommonModule, NgClass } from '@angular/common';\nimport { TranslateModule } from '@ngx-translate/core';\n\n@Component({\n  imports: [TranslateModule, CommonModule, TooltipDirective],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  template: `\n    <div class=\"modal-header\">\n      <h5 class=\"modal-title\">{{ data().title }}</h5>\n      <button\n        type=\"button\"\n        class=\"btn-close\"\n        aria-label=\"Close\"\n        data-modal-reason=\"close\"\n      ></button>\n    </div>\n    <div class=\"modal-body\">\n      <ul class=\"row row-cols-4 list-unstyled list\">\n        @for (app of data().content; track app) {\n          <li\n            class=\"col my-2\"\n            [tooltip]=\"app.description | translate\"\n          >\n            <a\n              class=\"d-block text-body-emphasis text-decoration-none\"\n              (click)=\"appSelected(app)\"\n              [class.disabled]=\"!app.enabled\"\n              data-modal-reason=\"ok\"\n            >\n              <div class=\"px-3 py-4 mb-2 bg-body-secondary text-center rounded\">\n                <i [ngClass]=\"app.icon\"></i>\n              </div>\n              <div class=\"name text-muted text-decoration-none text-center pt-1\">\n                {{ app.name | translate }}\n              </div>\n            </a>\n          </li>\n        }\n      </ul>\n    </div>\n  `,\n  hostDirectives: [{ directive: ModalDirective, inputs: ['id', 'data-instance', 'data-options'] }],\n})\nexport class ModalAppsComponent implements IModal<AppInfo[], AppInfo> {\n  data = input.required<ModalData<any>>();\n  valid = model(true);\n  result?: any;\n  apps: AppInfo[] = [];\n\n  appSelected(app: AppInfo) {\n    this.result = app;\n  }\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport abstract class AbstractMdService {\n\n  constructor() { }\n\n  public abstract md2html(md: string): string;\n  public abstract md2text(md: string): string;\n}\n","import { Inject, Injectable, Optional } from '@angular/core';\nimport { Observable, of, share, switchMap } from 'rxjs'\nimport { CacheItem } from './cache-item';\nimport { ProjectConfiguration, RLB_CFG } from '../../configuration';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class LocalCacheService {\n\n  constructor(\n    @Inject(RLB_CFG) @Optional() private options: ProjectConfiguration\n  ) {\n    this.clear()\n  }\n\n  private clear() {\n    if (typeof localStorage !== 'undefined') {\n      for (let i: number = 0; i < localStorage.length; i++) {\n        const key: string = localStorage.key(i) || ''\n        const val = localStorage.getItem(key)\n        if (!val) continue\n        try {\n          const exp: CacheItem<any> = JSON.parse(val)\n          if (Date.now() > exp?.expire) {\n            localStorage.removeItem(key)\n          }\n        } catch (e) { }\n      }\n    }\n  }\n\n  private readData<T>(key: string): CacheItem<T> | null {\n    if (typeof localStorage !== 'undefined') {\n      const val = localStorage.getItem(key)\n      if (!val) return null\n      return JSON.parse(key)\n    }\n    return null;\n  }\n\n  private storeData<T>(key: string, data: CacheItem<T>): void {\n    if (typeof localStorage !== 'undefined') {\n      localStorage.setItem(key, JSON.stringify(data))\n    }\n  }\n\n  public getData<T>(ob: Observable<T>, cacheKey: string, expirationSec: number): Observable<T> {\n    const cachedValue = this.readData<T>(cacheKey)\n    return of(cachedValue).pipe(switchMap(cache => {\n      if (cache && cache.expire >= Date.now()) {\n        if (!this.options.production) {\n          console.info(\"%c Cache: \" + cacheKey, 'background: #e5edff; color: #000')\n        }\n        return of(cache.data)\n      } else {\n        if (!this.options.production) {\n          console.info(\"%c Cached: \" + cacheKey, 'background: #e5edff; color: #000')\n        }\n        return ob.pipe(\n          share(),\n          switchMap(data => {\n            this.storeData<T>(cacheKey, {\n              data,\n              expire: Date.now() + (expirationSec || 60) * 1000\n            })\n            return of(data)\n          }))\n      }\n    }),\n      share())\n  }\n}\n","import { Inject, Injectable, Optional } from '@angular/core'\nimport { HttpClient } from '@angular/common/http'\nimport { LocalCacheService } from '../cache/local-cache.service';\nimport { FaqGroup, Home, MenuItem, Page, Tab, Topic } from './strapi.service.models';\nimport { Observable, from, lastValueFrom, map, switchMap, zip } from 'rxjs'\nimport { CmsConfiguration, RLB_CFG_CMS } from '../../configuration'\n\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class StrapiService {\n\n  constructor(\n    private http: HttpClient,\n    private cache: LocalCacheService,\n    @Inject(RLB_CFG_CMS) @Optional() private cmsOptions: CmsConfiguration) { }\n\n  public fetchHome(lang: string, cid: string): Observable<Home> {\n    const __r = this.http.get<Home>(`${this.cmsOptions.endpoint}/homes/${lang}/${cid}`)\n    return this.cache.getData(__r, `strapiHome/${lang}/${cid}`, this.cmsOptions.chacheDuration || 3600)\n  }\n\n  public fetchTopic(id: string): Observable<Topic> {\n    return this.http.get<Topic>(`${this.cmsOptions.endpoint}/topics/${id}`)\n  }\n\n  public fetchTab(id: string): Observable<Tab> {\n    return this.http.get<Tab>(`${this.cmsOptions.endpoint}/tabs/${id}`)\n  }\n\n  public fetchFaqGroup(lang: string, cid: string): Observable<FaqGroup> {\n    return this.http.get<FaqGroup>(`${this.cmsOptions.endpoint}/faq-groups/${lang}/${cid}`)\n  }\n\n\n  private async _getGuideMenuPromise(lang: string, cid: string): Promise<MenuItem> {\n    const resp: MenuItem = (await lastValueFrom(this.http.get<MenuItem>(`${this.cmsOptions.endpoint}/menu-items/${lang}/${cid}`)))\n    resp.menu_items = resp.menu_items.sort((a, b) => ((a.Order || Math.max()) > (b.Order || Math.max())) ? 1 : (((b.Order || Math.max()) > (a.Order || Math.max())) ? -1 : 0))\n    const t = await Promise.all(resp.menu_items.map((o: any) => this._getGuideMenuPromise(lang, o.ContentId)))\n    resp.menu_items = t.sort((a, b) => (a.Order || Math.max() > b.Order || Math.max()) ? 1 : ((b.Order || Math.max() > a.Order || Math.max()) ? -1 : 0))\n    return resp\n  }\n\n  public getGuideMenu(lang: string, cid: string): Observable<MenuItem> {\n    return this.cache.getData(from(this._getGuideMenuPromise(lang, cid)), `strapiMenu/${lang}/${cid}`, this.cmsOptions.chacheDuration || 3600)\n  }\n\n  // public getGuideMenu2(lang: string, cid: string): Observable<MenuItem> {\n  //   var __r = this.http.get<MenuItem>(`${this.cmsOptions.endpoint}/menu-items/${lang}/${cid}`)\n  //     .pipe(\n  //       switchMap(menuItem => {\n  //         if (menuItem.menu_items.length == 0)\n  //           return of(menuItem)\n  //         menuItem.menu_items = menuItem.menu_items\n  //           .sort((a, b) => ((a.Order || Math.max()) > (b.Order || Math.max())) ? 1 : (((b.Order || Math.max()) > (a.Order || Math.max())) ? -1 : 0))\n  //         return zip(menuItem.menu_items.map(menuSub => this.getGuideMenu(lang, menuSub.ContentId)))\n  //           .pipe(map(menuSubItems => {\n  //             menuItem.menu_items = menuSubItems\n  //             return menuItem\n  //           }))\n  //       }))\n  //   return this.cache.getData(__r, `strapiMenu/${lang}/${cid}`, this.cmsOptions.chacheDuration)\n  // }\n\n  public fetchPage(lang: string, cid: string): Observable<Page> {\n    const __r = this.http.get<Page>(`${this.cmsOptions.endpoint}/pages/${lang}/${cid}`)\n      .pipe(switchMap(page => {\n        const tabs$ = zip(page.page_tabs.map((o: Tab) => this.fetchTab(o.id)))\n        const topics$ = zip(page.topics.map((o: Topic) => this.fetchTopic(o.id)))\n        return zip(tabs$, topics$).pipe(map(([tabs, topics]) => {\n          page.page_tabs = tabs\n          page.topics = topics\n          return page\n        }))\n      }))\n    return this.cache.getData(__r, `strapiPage/${lang}/${cid}`, this.cmsOptions.chacheDuration || 3600)\n  }\n}","import { inject, Injectable, signal } from '@angular/core';\nimport { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';\nimport { TranslateService } from '@ngx-translate/core';\nimport { ReplaySubject } from 'rxjs';\nimport { CookiesService } from '../utils/cookies.service';\nimport { RLB_CFG_I18N } from '../../configuration';\n\n\n@Injectable({ providedIn: 'root' })\nexport class LanguageService {\n  private readonly translateService = inject(TranslateService);\n  private readonly cookiesService = inject(CookiesService);\n  private readonly i18nOptions = inject(RLB_CFG_I18N, { optional: true });\n\n  private readonly _language = signal<string>(this.translateService.currentLang || this.i18nOptions?.defaultLanguage || 'en');\n  private readonly _contentLanguage = signal<string | undefined>(undefined);\n\n  readonly language = this._language.asReadonly();\n  readonly contentLanguage = this._contentLanguage.asReadonly();\n\n  readonly languageChanged$ = this.translateService.onLangChange;\n  readonly contentLanguageChanged = this._contentLanguage.asReadonly();\n\n  // Emits once the initial UI translation file has been loaded (or failed to load).\n  // Consumed by the i18n APP_INITIALIZER to block bootstrap until translations are\n  // available, so synchronous instant() calls during app/component init resolve keys.\n  private readonly _ready$ = new ReplaySubject<boolean>(1);\n  readonly ready$ = this._ready$.asObservable();\n\n  constructor() {\n    // Sync private signal with translate service changes\n    this.translateService.onLangChange\n      .pipe(takeUntilDestroyed())\n      .subscribe(e => this._language.set(e.lang));\n\n    if (this.i18nOptions) {\n      this.translateService.addLangs(this.i18nOptions.availableLangs);\n      const languageUI = this.cookiesService.getCookie('ui-locale') || this.defaultLanguage || this.browserLanguage;\n      const languageContent = this.cookiesService.getCookie('content-locale') || this.defaultLanguage;\n      this.translateService.use(languageUI).subscribe({\n        next: () => this._ready$.next(true),\n        // Don't block bootstrap forever if the translation file fails to load.\n        error: () => this._ready$.next(true),\n      });\n      this.setContentLanguage(languageContent);\n    } else {\n      this._ready$.next(true);\n    }\n  }\n\n  get currentLanguage() {\n    return this.language();\n  }\n\n  setLanguage(value: string | undefined) {\n    if (!value) return;\n    this.cookiesService.setCookie('ui-locale', value);\n    this.translateService.use(value);\n  }\n\n  setContentLanguage(value: string | undefined) {\n    this.cookiesService.setCookie('content-locale', value || this.defaultLanguage);\n    this._contentLanguage.set(value);\n  }\n\n\n  public get languages(): readonly string[] {\n    return this.translateService.getLangs();\n  }\n\n  public set languages(value: string[]) {\n    this.translateService.addLangs(value);\n  }\n\n  public get defaultLanguage(): string {\n    return this.translateService.getFallbackLang() || 'en';\n  }\n\n  public get browserLanguage() {\n    return this.translateService.getBrowserLang() || 'en';\n  }\n\n  public translate(key: string | Array<string>, interpolateParams?: Object) {\n    return this.translateService.instant(key, interpolateParams);\n  }\n\n  public translateAsync(key: string | Array<string>, interpolateParams?: Object) {\n    return this.translateService.get(key, interpolateParams);\n  }\n\n  public getLanguageName(l: string): string {\n    const names: Record<string, string> = {\n      it: 'Italiano',\n      en: 'English',\n      es: 'Español',\n      fr: 'Francés',\n      ja: '日本語',\n      de: 'Deutsch',\n    };\n    return names[l] || '';\n  }\n}\n\n\n","import { inject, Pipe, PipeTransform } from '@angular/core';\nimport { RLB_CFG_CMS } from '../../configuration';\n\n@Pipe({\n  name: 'cms',\n})\nexport class CmsPipe implements PipeTransform {\n  private cmsOptions = inject(RLB_CFG_CMS, { optional: true });\n\n  transform(value: string, ...args: unknown[]): string {\n    let cms = this.cmsOptions?.endpoint;\n    if (!cms) {\n      return value;\n    }\n    if (cms.endsWith('/')) {\n      cms = cms.substring(0, cms.length - 1);\n    }\n    if (value.startsWith('/')) {\n      value = value.substring(1);\n    }\n    return `${cms}/${value}`;\n  }\n}\n","import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';\nimport { toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport {\n  AccordionBodyComponent,\n  AccordionComponent,\n  AccordionHeaderComponent,\n  AccordionItemComponent,\n  BreadcrumbComponent,\n  BreadcrumbItem,\n  TabComponent,\n  TabContentComponent,\n  TabPaneComponent,\n  TabsComponent,\n} from '@open-rlb/ng-bootstrap';\nimport { combineLatest, EMPTY, startWith, switchMap } from 'rxjs';\nimport { AbstractMdService } from '../../services/cms/md.service';\nimport { StrapiService } from '../../services/cms/strapi.service';\nimport { LanguageService } from '../../services/i18n/language.service';\nimport { RLB_CFG_CMS } from '../../configuration';\nimport { RouterModule } from '@angular/router';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { CmsPipe } from '../../pipes/cms/cms.pipe';\n\n@Component({\n  selector: 'rlb-cms-template',\n  templateUrl: './cms.component.html',\n  styleUrl: './cms.component.scss',\n  imports: [\n    BreadcrumbComponent,\n    TabsComponent,\n    TabComponent,\n    TabContentComponent,\n    TabPaneComponent,\n    AccordionComponent,\n    AccordionHeaderComponent,\n    RouterModule,\n    TranslateModule,\n    CmsPipe,\n    AccordionBodyComponent,\n    AccordionItemComponent,\n  ],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsComponent {\n  private readonly strapiService = inject(StrapiService);\n  private readonly languageService = inject(LanguageService);\n  private readonly cmsOptions = inject(RLB_CFG_CMS, { optional: true });\n  private readonly mdService = inject(AbstractMdService, { optional: true });\n\n  readonly contentId = input<string | undefined>();\n  readonly breadcrumbInput = input<BreadcrumbItem[] | undefined>(undefined, {\n    alias: 'breadcrumb',\n  });\n  readonly breadcrumb = computed(() => this.breadcrumbInput() ?? []);\n\n  readonly page = toSignal(\n    combineLatest([\n      this.languageService.languageChanged$.pipe(\n        startWith({ lang: this.languageService.language() } as any),\n      ),\n      toObservable(this.contentId),\n    ]).pipe(\n      switchMap(([_, id]) => {\n        const lang = this.cmsOptions?.useAppLanguage\n          ? this.languageService.language()\n          : this.languageService.contentLanguage();\n        if (id === undefined) return EMPTY;\n        return this.strapiService.fetchPage(lang || this.languageService.defaultLanguage, id);\n      }),\n    ),\n  );\n\n  public md(md: string): string {\n    if (this.cmsOptions?.markdown === 'ignore') {\n      return md;\n    } else {\n      if (!this.mdService) {\n        throw new Error('No MdService provided');\n      } else if (this.cmsOptions?.markdown === 'text') {\n        return this.mdService.md2text(md);\n      } else if (this.cmsOptions?.markdown === 'html') {\n        return this.mdService.md2html(md);\n      }\n    }\n    return md;\n  }\n}\n","<div>\n  @if (page(); as p) {\n    <div class=\"container\">\n      @if (breadcrumb()) {\n        <div class=\"row my-4\">\n          <div class=\"col-12\">\n            <rlb-breadcrumb [items]=\"breadcrumb()\"></rlb-breadcrumb>\n          </div>\n        </div>\n      }\n      <div class=\"row my-4\">\n        <div class=\"col-12\">\n          <h1 class=\"text-center\">{{p.Title}}</h1>\n        </div>\n      </div>\n      @if (p.Content) {\n        <div class=\"row my-4\">\n          <div class=\"col-12\">\n            <div [innerHTML]=\"p.Content \"></div>\n          </div>\n        </div>\n      }\n      @if (p.page_tabs.length>0) {\n        <div class=\"row my-4\">\n          <div class=\"col-12\">\n            <rlb-tabs>\n              @for (tab of p.page_tabs; track tab.id; let i = $index) {\n                <rlb-tab [target]=\"'cms-tab-'+i\">\n                  {{tab.Title}}\n                </rlb-tab>\n              }\n            </rlb-tabs>\n            <rlb-tab-content>\n              @for (tab of p.page_tabs; track tab.id; let i = $index) {\n                <rlb-tab-pane [id]=\"'cms-tab-'+i\">\n                  <div class=\"container-fluid\">\n                    @if (tab.Content) {\n                      <div class=\"row my-4\">\n                        <div class=\"col-12\">\n                          <div [innerHTML]=\"tab.Content \"></div>\n                        </div>\n                      </div>\n                    }\n                    @for (step of tab.steps; track step.ContentId; let i = $index) {\n                      <div class=\"row my-4 mx-auto card-steps\"\n                        style=\"max-width: 350px; border-bottom: 1px solid rgb(192, 198, 204);\">\n                        <div class=\"col-8\">\n                          <div class=\"pb-2\">\n                            <div style=\"height: 54px; min-width: 54px; width: 54px; border: 5px solid rgb(192, 198, 204);\"\n                              class=\"round-counter\">\n                              <span class=\"red\">{{i+1}}</span>\n                            </div>\n                          </div>\n                          <div>\n                            <div [innerHTML]=\"step.Content \"></div>\n                          </div>\n                        </div>\n                        <div class=\"col-4 pb-2\">\n                          <img [src]=\"step.Picture.url|cms\">\n                        </div>\n                      </div>\n                    }\n                    @if (tab.faqs.length>0) {\n                      <div class=\"row my-4\">\n                        <div class=\"col-12\">\n                          <h2 class=\"py-3\">{{tab.FaqTitle}}</h2>\n                        </div>\n                      </div>\n                    }\n                    @if (tab.faqs.length>0 && tab.FaqContent) {\n                      <div class=\"row my-4\">\n                        <div class=\"col-12\">\n                          <div [innerHTML]=\"tab.FaqContent \"></div>\n                        </div>\n                      </div>\n                    }\n                    @if (tab.faqs.length>0) {\n                      <div class=\"row   my-4\">\n                        <div class=\"col-12\">\n                          <rlb-accordion>\n                            @for (faq of tab.faqs; track faq) {\n                              <div rlb-accordion-item [expanded]=\"true\">\n                                <rlb-accordion-header>\n                                  {{faq.Title}}\n                                </rlb-accordion-header>\n                                <div rlb-accordion-body>\n                                  <div [innerHTML]=\"faq.Content\"> </div>\n                                </div>\n                              </div>\n                            }\n                          </rlb-accordion>\n                        </div>\n                      </div>\n                    }\n                    <div class=\"row   my-4\">\n                      <div class=\"col-12\">\n                        <span>\n                          <a routerLink=\"/support\">\n                            <i class=\"bi bi-info-circle-fill\" style=\"margin-bottom: -6px;margin-right: 6px;\"></i>\n                            <span>{{'pages.support.infoPage' | translate}}</span>\n                          </a>\n                        </span>\n                      </div>\n                    </div>\n                    @if (p.topics.length>0) {\n                      <div class=\"row my-4\" style=\"padding: 4px\">\n                        @for (topic of p.topics; track topic.ContentId) {\n                          <div class=\"col-lg-6 col-md-12 col-sm-12 col-xs-12\">\n                            <a [routerLink]=\"'/informations/'+topic.page.ContentId\" style=\"color: inherit;text-decoration: none;\">\n                              <div class=\"card mb-4\" style=\"min-height: 230px;\">\n                                <img [src]=\"topic.Picture.url | cms\" class=\"card-img-top\"\n                                  style=\"height: 91px; margin: 16px -16px;\">\n                                  <div class=\"card-body\">\n                                    <h5 class=\"card-title\">{{topic.Title}}</h5>\n                                    <div class=\"card-text\" [innerHTML]=\"topic.Content \"></div>\n                                  </div>\n                                </div>\n                              </a>\n                            </div>\n                          }\n                        </div>\n                      }\n                    </div>\n                  </rlb-tab-pane>\n                }\n            </rlb-tab-content>\n          </div>\n        </div>\n      }\n    </div>\n  }\n</div>\n\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { ActivatedRoute } from '@angular/router';\nimport { map } from 'rxjs';\n\nimport { CmsComponent } from '../../templates/cms/cms.component';\n\n@Component({\n    selector: 'rlb-cms-content',\n    templateUrl: './cms-content.component.html',\n    styleUrl: './cms-content.component.scss',\n    imports: [CmsComponent],\n    changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsContentComponent {\n  private readonly route = inject(ActivatedRoute);\n\n  readonly contentId = toSignal(\n    this.route.params.pipe(map(params => params['id'])),\n    { initialValue: this.route.snapshot.params['id'] }\n  );\n}\n\n","<rlb-cms-template [contentId]=\"contentId()\"></rlb-cms-template>","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\nimport { CmsComponent } from '../../templates/cms/cms.component';\n\n@Component({\n  selector: 'rlb-cookies',\n  templateUrl: './cookies.component.html',\n  styleUrl: './cookies.component.scss',\n  imports: [CmsComponent],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CookiesComponent {}\n\n","<rlb-cms-template contentId=\"adb_cookies\"></rlb-cms-template>","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\nimport { TranslateModule } from '@ngx-translate/core';\n\n@Component({\n  selector: 'rlb-not-found',\n  templateUrl: './not-found.component.html',\n  styleUrl: './not-found.component.scss',\n  imports: [TranslateModule],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NotFoundComponent {}\n\n","<div class=\"container\" style=\"height:calc(100vh - 58px);\">\n  <div class=\"align-center\">\n    <div class=\"text-center\">\n      <h1 class=\"text-primary\">\n        {{ 'pages.notFound.title' | translate }}\n      </h1>\n      <p>{{ 'pages.notFound.content' | translate }}</p><a href=\"/\" class=\"btn btn-outline-primary\">\n        <span>\n          {{ 'pages.notFound.button' | translate }}\n        </span></a>\n    </div>\n  </div>\n</div>\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\nimport { CmsComponent } from '../../templates/cms/cms.component';\n\n@Component({\n  selector: 'rlb-privacy',\n  templateUrl: './privacy.component.html',\n  styleUrl: './privacy.component.scss',\n  imports: [CmsComponent],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PrivacyComponent {}\n\n","<rlb-cms-template contentId=\"adb_privacy\"></rlb-cms-template>","import { Injectable } from '@angular/core';\n\n@Injectable()\nexport abstract class AbstractSupportService {\n  public abstract sendSupport(data: any): void\n}\n","import { ChangeDetectionStrategy, Component, inject, OnInit } from '@angular/core';\nimport { FormControl, FormGroup, Validators } from '@angular/forms';\nimport { AbstractSupportService } from '../../services/abstraction/abstract-support.service';\nimport { Location } from '@angular/common';\n\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { ListComponent, ListItemComponent, InputComponent, SwitchComponent } from '@open-rlb/ng-bootstrap';\n\n@Component({\n    selector: 'rlb-support',\n    templateUrl: './support.component.html',\n    styleUrl: './support.component.scss',\n    imports: [ReactiveFormsModule, TranslateModule, ListComponent, ListItemComponent, InputComponent, SwitchComponent],\n    changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SupportComponent implements OnInit {\n  private readonly supportService = inject(AbstractSupportService);\n  private readonly _location = inject(Location);\n\n  public readonly supportForm = new FormGroup({\n    name: new FormControl('', [Validators.required]),\n    email: new FormControl('', [Validators.required, Validators.email]),\n    subject: new FormControl('', [Validators.required]),\n    message: new FormControl('', [Validators.required]),\n    legal: new FormControl('', [Validators.required]),\n  });\n\n  public hasError(form: string, controlName: string, errorName: string) {\n    if (form === 'supportForm') {\n      return this.supportForm.get(controlName)?.hasError(errorName);\n    }\n    return false;\n  }\n\n  public sendSupport(data: any) {\n    if (this.supportForm.valid) {\n      this.supportService.sendSupport(data);\n    }\n  }\n\n  backClicked() {\n    this._location.back();\n  }\n\n  ngOnInit() { }\n}\n\n","<div class=\"container mt-2 mb-5\">\n  <div class=\"container text-center position-relative my-3\">\n    <h3>{{ 'pages.support.title' | translate}}</h3>\n    <i role=\"button\" class=\"bi bi-chevron-left position-absolute start-0 top-50 translate-middle-y\"\n      style=\"font-size: 25px;font-weight: 600;\" (click)=\"backClicked()\"></i>\n  </div>\n  <form [formGroup]=\"supportForm\" class=\"needs-validation\" (ngSubmit)=\"sendSupport(supportForm.value)\">\n    <rlb-list class=\"settings\">\n      <rlb-list-item class=\"settings-item\">\n        <div class=\"d-flex justify-content-between\">\n          <div class=\"settings-text\">\n            <h6 class=\"mt-1\">{{ 'pages.support.name' | translate}}</h6>\n          </div>\n          <div class=\"settings-control\">\n            <rlb-input type=\"text\" size=\"small\" formControlName=\"name\" />\n          </div>\n        </div>\n      </rlb-list-item>\n      <rlb-list-item class=\"settings-item\">\n        <div class=\"d-flex justify-content-between\">\n          <div class=\"settings-text\">\n            <h6 class=\"mt-1\">{{ 'pages.support.email' | translate}}</h6>\n          </div>\n          <div class=\"settings-control\">\n            <rlb-input type=\"text\"  size=\"small\" formControlName=\"email\" />\n          </div>\n        </div>\n      </rlb-list-item>\n      <rlb-list-item class=\"settings-item\">\n        <div class=\"d-flex justify-content-between\">\n          <div class=\"settings-text\">\n            <h6 class=\"mt-1\">{{ 'pages.support.subject' | translate}}</h6>\n          </div>\n          <div class=\"settings-control\">\n            <rlb-input type=\"text\"  size=\"small\" formControlName=\"subject\" />\n          </div>\n        </div>\n      </rlb-list-item>\n      <rlb-list-item class=\"settings-item\">\n        <div class=\"d-flex justify-content-between\">\n          <div class=\"settings-text\">\n            <h6 class=\"mt-1\">{{ 'pages.support.message' | translate}}</h6>\n          </div>\n          <div class=\"settings-control\">\n            <rlb-input type=\"text\"  size=\"small\" formControlName=\"message\" />\n          </div>\n        </div>\n      </rlb-list-item>\n      <rlb-list-item class=\"settings-item\">\n        <div class=\"d-flex justify-content-between\">\n          <div class=\"settings-text\">\n            <h6 class=\"mt-1\">{{ 'pages.support.legal' | translate}}</h6>\n            <span>{{ 'pages.support.infoPage' | translate}}</span>\n          </div>\n          <div class=\"settings-control\">\n            <rlb-switch size=\"small\" formControlName=\"legal\" />\n          </div>\n        </div>\n      </rlb-list-item>\n    </rlb-list>\n  </form>\n</div>\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\nimport { CmsComponent } from '../../templates/cms/cms.component';\n\n@Component({\n  selector: 'rlb-terms-and-conditions',\n  templateUrl: './terms-and-conditions.component.html',\n  styleUrl: './terms-and-conditions.component.scss',\n  imports: [CmsComponent],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TermsAndConditionsComponent {}\n\n","<rlb-cms-template contentId=\"adb_terms\"></rlb-cms-template>","import { createActionGroup, props } from '@ngrx/store';\nimport { AppInfo, AppViewMode } from '../../services/apps/app';\nimport { AppTheme } from './app-context.model';\n\nexport const AppContextActionsInternal = createActionGroup({\n  source: 'AppContext/Internal',\n  events: {\n    setLanguage: props<{ language: string; }>(),\n    setCurrentApp: props<{ app: AppInfo | null, mode?: AppViewMode; url?: string; }>(),\n    setSupportedLanguages: props<{ supportedLanguages: string[]; }>(),\n    setTheme: props<{ theme: AppTheme; }>(),\n    addApp: props<{ app: AppInfo; }>(),\n    setViewMode: props<{ viewMode?: AppViewMode; }>(),\n  }\n});\n\n\nexport const AppContextActions = createActionGroup({\n  source: 'AppContext/API',\n  events: {\n    setLanguage: props<{ language: string; }>(),\n    setSupportedLanguages: props<{ supportedLanguages: string[]; }>(),\n    setCurrentApp: props<{ app: AppInfo | null, mode?: AppViewMode; url?: string; }>(),\n    removeApp: props<{ appType: string; }>(),\n    setTheme: props<{ theme: AppTheme; }>(),\n    finalizeApp: props<{ appType: string; appId: string; data?: any; }>(),\n  }\n});\n","import { PagesConfiguration } from '../configuration';\nimport { CanActivateFn } from '@angular/router';\n\nexport interface DefaultRouteConfig {\n  path: string;\n  configKey?: keyof PagesConfiguration;\n  canActivate?: Array<CanActivateFn>;\n}\n\nexport const DEFAULT_ROUTES_CONFIG: DefaultRouteConfig[] = [\n  { path: 'settings' },\n  { path: 'settings/general' },\n  { path: 'apps' },\n  { path: 'profile' },\n  { path: 'content', configKey: 'content' },\n  { path: 'cookies', configKey: 'cookies' },\n  { path: 'notFound', configKey: 'notFound' },\n  // No configKey on purpose: this is where `permissionGuard` sends a denial, so it cannot be left\n  // to optional consumer config. Without it a denial fell through to the consumer's `**` route.\n  { path: 'forbidden' },\n  { path: 'privacy', configKey: 'privacy' },\n  { path: 'support', configKey: 'support' },\n  { path: 'terms', configKey: 'terms' },\n];\n","import { computed, inject, Injectable, Injector, isDevMode } from '@angular/core';\nimport { ActivatedRoute, NavigationEnd, Router } from '@angular/router';\nimport { Store } from '@ngrx/store';\nimport { filter, map, Observable, switchMap, take } from 'rxjs';\nimport { RLB_CFG_ACL, RLB_CFG_AUTH } from '../../configuration';\nimport { AppContextActions } from '../../store/app-context/app-context.actions';\nimport { AuthActions } from '../../store/auth/auth.actions';\nimport { authsFeatureKey } from '../../store/auth/auth.model';\nimport { BaseState } from '../../store/base-state';\nimport { AclStore } from '../../store/acl/acl.store';\nimport { AclAction } from '../../store/acl/acl.model';\nimport { appContextFeatureKey } from '../../store/app-context/app-context.model';\nimport { AppInfo, AppViewMode } from './app';\nimport { AppLoggerService, LoggerContext } from './app-logger.service';\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';\nimport { DEFAULT_ROUTES_CONFIG } from '../../pages/default-routes.config';\nimport {\n  describeProviderResolutionFailure,\n  resolveProvider,\n} from '../../auth/services/provider-resolution';\n\ninterface AppConfig {\n  route: ActivatedRoute;\n  appsConfig: AppInfo<any>[];\n  apps: AppInfo<any>[];\n  fullPath: string;\n}\n\n@Injectable({\n  providedIn: 'root',\n})\nexport class AppsService {\n  private readonly store = inject(Store<BaseState>);\n  private readonly activatedRoute = inject(ActivatedRoute);\n  private readonly router = inject(Router);\n  private readonly loggerService = inject(AppLoggerService);\n  private readonly confAuth = inject(RLB_CFG_AUTH, { optional: true });\n  private readonly confAcl = inject(RLB_CFG_ACL, { optional: true });\n  private readonly aclStore = inject(AclStore);\n  private readonly injector = inject(Injector);\n\n  private logger: LoggerContext;\n\n  /** A method rather than a field, so specs can override it to exercise the production branch. */\n  protected isDevelopmentMode(): boolean {\n    return isDevMode();\n  }\n\n  constructor() {\n    this.logger = this.loggerService.for(this.constructor.name);\n    this.logger.log('AppsService initialized');\n\n    this.initAuthProviders();\n    this.initRouterListener();\n  }\n\n  readonly currentDomain = window.location.hostname;\n\n  readonly apps = computed(() => {\n    const apps = this.store.selectSignal(state => state[appContextFeatureKey].apps)();\n    const resources = this.aclStore.resources();\n    const confAcl = this.confAcl;\n\n    return apps.filter((app: AppInfo) => {\n      const isDomainAllowed = !app.domains || app.domains.includes(this.currentDomain);\n      if (!isDomainAllowed) return false;\n\n      if (!confAcl) return true;\n      if (!resources && app.actions?.length) return false;\n      if (resources && !app.actions?.length) return true;\n\n      return resources?.some(userResource => {\n        const appBusId = app.data?.[confAcl.businessIdKey];\n        const matchBusId = userResource.companyId === appBusId;\n\n        if (!matchBusId) return false;\n\n        return userResource.resources.some(res => {\n          const appResId = app.data?.[confAcl.resourceIdKey];\n          const matchResId = res.resourceId === appResId;\n\n          if (!matchResId) return false;\n\n          return res.actions.some(action => app.actions?.includes(action));\n        });\n      });\n    });\n  });\n\n  readonly currentApp = this.store.selectSignal(\n    (state: BaseState) => state[appContextFeatureKey].currentApp,\n  );\n\n  readonly currentAppId = computed(() => this.currentApp()?.id);\n\n  readonly currentAppAclInfo = computed(() => {\n    const app = this.currentApp();\n    if (!app || !app.data || !this.confAcl) return null;\n\n    return {\n      busId: app.data[this.confAcl.businessIdKey],\n      resId: app.data[this.confAcl.resourceIdKey],\n    };\n  });\n\n  isAppSelected(appId: string) {\n    return this.getStoredAppId() === appId;\n  }\n\n  /**\n   * Whether the user holds `action` in the app that is currently selected.\n   *\n   * `action` may be a list — any one of them grants. Note the asymmetry with\n   * {@link AclStore.hasPermission}, which is deliberate and load-bearing: with no current app this\n   * denies, while the store's no-action case means \"any grant on the resource\".\n   */\n  checkPermissionInCurrentApp(action?: AclAction): boolean {\n    const info = this.currentAppAclInfo();\n    if (!info) return false;\n    return this.aclStore.hasPermission(info.busId, info.resId, action);\n  }\n\n  /**\n   * Whether the user holds `action` on any resource at all.\n   *\n   * For surfaces that no app owns — the `pages.*` chrome entries — where a resource-scoped check\n   * has nothing to scope to. With no ACL configured nothing is gated, matching {@link apps}.\n   */\n  checkPermissionAnywhere(action?: AclAction): boolean {\n    if (!this.confAcl) return true;\n    return this.aclStore.hasPermissionAnywhere(action);\n  }\n\n  /**\n   * Finds the app that owns a given route path string (e.g. 'some-page/sub-page').\n   * Used by permissionGuard on initial deep-link navigation, before NavigationEnd has\n   * fired and currentApp has been selected by the router listener.\n   */\n  findAppForPath(path: string): AppInfo | undefined {\n    return this.apps().find((app: AppInfo) =>\n      app.routes?.some((r: string) => r === path || path.startsWith(r + '/') || r.startsWith(path + '/')) ||\n      app.core?.url === '/' + path ||\n      (app.core?.url && path.startsWith(app.core.url.replace(/^\\//, '')))\n    );\n  }\n\n  checkPermissionForApp(app: AppInfo, action?: AclAction): boolean {\n    if (!app?.data || !this.confAcl) return false;\n    const busId = app.data[this.confAcl.businessIdKey];\n    const resId = app.data[this.confAcl.resourceIdKey];\n    return this.aclStore.hasPermission(busId, resId, action);\n  }\n\n  selectApp(app?: AppInfo, viewMode?: 'app' | 'settings', url?: string) {\n    const currentApp = this.currentApp();\n    if (!app) {\n      this.logger.warn('Deselecting app (null).');\n      this.store.dispatch(AppContextActions.setCurrentApp({ app: null }));\n      return;\n    }\n    if (currentApp && currentApp.id === app.id && currentApp.viewMode === viewMode) {\n      this.logger.info('App already selected with same id and viewMode. Skipping dispatch.');\n      return;\n    }\n    this.logger.warn('Dispatching setCurrentApp with:', { app, mode: viewMode, url });\n    this.store.dispatch(AppContextActions.setCurrentApp({ app, mode: viewMode, url }));\n  }\n\n  /**\n   * Settles which auth provider this domain uses, once, at startup.\n   *\n   * A domain no provider claims — or one that two claim — used to be a console warning, after which\n   * the app carried on permanently and silently unauthenticated: every guard bounced, and `login()`\n   * authorized against whichever configuration happened to be registered first. That is a\n   * deployment error, not a warning, so it now throws in dev and logs at error level in prod.\n   *\n   * Configuring no providers at all stays a warning: an app without auth is legitimate.\n   */\n  private initAuthProviders() {\n    const confAuth = this.confAuth;\n    const currentProviderInStore = this.store.selectSignal(\n      state => state[authsFeatureKey].currentProvider,\n    )();\n\n    if (currentProviderInStore) {\n      this.logger.info(\n        `Auth provider already set to '${currentProviderInStore}' by Initializer. AppsService initAuthProviders skipping init.`,\n      );\n      return;\n    }\n\n    const resolution = resolveProvider(\n      confAuth?.providers,\n      currentProviderInStore,\n      this.currentDomain,\n    );\n\n    if (resolution.provider) {\n      this.logger.info(`Auth provider resolved by ${resolution.reason}:`, resolution.provider);\n      this.store.dispatch(\n        AuthActions.setCurrentProvider({ currentProvider: resolution.provider.configId }),\n      );\n      return;\n    }\n\n    if (resolution.reason === 'no-providers') {\n      this.logger.warn('No auth providers configured.');\n      return;\n    }\n\n    const message = describeProviderResolutionFailure(\n      resolution,\n      this.currentDomain,\n      confAuth?.providers,\n    );\n    this.logger.error(message);\n    if (this.isDevelopmentMode()) throw new Error(message);\n  }\n\n  private initRouterListener() {\n    this.router.events\n      .pipe(\n        filter(event => event instanceof NavigationEnd),\n        switchMap(() => this.resolveRouteAndApps()),\n        takeUntilDestroyed(),\n      )\n      .subscribe(data => this.handleResolvedApps(data));\n  }\n\n  // Core logic\n\n  private resolveRouteAndApps(): Observable<AppConfig | null> {\n    const route = this.findDeepestChild(this.activatedRoute);\n    const configPath = this.getConfigPath(route);\n    const actualPath = this.getActualPath(route);\n\n    this.logger.info(`Resolving. ConfigPath: '${configPath}', ActualPath: '${actualPath}'`);\n\n    const appRoutes: AppInfo[] =\n      this.apps()?.map((app: AppInfo) => ({\n        type: app.type,\n        routes: app.routes || [],\n        viewMode: app.viewMode,\n        enabled: app.enabled,\n        core: app.core,\n      })) || [];\n\n    let appRoutesMatched: AppInfo[] = [];\n\n    if (configPath && !this.isDefaultRoute(configPath)) {\n      appRoutesMatched = appRoutes.filter((app: AppInfo) =>\n        app.routes?.some(r => r.includes(configPath)),\n      );\n    }\n\n    this.logger.info('Matched appRoute:', appRoutesMatched);\n\n    return toObservable(\n      this.store.selectSignal(state => state[appContextFeatureKey].apps),\n      // fix init load error\n      { injector: this.injector },\n    ).pipe(\n      filter((apps: AppInfo[]) => {\n        if (!apps || apps.length === 0) return true;\n        const allFinalized = !apps.some((app: AppInfo) => !app.id);\n        if (!allFinalized) {\n          this.logger.info('Waiting for apps initialization (finalizeApp)...');\n        }\n        return allFinalized;\n      }),\n      take(1),\n      map(apps => {\n        if (appRoutesMatched.length > 0 || actualPath === '') {\n          return {\n            route,\n            appsConfig: appRoutesMatched,\n            apps,\n            fullPath: actualPath,\n          } as AppConfig;\n        }\n        return null;\n      }),\n    );\n  }\n\n  private handleResolvedApps(data: AppConfig | null) {\n    const route = this.findDeepestChild(this.activatedRoute);\n    const storedId = this.getStoredAppId();\n\n    // Check if route is root\n    const currentPath = data ? data.fullPath : this.getActualPath(route);\n    const isRoot = currentPath === '';\n\n    //  Basic check\n    if (data?.apps?.some(app => !app.id)) {\n      this.logger.error('Some apps are not finalized...');\n      return;\n    }\n    if (!data || !data.apps || data.apps.length === 0) {\n      this.logger.warn(`No apps found. Path: '${currentPath}'`);\n      this.selectApp(undefined);\n      return;\n    }\n\n    // Filter by domain\n    const domainApps = data.apps.filter(\n      app => !app.domains || app.domains?.some(domain => domain.includes(this.currentDomain)),\n    );\n\n    if (domainApps.length === 0) {\n      this.logger.warn(`No apps allowed for domain: ${this.currentDomain}`);\n      this.selectApp(undefined);\n      return;\n    }\n\n    // CASE 1: SINGLE APP REDIRECT\n    // We are in root route and there is only one app available\n\n    if (isRoot && domainApps.length === 1) {\n      const singleApp = domainApps[0];\n      const targetUrl = singleApp.core?.url;\n\n      if (targetUrl && targetUrl !== '/' && targetUrl !== '') {\n        this.logger.info(\n          `[AutoRedirect] Single app detected at root. Redirecting to: ${targetUrl}`,\n        );\n        this.router.navigate([targetUrl], {\n          queryParams: route.snapshot.queryParams,\n          replaceUrl: true,\n        });\n        return;\n      }\n    }\n\n    // CASE 2: MULTI APP HUB / CORE HOME PAGE\n    // We are in root route, and there are more than one app available\n    // ====================================================================\n    if (isRoot && domainApps.length > 1) {\n      this.logger.info(\n        `Root detected with multiple apps (${domainApps.length}). Showing App Hub / Core home page.`,\n      );\n      const redirectApps = domainApps.filter(app => app.autoRedirectOnRootEnabled);\n\n      if (redirectApps?.length > 1) {\n        this.logger.warn(\n          'Multiple apps have autoRedirectOnRootEnabled: true. Picking the first one.',\n          redirectApps,\n        );\n      }\n\n      if (redirectApps.length) {\n        const targetUrl = redirectApps[0].core?.url;\n        this.logger.info(\n          `[AutoRedirect] Detected app with root redirect. Redirecting to: ${targetUrl}`,\n        );\n        this.router.navigate([targetUrl], {\n          queryParams: route.snapshot.queryParams,\n          replaceUrl: true,\n        });\n        return;\n      }\n\n      this.selectApp(undefined); // Explicit reset chosen app\n      return;\n    }\n\n    // CASE 3: Standard logic to get app (Deep linking) ---\n    // Here we go only if route not empty  !=\"\" and not root !=\"/\"\n    const configPath = this.getConfigPath(route);\n    const matchedApps = domainApps.filter((app: AppInfo) => {\n      if (!configPath || configPath === '') {\n        return false;\n      }\n\n      const hasRouteMatch = app.routes?.some(r => r.includes(configPath) || configPath.includes(r));\n\n      const hasCoreMatch =\n        app.core?.url === '/' + configPath || app.core?.url?.includes(configPath);\n\n      return hasRouteMatch || hasCoreMatch;\n    });\n\n    let appToSelect: AppInfo | undefined;\n\n    if (matchedApps.length === 1) {\n      appToSelect = matchedApps[0];\n      this.logger.info('Single app matched route:', appToSelect);\n    } else if (matchedApps.length > 1) {\n      // Fallback in case of conflict routes\n      appToSelect = matchedApps.find(a => a.id === storedId) || matchedApps[0];\n      this.logger.info('Multiple apps matched route, selected:', appToSelect);\n    } else {\n      // Fallback: Route path doesn't exist\n      appToSelect = undefined;\n      this.logger.warn('No app matched this specific route:', currentPath);\n    }\n\n    const qp = new URLSearchParams(route.snapshot.queryParams).toString();\n    const url = currentPath + (qp ? `?${qp}` : '');\n    const viewMode = appToSelect\n      ? appToSelect.viewMode\n      : this.getAppViewMode(route)\n        ? 'settings'\n        : 'app';\n\n    this.selectApp(appToSelect, viewMode, url);\n  }\n\n  private findDeepestChild(route: ActivatedRoute): ActivatedRoute {\n    while (route.firstChild) route = route.firstChild;\n    this.logger.info('Activated deepest child route:', route);\n    return route;\n  }\n\n  private getStoredAppId(): string | null {\n    try {\n      return localStorage.getItem('c-app-id');\n    } catch (e) {\n      this.logger.warn('LocalStorage not available:', e);\n      return null;\n    }\n  }\n\n  private getAppViewMode(route: ActivatedRoute): AppViewMode {\n    return route.routeConfig?.path?.includes('settings') ? 'settings' : 'app';\n  }\n\n  private isDefaultRoute(route: string): boolean {\n    return DEFAULT_ROUTES_CONFIG.some(r => r.path.includes(route));\n  }\n\n  private getConfigPath(route: ActivatedRoute): string {\n    const segments: string[] = [];\n    let current: ActivatedRoute | null = route.root;\n\n    while (current) {\n      const path = current.routeConfig?.path;\n      if (path && path !== '') segments.push(path);\n      current = current.firstChild ?? null;\n    }\n\n    return segments.join('/');\n  }\n\n  private getActualPath(route: ActivatedRoute): string {\n    const segments: string[] = [];\n    let current: ActivatedRoute | null = route.root;\n\n    while (current) {\n      // map(s => s.path) extract params\n      const path = current.snapshot.url.map(s => s.path).join('/');\n      if (path && path !== '') segments.push(path);\n      current = current.firstChild ?? null;\n    }\n    return segments.join('/');\n  }\n}\n","import { CommonModule, Location } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, inject } from '@angular/core';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { ListComponent, ListItemImageComponent } from '@open-rlb/ng-bootstrap';\nimport { AppInfo } from '../../../services/apps/app';\nimport { AppsService } from '../../../services/apps/apps.service';\nimport { AuthenticationService } from '../../../auth/services/auth.service';\n\n@Component({\n  selector: 'rlb-app-selector',\n  imports: [CommonModule, TranslateModule, ListComponent, ListItemImageComponent],\n  templateUrl: './app-selector.component.html',\n  styleUrl: './app-selector.component.scss',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AppSelectorComponent {\n  private readonly _location = inject(Location);\n  private readonly appsService = inject(AppsService);\n  private readonly authService = inject(AuthenticationService);  readonly apps = this.appsService.apps;\n  readonly auth$ = this.authService.isAuthenticated$;\n\n  backClicked() {\n    this._location.back();\n  }\n\n  selectApp(app: AppInfo) {\n    this.appsService.selectApp(app, 'app');\n  }\n}\n\n","<div class=\"container mt-2\">\n  <div class=\"container text-center position-relative my-3\">\n    <h3>{{ 'core.apps.title' | translate}}</h3>\n    <i role=\"button\" class=\"bi bi-chevron-left position-absolute start-0 top-50 translate-middle-y cur\"\n    style=\"font-size: 25px;font-weight: 600;\" (click)=\"backClicked()\"></i>\n  </div>\n  <rlb-list>\n    @for (app of apps(); track app.id) {\n      <ng-container ngProjectAs=\"rlb-list-item-image\">\n        @if (app.core) {\n          <ng-container ngProjectAs=\"rlb-list-item-image\">\n            <rlb-list-item-image [icon]=\"app.core.icon\" [avatar-size]=\"35\"\n              [line-1]=\"app.data.friendlyName ? app.data.friendlyName : app.core.title | translate\"\n              [disabled]=\"!app.enabled && (app.core.auth && !(auth$ | async))\" [line-2]=\"app.core.description | translate\"\n              (click)=\"selectApp(app)\">\n            </rlb-list-item-image>\n          </ng-container>\n        }\n      </ng-container>\n    }\n  </rlb-list>\n</div>\n\n","import { HttpErrorResponse } from '@angular/common/http';\nimport { HttpErrorMessagesConfiguration } from '../../configuration';\n\n/** i18n namespace searched when {@link HttpErrorMessagesConfiguration.keyPrefix} is unset. */\nexport const DEFAULT_HTTP_ERROR_KEY_PREFIX = 'errors.http';\n\n/** See {@link HttpErrorMessagesConfiguration.dedupeMs}. */\nexport const DEFAULT_HTTP_ERROR_DEDUPE_MS = 1000;\n\nconst MS_PER_SECOND = 1000;\nconst SECONDS_PER_MINUTE = 60;\n\n/** What the error modal/toast actually renders. */\nexport interface HttpErrorDescription {\n  title: string;\n  message: string;\n}\n\n/** `LanguageService.translate`, narrowed to what the description needs. */\nexport type TranslateFn = (key: string, params?: object) => unknown;\n\n/**\n * `instanceof` plus the duck-type check the handler has always used.\n *\n * Both are needed. A response thrown by an `HttpClient` from a *different* copy of\n * `@angular/common/http` — a lazily loaded remote, a library bundled with its own — fails\n * `instanceof` while still being an `HttpErrorResponse` in every way that matters here.\n */\nexport function isHttpErrorResponse(error: unknown): error is HttpErrorResponse {\n  return (\n    error instanceof HttpErrorResponse ||\n    (!!error && (error as HttpErrorResponse).name === 'HttpErrorResponse')\n  );\n}\n\n/**\n * Seconds the server asked the caller to wait, or `undefined` when it did not say.\n *\n * RFC 9110 allows either delta-seconds or an HTTP-date, and both are seen in the wild.\n */\nexport function retryAfterSeconds(error: HttpErrorResponse): number | undefined {\n  const raw = error.headers?.get('Retry-After')?.trim();\n  if (!raw) {\n    return undefined;\n  }\n  if (/^\\d+$/.test(raw)) {\n    return Number(raw);\n  }\n  const at = Date.parse(raw);\n  if (Number.isNaN(at)) {\n    return undefined;\n  }\n  // A date already in the past means \"retry now\", not a negative wait.\n  return Math.max(0, Math.round((at - Date.now()) / MS_PER_SECOND));\n}\n\n/**\n * Turns an `HttpErrorResponse` into the title and message to show the user.\n *\n * Falls back to the backend's own text when nothing is translated, so adding this to an app that\n * ships no `errors.http.*` keys changes nothing.\n */\nexport function describeHttpError(\n  error: HttpErrorResponse,\n  translate: TranslateFn,\n  config?: HttpErrorMessagesConfiguration,\n): HttpErrorDescription {\n  const prefix = config?.keyPrefix || DEFAULT_HTTP_ERROR_KEY_PREFIX;\n  const seconds = retryAfterSeconds(error);\n  const minutes =\n    seconds === undefined\n      ? config?.defaultRetryMinutes\n      : // Round up: \"wait 0 minutes\" is not an instruction anyone can follow.\n        Math.max(1, Math.ceil(seconds / SECONDS_PER_MINUTE));\n  const params = { status: error.status, seconds, minutes };\n  const knownWait = minutes !== undefined;\n\n  return (\n    describeFromGroup(`${prefix}.${error.status}`, translate, params, knownWait) ??\n    describeFromGroup(`${prefix}.default`, translate, params, knownWait) ??\n    backendText(error)\n  );\n}\n\n/**\n * A group wins or falls through as a whole — a status group that resolves a title but no message\n * would otherwise put its heading on the default group's body.\n */\nfunction describeFromGroup(\n  group: string,\n  translate: TranslateFn,\n  params: object,\n  knownWait: boolean,\n): HttpErrorDescription | undefined {\n  const message =\n    (knownWait ? resolve(`${group}.messageRetry`, translate, params) : undefined) ??\n    resolve(`${group}.message`, translate, params);\n  if (message === undefined) {\n    return undefined;\n  }\n  return { title: resolve(`${group}.title`, translate, params) ?? '', message };\n}\n\nfunction resolve(key: string, translate: TranslateFn, params: object): string | undefined {\n  const value = translate(key, params);\n  // ngx-translate's instant() echoes the key back when it cannot resolve it, and hands back the\n  // raw node (an object) when the key names a group rather than a leaf. Both are misses.\n  return typeof value === 'string' && value.length > 0 && value !== key ? value : undefined;\n}\n\n/** What `manageUI` rendered before there were per-status messages. */\nfunction backendText(error: HttpErrorResponse): HttpErrorDescription {\n  const body = error.error as { status?: number; message?: string } | null | undefined;\n  return {\n    title: error.name || 'HttpErrorResponse',\n    message: body?.message ? `${body.status ?? error.status}: ${body.message}` : error.message,\n  };\n}\n","import { Inject, Injectable, Optional } from '@angular/core';\nimport { ModalService, ModalType, ToastService } from '@open-rlb/ng-bootstrap';\nimport { ErrorOutput, } from './errors';\nimport { EMPTY, Observable, OperatorFunction, catchError, of } from 'rxjs';\nimport { LanguageService } from '../i18n/language.service';\nimport { ProjectConfiguration, RLB_CFG } from '../../configuration';\nimport {\n  DEFAULT_HTTP_ERROR_DEDUPE_MS,\n  HttpErrorDescription,\n  describeHttpError,\n  isHttpErrorResponse,\n} from './http-error-description';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class ErrorManagementService {\n\n  /** Last time each rendered (output, title, message) was shown. See `isDuplicate`. */\n  private readonly shownAt = new Map<string, number>();\n\n  constructor(\n    private dialogService: ModalService,\n    private toastService: ToastService,\n    private languageService: LanguageService,\n    @Inject(RLB_CFG) @Optional() private options: ProjectConfiguration\n  ) { }\n\n  public showError(type: ModalType = 'error', out: ErrorOutput = 'dialog', error?: any) {\n    if (out === 'dialog') {\n      return this.showDialog(type, error);\n    }\n    if (out === 'toast') {\n      return this.showToast(type, error);\n    }\n    if (out === 'console') {\n      if (!this.options?.production) {\n        console.info(\"%c Error service: ShowToast\", 'background: #ffcdc9; color: #000', error)\n      }\n      return of({ reason: 'console' })\n    }\n    return EMPTY;\n  }\n\n  public showDialog(type: ModalType, error?: any) {\n    if (!this.options?.production) {\n      console.info(\"%c Error service: ShowDialog\", 'background: #ffcdc9; color: #000', error)\n    }\n    const described = this.describe(error);\n    if (this.isDuplicate('dialog', described)) {\n      return EMPTY;\n    }\n    return this.dialogService.openModal<string, void>(\n      this.options?.environment?.errorDialogName || 'error-modal-component',\n      {\n        content: described.message,\n        title: described.title,\n        ok: this.languageService.translate('common.ok'),\n        type,\n      },\n      {\n        animation: true,\n        backdrop: true,\n        keyboard: true,\n        size: this.options?.environment?.errorDialogSize || 'md',\n        scrollable: true,\n        focus: true,\n        fullscreen: false,\n        verticalcentered: true,\n      }\n    );\n  }\n\n  public showToast(type: ModalType, error?: any) {\n    if (!this.options?.production) {\n      console.info(\"%c Error service: ShowToast\", 'background: #ffcdc9; color: #000', error)\n    }\n    const described = this.describe(error);\n    if (this.isDuplicate('toast', described)) {\n      return EMPTY;\n    }\n    return this.toastService.openToast(\n      this.options?.environment?.errorToastContainer || 'error-toast-container',\n      this.options?.environment?.errorToastName || 'error-toast',\n      {\n        content: described.message,\n        title: described.title,\n        ok: this.languageService.translate('common.ok'),\n        type: 'error'\n      },\n      {\n        animation: true,\n        autohide: true,\n        delay: 5000,\n      }\n    );\n  }\n\n  public manageUI<T>(type: ModalType = 'error', out: ErrorOutput = 'dialog'): OperatorFunction<T, T> {\n    return (source: Observable<T>) => {\n      return source.pipe(\n        catchError((error, k) => {\n          this.showError(type, out, error);\n          return EMPTY;\n        }),\n      );\n    };\n  }\n\n  /**\n   * The one place a failure becomes words.\n   *\n   * An `HttpErrorResponse` gets the per-status message; anything else is already a message someone\n   * wrote — an interceptor that rewrote a status it alone can recognise (a captcha 403 on two\n   * specific routes, say), or a plain `throw` — and is passed through untouched.\n   */\n  private describe(error?: any): HttpErrorDescription {\n    if (isHttpErrorResponse(error)) {\n      return describeHttpError(\n        error,\n        (key, params) => this.languageService.translate(key, params),\n        this.options?.environment?.httpErrors,\n      );\n    }\n    return { title: error?.name || '', message: error?.message || '' };\n  }\n\n  /**\n   * True when the same message was already put on screen a moment ago.\n   *\n   * One rate limit or one dropped connection fails every request in flight at once, and each of\n   * them arrives here. Identical text, same output, inside the window is that — not a second thing\n   * for the user to read.\n   */\n  private isDuplicate(out: ErrorOutput, described: HttpErrorDescription): boolean {\n    const window = this.options?.environment?.httpErrors?.dedupeMs ?? DEFAULT_HTTP_ERROR_DEDUPE_MS;\n    if (window <= 0) {\n      return false;\n    }\n    const key = `${out}|${described.title}|${described.message}`;\n    const now = Date.now();\n    const last = this.shownAt.get(key);\n    if (last !== undefined && now - last < window) {\n      return true;\n    }\n    this.shownAt.set(key, now);\n    for (const [seen, at] of this.shownAt) {\n      if (now - at >= window) {\n        this.shownAt.delete(seen);\n      }\n    }\n    return false;\n  }\n}\n","import { HttpClient } from \"@angular/common/http\";\nimport { Injectable } from \"@angular/core\";\nimport { OidcSecurityService } from \"angular-auth-oidc-client\";\nimport {  filter, map, Observable, switchMap } from \"rxjs\";\nimport { ErrorManagementService } from \"../../services/errors/error-management.service\";\nimport { KeycloakUser } from './keycloack-user';\nimport { KeycloakCredential } from './keycloak-credential';\nimport { KeycloakDevice, KeycloakSession } from './keycloak-device';\nimport { AuthenticationService } from '../services/auth.service';\n\n/**\n * The Keycloak account API, with failures shown as a modal.\n *\n * Every method here is gated behind `filter(isAuthenticated)` and ends in\n * `manageUI('error', 'dialog')`, so a failure — or a token renewal that has stalled — completes the\n * stream without emitting and without erroring. That is fine for a single call bound straight to a\n * template, and unusable anywhere the caller needs to know what happened: it cannot distinguish\n * failure from an empty result, and inside a `forkJoin` it silently aborts every sibling call.\n *\n * Prefer `KeycloakAccountService` for anything composed. This service is kept as-is for the\n * existing callers, and for `configureOTP`/`updatePassword`, which are redirects rather than HTTP.\n */\n@Injectable({\n  providedIn: 'root',\n})\nexport class KeycloakProfileService {\n\n  constructor(\n    private http: HttpClient,\n    private readonly authService: AuthenticationService,\n    private readonly errorManagementService: ErrorManagementService,\n    private readonly oidcSecurityService: OidcSecurityService) { }\n\n  private get baseUrl() {\n    return `${this.authService.currentProvider?.authority}/account`;\n  }\n\n  getUserProfile(): Observable<KeycloakUser> {\n    return this.authService.isAuthenticated$.pipe(\n      filter(isAuth => isAuth),\n      switchMap(() => this.authService.accessToken$),\n      switchMap(token => this.http.get<any>(this.baseUrl, {\n        headers: {\n          Authorization: `Bearer ${token}`,\n        },\n      })),\n      this.errorManagementService.manageUI('error', 'dialog')\n    )\n  }\n\n  updateUserProfile(data: KeycloakUser): Observable<void> {\n    return this.authService.isAuthenticated$.pipe(\n      filter(isAuth => isAuth),\n      switchMap(() => this.authService.accessToken$),\n      switchMap(token => this.http.post<void>(this.baseUrl, data, {\n        headers: {\n          Authorization: `Bearer ${token}`,\n        },\n      })),\n      this.errorManagementService.manageUI('error', 'dialog')\n    )\n  }\n\n  getDevices(): Observable<KeycloakSession[]> {\n    return this.authService.isAuthenticated$.pipe(\n      filter(isAuth => isAuth),\n      switchMap(() => this.authService.accessToken$),\n      switchMap(token => this.http.get<KeycloakDevice[]>(`${this.baseUrl}/sessions/devices`, {\n        headers: {\n          Authorization: `Bearer ${token}`,\n        },\n      })),\n      map((devices) => devices.map((device) => device.sessions.map((session) => {\n        session.os = device.os;\n        session.osVersion = device.osVersion;\n        session.device = device.device;\n        session.mobile = device.mobile;\n        session.clientslist = session.clients.map((client) => client.clientName).join(', ');\n        return session;\n      })).flat()),\n      this.errorManagementService.manageUI('error', 'dialog')\n    )\n  }\n\n  getCredentials(): Observable<KeycloakCredential[]> {\n    return this.authService.isAuthenticated$.pipe(\n      filter(isAuth => isAuth),\n      switchMap(() => this.authService.accessToken$),\n      switchMap(token => this.http.get<KeycloakCredential[]>(`${this.baseUrl}/credentials`, {\n        headers: {\n          Authorization: `Bearer ${token}`,\n        },\n      })),\n      this.errorManagementService.manageUI('error', 'dialog')\n    );\n  }\n\n  removeCredential(id: string): Observable<void> {\n    return this.authService.isAuthenticated$.pipe(\n      filter(isAuth => isAuth),\n      switchMap(() => this.authService.accessToken$),\n      switchMap(token => {\n        return this.http.delete<void>(`${this.baseUrl}/credentials/${id}`, {\n          headers: {\n            Authorization: `Bearer ${token}`,\n          },\n        });\n      }),\n      this.errorManagementService.manageUI('error', 'dialog')\n    );\n  }\n\n  configureOTP() {\n    return this.oidcSecurityService.authorize(this.authService.currentProvider?.configId, {\n      customParams: {\n        kc_action: \"CONFIGURE_TOTP\"\n      }\n    });\n  }\n\n  updatePassword() {\n    return this.oidcSecurityService.authorize(this.authService.currentProvider?.configId, {\n      customParams: {\n        kc_action: \"UPDATE_PASSWORD\"\n      }\n    });\n  }\n}\n","import { DatePipe, Location, UpperCasePipe } from '@angular/common';\nimport {\n  ChangeDetectionStrategy,\n  Component,\n  DestroyRef,\n  inject,\n  OnInit,\n  signal,\n} from '@angular/core';\nimport { Router } from '@angular/router';\nimport { FormBuilder, ReactiveFormsModule } from '@angular/forms';\nimport { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';\nimport { Store } from '@ngrx/store';\nimport { ModalService } from '@open-rlb/ng-bootstrap';\nimport { EMPTY, filter, lastValueFrom, switchMap, tap } from 'rxjs';\nimport { KeycloakUser } from '../../../auth/keycloak/keycloack-user';\nimport { KeycloakProfileService } from '../../../auth/keycloak/keycloak-account.service';\nimport { KeycloakCredential } from '../../../auth/keycloak/keycloak-credential';\nimport { TranslateModule } from '@ngx-translate/core';\nimport {\n  BreadcrumbComponent,\n  CardBodyComponent,\n  CardComponent,\n  CardFooterComponent,\n  CardHeaderComponent,\n  InputComponent,\n  ListComponent,\n  ListItemComponent,\n  RlbFabComponent,\n  TooltipDirective,\n} from '@open-rlb/ng-bootstrap';\nimport { LanguageService } from '../../../services/i18n/language.service';\nimport { BaseState } from '../../../store/base-state';\nimport { AuthActions } from '../../../store/auth/auth.actions';\nimport { AuthenticationService } from '../../../auth/services/auth.service';\n\n@Component({\n  selector: 'rlb-user-account',\n  imports: [\n    ReactiveFormsModule,\n    DatePipe,\n    UpperCasePipe,\n    TranslateModule,\n    TooltipDirective,\n    BreadcrumbComponent,\n    CardComponent,\n    CardBodyComponent,\n    CardFooterComponent,\n    CardHeaderComponent,\n    RlbFabComponent,\n    InputComponent,\n    ListComponent,\n    ListItemComponent,\n  ],\n  templateUrl: './user-account.component.html',\n  styleUrl: './user-account.component.scss',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class UserAccountComponent implements OnInit {\n  private readonly _location = inject(Location);\n  private readonly store = inject(Store<BaseState>);\n  private readonly keycloakProfileService = inject(KeycloakProfileService);\n  private readonly modalService = inject(ModalService);\n  private readonly languageService = inject(LanguageService);\n  private readonly authService = inject(AuthenticationService);\n  private readonly router = inject(Router);\n  private readonly destroyRef = inject(DestroyRef); // <-- Required for takeUntilDestroyed outside of constructor\n  private readonly fb = inject(FormBuilder);\n\n  readonly keyCloakUser = signal<KeycloakUser | undefined>(undefined);\n  readonly keyCloakDevices = toSignal(this.keycloakProfileService.getDevices(), {\n    initialValue: [],\n  });\n  readonly keycloakCredentials = signal<KeycloakCredential[]>([]);\n\n  readonly breadcrumbItems = [\n    { label: 'Home', link: '/', id: '1' },\n    { label: 'Account settings', id: '2' },\n  ];\n\n  readonly profileForm = this.fb.nonNullable.group({\n    username: [{ value: '', disabled: true }],\n    email: [{ value: '', disabled: true }],\n    firstName: [{ value: '', disabled: true }],\n    lastName: [{ value: '', disabled: true }],\n  });\n\n  constructor() {\n    this.authService.isAuthenticated$\n      .pipe(\n        takeUntilDestroyed(),\n        filter(isAuth => !isAuth),\n        switchMap(() => this.router.navigate(['/'])),\n      )\n      .subscribe();\n  }\n\n  backClicked(): void {\n    this._location.back();\n  }\n\n  ngOnInit(): void {\n    this.keycloakProfileService\n      .getUserProfile()\n      .pipe(takeUntilDestroyed(this.destroyRef)) // Using explicitly injected DestroyRef\n      .subscribe(user => {\n        this.keyCloakUser.set(user);\n\n        if (user) {\n          this.profileForm.enable();\n          this.profileForm.controls.username.disable();\n          this.profileForm.patchValue({\n            username: user.username || '',\n            email: user.email || '',\n            firstName: user.firstName || '',\n            lastName: user.lastName || '',\n          });\n        } else {\n          this.profileForm.disable();\n        }\n      });\n\n    this.keycloakProfileService\n      .getCredentials()\n      .pipe(takeUntilDestroyed(this.destroyRef))\n      .subscribe(credentials => this.keycloakCredentials.set(credentials));\n  }\n\n  logout(): void {\n    this.store.dispatch(AuthActions.logout());\n  }\n\n  removeCredential(type: string, id: string): void {\n    this.modalService\n      .openConfirmModal(\n        this.languageService.translate('core.account.credentials.deleteTitle'),\n        this.languageService.translate('core.account.credentials.deleteMessage'),\n        this.languageService.translate('core.account.credentials.deleteHeader'),\n        this.languageService.translate('common.yes'),\n        this.languageService.translate('common.cancel'),\n      )\n      .pipe(\n        switchMap(result => {\n          if (result.reason === 'ok') {\n            return this.keycloakProfileService.removeCredential(id).pipe(\n              tap(() => {\n                this.keycloakCredentials.update(credentials =>\n                  credentials.map(credType => {\n                    if (credType.type === type && credType.userCredentialMetadatas) {\n                      return {\n                        ...credType,\n                        userCredentialMetadatas: credType.userCredentialMetadatas.filter(\n                          m => m.credential.id !== id,\n                        ),\n                      };\n                    }\n                    return credType;\n                  }),\n                );\n              }),\n            );\n          }\n          return EMPTY;\n        }),\n        takeUntilDestroyed(this.destroyRef),\n      )\n      .subscribe();\n  }\n\n  async updateProfile(): Promise<void> {\n    const user = this.keyCloakUser();\n    if (user && this.profileForm.valid) {\n      const updatedUser = { ...user, ...this.profileForm.getRawValue() };\n      await lastValueFrom(this.keycloakProfileService.updateUserProfile(updatedUser));\n      this.keyCloakUser.set(updatedUser);\n    }\n  }\n\n  updatePassword(): void {\n    this.keycloakProfileService.updatePassword();\n  }\n\n  configureOTP(): void {\n    this.keycloakProfileService.configureOTP();\n  }\n}\n","<div class=\"container mt-4 mb-5\">\n  <div class=\"d-flex align-items-center justify-content-between\">\n    <h3 class=\"m-0\">{{ \"Account settings\" | translate | uppercase }}</h3>\n    <rlb-breadcrumb [cssClasses]=\"'p-0 px-md-1 py-md-2 m-0'\" [items]=\"breadcrumbItems\" class=\"d-block\"></rlb-breadcrumb>\n  </div>\n\n  <!-- ACCOUNT DETAILS CARD -->\n  <rlb-card class=\"mt-3\">\n    <rlb-card-header class=\"d-flex justify-content-between align-items-center py-3 px-4\">\n      <h5 class=\"m-0\">{{ \"Account\" | translate }}</h5>\n    </rlb-card-header>\n\n    <rlb-card-body class=\"px-4 py-4\" [formGroup]=\"profileForm\">\n      <div class=\"row mb-3 align-items-center\">\n        <label class=\"col-md-3 col-form-label fw-semibold\">{{ 'core.account.username' | translate }}</label>\n        <div class=\"col-md-9\">\n          <rlb-input class=\"w-100\" type=\"text\" formControlName=\"username\" />\n        </div>\n      </div>\n\n      <div class=\"row mb-3 align-items-center\">\n        <label class=\"col-md-3 col-form-label fw-semibold\">{{ 'core.account.email' | translate }}</label>\n        <div class=\"col-md-9\">\n          <rlb-input class=\"w-100\" type=\"text\" formControlName=\"email\" />\n        </div>\n      </div>\n\n      <div class=\"row mb-3 align-items-center\">\n        <label class=\"col-md-3 col-form-label fw-semibold\">{{ 'core.account.firstName' | translate }}</label>\n        <div class=\"col-md-9\">\n          <rlb-input class=\"w-100\" type=\"text\" formControlName=\"firstName\" />\n        </div>\n      </div>\n\n      <div class=\"row align-items-center\">\n        <label class=\"col-md-3 col-form-label fw-semibold\">{{ 'core.account.lastName' | translate }}</label>\n        <div class=\"col-md-9\">\n          <rlb-input class=\"w-100\" type=\"text\" formControlName=\"lastName\" />\n        </div>\n      </div>\n    </rlb-card-body>\n\n    <rlb-card-footer>\n      <div class=\"d-flex align-items-center justify-content-end gap-2\">\n        <button rlb-button outline (click)=\"updateProfile()\" [disabled]=\"profileForm.invalid || !keyCloakUser()\">\n          <i class=\"bi bi-floppy\"></i>\n          {{ 'common.save' | translate }}\n        </button>\n        <button rlb-button outline color=\"danger\" (click)=\"logout()\">\n          <i class=\"bi bi-box-arrow-right\"></i>\n          {{ 'core.account.logout' | translate }}\n        </button>\n      </div>\n    </rlb-card-footer>\n  </rlb-card>\n\n  <!-- CREDENTIALS SECTION -->\n  @if (keyCloakUser()) {\n    <h3 class=\"mb-4 text-center mt-5\">{{ 'core.account.credentials.title' | translate }}</h3>\n\n    @for (type of keycloakCredentials(); track type.type) {\n      <rlb-card class=\"mb-4\">\n        <rlb-card-header class=\"d-flex justify-content-between align-items-center py-3 px-4\">\n          <h6 class=\"mb-0 fw-bold\">{{ ('core.account.credentials.' + $safeNavigationMigration(type?.type)) | translate }}</h6>\n          @if (type.type === 'otp') {\n            <rlb-fab (click)=\"configureOTP()\" size=\"sm\" [tooltip]=\"'core.account.credentials.addOTP' | translate\">\n              <i class=\"bi bi-plus-circle\"></i>\n            </rlb-fab>\n          }\n        </rlb-card-header>\n\n        <rlb-card-body>\n          <rlb-list class=\"settings m-0\">\n            @for (cred of type.userCredentialMetadatas; track cred.credential.id) {\n              <rlb-list-item class=\"px-4 py-3\">\n                <div class=\"row align-items-center w-100\">\n                  <div class=\"col-md-1 text-center mb-2 mb-md-0\">\n                    <i class=\"bi bi-key text-secondary\" style=\"font-size: 2rem;\"></i>\n                  </div>\n                  <div class=\"col-md-5 mb-2 mb-md-0\">\n                    <span class=\"text-muted small d-block\">{{ 'core.account.credentials.name' | translate }}</span>\n                    <span class=\"fw-semibold\">{{ cred.credential.userLabel || cred.credential.type }}</span>\n                  </div>\n                  <div class=\"col-md-4 mb-3 mb-md-0\">\n                    <span class=\"text-muted small d-block\">{{ 'core.account.credentials.created' | translate }}</span>\n                    <span>{{ cred.credential.createdDate | date: 'dd:MM:yyyy HH:mm' }}</span>\n                  </div>\n                  <div class=\"col-md-2 text-md-end\">\n                    @if (type.removeable) {\n                      <button rlb-button class=\"w-100\" color=\"danger\" (click)=\"removeCredential(type.type, cred.credential.id)\">\n                        <i class=\"bi bi-trash\"></i> {{ 'core.account.credentials.delete' | translate }}\n                      </button>\n                    } @else {\n                      <button rlb-button class=\"w-100\" outline (click)=\"updatePassword()\">\n                        <i class=\"bi bi-pencil-square\"></i> {{ 'core.account.credentials.update' | translate }}\n                      </button>\n                    }\n                  </div>\n                </div>\n              </rlb-list-item>\n            }\n\n            @if (type.userCredentialMetadatas.length === 0) {\n              <rlb-list-item>\n                <div class=\"py-4 text-center text-muted\">\n                  {{ 'core.account.credentials.noCredentials' | translate }}\n                </div>\n              </rlb-list-item>\n            }\n          </rlb-list>\n        </rlb-card-body>\n      </rlb-card>\n    }\n\n    <!-- SESSION SECTION -->\n    <h3 class=\"mb-4 text-center mt-5\">{{ 'core.account.session.title' | translate }}</h3>\n\n    <rlb-card border=\"secondary\" class=\"mb-5\">\n      <rlb-card-body class=\"p-0\">\n        <rlb-list class=\"settings m-0\">\n          @for (d of keyCloakDevices(); track d.id) {\n            <rlb-list-item class=\"settings-item px-4 py-4\">\n              <!-- Session Top Row (Device Info) -->\n              <div class=\"d-flex align-items-center pb-3 mb-3\">\n                <i class=\"bi bi-laptop text-secondary me-3\" style=\"font-size: 2rem;\"></i>\n                <h6 class=\"mb-0 fw-bold\">{{ d.os }} {{ d.osVersion }} - {{ d.browser }}</h6>\n                @if (d.current) {\n                  <span class=\"badge bg-success ms-3 rounded-pill px-3 py-2\">\n                    {{ 'core.account.session.current' | translate }}\n                  </span>\n                }\n              </div>\n\n              <div class=\"row text-center text-md-start gy-3\">\n                <div class=\"col-sm-6 col-md-3\">\n                  <span class=\"text-muted small d-block\">{{ 'core.account.session.ip' | translate }}</span>\n                  <span class=\"fw-medium\">{{ d.ipAddress }}</span>\n                </div>\n                <div class=\"col-sm-6 col-md-3\">\n                  <span class=\"text-muted small d-block\">{{ 'core.account.session.lastAccess' | translate }}</span>\n                  <span>{{ d.lastAccess * 1000 | date: 'dd/MM/yyyy - HH:mm' }}</span>\n                </div>\n                <div class=\"col-sm-6 col-md-2\">\n                  <span class=\"text-muted small d-block\">{{ 'core.account.session.applications' | translate }}</span>\n                  <span>{{ d.clientslist }}</span>\n                </div>\n                <div class=\"col-sm-6 col-md-2\">\n                  <span class=\"text-muted small d-block\">{{ 'core.account.session.started' | translate }}</span>\n                  <span>{{ d.started * 1000 | date: 'dd/MM/yyyy - HH:mm' }}</span>\n                </div>\n                <div class=\"col-sm-6 col-md-2\">\n                  <span class=\"text-muted small d-block\">{{ 'core.account.session.expires' | translate }}</span>\n                  <span>{{ d.expires * 1000 | date: 'dd/MM/yyyy - HH:mm' }}</span>\n                </div>\n              </div>\n            </rlb-list-item>\n          }\n        </rlb-list>\n      </rlb-card-body>\n    </rlb-card>\n  }\n</div>\n","import { Location } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, inject, Inject, Optional } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { Store } from '@ngrx/store';\nimport { ToastService } from '@open-rlb/ng-bootstrap';\nimport { FormsModule } from '@angular/forms';\nimport { TranslateModule } from '@ngx-translate/core';\nimport {\n  ListComponent,\n  ListItemComponent,\n  OptionComponent,\n  SelectComponent,\n  SwitchComponent,\n} from '@open-rlb/ng-bootstrap';\nimport { LanguageService } from '../../../services/i18n/language.service';\nimport { AppContextActions } from '../../../store/app-context/app-context.actions';\nimport { appContextFeatureKey } from '../../../store/app-context/app-context.model';\nimport { BaseState } from '../../../store/base-state';\n\n@Component({\n  selector: 'rlb-settings-core',\n  imports: [\n    FormsModule,\n    TranslateModule,\n    ListComponent,\n    ListItemComponent,\n    OptionComponent,\n    SelectComponent,\n    SwitchComponent,\n  ],\n  templateUrl: './settings-core.component.html',\n  styleUrl: './settings-core.component.scss',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SettingsCoreComponent {\n  private readonly _location = inject(Location);\n  private readonly toastService = inject(ToastService);\n  private readonly languageService = inject(LanguageService);\n  private readonly store = inject(Store);\n\n  readonly languages = computed(() => {\n    return (this.store.selectSignal(o => o[appContextFeatureKey].supportedLanguages)() as string[])\n      .map((lang: string) => {\n        return {\n          value: lang,\n          label: this.languageService.getLanguageName(lang),\n        };\n      });\n  });\n\n  readonly currentLanguage = toSignal(\n    this.store.select(o => o[appContextFeatureKey].language),\n    { initialValue: 'en' }\n  );\n\n  readonly darkMode = computed(() =>\n    this.store.selectSignal(o => o[appContextFeatureKey].theme)() === 'dark'\n  );\n\n  backClicked() {\n    this._location.back();\n  }\n\n  setCurrentLanguage(value: string) {\n    this.store.dispatch(AppContextActions.setLanguage({ language: value }));\n    this.toastService.openToast('toast-c-1', 'toast-component', {\n      title: this.languageService.translate('common.saved'),\n      content: this.languageService.translate('common.savedSuccessfully'),\n      type: 'success',\n      ok: this.languageService.translate('ok'),\n    });\n  }\n\n  setDarkMode(value: boolean) {\n    this.store.dispatch(AppContextActions.setTheme({ theme: value ? 'dark' : 'light' }));\n    this.toastService.openToast('toast-c-1', 'toast-component', {\n      title: this.languageService.translate('common.saved'),\n      content: this.languageService.translate('common.savedSuccessfully'),\n      type: 'success',\n      ok: this.languageService.translate('ok'),\n    });\n  }\n}\n\n\n","<div class=\"container mt-2\">\n  <div class=\"container text-center position-relative my-3\">\n    <h3>{{ 'core.settings.generalTitle' | translate}}</h3>\n    <i role=\"button\" class=\"bi bi-chevron-left position-absolute start-0 top-50 translate-middle-y\"\n    (click)=\"backClicked()\" style=\"font-size: 25px;font-weight: 600;\"></i>\n  </div>\n  <rlb-list class=\"settings\">\n    <rlb-list-item class=\"settings-item\">\n      <div class=\"d-flex justify-content-between\">\n        <div class=\"settings-text\">\n          <h6 class=\"mt-1\">{{ 'core.settings.generalTheme' | translate}}</h6>\n        </div>\n        <div class=\"settings-control\">\n          <rlb-switch size=\"small\" [ngModel]=\"darkMode()\" (ngModelChange)=\"setDarkMode($event)\" class=\"mt-2\" />\n        </div>\n      </div>\n    </rlb-list-item>\n    <rlb-list-item class=\"settings-item\">\n      <div class=\"d-flex justify-content-between\">\n        <div class=\"settings-text\">\n          <h6 class=\"mt-1\">{{ 'core.settings.generalLanguage' | translate}}</h6>\n        </div>\n        <div class=\"settings-control\">\n          <rlb-select size=\"small\" [ngModel]=\"currentLanguage()\" (ngModelChange)=\"setCurrentLanguage($event)\">\n            @for (l of languages(); track l.value) {\n              <rlb-option [value]=\"l.value\">{{l.label}}</rlb-option>\n            }\n          </rlb-select>\n        </div>\n      </div>\n    </rlb-list-item>\n  </rlb-list>\n</div>\n\n","import { CommonModule, Location } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, Inject, Optional } from '@angular/core';\nimport { Store } from '@ngrx/store';\nimport { PagesConfiguration, RLB_CFG_PAGES } from '../../../configuration';\nimport { RouterModule } from '@angular/router';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { ListComponent, ListItemImageComponent } from '@open-rlb/ng-bootstrap';\nimport { AppInfo } from '../../../services/apps/app';\nimport { AppsService } from '../../../services/apps/apps.service';\nimport { BaseState } from '../../../store/base-state';\nimport { AuthenticationService } from '../../../auth/services/auth.service';\n\n\n@Component({\n  selector: 'rlb-settings-list',\n  imports: [CommonModule, RouterModule, TranslateModule, ListComponent, ListItemImageComponent],\n  templateUrl: './settings-list.component.html',\n  styleUrl: './settings-list.component.scss',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SettingsListComponent {\n  constructor(\n    private readonly _location: Location,\n    private readonly appsService: AppsService,\n    private readonly authService: AuthenticationService,\n    @Inject(RLB_CFG_PAGES) @Optional() private pageOptions: PagesConfiguration | undefined) { }\n\n  readonly apps = this.appsService.apps;\n  readonly pages = computed(() => this.pageOptions);\n\n  /**\n   * Whether a `pages.*` chrome entry is offered to the current visitor — same rule as the settings\n   * dropdown, which lists the same pages: configured, and (if it declares one) the ACL action held.\n   */\n  isPageVisible(key: string): boolean {\n    const page = this.pages()?.[key];\n    if (!page?.path) return false;\n    if (!page.action) return true;\n    return this.appsService.checkPermissionAnywhere(page.action);\n  }\n\n  backClicked() {\n    this._location.back();\n  }\n\n  selectApp(app: AppInfo) {\n    this.appsService.selectApp(app, 'settings');\n  }\n\n  get auth$() {\n    return this.authService.isAuthenticated$;\n  }\n}\n\n","<div class=\"container mt-2\">\n  <div class=\"container text-center position-relative my-3\">\n    <h3>{{ 'core.settings.title' | translate}}</h3>\n    <i role=\"button\" class=\"bi bi-chevron-left position-absolute start-0 top-50 translate-middle-y\"\n    (click)=\"backClicked()\" style=\"font-size: 25px;font-weight: 600;\"></i>\n  </div>\n  <rlb-list>\n    <rlb-list-item-image icon=\"bi bi-gear\" [avatar-size]=\"35\" [line-1]=\" 'core.settings.generalTitle' | translate\"\n      [routerLink]=\"'/settings/general'\" [line-2]=\" 'core.settings.generalDescription' | translate\">\n    </rlb-list-item-image>\n    @for (app of apps(); track app.id) {\n      <ng-container ngProjectAs=\"rlb-list-item-image\">\n        @if (app.settings) {\n          <ng-container ngProjectAs=\"rlb-list-item-image\">\n            <rlb-list-item-image [icon]=\"app.settings.icon\" [avatar-size]=\"35\"\n              [line-1]=\"app.data.friendlyName ? app.data.friendlyName : app.settings.title | translate\"\n              [disabled]=\"!app.enabled && (app.settings.auth && !(auth$ | async))\"\n              [line-2]=\"app.settings.description | translate\" (click)=\"selectApp(app)\">\n            </rlb-list-item-image>\n          </ng-container>\n        }\n      </ng-container>\n    }\n  </rlb-list>\n\n  @if (isPageVisible('status') || isPageVisible('logger')) {\n    <rlb-list class=\"mt-5\">\n      @if (isPageVisible('status')) {\n        <rlb-list-item-image icon=\"bi bi-check2-circle\" [avatar-size]=\"18\"\n          [line-1]=\"'core.settings.status' | translate\" [routerLink]=\"'/status'\">\n        </rlb-list-item-image>\n      }\n      @if (isPageVisible('logger')) {\n        <rlb-list-item-image icon=\"bi bi-file-text\" [avatar-size]=\"18\"\n          [line-1]=\"'core.settings.logger' | translate\" [routerLink]=\"'/logger'\">\n        </rlb-list-item-image>\n      }\n    </rlb-list>\n  }\n\n  @if (isPageVisible('privacy') || isPageVisible('cookies') || isPageVisible('terms') || isPageVisible('support')) {\n    <rlb-list class=\"mt-4\"\n      >\n      @if (isPageVisible('privacy')) {\n        <rlb-list-item-image icon=\"bi bi-shield-check\" [avatar-size]=\"18\"\n          [line-1]=\"'core.settings.privacy' | translate\" [routerLink]=\"'/privacy'\">\n        </rlb-list-item-image>\n      }\n      @if (isPageVisible('cookies')) {\n        <rlb-list-item-image icon=\"bi bi bi-cookie\" [avatar-size]=\"18\"\n          [line-1]=\"'core.settings.cookies' | translate\" [routerLink]=\"'/cookies'\">\n        </rlb-list-item-image>\n      }\n      @if (isPageVisible('terms')) {\n        <rlb-list-item-image icon=\"bi bi-vector-pen\" [avatar-size]=\"18\"\n          [line-1]=\"'core.settings.legal' | translate\" [routerLink]=\"'/terms'\">\n        </rlb-list-item-image>\n      }\n      @if (isPageVisible('support')) {\n        <rlb-list-item-image icon=\"bi bi-chat-quote\" [avatar-size]=\"18\"\n          [line-1]=\" 'core.settings.support' | translate\" [routerLink]=\"'/support'\">\n        </rlb-list-item-image>\n      }\n    </rlb-list>\n  }\n</div>\n\n","import { inject } from '@angular/core';\nimport { CanActivateFn } from '@angular/router';\nimport { map, take } from 'rxjs';\nimport { RLB_CFG_AUTH } from \"../../configuration\";\nimport { TokenRenewalService } from \"../renewal/token-renewal.service\";\nimport { AuthenticationService } from \"../services/auth.service\";\n\n/**\n * Requires an authenticated session, and sends the visitor to the provider when there is none.\n *\n * **Except while the session is merely mid-outage.** A failed token refresh makes the OIDC library\n * publish `isAuthenticated$: false` even when the session is perfectly alive on the provider and\n * only the login host was briefly unreachable. Bouncing then is worse than useless: it takes the\n * user out of the app and hands them to the very host that is failing. So when the renewal watchdog\n * is still working on the session, navigation is allowed through — requests keep their normal error\n * handling meanwhile, and everything resumes silently once the host answers again. See\n * {@link TokenRenewalService.isRecoverable}.\n *\n * That only applies under `auth.interceptor: 'oauth-code-ep-retry'`, the mode that runs the\n * watchdog. Reading the configuration first also keeps this guard usable in an app with no auth\n * configured at all, where the watchdog's own dependencies would not resolve.\n */\nexport const oauthGuard: CanActivateFn = (route, state) => {\n  const authService = inject(AuthenticationService);\n  const renewal =\n    inject(RLB_CFG_AUTH, { optional: true })?.interceptor === 'oauth-code-ep-retry'\n      ? inject(TokenRenewalService)\n      : null;\n\n  return authService.isAuthenticated$.pipe(\n    take(1),\n    map((isAuthenticated) => {\n      if (isAuthenticated) return true;\n      if (renewal?.isRecoverable()) return true;\n\n      authService.login(state.url)\n      return false;\n    }),\n  );\n};\n","import { CanActivateFn, Router } from '@angular/router';\nimport { inject, Signal } from '@angular/core';\nimport { filter, map, Observable, take } from 'rxjs';\nimport { AclStore } from '../../store/acl/acl.store';\nimport { AclAction } from '../../store/acl/acl.model';\nimport { toObservable } from '@angular/core/rxjs-interop';\nimport { AppsService } from '../../services/apps/apps.service';\n\n/**\n * Where a denial lands. The route is registered unconditionally by `getDefaultRoutes` — it used to\n * depend on `pages.forbidden` being configured, and where it was not, a denial fell through to the\n * consumer's `**` route and presented as a redirect to an unrelated page with nothing logged.\n */\nconst FORBIDDEN_URL = '/forbidden';\n\n/**\n * Requires the ACL action named in `route.data.action` **in the app that owns the route**.\n *\n * `data.action` may be a list, in which case any one of them grants.\n */\nexport const permissionGuard: CanActivateFn = route => {\n  const aclStore = inject(AclStore);\n  const appsService = inject(AppsService);\n  const router = inject(Router);\n\n  return whenAclLoaded(aclStore.loaded).pipe(\n    map(() => {\n      const action = route.data['action'] as AclAction | undefined;\n\n      // Default case: currentApp already selected (any navigation after the first).\n      if (appsService.currentApp()) {\n        return appsService.checkPermissionInCurrentApp(action)\n          ? true\n          : router.createUrlTree([FORBIDDEN_URL]);\n      }\n\n      // Deep-link case: currentApp still not processed by AppsService, so we extract ACL data from route and check permissions\n      const routePath = route.pathFromRoot\n        .flatMap(r => r.url)\n        .map(seg => seg.path)\n        .filter(Boolean)\n        .join('/');\n\n      const resolvedApp = appsService.findAppForPath(routePath);\n      if (resolvedApp && appsService.checkPermissionForApp(resolvedApp, action)) {\n        return true;\n      }\n      return router.createUrlTree([FORBIDDEN_URL]);\n    }),\n  );\n};\n\n/**\n * Requires `action` on **any** resource the user holds — the guard for chrome that no app owns.\n *\n * `getDefaultRoutes` puts this on every `pages.*` entry that declares an `action`. Use it for the\n * pages the kit cannot register for you (`status`, `logger`, …) so the route and the settings\n * button that links to it agree:\n *\n * ```typescript\n * { path: 'status', component: StatusComponent, canActivate: [pagePermissionGuard('show-status')] }\n * ```\n *\n * `permissionGuard` is the wrong tool here: while a `pages.*` route is open `AppsService` has\n * deselected the current app, and no app claims the path, so it denies whatever the user holds.\n */\nexport function pagePermissionGuard(action?: AclAction): CanActivateFn {\n  return () => {\n    const aclStore = inject(AclStore);\n    const appsService = inject(AppsService);\n    const router = inject(Router);\n\n    return whenAclLoaded(aclStore.loaded).pipe(\n      map(() =>\n        appsService.checkPermissionAnywhere(action) ? true : router.createUrlTree([FORBIDDEN_URL]),\n      ),\n    );\n  };\n}\n\n/** Holds the navigation until the ACL resources have arrived, so nobody is denied for being early. */\nfunction whenAclLoaded(loaded: Signal<boolean>): Observable<boolean> {\n  return toObservable(loaded).pipe(filter(Boolean), take(1));\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\nimport { TranslateModule } from '@ngx-translate/core';\n\n@Component({\n  selector: 'rlb-forbidden',\n  imports: [TranslateModule],\n  template: `<div class=\"container\" style=\"height:calc(100vh - 58px);\">\n  <div class=\"align-center\">\n    <div class=\"text-center\">\n      <h1 class=\"text-primary\">\n        {{ 'pages.forbidden.title' | translate }}\n      </h1>\n      <p>{{ 'pages.forbidden.content' | translate }}</p><a href=\"/\" class=\"btn btn-outline-primary\">\n        <span>\n          {{ 'pages.forbidden.button' | translate }}\n        </span></a>\n    </div>\n  </div>\n</div>\n`,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ForbiddenComponent {\n\n}\n","import { Route, Routes } from '@angular/router';\nimport { CmsContentComponent } from './cms-content/cms-content.component';\nimport { CookiesComponent } from './cookies/cookies.component';\nimport { NotFoundComponent } from './not-found/not-found.component';\nimport { PrivacyComponent } from './privacy/privacy.component';\nimport { SupportComponent } from './support/support.component';\nimport { TermsAndConditionsComponent } from './terms-and-conditions/terms-and-conditions.component';\nimport { PagesConfiguration } from '../configuration';\nimport { AppSelectorComponent } from './apps/app-selector/app-selector.component';\nimport { UserAccountComponent } from './apps/user-account/user-account.component';\nimport { SettingsCoreComponent } from './settings/settings-core/settings-core.component';\nimport { SettingsListComponent } from './settings/settings-list/settings-list.component';\nimport { DEFAULT_ROUTES_CONFIG, DefaultRouteConfig } from './default-routes.config';\nimport { oauthGuard } from '../auth/guards/oauth.guard';\nimport { pagePermissionGuard } from '../auth/guards/permission.guard';\nimport { ForbiddenComponent } from './forbidden/forbidden.component';\n\n/**\n * Pages that are never ACL-gated, whatever the config says: they are where a denial *lands*.\n * Guarding them is a redirect loop.\n */\nconst UNGATEABLE_PATHS = ['forbidden', 'notFound'];\n\nexport function getDefaultRoutes(config?: PagesConfiguration): Routes {\n  const defaultRoutes = DEFAULT_ROUTES_CONFIG.filter(\n    defaultRouteConfig =>\n      !defaultRouteConfig.configKey || (config && config[defaultRouteConfig.configKey]),\n  ).map(routeConfig => withPageAcl(buildRoute(routeConfig.path), routeConfig, config));\n  return defaultRoutes;\n}\n\nfunction buildRoute(path: string): Route {\n  switch (path) {\n    case 'settings':\n      return { path: 'settings', component: SettingsListComponent, canActivate: [oauthGuard] };\n    case 'settings/general':\n      return {\n        path: 'settings/general',\n        component: SettingsCoreComponent,\n        canActivate: [oauthGuard],\n      };\n    case 'apps':\n      return { path: 'apps', component: AppSelectorComponent, canActivate: [oauthGuard] };\n    case 'profile':\n      return { path: 'profile', component: UserAccountComponent, canActivate: [oauthGuard] };\n    case 'content':\n      return { path: 'content', component: CmsContentComponent };\n    case 'cookies':\n      return { path: 'cookies', component: CookiesComponent };\n    case 'notFound':\n      return { path: 'notFound', component: NotFoundComponent };\n    case 'forbidden':\n      return { path: 'forbidden', component: ForbiddenComponent };\n    case 'privacy':\n      return { path: 'privacy', component: PrivacyComponent };\n    case 'support':\n      return { path: 'support', component: SupportComponent };\n    case 'terms':\n      return { path: 'terms', component: TermsAndConditionsComponent };\n    default:\n      throw new Error(`No component mapped for route ${path}`);\n  }\n}\n\n/**\n * Adds the ACL guard when the page's config entry declares an `action`.\n *\n * Absent `action` leaves the route exactly as it was — every configuration written before this\n * existed omits it, and an upgrade must not start hiding chrome. The same action gates the settings\n * button that links here, so a denied user never sees the entry in the first place; the guard is\n * for deep links and for anyone who bookmarked the page before losing the grant.\n */\nfunction withPageAcl(\n  route: Route,\n  routeConfig: DefaultRouteConfig,\n  config?: PagesConfiguration,\n): Route {\n  const action = routeConfig.configKey ? config?.[routeConfig.configKey]?.action : undefined;\n  if (!action || UNGATEABLE_PATHS.includes(routeConfig.path)) return route;\n\n  return {\n    ...route,\n    canActivate: [...(route.canActivate ?? []), pagePermissionGuard(action)],\n  };\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n    name: 'asMulti'\n})\nexport class AsMultiPipe implements PipeTransform {\n\n  transform<T>(value: T | T[]): T[] {\n    if(!Array.isArray(value)) {\n      return [value];\n    }\n    return value as T[];\n  }\n}\n\n@Pipe({\n    name: 'asSingle'\n})\nexport class AsSinglePipe implements PipeTransform {\n\n  transform<T>(value: T | T[]): T {\n    if(Array.isArray(value)) {\n      return value[0];\n    }\n    return value as T;\n  }\n}\n","import { AppInfo } from './app';\n\n/**\n * Rules deciding which settings apps the shell chrome offers.\n *\n * Deliberately plain functions rather than component members: the same rule is applied by both the\n * navbar (`templates/app/app.component.html`) and the settings dropdown\n * (`pages/settings/settings-dropdown-selector`), and keeping it here means it can be unit-tested\n * without standing up a TestBed for either of those components.\n *\n * Not re-exported from `services/apps/index.ts` on purpose — `public-api.ts` re-exports that barrel\n * wholesale, and this is an internal detail, not API we want to support.\n */\n\n/**\n * Whether a settings app should be offered to the current visitor.\n *\n * `AppDetails.auth` states whether the app *needs* a session. An app that does not is public, and is\n * offered to anonymous visitors — that is the whole meaning of `auth: false`. An app that does is\n * offered only once there is a session to satisfy it.\n */\nexport function isSettingsAppVisible(\n  app: AppInfo,\n  isAuthenticated: boolean | null | undefined,\n): boolean {\n  if (!app.settings || !app.enabled) {\n    return false;\n  }\n  return !app.settings.auth || !!isAuthenticated;\n}\n\n/**\n * Whether any registered app exposes settings that need no session.\n *\n * Gates the *anonymous* rendering of the settings chrome. The shell is otherwise authenticated-only\n * by design, so this keeps the relaxation additive: with no public settings app — the case for every\n * consumer whose apps all declare `auth: true` — it returns false and the chrome behaves exactly as\n * it did before.\n */\nexport function hasPublicSettingsApps(apps: readonly AppInfo[]): boolean {\n  return apps.some(app => !!app.settings && app.enabled && !app.settings.auth);\n}\n","import { createActionGroup, props } from '@ngrx/store';\nimport { NavbarActionsLayout, NavbarHeader } from './navbar.model';\n\nexport const NavbarActionsInternal = createActionGroup({\n  source: 'Navbar/Internal',\n  events: {},\n});\n\nexport const NavbarActions = createActionGroup({\n  source: 'Navbar/API',\n  events: {\n    SetVisible: props<{ visible: boolean }>(),\n    SetSearchVisible: props<{ visible: boolean }>(),\n    SetHeader: props<{ header: NavbarHeader | null }>(),\n    SetSearchText: props<{ text: string | null }>(),\n    SetLeftItems: props<{ items: string[] }>(),\n    SetRightItems: props<{ items: string[] }>(),\n    SetMobileItems: props<{ items: string[] }>(),\n    SetLoginVisible: props<{ visible: boolean }>(),\n    SetSettingsVisible: props<{ visible: boolean }>(),\n    SetAppsVisible: props<{ visible: boolean }>(),\n    SetSeparatorVisible: props<{ visible: boolean }>(),\n    SetActionsLayout: props<{ layout: NavbarActionsLayout }>(),\n  },\n});\n","import { createActionGroup, props } from '@ngrx/store';\nimport { SidebarNavigableItem } from '@open-rlb/ng-bootstrap';\n\nexport const SidebarActionsInternal = createActionGroup({\n  source: 'Sidebar/Internal',\n  events: {}\n});\n\n\nexport const SidebarActions = createActionGroup({\n  source: 'Sidebar/API',\n  events: {\n    SetItems: props<{ items: SidebarNavigableItem[] }>(),\n    SetVisible: props<{ visible: boolean }>(),\n    SetLoginVisible: props<{ visible: boolean }>(),\n    SetAppsVisible: props<{ visible: boolean }>(),\n    SetSearchVisible: props<{ visible: boolean }>(),\n    SetSettingsVisible: props<{ visible: boolean }>(),\n    SetSearchText: props<{ text: string | null }>(),\n    SetFooterComponent: props<{ name: string | null }>(),\n  }\n});\n\n","export const navbarsFeatureKey = 'navbar';\n\nexport type NavbarHeader =\n  { type: 'text'; text: string } | { type: 'image'; src: string; alt?: string; height?: number };\n\nexport type NavbarActionsLayout = 'default' | 'dropdown';\n\nexport interface Navbar {\n  visible: boolean;\n  header: NavbarHeader | null;\n  searchVisible: boolean;\n  searchText: string | null;\n  leftItems: string[];\n  rightItems: string[];\n  /**\n   * Named components rendered in the mobile menu (offcanvas below `lg`), resolved against\n   * `NavbarComponents.mobile ?? NavbarComponents.right`. Empty means the mobile menu shows\n   * only core content.\n   */\n  mobileItems: string[];\n  loginVisible: boolean;\n  settingsVisible: boolean;\n  appsVisible: boolean;\n  separatorVisible: boolean;\n  actionsLayout: NavbarActionsLayout;\n}\n\nexport const initialNavbarState: Navbar = {\n  visible: true,\n  header: null,\n  searchVisible: false,\n  searchText: null,\n  leftItems: [],\n  rightItems: [],\n  mobileItems: [],\n  loginVisible: false,\n  settingsVisible: false,\n  appsVisible: false,\n  separatorVisible: true,\n  actionsLayout: 'dropdown',\n};\n\nexport interface NavbarState {\n  [navbarsFeatureKey]: Navbar;\n}\n","import { NavigableItem, SidebarNavigableItem } from \"@open-rlb/ng-bootstrap\";\n\nexport const sidebarsFeatureKey = 'sidebar';\n\nexport interface Sidebar {\n  items: SidebarNavigableItem[];\n  visible: boolean;\n  loginVisible: boolean;\n  searchVisible: boolean;\n  appsVisible: boolean;\n  settingsVisible: boolean;\n  searchText: string | null;\n  footerComponent: string | null;\n}\n\nexport const initialSidebarState: Sidebar = {\n  items: [],\n  visible: true,\n  loginVisible: true,\n  searchVisible: true,\n  settingsVisible: true,\n  appsVisible: true,\n  searchText: null,\n  footerComponent: null\n};\n\nexport interface SidebarState { [sidebarsFeatureKey]: Sidebar; }\n","import {\n  ChangeDetectionStrategy,\n  Component,\n  computed,\n  inject,\n  input,\n  OnDestroy,\n  output,\n  viewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';\nimport {\n  ButtonComponent,\n  CarouselComponent,\n  CarouselSlideComponent,\n  DropdownContainerComponent,\n  ListComponent,\n  ListItemComponent,\n  NavbarDropdownItemComponent,\n  OptionComponent,\n  SelectComponent,\n  SwitchComponent,\n  ToastService,\n  TooltipDirective,\n} from '@open-rlb/ng-bootstrap';\nimport { Router, RouterModule } from '@angular/router';\nimport { AppInfo } from '../../../services/apps/app';\nimport { AppsService } from '../../../services/apps/apps.service';\nimport { LanguageService } from '../../../services/i18n/language.service';\nimport { isSettingsAppVisible } from '../../../services/apps/app-visibility';\nimport { PagesConfiguration, RLB_CFG_PAGES } from '../../../configuration';\nimport { AppContextActions } from '../../../store/app-context/app-context.actions';\nimport { appContextFeatureKey } from '../../../store/app-context/app-context.model';\nimport { AuthActions } from '../../../store/auth/auth.actions';\nimport { BaseState } from '../../../store/base-state';\nimport { Store } from '@ngrx/store';\nimport { NgClass, NgTemplateOutlet } from '@angular/common';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { FormsModule } from '@angular/forms';\n\n@Component({\n  selector: 'rlb-settings-dropdown-selector',\n  templateUrl: './settings-dropdown-selector.component.html',\n  styleUrl: './settings-dropdown-selector.component.scss',\n  imports: [\n    NavbarDropdownItemComponent,\n    DropdownContainerComponent,\n    CarouselComponent,\n    CarouselSlideComponent,\n    TooltipDirective,\n    ListComponent,\n    ListItemComponent,\n    SwitchComponent,\n    SelectComponent,\n    OptionComponent,\n    NgClass,\n    NgTemplateOutlet,\n    TranslateModule,\n    FormsModule,\n    RouterModule,\n    ButtonComponent,\n  ],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SettingsDropdownSelectorComponent implements OnDestroy {\n  mode = input<'desktop' | 'mobile'>('desktop');\n\n  apps = input.required<AppInfo[]>();\n  isAuthenticated = input.required<boolean | null>();\n  appSelected = output<AppInfo>();\n  activeSlide: number = 0;\n\n  // deps\n  private readonly pageOptions: PagesConfiguration | null = inject(RLB_CFG_PAGES, {\n    optional: true,\n  });\n  private readonly store: Store<BaseState> = inject(Store);\n  private readonly languageService: LanguageService = inject(LanguageService);\n  private readonly toastService: ToastService = inject(ToastService);\n  private readonly router: Router = inject(Router);\n  private readonly menu = viewChild<NavbarDropdownItemComponent>('menu');\n  private appsService: AppsService = inject(AppsService);\n\n  readonly pages = computed(() => this.pageOptions);\n\n  readonly languages = computed(() => {\n    return (\n      this.store.selectSignal(o => o[appContextFeatureKey].supportedLanguages)() as string[]\n    ).map((lang: string) => {\n      return {\n        value: lang,\n        label: this.languageService.getLanguageName(lang),\n      };\n    });\n  });\n\n  readonly currentLanguage = toSignal(\n    this.store.select(o => o[appContextFeatureKey].language),\n    { initialValue: 'en' },\n  );\n\n  readonly darkMode = computed(\n    () => this.store.selectSignal(o => o[appContextFeatureKey].theme)() === 'dark',\n  );\n\n  readonly currentAppId = computed(() => this.appsService.currentApp()?.id);\n\n  constructor() {\n    this.router.events.pipe(takeUntilDestroyed()).subscribe(() => this.close());\n  }\n\n  setCurrentLanguage(value: any) {\n    this.store.dispatch(AppContextActions.setLanguage({ language: value }));\n    this.toastService.openToast('toast-c-1', 'toast-component', {\n      title: this.languageService.translate('common.saved'),\n      content: this.languageService.translate('common.savedSuccessfully'),\n      type: 'success',\n      ok: this.languageService.translate('ok'),\n    });\n  }\n\n  setDarkMode(value: boolean) {\n    this.store.dispatch(AppContextActions.setTheme({ theme: value ? 'dark' : 'light' }));\n    this.toastService.openToast('toast-c-1', 'toast-component', {\n      title: this.languageService.translate('common.saved'),\n      content: this.languageService.translate('common.savedSuccessfully'),\n      type: 'success',\n      ok: this.languageService.translate('ok'),\n    });\n  }\n\n  selectApp(app: AppInfo): void {\n    this.appSelected.emit(app);\n  }\n\n  goToFirstSlide() {\n    this.activeSlide = 0;\n  }\n\n  goToInlineSettings() {\n    this.activeSlide = 1;\n  }\n\n  logout() {\n    this.store.dispatch(AuthActions.logout());\n  }\n\n  ngOnDestroy() {}\n\n  change(event: any) {\n    if (event === 'hidden') {\n      this.goToFirstSlide();\n    }\n  }\n\n  isAppSelected(appId: string | undefined): boolean {\n    return this.currentAppId() === appId;\n  }\n\n  /**\n   * Whether this app's settings entry is offered to the current visitor.\n   *\n   * An app declaring `settings.auth: false` is public and is listed without a session — it used to\n   * be hidden in exactly that case, which made the flag mean the opposite of its name.\n   */\n  isAppVisible(app: AppInfo): boolean {\n    return isSettingsAppVisible(app, this.isAuthenticated());\n  }\n\n  /**\n   * Whether a `pages.*` chrome entry is offered to the current visitor.\n   *\n   * Configured-or-not is the original condition; `action` is the ACL one, and omitting it keeps the\n   * entry public. The route carries the same action (`getDefaultRoutes`), but a guard alone would\n   * leave the button visible and bouncing.\n   */\n  isPageVisible(key: string): boolean {\n    const page = this.pages()?.[key];\n    if (!page?.path) return false;\n    if (!page.action) return true;\n    return this.appsService.checkPermissionAnywhere(page.action);\n  }\n\n  private close() {\n    this.menu()?.close();\n  }\n}\n","@if (mode() === 'desktop') {\n  <rlb-navbar-dropdown-item #menu dropdown auto-close=\"outside\" (status-changed)=\"change($event)\">\n    <span tooltip-placement=\"bottom\" [tooltip]=\"('core.settings.title') | translate\">\n        <i class=\"bi bi-gear fs-5\"></i>\n    </span>\n    <rlb-dropdown-container placement=\"right\">\n      <div style=\"width: 320px;\">\n        <ng-container *ngTemplateOutlet=\"settingsCarousel\"></ng-container>\n      </div>\n    </rlb-dropdown-container>\n  </rlb-navbar-dropdown-item>\n} @else {\n  <!-- Inline mode for Offcanvas -->\n  <ng-container *ngTemplateOutlet=\"settingsCarousel\"></ng-container>\n}\n\n<ng-template #settingsCarousel>\n  <rlb-carousel [hide-indicators]=\"true\" [hide-controls]=\"true\" autoplay=\"none\" [no-touch]=\"true\" [(current-slide)]=\"activeSlide\" class=\"w-100 d-block\">\n    <rlb-carousel-slide [active]=\"true\">\n      <div class=\"p-3\">\n        <h6 class=\"dropdown-header px-0 text-center mb-2 fw-bold text-dark\">\n          {{ 'core.settings.title' | translate }}\n        </h6>\n\n        <div class=\"row row-cols-3 g-2\">\n\n          @if (isAuthenticated()) {\n            <!-- General Settings -->\n            <div class=\"col\">\n              <button\n                rlb-button\n                outline\n                color=\"primary\"\n                (click)=\"goToInlineSettings()\"\n                class=\"w-100 h-100 d-flex flex-column align-items-center justify-content-center p-2 text-decoration-none\">\n                <i class=\"bi bi-person fs-4 mb-1\"></i>\n                <span class=\"small text-truncate w-100\">{{ 'core.account.settings.title' | translate }}</span>\n              </button>\n            </div>\n          }\n\n          <!-- Dynamic App Settings -->\n          @for (app of apps(); track app.id) {\n            <!-- `app.settings &&` is redundant against isAppVisible(), but it is what narrows the\n                 optional `settings` for the bindings below under strictTemplates. -->\n            @if (app.settings && isAppVisible(app)) {\n              <div class=\"col\">\n                <button\n                  rlb-button\n                  outline\n                  color=\"primary\"\n                  (click)=\"selectApp(app)\"\n                  [class.active]=\"isAppSelected(app.id)\"\n                  class=\"w-100 h-100 d-flex flex-column align-items-center justify-content-center p-2 text-decoration-none\">\n                  <i [ngClass]=\"['bi', 'fs-4', 'mb-1', app.settings.icon || 'bi-gear']\"></i>\n                  <span class=\"small text-truncate w-100\" [title]=\"app.data.friendlyName ? app.data.friendlyName : app.settings.title | translate\">\n                    {{ app.data.friendlyName ? app.data.friendlyName : app.settings.title | translate }}\n                </span>\n                </button>\n              </div>\n            }\n          }\n\n          <!-- System / Status -->\n          @if (isPageVisible('status')) {\n            <div class=\"col\">\n              <button rlb-button outline color=\"primary\" routerLink=\"/status\" routerLinkActive=\"active\" class=\"w-100 h-100 d-flex flex-column align-items-center justify-content-center p-2 text-decoration-none\">\n                <i class=\"bi bi-check2-circle fs-4 mb-1\"></i>\n                <span class=\"small text-truncate w-100\">{{ 'core.settings.status' | translate }}</span>\n              </button>\n            </div>\n          }\n\n          <!-- Logger -->\n          @if (isPageVisible('logger')) {\n            <div class=\"col\">\n              <button\n                rlb-button\n                outline\n                color=\"primary\"\n                routerLink=\"/logger\"\n                routerLinkActive=\"active\"\n                class=\"w-100 h-100 d-flex flex-column align-items-center justify-content-center p-2 text-decoration-none\">\n                <i class=\"bi bi-file-text fs-4 mb-1\"></i>\n                <span class=\"small text-truncate w-100\">\n                {{ 'core.settings.logger' | translate }}\n              </span>\n              </button>\n            </div>\n          }\n\n          <!-- Privacy -->\n          @if (isPageVisible('privacy')) {\n            <div class=\"col\">\n              <button\n                rlb-button\n                outline\n                color=\"primary\"\n                routerLink=\"/privacy\"\n                routerLinkActive=\"active\"\n                class=\"w-100 h-100 d-flex flex-column align-items-center justify-content-center p-2 text-decoration-none\">\n                <i class=\"bi bi-shield-check fs-4 mb-1\"></i>\n                <span class=\"small text-truncate w-100\">\n                  {{ 'core.settings.privacy' | translate }}\n                </span>\n              </button>\n            </div>\n          }\n\n          <!-- Cookies -->\n          @if (isPageVisible('cookies')) {\n            <div class=\"col\">\n              <button\n                rlb-button\n                outline\n                color=\"primary\"\n                routerLink=\"/cookies\"\n                routerLinkActive=\"active\"\n                class=\"w-100 h-100 d-flex flex-column align-items-center justify-content-center p-2 text-decoration-none\">\n                <i class=\"bi bi-cookie fs-4 mb-1\"></i>\n                <span class=\"small text-truncate w-100\">\n                {{ 'core.settings.cookies' | translate }}\n              </span>\n              </button>\n            </div>\n          }\n\n          <!-- Terms -->\n          @if (isPageVisible('terms')) {\n            <div class=\"col\">\n              <button\n                rlb-button\n                outline\n                color=\"primary\"\n                routerLink=\"/terms\"\n                routerLinkActive=\"active\"\n                class=\"w-100 h-100 d-flex flex-column align-items-center justify-content-center p-2 text-decoration-none\">\n                <i class=\"bi bi-vector-pen fs-4 mb-1\"></i>\n                <span class=\"small text-truncate w-100\">\n                {{ 'core.settings.legal' | translate }}\n              </span>\n              </button>\n            </div>\n          }\n\n          <!-- Support -->\n          @if (isPageVisible('support')) {\n            <div class=\"col\">\n              <button\n                rlb-button\n                outline\n                color=\"primary\"\n                routerLink=\"/support\"\n                routerLinkActive=\"active\"\n                class=\"w-100 h-100 d-flex flex-column align-items-center justify-content-center p-2 text-decoration-none\">\n                <i class=\"bi bi-chat-quote fs-4 mb-1\"></i>\n                <span class=\"small text-truncate w-100\">\n                {{ 'core.settings.support' | translate }}\n              </span>\n              </button>\n            </div>\n          }\n\n        </div>\n      </div>\n    </rlb-carousel-slide>\n\n    <rlb-carousel-slide>\n      <div class=\"p-3\">\n\n        <!-- Header -->\n        <div class=\"d-flex align-items-center mb-3\">\n          <button class=\"btn btn-sm btn-link text-reset p-0 me-2 border-0 text-decoration-none\" (click)=\"goToFirstSlide()\">\n            <i class=\"bi bi-arrow-left fs-5\"></i>\n          </button>\n          <h6 class=\"mb-0 fw-bold\">{{ 'core.account.settings.title' | translate }}</h6>\n        </div>\n\n        <rlb-list class=\"settings\">\n\n          <!-- Theme Settings -->\n          <rlb-list-item class=\"settings-item\">\n            <div class=\"d-flex justify-content-between align-items-center\">\n              <div class=\"settings-text\">\n                <span class=\"fw-semibold\">{{ 'core.settings.generalTheme' | translate}}</span>\n              </div>\n              <div class=\"settings-control\">\n                <rlb-switch size=\"small\" [ngModel]=\"darkMode()\" (ngModelChange)=\"setDarkMode($event)\" />\n              </div>\n            </div>\n          </rlb-list-item>\n\n          <!-- Language Settings -->\n          <rlb-list-item class=\"settings-item\">\n            <div class=\"d-flex justify-content-between align-items-center\">\n              <div class=\"settings-text\">\n                <span class=\"fw-semibold\">{{ 'core.settings.generalLanguage' | translate}}</span>\n              </div>\n              <div class=\"settings-control\">\n                <rlb-select size=\"small\" [ngModel]=\"currentLanguage()\" (ngModelChange)=\"setCurrentLanguage($event)\">\n                  @for (l of languages(); track l.value) {\n                    <rlb-option [value]=\"l.value\">{{l.label}}</rlb-option>\n                  }\n                </rlb-select>\n              </div>\n            </div>\n          </rlb-list-item>\n\n          <!-- Show More -->\n          <rlb-list-item action class=\"settings-item\" routerLink=\"/profile\" style=\"cursor: pointer;\">\n            <div class=\"d-flex justify-content-between align-items-center\">\n              <div class=\"settings-text\">\n                <span class=\"fw-semibold\">{{ 'core.account.settings.showMore' | translate }}</span>\n              </div>\n              <div class=\"settings-control text-primary\">\n                <i class=\"bi bi-arrow-up-right-square fs-5\"></i>\n              </div>\n            </div>\n          </rlb-list-item>\n\n          <!-- Logout -->\n          <rlb-list-item action (click)=\"logout()\" class=\"settings-item\" style=\"cursor: pointer;\">\n            <div class=\"d-flex justify-content-between align-items-center text-danger\">\n              <div class=\"settings-text\">\n                <span class=\"fw-semibold\">{{ 'core.account.logout' | translate }}</span>\n              </div>\n              <div class=\"settings-control\">\n                <i class=\"bi bi-box-arrow-left fs-5\"></i>\n              </div>\n            </div>\n          </rlb-list-item>\n\n        </rlb-list>\n      </div>\n    </rlb-carousel-slide>\n  </rlb-carousel>\n</ng-template>\n","import { inject, Pipe, PipeTransform, Type } from \"@angular/core\";\nimport { RLB_APP_NAVCOMP } from \"../../configuration\";\n\n\n@Pipe({\n    name: 'leftComponent'\n})\nexport class LeftComponentPipe implements PipeTransform {\n  private config = inject(RLB_APP_NAVCOMP);\n\n  transform(value: string): Type<any> {\n    const t = this.config.left.find(c => c.name === value)?.component;\n    if (!t) {\n      throw new Error(`No component found for name ${value}`);\n    }\n    return t;\n  }\n}","import { inject, Pipe, PipeTransform, Type } from \"@angular/core\";\nimport { RLB_APP_NAVCOMP } from \"../../configuration\";\n\n@Pipe({\n    name: 'rightComponent'\n})\nexport class RightComponentPipe implements PipeTransform {\n  private config = inject(RLB_APP_NAVCOMP);\n\n  transform(value: string): Type<any> {\n    const t = this.config.right.find(c => c.name === value)?.component;\n    if (!t) {\n      throw new Error(`No component found for name ${value}`);\n    }\n    return t;\n  }\n}","import { inject, Pipe, PipeTransform, Type } from '@angular/core';\nimport { RLB_APP_NAVCOMP } from '../../configuration';\n\n@Pipe({\n  name: 'mobileComponent',\n})\nexport class MobileComponentPipe implements PipeTransform {\n  private config = inject(RLB_APP_NAVCOMP);\n\n  transform(value: string): Type<any> {\n    const slot = this.config.mobile ?? this.config.right;\n    const t = slot.find(c => c.name === value)?.component;\n    if (!t) {\n      throw new Error(`No component found for name ${value}`);\n    }\n    return t;\n  }\n}\n","import { inject, Pipe, PipeTransform, Type } from \"@angular/core\";\nimport { RLB_APP_SIDEBARCOMP } from \"../../configuration\";\n\n@Pipe({\n    name: 'sidebarFooterComponent'\n})\nexport class SidebarFooterComponentPipe implements PipeTransform {\n  private config = inject(RLB_APP_SIDEBARCOMP);\n\n  transform(value: string): Type<any> {\n    const t = this.config.footer.find(c => c.name === value)?.component;\n    if (!t) {\n      throw new Error(`No component found for name ${value}`);\n    }\n    return t;\n  }\n}\n","import {\n  booleanAttribute,\n  Directive,\n  effect,\n  inject,\n  input,\n  TemplateRef,\n  ViewContainerRef,\n} from '@angular/core';\nimport { AppsService } from '../../services/apps/apps.service';\nimport { AclAction, normalizeAclActions } from '../../store/acl/acl.model';\n\n/**\n * Renders its content only for a user holding the given ACL action in the current app.\n *\n * ```html\n * <button *roles=\"'sysadmin'\">…</button>                              <!-- one action -->\n * <button *roles=\"[ACL.manager, ACL.director]\">…</button>             <!-- any of them -->\n * <span   *roles=\"'x'; not: true\">…</span>                            <!-- only without it -->\n * <button *roles=\"'x'; else hint\">…</button><ng-template #hint>…</ng-template>\n * ```\n *\n * No action — `undefined`, `''` or `[]` — is public. An empty array in particular must not read as\n * \"deny\", or a consumer computing the list dynamically gets a blank UI the first time it comes back\n * empty. `not: true` inverts that decision like any other, so `*roles=\"[]; not: true\"` renders\n * nothing.\n */\n@Directive({\n  selector: '[roles]',\n})\nexport class RlbRole {\n  private appsService = inject(AppsService);\n  private templateRef = inject(TemplateRef<any>);\n  private viewContainer = inject(ViewContainerRef);\n\n  /** The action, or the list the user only has to hold one of. */\n  action = input<AclAction | undefined>(undefined, { alias: 'roles' });\n\n  /** Render when the user *lacks* the action instead — an upsell or a read-only hint. */\n  not = input(false, { alias: 'rolesNot', transform: booleanAttribute });\n\n  /** Rendered instead when the check fails, mirroring `*ngIf`'s `; else`. */\n  elseTemplate = input<TemplateRef<any> | null>(null, { alias: 'rolesElse' });\n\n  /**\n   * Which template is on screen right now.\n   *\n   * The effect below re-runs on every ACL or input change, most of which do not change the\n   * outcome. Clearing and recreating unconditionally would remount the subtree each time and drop\n   * whatever state lives inside it, so the view is only touched when the target actually changes.\n   */\n  private rendered: TemplateRef<any> | null = null;\n\n  constructor() {\n    // Effect automatically re-runs if store.resources or inputs change\n    effect(() => {\n      const target = this.granted() ? this.templateRef : this.elseTemplate();\n      if (target === this.rendered) return;\n\n      this.viewContainer.clear();\n      this.rendered = target;\n      if (target) {\n        this.viewContainer.createEmbeddedView(target);\n      }\n    });\n  }\n\n  private granted(): boolean {\n    const actions = normalizeAclActions(this.action());\n    // If no action is provided, it's a public element -> Grant access automatically\n    const hasPerm =\n      actions.length === 0 ? true : this.appsService.checkPermissionInCurrentApp(actions);\n    return this.not() ? !hasPerm : hasPerm;\n  }\n}\n","import { ChangeDetectionStrategy, Component, computed, inject, input, output } from '@angular/core';\nimport { AppInfo } from '../../../services/apps/app';\nimport { AppsService } from '../../../services/apps/apps.service';\n\nimport {\n  ButtonComponent,\n  DropdownContainerComponent,\n  NavbarDropdownItemComponent,\n  TooltipDirective,\n} from '@open-rlb/ng-bootstrap';\nimport { NgClass, NgTemplateOutlet } from '@angular/common';\nimport { TranslateModule } from '@ngx-translate/core';\n\n@Component({\n  selector: 'rlb-app-dropdown-selector',\n  templateUrl: './app-dropdown-selector.component.html',\n  styleUrls: ['./app-dropdown-selector.component.scss'],\n  imports: [\n    NavbarDropdownItemComponent,\n    DropdownContainerComponent,\n    ButtonComponent,\n    TooltipDirective,\n    NgClass,\n    NgTemplateOutlet,\n    TranslateModule,\n  ],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AppDropdownSelectorComponent {\n  mode = input<'desktop' | 'mobile'>('desktop');\n  apps = input.required<AppInfo[]>();\n  isAuthenticated = input.required<boolean | null>();\n\n  appSelected = output<AppInfo>();\n\n  private appsService: AppsService = inject(AppsService);\n\n  readonly currentAppId = computed(() => this.appsService.currentApp()?.id);\n\n  selectApp(app: AppInfo): void {\n    this.appSelected.emit(app);\n  }\n\n  isAppSelected(appId: string | undefined): boolean {\n    return this.currentAppId() === appId;\n  }\n}\n","@if (mode() === 'desktop') {\n  <rlb-navbar-dropdown-item dropdown>\n    <span tooltip-placement=\"bottom\" [tooltip]=\"('core.apps.button') | translate\">\n      <i class=\"bi bi-grid-3x3-gap-fill fs-5\"></i>\n    </span>\n    <rlb-dropdown-container placement=\"right\">\n\n      <div style=\"width: 320px;\">\n        <ng-container *ngTemplateOutlet=\"appGrid\"></ng-container>\n      </div>\n\n    </rlb-dropdown-container>\n  </rlb-navbar-dropdown-item>\n} @else {\n  <ng-container *ngTemplateOutlet=\"appGrid\"></ng-container>\n}\n\n<ng-template #appGrid>\n  <div class=\"row row-cols-3 g-2 p-3\">\n    @for (app of apps(); track app.id) {\n      @if (app.core) {\n        <div class=\"col\">\n          <button\n            rlb-button\n            outline\n            class=\"w-100 h-100 d-flex flex-column align-items-center justify-content-center p-2 text-center\"\n            [class.active]=\"isAppSelected(app.id)\"\n            [disabled]=\"!app.enabled && (app.core.auth && !(isAuthenticated()))\"\n            (click)=\"selectApp(app)\"\n          >\n            <i [ngClass]=\"['fs-3', 'mb-1', app.core.icon || 'bi bi-app']\"></i>\n            <span class=\"small text-truncate w-100\" [title]=\"app?.data?.friendlyName ? app.data.friendlyName : app.core.title | translate\">\n              {{ app?.data?.friendlyName ? app.data.friendlyName : app.core.title | translate }}\n            </span>\n          </button>\n        </div>\n      }\n    }\n  </div>\n</ng-template>\n","import {\n  ChangeDetectionStrategy,\n  Component,\n  computed,\n  inject,\n  Injector,\n  input,\n  viewChild,\n} from '@angular/core';\nimport { Store } from '@ngrx/store';\nimport {\n  BreadcrumbItem,\n  ButtonComponent,\n  InputComponent,\n  InputGroupComponent,\n  NavbarBrandDirective,\n  NavbarComponent,\n  NavbarFormComponent,\n  NavbarItemComponent,\n  NavbarItemsComponent,\n  NavbarSeparatorComponent,\n  OffcanvasBodyComponent,\n  OffcanvasComponent,\n  OffcanvasHeaderComponent,\n  RlbFabComponent,\n  SidebarComponent,\n  SidebarItemComponent,\n  SidebarNavigableItem,\n  ToggleDirective,\n  TooltipDirective,\n  VisibilityEvent,\n} from '@open-rlb/ng-bootstrap';\nimport { filter } from 'rxjs';\nimport { RLB_CFG_ENV, RLB_NAV_SURFACE } from '../../configuration';\nimport { AppInfo } from '../../services/apps/app';\nimport { AppsService } from '../../services/apps/apps.service';\nimport { hasPublicSettingsApps } from '../../services/apps/app-visibility';\nimport { appContextFeatureKey } from '../../store/app-context/app-context.model';\nimport { AuthActions } from '../../store/auth/auth.actions';\nimport { BaseState } from '../../store/base-state';\nimport { NavbarActions } from '../../store/navbar/navbar.actions';\nimport { SidebarActions } from '../../store/sidebar/sidebar.actions';\nimport { navbarsFeatureKey } from '../../store/navbar/navbar.model';\nimport { sidebarsFeatureKey } from '../../store/sidebar/sidebar.model';\nimport { AuthenticationService } from '../../auth/services/auth.service';\nimport { NavigationEnd, Router, RouterModule } from '@angular/router';\nimport { SettingsDropdownSelectorComponent } from '../../pages/settings/settings-dropdown-selector/settings-dropdown-selector.component';\nimport { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';\nimport { CommonModule, NgComponentOutlet } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { LeftComponentPipe } from '../../pipes/left-component/left-component.pipe';\nimport { RightComponentPipe } from '../../pipes/right-component/right-component.pipe';\nimport { MobileComponentPipe } from '../../pipes/mobile-component/mobile-component.pipe';\nimport { SidebarFooterComponentPipe } from '../../pipes/sidebar-footer-component/sidebar-footer-component.pipe';\nimport { RlbRole } from '../../auth/directives/role.directive';\nimport { AppDropdownSelectorComponent } from '../../pages/apps/app-dropdown-selector/app-dropdown-selector.component';\n\n@Component({\n  selector: 'rlb-app-template',\n  templateUrl: './app.component.html',\n  styleUrl: './app.component.scss',\n  imports: [\n    CommonModule,\n    FormsModule,\n    RouterModule,\n    TranslateModule,\n    NgComponentOutlet,\n    NavbarComponent,\n    NavbarBrandDirective,\n    NavbarFormComponent,\n    NavbarItemsComponent,\n    NavbarItemComponent,\n    NavbarSeparatorComponent,\n    SidebarComponent,\n    SidebarItemComponent,\n    OffcanvasComponent,\n    OffcanvasHeaderComponent,\n    OffcanvasBodyComponent,\n    RlbFabComponent,\n    InputGroupComponent,\n    InputComponent,\n    TooltipDirective,\n    LeftComponentPipe,\n    MobileComponentPipe,\n    RightComponentPipe,\n    SidebarFooterComponentPipe,\n    RlbRole,\n    AppDropdownSelectorComponent,\n    SettingsDropdownSelectorComponent,\n    ButtonComponent,\n    ToggleDirective,\n  ],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AppTemplateComponent {\n  protected readonly Array = Array;\n  public navSearchText: string | null = null;\n\n  readonly modalContainerId = input.required<string>({ alias: 'modal-container-id' });\n  readonly breadcrumbInput = input<BreadcrumbItem[] | undefined>(undefined, {\n    alias: 'breadcrumb',\n  });\n  readonly breadcrumb = computed(() => this.breadcrumbInput() ?? []);\n  readonly toastContainerIds = input.required<string | string[]>({ alias: 'toast-container-ids' });\n\n  readonly mobileOffcanvas = viewChild<OffcanvasComponent>('mobileOffcanvas');\n  readonly mobileSettingsMenu = viewChild<SettingsDropdownSelectorComponent>('mobileSettingsMenu');\n\n  public readonly env = inject(RLB_CFG_ENV);\n  public readonly store = inject(Store<BaseState>);\n  public readonly appsService = inject(AppsService);\n  private readonly authService = inject(AuthenticationService);\n  private readonly router = inject(Router);\n  private readonly injector = inject(Injector);\n\n  // Lets one custom component serve both chrome surfaces: it injects RLB_NAV_SURFACE\n  // (optional) and lays itself out accordingly.\n  readonly navbarSurfaceInjector = Injector.create({\n    providers: [{ provide: RLB_NAV_SURFACE, useValue: 'navbar' }],\n    parent: this.injector,\n  });\n  readonly mobileSurfaceInjector = Injector.create({\n    providers: [{ provide: RLB_NAV_SURFACE, useValue: 'mobile-menu' }],\n    parent: this.injector,\n  });\n\n  readonly sidebarVisible = this.store.selectSignal(\n    (state: BaseState) => state[sidebarsFeatureKey].visible,\n  );\n  readonly sidearHasLogin = this.store.selectSignal(\n    (state: BaseState) => state[sidebarsFeatureKey].loginVisible,\n  );\n  readonly sidearHasSearch = this.store.selectSignal(\n    (state: BaseState) => state[sidebarsFeatureKey].searchVisible,\n  );\n  readonly sidebarItems = this.store.selectSignal(\n    (state: BaseState) => state[sidebarsFeatureKey].items,\n  );\n  readonly sidebarFooter = this.store.selectSignal(\n    (state: BaseState) => state[sidebarsFeatureKey].footerComponent,\n  );\n  readonly sidearHasSettings = this.store.selectSignal(\n    (state: BaseState) => state[sidebarsFeatureKey].settingsVisible,\n  );\n  readonly sidearAppsVisible = this.store.selectSignal(\n    (state: BaseState) => state[sidebarsFeatureKey].appsVisible,\n  );\n\n  readonly navVisible = this.store.selectSignal(\n    (state: BaseState) => state[navbarsFeatureKey].visible,\n  );\n  readonly navSearchVisible = this.store.selectSignal(\n    (state: BaseState) => state[navbarsFeatureKey].searchVisible,\n  );\n  readonly navHeader = this.store.selectSignal(\n    (state: BaseState) => state[navbarsFeatureKey].header,\n  );\n  readonly navLeftItems = this.store.selectSignal(\n    (state: BaseState) => state[navbarsFeatureKey].leftItems,\n  );\n  readonly navRightItems = this.store.selectSignal(\n    (state: BaseState) => state[navbarsFeatureKey].rightItems,\n  );\n  readonly navMobileItems = this.store.selectSignal(\n    (state: BaseState) => state[navbarsFeatureKey].mobileItems,\n  );\n  readonly navbarHasLogin = this.store.selectSignal(\n    (state: BaseState) => state[navbarsFeatureKey].loginVisible,\n  );\n  readonly navbarHasSettings = this.store.selectSignal(\n    (state: BaseState) => state[navbarsFeatureKey].settingsVisible,\n  );\n  readonly navbarHasApps = this.store.selectSignal(state => state[navbarsFeatureKey].appsVisible);\n  readonly navbarLayout = this.store.selectSignal(state => state[navbarsFeatureKey].actionsLayout);\n  readonly separatorVisible = this.store.selectSignal(\n    state => state[navbarsFeatureKey].separatorVisible,\n  );\n\n  readonly isAuthenticated = toSignal(this.authService.isAuthenticated$, { initialValue: false });\n  readonly userInfo = toSignal(this.authService.userInfo$, { initialValue: null });\n\n  readonly theme = this.store.selectSignal(state => state[appContextFeatureKey].theme);\n  readonly apps = computed(() =>\n    this.appsService.apps().filter((app: AppInfo) => app.enabled && app.id),\n  );\n\n  /**\n   * Whether any registered app exposes settings that need no session.\n   *\n   * The chrome below is otherwise authenticated-only by design. This keeps the anonymous case\n   * additive: with no public settings app — every consumer whose apps all declare `auth: true` —\n   * this is false and the gates reduce to `isAuthenticated()`, exactly as before.\n   */\n  readonly hasPublicSettings = computed(() => hasPublicSettingsApps(this.apps()));\n\n  /** Mirrors the mobile offcanvas body: false means the panel would render empty. */\n  readonly mobileMenuHasContent = computed(\n    () =>\n      this.navMobileItems().length > 0 ||\n      (this.navbarHasApps() && this.apps().length > 1) ||\n      this.navbarHasSettings(),\n  );\n\n  constructor() {\n    this.router.events\n      .pipe(\n        filter((event: any) => event instanceof NavigationEnd),\n        takeUntilDestroyed(),\n      )\n      .subscribe(() => {\n        this.closeMobileMenu();\n      });\n  }\n\n  loginNav(event: MouseEvent) {\n    event?.preventDefault();\n    event?.stopPropagation();\n    this.store.dispatch(AuthActions.login());\n  }\n\n  onSideBarItemClick(item: SidebarNavigableItem) {\n    if (item.externalUrl) {\n      window.open(item.externalUrl, '_blank')?.focus();\n    }\n  }\n\n  selectApp(app: AppInfo, viewMode: 'app' | 'settings') {\n    this.appsService.selectApp(app, viewMode);\n    this.closeMobileMenu();\n  }\n\n  onMobileMenuStatusChange(event: VisibilityEvent) {\n    if (event === 'hidden') {\n      this.mobileSettingsMenu()?.goToFirstSlide();\n    }\n  }\n\n  setSidearSearchText(text: string | null) {\n    this.store.dispatch(SidebarActions.setSearchText({ text }));\n  }\n\n  setNavbarSearchText(text: string | null) {\n    this.store.dispatch(NavbarActions.setSearchText({ text }));\n  }\n\n  private closeMobileMenu() {\n    this.mobileOffcanvas()?.close();\n  }\n}\n","<div class=\"rlb-app\">\n  @if (navVisible()) {\n    <rlb-navbar\n      [dark]=\"theme() === 'dark'\"\n      [showSideBarToggler]=\"sidebarVisible()\"\n      expand=\"lg\"\n      class=\"border-bottom py-1 rlb-navbar\"\n    >\n      @if (navHeader(); as header) {\n        <a\n          rlb-navbar-brand\n          href=\"#\"\n        >\n          @if (header.type === 'text') {\n            {{ header.text }}\n          }\n\n          @if (header.type === 'image') {\n            <img\n              [src]=\"header.src\"\n              [alt]=\"header.alt ?? 'Brand'\"\n              [height]=\"header.height ?? 40\"\n            />\n          }\n        </a>\n      }\n      @if (navSearchVisible()) {\n        <rlb-navbar-form>\n          <rlb-input-group\n            class=\"my-1 mx-3\"\n            validate\n          >\n            <rlb-input\n              type=\"search\"\n              class=\"search-input\"\n              placeholder=\"Search\"\n              [(ngModel)]=\"navSearchText\"\n              (keyup.enter)=\"setNavbarSearchText(navSearchText)\"\n              name=\"search\"\n              size=\"small\"\n            >\n              <button\n                after\n                rlb-button\n                outline\n                type=\"submit\"\n                (click)=\"setNavbarSearchText(navSearchText)\"\n                size=\"sm\"\n              >\n                <i class=\"bi bi-search\"></i>\n              </button>\n            </rlb-input>\n          </rlb-input-group>\n        </rlb-navbar-form>\n      }\n\n      <!-- MOBILE VIEWS -->\n      <div\n        rlb-custom-navbar-items\n        class=\"d-flex d-lg-none\"\n      >\n        <!-- Anonymous visitors get the menu too when an app publishes settings that need no\n             session; otherwise this stays authenticated-only, as before. -->\n        @if (isAuthenticated() || hasPublicSettings()) {\n          <!-- No toggler when the panel would render empty -->\n          @if (mobileMenuHasContent()) {\n            <rlb-fab\n              size=\"sm\"\n              outline\n              toggle=\"offcanvas\"\n              toggle-target=\"mobileMenuOffcanvas\"\n            >\n              <i class=\"bi bi-three-dots-vertical\"></i>\n            </rlb-fab>\n\n            <rlb-offcanvas\n              #mobileOffcanvas\n              id=\"mobileMenuOffcanvas\"\n              [placement]=\"'end'\"\n              (statusChange)=\"onMobileMenuStatusChange($event)\"\n            >\n              <rlb-offcanvas-header class=\"border-bottom\">\n                <h5\n                  rlb-offcanvas-title\n                  class=\"fw-bold mb-0\"\n                >\n                  Menu\n                </h5>\n              </rlb-offcanvas-header>\n\n              <rlb-offcanvas-body class=\"p-0 overflow-x-hidden\">\n                <!-- App-provided mobile chrome (RLB_APP_NAVCOMP `mobile` slot) -->\n                @for (navComponent of navMobileItems(); track navComponent) {\n                  <ng-container\n                    *ngComponentOutlet=\"\n                      navComponent | mobileComponent;\n                      injector: mobileSurfaceInjector\n                    \"\n                  />\n                }\n\n                <!-- Mobile Apps Grid -->\n                @if (navbarHasApps() && apps().length > 1) {\n                  <div class=\"border-bottom pb-2\">\n                    <rlb-app-dropdown-selector\n                      mode=\"mobile\"\n                      [apps]=\"apps()\"\n                      [isAuthenticated]=\"isAuthenticated()\"\n                      (appSelected)=\"selectApp($event, 'app')\"\n                    />\n                  </div>\n                }\n\n                <!-- Mobile Settings Carousel -->\n                @if (navbarHasSettings()) {\n                  <div class=\"pt-2\">\n                    <rlb-settings-dropdown-selector\n                      mode=\"mobile\"\n                      #mobileSettingsMenu\n                      [apps]=\"apps()\"\n                      [isAuthenticated]=\"isAuthenticated()\"\n                      (appSelected)=\"selectApp($event, 'settings')\"\n                    />\n                  </div>\n                }\n              </rlb-offcanvas-body>\n            </rlb-offcanvas>\n          }\n        } @else {\n          <rlb-fab\n            size=\"sm\"\n            (click)=\"loginNav($event)\"\n            [tooltip]=\"'core.account.login' | translate\"\n          >\n            <i class=\"bi bi-box-arrow-in-left\"></i>\n          </rlb-fab>\n        }\n      </div>\n\n      <rlb-navbar-items>\n        @for (navComponent of navLeftItems(); track navComponent) {\n          <ng-container ngProjectAs=\"rlb-navbar-item\">\n            <ng-container\n              *ngComponentOutlet=\"navComponent | leftComponent; injector: navbarSurfaceInjector\"\n            ></ng-container>\n          </ng-container>\n        }\n      </rlb-navbar-items>\n\n      <rlb-navbar-items class=\"ms-auto align-items-center\">\n        @for (navComponent of navRightItems(); track navComponent) {\n          <ng-container ngProjectAs=\"rlb-navbar-item\">\n            <ng-container\n              *ngComponentOutlet=\"navComponent | rightComponent; injector: navbarSurfaceInjector\"\n            ></ng-container>\n          </ng-container>\n        }\n        @if (separatorVisible() && isAuthenticated()) {\n          <rlb-navbar-separator />\n        }\n\n        <ng-container ngProjectAs=\"rlb-navbar-item\">\n          @if (navbarLayout() == 'default') {\n            @if (navbarHasLogin() && !isAuthenticated()) {\n              <rlb-navbar-item (click)=\"loginNav($event)\">\n                <span\n                  tooltip-placement=\"bottom\"\n                  [tooltip]=\"'core.account.login' | translate\"\n                >\n                  <i class=\"bi bi-box-arrow-in-left\"></i>\n                </span>\n                <span class=\"ms-1 d-lg-none\">{{ 'core.account.login' | translate }}</span>\n              </rlb-navbar-item>\n            }\n\n            @if (navbarHasLogin() && isAuthenticated()) {\n              <rlb-navbar-item [router-link]=\"'/profile'\">\n                <span\n                  tooltip-placement=\"bottom\"\n                  [tooltip]=\"'core.account.title' | translate\"\n                >\n                  <i class=\"bi bi-person\"></i>\n                </span>\n                <span class=\"ms-1 d-lg-none\">{{ 'core.account.title' | translate }}</span>\n              </rlb-navbar-item>\n            }\n\n            @if (navbarHasSettings()) {\n              <rlb-navbar-item [router-link]=\"'/settings'\">\n                <span\n                  tooltip-placement=\"bottom\"\n                  [tooltip]=\"'core.settings.title' | translate\"\n                >\n                  <i class=\"bi bi-gear\"></i>\n                </span>\n                <span class=\"ms-1 d-lg-none\">{{ 'core.settings.title' | translate }}</span>\n              </rlb-navbar-item>\n            }\n\n            @if (navbarHasApps() && apps().length > 1) {\n              <rlb-navbar-item [router-link]=\"'/apps'\">\n                <span\n                  tooltip-placement=\"bottom\"\n                  [tooltip]=\"'core.apps.button' | translate\"\n                >\n                  <i class=\"bi bi-grid-3x3-gap-fill\"></i>\n                </span>\n                <span class=\"ms-1 d-lg-none\">{{ 'core.apps.button' | translate }}</span>\n              </rlb-navbar-item>\n            }\n          } @else if (navbarLayout() == 'dropdown') {\n            <!-- MODERN DROPDOWN MODE -->\n\n            <!--Unauthenticated Login -->\n            @if (navbarHasLogin() && !isAuthenticated()) {\n              <rlb-navbar-item (click)=\"loginNav($event)\">\n                <span\n                  tooltip-placement=\"bottom\"\n                  [tooltip]=\"'core.account.login' | translate\"\n                >\n                  <i class=\"bi bi-box-arrow-in-left fs-5\"></i>\n                </span>\n                <span class=\"ms-1 d-lg-none\">{{ 'core.account.login' | translate }}</span>\n              </rlb-navbar-item>\n            }\n\n            <!-- Profile & Settings Account Card. Also open to anonymous visitors when an app\n                 publishes settings that need no session — see hasPublicSettings(). -->\n            @if (navbarHasSettings() && (isAuthenticated() || hasPublicSettings())) {\n              <rlb-settings-dropdown-selector\n                [apps]=\"apps()\"\n                [isAuthenticated]=\"isAuthenticated()\"\n                (appSelected)=\"selectApp($event, 'settings')\"\n              />\n            }\n\n            <!-- Apps Launcher -->\n            @if (navbarHasApps() && isAuthenticated() && apps().length > 1) {\n              <rlb-app-dropdown-selector\n                [apps]=\"apps()\"\n                [isAuthenticated]=\"isAuthenticated()\"\n                (appSelected)=\"selectApp($event, 'app')\"\n              />\n            }\n          }\n        </ng-container>\n      </rlb-navbar-items>\n    </rlb-navbar>\n  }\n  <div class=\"rlb-main-wrapper\">\n    @if (sidebarVisible()) {\n      <rlb-sidebar\n        [dark]=\"theme() === 'dark'\"\n        id=\"sidebar\"\n        class=\"rlb-sidebar\"\n      >\n        @for (item of sidebarItems(); track $index) {\n          <rlb-sidebar-item\n            *roles=\"item.action\"\n            [icon]=\"item.icon\"\n            [link]=\"item.url\"\n            [title]=\"item.title\"\n            [label]=\"item.label\"\n            [badgeCounter]=\"item.badgeCounter\"\n            (click)=\"onSideBarItemClick(item)\"\n          >\n            {{ item.label }}\n            @for (subitem of item.items || []; track $index) {\n              <rlb-sidebar-item\n                *roles=\"subitem.action\"\n                [icon]=\"subitem.icon\"\n                [link]=\"subitem.url\"\n                [title]=\"subitem.title\"\n                [label]=\"subitem.label\"\n                [badgeCounter]=\"subitem.badgeCounter\"\n                (click)=\"onSideBarItemClick(subitem)\"\n              >\n                {{ subitem.label }}\n                @for (leaf of subitem.items || []; track $index) {\n                  <rlb-sidebar-item\n                    *roles=\"leaf.action\"\n                    [icon]=\"leaf.icon\"\n                    [link]=\"leaf.url\"\n                    [title]=\"leaf.title\"\n                    [label]=\"leaf.label\"\n                    [badgeCounter]=\"leaf.badgeCounter\"\n                    (click)=\"onSideBarItemClick(leaf)\"\n                  >\n                    {{ leaf.label }}\n                  </rlb-sidebar-item>\n                }\n              </rlb-sidebar-item>\n            }\n          </rlb-sidebar-item>\n        }\n        @if (sidebarFooter(); as footerName) {\n          <div\n            rlb-sidebar-footer\n            class=\"mt-auto\"\n          >\n            <ng-container *ngComponentOutlet=\"footerName | sidebarFooterComponent\"></ng-container>\n          </div>\n        }\n      </rlb-sidebar>\n    }\n    <div class=\"rlb-content\">\n      <ng-content></ng-content>\n    </div>\n  </div>\n</div>\n\n<!--@if (modalContainerId()) {-->\n<!--  <rlb-modal-container [id]=\"modalContainerId()\" />-->\n<!--}-->\n\n<!--@if (toastContainerIds()) {-->\n<!--  @if (Array.isArray(toastContainerIds())) {-->\n<!--    @for (toastContainerId of toastContainerIds() | asMulti; track toastContainerId) {-->\n<!--      <rlb-toast-container [id]=\"toastContainerId\" />-->\n<!--    }-->\n<!--  } @else {-->\n<!--    <rlb-toast-container class=\"position-fixed bottom-0 end-0 p-3\" [id]=\"toastContainerIds() | asSingle\" />-->\n<!--  }-->\n<!--}-->\n","import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';\nimport { isPlatformServer } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, inject, Inject, input, OnInit, PLATFORM_ID } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { BreadcrumbItem } from '@open-rlb/ng-bootstrap';\nimport { map, of } from 'rxjs';\n\nimport { NgTemplateOutlet } from '@angular/common';\nimport { BreadcrumbComponent } from '@open-rlb/ng-bootstrap';\n\n@Component({\n  selector: 'rlb-base-template',\n  templateUrl: './base.component.html',\n  styleUrls: ['./base.component.scss'],\n  imports: [NgTemplateOutlet, BreadcrumbComponent],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BaseComponent {\n  private readonly breakpointObserver = inject(BreakpointObserver);\n  private readonly platformId = inject(PLATFORM_ID);\n\n  readonly breadcrumbInput = input<BreadcrumbItem[] | undefined>(undefined, { alias: 'breadcrumb' });\n  readonly breadcrumb = computed(() => this.breadcrumbInput() ?? []);\n  readonly title = input.required<string>();\n\n  readonly subtitle = input<string>();\n\n  readonly isHandset = toSignal(\n    isPlatformServer(this.platformId)\n      ? of(true)\n      : this.breakpointObserver.observe(Breakpoints.Handset).pipe(map(result => result.matches)),\n    { initialValue: true }\n  );\n}\n\n\n","<div class=\" mb-3\">\n  @if (!isHandset()) {\n    <div class=\"container-fluid\">\n      <div class=\"row mt-1\">\n        <div class=\"col-xl-8 col-lg-10 col-md-12 col-sm-12 col-xs-12 mx-auto\">\n          <div class=\"row\">\n            <div class=\"col-12 pb-0\">\n              @if (breadcrumb()) {\n                <rlb-breadcrumb [items]=\"breadcrumb()\"></rlb-breadcrumb>\n              }\n              <h1 class=\"pt-5 pb-0 text-center\">\n                {{title()}}\n              </h1>\n            </div>\n          </div>\n          @if (subtitle()) {\n            <div class=\"row\">\n              <div class=\"col-12 pb-12\">\n                <span class=\"d-block text-h6 text-center\">\n                  {{subtitle()}}\n                </span>\n              </div>\n            </div>\n          }\n          <ng-container [ngTemplateOutlet]=\"all\"></ng-container>\n          <ng-container [ngTemplateOutlet]=\"default\"></ng-container>\n        </div>\n      </div>\n    </div>\n  } @else {\n    <!--old ng-template #mobileMode-->\n    <div class=\"row\">\n      <div class=\"col-12 pb-0\">\n        <h1 class=\"pt-5 pb-0 text-center\">\n          {{title()}}\n        </h1>\n      </div>\n    </div>\n    @if (subtitle()) {\n      <div class=\"row\">\n        <div class=\"col-12 pb-7\">\n          <div class=\"d-block text-h6 text-center\">\n            {{subtitle()}}\n          </div>\n        </div>\n      </div>\n    }\n    <ng-container [ngTemplateOutlet]=\"all\"></ng-container>\n    <ng-container [ngTemplateOutlet]=\"mobile\"></ng-container>\n  }\n</div>\n\n\n<ng-template #all>\n  <ng-content select=\"[all]\"></ng-content>\n</ng-template>\n\n<ng-template #default>\n  <ng-content select=\"[default]\"></ng-content>\n</ng-template>\n\n<ng-template #mobile>\n  <ng-content select=\"[mobile]\"></ng-content>\n</ng-template>\n","import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';\nimport { isPlatformServer } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, inject, Inject, OnInit, PLATFORM_ID } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { map, of } from 'rxjs';\n\nimport { NgTemplateOutlet } from '@angular/common';\n\n@Component({\n    selector: 'rlb-content-template',\n    templateUrl: './content.component.html',\n    styleUrl: './content.component.scss',\n    imports: [NgTemplateOutlet],\n    changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ContentComponent {\n  private readonly breakpointObserver = inject(BreakpointObserver);\n  private readonly platformId = inject(PLATFORM_ID);\n\n  readonly isHandset = toSignal(\n    isPlatformServer(this.platformId)\n      ? of(true)\n      : this.breakpointObserver.observe(Breakpoints.Handset).pipe(map(result => result.matches)),\n    { initialValue: true }\n  );\n}\n\n","<div class=\" mb-3\">\n  @if (!isHandset()) {\n    <div class=\"container-fluid\">\n      <div class=\"row mt-1\">\n        <div class=\"mx-auto col-sm-12 col-md-8 col-lg-9 col-xl-8\">\n          <ng-container [ngTemplateOutlet]=\"all\"></ng-container>\n          <ng-container [ngTemplateOutlet]=\"default\"></ng-container>\n        </div>\n      </div>\n    </div>\n  } @else {\n    <ng-container [ngTemplateOutlet]=\"all\"></ng-container>\n    <ng-container [ngTemplateOutlet]=\"mobile\"></ng-container>\n  }\n</div>\n\n\n<ng-template #all>\n  <ng-content select=\"[all]\"></ng-content>\n</ng-template>\n\n<ng-template #default>\n  <ng-content select=\"[default]\"></ng-content>\n</ng-template>\n\n<ng-template #mobile>\n  <ng-content select=\"[mobile]\"></ng-content>\n</ng-template>","import { Pipe, PipeTransform } from '@angular/core';\n\nconst pattern =\n  /(^|[\\s\\n]|<[A-Za-z]*\\/?>)((?:https?|ftp):\\/\\/[\\-A-Z0-9+\\u0026\\u2019@#\\/%?=()~_|!:,.;]*[\\-A-Z0-9+\\u0026@#\\/%=~()_|])/gi;\n\n@Pipe({\n    name: 'autolink'\n})\nexport class AutolinkPipe implements PipeTransform {\n  transform(\n    value?: string,\n    target?: string,\n    rel?: string,\n    id?: string,\n  ): string {\n    if (!value) {\n      return '';\n    }\n    value = value\n      .replace(/&/g, '&amp;')\n      .replace(/</g, '&lt;')\n      .replace(/>/g, '&gt;')\n      .replace(/\"/g, '&quot;')\n      .replace(/'/g, '&#39;');\n    const _target: string = target ? `target=\"${target}\"` : '';\n    const _rel: string = rel ? `rel=\"${rel}\"` : '';\n    const _id: string = id ? `id=\"${id}\"` : '';\n    const linkAttributes = [_target, _rel, _id].join(' ').trim();\n    return value.replace(pattern, function (match, space, url) {\n      const link =\n        \"<a href='\" + url + \"'\" + linkAttributes + '>' + url + '</a>';\n      return '' + space + link;\n    });\n  }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n    name: 'truncate'\n})\nexport class TruncatePipe implements PipeTransform {\n\n  transform(value?: string, limit = 25, completeWords = false, ellipsis = '...') {\n    if (!value) return value;\n    if (completeWords) {\n      limit = value.slice(0, limit).lastIndexOf(' ');\n    }\n    return value.length > limit ? value.slice(0, limit) + ellipsis : value;\n  }\n\n}\n","import { inject, Injectable, signal } from '@angular/core';\nimport { SwUpdate, VersionReadyEvent } from '@angular/service-worker';\nimport { filter, map, switchMap } from 'rxjs';\nimport { ModalService } from '@open-rlb/ng-bootstrap';\nimport { LanguageService } from '../i18n/language.service';\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class PwaUpdaterService {\n  private readonly updates = inject(SwUpdate);\n  private readonly modalService = inject(ModalService);\n  private readonly languageService = inject(LanguageService);\n\n  private readonly _newVersionAvailable = signal(false);\n  readonly newVersionAvailable = this._newVersionAvailable.asReadonly();\n\n  get newVersionAvailable$() {\n    return toObservable(this._newVersionAvailable);\n  }\n\n  constructor() {\n    this.updates.versionUpdates\n      .pipe(\n        filter((evt): evt is VersionReadyEvent => (evt.type === 'VERSION_READY')),\n        takeUntilDestroyed()\n      ).subscribe(() => this._newVersionAvailable.set(true));\n  }\n\n  update() {\n    this.updates.activateUpdate()\n      .then(() => document.location.reload());\n  }\n\n  async checkForUpdates() {\n    return await this.updates.checkForUpdate();\n  }\n\n  checkWithDialog() {\n    return this.updates.versionUpdates\n      .pipe(\n        filter((evt): evt is VersionReadyEvent => {\n          const result = evt.type === 'VERSION_READY';\n          return result;\n        }),\n        switchMap(() =>\n          this.modalService.openSimpleModal(\n            this.languageService.translate('core.pwa.newVersionAvailable'),\n            this.languageService.translate('core.pwa.updateMessage'),\n            this.languageService.translate('core.pwa.updateNow'),\n            this.languageService.translate('core.pwa.update'),\n            this.languageService.translate('core.pwa.later'))\n        ),\n        filter((res) => res?.reason === 'ok'),\n        map(() => this.updates.activateUpdate().then(() => location.reload()))\n      );\n  }\n}\n\n\n","import { ChangeDetectionStrategy, Component, inject, input, OnInit } from '@angular/core';\nimport { Router, RoutesRecognized } from '@angular/router';\nimport { Store } from '@ngrx/store';\nimport { BehaviorSubject, distinctUntilChanged, filter, map, tap } from 'rxjs';\nimport { EnvironmentConfiguration, RLB_CFG_ENV } from '../../configuration';\nimport { AppsService } from '../../services/apps/apps.service';\nimport { AppStorageService } from '../../services/utils/app-storage.service';\nimport { PwaUpdaterService } from '../../services/utils/pwa-updater.service';\nimport { AppContextActions } from '../../store/app-context/app-context.actions';\nimport { appContextFeatureKey, AppTheme, PageTemplate } from '../../store/app-context/app-context.model';\nimport { BaseState } from '../../store/base-state';\nimport { AppLoggerService, LoggerContext } from '../../services/apps/app-logger.service';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nimport { AppTemplateComponent } from '../app/app.component';\nimport { CommonModule } from '@angular/common';\nimport { RouterModule } from '@angular/router';\nimport { ModalContainerComponent, ToastContainerComponent } from '@open-rlb/ng-bootstrap';\nimport { AsMultiPipe, AsSinglePipe } from '../../pipes/as/as.pipe';\n\n@Component({\n  selector: 'rlb-app-container',\n  templateUrl: './app-container.component.html',\n  imports: [AppTemplateComponent, CommonModule, RouterModule, ModalContainerComponent, ToastContainerComponent, AsMultiPipe, AsSinglePipe],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AppContainerComponent {\n  protected readonly Array = Array;\n  private readonly templateSubject = new BehaviorSubject<PageTemplate>('app');\n  readonly modalContainerId = input.required<string>({ alias: 'modal-container-id' });\n  readonly toastContainerIds = input.required<string | string[]>({ alias: 'toast-container-ids' });\n\n  private readonly env = inject(RLB_CFG_ENV);\n  private readonly store = inject(Store<BaseState>);\n  private readonly router = inject(Router);\n  private readonly storage = inject(AppStorageService);\n  private readonly pwaUpdaterService = inject(PwaUpdaterService);\n  private readonly appsService = inject(AppsService);\n  private readonly loggerService = inject(AppLoggerService);\n\n  private readonly logger: LoggerContext = this.loggerService.for(this.constructor.name);\n\n  constructor() {\n    const theme: AppTheme = (this.storage.readLocal('theme') || 'dark') as AppTheme;\n    this.store.dispatch(AppContextActions.setTheme({ theme }));\n    this.store.dispatch(AppContextActions.setLanguage({ language: this.storage.readLocal('locale') || 'en' }));\n\n    this.store\n      .select((state) => state[appContextFeatureKey].currentApp)\n      .pipe(\n        distinctUntilChanged(),\n        takeUntilDestroyed()\n      )\n      .subscribe(async (currentApp) => {\n        this.logger.info('currentApp:', currentApp);\n\n        if (!currentApp) return;\n\n        const targetUrl = currentApp.navigationUrl ||\n          (currentApp.viewMode === 'app'\n            ? currentApp.core?.url\n            : currentApp.settings?.url);\n\n        if (!targetUrl) return;\n\n        const currentUrl = this.router.url;\n        this.logger.info('currentUrl:', currentUrl);\n        this.logger.info('targetUrl:', targetUrl);\n\n        const normalize = (url: string) => url.replace(/\\/+$/, '');\n        const current = normalize(currentUrl);\n        const target = normalize(targetUrl);\n\n        if (current === target || current.startsWith(`${target}/`)) {\n          this.logger.info('Already within target route, skipping navigation.');\n        } else {\n          this.logger.info('Navigating to app base URL:', target);\n          await this.router.navigateByUrl(target);\n        }\n      });\n\n    this.router.events\n      .pipe(\n        filter(event => event instanceof RoutesRecognized),\n        map((event: RoutesRecognized) => event?.state?.root?.firstChild?.data?.['template'] || 'app'),\n        map(o => o as PageTemplate),\n        tap((template: PageTemplate) => this.templateSubject.next(template)),\n        takeUntilDestroyed()\n      ).subscribe();\n\n    if (this.env.pwaUpdateEnabled) {\n      this.pwaUpdaterService.checkWithDialog().pipe(takeUntilDestroyed()).subscribe();\n    }\n  }\n\n  get template$() {\n    return this.templateSubject.asObservable();\n  }\n}\n\n\n","@if ((template$ | async) === 'app') {\n  <rlb-app-template [modal-container-id]=\"modalContainerId()\" [toast-container-ids]=\"toastContainerIds()\">\n    <router-outlet />\n  </rlb-app-template>\n}\n@if ((template$ | async) === 'basic') {\n  <router-outlet />\n}\n\n\n@if (modalContainerId()) {\n  <rlb-modal-container [id]=\"modalContainerId()\" />\n}\n\n@if (toastContainerIds()) {\n  @if (Array.isArray(toastContainerIds())) {\n    @for (toastContainerId of toastContainerIds() | asMulti; track toastContainerId) {\n      <rlb-toast-container [id]=\"toastContainerId\" />\n    }\n  } @else {\n    <rlb-toast-container class=\"position-fixed bottom-0 end-0 p-3\" [id]=\"toastContainerIds() | asSingle\" />\n  }\n}","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { RouterModule } from '@angular/router';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { RlbBootstrapModule } from '@open-rlb/ng-bootstrap';\nimport { CmsContentComponent } from './pages/cms-content/cms-content.component';\nimport { CookiesComponent } from './pages/cookies/cookies.component';\nimport { NotFoundComponent } from './pages/not-found/not-found.component';\nimport { PrivacyComponent } from './pages/privacy/privacy.component';\nimport { SupportComponent } from './pages/support/support.component';\nimport { TermsAndConditionsComponent } from './pages/terms-and-conditions/terms-and-conditions.component';\nimport { AsMultiPipe, AsSinglePipe } from './pipes/as/as.pipe';\nimport { CmsPipe } from './pipes/cms/cms.pipe';\nimport { AppTemplateComponent } from './templates/app/app.component';\nimport { BaseComponent } from './templates/base/base.component';\nimport { CmsComponent } from './templates/cms/cms.component';\nimport { ContentComponent } from './templates/content/content.component';\n\nimport { AutolinkPipe } from './pipes/autolink/autolink.pipe';\nimport { TruncatePipe } from './pipes/truncate/truncate.pipe';\nimport { LeftComponentPipe } from './pipes/left-component/left-component.pipe';\nimport { MobileComponentPipe } from './pipes/mobile-component/mobile-component.pipe';\nimport { RightComponentPipe } from './pipes/right-component/right-component.pipe';\nimport { AppContainerComponent } from './templates/app-container/app-container.component';\nimport { RlbRole } from './auth/directives/role.directive';\nimport { SettingsDropdownSelectorComponent } from './pages/settings/settings-dropdown-selector/settings-dropdown-selector.component';\nimport { AppDropdownSelectorComponent } from './pages/apps/app-dropdown-selector/app-dropdown-selector.component';\nimport { ForbiddenComponent } from './pages/forbidden/forbidden.component';\n\n@NgModule({\n  declarations: [],\n  exports: [\n    // pipes\n    CmsPipe,\n    AsMultiPipe,\n    AsSinglePipe,\n    LeftComponentPipe,\n    MobileComponentPipe,\n    RightComponentPipe,\n    TruncatePipe,\n    AutolinkPipe,\n    // templates\n    BaseComponent,\n    CmsComponent,\n    ContentComponent,\n    AppTemplateComponent,\n    AppContainerComponent,\n    // modules\n    TranslateModule,\n    RlbBootstrapModule,\n    RouterModule,\n    FormsModule,\n    // directives\n    RlbRole,\n  ],\n  imports: [\n    CommonModule,\n    FormsModule,\n    ReactiveFormsModule,\n    TranslateModule,\n    RlbBootstrapModule,\n    RouterModule,\n    // standalone\n    CmsContentComponent,\n    CookiesComponent,\n    NotFoundComponent,\n    PrivacyComponent,\n    SupportComponent,\n    TermsAndConditionsComponent,\n    ForbiddenComponent,\n    CmsPipe,\n    AsMultiPipe,\n    AsSinglePipe,\n    LeftComponentPipe,\n    MobileComponentPipe,\n    RightComponentPipe,\n    TruncatePipe,\n    AutolinkPipe,\n    BaseComponent,\n    CmsComponent,\n    ContentComponent,\n    AppTemplateComponent,\n    AppContainerComponent,\n    SettingsDropdownSelectorComponent,\n    AppDropdownSelectorComponent,\n    RlbRole,\n  ],\n})\nexport class RlbAppModule {}\n","import { Injectable } from '@angular/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport { RlbTranslationService, UniqueIdService } from \"@open-rlb/ng-bootstrap\";\n\n@Injectable({ providedIn: 'root' })\nexport class RlbTranslateAdapterService implements RlbTranslationService {\n\tconstructor(private translateService: TranslateService, private service: UniqueIdService) {}\n\n\tinstant(key: string, params?: { [key: string]: any }): string {\n\t\treturn this.translateService.instant(key, params);\n\t}\n}\n","import { EnvironmentProviders, importProvidersFrom, inject, provideAppInitializer, Provider } from \"@angular/core\";\nimport { InternationalizationConfiguration, RLB_CFG_I18N } from \"../../configuration\";\nimport { TranslateModule } from \"@ngx-translate/core\";\nimport { RLB_TRANSLATION_SERVICE } from \"@open-rlb/ng-bootstrap\";\nimport { RlbTranslateAdapterService } from \"./rlb-translate-adapter.service\";\nimport { provideTranslateHttpLoader } from \"@ngx-translate/http-loader\";\nimport { firstValueFrom } from \"rxjs\";\nimport { LanguageService } from \"./language.service\";\n\nexport function provideRlbI18n(i18n?: InternationalizationConfiguration): (EnvironmentProviders | Provider)[] {\n  if (!i18n) return [];\n\n  const prefix: string = './assets/i18n/';\n  const suffix: string = '.json'\n\n  return [\n    importProvidersFrom([\n      TranslateModule.forRoot({\n        loader: provideTranslateHttpLoader({\n          prefix,\n          suffix,\n          // enforceLoading: true,    // Adds cache-busting timestamp\n          // useHttpBackend: true     // Bypasses HTTP interceptors\n        }),\n        fallbackLang: i18n.defaultLanguage\n      })\n    ]),\n    { provide: RLB_CFG_I18N, useValue: i18n },\n\t\t{\n\t\t\tprovide: RLB_TRANSLATION_SERVICE,\n\t\t\tuseClass: RlbTranslateAdapterService\n\t\t},\n    // Block bootstrap until the initial UI translation file is loaded, so that\n    // synchronous instant() calls during app/component init (e.g. sidebar setup)\n    // resolve real translations instead of leaking raw i18n keys.\n    provideAppInitializer(() => firstValueFrom(inject(LanguageService).ready$)),\n  ]\n}\n","import { Injectable } from '@angular/core';\nimport { Store } from '@ngrx/store';\n\nimport { AuthActions } from './auth.actions';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class AuthFeatureService {\n\n  constructor(private store: Store) { }\n\n  public login() {\n    this.store.dispatch(AuthActions.login());\n  }\n\n  public logout() {\n    this.store.dispatch(AuthActions.logout());\n  }\n}\n","import { Inject, Injectable, Optional, Renderer2, RendererFactory2 } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Store } from '@ngrx/store';\nimport { map, tap } from 'rxjs/operators';\nimport { BaseState } from '../base-state';\nimport { LanguageService } from '../../services/i18n/language.service';\nimport { AppInfo } from '../../services/apps/app';\nimport { AppStorageService } from '../../services/utils/app-storage.service';\nimport { AppContextActions, AppContextActionsInternal } from './app-context.actions';\nimport { RLB_APPS } from './app-context.model';\nimport { AppLoggerService, LoggerContext } from \"../../services/apps/app-logger.service\";\n\n@Injectable()\nexport class AppContextEffects {\n  private renderer: Renderer2;\n  private logger: LoggerContext;\n\n  setLanguage$ = createEffect(() => {\n    return this.actions$.pipe(\n      ofType(AppContextActions.setLanguage),\n      tap(({ language }) => this.languageService.setLanguage(language)),\n      tap(({ language }) => {\n        this.renderer.setAttribute(document.documentElement, 'lang', language);\n      }),\n      tap(({ language }) => { this.storage.writeLocal('locale', language); }),\n      map(({ language }) => AppContextActionsInternal.setLanguage({ language })),\n    );\n  });\n\n  setLanguages$ = createEffect(() => {\n    return this.actions$.pipe(\n      ofType(AppContextActions.setSupportedLanguages),\n      tap(({ supportedLanguages }) => this.languageService.languages = supportedLanguages),\n      map(({ supportedLanguages }) => AppContextActionsInternal.setSupportedLanguages({ supportedLanguages })),\n    );\n  });\n\n  setTheme$ = createEffect(() => {\n    return this.actions$.pipe(\n      ofType(AppContextActions.setTheme),\n      tap(({ theme }) => {\n        this.renderer.setAttribute(document.documentElement, 'data-bs-theme', theme);\n        this.renderer.setAttribute(document.documentElement, 'data-theme', theme);\n      }),\n      tap(({ theme }) => { this.storage.writeLocal('theme', theme); }),\n      map(({ theme }) => AppContextActionsInternal.setTheme({ theme })),\n    );\n  });\n\n  setApp$ = createEffect(() => {\n    return this.actions$.pipe(\n      ofType(AppContextActions.setCurrentApp),\n      map(({ app, mode, url }) => {\n        return AppContextActionsInternal.setCurrentApp({ app, mode, url });\n      }),\n      tap(({ app }) => {\n        if (app) {\n          this.logger.warn('setApp$ set c-app-id', app.id!);\n          localStorage.setItem('c-app-id', app.id!);\n        } else {\n          this.logger.warn('setApp$ remove c-app-id');\n          localStorage.removeItem('c-app-id');\n        }\n      }),\n    );\n  });\n\n  constructor(\n    private readonly actions$: Actions,\n    private readonly languageService: LanguageService,\n    readonly rendererFactory: RendererFactory2,\n    readonly storage: AppStorageService,\n    readonly store: Store<BaseState>,\n    private readonly router: Router,\n    private loggerService: AppLoggerService,\n    @Inject(RLB_APPS) @Optional() private apps: AppInfo[],\n  ) {\n    this.logger = this.loggerService.for(this.constructor.name);\n    this.renderer = rendererFactory.createRenderer(null, null);\n    if (this.apps && this.apps.length > 0) {\n      for (const app of this.apps) {\n        store.dispatch(AppContextActionsInternal.addApp({ app: app }));\n      }\n    }\n  }\n}\n","import { createFeature, createReducer, on } from '@ngrx/store';\nimport { AppContextActions, AppContextActionsInternal } from './app-context.actions';\nimport { appContextFeatureKey, initialAppContextState } from './app-context.model';\n\nexport const appFeature = createFeature({\n  name: appContextFeatureKey,\n  reducer: createReducer(\n    initialAppContextState,\n    on(AppContextActionsInternal.setCurrentApp, (state, { app, mode, url }) => ({ ...state, currentApp: app ? { ...app, viewMode: mode, navigationUrl: url } : null })),\n    on(AppContextActions.removeApp, (state, { appType }) => ({ ...state, apps: state.apps.filter(a => a.type !== appType) })),\n    on(AppContextActions.finalizeApp, (state, { appType, data, appId }) => {\n      const appsOfType = state.apps.filter(a => a.type === appType);\n      if (appsOfType.length === 0) throw new Error(`App type: ${appType} not found. Cannot finalize app.`);\n      let updatedAppsOfType: typeof appsOfType;\n      if (appsOfType.length === 1 && !appsOfType[0].id) {\n        updatedAppsOfType = [{ ...appsOfType[0], data, id: appId }];\n      } else {\n        updatedAppsOfType = [...appsOfType, { ...appsOfType[0], data, id: appId }];\n      }\n      const remainingApps = state.apps.filter(a => a.type !== appType);\n      return { ...state, apps: [...remainingApps, ...updatedAppsOfType], };\n    }),\n    on(AppContextActionsInternal.addApp, (state, { app }) => {\n      if (!app) return state;\n      const apps = state.apps.filter(a => a.type !== app.type);\n      apps.push(app);\n      return { ...state, apps };\n    }),\n    on(AppContextActionsInternal.setLanguage, (state, { language }) => ({ ...state, language })),\n    on(AppContextActionsInternal.setSupportedLanguages, (state, { supportedLanguages }) => ({ ...state, supportedLanguages })),\n    on(AppContextActionsInternal.setTheme, (state, { theme }) => ({ ...state, theme })),\n    on(AppContextActionsInternal.setViewMode, (state, { viewMode }) => ({ ...state, viewMode })))\n});\n\nexport const appReducer = appFeature.reducer;\n\nexport const {\n  selectAppState,\n  selectApps,\n  selectCurrentApp,\n  selectSupportedLanguages\n} = appFeature;\n","import { Inject, Injectable, Optional } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { map, switchMap, tap } from 'rxjs/operators';\nimport { AuthenticationService } from '../../auth/services/auth.service';\nimport { AuthConfiguration, RLB_CFG_AUTH } from '../../configuration';\nimport { AuthActions, AuthActionsInternal } from './auth.actions';\nimport { AppLoggerService, LoggerContext } from '../../services/apps/app-logger.service';\n\n@Injectable()\nexport class AuthEffects {\n  private logger: LoggerContext;\n\n  login$ = createEffect(() => {\n    return this.actions$.pipe(\n      ofType(AuthActions.login),\n      tap(() => this.logger.log('auth effects going to call login()')),\n      tap(() => this.auth.login()),\n      map(() => AuthActionsInternal.setLoading({ loading: true })),\n    );\n  });\n\n  logout$ = createEffect(() => {\n    return this.actions$.pipe(\n      ofType(AuthActions.logout),\n      tap(() => this.logger.log('auth effects going to call logout$()')),\n      switchMap(() => this.auth.logout$()),\n      map(() => AuthActionsInternal.reset()),\n    );\n  });\n\n  setCurrentProvider$ = createEffect(() => {\n    return this.actions$.pipe(\n      ofType(AuthActions.setCurrentProvider),\n      map(({ currentProvider }) => AuthActionsInternal.setCurrentProvider({ currentProvider })),\n    );\n  });\n\n  constructor(\n    private actions$: Actions,\n    private auth: AuthenticationService,\n    private loggerService: AppLoggerService,\n    @Inject(RLB_CFG_AUTH) @Optional() authConfig: AuthConfiguration,\n  ) {\n    this.logger = this.loggerService.for(this.constructor.name);\n    this.logger.log(`Initialized AuthEffects`);\n  }\n}\n","import { createFeature, createReducer, on } from '@ngrx/store';\nimport { AuthActionsInternal } from './auth.actions';\nimport { authsFeatureKey, initialAuthState } from './auth.model';\n\nexport const authsFeature = createFeature({\n  name: authsFeatureKey,\n  reducer: createReducer(\n    initialAuthState,\n    on(AuthActionsInternal.setLoading, (state, action) => ({ ...state, loading: action.loading })),\n    on(AuthActionsInternal.reset, () => ({ ...initialAuthState })),\n    on(AuthActionsInternal.setCurrentProvider, (state, action) => {\n      if (action.currentProvider && state.currentProvider !== action.currentProvider) {\n        return { ...state, currentProvider: action.currentProvider };\n      }\n      return state;\n    })\n  )\n});\n\nexport const authReducer = authsFeature.reducer;\n\nexport const {\n  selectAuthState,\n  selectCurrentProvider,\n  selectLoading\n} = authsFeature;\n","import { createFeature, createReducer, on } from '@ngrx/store';\nimport { initialNavbarState, navbarsFeatureKey } from './navbar.model';\nimport { NavbarActions } from './navbar.actions';\n\nexport const navbarsFeature = createFeature({\n  name: navbarsFeatureKey,\n  reducer: createReducer(\n    initialNavbarState,\n    on(NavbarActions.setVisible, (state, { visible }) => ({ ...state, visible })),\n    on(NavbarActions.setSearchVisible, (state, { visible }) => ({\n      ...state,\n      searchVisible: visible,\n    })),\n    on(NavbarActions.setHeader, (state, { header }) => ({ ...state, header })),\n    on(NavbarActions.setSearchText, (state, { text }) => ({ ...state, searchText: text })),\n    on(NavbarActions.setLeftItems, (state, { items }) => ({ ...state, leftItems: items })),\n    on(NavbarActions.setRightItems, (state, { items }) => ({ ...state, rightItems: items })),\n    on(NavbarActions.setMobileItems, (state, { items }) => ({ ...state, mobileItems: items })),\n    on(NavbarActions.setLoginVisible, (state, { visible }) => ({\n      ...state,\n      loginVisible: visible,\n    })),\n    on(NavbarActions.setSettingsVisible, (state, { visible }) => ({\n      ...state,\n      settingsVisible: visible,\n    })),\n    on(NavbarActions.setAppsVisible, (state, { visible }) => ({ ...state, appsVisible: visible })),\n    on(NavbarActions.setSeparatorVisible, (state, { visible }) => ({\n      ...state,\n      separatorVisible: visible,\n    })),\n    on(NavbarActions.setActionsLayout, (state, { layout }) => ({\n      ...state,\n      actionsLayout: layout,\n    })),\n  ),\n});\n\nexport const navbarReducer = navbarsFeature.reducer;\n\nexport const { selectNavbarState } = navbarsFeature;\n","import { createFeature, createReducer, on } from '@ngrx/store';\nimport { sidebarsFeatureKey, initialSidebarState } from './sidebar.model';\nimport { SidebarActions } from './sidebar.actions';\n\nexport const sidebarsFeature = createFeature({\n  name: sidebarsFeatureKey,\n  reducer: createReducer(\n    initialSidebarState,\n    on(SidebarActions.setItems, (state, { items }) => ({ ...state, items })),\n    on(SidebarActions.setVisible, (state, { visible }) => ({ ...state, visible })),\n    on(SidebarActions.setLoginVisible, (state, { visible }) => ({ ...state, loginVisible: visible })),\n    on(SidebarActions.setSearchVisible, (state, { visible }) => ({ ...state, searchVisible: visible })),\n    on(SidebarActions.setSettingsVisible, (state, { visible }) => ({ ...state, settingsVisible: visible })),\n    on(SidebarActions.setSearchText, (state, { text }) => ({ ...state, searchText: text })),\n    on(SidebarActions.setAppsVisible, (state, { visible }) => ({ ...state, appsVisible: visible })),\n    on(SidebarActions.setFooterComponent, (state, { name }) => ({ ...state, footerComponent: name }))\n  )\n});\n\nexport const sidebarReducer = sidebarsFeature.reducer;\n\nexport const {\n  selectSidebarState\n} = sidebarsFeature;","import { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { IToast, ToastData, ToastDirective } from '@open-rlb/ng-bootstrap';\n\n@Component({\n  imports: [],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  template: `\n    <div class=\"toast-header\">\n      <strong class=\"me-auto\">\n        <svg\n          class=\"bd-placeholder-img rounded me-2\"\n          width=\"20\"\n          height=\"20\"\n          xmlns=\"http://www.w3.org/2000/svg\"\n          aria-hidden=\"true\"\n          preserveAspectRatio=\"xMidYMid slice\"\n          focusable=\"false\"\n        >\n          <rect\n            width=\"100%\"\n            height=\"100%\"\n            fill=\"#007aff\"\n          ></rect>\n        </svg>\n        {{ data().title }}\n      </strong>\n      @if (data().subtitle) {\n        <small>{{ data().subtitle }}</small>\n      }\n      <button\n        type=\"button\"\n        class=\"btn-close\"\n        data-bs-dismiss=\"toast\"\n        aria-label=\"Close\"\n      ></button>\n    </div>\n    <div class=\"toast-body\">{{ data().content }}</div>\n  `,\n  hostDirectives: [\n    {\n      directive: ToastDirective,\n      inputs: ['id', 'data-instance', 'data-options'],\n    },\n  ],\n})\nexport class ToastComponent implements IToast<string, void> {\n  data = input.required<ToastData<any>>();\n  valid?: boolean = true;\n  result?: any;\n}\n","import { HttpClient, HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';\nimport { Injectable, OnInit } from '@angular/core';\nimport { lastValueFrom, Observable } from 'rxjs';\nimport { AuthenticationService } from './auth.service';\nimport { AppLoggerService, LoggerContext } from '../../services/apps/app-logger.service';\n\nconst SESSION_RT = 'RT';\nconst SESSION_AT = 'AT';\nconst TOKEN_URL = `protocol/openid-connect/token`;\n\nexport interface Token {\n  access_token: string | null;\n  expires_in: number;\n  token_type: string;\n  scope: string;\n  id_token: string | null;\n  refresh_token: string | null;\n}\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class OauthPasswordService implements HttpInterceptor {\n\n  private timer: any = null;\n  private _onUpdateToken: ((token: string | null) => void) | null = null;\n  //private _user: User | null = null\n  private logger: LoggerContext;\n\n  constructor(\n    private readonly httpClient: HttpClient,\n    private readonly authenticationService: AuthenticationService,\n    private readonly log: AppLoggerService,\n  ) {\n    this.logger = this.log.for(this.constructor.name);\n    this.initRefreshToken().catch(e => console.error(\"Error in refresh token\", e));\n  }\n\n  intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n    if (this.authenticationService.config.allowedUrls.some(o => req.url.includes(o))) {\n      const token = this.access_token;\n      if (token) {\n        req = req.clone({\n          setHeaders: {\n            Authorization: `Bearer ${token}`\n          }\n        });\n      }\n    }\n    return next.handle(req);\n  }\n\n  private get access_token() {\n    const r = sessionStorage.getItem(SESSION_AT);\n    return typeof r === 'string' && r !== '' ? r : null;\n  }\n\n  private set access_token(val: string | null) {\n    if (val === undefined || val === null || val === '')\n      sessionStorage.removeItem(SESSION_AT);\n    else\n      sessionStorage.setItem(SESSION_AT, val);\n  }\n\n  private get refresh_token() {\n    const r = sessionStorage.getItem(SESSION_RT);\n    return typeof r === 'string' && r !== '' ? r : null;\n  }\n\n  private set refresh_token(val: string | null) {\n    if (val === undefined || val === null || val === '')\n      sessionStorage.removeItem(SESSION_RT);\n    else\n      sessionStorage.setItem(SESSION_RT, val);\n  }\n\n  public get accessToken() {\n    return this.access_token;\n  }\n\n  // public get user() {\n  //   return this._user\n  // }\n\n  public set onUpdateToken(v: ((token: string | null) => void) | null) {\n    this._onUpdateToken = v;\n  }\n\n  public async login(username: string, password: string) {\n    const t = await this._login(username, password);\n    this.refresh_token = t.refresh_token;\n    this.access_token = t.access_token;\n    if (typeof this._onUpdateToken === 'function') {\n      this._onUpdateToken(this.access_token);\n    }\n    // if (this._user === null) {\n    //   this._user = await lastValueFrom(this.users.apiV1UsersGetSelfGet())\n    // }\n    if (this.timer !== null) {\n      clearInterval(this.timer);\n      this.timer = null;\n    }\n    this.timer = setInterval(async () => {\n      try {\n        var r = await this._refreshToken(this.refresh_token);\n        this.refresh_token = r.refresh_token;\n        this.access_token = r.access_token;\n        if (typeof this._onUpdateToken === 'function') {\n          this._onUpdateToken(this.access_token);\n        }\n        // if (this._user === null) {\n        //   this._user = await lastValueFrom(this.users.apiV1UsersGetSelfGet())\n        // }\n      }\n      catch (e) {\n        console.warn(\"Refresh token fail\");\n      }\n    }, t.expires_in * 1000 - 60000);\n    return t;\n  }\n\n  public loggedIn() {\n    return !!this.access_token;\n  }\n\n  public logout() {\n    this.refresh_token = null;\n    this.access_token = null;\n    if (this.timer !== null) {\n      clearInterval(this.timer);\n      this.timer = null;\n    }\n  }\n\n  private async _login(username: string, password: string): Promise<Token> {\n    if (!this.authenticationService.currentProvider) throw new Error(\"No authentication provider configured\");\n    let body = new URLSearchParams();\n    body.set('grant_type', 'password');\n    body.set('client_id', 'addubby');\n    body.set('scope', 'addubby-order');\n    body.set('username', username);\n    body.set('password', password);\n    this.logger.log(`password service call _login()`)\n    return await lastValueFrom(this.httpClient.post<Token>(`${this.authenticationService.currentProvider.authority}/${TOKEN_URL}`, body.toString(), {\n      headers: { 'content-type': 'application/x-www-form-urlencoded' },\n    }));\n  }\n\n  private async _refreshToken(token: string | null): Promise<Token> {\n    if (!this.authenticationService.currentProvider) throw new Error(\"No authentication provider configured\");\n    let body = new URLSearchParams();\n    body.set('grant_type', 'refresh_token');\n    body.set('client_id', this.authenticationService.currentProvider.clientId!);\n    if (token)\n      body.set('refresh_token', token);\n    return await lastValueFrom(this.httpClient.post<Token>(`${this.authenticationService.currentProvider.authority}/${TOKEN_URL}`, body.toString(), {\n      headers: { 'content-type': 'application/x-www-form-urlencoded' },\n    }));\n  }\n\n  private async initRefreshToken() {\n    if (this.refresh_token) {\n      var r = await this._refreshToken(this.refresh_token);\n      this.refresh_token = r.refresh_token;\n      this.access_token = r.access_token;\n      // if (this._user === null) {\n      //   this._user = await lastValueFrom(this.users.apiV1UsersGetSelfGet())\n      // }\n      if (typeof this._onUpdateToken === 'function') {\n        this._onUpdateToken(this.access_token);\n      }\n      this.timer = setInterval(async () => {\n        try {\n          var r = await this._refreshToken(this.refresh_token);\n          this.refresh_token = r.refresh_token;\n          this.access_token = r.access_token;\n          // if (this._user === null) {\n          //   this._user = await lastValueFrom(this.users.apiV1UsersGetSelfGet())\n          // }\n          if (typeof this._onUpdateToken === 'function') {\n            this._onUpdateToken(this.access_token);\n          }\n        }\n        catch (e) {\n          console.warn(\"Refresh token fail\");\n        }\n      }, r.expires_in * 1000 - 60000);\n    }\n  }\n}\n","import { inject } from '@angular/core';\nimport { CanActivateFn } from '@angular/router';\nimport { Router } from '@angular/router';\nimport { map, of } from 'rxjs';\nimport { OauthPasswordService } from '../services/oauth-password.service';\n\nexport const oauthPasswordGuard: CanActivateFn = (route, state) => {\n  const auth = inject(OauthPasswordService);\n  const router = inject(Router);\n\n  return of(auth.loggedIn()).pipe(\n    map(o => {\n      if (!o) {\n        router.navigate(['login']);\n        return false;\n      }\n      return true;\n    })\n  );\n};\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { Observable, catchError, map, of, switchMap, take, throwError, timeout } from 'rxjs';\nimport { AuthenticationService } from '../services/auth.service';\nimport { KeycloakUser } from './keycloack-user';\nimport { KeycloakCredential } from './keycloak-credential';\nimport { KeycloakDevice, KeycloakSession } from './keycloak-device';\n\n/** How long to wait on the account API before giving up on a call. */\nconst DEFAULT_TIMEOUT_MS = 10_000;\n\nexport interface KeycloakAccountCallOptions {\n  /** Overrides the 10s default for this call. */\n  timeoutMs?: number;\n}\n\n/**\n * The Keycloak account API, in a shape a caller can compose with.\n *\n * `KeycloakProfileService` covers the same endpoints but cannot be composed: every method is gated\n * behind `filter(isAuthenticated)`, which after a failed token renewal simply never emits, and ends\n * in `manageUI('error', 'dialog')`, which opens a blocking modal and completes the stream *empty*.\n * Both mean the observable finishes without a value and without an error, so a caller can neither\n * tell success from failure nor stop a `forkJoin` from being silently aborted — one failing section\n * blanks a whole profile page. That is what happened during a provider outage, and it is why this\n * service exists.\n *\n * Here, reads **degrade**: a failure, a timeout, a missing token or an unresolved provider yields\n * the documented fallback (`null` / `[]`) rather than nothing at all, so a page renders with the\n * sections it could load. Writes **propagate**: the caller has to know whether the change landed.\n * Nothing opens a modal — how loudly to complain is the caller's decision.\n *\n * The redirect-based flows (`configureOTP`, `updatePassword`) stay on `KeycloakProfileService`;\n * they are not HTTP calls and have none of these problems.\n */\n@Injectable({ providedIn: 'root' })\nexport class KeycloakAccountService {\n  private readonly http = inject(HttpClient);\n  private readonly authService = inject(AuthenticationService);\n\n  /** The account API lives on the provider's own host, outside the endpoint interceptors' reach. */\n  private get baseUrl(): string | undefined {\n    const authority = this.authService.currentProvider?.authority;\n    return authority ? `${authority}/account` : undefined;\n  }\n\n  /** The signed-in user's profile, or null when it could not be read. */\n  user(options?: KeycloakAccountCallOptions): Observable<KeycloakUser | null> {\n    return this.read<KeycloakUser | null>('', null, options);\n  }\n\n  /** The user's sessions, flattened out of the devices that hold them; `[]` when unreadable. */\n  devices(options?: KeycloakAccountCallOptions): Observable<KeycloakSession[]> {\n    return this.read<KeycloakDevice[] | null>('/sessions/devices', null, options).pipe(\n      map(devices => (devices ? flattenSessions(devices) : [])),\n    );\n  }\n\n  /** The user's credentials, or `[]` when they could not be read. */\n  credentials(options?: KeycloakAccountCallOptions): Observable<KeycloakCredential[]> {\n    return this.read<KeycloakCredential[]>('/credentials', [], options);\n  }\n\n  /** Updates the profile. Errors reach the caller. */\n  updateUser(data: KeycloakUser, options?: KeycloakAccountCallOptions): Observable<void> {\n    return this.write(\n      (url, token) => this.http.post<void>(url, data, withBearer(token)),\n      '',\n      options,\n    );\n  }\n\n  /** Removes a credential. Errors reach the caller. */\n  removeCredential(id: string, options?: KeycloakAccountCallOptions): Observable<void> {\n    return this.write(\n      (url, token) => this.http.delete<void>(url, withBearer(token)),\n      `/credentials/${id}`,\n      options,\n    );\n  }\n\n  /**\n   * A read that always produces a value.\n   *\n   * No `isAuthenticated$` gate: that is the operator that turns a stalled renewal into a stream\n   * which never emits. A missing token is handled by returning the fallback, which is a state the\n   * caller can actually render.\n   */\n  private read<T>(path: string, fallback: T, options?: KeycloakAccountCallOptions): Observable<T> {\n    const url = this.baseUrl;\n    if (!url) return of(fallback);\n\n    return this.authService.accessToken$.pipe(\n      take(1),\n      switchMap(token => {\n        if (!token) return of(fallback);\n        return this.http\n          .get<T>(`${url}${path}`, withBearer(token))\n          .pipe(timeout({ first: options?.timeoutMs ?? DEFAULT_TIMEOUT_MS }));\n      }),\n      catchError(() => of(fallback)),\n    );\n  }\n\n  /** A write, whose failures are the caller's to handle. */\n  private write(\n    call: (url: string, token: string) => Observable<void>,\n    path: string,\n    options?: KeycloakAccountCallOptions,\n  ): Observable<void> {\n    const url = this.baseUrl;\n    if (!url) return throwError(() => new Error('No auth provider resolved for the account API.'));\n\n    return this.authService.accessToken$.pipe(\n      take(1),\n      switchMap(token => {\n        if (!token) return throwError(() => new Error('No access token for the account API.'));\n        return call(`${url}${path}`, token).pipe(\n          timeout({ first: options?.timeoutMs ?? DEFAULT_TIMEOUT_MS }),\n        );\n      }),\n    );\n  }\n}\n\nfunction flattenSessions(devices: KeycloakDevice[]): KeycloakSession[] {\n  return devices\n    .map(device =>\n      device.sessions.map(session => {\n        session.os = device.os;\n        session.osVersion = device.osVersion;\n        session.device = device.device;\n        session.mobile = device.mobile;\n        session.clientslist = session.clients.map(client => client.clientName).join(', ');\n        return session;\n      }),\n    )\n    .flat();\n}\n\nfunction withBearer(token: string): { headers: { Authorization: string } } {\n  return { headers: { Authorization: `Bearer ${token}` } };\n}\n","import { inject, Injectable, signal } from '@angular/core';\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';\nimport { ActivatedRoute, NavigationEnd, Router } from '@angular/router';\nimport { BreadcrumbItem, UniqueIdService } from '@open-rlb/ng-bootstrap';\nimport { filter } from 'rxjs';\nimport { AppLoggerService, LoggerContext } from './app-logger.service';\nimport { LanguageService } from '../i18n/language.service';\n\n@Injectable({ providedIn: 'root' })\nexport class AppBreadcrumbService {\n  private readonly router = inject(Router);\n  private readonly route = inject(ActivatedRoute);\n  private readonly loggerService = inject(AppLoggerService);\n  private readonly languageService = inject(LanguageService);\n  private readonly idService = inject(UniqueIdService);\n\n  private readonly _breadcrumbs = signal<BreadcrumbItem[]>([]);\n  readonly breadcrumbs = this._breadcrumbs.asReadonly();\n  /**\n   * @deprecated Use `breadcrumbs` (signal-based) instead.\n   */\n  readonly breadcrumbs$ = toObservable(this._breadcrumbs);\n\n  private logger: LoggerContext;\n\n  constructor() {\n    this.logger = this.loggerService.for(this.constructor.name);\n    this.logger.info('Service initialized');\n\n    this.router.events\n      .pipe(\n        filter((event): event is NavigationEnd => event instanceof NavigationEnd),\n        takeUntilDestroyed(),\n      )\n      .subscribe(() => this.updateBreadcrumbs());\n\n    this.languageService.languageChanged$\n      .pipe(takeUntilDestroyed())\n      .subscribe(() => this.updateBreadcrumbs());\n\n    // init construct\n    this.updateBreadcrumbs();\n  }\n\n  private updateBreadcrumbs() {\n    const crumbs = this.buildBreadcrumbFromRoot(this.route);\n    this._breadcrumbs.set(crumbs);\n    this.logger.info('Breadcrumbs updated', crumbs);\n  }\n\n  private buildBreadcrumbFromRoot(route: ActivatedRoute): BreadcrumbItem[] {\n    const breadcrumbs: BreadcrumbItem[] = [];\n    let accumulatedLink = '';\n    let currentRoute: ActivatedRoute | null = route.root;\n\n    while (currentRoute) {\n      const urlPart = currentRoute.snapshot.url.map(s => s.path).join('/');\n      if (urlPart) accumulatedLink += `/${urlPart}`;\n\n      const label = currentRoute.snapshot.data['breadcrumb'];\n      if (label && (urlPart || breadcrumbs.length === 0)) {\n        breadcrumbs.push({\n          label: this.languageService.translate(label),\n          link: accumulatedLink || '/',\n          id: `breadcrumb${this.idService.id}`,\n        });\n        this.logger.debug('Pushed breadcrumb', { label, link: accumulatedLink });\n      }\n\n      if (!currentRoute.firstChild) break;\n      currentRoute = currentRoute.firstChild;\n    }\n\n    return breadcrumbs;\n  }\n}\n","import { EnvironmentProviders, Provider } from '@angular/core';\n\n/**\n * Registers `providers` only on the domains that should have them.\n *\n * `provideApp` spreads an `AppDescriber`'s providers into the **root** injector, unconditionally\n * and on every domain — `AppInfo.domains` filters what the shell *shows*, never what it *provides*.\n * So a host that registers several describers gives every tenant every describer's interceptors,\n * initializers and services. That is easy to miss: a tenant-local HTTP interceptor added to one\n * app's describer silently joins the chain on all the others, where it was never tested.\n *\n * Wrap anything tenant-local in this helper:\n *\n * ```ts\n * providers: [\n *   ...provideForDomains(PARTNER_DOMAINS, [\n *     { provide: HTTP_INTERCEPTORS, useClass: PartnerInterceptor, multi: true },\n *   ]),\n * ]\n * ```\n *\n * The check runs while the providers array is being built — before bootstrap, in the browser — so\n * the providers are genuinely never registered rather than registered and then disabled at runtime.\n *\n * On the server there is no `location`, so nothing is registered; pass `hostname` explicitly for\n * SSR, and in specs, where it also makes the intent readable.\n */\nexport function provideForDomains(\n  domains: readonly string[],\n  providers: (Provider | EnvironmentProviders)[],\n  hostname: string = globalThis.location?.hostname ?? '',\n): (Provider | EnvironmentProviders)[] {\n  return domains.includes(hostname) ? providers : [];\n}\n","import { Observable } from 'rxjs';\nimport { TranslateLoader } from '@ngx-translate/core';\nimport { HttpClient } from '@angular/common/http';\nimport { makeStateKey, StateKey, TransferState } from '@angular/core';\n\nexport class TranslateBrowserLoader implements TranslateLoader {\n  constructor(private http: HttpClient,\n    private transferState: TransferState,\n    private prefix: string = './assets/i18n/',\n    private suffix: string = '.json') {}\n\n  public getTranslation(lang: string): Observable<any> {\n    const key: StateKey<number> = makeStateKey<number>(\n      'transfer-translate-' + lang\n    );\n    const data = this.transferState.get(key, null);\n\n    // First we are looking for the translations in transfer-state,\n\t  // if none found, http load as fallback\n    if (data) {\n      return new Observable((observer) => {\n        observer.next(data);\n        observer.complete();\n      });\n    } else {\n      return this.http.get(`${this.prefix}${lang}${this.suffix}`);\n    }\n  }\n}\n\nexport function translateBrowserLoaderFactory(\n  httpClient: HttpClient,\n  transferState: TransferState\n) {\n  return new TranslateBrowserLoader(httpClient, transferState);\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class UtilsService {\n\n  public isNumber(evt: any) {\n    evt = evt || window.event\n    const charCode = evt.which ? evt.which : evt.keyCode\n    if (charCode > 31 && (charCode < 48 || charCode > 57) && charCode !== 46) {\n      evt.preventDefault()\n      return false\n    } else {\n      return true\n    }\n  }\n\n  public toPlainDataObject(o: ({ [k: string]: any } | { [k: string]: any }[])): any {\n    if (o !== null && o != undefined) {\n      if (Array.isArray(o)) {\n        return o.map(j => this.toPlainDataObject(j))\n      } else if (typeof o === 'object') {\n        return Object.getOwnPropertyNames(o).reduce((result: { [k: string]: any }, name) => {\n          if (name !== '__ob__') result[name] = this.toPlainDataObject(o[name])\n          return result\n        }, {})\n      } else if (typeof o === 'function' || typeof o === 'undefined') {\n        return undefined\n      } else {\n        return o\n      }\n    }\n  }\n\n  public groupBy<T>(xs: T[], predicate: (o: T) => string) {\n    return xs.reduce((rv, x) => {\n      ; (rv[predicate(x)] = rv[predicate(x)] || []).push(x)\n      return rv\n    }, {} as { [i: string]: T[] })\n  }\n\n\n\n  private s(x: any, y: any): number {\n    var pre = ['string', 'number', 'bool']\n    if (typeof x !== typeof y) return pre.indexOf(typeof y) - pre.indexOf(typeof x)\n\n    if (x === y) return 0\n    else return x > y ? 1 : -1\n  }\n\n  public compareArrayUnsort(a1: any, a2: any): boolean {\n    if (!Array.isArray(a1)) return false\n    if (!Array.isArray(a2)) return false\n    if (a1.length != a2.length) return false\n    a1 = a1.sort(this.s)\n    a2 = a2.sort(this.s)\n    for (var i = 0, l = a1.length; i < l; i++) {\n      if (Array.isArray(a1[i]) && Array.isArray(a2[i])) {\n        if (!this.compareArrayUnsort(a1[i], a2[i])) return false\n      } else if (a1[i] != a2[i]) {\n        // Warning - two different object instances will never be equal: {x:20} != {x:20}\n        return false\n      }\n    }\n    return true\n  }\n\n  public removeMD(\n    md: string,\n    options?: { listUnicodeChar?: string; stripListLeaders?: boolean; useImgAltText?: boolean; gfm?: boolean }\n  ) {\n    options = options || {}\n    options.listUnicodeChar = options.hasOwnProperty('listUnicodeChar') ? options.listUnicodeChar : undefined\n    options.stripListLeaders = options.hasOwnProperty('stripListLeaders') ? options.stripListLeaders : true\n    options.gfm = options.hasOwnProperty('gfm') ? options.gfm : true\n    options.useImgAltText = options.hasOwnProperty('useImgAltText') ? options.useImgAltText : true\n\n    var output = md || ''\n\n    // Remove horizontal rules (stripListHeaders conflict with this rule, which is why it has been moved to the top)\n    output = output.replace(/^(-\\s*?|\\*\\s*?|_\\s*?){3,}\\s*$/gm, '')\n\n    try {\n      if (options.stripListLeaders) {\n        if (options.listUnicodeChar)\n          output = output.replace(/^([\\s\\t]*)([\\*\\-\\+]|\\d+\\.)\\s+/gm, options.listUnicodeChar + ' $1')\n        else output = output.replace(/^([\\s\\t]*)([\\*\\-\\+]|\\d+\\.)\\s+/gm, '$1')\n      }\n      if (options.gfm) {\n        output = output\n          // Header\n          .replace(/\\n={2,}/g, '\\n')\n          // Fenced codeblocks\n          .replace(/~{3}.*\\n/g, '')\n          // Strikethrough\n          .replace(/~~/g, '')\n          // Fenced codeblocks\n          .replace(/`{3}.*\\n/g, '')\n      }\n      output = output\n        // Remove HTML tags\n        .replace(/<[^>]*>/g, '')\n        // Remove setext-style headers\n        .replace(/^[=\\-]{2,}\\s*$/g, '')\n        // Remove footnotes?\n        .replace(/\\[\\^.+?\\](\\: .*?$)?/g, '')\n        .replace(/\\s{0,2}\\[.*?\\]: .*?$/g, '')\n        // Remove images\n        .replace(/\\!\\[(.*?)\\][\\[\\(].*?[\\]\\)]/g, options.useImgAltText ? '$1' : '')\n        // Remove inline links\n        .replace(/\\[(.*?)\\][\\[\\(].*?[\\]\\)]/g, '$1')\n        // Remove blockquotes\n        .replace(/^\\s{0,3}>\\s?/g, '')\n        // Remove reference-style links?\n        .replace(/^\\s{1,2}\\[(.*?)\\]: (\\S+)( \".*?\")?\\s*$/g, '')\n        // Remove atx-style headers\n        .replace(/^(\\n)?\\s{0,}#{1,6}\\s+| {0,}(\\n)?\\s{0,}#{0,} {0,}(\\n)?\\s{0,}$/gm, '$1$2$3')\n        // Remove emphasis (repeat the line to remove double emphasis)\n        .replace(/([\\*_]{1,3})(\\S.*?\\S{0,1})\\1/g, '$2')\n        .replace(/([\\*_]{1,3})(\\S.*?\\S{0,1})\\1/g, '$2')\n        // Remove code blocks\n        .replace(/(`{3,})(.*?)\\1/gm, '$2')\n        // Remove inline code\n        .replace(/`(.+?)`/g, '$1')\n        // Replace two or more newlines with exactly two? Not entirely sure this belongs here...\n        .replace(/\\n{2,}/g, '\\n\\n')\n    } catch (e) {\n      console.error(e)\n      return md\n    }\n    return output\n  }\n\n  public floatStr(input: string | number) {\n    if (input) {\n      if (typeof input === 'number') {\n        input = input.toString()\n      }\n      return parseFloat(input.replace(',', '.')).toFixed(2)\n    }\n    return '0.00'\n  }\n}\n","import { ActivatedRouteSnapshot, CanDeactivateFn, RouterStateSnapshot } from '@angular/router';\nimport { Injectable, inject, importProvidersFrom } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nexport interface VerifyDeactivate {\n  verifyDeactivate: () => boolean | Observable<boolean>;\n}\n\nexport const verifyDeactivate: CanDeactivateFn<VerifyDeactivate> = (\n  component: VerifyDeactivate,\n  currentRoute: ActivatedRouteSnapshot,\n  currentState: RouterStateSnapshot,\n  nextState: RouterStateSnapshot\n) => {\n  return component.verifyDeactivate();\n};\n","import { provideHttpClient, withInterceptorsFromDi, withXhr } from '@angular/common/http';\nimport {\n  EnvironmentProviders,\n  inject,\n  isDevMode,\n  provideAppInitializer,\n  Provider,\n} from '@angular/core';\nimport { provideRouter, Route } from '@angular/router';\nimport { provideServiceWorker } from '@angular/service-worker';\nimport { provideEffects } from '@ngrx/effects';\nimport { provideState, provideStore } from '@ngrx/store';\nimport {\n  ModalRegistryOptions,\n  provideRlbBootstrap,\n  ToastRegistryOptions,\n} from '@open-rlb/ng-bootstrap';\nimport { provideRlbCodeBrowserOAuth } from './lib/auth/auth.provider';\nimport {\n  ProjectConfiguration,\n  RLB_CFG,\n  RLB_CFG_ACL,\n  RLB_CFG_CMS,\n  RLB_CFG_ENV,\n  RLB_CFG_I18N,\n  RLB_CFG_PAGES,\n} from './lib/configuration';\nimport { ErrorModalComponent } from './lib/modals/error-modal.component';\nimport { ModalAppsComponent } from './lib/modals/modal-apps.component';\nimport { getDefaultRoutes } from './lib/pages/shared.routes';\nimport { RlbAppModule } from './lib/rlb-app.module';\nimport { AppDescriber } from './lib/services/apps/app-describer';\nimport { provideRlbI18n } from './lib/services/i18n/i18n.provider';\nimport { RLB_APPS } from './lib/store';\nimport { AppContextEffects } from './lib/store/app-context/app-context.effects';\nimport { appFeature } from './lib/store/app-context/app-context.reducer';\nimport { AuthEffects } from './lib/store/auth/auth.effects';\nimport { authsFeature } from './lib/store/auth/auth.reducer';\nimport { navbarsFeature } from './lib/store/navbar/navbar.reducer';\nimport { sidebarsFeature } from './lib/store/sidebar/sidebar.reducer';\nimport { ToastComponent } from './lib/toasts/error-toast.component';\nimport { AuthenticationService } from './lib/auth';\nimport { AppsService } from './lib/services';\n\nexport * from './lib/auth';\nexport * from './lib/guards';\nexport * from './lib/modals';\nexport * from './lib/pages/shared.routes';\nexport * from './lib/pipes';\nexport * from './lib/services';\nexport * from './lib/store';\nexport * from './lib/templates';\nexport * from './lib/toasts';\n\nexport * from './lib/configuration';\nexport * from './lib/rlb-app.module';\n\nexport function provideRlbConfig<T = { [k: string]: any }>(\n  env: ProjectConfiguration<T>,\n): (EnvironmentProviders | Provider)[] {\n  return [\n    provideRlbBootstrap(),\n    RlbAppModule,\n    provideStore(),\n    provideState(authsFeature),\n    provideEffects(AuthEffects, AppContextEffects),\n    provideState(navbarsFeature),\n    provideState(sidebarsFeature),\n    provideState(appFeature),\n    provideRouter(getDefaultRoutes(env.pages)),\n    provideRlbCodeBrowserOAuth(env.auth),\n    provideRlbI18n(env.i18n),\n    provideHttpClient(withXhr(), withInterceptorsFromDi()),\n    provideServiceWorker('ngsw-worker.js', {\n      enabled: !isDevMode(),\n      registrationStrategy: 'registerWhenStable:15000',\n    }),\n    provideAppInitializer(() => {\n      inject(AppsService);\n    }),\n    provideAppInitializer(() => {\n      // From here starts all pipeline: checkAuthMultiple -> resourcesByUser -> finalizeApp -> orchestration in appsService\n      const authService = inject(AuthenticationService);\n      return authService.checkAuthMultiple();\n    }),\n    { provide: RLB_CFG, useValue: env },\n    { provide: RLB_CFG_ENV, useValue: env.environment },\n    { provide: RLB_CFG_CMS, useValue: env.cms },\n    { provide: RLB_CFG_PAGES, useValue: env.pages },\n    { provide: RLB_CFG_I18N, useValue: env.i18n },\n    { provide: RLB_CFG_ACL, useValue: env.acl },\n    {\n      provide: ModalRegistryOptions,\n      useValue: {\n        modals: {\n          'modal-apps-component': ModalAppsComponent,\n          'error-modal-component': ErrorModalComponent,\n        },\n      },\n      multi: true,\n    },\n    {\n      provide: ToastRegistryOptions,\n      useValue: {\n        toasts: {\n          'toast-component': ToastComponent,\n        },\n      },\n      multi: true,\n    },\n  ];\n}\n\n/**\n * Registers an app with the shell: its `AppInfo`, its routes and its providers.\n *\n * **`app.providers` and `app.routes` land in the root injector on every domain.** `AppInfo.domains`\n * gates what the shell shows and which app the router selects — it does not gate registration, and\n * cannot: `AppsService` needs every `AppInfo` for the app hub, for domain filtering and for\n * `findAppForPath`, and unregistering routes would turn a cross-tenant deep link into a shell 404\n * instead of letting the guards answer it.\n *\n * So anything in `providers` that must only run on some domains — an HTTP interceptor, an app\n * initializer — has to say so itself. Wrap it in {@link provideForDomains}.\n */\nexport function provideApp(app: AppDescriber): (EnvironmentProviders | Provider)[] {\n  const routesPaths = app.routes ? flattenRoutes(app.routes) : [];\n\n  const providers: (EnvironmentProviders | Provider)[] = [\n    {\n      provide: RLB_APPS,\n      useValue: {\n        ...app.info,\n        routes: routesPaths,\n      },\n      multi: true,\n    },\n  ];\n  if (app.routes) {\n    providers.push(provideRouter(app.routes));\n  }\n  if (app.providers) {\n    providers.push(...app.providers);\n  }\n  return providers;\n}\n\nfunction flattenRoutes(routes: Route[], parentPath = ''): string[] {\n  return routes.flatMap(route => {\n    const fullPath = route.path ? `${parentPath}${parentPath && '/'}${route.path}` : parentPath;\n    const childPaths = route.children ? flattenRoutes(route.children, fullPath) : [];\n    return route.path ? [fullPath, ...childPaths] : childPaths;\n  });\n}\n"],"mappings":";;;;;;;;;;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