{"version":3,"file":"scion-workbench-client.mjs","sources":["../../../../projects/scion/workbench-client/src/lib/view/workbench-view.model.ts","../../../../projects/scion/workbench-client/src/lib/ɵworkbench-commands.ts","../../../../projects/scion/workbench-client/src/lib/observable-decorator.ts","../../../../projects/scion/workbench-client/src/lib/view/ɵworkbench-view.model.ts","../../../../projects/scion/workbench-client/src/lib/workbench.model.ts","../../../../projects/scion/workbench-client/src/lib/view/workbench-view-initializer.ts","../../../../projects/scion/workbench-client/src/lib/routing/workbench-router.service.ts","../../../../projects/scion/workbench-client/src/lib/popup/workbench-popup.service.ts","../../../../projects/scion/workbench-client/src/lib/popup/workbench-popup.model.ts","../../../../projects/scion/workbench-client/src/lib/popup/workbench-popup-context.ts","../../../../projects/scion/workbench-client/src/lib/popup/ɵworkbench-popup.model.ts","../../../../projects/scion/workbench-client/src/lib/popup/workbench-popup-initializer.ts","../../../../projects/scion/workbench-client/src/lib/message-box/workbench-message-box.service.ts","../../../../projects/scion/workbench-client/src/lib/notification/workbench-notification.service.ts","../../../../projects/scion/workbench-client/src/lib/theme/workbench-theme-monitor.ts","../../../../projects/scion/workbench-client/src/lib/theme/ɵworkbench-theme-monitor.ts","../../../../projects/scion/workbench-client/src/lib/dialog/ɵworkbench-dialog-context.ts","../../../../projects/scion/workbench-client/src/lib/dialog/workbench-dialog.model.ts","../../../../projects/scion/workbench-client/src/lib/dialog/ɵworkbench-dialog.model.ts","../../../../projects/scion/workbench-client/src/lib/dialog/workbench-dialog-initializer.ts","../../../../projects/scion/workbench-client/src/lib/dialog/workbench-dialog.service.ts","../../../../projects/scion/workbench-client/src/lib/workbench-capabilities.enum.ts","../../../../projects/scion/workbench-client/src/lib/dialog/ɵworkbench-dialog.service.ts","../../../../projects/scion/workbench-client/src/lib/message-box/ɵworkbench-message-box.model.ts","../../../../projects/scion/workbench-client/src/lib/message-box/workbench-message-box.model.ts","../../../../projects/scion/workbench-client/src/lib/message-box/ɵworkbench-message-box-context.ts","../../../../projects/scion/workbench-client/src/lib/message-box/workbench-message-box-initializer.ts","../../../../projects/scion/workbench-client/src/lib/message-box/workbench-message-box-command.ts","../../../../projects/scion/workbench-client/src/lib/message-box/ɵworkbench-message-box.service.ts","../../../../projects/scion/workbench-client/src/lib/style-sheet-installer.ts","../../../../projects/scion/workbench-client/src/lib/text/workbench-text-provider.ts","../../../../projects/scion/workbench-client/src/lib/text/workbench-text.service.ts","../../../../projects/scion/workbench-client/src/lib/text/ɵworkbench-text.service.ts","../../../../projects/scion/workbench-client/src/lib/part/ɵworkbench-part.model.ts","../../../../projects/scion/workbench-client/src/lib/part/workbench-part.model.ts","../../../../projects/scion/workbench-client/src/lib/part/ɵworkbench-part-context.ts","../../../../projects/scion/workbench-client/src/lib/part/workbench-part-initializer.ts","../../../../projects/scion/workbench-client/src/lib/workbench.identifiers.ts","../../../../projects/scion/workbench-client/src/lib/popup/ɵworkbench-popup.service.ts","../../../../projects/scion/workbench-client/src/lib/routing/ɵworkbench-router.service.ts","../../../../projects/scion/workbench-client/src/lib/notification/workbench-notification-command.ts","../../../../projects/scion/workbench-client/src/lib/notification/ɵworkbench-notification.service.ts","../../../../projects/scion/workbench-client/src/lib/notification/ɵworkbench-notification.model.ts","../../../../projects/scion/workbench-client/src/lib/notification/ɵworkbench-notification-context.ts","../../../../projects/scion/workbench-client/src/lib/notification/workbench-notification.model.ts","../../../../projects/scion/workbench-client/src/lib/notification/workbench-notification-initializer.ts","../../../../projects/scion/workbench-client/src/lib/workbench-client.ts","../../../../projects/scion/workbench-client/src/lib/common/public_api.ts","../../../../projects/scion/workbench-client/src/lib/dialog/public_api.ts","../../../../projects/scion/workbench-client/src/lib/message-box/public_api.ts","../../../../projects/scion/workbench-client/src/lib/notification/public_api.ts","../../../../projects/scion/workbench-client/src/lib/perspective/workbench-perspective-capability.ts","../../../../projects/scion/workbench-client/src/lib/perspective/public_api.ts","../../../../projects/scion/workbench-client/src/lib/popup/public_api.ts","../../../../projects/scion/workbench-client/src/lib/routing/public_api.ts","../../../../projects/scion/workbench-client/src/lib/text/public_api.ts","../../../../projects/scion/workbench-client/src/lib/theme/public_api.ts","../../../../projects/scion/workbench-client/src/lib/view/public_api.ts","../../../../projects/scion/workbench-client/src/lib/part/public_api.ts","../../../../projects/scion/workbench-client/src/lib/public_api.ts","../../../../projects/scion/workbench-client/src/public-api.ts","../../../../projects/scion/workbench-client/src/scion-workbench-client.ts"],"sourcesContent":["/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {Observable} from 'rxjs';\nimport {WorkbenchViewCapability} from './workbench-view-capability';\nimport {PartId, ViewId} from '../workbench.identifiers';\nimport {Translatable} from '../text/workbench-text-provider.model';\n\n/**\n * A view is a visual workbench element for displaying content stacked or side-by-side in the workbench layout.\n *\n * Users can drag views from one part to another, even across windows, or place them side-by-side, horizontally and vertically.\n *\n * The view microfrontend can inject this handle to interact with the view.\n *\n * @category View\n * @see WorkbenchViewCapability\n */\nexport abstract class WorkbenchView {\n\n  /**\n   * Identity of this view.\n   */\n  public abstract readonly id: ViewId;\n\n  /**\n   * Signals readiness, notifying the workbench that this view has completed initialization.\n   *\n   * If `showSplash` is set to `true` on the view capability, the workbench displays a splash until the view microfrontend signals readiness.\n   *\n   * @see WorkbenchViewCapability.properties.showSplash\n   */\n  public abstract signalReady(): void;\n\n  /**\n   * Capability of the microfrontend loaded into the view.\n   *\n   * Upon subscription, emits the microfrontend's capability, and then emits continuously when navigating to a different microfrontend\n   * of the same application. It completes when navigating to a microfrontend of another application.\n   */\n  public abstract readonly capability$: Observable<WorkbenchViewCapability>;\n\n  /**\n   * Parameters passed to the microfrontend loaded into the view.\n   *\n   * Upon subscription, emits the microfrontend's parameters, and then emits continuously when the parameters change.\n   * The Observable completes when navigating to a microfrontend of another application, but not when navigating to a different microfrontend\n   * of the same application.\n   */\n  public abstract readonly params$: Observable<Map<string, unknown>>;\n\n  /**\n   * The current snapshot of this view.\n   */\n  public abstract readonly snapshot: ViewSnapshot;\n\n  /**\n   * Indicates whether this view is active.\n   *\n   * Upon subscription, emits the active state of this view, and then emits continuously when it changes.\n   * The Observable completes when navigating to a microfrontend of another application, but not when navigating to a different microfrontend\n   * of the same application.\n   */\n  public abstract readonly active$: Observable<boolean>;\n\n  /**\n   * Indicates whether this view has the focus.\n   *\n   * Upon subscription, emits the focused state of this view, and then emits continuously when it changes.\n   * The Observable completes when navigating to a microfrontend of another application, but not when navigating to a different microfrontend\n   * of the same application.\n   */\n  public abstract readonly focused$: Observable<boolean>;\n\n  /**\n   * Gets the identity of the part that contains this view.\n   *\n   * Upon subscription, emits the identity of this view's part, and then emits continuously when it changes.\n   * The Observable completes when navigating to a microfrontend of another application, but not when navigating to a different microfrontend\n   * of the same application.\n   */\n  public abstract readonly partId$: Observable<PartId>;\n\n  /**\n   * Sets the title to be displayed in the view tab.\n   *\n   * Can be text or a translation key. A translation key starts with the percent symbol (`%`) and may include parameters in matrix notation for text interpolation.\n   */\n  public abstract setTitle(title: Translatable): void;\n\n  /**\n   * Sets the subtitle to be displayed in the view tab.\n   *\n   * Can be text or a translation key. A translation key starts with the percent symbol (`%`) and may include parameters in matrix notation for text interpolation.\n   */\n  public abstract setHeading(heading: Translatable): void;\n\n  /**\n   * Sets whether this view is dirty or pristine. When navigating to another microfrontend, the view's dirty state is set to pristine.\n   *\n   * You can provide the dirty/pristine state either as a boolean or as Observable. If you pass an Observable, it will be unsubscribed when\n   * navigating to another microfrontend, whether from the same app or a different one.\n   *\n   * If not passing an argument, the view is marked as dirty. To mark it as pristine, you need to pass `false`.\n   */\n  public abstract markDirty(dirty?: boolean | Observable<boolean>): void;\n\n  /**\n   * Controls whether the user should be allowed to close this workbench view.\n   *\n   * You can provide either a boolean or Observable. If you pass an Observable, it will be unsubscribed when navigating to another microfrontend,\n   * whether from the same app or a different one.\n   */\n  public abstract setClosable(closable: boolean | Observable<boolean>): void;\n\n  /**\n   * Initiates the closing of this workbench view.\n   */\n  public abstract close(): void;\n\n  /**\n   * Registers a guard to confirm closing the view, replacing any previous guard.\n   *\n   * Example:\n   * ```ts\n   * Beans.get(WorkbenchView).canClose(async () => {\n   *   const action = await Beans.get(WorkbenchMessageBoxService).open('Do you want to save changes?', {\n   *     actions: {\n   *       yes: 'Yes',\n   *       no: 'No',\n   *       cancel: 'Cancel'\n   *     }\n   *   });\n   *\n   *   switch (action) {\n   *     case 'yes':\n   *       // Store changes ...\n   *       return true;\n   *     case 'no':\n   *       return true;\n   *     default:\n   *       return false;\n   *   }\n   * });\n   * ```\n   *\n   * @param canClose - Callback to confirm closing the view.\n   * @returns Reference to the `CanClose` guard, which can be used to unregister the guard.\n   */\n  public abstract canClose(canClose: CanCloseFn): CanCloseRef;\n}\n\n/**\n * The signature of a function to confirm closing a view., e.g., if dirty.\n */\nexport type CanCloseFn = () => Observable<boolean> | Promise<boolean> | boolean;\n\n/**\n * Reference to the `CanClose` guard registered on a view.\n */\nexport interface CanCloseRef {\n\n  /**\n   * Removes the `CanClose` guard from the view.\n   *\n   * Has no effect if another guard was registered in the meantime.\n   */\n  dispose(): void;\n}\n\n/**\n * Provides information about a view displayed at a particular moment in time.\n *\n * @category View\n */\nexport interface ViewSnapshot {\n  /**\n   * Capability of the microfrontend loaded into the view.\n   */\n  capability: WorkbenchViewCapability;\n  /**\n   * Parameters passed to the microfrontend loaded into the view.\n   */\n  params: Map<string, unknown>;\n  /**\n   * The identity of the part that contains the view.\n   */\n  partId: PartId;\n  /**\n   * Indicates whether this view is active.\n   */\n  active: boolean;\n  /**\n   * Indicates whether this view has the focus.\n   */\n  focused: boolean;\n}\n","/*\n * Copyright (c) 2018-2026 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {DialogId, NotificationId, PartId, PopupId, ViewId} from './workbench.identifiers';\n\n/**\n * Defines command endpoints for the communication between SCION Workbench and SCION Workbench Client.\n *\n * @docs-private Not public API. For internal use only.\n */\nexport const ɵWorkbenchCommands = {\n\n  /**\n   * Computes the topic via which the title of a workbench view tab can be set.\n   */\n  viewTitleTopic: (viewId: ViewId | ':viewId') => `ɵworkbench/views/${viewId}/title`,\n\n  /**\n   * Computes the topic via which the heading of a workbench view tab can be set.\n   */\n  viewHeadingTopic: (viewId: ViewId | ':viewId') => `ɵworkbench/views/${viewId}/heading`,\n\n  /**\n   * Computes the topic via which a view tab can be marked dirty or pristine.\n   */\n  viewDirtyTopic: (viewId: ViewId | ':viewId') => `ɵworkbench/views/${viewId}/dirty`,\n\n  /**\n   * Computes the topic via which a view tab can be made closable.\n   */\n  viewClosableTopic: (viewId: ViewId | ':viewId') => `ɵworkbench/views/${viewId}/closable`,\n\n  /**\n   * Computes the topic via which a view can be closed.\n   */\n  viewCloseTopic: (viewId: ViewId | ':viewId') => `ɵworkbench/views/${viewId}/close`,\n\n  /**\n   * Computes the topic to notify the active state of a view.\n   *\n   * The active state is published as a retained message.\n   */\n  viewActiveTopic: (viewId: ViewId) => `ɵworkbench/views/${viewId}/active`,\n\n  /**\n   * Computes the topic to notify the active state of a part.\n   *\n   * The active state is published as a retained message.\n   */\n  partActiveTopic: (partId: PartId) => `ɵworkbench/parts/${partId}/active`,\n\n  /**\n   * Computes the topic to notify the focused state of a view.\n   *\n   * The focused state is published as a retained message.\n   */\n  viewFocusedTopic: (viewId: ViewId) => `ɵworkbench/views/${viewId}/focused`,\n\n  /**\n   * Computes the topic to notify the focused state of a part.\n   *\n   * The focused state is published as a retained message.\n   */\n  partFocusedTopic: (partId: PartId) => `ɵworkbench/parts/${partId}/focused`,\n\n  /**\n   * Computes the topic to notify the part of a view.\n   *\n   * The part identity is published as a retained message.\n   */\n  viewPartIdTopic: (viewId: ViewId) => `ɵworkbench/views/${viewId}/part/id`,\n\n  /**\n   * Computes the topic to request closing confirmation of a view.\n   *\n   * When closing a view and if the microfrontend has subscribed to this topic, the workbench requests closing confirmation\n   * via this topic. By sending a `true` reply, the workbench continues with closing the view, by sending a `false` reply,\n   * closing is prevented.\n   */\n  canCloseTopic: (viewId: ViewId) => `ɵworkbench/views/${viewId}/canClose`,\n\n  /**\n   * Computes the topic for signaling that a microfrontend is about to be replaced by a microfrontend of another app.\n   */\n  viewUnloadingTopic: (viewId: ViewId) => `ɵworkbench/views/${viewId}/unloading`,\n\n  /**\n   * Computes the topic for updating params of a microfrontend view.\n   */\n  viewParamsUpdateTopic: (viewId: ViewId, viewCapabilityId: string) => `ɵworkbench/views/${viewId}/capabilities/${viewCapabilityId}/params/update`,\n\n  /**\n   * Computes the topic for providing params to a view microfrontend.\n   *\n   * Params include the {@link ɵMicrofrontendRouteParams#ɵVIEW_CAPABILITY_ID capability id} and params as passed in {@link WorkbenchNavigationExtras.params}.\n   *\n   * Params are published as a retained message.\n   */\n  viewParamsTopic: (viewId: ViewId) => `ɵworkbench/views/${viewId}/params`,\n\n  /**\n   * Computes the topic for observing the popup origin.\n   */\n  popupOriginTopic: (popupId: PopupId) => `ɵworkbench/popups/${popupId}/origin`,\n\n  /**\n   * Computes the topic to notify the focused state of a popup.\n   *\n   * The focused state is published as a retained message.\n   */\n  popupFocusedTopic: (popupId: PopupId) => `ɵworkbench/popups/${popupId}/focused`,\n\n  /**\n   * Computes the topic via which a popup can be closed.\n   */\n  popupCloseTopic: (popupId: PopupId) => `ɵworkbench/popups/${popupId}/close`,\n\n  /**\n   * Computes the topic via which to set a result\n   */\n  popupResultTopic: (popupId: PopupId) => `ɵworkbench/popups/${popupId}/result`,\n\n  /**\n   * Computes the topic via which the title of a dialog can be set.\n   */\n  dialogTitleTopic: (dialogId: DialogId) => `ɵworkbench/dialogs/${dialogId}/title`,\n\n  /**\n   * Computes the topic to notify the focused state of a dialog.\n   *\n   * The focused state is published as a retained message.\n   */\n  dialogFocusedTopic: (dialogId: DialogId) => `ɵworkbench/dialogs/${dialogId}/focused`,\n\n  /**\n   * Computes the topic via which a dialog can be closed.\n   */\n  dialogCloseTopic: (dialogId: DialogId) => `ɵworkbench/dialogs/${dialogId}/close`,\n\n  /**\n   * Computes the topic to notify the focused state of a notification.\n   *\n   * The focused state is published as a retained message.\n   */\n  notificationFocusedTopic: (notificationId: NotificationId) => `ɵworkbench/notifications/${notificationId}/focused`,\n\n  /**\n   * Computes the topic via which a notification can be closed.\n   */\n  notificationCloseTopic: (notificationId: NotificationId) => `ɵworkbench/notifications/${notificationId}/close`,\n} as const;\n","/*\n * Copyright (c) 2018-2022 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {MonoTypeOperatorFunction, Observable} from 'rxjs';\nimport {Beans} from '@scion/toolkit/bean-manager';\nimport {ObservableDecorator} from '@scion/microfrontend-platform';\n\n/**\n * Decorates the source with registered {@link ObservableDecorator}, if any.\n *\n * @internal\n */\nexport function decorateObservable<T>(): MonoTypeOperatorFunction<T> {\n  return (source$: Observable<T>) => Beans.opt(ObservableDecorator)?.decorate$(source$) ?? source$;\n}\n","/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {Beans, PreDestroy} from '@scion/toolkit/bean-manager';\nimport {combineLatest, firstValueFrom, merge, Observable, OperatorFunction, pipe, Subject, Subscription} from 'rxjs';\nimport {WorkbenchViewCapability} from './workbench-view-capability';\nimport {ManifestService, mapToBody, MessageClient, MicrofrontendPlatformClient} from '@scion/microfrontend-platform';\nimport {ɵWorkbenchCommands} from '../ɵworkbench-commands';\nimport {distinctUntilChanged, filter, map, mergeMap, shareReplay, skip, switchMap, takeUntil, tap} from 'rxjs/operators';\nimport {Observables} from '@scion/toolkit/util';\nimport {CanCloseFn, CanCloseRef, ViewSnapshot, WorkbenchView} from './workbench-view.model';\nimport {decorateObservable} from '../observable-decorator';\nimport {PartId, ViewId} from '../workbench.identifiers';\nimport {Translatable} from '../text/workbench-text-provider.model';\n\nexport class ɵWorkbenchView implements WorkbenchView, PreDestroy {\n\n  private _propertyChange$ = new Subject<'dirty' | 'closable'>();\n  private _destroy$ = new Subject<void>();\n  /**\n   * Observable that emits when the application loaded into the current view receives an unloading event,\n   * i.e., is just about to be replaced by a microfrontend of another application.\n   */\n  private _beforeUnload$: Observable<void>;\n  /**\n   * Observable that emits before navigating to a different microfrontend of the same app.\n   */\n  private _beforeInAppNavigation$ = new Subject<void>();\n  private _canCloseFn: CanCloseFn | undefined;\n  private _canCloseSubscription: Subscription | undefined;\n\n  public active$: Observable<boolean>;\n  public focused$: Observable<boolean>;\n  public partId$: Observable<PartId>;\n  public params$: Observable<Map<string, unknown>>;\n  public capability$: Observable<WorkbenchViewCapability>;\n  public whenProperties: Promise<void>;\n  public snapshot: ViewSnapshot = {\n    params: new Map<string, unknown>(),\n    partId: undefined!,\n    active: false,\n    focused: false,\n    capability: undefined!,\n  };\n\n  constructor(public id: ViewId) {\n    this._beforeUnload$ = Beans.get(MessageClient).observe$<void>(ɵWorkbenchCommands.viewUnloadingTopic(this.id))\n      .pipe(map(() => undefined), shareReplay({refCount: false, bufferSize: 1}));\n\n    this.params$ = Beans.get(MessageClient).observe$<Map<string, unknown>>(ɵWorkbenchCommands.viewParamsTopic(this.id))\n      .pipe(\n        mapToBody(),\n        shareReplay({refCount: false, bufferSize: 1}),\n        decorateObservable(),\n        takeUntil(merge(this._beforeUnload$, this._destroy$)),\n      );\n\n    this.capability$ = this.params$\n      .pipe(\n        map(params => params.get(ɵVIEW_CAPABILITY_ID_PARAM_NAME) as string),\n        lookupViewCapabilityAndShareReplay(),\n        decorateObservable(),\n        takeUntil(this._beforeUnload$),\n      );\n\n    this.active$ = Beans.get(MessageClient).observe$<boolean>(ɵWorkbenchCommands.viewActiveTopic(this.id))\n      .pipe(\n        mapToBody(),\n        shareReplay({refCount: false, bufferSize: 1}),\n        decorateObservable(),\n        takeUntil(this._beforeUnload$),\n      );\n\n    this.focused$ = Beans.get(MessageClient).observe$<boolean>(ɵWorkbenchCommands.viewFocusedTopic(this.id))\n      .pipe(\n        mapToBody(),\n        shareReplay({refCount: false, bufferSize: 1}),\n        decorateObservable(),\n        takeUntil(this._beforeUnload$),\n      );\n\n    this.partId$ = Beans.get(MessageClient).observe$<PartId>(ɵWorkbenchCommands.viewPartIdTopic(this.id))\n      .pipe(\n        mapToBody(),\n        shareReplay({refCount: false, bufferSize: 1}),\n        decorateObservable(),\n        takeUntil(this._beforeUnload$),\n      );\n    // Update part id snapshot when part changes.\n    this.partId$\n      .pipe(takeUntil(this._destroy$))\n      .subscribe(partId => this.snapshot.partId = partId);\n    // Update params snapshot when params change.\n    this.params$\n      .pipe(takeUntil(this._destroy$))\n      .subscribe(params => this.snapshot.params = new Map(params));\n    // Update active snapshot when the active state changes.\n    this.active$\n      .pipe(takeUntil(this._destroy$))\n      .subscribe(active => this.snapshot.active = active);\n    // Update active snapshot when the focus state changes.\n    this.focused$\n      .pipe(takeUntil(this._destroy$))\n      .subscribe(focused => this.snapshot.focused = focused);\n    // Update capability snapshot when the capability changes.\n    this.capability$\n      .pipe(takeUntil(this._destroy$))\n      .subscribe(capability => this.snapshot.capability = capability);\n    // Detect navigation to a different view capability of the same app.\n    // Do NOT use `capability$` observable to detect capability change, as its lookup is asynchronous.\n    this.params$\n      .pipe(\n        map(params => params.get(ɵVIEW_CAPABILITY_ID_PARAM_NAME) as string),\n        distinctUntilChanged(),\n        skip(1), // skip the initial navigation\n        takeUntil(merge(this._beforeUnload$, this._destroy$)),\n      )\n      .subscribe(() => {\n        this._beforeInAppNavigation$.next();\n        this._canCloseFn = undefined;\n        this._canCloseSubscription?.unsubscribe();\n        this._canCloseSubscription = undefined;\n      });\n\n    // Signal view properties available.\n    this.whenProperties = firstValueFrom(combineLatest([this.partId$, this.params$, this.capability$])).then();\n  }\n\n  /** @inheritDoc */\n  public signalReady(): void {\n    MicrofrontendPlatformClient.signalReady();\n  }\n\n  /** @inheritDoc */\n  public setTitle(title: Translatable): void {\n    void Beans.get(MessageClient).publish(ɵWorkbenchCommands.viewTitleTopic(this.id), title);\n  }\n\n  /** @inheritDoc */\n  public setHeading(heading: Translatable): void {\n    void Beans.get(MessageClient).publish(ɵWorkbenchCommands.viewHeadingTopic(this.id), heading);\n  }\n\n  /** @inheritDoc */\n  public markDirty(dirty: undefined | boolean | Observable<boolean>): void {\n    this._propertyChange$.next('dirty');\n\n    Observables.coerce(dirty ?? true)\n      .pipe(\n        mergeMap(it => Beans.get(MessageClient).publish(ɵWorkbenchCommands.viewDirtyTopic(this.id), it)),\n        takeUntil(merge(this._propertyChange$.pipe(filter(prop => prop === 'dirty')), this._beforeInAppNavigation$, this._beforeUnload$, this._destroy$)),\n      )\n      .subscribe();\n  }\n\n  /** @inheritDoc */\n  public setClosable(closable: boolean | Observable<boolean>): void {\n    this._propertyChange$.next('closable');\n\n    Observables.coerce(closable)\n      .pipe(\n        mergeMap(it => Beans.get(MessageClient).publish(ɵWorkbenchCommands.viewClosableTopic(this.id), it)),\n        takeUntil(merge(this._propertyChange$.pipe(filter(prop => prop === 'closable')), this._beforeInAppNavigation$, this._beforeUnload$, this._destroy$)),\n      )\n      .subscribe();\n  }\n\n  /** @inheritDoc */\n  public close(): void {\n    void Beans.get(MessageClient).publish(ɵWorkbenchCommands.viewCloseTopic(this.id));\n  }\n\n  /** @inheritDoc */\n  public canClose(canClose: CanCloseFn): CanCloseRef {\n    this._canCloseFn = canClose;\n    this._canCloseSubscription ??= Beans.get(MessageClient).onMessage(ɵWorkbenchCommands.canCloseTopic(this.id), () => this._canCloseFn?.() ?? true);\n    return {\n      dispose: () => {\n        if (canClose === this._canCloseFn) {\n          this._canCloseSubscription!.unsubscribe();\n          this._canCloseSubscription = undefined;\n          this._canCloseFn = undefined;\n        }\n      },\n    };\n  }\n\n  public preDestroy(): void {\n    this._canCloseSubscription?.unsubscribe();\n    this._canCloseSubscription = undefined;\n    this._destroy$.next();\n  }\n}\n\n/**\n * Context key for obtaining the view ID using {@link ContextService}.\n *\n * @docs-private Not public API. For internal use only.\n * @ignore\n * @see {@link ContextService}\n */\nexport const ɵVIEW_ID_CONTEXT_KEY = 'ɵworkbench.view.id';\n\n/**\n * Parameter name for obtaining the capability id in a microfrontend view.\n *\n * @docs-private Not public API. For internal use only.\n * @ignore\n */\nexport const ɵVIEW_CAPABILITY_ID_PARAM_NAME = 'ɵViewCapabilityId';\n\n/**\n * Looks up the corresponding view capability for each capability id emitted by the source Observable.\n *\n * For new subscribers, the most recently looked up capability is replayed. It is guaranteed that no stale capability\n * is replayed, that is, that the replayed capability always corresponds to the most recent emitted capability id of\n * the source Observable.\n */\nfunction lookupViewCapabilityAndShareReplay(): OperatorFunction<string, WorkbenchViewCapability> {\n  let latestViewCapabilityId: string;\n\n  return pipe(\n    distinctUntilChanged(),\n    tap(viewCapabilityId => latestViewCapabilityId = viewCapabilityId),\n    switchMap(viewCapabilityId => Beans.get(ManifestService).lookupCapabilities$<WorkbenchViewCapability>({id: viewCapabilityId})), // async call; long-living\n    map(viewCapabilities => viewCapabilities[0]!),\n    // Replay the latest looked up capability for new subscribers.\n    shareReplay({refCount: false, bufferSize: 1}),\n    // Ensure not to replay a stale capability upon the subscription of new subscribers. For this reason, we install a filter to filter them out.\n    // The 'shareReplay' operator would replay a stale capability if the source has emitted a new capability id, but the lookup for it did not complete yet.\n    filter(viewCapability => latestViewCapabilityId === viewCapability.metadata!.id),\n  );\n}\n","/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {WorkbenchPart} from './part/workbench-part.model';\nimport {WorkbenchView} from './view/workbench-view.model';\nimport {WorkbenchDialog} from './dialog/workbench-dialog.model';\nimport {WorkbenchPopup} from './popup/workbench-popup.model';\nimport {WorkbenchNotification} from './notification/workbench-notification.model';\n\n/**\n * Union of workbench elements.\n */\nexport type WorkbenchElement = WorkbenchPart | WorkbenchView | WorkbenchDialog | WorkbenchPopup | WorkbenchNotification;\n\n/**\n * Symbol to inject the workbench element available in the current context.\n *\n * @see WorkbenchElement\n */\nexport const WORKBENCH_ELEMENT = Symbol('WORKBENCH_ELEMENT');\n","/*\n * Copyright (c) 2018-2022 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {Beans, Initializer} from '@scion/toolkit/bean-manager';\nimport {ContextService} from '@scion/microfrontend-platform';\nimport {WorkbenchView} from './workbench-view.model';\nimport {ɵVIEW_ID_CONTEXT_KEY, ɵWorkbenchView} from './ɵworkbench-view.model';\nimport {WORKBENCH_ELEMENT} from '../workbench.model';\nimport {ViewId} from '../workbench.identifiers';\n\n/**\n * Registers {@link WorkbenchView} in the bean manager if in the context of a workbench view.\n *\n * @internal\n */\nexport class WorkbenchViewInitializer implements Initializer {\n\n  public async init(): Promise<void> {\n    const viewId = await Beans.get(ContextService).lookup<ViewId>(ɵVIEW_ID_CONTEXT_KEY);\n    if (viewId !== null) {\n      const workbenchView = new ɵWorkbenchView(viewId);\n      Beans.register(WorkbenchView, {useValue: workbenchView});\n      Beans.register(WORKBENCH_ELEMENT, {useExisting: WorkbenchView});\n      // Wait until initialized the view, supporting synchronous access to view properties in microfrontend constructor.\n      await workbenchView.whenProperties;\n    }\n  }\n}\n","/*\n * Copyright (c) 2018-2022 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {Qualifier} from '@scion/microfrontend-platform';\nimport {Empty} from '../common/utility-types';\nimport {PartId} from '../workbench.identifiers';\n\n/**\n * Enables navigation of workbench views.\n *\n * A view is a visual workbench element for displaying content side-by-side or stacked.\n *\n * A microfrontend provided as a view capability can be opened in a view. The qualifier differentiates between different\n * view capabilities. Declaring an intention allows for opening public view capabilities of other applications.\n *\n * @category Router\n * @category View\n */\nexport abstract class WorkbenchRouter {\n\n  /**\n   * Navigates to a microfrontend of a view capability based on the given qualifier and extras.\n   *\n   * By default, the router opens a new view if no view is found that matches the specified qualifier and required params. Optional parameters do not affect view resolution.\n   * If one or more views match the qualifier and required params, they will be navigated instead of opening the microfrontend in a new view tab.\n   * This behavior can be changed by setting an explicit navigation target in navigation extras.\n   *\n   * @param  qualifier - Identifies the view capability that provides the microfrontend to display in a view.\n   *                     Passing an empty qualifier (`{}`) allows the microfrontend to update its parameters, restoring updated parameters when the page reloads.\n   *                     Parameter handling can be controlled using the {@link WorkbenchNavigationExtras#paramsHandling} option.\n   * @param  extras - Options to control navigation.\n   * @return Promise that resolves to `true` on successful navigation, or `false` otherwise.\n   */\n  public abstract navigate(qualifier: Qualifier | Empty<Qualifier>, extras?: WorkbenchNavigationExtras): Promise<boolean>;\n}\n\n/**\n * Options to control the navigation.\n *\n * @category Router\n * @category View\n */\nexport interface WorkbenchNavigationExtras {\n  /**\n   * Passes data to the view.\n   *\n   * The view can declare mandatory and optional parameters. No additional parameters are allowed. Refer to the documentation of the capability for more information.\n   */\n  params?: Map<string, unknown> | {[param: string]: unknown};\n  /**\n   * Instructs the workbench router how to handle params in self-navigation.\n   *\n   * Self-navigation allows the microfrontend to update its parameters, restoring updated parameters when the page reloads.\n   * Setting a `paramsHandling` strategy has no effect on navigations other than self-navigation. A self-navigation is\n   * initiated by passing an empty qualifier.\n   *\n   * One of:\n   * * `replace`: Replaces current parameters (default).\n   * * `merge`:   Merges new parameters with current parameters, with new parameters of equal name overwriting existing parameters.\n   *              A parameter can be removed by passing `undefined` as its value.\n   */\n  paramsHandling?: 'merge' | 'replace';\n  /**\n   * Controls where to open the view. Defaults to `auto`.\n   *\n   * One of:\n   * - `auto`:   Navigates existing views that match the qualifier and required params, or opens a new view otherwise. Optional parameters do not affect view resolution.\n   * - `blank`:  Opens a new view and navigates it.\n   * - `<viewId>`: Navigates the specified view. If already opened, replaces it, or opens a new view otherwise.\n   */\n  target?: string | 'blank' | 'auto';\n  /**\n   * Controls which part to navigate views in.\n   *\n   * If {@link target} is `blank`, opens the view in the specified part.\n   * If {@link target} is `auto`, navigates matching views in the specified part, or opens a new view in that part otherwise.\n   *\n   * If the specified part is not in the layout, opens the view in the active part, with the active part of the main area, if any, taking precedence.\n   */\n  partId?: PartId | string;\n  /**\n   * Instructs the router to activate the view. Defaults to `true`.\n   */\n  activate?: boolean;\n  /**\n   * Closes views that match the specified qualifier and required parameters. Optional parameters do not affect view resolution.\n   *\n   * The parameters support the asterisk wildcard value (`*`) to match views with any value for a parameter.\n   *\n   * Only views for which the application has an intention can be closed.\n   */\n  close?: boolean;\n  /**\n   * Specifies where to insert the view into the tab bar. Has no effect if navigating an existing view. Defaults to after the active view.\n   */\n  position?: number | 'start' | 'end' | 'before-active-view' | 'after-active-view';\n  /**\n   * Specifies CSS class(es) to add to the view, e.g., to locate the view in tests.\n   */\n  cssClass?: string | string[];\n}\n","/*\n * Copyright (c) 2018-2022 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {Qualifier} from '@scion/microfrontend-platform';\nimport {WorkbenchPopupOptions} from './workbench-popup.options';\nimport {WorkbenchPopupConfig} from './workbench-popup.config';\n\n/**\n * Displays a microfrontend in a popup.\n *\n * A popup is a visual workbench element for displaying content above other content. It is positioned relative to an anchor,\n * which can be an element or a coordinate. The popup moves with the anchor. By default, the popup closes on focus loss or\n * when pressing the escape key.\n *\n * A microfrontend provided as a `popup` capability can be opened in a popup. The qualifier differentiates between different\n * popup capabilities. Declaring an intention allows for opening public popup capabilities of other applications.\n *\n * A popup can be bound to a context (e.g., part or view), displaying the popup only if the context is visible and closing\n * it when the context is disposed. Defaults to the calling context.\n *\n * @category Popup\n * @see WorkbenchPopupCapability\n */\nexport abstract class WorkbenchPopupService {\n\n  /**\n   * Opens the microfrontend of a `popup` capability in a workbench popup based on the given qualifier and options.\n   *\n   * An anchor is used to position the popup based on its preferred alignment. The anchor can be an element or a coordinate.\n   *\n   * By default, the popup closes on focus loss or when pressing the escape key.\n   *\n   * @param qualifier - Identifies the popup capability that provides the microfrontend to open in a popup.\n   * @param options - Controls the appearance and behavior of the popup.\n   * @returns Promise that resolves to the popup result, if any, or that rejects if the popup was closed with an error or couldn't be opened,\n   *          e.g., because of missing the intention or because no `popup` capability was found matching the qualifier and is visible to the application.\n   */\n  public abstract open<T>(qualifier: Qualifier, options: WorkbenchPopupOptions | WorkbenchPopupConfig): Promise<T | undefined>; // eslint-disable-line @typescript-eslint/no-duplicate-type-constituents\n}\n","/*\n * Copyright (c) 2018-2024 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {WorkbenchPopupCapability} from './workbench-popup-capability';\nimport {WorkbenchPopupReferrer} from './workbench-popup-referrer';\nimport {Observable} from 'rxjs';\nimport {PopupId} from '../workbench.identifiers';\n\n/**\n * A popup is a visual workbench element for displaying content above other content. The popup is positioned relative\n * to an anchor based on its preferred alignment. The anchor can be an element or a coordinate.\n *\n * The microfrontend can inject this handle to interact with the popup.\n *\n * #### Popup Size\n * Configure the popup with a fixed size in {@link WorkbenchPopupCapability.properties.size}, or report its intrinsic content\n * size using {@link @scion/microfrontend-platform!PreferredSizeService}.\n *\n * @example - Reporting the size of a microfrontend\n * ```ts\n * Beans.get(PreferredSizeService).fromDimension(<Microfrontend HTMLElement>);\n * ```\n *\n * If the content can grow and shrink, e.g., if using expandable panels, position the microfrontend `absolute` to allow infinite\n * space for rendering at its preferred size.\n *\n * Since loading a microfrontend may take time, prefer setting the popup size in the popup capability to avoid flickering when\n * opening the popup.\n *\n * @category Popup\n */\nexport abstract class WorkbenchPopup {\n\n  /**\n   * Identity of this popup.\n   */\n  public abstract readonly id: PopupId;\n\n  /**\n   * Capability of the microfrontend loaded into this popup.\n   */\n  public abstract readonly capability: WorkbenchPopupCapability;\n\n  /**\n   * Parameters passed to the microfrontend loaded into the popup.\n   */\n  public abstract readonly params: Map<string, unknown>;\n\n  /**\n   * Indicates whether this popup has the focus.\n   */\n  public abstract readonly focused$: Observable<boolean>;\n\n  /**\n   * Signals readiness, notifying the workbench that this popup has completed initialization.\n   *\n   * If `showSplash` is set to `true` on the popup capability, the workbench displays a splash until the popup microfrontend signals readiness.\n   *\n   * @see WorkbenchPopupCapability.properties.showSplash\n   */\n  public abstract signalReady(): void;\n\n  /**\n   * Provides information about the context in which this popup was opened.\n   *\n   * @deprecated since version 1.0.0-beta.34. Marked for removal. No replacement. Instead, add a parameter to the popup capability for the popup opener to pass required referrer information.\n   */\n  public abstract readonly referrer: WorkbenchPopupReferrer;\n\n  /**\n   * Sets a result that will be passed to the popup opener when the popup is closed on focus loss {@link CloseStrategy#onFocusLost}.\n   */\n  public abstract setResult<R>(result?: R): void;\n\n  /**\n   * Closes the popup. Optionally, pass a result or an error to the popup opener.\n   */\n  public abstract close<R>(result?: R | Error): void;\n}\n","/*\n * Copyright (c) 2018-2022 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {WorkbenchPopupCapability} from './workbench-popup-capability';\nimport {WorkbenchPopupReferrer} from './workbench-popup-referrer';\nimport {PopupId} from '../workbench.identifiers';\n\n/**\n * Context when displaying a microfrontend in a popup.\n *\n * This object can be obtained from the {@link ContextService} using the name {@link ɵPOPUP_CONTEXT}.\n *\n * @docs-private Not public API. For internal use only.\n * @ignore\n */\nexport interface ɵPopupContext {\n  popupId: PopupId;\n  params: Map<string, unknown>;\n  capability: WorkbenchPopupCapability;\n  /** @deprecated since version 1.0.0-beta.34. No replacement. Marked for removal. */\n  referrer: WorkbenchPopupReferrer;\n}\n\n/**\n * Key for obtaining the current popup context using {@link ContextService}.\n *\n * The popup context is only available to microfrontends loaded in a workbench popup.\n *\n * @docs-private Not public API. For internal use only.\n * @ignore\n * @see {@link ContextService}\n * @see {@link ɵPopupContext}\n */\nexport const ɵPOPUP_CONTEXT = 'ɵworkbench.popup';\n","/*\n * Copyright (c) 2018-2024 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {WorkbenchPopupCapability} from './workbench-popup-capability';\nimport {Beans} from '@scion/toolkit/bean-manager';\nimport {ContextService, mapToBody, MessageClient, MicrofrontendPlatformClient, OUTLET_CONTEXT, OutletContext} from '@scion/microfrontend-platform';\nimport {ɵWorkbenchCommands} from '../ɵworkbench-commands';\nimport {ɵPopupContext} from './workbench-popup-context';\nimport {WorkbenchPopupReferrer} from './workbench-popup-referrer';\nimport {Observable} from 'rxjs';\nimport {shareReplay} from 'rxjs/operators';\nimport {decorateObservable} from '../observable-decorator';\nimport {PopupId} from '../workbench.identifiers';\nimport {WorkbenchPopup} from './workbench-popup.model';\n\n/**\n * @ignore\n * @docs-private Not public API. For internal use only.\n */\nexport class ɵWorkbenchPopup implements WorkbenchPopup {\n\n  public readonly id: PopupId;\n  public readonly params: Map<string, unknown>;\n  public readonly capability: WorkbenchPopupCapability;\n  public readonly referrer: WorkbenchPopupReferrer;\n  public readonly focused$: Observable<boolean>;\n\n  constructor(context: ɵPopupContext) {\n    this.id = context.popupId;\n    this.capability = context.capability;\n    this.params = context.params;\n    this.referrer = context.referrer;\n    void this.requestFocus();\n    this.focused$ = Beans.get(MessageClient).observe$<boolean>(ɵWorkbenchCommands.popupFocusedTopic(this.id))\n      .pipe(\n        mapToBody(),\n        shareReplay({refCount: false, bufferSize: 1}),\n        decorateObservable(),\n      );\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public signalReady(): void {\n    MicrofrontendPlatformClient.signalReady();\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public setResult(result?: unknown): void {\n    void Beans.get(MessageClient).publish(ɵWorkbenchCommands.popupResultTopic(this.id), result);\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public close(result?: unknown | Error): void {\n    if (result instanceof Error) {\n      const headers = new Map().set(ɵWorkbenchPopupMessageHeaders.CLOSE_WITH_ERROR, true);\n      void Beans.get(MessageClient).publish(ɵWorkbenchCommands.popupCloseTopic(this.id), result.message, {headers});\n    }\n    else {\n      void Beans.get(MessageClient).publish(ɵWorkbenchCommands.popupCloseTopic(this.id), result);\n    }\n  }\n\n  /**\n   * If the document is not yet focused, make it focusable and request the focus.\n   *\n   * In order to close the popup on focus loss, microfrontend content must gain the focus first.\n   */\n  private async requestFocus(): Promise<void> {\n    // Request focus only if this microfrontend is the actual popup microfrontend,\n    // i.e. not nested microfrontends in the popup.\n    const contexts = await Beans.get(ContextService).lookup<OutletContext>(OUTLET_CONTEXT, {collect: true});\n    if (contexts.length > 1) {\n      return;\n    }\n\n    // Do nothing if an element of this microfrontend already has the focus.\n    if (document.activeElement !== document.body) {\n      return;\n    }\n\n    // Ensure the body element to be focusable.\n    if (document.body.getAttribute('tabindex') === null) {\n      document.body.style.outline = 'none';\n      document.body.setAttribute('tabindex', '-1');\n    }\n\n    // Request the focus.\n    document.body.focus();\n  }\n}\n\n/**\n * Message headers to interact with the workbench popup.\n *\n * @docs-private Not public API. For internal use only.\n * @ignore\n */\nexport enum ɵWorkbenchPopupMessageHeaders {\n  CLOSE_WITH_ERROR = 'ɵWORKBENCH-POPUP:CLOSE_WITH_ERROR',\n}\n","/*\n * Copyright (c) 2018-2022 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {Beans, Initializer} from '@scion/toolkit/bean-manager';\nimport {ContextService} from '@scion/microfrontend-platform';\nimport {WorkbenchPopup} from './workbench-popup.model';\nimport {ɵPOPUP_CONTEXT, ɵPopupContext} from './workbench-popup-context';\nimport {ɵWorkbenchPopup} from './ɵworkbench-popup.model';\nimport {WORKBENCH_ELEMENT} from '../workbench.model';\n\n/**\n * Registers {@link WorkbenchPopup} in the bean manager if in the context of a workbench popup.\n *\n * @internal\n */\nexport class WorkbenchPopupInitializer implements Initializer {\n\n  public async init(): Promise<void> {\n    const popupContext = await Beans.get(ContextService).lookup<ɵPopupContext>(ɵPOPUP_CONTEXT);\n    if (popupContext !== null) {\n      Beans.register(WorkbenchPopup, {useValue: new ɵWorkbenchPopup(popupContext)});\n      Beans.register(WORKBENCH_ELEMENT, {useExisting: WorkbenchPopup});\n    }\n  }\n}\n","/*\n * Copyright (c) 2018-2024 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {Qualifier} from '@scion/microfrontend-platform';\nimport {WorkbenchMessageBoxOptions} from './workbench-message-box.options';\nimport {Translatable} from '../text/workbench-text-provider.model';\n\n/**\n * Displays a microfrontend in a message box.\n *\n * A message box is a standardized dialog for presenting a message to the user, such as an info, warning or alert,\n * or for prompting the user for confirmation.\n *\n * A microfrontend provided as a `messagebox` capability can be opened in a message box. The qualifier differentiates between different\n * message box capabilities. Declaring an intention allows for opening public message box capabilities of other applications.\n *\n * Displayed on top of other content, a modal message box blocks interaction with other parts of the application.\n *\n * ## Modality\n * A message box can be context-modal or application-modal. Context-modal blocks a specific part of the application, as specified by the context;\n * application-modal blocks the workbench or browser viewport, based on global workbench settings.\n *\n * ## Context\n * A message box can be bound to a context (e.g., part or view), defaulting to the calling context.\n * The message box is displayed only if the context is visible and closes when the context is disposed.\n *\n * ## Positioning\n * A message box is opened in the center of its context, if any, unless opened from the peripheral area.\n *\n * ## Stacking\n * Message boxes are stacked per modality, with only the topmost message box in each stack being interactive.\n *\n * @category MessageBox\n * @see WorkbenchMessageBoxCapability\n */\nexport abstract class WorkbenchMessageBoxService {\n\n  /**\n   * Displays the specified message in a message box.\n   *\n   * By default, the message box is modal to the calling context. Specify a different modality in {@link WorkbenchMessageBoxOptions.modality}.\n   *\n   * This method requires the intention `{\"type\": \"messagebox\"}`.\n   *\n   * @param message - Specifies the text to display, if any.\n   *                  Can be text or a translation key. A translation key starts with the percent symbol (`%`) and may include parameters in matrix notation for text interpolation.\n   * @param options - Controls the appearance and behavior of the message box.\n   * @returns Promise that resolves to the key of the action button that the user clicked to close the message box,\n   *          or that rejects if the message box couldn't be opened, e.g., because of missing the intention.\n   */\n  public abstract open(message: Translatable | null, options?: WorkbenchMessageBoxOptions): Promise<string>;\n\n  /**\n   * Opens the microfrontend of a `messagebox` capability in a workbench message box based on the given qualifier and options.\n   *\n   * By default, the message box is modal to the calling context. Specify a different modality in {@link WorkbenchMessageBoxOptions.modality}.\n   *\n   * @param qualifier - Identifies the `messagebox` capability that provides the microfrontend to open in a message box.\n   * @param options - Controls the appearance and behavior of the message box.\n   * @returns Promise that resolves to the key of the action button that the user clicked to close the message box,\n   *          or that rejects if the message box couldn't be opened, e.g., because of missing the intention or because no `messagebox`\n   *          capability was found matching the qualifier and is visible to the application.\n   *\n   * @see WorkbenchMessageBoxCapability\n   * @see WorkbenchMessageBox\n   */\n  public abstract open(qualifier: Qualifier, options?: WorkbenchMessageBoxOptions): Promise<string>;\n}\n","/*\n * Copyright (c) 2018-2022 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {Qualifier} from '@scion/microfrontend-platform';\nimport {WorkbenchNotificationConfig} from './workbench-notification.config';\nimport {Translatable} from '../text/workbench-text-provider.model';\nimport {WorkbenchNotificationOptions} from './workbench-notification.options';\n\n/**\n * Shows a notification.\n *\n * A notification is a closable message displayed in the upper-right corner that disappears after a few seconds unless hovered or focused.\n * It informs about system events, task completion, or errors. Severity indicates importance or urgency.\n *\n * Notifications can be grouped. Only the most recent notification within a group is displayed.\n *\n * A microfrontend provided as a `notification` capability can be opened in a notification. The qualifier differentiates between different\n * notification capabilities. Declaring an intention allows for opening public notification capabilities of other applications.\n *\n * @see WorkbenchNotificationCapability\n * @category Notification\n */\nexport abstract class WorkbenchNotificationService {\n\n  /**\n   * Displays the specified message as workbench notification.\n   *\n   * This method requires the intention `{\"type\": \"notification\"}`.\n   *\n   * @param message - Specifies the text to display, if any.\n   *                  Can be text or a translation key. A translation key starts with the percent symbol (`%`) and may include parameters in matrix notation for text interpolation.\n   * @param options - Controls the appearance and behavior of the notification.\n   * @returns Promise that resolves when the notification is displayed, or that rejects otherwise, e.g., because of missing the intention.\n   */\n  public abstract show(message: Translatable | null, options?: WorkbenchNotificationOptions): Promise<void>;\n\n  /**\n   * Displays the microfrontend of a `notification` capability as workbench notification based on the given qualifier and options.\n   *\n   * @param qualifier - Identifies the `notification` capability that provides the microfrontend to show as workbench notification.\n   * @param options - Controls the appearance and behavior of the notification.\n   * @returns Promise that resolves when the notification is displayed, or that rejects otherwise, e.g., because of missing the intention\n   *          or because no `notification` capability was found matching the qualifier and is visible to the application.\n   *\n   * @see WorkbenchMessageBoxCapability\n   * @see WorkbenchMessageBox\n   */\n  public abstract show(qualifier: Qualifier, options?: WorkbenchNotificationOptions): Promise<void>;\n\n  /**\n   * Displays the specified message as workbench notification.\n   *\n   * @param notification - Configures content and appearance of the notification.\n   * @param qualifier - Identifies the `notification` capability that provides the microfrontend to show as workbench notification.\n   * @returns Promise that resolves when the notification is displayed or that rejects if the intention is missing or no matching `notification` capability is found.\n   *\n   * @deprecated since version 1.0.0-beta.36. Pass text or qualifier as first argument. Marked for removal.\n   */\n  public abstract show(notification: WorkbenchNotificationConfig, qualifier?: Qualifier): Promise<void>;\n}\n","/*\n * Copyright (c) 2018-2023 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {Observable} from 'rxjs';\n\n/**\n * Enables an application to monitor the workbench theme.\n */\nexport abstract class WorkbenchThemeMonitor {\n\n  /**\n   * Emits the current workbench theme.\n   *\n   * Upon subscription, emits the current theme, and then continuously emits when switching the theme. It never completes.\n   */\n  public abstract readonly theme$: Observable<WorkbenchTheme | null>;\n}\n\n/**\n * Information about a workbench theme.\n */\nexport interface WorkbenchTheme {\n  /**\n   * The name of the theme.\n   */\n  name: string;\n  /**\n   * The color scheme of the theme.\n   */\n  colorScheme: 'light' | 'dark';\n}\n","/*\n * Copyright (c) 2018-2023 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {Observable} from 'rxjs';\nimport {Beans} from '@scion/toolkit/bean-manager';\nimport {ContextService} from '@scion/microfrontend-platform';\nimport {WorkbenchTheme, WorkbenchThemeMonitor} from './workbench-theme-monitor';\n\n/**\n * @inheritDoc\n */\nexport class ɵWorkbenchThemeMonitor implements WorkbenchThemeMonitor {\n\n  /**\n   * @inheritDoc\n   */\n  public theme$: Observable<WorkbenchTheme | null> = Beans.get(ContextService).observe$<WorkbenchTheme>(ɵTHEME_CONTEXT_KEY);\n}\n\n/**\n * Context key to retrieve information about the current workbench theme.\n *\n * @docs-private Not public API. For internal use only.\n * @ignore\n * @see {@link ContextService}\n */\nexport const ɵTHEME_CONTEXT_KEY = 'ɵworkbench.theme';\n","/*\n * Copyright (c) 2018-2024 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {WorkbenchDialogCapability} from './workbench-dialog-capability';\nimport {DialogId} from '../workbench.identifiers';\n\n/**\n * Context when displaying a microfrontend in a dialog.\n *\n * This object can be obtained from the {@link ContextService} using the name {@link ɵDIALOG_CONTEXT}.\n *\n * @docs-private Not public API. For internal use only.\n * @ignore\n */\nexport interface ɵDialogContext {\n  dialogId: DialogId;\n  capability: WorkbenchDialogCapability;\n  params: Map<string, unknown>;\n}\n\n/**\n * Key for obtaining the current dialog context using {@link ContextService}.\n *\n * The dialog context is only available to microfrontends loaded in a workbench dialog.\n *\n * @docs-private Not public API. For internal use only.\n * @ignore\n * @see {@link ContextService}\n * @see {@link ɵDialogContext}\n */\nexport const ɵDIALOG_CONTEXT = 'ɵworkbench.dialog';\n","/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {WorkbenchDialogCapability} from './workbench-dialog-capability';\nimport {Observable} from 'rxjs';\nimport {DialogId} from '../workbench.identifiers';\nimport {Translatable} from '../text/workbench-text-provider.model';\n\n/**\n * Handle to interact with a dialog opened via {@link WorkbenchDialogService}.\n *\n * The dialog microfrontend can inject this handle to interact with the dialog, such as setting the title,\n * reading parameters, or closing it.\n *\n * @category Dialog\n * @see WorkbenchDialogCapability\n * @see WorkbenchDialogService\n */\nexport abstract class WorkbenchDialog {\n\n  /**\n   * Identity of this dialog.\n   */\n  public abstract readonly id: DialogId;\n\n  /**\n   * Capability of the microfrontend loaded into this dialog.\n   */\n  public abstract readonly capability: WorkbenchDialogCapability;\n\n  /**\n   * Parameters passed to the microfrontend loaded into the dialog.\n   */\n  public abstract readonly params: Map<string, unknown>;\n\n  /**\n   * Sets the title of the dialog.\n   *\n   * Can be text or a translation key. A translation key starts with the percent symbol (`%`) and may include parameters in matrix notation for text interpolation.\n   */\n  public abstract setTitle(title: Translatable): void;\n\n  /**\n   * Indicates whether this dialog has the focus.\n   */\n  public abstract readonly focused$: Observable<boolean>;\n\n  /**\n   * Signals readiness, notifying the workbench that this dialog has completed initialization.\n   *\n   * If `showSplash` is set to `true` on the dialog capability, the workbench displays a splash until the dialog microfrontend signals readiness.\n   *\n   * @see WorkbenchDialogCapability.properties.showSplash\n   */\n  public abstract signalReady(): void;\n\n  /**\n   * Closes the dialog. Optionally, pass a result or an error to the dialog opener.\n   */\n  public abstract close<R>(result?: R | Error): void;\n}\n","/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {mapToBody, MessageClient, MicrofrontendPlatformClient} from '@scion/microfrontend-platform';\nimport {ɵDialogContext} from './ɵworkbench-dialog-context';\nimport {WorkbenchDialog} from './workbench-dialog.model';\nimport {Beans} from '@scion/toolkit/bean-manager';\nimport {ɵWorkbenchCommands} from '../ɵworkbench-commands';\nimport {Observable, Subject} from 'rxjs';\nimport {shareReplay} from 'rxjs/operators';\nimport {WorkbenchDialogCapability} from './workbench-dialog-capability';\nimport {decorateObservable} from '../observable-decorator';\nimport {DialogId} from '../workbench.identifiers';\nimport {Translatable} from '../text/workbench-text-provider.model';\n\n/**\n * @ignore\n * @docs-private Not public API. For internal use only.\n */\nexport class ɵWorkbenchDialog implements WorkbenchDialog {\n\n  private _destroy$ = new Subject<void>();\n\n  public readonly id: DialogId;\n  public readonly capability: WorkbenchDialogCapability;\n  public readonly params: Map<string, unknown>;\n  public readonly focused$: Observable<boolean>;\n\n  constructor(private _context: ɵDialogContext) {\n    this.id = this._context.dialogId;\n    this.capability = this._context.capability;\n    this.params = this._context.params;\n    this.focused$ = Beans.get(MessageClient).observe$<boolean>(ɵWorkbenchCommands.dialogFocusedTopic(this.id))\n      .pipe(\n        mapToBody(),\n        shareReplay({refCount: false, bufferSize: 1}),\n        decorateObservable(),\n      );\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public setTitle(title: Translatable): void {\n    void Beans.get(MessageClient).publish(ɵWorkbenchCommands.dialogTitleTopic(this._context.dialogId), title);\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public close<R>(result?: R | Error): void {\n    this._destroy$.next();\n    if (result instanceof Error) {\n      const headers = new Map().set(ɵWorkbenchDialogMessageHeaders.CLOSE_WITH_ERROR, true);\n      void Beans.get(MessageClient).publish(ɵWorkbenchCommands.dialogCloseTopic(this._context.dialogId), result.message, {headers});\n    }\n    else {\n      void Beans.get(MessageClient).publish(ɵWorkbenchCommands.dialogCloseTopic(this._context.dialogId), result);\n    }\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public signalReady(): void {\n    MicrofrontendPlatformClient.signalReady();\n  }\n}\n\n/**\n * Message headers to interact with the workbench dialog.\n *\n * @docs-private Not public API. For internal use only.\n * @ignore\n */\nexport enum ɵWorkbenchDialogMessageHeaders {\n  CLOSE_WITH_ERROR = 'ɵWORKBENCH-DIALOG:CLOSE_WITH_ERROR',\n}\n","/*\n * Copyright (c) 2018-2024 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {Beans, Initializer} from '@scion/toolkit/bean-manager';\nimport {ContextService} from '@scion/microfrontend-platform';\nimport {ɵDIALOG_CONTEXT, ɵDialogContext} from './ɵworkbench-dialog-context';\nimport {WorkbenchDialog} from './workbench-dialog.model';\nimport {ɵWorkbenchDialog} from './ɵworkbench-dialog.model';\nimport {WORKBENCH_ELEMENT} from '../workbench.model';\n\n/**\n * Registers {@link WorkbenchDialog} in the bean manager if in the context of a workbench dialog.\n *\n * @internal\n */\nexport class WorkbenchDialogInitializer implements Initializer {\n\n  public async init(): Promise<void> {\n    const dialogContext = await Beans.get(ContextService).lookup<ɵDialogContext>(ɵDIALOG_CONTEXT);\n    if (dialogContext !== null) {\n      Beans.register(WorkbenchDialog, {useValue: new ɵWorkbenchDialog(dialogContext)});\n      Beans.register(WORKBENCH_ELEMENT, {useExisting: WorkbenchDialog});\n    }\n  }\n}\n","/*\n * Copyright (c) 2018-2024 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {Qualifier} from '@scion/microfrontend-platform';\nimport {WorkbenchDialogOptions} from './workbench-dialog.options';\n\n/**\n * Displays a microfrontend in a dialog.\n *\n * A dialog is a visual element for focused interaction with the user, such as prompting the user for input or confirming actions.\n * The user can move and resize a dialog.\n *\n * A microfrontend provided as a `dialog` capability can be opened in a dialog. The qualifier differentiates between different\n * dialog capabilities. Declaring an intention allows for opening public dialog capabilities of other applications.\n *\n * Displayed on top of other content, a modal dialog blocks interaction with other parts of the application.\n *\n * ## Modality\n * A dialog can be context-modal or application-modal. Context-modal blocks a specific part of the application, as specified by the context;\n * application-modal blocks the workbench or browser viewport, based on global workbench settings.\n *\n * ## Context\n * A dialog can be bound to a context (e.g., part or view), defaulting to the calling context.\n * The dialog is displayed only if the context is visible and closes when the context is disposed.\n *\n * ## Positioning\n * A dialog is opened in the center of its context, if any, unless opened from the peripheral area.\n *\n * ## Stacking\n * Dialogs are stacked per modality, with only the topmost dialog in each stack being interactive.\n *\n * @category Dialog\n * @see WorkbenchDialogCapability\n */\nexport abstract class WorkbenchDialogService {\n\n  /**\n   * Opens the microfrontend of a `dialog` capability in a workbench dialog based on the given qualifier and options.\n   *\n   * By default, the dialog is modal to the calling context. Specify a different modality in {@link WorkbenchDialogOptions.modality}.\n   *\n   * @param qualifier - Identifies the dialog capability that provides the microfrontend to open in a dialog.\n   * @param options - Controls the appearance and behavior of the dialog.\n   * @returns Promise that resolves to the dialog result, if any, or that rejects if the dialog was closed with an error or couldn't be opened,\n   *          e.g., because of missing the intention or because no `dialog` capability was found matching the qualifier and is visible to the application.\n   *\n   * @see WorkbenchDialogCapability\n   * @see WorkbenchDialog\n   */\n  public abstract open<R>(qualifier: Qualifier, options?: WorkbenchDialogOptions): Promise<R | undefined>;\n}\n","/*\n * Copyright (c) 2018-2024 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\n/**\n * Built-in workbench capabilities.\n */\nexport enum WorkbenchCapabilities {\n  /**\n   * Contributes a workbench part.\n   *\n   * A part is a visual element of the workbench layout. Parts can be docked to the side or\n   * positioned relative to each other. A part can display content or stack views.\n   */\n  Part = 'part',\n  /**\n   * Contributes a workbench view.\n   *\n   * A view is a visual element of the workbench layout for displaying content stacked or side-by-side.\n   */\n  View = 'view',\n  /**\n   * Contributes a workbench perspective.\n   *\n   * A perspective defines an arrangement of parts and views. Users can switch between perspectives. Perspectives share the same main area, if any.\n   */\n  Perspective = 'perspective',\n  /**\n   * Contributes a workbench popup.\n   *\n   * A popup is a visual workbench element for displaying content above other content.\n   */\n  Popup = 'popup',\n  /**\n   * Contributes a workbench dialog.\n   *\n   * A dialog is a visual element for focused interaction with the user, such as prompting the user for input or confirming actions.\n   */\n  Dialog = 'dialog',\n  /**\n   * Contributes a workbench message box.\n   *\n   * A message box is a standardized dialog for presenting a message to the user, such as an info, warning or alert,\n   * or for prompting the user for confirmation.\n   */\n  MessageBox = 'messagebox',\n  /**\n   * Contributes a workbench notification.\n   *\n   * A notification is a closable message displayed in the upper-right corner that disappears after a few seconds unless hovered or focused.\n   * It informs about system events, task completion, or errors. Severity indicates importance or urgency.\n   */\n  Notification = 'notification',\n  /**\n   * Provides texts to the SCION Workbench and micro apps.\n   */\n  TextProvider = 'text-provider',\n}\n","/*\n * Copyright (c) 2018-2026 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {Intent, IntentClient, mapToBody, Qualifier, RequestError} from '@scion/microfrontend-platform';\nimport {WorkbenchCapabilities} from '../workbench-capabilities.enum';\nimport {Beans} from '@scion/toolkit/bean-manager';\nimport {catchError, firstValueFrom, throwError} from 'rxjs';\nimport {WorkbenchDialogOptions} from './workbench-dialog.options';\nimport {Defined, Maps} from '@scion/toolkit/util';\nimport {WorkbenchDialogService} from './workbench-dialog.service';\nimport {ɵWorkbenchDialogCommand} from './workbench-dialog-command';\nimport {DialogId, NotificationId, PartId, PopupId, ViewId} from '../workbench.identifiers';\n\n/**\n * @ignore\n * @docs-private Not public API. For internal use only.\n */\nexport class ɵWorkbenchDialogService implements WorkbenchDialogService {\n\n  constructor(private _context?: ViewId | PartId | DialogId | PopupId | NotificationId | undefined) {\n  }\n\n  /** @inheritDoc */\n  public open<R>(qualifier: Qualifier, options?: WorkbenchDialogOptions): Promise<R | undefined> {\n    const intent: Intent = {type: WorkbenchCapabilities.Dialog, qualifier, params: Maps.coerce(options?.params)};\n    const command: ɵWorkbenchDialogCommand = {\n      modality: options?.modality,\n      animate: options?.animate,\n      cssClass: options?.cssClass,\n      context: (() => {\n        // TODO [Angular 22] Remove backward compatiblity.\n        const context = options?.context && (typeof options.context === 'object' ? options.context.viewId : options.context);\n        return Defined.orElse(context, this._context);\n      })(),\n    };\n\n    const closeResult$ = Beans.get(IntentClient).request$<R>(intent, command)\n      .pipe(\n        mapToBody(),\n        catchError((error: unknown) => throwError(() => error instanceof RequestError ? error.message : error)),\n      );\n    return firstValueFrom(closeResult$, {defaultValue: undefined});\n  }\n}\n","/*\n * Copyright (c) 2018-2024 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {mapToBody, MessageClient, MicrofrontendPlatformClient} from '@scion/microfrontend-platform';\nimport {ɵMessageBoxContext} from './ɵworkbench-message-box-context';\nimport {WorkbenchMessageBox} from './workbench-message-box.model';\nimport {WorkbenchMessageBoxCapability} from '../message-box/workbench-message-box-capability';\nimport {Observable} from 'rxjs';\nimport {Beans} from '@scion/toolkit/bean-manager';\nimport {shareReplay} from 'rxjs/operators';\nimport {decorateObservable} from '../observable-decorator';\nimport {DialogId} from '../workbench.identifiers';\nimport {ɵWorkbenchCommands} from '../ɵworkbench-commands';\n\n/**\n * @ignore\n * @docs-private Not public API. For internal use only.\n */\nexport class ɵWorkbenchMessageBox implements WorkbenchMessageBox {\n\n  public readonly id: DialogId;\n  public readonly capability: WorkbenchMessageBoxCapability;\n  public readonly params: Map<string, unknown>;\n  public readonly referrer: WorkbenchMessageBox['referrer'];\n  public readonly focused$: Observable<boolean>;\n\n  constructor(context: ɵMessageBoxContext) {\n    this.id = context.dialogId;\n    this.capability = context.capability;\n    this.params = context.params;\n    this.referrer = context.referrer;\n    this.focused$ = Beans.get(MessageClient).observe$<boolean>(ɵWorkbenchCommands.dialogFocusedTopic(this.id))\n      .pipe(\n        mapToBody(),\n        shareReplay({refCount: false, bufferSize: 1}),\n        decorateObservable(),\n      );\n  }\n\n  /** @inheritDoc */\n  public signalReady(): void {\n    MicrofrontendPlatformClient.signalReady();\n  }\n}\n","/*\n * Copyright (c) 2018-2024 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {WorkbenchMessageBoxCapability} from '../message-box/workbench-message-box-capability';\nimport {DialogId} from '../workbench.identifiers';\nimport {Observable} from 'rxjs';\n\n/**\n * Handle to interact with a message box opened via {@link WorkbenchMessageBoxService}.\n *\n * The message box microfrontend can inject this handle to interact with the message box,\n * such as reading parameters or signaling readiness.\n *\n * @category MessageBox\n * @see WorkbenchMessageBoxCapability\n * @see WorkbenchMessageBoxService\n */\nexport abstract class WorkbenchMessageBox {\n\n  /**\n   * Identity of this message box.\n   */\n  public abstract readonly id: DialogId;\n\n  /**\n   * Capability of the microfrontend loaded into this message box.\n   */\n  public abstract readonly capability: WorkbenchMessageBoxCapability;\n\n  /**\n   * Parameters as passed by the message box opener.\n   */\n  public abstract readonly params: Map<string, unknown>;\n\n  /**\n   * Provides information about where the message box was opened.\n   */\n  public abstract readonly referrer: {\n\n    /**\n     * Symbolic name of the application that opened the messagebox.\n     */\n    readonly appSymbolicName: string;\n  };\n\n  /**\n   * Indicates whether this message box has the focus.\n   */\n  public abstract readonly focused$: Observable<boolean>;\n\n  /**\n   * Signals readiness, notifying the workbench that this message box has completed initialization.\n   *\n   * If `showSplash` is set to `true` on the `messagebox` capability, the workbench displays a splash until the message box microfrontend signals readiness.\n   *\n   * @see WorkbenchMessageBoxCapability.properties.showSplash\n   */\n  public abstract signalReady(): void;\n}\n","/*\n * Copyright (c) 2018-2024 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {WorkbenchMessageBoxCapability} from '../message-box/workbench-message-box-capability';\nimport {DialogId} from '../workbench.identifiers';\n\n/**\n * Information about the message box embedding a microfrontend.\n *\n * This object can be obtained from the {@link ContextService} using the name {@link ɵMESSAGE_BOX_CONTEXT}.\n *\n * @docs-private Not public API. For internal use only.\n * @ignore\n */\nexport interface ɵMessageBoxContext {\n  dialogId: DialogId;\n  capability: WorkbenchMessageBoxCapability;\n  params: Map<string, unknown>;\n  /**\n   * Provides information about where the message box was opened.\n   */\n  referrer: {\n    /**\n     * Symbolic name of the application that opened the messagebox.\n     */\n    appSymbolicName: string;\n  };\n}\n\n/**\n * Key for obtaining the current message box context using {@link ContextService}.\n *\n * The message box context is only available to microfrontends loaded in a workbench message box.\n *\n * @docs-private Not public API. For internal use only.\n * @ignore\n * @see {@link ContextService}\n * @see {@link ɵMessageBoxContext}\n */\nexport const ɵMESSAGE_BOX_CONTEXT = 'ɵworkbench.message-box';\n","/*\n * Copyright (c) 2018-2024 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {Beans, Initializer} from '@scion/toolkit/bean-manager';\nimport {ContextService} from '@scion/microfrontend-platform';\nimport {ɵWorkbenchMessageBox} from './ɵworkbench-message-box.model';\nimport {WorkbenchMessageBox} from './workbench-message-box.model';\nimport {ɵMESSAGE_BOX_CONTEXT, ɵMessageBoxContext} from './ɵworkbench-message-box-context';\nimport {WORKBENCH_ELEMENT} from '../workbench.model';\n\n/**\n * Registers {@link WorkbenchMessageBox} in the bean manager if in the context of a workbench message box.\n *\n * @internal\n */\nexport class WorkbenchMessageBoxInitializer implements Initializer {\n\n  public async init(): Promise<void> {\n    const messageBoxContext = await Beans.get(ContextService).lookup<ɵMessageBoxContext>(ɵMESSAGE_BOX_CONTEXT);\n    if (messageBoxContext !== null) {\n      Beans.register(WorkbenchMessageBox, {useValue: new ɵWorkbenchMessageBox(messageBoxContext)});\n      Beans.register(WORKBENCH_ELEMENT, {useExisting: WorkbenchMessageBox});\n    }\n  }\n}\n","/*\n * Copyright (c) 2018-2026 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {Translatable} from '../text/workbench-text-provider.model';\nimport {DialogId, NotificationId, PartId, PopupId, ViewId} from '../workbench.identifiers';\n\n/**\n * Command to open a message box.\n *\n * @docs-private Not public API. For internal use only.\n * @ignore\n */\nexport interface ɵWorkbenchMessageBoxCommand {\n  title?: Translatable;\n  actions?: {[key: string]: Translatable};\n  severity?: 'info' | 'warn' | 'error';\n  modality?: 'none' | 'context' | 'application' | ViewModality;\n  contentSelectable?: boolean;\n  cssClass?: string | string[];\n  context?: ViewId | PartId | DialogId | PopupId | NotificationId | Context | null;\n}\n\n/**\n * @deprecated since version 1.0.0-beta.34. Renamed to `context`. Marked for removal.\n */\ntype ViewModality = 'view';\n\n/**\n * @deprecated since version 1.0.0-beta.34. Set view id directly. Migrate `{context: {viewId: 'view.x'}}` to `{context: 'view.x'}`. Marked for removal.\n */\ninterface Context {\n  /**\n   * @deprecated since version 1.0.0-beta.34. Set view id directly. Migrate `{context: {viewId: 'view.x'}}` to `{context: 'view.x'}`. Marked for removal.\n   */\n  viewId?: ViewId | null;\n}\n\n/**\n * Parameter name for the message displayed in the built-in text {@link WorkbenchMessageBoxCapability}.\n *\n * @docs-private Not public API. For internal use only.\n * @ignore\n */\nexport const eMESSAGE_BOX_MESSAGE_PARAM = 'message';\n","/*\n * Copyright (c) 2018-2026 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {Intent, IntentClient, mapToBody, Qualifier, RequestError} from '@scion/microfrontend-platform';\nimport {WorkbenchMessageBoxOptions} from './workbench-message-box.options';\nimport {Beans} from '@scion/toolkit/bean-manager';\nimport {Defined, Maps} from '@scion/toolkit/util';\nimport {WorkbenchCapabilities} from '../workbench-capabilities.enum';\nimport {catchError, firstValueFrom, throwError} from 'rxjs';\nimport {eMESSAGE_BOX_MESSAGE_PARAM, ɵWorkbenchMessageBoxCommand} from './workbench-message-box-command';\nimport {WorkbenchMessageBoxService} from './workbench-message-box.service';\nimport {Translatable} from '../text/workbench-text-provider.model';\nimport {DialogId, NotificationId, PartId, PopupId, ViewId} from '../workbench.identifiers';\n\n/**\n * @ignore\n * @docs-private Not public API. For internal use only.\n */\nexport class ɵWorkbenchMessageBoxService implements WorkbenchMessageBoxService {\n\n  constructor(private _context?: ViewId | PartId | DialogId | PopupId | NotificationId | undefined) {\n  }\n\n  /** @inheritDoc */\n  public open(message: Translatable | null | Qualifier, options?: WorkbenchMessageBoxOptions): Promise<string> {\n    const intent = ((): Intent => {\n      if (typeof message === 'string' || message === null) {\n        return {type: WorkbenchCapabilities.MessageBox, qualifier: {}, params: new Map().set(eMESSAGE_BOX_MESSAGE_PARAM, message ?? undefined)};\n      }\n      else {\n        return {type: WorkbenchCapabilities.MessageBox, qualifier: message, params: Maps.coerce(options?.params)};\n      }\n    })();\n    const command: ɵWorkbenchMessageBoxCommand = {\n      title: options?.title,\n      actions: options?.actions,\n      severity: options?.severity,\n      modality: options?.modality,\n      contentSelectable: options?.contentSelectable,\n      cssClass: options?.cssClass,\n      context: (() => {\n        // TODO [Angular 22] Remove backward compatiblity.\n        const context = options?.context && (typeof options.context === 'object' ? options.context.viewId : options.context);\n        return Defined.orElse(context, this._context);\n      })(),\n    };\n\n    const action$ = Beans.get(IntentClient).request$<string>(intent, command)\n      .pipe(\n        mapToBody(),\n        catchError((error: unknown) => throwError(() => error instanceof RequestError ? error.message : error)),\n      );\n    return firstValueFrom(action$);\n  }\n}\n","/*\n * Copyright (c) 2018-2024 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\nimport {PreDestroy} from '@scion/toolkit/bean-manager';\nimport {Arrays} from '@scion/toolkit/util';\n\n/**\n * Installs a CSS stylesheet with styles required by the workbench.\n */\nexport class StyleSheetInstaller implements PreDestroy {\n\n  private readonly _styleSheet = new CSSStyleSheet({});\n\n  constructor() {\n    // Declare styles for the document root element (`<html>`) in a CSS layer.\n    // CSS layers have lower priority than \"regular\" CSS declarations, and the layer name indicates the styles are from @scion/workbench.\n\n    // Applies the following styles:\n    // - Ensures the document root element is positioned to support `@scion/toolkit/observable/fromBoundingClientRect$` for observing element bounding boxes.\n    // - Aligns the document root with the page viewport so the top-level positioning context fills the page viewport (as expected by applications).\n    this._styleSheet.insertRule(`\n      @layer sci-workbench {\n        :root {\n          position: absolute;\n          inset: 0;\n        }\n      }`,\n    );\n    document.adoptedStyleSheets.push(this._styleSheet);\n  }\n\n  public preDestroy(): void {\n    Arrays.remove(document.adoptedStyleSheets, this._styleSheet);\n  }\n}\n","/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {firstValueFrom, Subscription} from 'rxjs';\nimport {Beans} from '@scion/toolkit/bean-manager';\nimport {ACTIVATION_CONTEXT, APP_IDENTITY, ContextService, IntentClient, IS_PLATFORM_HOST, ManifestService, MicrofrontendPlatform, PlatformState} from '@scion/microfrontend-platform';\nimport {Disposable} from '../common/disposable';\nimport {WorkbenchTextProviderCapability, WorkbenchTextProviderFn} from './workbench-text-provider.model';\nimport {WorkbenchCapabilities} from '../workbench-capabilities.enum';\n\n/**\n * Provides texts to the SCION Workbench and micro apps.\n *\n * A text provider is a function that returns the text for a translation key.\n *\n * Texts starting with the percent symbol (`%`) are passed to the text provider for translation, with the percent symbol omitted.\n *\n * This function must be called in an Activator.\n *\n * @param textProvider - Function to provide the text for a translation key.\n * @return Object to unregister the text provider.\n */\nexport function registerTextProvider(textProvider: WorkbenchTextProviderFn): Disposable {\n  const resources = new Subscription();\n\n  // Wait until starting or started the platform.\n  Promise.race([MicrofrontendPlatform.whenState(PlatformState.Starting), MicrofrontendPlatform.whenState(PlatformState.Started)])\n    .then(async () => {\n      await assertInHostOrActivator();\n      await throwIfAlreadyRegistered();\n\n      // Register 'text-provider' capability.\n      const appSymbolicName = Beans.get<string>(APP_IDENTITY);\n      const capability: WorkbenchTextProviderCapability = {\n        type: WorkbenchCapabilities.TextProvider,\n        qualifier: {provider: appSymbolicName},\n        private: false,\n        description: `Provides texts of '${appSymbolicName}' application.`,\n        params: [\n          {\n            name: 'key',\n            required: true,\n            description: '{string} - Translation key of the text.',\n          },\n          {\n            name: 'params',\n            required: false,\n            description: '{dictionary} - Parameters used for text interpolation.',\n          },\n        ],\n      };\n      const manifestService = Beans.get(ManifestService);\n      const capabilityId = await manifestService.registerCapability(capability);\n      if (capabilityId === null) {\n        return;\n      }\n\n      resources.add(() => void manifestService.unregisterCapabilities({id: capabilityId}));\n\n      // Install intent handler.\n      const intentSubscription = Beans.get(IntentClient).onIntent<void, string | undefined>({type: capability.type, qualifier: capability.qualifier}, ({intent}) => {\n        const key = intent.params!.get('key') as string;\n        const params = intent.params!.get('params') as Record<string, string> | undefined ?? {};\n        return textProvider(key, params);\n      });\n      resources.add(intentSubscription);\n    })\n    .catch((error: unknown) => {\n      console.error(`[WorkbenchClientError] Failed to register text provider for application '${Beans.opt(APP_IDENTITY)}'. Caused by: `, error);\n      resources.unsubscribe();\n    });\n\n  // Unregister text provider when stopping the platform, e.g., during hot code replacement.\n  void MicrofrontendPlatform.whenState(PlatformState.Stopping).then(() => resources.unsubscribe());\n\n  return {\n    dispose: () => resources.unsubscribe(),\n  };\n}\n\n/**\n * Throws if the application has already registered a text provider capability.\n */\nasync function throwIfAlreadyRegistered(): Promise<void> {\n  const capabilities = await firstValueFrom(Beans.get(ManifestService).lookupCapabilities$({type: WorkbenchCapabilities.TextProvider, qualifier: {provider: Beans.get(APP_IDENTITY)}}));\n  if (capabilities.length > 0) {\n    throw Error('[TextProviderError] Text Provider already registered.');\n  }\n}\n\n/**\n * Throws if not in the context of the host app or an activator.\n */\nasync function assertInHostOrActivator(): Promise<void> {\n  if (Beans.get(IS_PLATFORM_HOST)) {\n    return;\n  }\n  if (!await Beans.get(ContextService).isPresent(ACTIVATION_CONTEXT)) {\n    throw Error('[TextProviderError] Text Provider must be registered in an Activator.');\n  }\n}\n","/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {Observable} from 'rxjs';\nimport {Translatable} from './workbench-text-provider.model';\n\n/**\n * Provides texts from micro applications.\n *\n * Applications can register a text provider using {@link WorkbenchClient.registerTextProvider} to provide texts to other applications.\n *\n * To get texts from another application, the application must declare an intention:\n *\n * ```json\n * {\n *   \"type\": \"text-provider\",\n *   \"qualifier\": {\n *     \"provider\": \"<APP_SYMBOLIC_NAME>\" // Replace with the symbolic name of the providing application\n *   }\n * },\n * ```\n *\n * @category Localization\n */\nexport abstract class WorkbenchTextService {\n\n  /**\n   * Gets the text for given {@link Translatable} from the specified application. Text requests are cached.\n   *\n   * A {@link Translatable} is a string that, if starting with the percent symbol (`%`), is passed to the specified application for translation, with the percent symbol omitted.\n   * Otherwise, the text is returned as is.\n   *\n   * Interpolation parameters can either be passed via options or appended to the translatable in matrix notation. If appended to the translatable, semicolons must be escaped with two backslashes (`\\\\;`).\n   *\n   * @example - Request the text for given key\n   * ```ts\n   * Beans.get(WorkbenchTextService).text$('%key', {provider: 'app'});\n   * ```\n   *\n   * @example - Request the text for given key and interpolation parameters\n   * ```ts\n   * Beans.get(WorkbenchTextService).text$('%key;param1=value1;param2=value2', {provider: 'app'});\n   *\n   * // Alternatively, parameters can be passed via options.\n   * Beans.get(WorkbenchTextService).text$('%key', {params: {param1: 'value1', param2: 'value2'}, provider: 'app'});\n   * ```\n   *\n   * @param translatable - Specifies the translatable.\n   * @param options - Options for requesting the text.\n   * @param options.provider - Application that provides the text.\n   * @param options.params - Parameters for text interpolation.\n   * @param options.ttl - Time to retain texts in the cache after the last subscriber unsubscribes, in milliseconds. Defaults to the next animation frame.\n   * @return Observable emitting the requested text or `undefined` if not found.\n   *         Localized texts are emitted in the current language, and each time when the language changes.\n   *         If an error occurs, the observable emits the passed translation key and then completes. The error is not propagated.\n   */\n  public abstract text$(translatable: Translatable | undefined, options: {provider: string; params?: Record<string, unknown> | Map<string, unknown>; ttl?: number}): Observable<string | undefined>;\n}\n","/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {WorkbenchTextService} from './workbench-text.service';\nimport {animationFrameScheduler, catchError, concatWith, first, MonoTypeOperatorFunction, NEVER, Observable, of, ReplaySubject, share, switchMap, timeout, timer} from 'rxjs';\nimport {APP_IDENTITY, Intent, IntentClient, ManifestService, mapToBody} from '@scion/microfrontend-platform';\nimport {Beans, PreDestroy} from '@scion/toolkit/bean-manager';\nimport {finalize} from 'rxjs/operators';\nimport {Translatable} from './workbench-text-provider.model';\nimport {WorkbenchCapabilities} from '../workbench-capabilities.enum';\nimport {Maps} from '@scion/toolkit/util';\n\n/** @inheritDoc */\nexport class ɵWorkbenchTextService implements WorkbenchTextService, PreDestroy {\n\n  private readonly _cache = new Map<string, Observable<string | undefined>>();\n\n  /** @inheritDoc */\n  public text$(translatable: Translatable | undefined, options: {provider: string; params?: Record<string, unknown> | Map<string, unknown>; ttl?: number}): Observable<string | undefined> {\n    if (!translatable) {\n      return of(undefined);\n    }\n    if (!translatable.startsWith('%') || translatable === '%') {\n      return of(translatable);\n    }\n\n    // Parse translatable into key and params.\n    const {key, params} = parseTranslatable(translatable as `%${string}`);\n\n    // Append params from options.\n    Maps.coerce(options.params).forEach((value, name) => params.set(name, `${value}`));\n\n    // Compute cache key.\n    const cacheKey = createCacheKey(key, params, options);\n    if (this._cache.has(cacheKey)) {\n      return this._cache.get(cacheKey)!;\n    }\n\n    const translateIntent: Intent = {\n      type: WorkbenchCapabilities.TextProvider,\n      qualifier: {provider: options.provider},\n      params: new Map()\n        .set('key', key)\n        .set('params', Object.fromEntries(params)),\n    };\n\n    const text$ = Beans.get(IntentClient).request$<string | undefined>(translateIntent, undefined, {retain: true})\n      .pipe(\n        // Ensure the observable to never complete independent of text provider request completion, providing consistent\n        // behavior to consumers and simplifying cache cleanup as finalize is only called when the last subscriber unsubscribes,\n        // after the specified TTL.\n        concatWith(NEVER),\n        mapToBody(),\n        waitUntilRegisteredTextProvider(options.provider, {timeout: 60_000}),\n        catchError((error: unknown) => {\n          // Prefix the key with an additional `%` character to escape the leading `%` character. See console formatting rules: https://developer.mozilla.org/en-US/docs/Web/API/console\n          console.error(`[NullTextError][${Beans.get(APP_IDENTITY)}] Failed to get text '%${translatable}' from application '${options.provider}'. Caused by: `, error);\n          return of(`%${key}`);\n        }),\n        // Remove cached text when an error occurs, or when the subscriber count drops to zero, after the specified TTL.\n        finalize(() => this._cache.delete(cacheKey)),\n        share({\n          connector: () => new ReplaySubject(1),\n          resetOnRefCountZero: () => timer(options.ttl ?? 0, animationFrameScheduler), // reset asynchronously to prevent flickering of translated texts on re-layout\n        }),\n      );\n    this._cache.set(cacheKey, text$);\n\n    return text$;\n  }\n\n  public preDestroy(): void {\n    this._cache.clear();\n  }\n}\n\n/**\n * Creates the cache key for specified translatable.\n *\n * Format: `${translatable}@${provider};ttl=${ttl}`\n */\nfunction createCacheKey(key: string, params: Map<string, string>, options: {provider: string; ttl?: number}): string {\n  const translatable = Array.from(params.entries()).reduce((translatable, [param, value]) => `${translatable};${param}=${value}`, `%${key}`);\n  return `${translatable}@${options.provider};ttl=${options.ttl ?? 0}`;\n}\n\n/**\n * Waits until registered specified text provider, or errors when the specified timeout elapses, if any.\n */\nfunction waitUntilRegisteredTextProvider<T>(provider: string, options?: {timeout?: number}): MonoTypeOperatorFunction<T> {\n  return catchError((error, caught) => {\n    if (error instanceof Error && error.message.includes('NullProviderError')) {\n      // Wait until registered the text provider.\n      return Beans.get(ManifestService).lookupCapabilities$({type: WorkbenchCapabilities.TextProvider, qualifier: {provider: provider}})\n        .pipe(\n          first(capabilities => capabilities.length > 0),\n          timeout({first: options?.timeout}),\n          switchMap(() => caught),\n        );\n    }\n    throw error;\n  });\n}\n\n/**\n * Parses a translation key into its key and parameters, if any.\n *\n * Examples:\n * - `%key`: translation key\n * - `%key;param=value`: translation key with a single interpolation parameter\n * - `%key;param1=value1;param2=value2`: translation key with multiple interpolation parameters\n */\nfunction parseTranslatable(translationKey: `%${string}`): {key: string; params: Map<string, string>} {\n  const {key, params} = /^%(?<key>[^;]+)(;(?<params>.*))?$/.exec(translationKey)!.groups!;\n  return {key: key!, params: parseMatrixParams(params)};\n}\n\n/**\n * Parses params in matrix notation.\n *\n * Format: `param1=value1;param2=value2`\n */\nfunction parseMatrixParams(matrixParams: string | undefined): Map<string, string> {\n  if (!matrixParams?.length) {\n    return new Map();\n  }\n\n  const params = new Map<string, string>();\n  for (const match of encodeEscapedSemicolons(matrixParams).matchAll(/(?<paramName>[^=;]+)=(?<paramValue>[^;]*)/g)) {\n    const {paramName, paramValue} = match.groups as {paramName: string; paramValue: string};\n    params.set(paramName, decodeSemicolons(paramValue));\n  }\n  return params;\n\n  /**\n   * Encodes escaped semicolons (`\\\\;`) as `&#x3b` (Unicode) to prevent interpretation as interpolation parameter separators.\n   */\n  function encodeEscapedSemicolons(value: string): string {\n    return value.replaceAll('\\\\;', '&#x3b');\n  }\n\n  /**\n   * Decodes encoded semicolons (`&#x3b`) back to semicolons (`;`).\n   */\n  function decodeSemicolons(value: string): string {\n    return value.replaceAll('&#x3b', ';');\n  }\n}\n","/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {Beans} from '@scion/toolkit/bean-manager';\nimport {Observable} from 'rxjs';\nimport {mapToBody, MessageClient, MicrofrontendPlatformClient} from '@scion/microfrontend-platform';\nimport {ɵWorkbenchCommands} from '../ɵworkbench-commands';\nimport {shareReplay} from 'rxjs/operators';\nimport {WorkbenchPart} from './workbench-part.model';\nimport {decorateObservable} from '../observable-decorator';\nimport {PartId} from '../workbench.identifiers';\nimport {WorkbenchPartCapability} from './workbench-part-capability';\nimport {ɵWorkbenchPartContext} from './ɵworkbench-part-context';\n\nexport class ɵWorkbenchPart implements WorkbenchPart {\n\n  public id: PartId;\n  public active$: Observable<boolean>;\n  public focused$: Observable<boolean>;\n  public params: Map<string, unknown>;\n  public capability: WorkbenchPartCapability;\n\n  constructor(context: ɵWorkbenchPartContext) {\n    this.id = context.partId;\n    this.params = context.params;\n    this.capability = context.capability;\n\n    this.active$ = Beans.get(MessageClient).observe$<boolean>(ɵWorkbenchCommands.partActiveTopic(this.id))\n      .pipe(\n        mapToBody(),\n        shareReplay({refCount: false, bufferSize: 1}),\n        decorateObservable(),\n      );\n\n    this.focused$ = Beans.get(MessageClient).observe$<boolean>(ɵWorkbenchCommands.partFocusedTopic(this.id))\n      .pipe(\n        mapToBody(),\n        shareReplay({refCount: false, bufferSize: 1}),\n        decorateObservable(),\n      );\n  }\n\n  /** @inheritDoc */\n  public signalReady(): void {\n    MicrofrontendPlatformClient.signalReady();\n  }\n}\n","/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {Observable} from 'rxjs';\nimport {PartId} from '../workbench.identifiers';\nimport {WorkbenchPartCapability} from './workbench-part-capability';\n\n/**\n * A part is a visual element of the workbench layout. Parts can be docked to the side or\n * positioned relative to each other. A part can display content or stack views.\n *\n * The part microfrontend can inject this handle to interact with the part.\n *\n * @category Part\n * @see WorkbenchPartCapability\n */\nexport abstract class WorkbenchPart {\n\n  /**\n   * Identity of this part.\n   */\n  public abstract readonly id: PartId;\n\n  /**\n   * Signals readiness, notifying the workbench that this part has completed initialization.\n   *\n   * If `showSplash` is set to `true` on the part capability, the workbench displays a splash until the part microfrontend signals readiness.\n   *\n   * @see WorkbenchPartCapability.properties.showSplash\n   */\n  public abstract signalReady(): void;\n\n  /**\n   * Capability of the microfrontend loaded into the part.\n   */\n  public abstract readonly capability: WorkbenchPartCapability;\n\n  /**\n   * Parameters passed to the microfrontend loaded into the part.\n   */\n  public abstract readonly params: Map<string, unknown>;\n\n  /**\n   * Indicates whether this part is active.\n   *\n   * Upon subscription, emits the active state of this part, and then emits continuously when it changes.\n   * The Observable never completes.\n   */\n  public abstract readonly active$: Observable<boolean>;\n\n  /**\n   * Indicates whether this part has the focus.\n   *\n   * Upon subscription, emits the focused state of this part, and then emits continuously when it changes.\n   * The Observable never completes.\n   */\n  public abstract readonly focused$: Observable<boolean>;\n}\n","/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {PartId} from '../workbench.identifiers';\nimport {WorkbenchPartCapability} from './workbench-part-capability';\n\n/**\n * Context when displaying a microfrontend in a part.\n *\n * This object can be obtained from the {@link ContextService} using the name {@link ɵWORKBENCH_PART_CONTEXT}.\n *\n * @docs-private Not public API. For internal use only.\n * @ignore\n */\nexport interface ɵWorkbenchPartContext {\n  partId: PartId;\n  capability: WorkbenchPartCapability;\n  params: Map<string, unknown>;\n}\n\n/**\n * Key for obtaining the current part context using {@link ContextService}.\n *\n * The part context is only available to microfrontends loaded in a workbench part.\n *\n * @docs-private Not public API. For internal use only.\n * @ignore\n * @see {@link ContextService}\n * @see {@link ɵDialogContext}\n */\nexport const ɵWORKBENCH_PART_CONTEXT = 'ɵworkbench.part';\n","/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {Beans, Initializer} from '@scion/toolkit/bean-manager';\nimport {ContextService} from '@scion/microfrontend-platform';\nimport {ɵWorkbenchPart} from './ɵworkbench-part.model';\nimport {WorkbenchPart} from './workbench-part.model';\nimport {ɵWORKBENCH_PART_CONTEXT, ɵWorkbenchPartContext} from './ɵworkbench-part-context';\nimport {WORKBENCH_ELEMENT} from '../workbench.model';\n\n/**\n * Registers {@link WorkbenchPart} in the bean manager if in the context of a workbench part.\n *\n * @internal\n */\nexport class WorkbenchPartInitializer implements Initializer {\n\n  public async init(): Promise<void> {\n    const partContext = await Beans.get(ContextService).lookup<ɵWorkbenchPartContext>(ɵWORKBENCH_PART_CONTEXT);\n    if (partContext !== null) {\n      Beans.register(WorkbenchPart, {useValue: new ɵWorkbenchPart(partContext)});\n      Beans.register(WORKBENCH_ELEMENT, {useExisting: WorkbenchPart});\n    }\n  }\n}\n","/*\n * Copyright (c) 2018-2026 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {UUID} from '@scion/toolkit/uuid';\n\n/**\n * Format of a view identifier.\n *\n * @category View\n */\nexport type ViewId = `view.${string}`;\n\n/**\n * Format of a part identifier.\n *\n * @category Part\n */\nexport type PartId = `part.${string}`;\n\n/**\n * Format of a dialog identifier.\n *\n * @category Dialog\n */\nexport type DialogId = `dialog.${string}`;\n\n/**\n * Format of a popup identifier.\n *\n * @category Popup\n */\nexport type PopupId = `popup.${string}`;\n\n/**\n * Format of a notification identifier.\n *\n * @category Notification\n */\nexport type NotificationId = `notification.${string}`;\n\n/**\n * Format of an activity identifier.\n *\n * @docs-private Not public API. For internal use only.\n */\nexport type ActivityId = `activity.${string}`;\n\n/**\n * Computes a unique popup id.\n */\nexport function computePopupId(): PopupId {\n  return `popup.${UUID.randomUUID().substring(0, 8)}`;\n}\n","/*\n * Copyright (c) 2018-2026 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {IntentClient, IS_PLATFORM_HOST, mapToBody, MessageClient, Qualifier, RequestError} from '@scion/microfrontend-platform';\nimport {Beans} from '@scion/toolkit/bean-manager';\nimport {filter, finalize, map} from 'rxjs/operators';\nimport {WorkbenchCapabilities} from '../workbench-capabilities.enum';\nimport {Defined, Maps, Observables} from '@scion/toolkit/util';\nimport {fromBoundingClientRect$} from '@scion/toolkit/observable';\nimport {concat, firstValueFrom, NEVER, Observable} from 'rxjs';\nimport {ɵWorkbenchPopupCommand} from './workbench-popup-command';\nimport {ɵWorkbenchCommands} from '../ɵworkbench-commands';\nimport {WorkbenchPopupOptions} from './workbench-popup.options';\nimport {PopupOrigin} from './popup.origin';\nimport {computePopupId, DialogId, PartId, PopupId, ViewId, NotificationId} from '../workbench.identifiers';\nimport {WorkbenchPopupService} from './workbench-popup.service';\n\n/**\n * @ignore\n * @docs-private Not public API. For internal use only.\n */\nexport class ɵWorkbenchPopupService implements WorkbenchPopupService {\n\n  constructor(private _context?: ViewId | PartId | DialogId | PopupId | NotificationId | undefined) {\n  }\n\n  /** @inheritDoc */\n  public async open<T>(qualifier: Qualifier, options: WorkbenchPopupOptions): Promise<T | undefined> {\n    const command: ɵWorkbenchPopupCommand = {\n      popupId: computePopupId(),\n      align: options.align,\n      closeStrategy: {\n        onFocusLost: options.closeStrategy?.onFocusLost,\n        onEscape: options.closeStrategy?.onEscape,\n      },\n      cssClass: options.cssClass,\n      context: (() => {\n        // TODO [Angular 22] Remove backward compatiblity.\n        const context = options.context && (typeof options.context === 'object' ? options.context.viewId : options.context);\n        return Defined.orElse(context, this._context);\n      })(),\n    };\n    const popupOriginReporter = this.observePopupOrigin$(options)\n      .pipe(finalize(() => void Beans.get(MessageClient).publish<PopupOrigin>(ɵWorkbenchCommands.popupOriginTopic(command.popupId), undefined, {retain: true})))\n      .subscribe(origin => void Beans.get(MessageClient).publish<PopupOrigin>(ɵWorkbenchCommands.popupOriginTopic(command.popupId), origin, {retain: true}));\n\n    try {\n      const params = Maps.coerce(options.params);\n      const openPopup$ = Beans.get(IntentClient).request$<T>({type: WorkbenchCapabilities.Popup, qualifier, params}, command).pipe(mapToBody());\n      return await firstValueFrom(openPopup$, {defaultValue: undefined});\n    }\n    catch (error) {\n      throw (error instanceof RequestError ? error.message : error);\n    }\n    finally {\n      popupOriginReporter.unsubscribe();\n    }\n  }\n\n  /**\n   * Observes the position of the popup anchor.\n   *\n   * The Observable emits the anchor's initial position, and each time its position changes.\n   * The Observable never completes.\n   */\n  private observePopupOrigin$(options: WorkbenchPopupOptions): Observable<PopupOrigin> {\n    if (options.anchor instanceof Element) {\n      const element = options.anchor as HTMLElement;\n      return fromBoundingClientRect$(element)\n        .pipe(\n          filter(() => element.checkVisibility({visibilityProperty: true})), // ignore bounds if not visible to prevent flickering on reactivation\n          map((domRect: DOMRect): PopupOrigin => ({\n            top: domRect.top,\n            right: domRect.right,\n            bottom: domRect.bottom,\n            left: domRect.left,\n            width: domRect.width,\n            height: domRect.height,\n            x: domRect.x,\n            y: domRect.y,\n            relativeTo: Beans.get(IS_PLATFORM_HOST) ? 'viewport' : 'context',\n          })),\n        );\n    }\n    else {\n      return concat(Observables.coerce(options.anchor), NEVER);\n    }\n  }\n}\n","/*\n * Copyright (c) 2018-2022 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {IntentClient, mapToBody, MessageClient, Qualifier, RequestError} from '@scion/microfrontend-platform';\nimport {Beans} from '@scion/toolkit/bean-manager';\nimport {WorkbenchView} from '../view/workbench-view.model';\nimport {WorkbenchCapabilities} from '../workbench-capabilities.enum';\nimport {Dictionaries, Dictionary, Maps} from '@scion/toolkit/util';\nimport {ɵWorkbenchCommands} from '../ɵworkbench-commands';\nimport {lastValueFrom} from 'rxjs';\nimport {Empty} from '../common/utility-types';\nimport {WorkbenchNavigationExtras, WorkbenchRouter} from './workbench-router.service';\nimport {PartId} from '../workbench.identifiers';\n\n/**\n * @ignore\n * @docs-private Not public API. For internal use only.\n */\nexport class ɵWorkbenchRouter implements WorkbenchRouter {\n\n  /** @inheritDoc */\n  public async navigate(qualifier: Qualifier | Empty<Qualifier>, extras?: WorkbenchNavigationExtras): Promise<boolean> {\n    if (this.isSelfNavigation(qualifier)) {\n      return this.updateViewParams(extras);\n    }\n    else {\n      return this.navigateView(qualifier, extras);\n    }\n  }\n\n  private async navigateView(qualifier: Qualifier, extras?: WorkbenchNavigationExtras): Promise<boolean> {\n    const command: ɵWorkbenchNavigateCommand = {\n      target: extras?.target,\n      partId: extras?.partId,\n      activate: extras?.activate,\n      close: extras?.close,\n      position: extras?.position,\n      cssClass: extras?.cssClass,\n    };\n    const navigate$ = Beans.get(IntentClient).request$<boolean>({type: WorkbenchCapabilities.View, qualifier, params: Maps.coerce(extras?.params)}, command);\n    try {\n      return await lastValueFrom(navigate$.pipe(mapToBody()));\n    }\n    catch (error) {\n      throw (error instanceof RequestError ? error.message : error);\n    }\n  }\n\n  private async updateViewParams(extras?: WorkbenchNavigationExtras): Promise<boolean> {\n    const viewCapabilityId = Beans.get(WorkbenchView).snapshot.capability.metadata!.id;\n    const command: ɵViewParamsUpdateCommand = {\n      params: Dictionaries.coerce(extras?.params),\n      paramsHandling: extras?.paramsHandling,\n    };\n    const updateParams$ = Beans.get(MessageClient).request$<boolean>(ɵWorkbenchCommands.viewParamsUpdateTopic(Beans.get(WorkbenchView).id, viewCapabilityId), command);\n    try {\n      return await lastValueFrom(updateParams$.pipe(mapToBody()));\n    }\n    catch (error) {\n      throw (error instanceof RequestError ? error.message : error);\n    }\n  }\n\n  private isSelfNavigation(qualifier: Qualifier | Empty<Qualifier>): boolean {\n    if (Object.keys(qualifier).length === 0) {\n      if (!Beans.opt(WorkbenchView)) {\n        throw Error('[NavigateError] Self-navigation requires to be in the context of a view.');\n      }\n      return true;\n    }\n    return false;\n  }\n}\n\n/**\n * Command object to navigate a view.\n *\n * @docs-private Not public API. For internal use only.\n * @ignore\n */\nexport interface ɵWorkbenchNavigateCommand {\n  target?: string | 'blank' | 'auto';\n  partId?: PartId | string;\n  activate?: boolean;\n  close?: boolean;\n  position?: number | 'start' | 'end' | 'before-active-view' | 'after-active-view';\n  cssClass?: string | string[];\n}\n\n/**\n * Command object to update view params in self-navigation.\n *\n * @docs-private Not public API. For internal use only.\n * @ignore\n */\nexport interface ɵViewParamsUpdateCommand {\n  /**\n   * @see WorkbenchNavigationExtras#params\n   */\n  params: Dictionary;\n  /**\n   * @see WorkbenchNavigationExtras#paramsHandling\n   */\n  paramsHandling?: 'merge' | 'replace';\n}\n","/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {Translatable} from '../text/workbench-text-provider.model';\n\n/**\n * Command to show a notification.\n *\n * @docs-private Not public API. For internal use only.\n * @ignore\n */\nexport interface ɵWorkbenchNotificationCommand {\n  title?: Translatable;\n  severity?: 'info' | 'warn' | 'error';\n  duration?: 'short' | 'medium' | 'long' | 'infinite' | number;\n  group?: string;\n  cssClass?: string | string[];\n}\n\n/**\n * Parameter name for the message displayed in the built-in text {@link WorkbenchNotificationCapability}.\n *\n * @docs-private Not public API. For internal use only.\n * @ignore\n */\nexport const eNOTIFICATION_MESSAGE_PARAM = 'message';\n","/*\n * Copyright (c) 2018-2022 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {Intent, IntentClient, Qualifier, RequestError} from '@scion/microfrontend-platform';\nimport {WorkbenchNotificationConfig} from './workbench-notification.config';\nimport {Beans} from '@scion/toolkit/bean-manager';\nimport {WorkbenchCapabilities} from '../workbench-capabilities.enum';\nimport {Maps} from '@scion/toolkit/util';\nimport {firstValueFrom, lastValueFrom} from 'rxjs';\nimport {Translatable} from '../text/workbench-text-provider.model';\nimport {WorkbenchNotificationService} from './workbench-notification.service';\nimport {WorkbenchNotificationOptions} from './workbench-notification.options';\nimport {eNOTIFICATION_MESSAGE_PARAM, ɵWorkbenchNotificationCommand} from './workbench-notification-command';\n\n/**\n * @ignore\n * @docs-private Not public API. For internal use only.\n */\nexport class ɵWorkbenchNotificationService implements WorkbenchNotificationService {\n\n  /** @inheritDoc */\n  public show(message: Translatable, options?: WorkbenchNotificationOptions): Promise<void>;\n  public show(qualifier: Qualifier, options?: WorkbenchNotificationOptions): Promise<void>;\n  public show(notification: WorkbenchNotificationConfig, qualifier?: Qualifier): Promise<void>;\n  // TODO [Angular 22] Remove backward compatiblity. Replace content with content of `showNotification`\n  public show(arg1: Translatable | Qualifier | WorkbenchNotificationConfig | null, arg2?: WorkbenchNotificationOptions | Qualifier): Promise<void> {\n    // New API to open built-in text notification.\n    if (typeof arg1 === 'string' || arg1 === null) {\n      return this.showNotification(arg1, arg2);\n    }\n\n    // Legacy API.\n    const config = arg1 as unknown as Partial<WorkbenchNotificationConfig>;\n    if (!Object.keys(config).length || config.title || config.content || config.params || config.severity || config.duration || config.group || config.cssClass) {\n      return this.showNotificationLegacy(arg1, arg2 as Qualifier | undefined);\n    }\n\n    // New API to open custom host notification.\n    return this.showNotification(arg1 as Qualifier, arg2 as WorkbenchNotificationOptions | undefined);\n  }\n\n  private async showNotification(message: Translatable | Qualifier | null, options?: WorkbenchNotificationOptions): Promise<void> {\n    const intent = ((): Intent => {\n      if (typeof message === 'string' || message === null) {\n        return {type: WorkbenchCapabilities.Notification, qualifier: {}, params: new Map().set(eNOTIFICATION_MESSAGE_PARAM, message ?? undefined)};\n      }\n      else {\n        return {type: WorkbenchCapabilities.Notification, qualifier: message, params: Maps.coerce(options?.params)};\n      }\n    })();\n    const command: ɵWorkbenchNotificationCommand = {\n      title: options?.title,\n      severity: options?.severity,\n      duration: options?.duration,\n      group: options?.group,\n      cssClass: options?.cssClass,\n    };\n\n    try {\n      await firstValueFrom(Beans.get(IntentClient).request$<void>(intent, command), {defaultValue: undefined});\n    }\n    catch (error) {\n      throw (error instanceof RequestError ? error.message : error);\n    }\n  }\n\n  private async showNotificationLegacy(notification: Translatable | WorkbenchNotificationConfig, qualifier?: Qualifier): Promise<void> {\n    const config: WorkbenchNotificationConfig = typeof notification === 'string' ? {content: notification} : notification;\n    const params = Maps.coerce(config.params);\n\n    const showNotification$ = Beans.get(IntentClient).request$<void>({type: WorkbenchCapabilities.Notification, qualifier, params}, config);\n    try {\n      await lastValueFrom(showNotification$, {defaultValue: undefined});\n    }\n    catch (error) {\n      throw (error instanceof RequestError ? error.message : error);\n    }\n  }\n}\n","/*\n * Copyright (c) 2018-2026 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {mapToBody, MessageClient, MicrofrontendPlatformClient} from '@scion/microfrontend-platform';\nimport {fromEvent, Observable, Subject} from 'rxjs';\nimport {Beans, PreDestroy} from '@scion/toolkit/bean-manager';\nimport {filter, shareReplay, takeUntil} from 'rxjs/operators';\nimport {decorateObservable} from '../observable-decorator';\nimport {NotificationId} from '../workbench.identifiers';\nimport {ɵWorkbenchCommands} from '../ɵworkbench-commands';\nimport {WorkbenchNotification} from './workbench-notification.model';\nimport {ɵNotificationContext} from './ɵworkbench-notification-context';\nimport {WorkbenchNotificationCapability} from './workbench-notification-capability';\n\n/**\n * @ignore\n * @docs-private Not public API. For internal use only.\n */\nexport class ɵWorkbenchNotification implements WorkbenchNotification, PreDestroy {\n\n  public readonly id: NotificationId;\n  public readonly capability: WorkbenchNotificationCapability;\n  public readonly params: Map<string, unknown>;\n  public readonly referrer: WorkbenchNotification['referrer'];\n  public readonly focused$: Observable<boolean>;\n\n  private readonly _destroy$ = new Subject<void>();\n\n  constructor(private _context: ɵNotificationContext) {\n    this.id = this._context.notificationId;\n    this.capability = this._context.capability;\n    this.params = this._context.params;\n    this.referrer = this._context.referrer;\n    this.focused$ = Beans.get(MessageClient).observe$<boolean>(ɵWorkbenchCommands.notificationFocusedTopic(this.id))\n      .pipe(\n        mapToBody(),\n        shareReplay({refCount: false, bufferSize: 1}),\n        decorateObservable(),\n      );\n\n    this.closeOnAuxiliaryMouseButton();\n  }\n\n  /** @inheritDoc */\n  public signalReady(): void {\n    MicrofrontendPlatformClient.signalReady();\n  }\n\n  /** @inheritDoc */\n  public close(): void {\n    void Beans.get(MessageClient).publish(ɵWorkbenchCommands.notificationCloseTopic(this.id));\n  }\n\n  /**\n   * Closes the notification when clicking the auxiliary mouse button.\n   */\n  private closeOnAuxiliaryMouseButton(): void {\n    fromEvent<MouseEvent>(document.documentElement, 'auxclick')\n      .pipe(\n        filter(event => event.button === 1), // primary aux button\n        takeUntil(this._destroy$),\n      )\n      .subscribe(event => {\n        event.preventDefault(); // prevent user-agent default action\n        this.close();\n      });\n\n    // Prevent middle-click scrolling; necessary for aux click to work.\n    fromEvent<MouseEvent>(document.documentElement, 'mousedown')\n      .pipe(\n        filter(event => event.button === 1), // primary aux button\n        takeUntil(this._destroy$),\n      )\n      .subscribe(event => {\n        event.preventDefault();\n      });\n  }\n\n  public preDestroy(): void {\n    this._destroy$.next();\n  }\n}\n","/*\n * Copyright (c) 2018-2026 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {NotificationId} from '../workbench.identifiers';\nimport {WorkbenchNotificationCapability} from './workbench-notification-capability';\n\n/**\n * Information about the notification embedding a microfrontend.\n *\n * This object can be obtained from the {@link ContextService} using the name {@link ɵNOTIFICATION_CONTEXT}.\n *\n * @docs-private Not public API. For internal use only.\n * @ignore\n */\nexport interface ɵNotificationContext {\n  notificationId: NotificationId;\n  capability: WorkbenchNotificationCapability;\n  params: Map<string, unknown>;\n  /**\n   * Provides information about where the notification was opened.\n   */\n  referrer: {\n    /**\n     * Symbolic name of the application that opened the notification.\n     */\n    appSymbolicName: string;\n  };\n}\n\n/**\n * Key for obtaining the current notification context using {@link ContextService}.\n *\n * The notification context is only available to microfrontends loaded in a workbench notification.\n *\n * @docs-private Not public API. For internal use only.\n * @ignore\n * @see {@link ContextService}\n * @see {@link ɵNotificationContext}\n */\nexport const ɵNOTIFICATION_CONTEXT = 'ɵworkbench.notification';\n","/*\n * Copyright (c) 2018-2026 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {NotificationId} from '../workbench.identifiers';\nimport {Observable} from 'rxjs';\nimport {WorkbenchNotificationCapability} from './workbench-notification-capability';\n\n/**\n * Handle to interact with a notification opened via {@link WorkbenchNotificationService}.\n *\n * The notification microfrontend can inject this handle to interact with the notification,\n * such as reading parameters or signaling readiness.\n *\n * @category Notification\n * @see WorkbenchNotificationCapability\n * @see WorkbenchNotificationService\n */\nexport abstract class WorkbenchNotification {\n\n  /**\n   * Identity of this notification.\n   */\n  public abstract readonly id: NotificationId;\n\n  /**\n   * Capability of the microfrontend loaded into this notification.\n   */\n  public abstract readonly capability: WorkbenchNotificationCapability;\n\n  /**\n   * Parameters as passed by the notification opener.\n   */\n  public abstract readonly params: Map<string, unknown>;\n\n  /**\n   * Provides information about where the notification was opened.\n   */\n  public abstract readonly referrer: {\n\n    /**\n     * Symbolic name of the application that opened the notification.\n     */\n    readonly appSymbolicName: string;\n  };\n\n  /**\n   * Indicates whether this notification has the focus.\n   */\n  public abstract readonly focused$: Observable<boolean>;\n\n  /**\n   * Signals readiness, notifying the workbench that this notification has completed initialization.\n   *\n   * If `showSplash` is set to `true` on the `notification` capability, the workbench displays a splash until the notification microfrontend signals readiness.\n   *\n   * @see WorkbenchNotificationCapability.properties.showSplash\n   */\n  public abstract signalReady(): void;\n\n  /**\n   * Closes the notification.\n   */\n  public abstract close(): void;\n}\n","/*\n * Copyright (c) 2018-2026 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {Beans, Initializer} from '@scion/toolkit/bean-manager';\nimport {ContextService} from '@scion/microfrontend-platform';\nimport {WORKBENCH_ELEMENT} from '../workbench.model';\nimport {ɵWorkbenchNotification} from './ɵworkbench-notification.model';\nimport {ɵNOTIFICATION_CONTEXT, ɵNotificationContext} from './ɵworkbench-notification-context';\nimport {WorkbenchNotification} from './workbench-notification.model';\n\n/**\n * Registers {@link WorkbenchNotification} in the bean manager if in the context of a workbench notification.\n *\n * @internal\n */\nexport class WorkbenchNotificationInitializer implements Initializer {\n\n  public async init(): Promise<void> {\n    const notificationContext = await Beans.get(ContextService).lookup<ɵNotificationContext>(ɵNOTIFICATION_CONTEXT);\n    if (notificationContext !== null) {\n      Beans.register(WorkbenchNotification, {useValue: new ɵWorkbenchNotification(notificationContext)});\n      Beans.register(WORKBENCH_ELEMENT, {useExisting: WorkbenchNotification});\n    }\n  }\n}\n","/*\n * Copyright (c) 2018-2024 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {Beans} from '@scion/toolkit/bean-manager';\nimport {WorkbenchViewInitializer} from './view/workbench-view-initializer';\nimport {ConnectOptions, MicrofrontendPlatformClient} from '@scion/microfrontend-platform';\nimport {WorkbenchRouter} from './routing/workbench-router.service';\nimport {WorkbenchPopupService} from './popup/workbench-popup.service';\nimport {WorkbenchPopupInitializer} from './popup/workbench-popup-initializer';\nimport {WorkbenchMessageBoxService} from './message-box/workbench-message-box.service';\nimport {WorkbenchNotificationService} from './notification/workbench-notification.service';\nimport {WorkbenchThemeMonitor} from './theme/workbench-theme-monitor';\nimport {ɵWorkbenchThemeMonitor} from './theme/ɵworkbench-theme-monitor';\nimport {WorkbenchDialogInitializer} from './dialog/workbench-dialog-initializer';\nimport {WorkbenchDialogService} from './dialog/workbench-dialog.service';\nimport {ɵWorkbenchDialogService} from './dialog/ɵworkbench-dialog.service';\nimport {WorkbenchMessageBoxInitializer} from './message-box/workbench-message-box-initializer';\nimport {ɵWorkbenchMessageBoxService} from './message-box/ɵworkbench-message-box.service';\nimport {StyleSheetInstaller} from './style-sheet-installer';\nimport {registerTextProvider} from './text/workbench-text-provider';\nimport {Disposable} from './common/disposable';\nimport {WorkbenchTextProviderFn} from './text/workbench-text-provider.model';\nimport {WorkbenchTextService} from './text/workbench-text.service';\nimport {ɵWorkbenchTextService} from './text/ɵworkbench-text.service';\nimport {WorkbenchPartInitializer} from './part/workbench-part-initializer';\nimport {ɵWorkbenchPopupService} from './popup/ɵworkbench-popup.service';\nimport {ɵWorkbenchRouter} from './routing/ɵworkbench-router.service';\nimport {ɵWorkbenchNotificationService} from './notification/ɵworkbench-notification.service';\nimport {WORKBENCH_ELEMENT, WorkbenchElement} from './workbench.model';\nimport {WorkbenchNotificationInitializer} from './notification/workbench-notification-initializer';\n\n/**\n * **SCION Workbench Client provides core API for a web app to interact with SCION Workbench and other microfrontends.**\n *\n * It is a pure TypeScript library based on the framework-agnostic `@scion/microfrontend-platform` library and can be used with any web stack.\n *\n * You can use the `Beans` object to get references to services to interact with the SCION Workbench and the SCION Microfrontend Platform.\n *\n * #### Core services include:\n *\n * - {@link WorkbenchRouter} for navigating to a microfrontend in a workbench view.\n * - {@link WorkbenchView} for the microfrontend to interact with the view.\n * - {@link WorkbenchPart} for the microfrontend to interact with the part.\n * - {@link WorkbenchDialogService} for displaying a microfrontend in a dialog.\n * - {@link WorkbenchDialog} for the microfrontend to interact with the dialog.\n * - {@link WorkbenchPopupService} for displaying a microfrontend in a popup.\n * - {@link WorkbenchPopup} for the microfrontend to interact with the popup.\n * - {@link WorkbenchMessageBoxService} for displaying a message.\n * - {@link WorkbenchMessageBox} for the microfrontend to interact with the message box.\n * - {@link WorkbenchNotificationService} for displaying a notification.\n * - {@link WorkbenchNotification} for the microfrontend to interact with the notification.\n *\n * - `MessageClient` for sending or receiving messages between micro applications.\n * - `IntentClient` for issuing or receiving intents between micro applications.\n * - `ManifestService` for reading and registering capabilities at runtime.\n * - `SciRouterOutletElement` for embedding microfrontends.\n * - `OutletRouter` for navigating to a site in a router outlet element.\n * - `ContextService` for looking up contextual data set on a router outlet.\n * - `PreferredSizeService` for a microfrontend to report its preferred size.\n * - `FocusMonitor` for observing if the microfrontend has received focus or contains embedded web content that has received focus.\n *\n * For example, you can obtain the workbench router as follows:\n *\n * ```ts\n * const router = Beans.get(WorkbenchRouter)\n * ```\n *\n * Below is a summary of the core concepts of the SCION Microfrontend Platform.\n *\n * #### Host Application and Micro Applications\n * The host application, sometimes also called the container application, provides the top-level integration container for microfrontends. Typically, it is the web app\n * which the user loads into his browser and provides the main application shell, defining areas to embed microfrontends. The host application has SCION Workbench installed,\n * registers micro apps and starts the SCION Microfrontend Platform in host mode.\n *\n * A micro application deals with well-defined business functionality. It is a regular web application that provides one or more microfrontends. SCION Microfrontend Platform\n * uses iframes to embed microfrontends; thus, any web page can be integrated as a microfrontend. A micro application can communicate with other micro applications safely\n * using the platform's cross-origin messaging API. A micro application has to provide an application manifest which to register in the host application.\n *\n * For more information, see the chapter [Core Concepts](https://microfrontend-platform-developer-guide.scion.vercel.app/#_core_concepts)\n * of the SCION Microfrontend Platform Developer's Guide.\n *\n * #### Embedding of Microfrontends\n * You can embed microfrontends using the `<sci-router-outlet>` web component. Web content displayed in the web component is controlled via the `OutletRouter`.\n *\n * For more information, see the chapter [Embedding Microfrontends](https://microfrontend-platform-developer-guide.scion.vercel.app/#chapter:embedding-microfrontends)\n * of the SCION Microfrontend Platform Developer's Guide.\n *\n * #### Cross-Application Communication\n * You can interact with other micro applications via messaging or through so-called intents. Intents are a mechanism known from Android development,\n * enabling controlled collaboration across application boundaries.\n *\n * For more information, see the chapters [Cross-Application Communication](https://microfrontend-platform-developer-guide.scion.vercel.app/#chapter:cross-application-communication)\n * and [Intention API](https://microfrontend-platform-developer-guide.scion.vercel.app/#chapter:intention-api) of the SCION Microfrontend Platform Developer's Guide.\n *\n * #### Activation\n * You can provide an activator to connect to the platform when the user loads the host app into his browser, allowing to initialize and install message listeners for interacting\n * with other micro applications. Starting an activator may take some time. In order not to miss any messages, you can instruct the platform host to wait until you signal\n * readiness.\n *\n * For more information, see the chapter [Activator](https://microfrontend-platform-developer-guide.scion.vercel.app/#chapter:activator) of the SCION Microfrontend\n * Platform Developer's Guide.\n *\n * See our [Developer's Guide](https://microfrontend-platform-developer-guide.scion.vercel.app) for the full documentation about the\n * [SCION Microfrontend Platform](https://github.com/SchweizerischeBundesbahnen/scion-microfrontend-platform).\n */\nexport class WorkbenchClient {\n\n  private constructor() {\n  }\n\n  /**\n   * Connects the micro application to the SCION Workbench and SCION Microfrontend Platform.\n   *\n   * After connected, the micro application can interact with the workbench and other micro applications. Typically, the\n   * micro application connects to the workbench during the bootstrapping. In Angular, for example, this can be done in\n   * an app initializer.\n   *\n   * See {@link @scion/microfrontend-platform!MicrofrontendPlatformClient.connect} for more information about connecting to the platform host.\n   *\n   * @param  symbolicName - Specifies the symbolic name of the micro application. The micro application needs to be registered\n   *         in the workbench under that identity.\n   * @param  connectOptions - Controls how to connect to the workbench.\n   * @return A Promise that resolves once connected to the workbench, or that rejects otherwise.\n   */\n  public static async connect(symbolicName: string, connectOptions?: ConnectOptions): Promise<void> {\n    Beans.register(WorkbenchRouter, {useClass: ɵWorkbenchRouter});\n    Beans.register(WorkbenchDialogService, {useFactory: () => new ɵWorkbenchDialogService(Beans.opt<WorkbenchElement>(WORKBENCH_ELEMENT)?.id)});\n    Beans.register(WorkbenchMessageBoxService, {useFactory: () => new ɵWorkbenchMessageBoxService(Beans.opt<WorkbenchElement>(WORKBENCH_ELEMENT)?.id)});\n    Beans.register(WorkbenchPopupService, {useFactory: () => new ɵWorkbenchPopupService(Beans.opt<WorkbenchElement>(WORKBENCH_ELEMENT)?.id)});\n    Beans.register(WorkbenchNotificationService, {useClass: ɵWorkbenchNotificationService});\n    Beans.register(WorkbenchThemeMonitor, {useClass: ɵWorkbenchThemeMonitor});\n    Beans.register(WorkbenchTextService, {useClass: ɵWorkbenchTextService});\n    Beans.register(StyleSheetInstaller, {eager: true});\n    Beans.registerInitializer({useClass: WorkbenchPartInitializer});\n    Beans.registerInitializer({useClass: WorkbenchViewInitializer});\n    Beans.registerInitializer({useClass: WorkbenchPopupInitializer});\n    Beans.registerInitializer({useClass: WorkbenchDialogInitializer});\n    Beans.registerInitializer({useClass: WorkbenchMessageBoxInitializer});\n    Beans.registerInitializer({useClass: WorkbenchNotificationInitializer});\n    await MicrofrontendPlatformClient.connect(symbolicName, connectOptions);\n  }\n\n  /**\n   * Provides texts to the SCION Workbench and micro apps.\n   *\n   * A text provider is a function that returns the text for a translation key.\n   *\n   * Texts starting with the percent symbol (`%`) are passed to the text provider for translation, with the percent symbol omitted.\n   *\n   * This function must be called in an Activator. Refer to {@link @scion/microfrontend-platform!ActivatorCapability} for details on activators.\n   *\n   * Applications can use {@link WorkbenchTextService} to get texts from other micro applications.\n   *\n   * @param textProvider - Function to provide the text for a translation key.\n   * @return Object to unregister the text provider.\n   */\n  public static registerTextProvider(textProvider: WorkbenchTextProviderFn): Disposable {\n    return registerTextProvider(textProvider);\n  }\n}\n","/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nexport {type Empty} from './utility-types';\nexport {type Disposable} from './disposable';\n","/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nexport {type WorkbenchDialogCapability, type WorkbenchDialogSize} from './workbench-dialog-capability';\nexport {WorkbenchDialog} from './workbench-dialog.model';\nexport {WorkbenchDialogService} from './workbench-dialog.service';\nexport {ɵWorkbenchDialogService} from './ɵworkbench-dialog.service';\nexport {type WorkbenchDialogOptions} from './workbench-dialog.options';\nexport {type ɵDialogContext, ɵDIALOG_CONTEXT} from './ɵworkbench-dialog-context';\nexport {ɵWorkbenchDialogMessageHeaders} from './ɵworkbench-dialog.model';\nexport {type ɵWorkbenchDialogCommand} from './workbench-dialog-command';\n","/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nexport {type WorkbenchMessageBoxCapability, type WorkbenchMessageBoxSize} from './workbench-message-box-capability';\nexport {WorkbenchMessageBoxService} from './workbench-message-box.service';\nexport {ɵWorkbenchMessageBoxService} from './ɵworkbench-message-box.service';\nexport {type WorkbenchMessageBoxOptions} from './workbench-message-box.options';\nexport {WorkbenchMessageBox} from './workbench-message-box.model';\nexport {type ɵMessageBoxContext, ɵMESSAGE_BOX_CONTEXT} from './ɵworkbench-message-box-context';\nexport {type ɵWorkbenchMessageBoxCommand, eMESSAGE_BOX_MESSAGE_PARAM} from './workbench-message-box-command';\n","/*\n * Copyright (c) 2018-2026 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nexport {type WorkbenchNotificationCapability, type WorkbenchNotificationSize} from './workbench-notification-capability';\nexport {WorkbenchNotificationService} from './workbench-notification.service';\nexport {type WorkbenchNotificationOptions} from './workbench-notification.options';\nexport {ɵWorkbenchNotificationService} from './ɵworkbench-notification.service';\nexport {type WorkbenchNotificationConfig} from './workbench-notification.config';\nexport {type ɵWorkbenchNotificationCommand, eNOTIFICATION_MESSAGE_PARAM} from './workbench-notification-command';\nexport {type ɵNotificationContext, ɵNOTIFICATION_CONTEXT} from './ɵworkbench-notification-context';\nexport {WorkbenchNotification} from './workbench-notification.model';\n","/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {Capability, Qualifier} from '@scion/microfrontend-platform';\nimport {WorkbenchCapabilities} from '../workbench-capabilities.enum';\nimport {ActivityId} from '../workbench.identifiers';\n\n/**\n * Defines a perspective in the SCION Workbench.\n *\n * A perspective defines an arrangement of parts and views. Parts can be docked to the side or positioned relative to each other.\n * Views are stacked in parts. Content can be displayed in both parts and views.\n *\n * Users can personalize the layout of a perspective and switch between perspectives. The workbench remembers the layout of a perspective,\n * restoring it the next time it is activated.\n *\n * A typical perspective has a main area part and parts docked to the side, providing navigation and context-sensitive assistance to support\n * the user's workflow. The main area part is where the workbench opens views by default and is shared between perspectives. Its layout is\n * not reset when resetting perspectives.\n *\n * Each part must be assigned a unique ID. The ID is used to align parts relative to each other, open views in a specific part, and, if `main-area`,\n * mark the part as the main area part.\n *\n * A part references a part capability that specifies its content, either a microfrontend, a stack of views, or both. If both, the microfrontend\n * is displayed only if the view stack is empty. Views in a docked part cannot be dragged into or out of docked parts.\n *\n * Declaring an intention allows for referencing public part capabilities of other applications. If a part capability cannot be resolved, the part\n * is omitted, allowing conditional display, for example, based on user permissions.\n *\n * @example - Main area with two docked parts\n * ```json\n * {\n *   \"type\": \"perspective\",\n *   \"qualifier\": {\n *     \"perspective\": \"sample-perspective\"\n *   },\n *   \"properties\": {\n *     \"parts\": [\n *       {\n *         \"id\": \"main-area\",\n *         \"qualifier\": {\"part\": \"main-area\"}\n *       },\n *       {\n *         \"id\": \"navigator\",\n *         \"qualifier\": {\"part\": \"navigator\"},\n *         \"position\": \"left-top\"\n *       },\n *       {\n *         \"id\": \"find\",\n *         \"qualifier\": {\"part\": \"find\"},\n *         \"position\": \"bottom-left\",\n *       }\n *     ]\n *   }\n * }\n * ```\n *\n * Layout of above definition:\n *\n * ```plain\n * +-+------------+-----------------+\n * |x| navigator  |    main-area    |\n * | | (left-top) |                 |\n * | |            |                 |\n * | |            |                 |\n * | |------------+-----------------|\n * |x| find (bottom-left)           |\n * +-+------------------------------+\n * ```\n *\n * @example - Main area with a part aligned relative to a docked part\n *\n * ```json\n * {\n *   \"type\": \"perspective\",\n *   \"qualifier\": {\n *     \"perspective\": \"sample-perspective\"\n *   },\n *   \"properties\": {\n *     \"parts\": [\n *       {\n *         \"id\": \"main-area\",\n *         \"qualifier\": {\"part\": \"main-area\"}\n *       },\n *       {\n *         \"id\": \"navigator\",\n *         \"qualifier\": {\"part\": \"navigator\"},\n *         \"position\": \"left-top\"\n *       },\n *       {\n *         \"id\": \"detail\",\n *         \"qualifier\": {\"part\": \"detail\"},\n *         \"position\": {\"align\": \"bottom\", \"relativeTo\": \"navigator\"}\n *       }\n *     ]\n *   }\n * }\n * ```\n *\n * Layout of above definition:\n *\n * ```plain\n * +-+------------+-----------------+\n * |x| navigator  |    main-area    |\n * | | (left-top) |                 |\n * | |            |                 |\n * | |------------+                 |\n * | | detail     |                 |\n * | | (bottom of |                 |\n * | | navigator) |                 |\n * +-+------------+-----------------+\n * ```\n *\n * @example - Main area with parts aligned relative to the main area\n * ```json\n * {\n *   \"type\": \"perspective\",\n *   \"qualifier\": {\n *     \"perspective\": \"sample-perspective\"\n *   },\n *   \"properties\": {\n *     \"parts\": [\n *       {\n *         \"id\": \"main-area\",\n *         \"qualifier\": {\"part\": \"main-area\"}\n *       },\n *       {\n *         \"id\": \"navigator\",\n *         \"qualifier\": {\"part\": \"navigator\"},\n *         \"position\": {\"align\": \"left\", \"relativeTo\": \"main-area\", \"ratio\": 0.25}\n *       },\n *       {\n *         \"id\": \"find\",\n *         \"qualifier\": {\"part\": \"find\"},\n *         \"position\": {\"align\": \"bottom\", \"relativeTo\": \"main-area\"}\n *       }\n *     ]\n *   }\n * }\n * ```\n *\n * Layout of above definition:\n *\n * ```plain\n * +------------+---------------+\n * | navigator  |   main-area   |\n * | (left of   |               |\n * | main-area) |               |\n * |            |               |\n * |            +---------------+\n * |            |     find      |\n * |            |  (bottom of   |\n * |            |  main-area)   |\n * +------------+---------------+\n * ```\n */\nexport interface WorkbenchPerspectiveCapability extends Capability {\n  /**\n   * @inheritDoc\n   */\n  type: WorkbenchCapabilities.Perspective;\n  /**\n   * Qualifies this perspective. The qualifier is required for a perspective.\n   *\n   * @inheritDoc\n   */\n  qualifier: Qualifier;\n  /**\n   * @inheritDoc\n   */\n  properties: {\n    /**\n     * Defines the arrangement of parts.\n     *\n     * Parts can be docked to the side or positioned relative to each other.\n     *\n     * The first part cannot be positioned and is typically the main area part. The main area part\n     * is a special part with `main-area` as its id. The main area is where the workbench opens views\n     * by default. It is shared between perspectives and its layout is not reset when resetting perspectives.\n     */\n    parts: [\n      Omit<WorkbenchPartRef, 'position'>,\n      ...WorkbenchPartRef[],\n    ];\n    /**\n     * Associates arbitrary data with the perspective, e.g., a label, icon or tooltip.\n     *\n     * The workbench host application can read associated data plus metadata about the perspective from {@link WorkbenchPerspective.data}.\n     * See {@link WorkbenchPerspectiveData} for metadata set by the SCION Workbench.\n     */\n    data?: {[key: string]: unknown};\n  };\n}\n\n/**\n * Describes a part referenced in the perspective.\n */\nexport interface WorkbenchPartRef {\n  /**\n   * Identifies the part. Use {@link MAIN_AREA} for the main area part.\n   */\n  id: string | MAIN_AREA;\n  /**\n   * Specifies the {@link WorkbenchPartCapability} that provides the content of the part.\n   *\n   * Declaring an intention allows for referencing public part capabilities of other applications.\n   *\n   * If the part capability cannot be resolved, the part is omitted, allowing conditional display, for example, based on user permissions.\n   */\n  qualifier: Qualifier;\n  /**\n   * Positions the part, either docked or relative to another part.\n   */\n  position: DockingArea | RelativeTo;\n  /**\n   * Defines data to pass to the part.\n   *\n   * The part can declare mandatory and optional parameters. No additional parameters are allowed. Refer to the documentation of the capability for more information.\n   */\n  params?: {[name: string]: unknown};\n  /**\n   * Controls whether to activate the part.\n   */\n  active?: boolean;\n  /**\n   * Specifies CSS class(es) to add to the part, e.g., to locate the part in tests.\n   */\n  cssClass?: string | string[];\n  /**\n   * Internal identifier for a docked part.\n   *\n   * @docs-private Not public API. For internal use only.\n   */\n  ɵactivityId?: ActivityId;\n}\n\n/**\n * Controls where to dock a part.\n *\n * A part can be docked to the left, right, or bottom side of the workbench. Docked parts can be minimized to create more space for the main content.\n *\n * Each side has two docking areas: `left-top` and `left-bottom`, `right-top` and `right-bottom`, and `bottom-left` and `bottom-right`.\n * Parts added to the same area are stacked, with only one part active per stack. If there is an active part in both stacks of a side,\n * the two parts are split vertically or horizontally, depending on the side.\n *\n * Docking areas:\n * - `left-top`: Dock to the top on the left side.\n * - `left-bottom`: Dock to the bottom on the left side.\n * - `right-top`: Dock to the top on the right side.\n * - `right-bottom`: Dock to the bottom on the right side.\n * - `bottom-left`: Dock to the left on the bottom side.\n * - `bottom-right`: Dock to the right on the bottom side.\n */\nexport type DockingArea = 'left-top' | 'left-bottom' | 'right-top' | 'right-bottom' | 'bottom-left' | 'bottom-right';\n\n/**\n * Describes how to lay out a part relative to another part.\n */\nexport interface RelativeTo {\n  /**\n   * Specifies the part which to use as the reference part to lay out the part.\n   * If not set, the part will be aligned relative to the root of the layout.\n   */\n  relativeTo?: string;\n  /**\n   * Specifies the side of the reference part where to add the part.\n   */\n  align: 'left' | 'right' | 'top' | 'bottom';\n  /**\n   * Specifies the proportional size of the part relative to the reference part.\n   * The ratio is the closed interval [0,1]. If not set, defaults to `0.5`.\n   */\n  ratio?: number;\n}\n\n/**\n * Identifies the main area part.\n *\n * The main area is a special part that can be added to the layout. The main area is where the workbench opens views by default.\n * It is shared between perspectives and its layout is not reset when resetting perspectives.\n */\nexport const MAIN_AREA: MAIN_AREA = 'main-area';\n\n/**\n * Represents the type of the {@link MAIN_AREA} constant.\n */\nexport type MAIN_AREA = 'main-area';\n","/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nexport {type WorkbenchPerspectiveCapability, type WorkbenchPartRef, type DockingArea, type RelativeTo, MAIN_AREA} from './workbench-perspective-capability';\n","/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nexport {type ɵWorkbenchPopupCommand} from './workbench-popup-command';\nexport {WorkbenchPopupService} from './workbench-popup.service';\nexport {ɵWorkbenchPopupService} from './ɵworkbench-popup.service';\nexport {WorkbenchPopup} from './workbench-popup.model';\nexport {ɵWorkbenchPopupMessageHeaders} from './ɵworkbench-popup.model';\nexport {type WorkbenchPopupCapability, type WorkbenchPopupSize} from './workbench-popup-capability';\nexport {type WorkbenchPopupConfig} from './workbench-popup.config';\nexport {type WorkbenchPopupOptions, type CloseStrategy} from './workbench-popup.options';\nexport {type WorkbenchPopupReferrer} from './workbench-popup-referrer';\nexport {type Point, type TopLeftPoint, type TopRightPoint, type BottomLeftPoint, type BottomRightPoint, type PopupOrigin} from './popup.origin';\nexport {type ɵPopupContext, ɵPOPUP_CONTEXT} from './workbench-popup-context';\n","/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nexport {WorkbenchRouter, type WorkbenchNavigationExtras} from './workbench-router.service';\nexport {ɵWorkbenchRouter} from './ɵworkbench-router.service';\nexport {type ɵViewParamsUpdateCommand, type ɵWorkbenchNavigateCommand} from './ɵworkbench-router.service';\n","/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nexport {type WorkbenchTextProviderFn, type Translatable} from './workbench-text-provider.model';\nexport {WorkbenchTextService} from './workbench-text.service';\nexport {ɵWorkbenchTextService} from './ɵworkbench-text.service';\n","/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nexport {WorkbenchThemeMonitor, type WorkbenchTheme} from './workbench-theme-monitor';\nexport {ɵTHEME_CONTEXT_KEY} from './ɵworkbench-theme-monitor';\n","/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nexport {type WorkbenchViewCapability, type ViewParamDefinition} from './workbench-view-capability';\nexport {WorkbenchView, type CanCloseFn, type CanCloseRef, type ViewSnapshot} from './workbench-view.model';\nexport {ɵVIEW_ID_CONTEXT_KEY, ɵVIEW_CAPABILITY_ID_PARAM_NAME, ɵWorkbenchView} from './ɵworkbench-view.model';\n","/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nexport {type WorkbenchPartCapability, type WorkbenchViewRef, type DockedPartExtras} from './workbench-part-capability';\nexport {WorkbenchPart} from './workbench-part.model';\nexport {ɵWorkbenchPart} from './ɵworkbench-part.model';\nexport {type ɵWorkbenchPartContext, ɵWORKBENCH_PART_CONTEXT} from './ɵworkbench-part-context';\n","/*\n * Copyright (c) 2018-2026 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nexport {WorkbenchClient} from './workbench-client';\nexport {WorkbenchCapabilities} from './workbench-capabilities.enum';\nexport {ɵWorkbenchCommands} from './ɵworkbench-commands';\nexport {type ViewId, type PartId, type DialogId, type PopupId, type NotificationId, type ActivityId} from './workbench.identifiers';\nexport {type WorkbenchElement, WORKBENCH_ELEMENT} from './workbench.model';\n\nexport * from './common/public_api';\nexport * from './dialog/public_api';\nexport * from './message-box/public_api';\nexport * from './notification/public_api';\nexport * from './perspective/public_api';\nexport * from './popup/public_api';\nexport * from './routing/public_api';\nexport * from './text/public_api';\nexport * from './theme/public_api';\nexport * from './view/public_api';\nexport * from './part/public_api';\n","/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\n/**\n * Entry point for all public APIs of this package.\n */\nexport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