{"version":3,"file":"scion-workbench.mjs","sources":["../../../../projects/scion/workbench/src/lib/workbench-config.ts","../../../../projects/scion/workbench/src/lib/common/throw-error.util.ts","../../../../projects/scion/workbench/src/lib/common/resolve-when.util.ts","../../../../projects/scion/workbench/src/lib/storage/workbench-storage.ts","../../../../projects/scion/workbench/src/lib/layout/rendering-flag.ts","../../../../projects/scion/workbench/src/lib/common/uid.util.ts","../../../../projects/scion/workbench/src/lib/common/dom.util.ts","../../../../projects/scion/workbench/src/lib/layout/workbench-layout.service.ts","../../../../projects/scion/workbench/src/lib/workbench.constants.ts","../../../../projects/scion/workbench/src/lib/common/operators.ts","../../../../projects/scion/workbench/src/lib/executor/single-task-executor.ts","../../../../projects/scion/workbench/src/lib/routing/workbench-navigational-states.ts","../../../../projects/scion/workbench/src/lib/routing/routing.util.ts","../../../../projects/scion/workbench/src/lib/routing/url-segment-matcher.ts","../../../../projects/scion/workbench/src/lib/common/objects.util.ts","../../../../projects/scion/workbench/src/lib/registry/workbench-object-registry.ts","../../../../projects/scion/workbench/src/lib/view/workbench-view.registry.ts","../../../../projects/scion/workbench/src/lib/common/asserts.util.ts","../../../../projects/scion/workbench/src/lib/layout/workbench-grid.model.ts","../../../../projects/scion/workbench/src/lib/layout/workbench-layout.ts","../../../../projects/scion/workbench/src/lib/migration/workbench-migrator.ts","../../../../projects/scion/workbench/src/lib/layout/migration/model/workbench-grid-migration-v3.model.ts","../../../../projects/scion/workbench/src/lib/layout/migration/workbench-grid-migration-v3.service.ts","../../../../projects/scion/workbench/src/lib/layout/migration/workbench-grid-migration-v4.service.ts","../../../../projects/scion/workbench/src/lib/layout/migration/workbench-grid-migration-v5.service.ts","../../../../projects/scion/workbench/src/lib/layout/migration/workbench-grid-migration-v6.service.ts","../../../../projects/scion/workbench/src/lib/layout/stringifier.ts","../../../../projects/scion/workbench/src/lib/layout/migration/workbench-grid-migration-v7.service.ts","../../../../projects/scion/workbench/src/lib/layout/migration/workbench-layout-migration-v2.service.ts","../../../../projects/scion/workbench/src/lib/layout/migration/workbench-layout-migration-v3.service.ts","../../../../projects/scion/workbench/src/lib/layout/migration/workbench-layout-migration-v4.service.ts","../../../../projects/scion/workbench/src/lib/layout/workench-layout-serializer.service.ts","../../../../projects/scion/workbench/src/lib/part/workbench-part.registry.ts","../../../../projects/scion/workbench/src/lib/logging/logging.model.ts","../../../../projects/scion/workbench/src/lib/logging/console-appender.service.ts","../../../../projects/scion/workbench/src/lib/logging/ɵlogger.ts","../../../../projects/scion/workbench/src/lib/logging/logger.ts","../../../../projects/scion/workbench/src/lib/logging/logger-names.ts","../../../../projects/scion/workbench/src/lib/logging/logging-support.ts","../../../../projects/scion/workbench/src/lib/logging/index.ts","../../../../projects/scion/workbench/src/lib/activity/workbench-activity.model.ts","../../../../projects/scion/workbench/src/lib/layout/ɵworkbench-layout.ts","../../../../projects/scion/workbench/src/lib/layout/workbench-layouts.util.ts","../../../../projects/scion/workbench/src/lib/routing/ɵworkbench-router.service.ts","../../../../projects/scion/workbench/src/lib/routing/workbench-router.service.ts","../../../../projects/scion/workbench/src/lib/layout/ɵworkbench-layout.factory.ts","../../../../projects/scion/workbench/src/lib/layout/workbench-layout-merger.service.ts","../../../../projects/scion/workbench/src/lib/layout/workbench-layout-storage.service.ts","../../../../projects/scion/workbench/src/lib/perspective/workbench-perspective-view-conflict-resolver.service.ts","../../../../projects/scion/workbench/src/lib/executor/latest-task-executor.ts","../../../../projects/scion/workbench/src/lib/perspective/workbench-perspective.registry.ts","../../../../projects/scion/workbench/src/lib/startup/workbench-initializer.ts","../../../../projects/scion/workbench/src/lib/startup/ɵworkbench-launcher.service.ts","../../../../projects/scion/workbench/src/lib/startup/ɵworkbench-startup.service.ts","../../../../projects/scion/workbench/src/lib/startup/workbench-startup.service.ts","../../../../projects/scion/workbench/src/lib/perspective/ɵworkbench-perspective.model.ts","../../../../projects/scion/workbench/src/lib/perspective/workbench-perspective.service.ts","../../../../projects/scion/workbench/src/lib/part/workbench-part-action.registry.ts","../../../../projects/scion/workbench/src/lib/theme/workbench-theme-switcher.service.ts","../../../../projects/scion/workbench/src/lib/view/workbench-view-menu-item.registry.ts","../../../../projects/scion/workbench/src/lib/ɵworkbench.service.ts","../../../../projects/scion/workbench/src/lib/workbench.service.ts","../../../../projects/scion/workbench/src/lib/text/workbench-text-provider.model.ts","../../../../projects/scion/workbench/src/lib/text/text.ts","../../../../projects/scion/workbench/src/lib/text/text.pipe.ts","../../../../projects/scion/workbench/src/lib/view/workbench-view.model.ts","../../../../projects/scion/workbench/src/lib/part/workbench-part.model.ts","../../../../projects/scion/workbench/src/lib/dialog/workbench-dialog.ts","../../../../projects/scion/workbench/src/lib/dialog/workbench-dialog.registry.ts","../../../../projects/scion/workbench/src/lib/communication/workbench-broadcast-channel.ts","../../../../projects/scion/workbench/src/lib/activation-instant.provider.ts","../../../../projects/scion/workbench/src/lib/common/class-list.ts","../../../../projects/scion/workbench/src/lib/routing/workbench-route-data.ts","../../../../projects/scion/workbench/src/lib/part/ɵworkbench-part.model.ts","../../../../projects/scion/workbench/src/lib/workbench-id.ts","../../../../projects/scion/workbench/src/lib/view-dnd/view-drag.service.ts","../../../../projects/scion/workbench/src/lib/portal/wb-component-portal.ts","../../../../projects/scion/workbench/src/lib/common/ɵdestroy-ref.ts","../../../../projects/scion/workbench/src/lib/common/observables.ts","../../../../projects/scion/workbench/src/lib/dialog/movable.directive.ts","../../../../projects/scion/workbench/src/lib/dialog/resizable.directive.ts","../../../../projects/scion/workbench/src/lib/icon/workbench-icon-provider.model.ts","../../../../projects/scion/workbench/src/lib/icon/icon.component.ts","../../../../projects/scion/workbench/src/lib/dialog/dialog-header/dialog-header.component.ts","../../../../projects/scion/workbench/src/lib/dialog/dialog-header/dialog-header.component.html","../../../../projects/scion/workbench/src/lib/common/null-if-empty.pipe.ts","../../../../projects/scion/workbench/src/lib/dialog/dialog-footer/dialog-action-filter.pipe.ts","../../../../projects/scion/workbench/src/lib/dialog/dialog-footer/dialog-footer.component.ts","../../../../projects/scion/workbench/src/lib/dialog/dialog-footer/dialog-footer.component.html","../../../../projects/scion/workbench/src/lib/glass-pane/glass-pane.directive.ts","../../../../projects/scion/workbench/src/lib/common/css-class.util.ts","../../../../projects/scion/workbench/src/lib/dialog/workbench-dialog.component.ts","../../../../projects/scion/workbench/src/lib/dialog/workbench-dialog.component.html","../../../../projects/scion/workbench/src/lib/workbench-element-references.ts","../../../../projects/scion/workbench/src/lib/dialog/ɵworkbench-dialog.ts","../../../../projects/scion/workbench/src/lib/dialog/ɵworkbench-dialog.service.ts","../../../../projects/scion/workbench/src/lib/dialog/workbench-dialog.service.ts","../../../../projects/scion/workbench/src/lib/message-box/message-box-footer/message-box-footer.component.ts","../../../../projects/scion/workbench/src/lib/message-box/message-box-footer/message-box-footer.component.html","../../../../projects/scion/workbench/src/lib/dialog/dialog-footer/workbench-dialog-footer.directive.ts","../../../../projects/scion/workbench/src/lib/dialog/dialog-header/workbench-dialog-header.directive.ts","../../../../projects/scion/workbench/src/lib/message-box/message-box-header/message-box-header.component.ts","../../../../projects/scion/workbench/src/lib/message-box/message-box-header/message-box-header.component.html","../../../../projects/scion/workbench/src/lib/common/typeof.pipe.ts","../../../../projects/scion/workbench/src/lib/message-box/workbench-message-box.component.ts","../../../../projects/scion/workbench/src/lib/message-box/workbench-message-box.component.html","../../../../projects/scion/workbench/src/lib/message-box/ɵworkbench-message-box.service.ts","../../../../projects/scion/workbench/src/lib/popup/popup.component.ts","../../../../projects/scion/workbench/src/lib/popup/popup.component.html","../../../../projects/scion/workbench/src/lib/common/math.util.ts","../../../../projects/scion/workbench/src/lib/popup/popup.service.ts","../../../../projects/scion/workbench/src/lib/message-box/workbench-message-box.service.ts","../../../../projects/scion/workbench/src/lib/view/view-context-provider.ts","../../../../projects/scion/workbench/src/lib/view/ɵworkbench-view.model.ts","../../../../projects/scion/workbench/src/lib/popup/popup.config.ts","../../../../projects/scion/workbench/src/lib/page-not-found/page-not-found.component.ts","../../../../projects/scion/workbench/src/lib/page-not-found/page-not-found.component.html","../../../../projects/scion/workbench/src/lib/routing/empty-outlet/empty-outlet.component.ts","../../../../projects/scion/workbench/src/lib/routing/empty-outlet/empty-outlet.component.html","../../../../projects/scion/workbench/src/lib/null-content/null-content.component.ts","../../../../projects/scion/workbench/src/lib/null-content/null-content.component.html","../../../../projects/scion/workbench/src/lib/routing/workbench-route-guards.ts","../../../../projects/scion/workbench/src/lib/routing/workbench-auxiliary-route-installer.service.ts","../../../../projects/scion/workbench/src/lib/part/view-context-menu/accelerator-format.pipe.ts","../../../../projects/scion/workbench/src/lib/common/instanceof.pipe.ts","../../../../projects/scion/workbench/src/lib/part/view-context-menu/menu-item/menu-item.component.ts","../../../../projects/scion/workbench/src/lib/part/view-context-menu/menu-item/menu-item.component.html","../../../../projects/scion/workbench/src/lib/part/view-context-menu/view-menu.component.ts","../../../../projects/scion/workbench/src/lib/part/view-context-menu/view-menu.component.html","../../../../projects/scion/workbench/src/lib/part/view-context-menu/text/text.component.ts","../../../../projects/scion/workbench/src/lib/common/root-effect.ts","../../../../projects/scion/workbench/src/lib/part/view-context-menu/view-menu.service.ts","../../../../projects/scion/workbench/src/lib/routing/router-outlet-root-context.directive.ts","../../../../projects/scion/workbench/src/lib/view/view.component.ts","../../../../projects/scion/workbench/src/lib/view/view.component.html","../../../../projects/scion/workbench/src/lib/routing/workbench-layout-differ.ts","../../../../projects/scion/workbench/src/lib/view-dnd/view-drop-placeholder-renderer.service.ts","../../../../projects/scion/workbench/src/lib/view-dnd/view-drop-zone.directive.ts","../../../../projects/scion/workbench/src/lib/common/grid-if-visible.pipe.ts","../../../../projects/scion/workbench/src/lib/view-dnd/grid-drop-targets.util.ts","../../../../projects/scion/workbench/src/lib/part/part-portal.pipe.ts","../../../../projects/scion/workbench/src/lib/layout/grid-element/grid-element.component.ts","../../../../projects/scion/workbench/src/lib/layout/grid-element/grid-element.component.html","../../../../projects/scion/workbench/src/lib/view-dnd/requires-drop-zone.pipe.ts","../../../../projects/scion/workbench/src/lib/layout/grid/grid.component.ts","../../../../projects/scion/workbench/src/lib/layout/grid/grid.component.html","../../../../projects/scion/workbench/src/lib/common/dasherize.util.ts","../../../../projects/scion/workbench/src/lib/part/main-area-part/main-area-part.component.ts","../../../../projects/scion/workbench/src/lib/part/main-area-part/main-area-part.component.html","../../../../projects/scion/workbench/src/lib/part/part-action/part-action.component.ts","../../../../projects/scion/workbench/src/lib/part/part-action/part-action.component.html","../../../../projects/scion/workbench/src/lib/filter-field/filter-field.component.ts","../../../../projects/scion/workbench/src/lib/filter-field/filter-field.component.html","../../../../projects/scion/workbench/src/lib/part/view-tab-content/view-tab-content.component.ts","../../../../projects/scion/workbench/src/lib/part/view-tab-content/view-tab-content.component.html","../../../../projects/scion/workbench/src/lib/part/view-list-item/view-list-item.component.ts","../../../../projects/scion/workbench/src/lib/part/view-list-item/view-list-item.component.html","../../../../projects/scion/workbench/src/lib/part/view-list/view-list.component.ts","../../../../projects/scion/workbench/src/lib/part/view-list/view-list.component.html","../../../../projects/scion/workbench/src/lib/part/view-list-button/view-list-button.component.ts","../../../../projects/scion/workbench/src/lib/part/view-list-button/view-list-button.component.html","../../../../projects/scion/workbench/src/lib/part/view-tab/view-tab.component.ts","../../../../projects/scion/workbench/src/lib/part/view-tab/view-tab.component.html","../../../../projects/scion/workbench/src/lib/part/view-tab-drag-image/view-tab-drag-image.component.ts","../../../../projects/scion/workbench/src/lib/view-dnd/view-tab-drag-image-renderer.service.ts","../../../../projects/scion/workbench/src/lib/part/view-tab-bar/view-tab-bar.component.ts","../../../../projects/scion/workbench/src/lib/part/view-tab-bar/view-tab-bar.component.html","../../../../projects/scion/workbench/src/lib/part/part-bar/part-bar.component.ts","../../../../projects/scion/workbench/src/lib/part/part-bar/part-bar.component.html","../../../../projects/scion/workbench/src/lib/portal/workbench-portal-outlet.directive.ts","../../../../projects/scion/workbench/src/lib/view/view-portal.pipe.ts","../../../../projects/scion/workbench/src/lib/part/part.component.ts","../../../../projects/scion/workbench/src/lib/part/part.component.html","../../../../projects/scion/workbench/src/lib/routing/workbench-outlet-differ.ts","../../../../projects/scion/workbench/src/lib/routing/workbench-url-observer.service.ts","../../../../projects/scion/workbench/src/lib/view/view-move-handler.service.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-platform.config.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/initialization/ng-zone-observable-decorator.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-platform-initializer.provider.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-platform-config-loader.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/manifest-object-cache.service.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-view/microfrontend-view-routes.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-view/microfrontend-view-intent-handler.interceptor.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-host-message-box/text-message/text-message.component.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-host-message-box/text-message/text-message.component.html","../../../../projects/scion/workbench/src/lib/microfrontend-platform/initialization/workbench-host-manifest-interceptor.service.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-splash/microfrontend-splash.component.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-splash/microfrontend-splash.component.html","../../../../projects/scion/workbench/src/lib/microfrontend-platform/common/microfrontend.util.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-popup/microfrontend-popup.component.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-popup/microfrontend-popup.component.html","../../../../projects/scion/workbench/src/lib/common/stringify-error.util.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-host-popup/microfrontend-host-popup.component.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-host-popup/microfrontend-host-popup.component.html","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-view/microfrontend-workbench-view.model.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-popup/microfrontend-popup-intent-handler.interceptor.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-popup/microfrontend-popup-capability-validator.interceptor.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-host-message-box/microfrontend-host-message-box.component.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-host-message-box/microfrontend-host-message-box.component.html","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box.component.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box.component.html","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box-intent-handler.interceptor.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-dialog/microfrontend-dialog.component.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-dialog/microfrontend-dialog.component.html","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-host-dialog/microfrontend-host-dialog.component.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-host-dialog/microfrontend-host-dialog.component.html","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-dialog/microfrontend-dialog-intent-handler.interceptor.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-dialog/microfrontend-dialog-capability-validator.interceptor.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-view/microfrontend-view-capability-validator.interceptor.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/stable-capability-id-assigner.interceptor.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box-capability-validator.interceptor.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-perspective/microfrontend-perspective-capability-validator.interceptor.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-perspective/microfrontend-perspective-intent-handler.interceptor.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/initialization/microfrontend-platform-initializer.service.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-view/microfrontend-view-command-handler.service.ts","../../../../projects/scion/workbench/src/lib/notification/notification.ts","../../../../projects/scion/workbench/src/lib/notification/text-notification.component.ts","../../../../projects/scion/workbench/src/lib/notification/ɵnotification.ts","../../../../projects/scion/workbench/src/lib/notification/notification.service.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-notification/microfrontend-notification-intent-handler.ts","../../../../projects/scion/workbench/src/lib/content-projection/content-as-overlay.component.ts","../../../../projects/scion/workbench/src/lib/content-projection/content-as-overlay.component.html","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-view/microfrontend-view.component.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-view/microfrontend-view.component.html","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-perspective/workbench-perspective-data.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/microfrontend-perspective/microfrontend-perspective-installer.service.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/workbench-microfrontend-support.ts","../../../../projects/scion/workbench/src/lib/startup/workbench-launcher.service.ts","../../../../projects/scion/workbench/src/lib/routing/ɵlocation.ts","../../../../projects/scion/workbench/src/lib/text/workbench-view-menu-config-text-provider.ts","../../../../projects/scion/workbench/src/lib/text/workbench-text-provider.ts","../../../../projects/scion/workbench/src/lib/text/text-providers.ts","../../../../projects/scion/workbench/src/lib/icon/material-icon-provider.ts","../../../../projects/scion/workbench/src/lib/icon/workbench-icon-provider.ts","../../../../projects/scion/workbench/src/lib/icon/icon-providers.ts","../../../../projects/scion/workbench/src/lib/workbench.provider.ts","../../../../projects/scion/workbench/src/lib/startup/splash/splash.component.ts","../../../../projects/scion/workbench/src/lib/startup/splash/splash.component.html","../../../../projects/scion/workbench/src/lib/common/coerce-observable.pipe.ts","../../../../projects/scion/workbench/src/lib/notification/notification.component.ts","../../../../projects/scion/workbench/src/lib/notification/notification.component.html","../../../../projects/scion/workbench/src/lib/notification/notification-css-classes.pipe.ts","../../../../projects/scion/workbench/src/lib/notification/notification-list.component.ts","../../../../projects/scion/workbench/src/lib/notification/notification-list.component.html","../../../../projects/scion/workbench/src/lib/activity/activity-bar/activity-item/activity-item.component.ts","../../../../projects/scion/workbench/src/lib/activity/activity-bar/activity-item/activity-item.component.html","../../../../projects/scion/workbench/src/lib/activity/activity-bar/activity-stack/activity-stack.component.ts","../../../../projects/scion/workbench/src/lib/activity/activity-bar/activity-stack/activity-stack.component.html","../../../../projects/scion/workbench/src/lib/activity/activity-bar/activity-bar.component.ts","../../../../projects/scion/workbench/src/lib/activity/activity-bar/activity-bar.component.html","../../../../projects/scion/workbench/src/lib/activity/activity-panel/activity-panel.component.ts","../../../../projects/scion/workbench/src/lib/activity/activity-panel/activity-panel.component.html","../../../../projects/scion/workbench/src/lib/layout/layout.component.ts","../../../../projects/scion/workbench/src/lib/layout/layout.component.html","../../../../projects/scion/workbench/src/lib/workbench.component.ts","../../../../projects/scion/workbench/src/lib/workbench.component.html","../../../../projects/scion/workbench/src/lib/layout/workbench-layout.factory.ts","../../../../projects/scion/workbench/src/lib/layout/public_api.ts","../../../../projects/scion/workbench/src/lib/desktop/desktop.directive.ts","../../../../projects/scion/workbench/src/lib/desktop/public_api.ts","../../../../projects/scion/workbench/src/lib/perspective/public_api.ts","../../../../projects/scion/workbench/src/lib/part/view-context-menu/view-menu-item.directive.ts","../../../../projects/scion/workbench/src/lib/part/part-action-bar/part-action.directive.ts","../../../../projects/scion/workbench/src/lib/part/public_api.ts","../../../../projects/scion/workbench/src/lib/view/public_api.ts","../../../../projects/scion/workbench/src/lib/routing/workbench-router-link.directive.ts","../../../../projects/scion/workbench/src/lib/routing/public_api.ts","../../../../projects/scion/workbench/src/lib/message-box/public_api.ts","../../../../projects/scion/workbench/src/lib/dialog/dialog-footer/workbench-dialog-action.directive.ts","../../../../projects/scion/workbench/src/lib/dialog/public_api.ts","../../../../projects/scion/workbench/src/lib/notification/public_api.ts","../../../../projects/scion/workbench/src/lib/popup/public_api.ts","../../../../projects/scion/workbench/src/lib/common/public_api.ts","../../../../projects/scion/workbench/src/lib/microfrontend-platform/public_api.ts","../../../../projects/scion/workbench/src/lib/startup/public_api.ts","../../../../projects/scion/workbench/src/lib/logging/public_api.ts","../../../../projects/scion/workbench/src/lib/storage/public_api.ts","../../../../projects/scion/workbench/src/lib/activity/public_api.ts","../../../../projects/scion/workbench/src/lib/text/public_api.ts","../../../../projects/scion/workbench/src/lib/icon/public_api.ts","../../../../projects/scion/workbench/src/lib/public_api.ts","../../../../projects/scion/workbench/src/public-api.ts","../../../../projects/scion/workbench/src/scion-workbench.ts"],"sourcesContent":["/*\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 {ComponentType} from '@angular/cdk/portal';\nimport {Signal, Type} from '@angular/core';\nimport {LogAppender, LogLevel} from './logging';\nimport {MicrofrontendPlatformConfig} from '@scion/microfrontend-platform';\nimport {MicrofrontendPlatformConfigLoader} from './microfrontend-platform/microfrontend-platform-config-loader';\nimport {WorkbenchPerspectives} from './perspective/workbench-perspective.model';\nimport {WorkbenchStorage} from './storage/workbench-storage';\nimport {WorkbenchTextProviderFn} from './text/workbench-text-provider.model';\nimport {WorkbenchIconProviderFn} from './icon/workbench-icon-provider.model';\nimport {WorkbenchLayoutFn} from './layout/workbench-layout';\n\n/**\n * Configuration of the SCION Workbench.\n */\nexport abstract class WorkbenchConfig {\n\n  /**\n   * Defines the layout(s) of the application. Defaults to a single layout with only a main area.\n   *\n   * An application can have multiple layouts, called perspectives. A perspective defines an arrangement of parts and views.\n   * Parts can be docked to the side or positioned relative to each other. Views are stacked in parts and can be dragged to other parts.\n   * Content can be displayed in both parts and views.\n   *\n   * A perspective typically has a main area part and other parts docked to the side, providing navigation and context-sensitive assistance to support\n   * the user's workflow. Initially empty or displaying a welcome page, the main area is where the workbench opens new views by default.\n   * Unlike any other part, the main area is shared between perspectives, and its layout is not reset when resetting perspectives.\n   *\n   * See {@link WorkbenchLayoutFn} for more information and an example.\n   */\n  public abstract layout?: WorkbenchLayoutFn | WorkbenchPerspectives;\n\n  /**\n   * Provides texts to the SCION Workbench.\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   * Otherwise, the text is returned as is.\n   *\n   * The SCION Workbench uses the following translation keys for built-in texts:\n   * - workbench.clear.tooltip\n   * - workbench.close.action\n   * - workbench.close_all_tabs.action\n   * - workbench.close_other_tabs.action\n   * - workbench.close_tab.action\n   * - workbench.close_tab.tooltip\n   * - workbench.close_tabs_to_the_left.action\n   * - workbench.close_tabs_to_the_right.action\n   * - workbench.close.tooltip\n   * - workbench.dev_mode_only_hint.tooltip\n   * - workbench.minimize.tooltip\n   * - workbench.move_tab_down.action\n   * - workbench.move_tab_to_new_window.action\n   * - workbench.move_tab_to_the_left.action\n   * - workbench.move_tab_to_the_right.action\n   * - workbench.move_tab_up.action\n   * - workbench.null_content.message\n   * - workbench.null_view_developer_hint.message\n   * - workbench.ok.action\n   * - workbench.page_not_found.message\n   * - workbench.page_not_found.title\n   * - workbench.page_not_found_developer_hint.message\n   * - workbench.page_not_found_part.message\n   * - workbench.page_not_found_view.message\n   * - workbench.reset_perspective.action\n   * - workbench.show_open_tabs.tooltip\n   *\n   * The function:\n   * - Can call `inject` to get any required dependencies.\n   * - Can call `toSignal` to convert an Observable to a Signal.\n   *\n   * @see WorkbenchTextProviderFn\n   */\n  public abstract textProvider?: WorkbenchTextProviderFn;\n\n  /**\n   * Provides icons to the SCION Workbench.\n   *\n   * An icon provider is a function that returns a component for an icon. The component renders the icon.\n   *\n   * Defaults to a Material icon provider, interpreting the icon as a Material icon ligature.\n   *\n   * The default icon provider requires the application to include the Material icon font, for example in `styles.scss`, as follows:\n   * ```scss\n   * @import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded');\n   * ```\n   *\n   * The SCION Workbench uses the following icons:\n   * - `workbench.clear`: Clear button in input fields\n   * - `workbench.close`: Close button in views, dialogs and notifications\n   * - `workbench.dirty`: Visual indicator for view with unsaved content\n   * - `workbench.menu_down`: Menu button of drop down menus\n   * - `workbench.minimize`: Minimize button in docked parts\n   * - `workbench.pin`: Visual indicator for a pinned view\n   * - `workbench.search`: Visual indicator in search or filter fields\n   *\n   * To not replace built-in workbench icons, the icon provider can return `undefined` for icons starting with the `workbench.` prefix.\n   *\n   * The function can call `inject` to get any required dependencies.\n   *\n   * @see WorkbenchIconProviderFn\n   */\n  public abstract iconProvider?: WorkbenchIconProviderFn;\n\n  /**\n   * Specifies the component to display in `<wb-workbench>` while the workbench is starting.\n   *\n   * Defaults to a splash showing a loading indicator (ellipsis throbber).\n   *\n   * Note: No splash screen is displayed if starting the workbench in an app initializer.\n   */\n  public abstract splashComponent?: ComponentType<unknown>;\n\n  /**\n   * Specifies the component to display a view tab, enabling custom design or functionality.\n   *\n   * The component can inject {@link WorkbenchView} and {@link VIEW_TAB_RENDERING_CONTEXT} to get a reference to the view and the rendering context.\n   */\n  public abstract viewTabComponent?: ComponentType<unknown>;\n\n  /**\n   * Defines the component to display when no route matches the requested path.\n   *\n   * This can happen when navigating to a non-existent route or after loading the application, if the routes have changed since the user's last session.\n   *\n   * The component can inject {@link WorkbenchView} to get a reference to the view, e.g., to obtain the requested URL.\n   */\n  public abstract pageNotFoundComponent?: ComponentType<unknown>;\n\n  /**\n   * Controls which built-in menu items to display in the view context menu.\n   *\n   * Set to `false` to exclude all built-in menu items.\n   */\n  public abstract viewMenuItems?: ViewMenuItemsConfig | false;\n\n  /**\n   * Configures startup of the SCION Workbench.\n   *\n   * The SCION Workbench starts automatically when the `<wb-workbench>` component is added to the DOM. Alternatively,\n   * the workbench can be started manually using {@link WorkbenchLauncher.launch}, such as in an app initializer or a route guard.\n   *\n   * The application can hook into the startup process of the SCION Workbench by providing one or more initializers to {@link provideWorkbenchInitializer}.\n   * Initializers execute at defined points during startup, enabling the application's controlled initialization. The workbench is fully started once\n   * all initializers have completed.\n   *\n   * The application can inject {@link WorkbenchStartup} to check if the workbench has completed startup.\n   */\n  public abstract startup?: {\n    /**\n     * Controls when to start the SCION Workbench. Defaults to `LAZY`.\n     *\n     * - **LAZY**\n     *   Starts the workbench when the `<wb-workbench>` component is added to the DOM or manually via {@link WorkbenchLauncher#launch},\n     *   e.g., from a route guard or app initializer.\n     *\n     *  - **APP_INITIALIZER**\n     *   Starts the workbench during application bootstrapping, blocking Angular's app startup until the workbench is ready.\n     *   No splash is displayed.\n     *\n     * @deprecated since version 19.0.0-beta.3. To start the workbench in an app initializer, use Angular's `provideAppInitializer()` function: `provideAppInitializer(() => inject(WorkbenchLauncher).launch())`. Otherwise, no migration is necessary. No replacement. API will be removed in version 21.\n     */\n    launcher?: 'LAZY' | 'APP_INITIALIZER';\n\n    /**\n     * Specifies the component to display in `<wb-workbench>` while the workbench is starting.\n     *\n     * Note: No splash screen is displayed when using the app initializer strategy.\n     *\n     * @deprecated since version 19.0.0-beta.3. Property has been moved. Configure the splash in `WorkbenchConfig.splashComponent`. Property will be removed in version 21.\n     */\n    splash?: ComponentType<unknown>;\n  };\n\n  /**\n   * Configures microfrontend support in the workbench, allowing the integration of microfrontends as workbench views or\n   * workbench popups.\n   *\n   * The workbench uses the \"SCION Microfrontend Platform\" for providing microfrontend support. To learn more about the\n   * \"SCION Microfrontend Platform\", refer to https://github.com/SchweizerischeBundesbahnen/scion-microfrontend-platform.\n   *\n   * The workbench allows any web page to be embedded as a workbench view or workbench popup. The web app has to provide\n   * a manifest in which it describes its views and popups. To integrate a third-party application where customization is not\n   * possible, the host application can provide a manifest for that application. If embedded content needs to interact with\n   * the workbench, the web app can use the library `@scion/workbench-client`, a pure TypeScript library based on the\n   * web stack-agnostic `@scion/microfrontend-platform` library.\n   *\n   * The workbench integrates microfrontends through so-called intents, a mechanism known from Android development, enabling\n   * controlled collaboration across application boundaries. \"SCION Microfrontend Platform DevTools\" can help to inspect\n   * integrated applications and dependencies. The DevTools are available in the form of a microfrontend that can be embedded\n   * like any other microfrontend. Refer to the documentation for detailed instructions on how to integrate\n   * \"SCION Microfrontend Platform DevTools\".\n   *\n   * Typically, the host app provides API to integrated micro apps via the intent mechanism. Consider registering intent handlers\n   * under the DI token {@link MICROFRONTEND_PLATFORM_POST_STARTUP}.\n   */\n  public abstract microfrontendPlatform?: MicrofrontendPlatformConfig | Type<MicrofrontendPlatformConfigLoader>;\n\n  /**\n   * Provides persistent storage to the SCION Workbench.\n   *\n   * If not set, the workbench uses the browser's local storage as persistent storage.\n   */\n  public abstract storage?: Type<WorkbenchStorage>;\n\n  /**\n   * Configures the behavior of workbench dialogs.\n   */\n  public abstract dialog?: {\n    /**\n     * Configures the area to block for application-modal dialogs. If not set, defaults to `workbench`.\n     *\n     * - **workbench:** blocks the {@link WorkbenchComponent|workbench element}, still allowing interaction with elements outside the workbench element.\n     *\n     * - **viewport** blocks the browser viewport, preventing interaction with the application until application-modal dialogs are closed.\n     */\n    modalityScope?: 'workbench' | 'viewport';\n  };\n\n  /**\n   * Configures logging for the workbench.\n   */\n  public abstract logging?: {\n    /**\n     * Sets the minimum severity level a log message must have in order to be logged. By default, if not specified, it is set to {@link LogLevel#INFO}.\n     *\n     * At runtime, you can change the minimum required log level by setting the `loglevel` query parameter.\n     */\n    logLevel?: LogLevel;\n    /**\n     * Registers log appenders to output log messages. Multiple appenders are allowed. By default, if not specified, log messages are written to the console.\n     */\n    logAppenders?: Type<LogAppender>[];\n  };\n}\n\n/**\n * Configuration of built-in menu items in the view's context menu.\n *\n * Each property represents a menu item, allowing customization of visibility, accelerators, and more.\n *\n * Texts can be changed or localized using a {@link WorkbenchTextProviderFn text provider} passed to {@link provideWorkbench} via the workbench config object.\n */\nexport interface ViewMenuItemsConfig {\n  /**\n   * Configures the menu item for closing a view tab.\n   *\n   * Set to `false` to exclude it.\n   *\n   * The menu item text can be changed or localized using a {@link WorkbenchTextProviderFn}.\n   * Translation key: `workbench.close_tab.action`\n   */\n  close?: MenuItemConfig | false;\n  /**\n   * Configures the menu item for closing other view tabs.\n   *\n   * Set to `false` to exclude it.\n   *\n   * The menu item text can be changed or localized using a {@link WorkbenchTextProviderFn}.\n   * Translation key: `workbench.close_other_tabs.action`\n   */\n  closeOthers?: MenuItemConfig | false;\n  /**\n   * Configures the menu item for closing all view tabs.\n   *\n   * Set to `false` to exclude it.\n   *\n   * The menu item text can be changed or localized using a {@link WorkbenchTextProviderFn}.\n   * Translation key: `workbench.close_all_tabs.action`\n   */\n  closeAll?: MenuItemConfig | false;\n  /**\n   * Configures the menu item for closing view tabs to the right.\n   *\n   * Set to `false` to exclude it.\n   *\n   * The menu item text can be changed or localized using a {@link WorkbenchTextProviderFn}.\n   * Translation key: `workbench.close_tabs_to_the_right.action`\n   */\n  closeToTheRight?: MenuItemConfig | false;\n  /**\n   * Configures the menu item for closing view tabs to the left.\n   *\n   * Set to `false` to exclude it.\n   *\n   * The menu item text can be changed or localized using a {@link WorkbenchTextProviderFn}.\n   * Translation key: `workbench.close_tabs_to_the_left.action`\n   */\n  closeToTheLeft?: MenuItemConfig | false;\n  /**\n   * Configures the menu item for moving a view up.\n   *\n   * Set to `false` to exclude it.\n   *\n   * The menu item text can be changed or localized using a {@link WorkbenchTextProviderFn}.\n   * Translation key: `workbench.move_tab_up.action`\n   */\n  moveUp?: MenuItemConfig | false;\n  /**\n   * Configures the menu item for moving a view to the right.\n   *\n   * Set to `false` to exclude it.\n   *\n   * The menu item text can be changed or localized using a {@link WorkbenchTextProviderFn}.\n   * Translation key: `workbench.move_tab_to_the_right.action`\n   */\n  moveRight?: MenuItemConfig | false;\n  /**\n   * Configures the menu item for moving a view down.\n   *\n   * Set to `false` to exclude it.\n   *\n   * The menu item text can be changed or localized using a {@link WorkbenchTextProviderFn}.\n   * Translation key: `workbenchworkbench.move_tab_down.action`\n   */\n  moveDown?: MenuItemConfig | false;\n  /**\n   * Configures the menu item for moving a view to the left.\n   *\n   * Set to `false` to exclude it.\n   *\n   * The menu item text can be changed or localized using a {@link WorkbenchTextProviderFn}.\n   * Translation key: `workbench.move_tab_to_the_left.action`\n   */\n  moveLeft?: MenuItemConfig | false;\n  /**\n   * Configures the menu item for moving a view to a new window.\n   *\n   * Set to `false` to exclude it.\n   *\n   * The menu item text can be changed or localized using a {@link WorkbenchTextProviderFn}.\n   * Translation key: `workbench.move_tab_to_new_window.action`\n   */\n  moveToNewWindow?: MenuItemConfig | false;\n}\n\n/**\n * Configures a built-in menu item.\n */\nexport interface MenuItemConfig {\n  /**\n   * @deprecated since version 19.0.0-beta.2. Set to `false` in {@link ViewMenuItemsConfig} to exclude the menu item. API will be removed in version 21.\n   */\n  visible?: boolean;\n  /**\n   * Specifies the text of this menu item.\n   *\n   * Can be a string or a function that returns a string or a {@link Signal}.\n   *\n   * The function can call `inject` to get any required dependencies, or use `toSignal` to convert an observable to a signal.\n   *\n   * @deprecated since version 19.0.0-beta.3. Register a text provider to change or localize menu item texts. Register the text provider via workbench configuration passed to the `provideWorkbench` function. API will be removed in version 21.\n   */\n  text?: string | (() => string | Signal<string>);\n  accelerator?: string[];\n  group?: string;\n  cssClass?: string | string[];\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 * Throws the specified error, useful in arrow functions that do not support throwing without a body.\n */\nexport function throwError(error: string): never {\n  throw Error(error);\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 {effect, Injector, Signal, untracked} from '@angular/core';\n\n/**\n * Returns a Promise that resolves when signaling `true`.\n *\n * This function must be called within an injection context, or an explicit {@link Injector} passed.\n */\nexport function resolveWhen(condition: Signal<boolean>, options?: {injector?: Injector}): Promise<void> {\n  return new Promise<void>(resolve => {\n    const effectRef = effect(() => {\n      if (condition()) {\n        untracked(() => resolve());\n        effectRef.destroy();\n      }\n    }, {injector: options?.injector});\n  });\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 {Injectable} from '@angular/core';\n\n/**\n * Provides persistent storage to the SCION Workbench.\n */\nexport abstract class WorkbenchStorage {\n\n  /**\n   * Method invoked to load a value from persisted storage.\n   */\n  public abstract load(key: string): Promise<string | null> | string | null;\n\n  /**\n   * Method invoked to write a value to persisted storage.\n   *\n   * This method may be called during page unload. If sending data to a web server,\n   * use `navigator.sendBeacon()` instead of `window.fetch()` to reliably transmit data.\n   */\n  public abstract store(key: string, value: string): Promise<void> | void;\n}\n\n/**\n * Default storage used by the SCION workbench to persist data in local storage.\n *\n * Local storage maintains a persistent storage area per origin. Data does not expire and remains after the browser restarts.\n *\n * @internal\n */\n@Injectable(/* DO NOT provide via 'providedIn' metadata as registered conditionally under `WorkbenchStorage` DI token. */)\nexport class DefaultWorkbenchStorage implements WorkbenchStorage {\n\n  public load(key: string): string | null {\n    return localStorage.getItem(key);\n  }\n\n  public store(key: string, value: string): void {\n    localStorage.setItem(key, value);\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 {booleanAttribute, DestroyRef, inject, Injector, numberAttribute, signal, WritableSignal} from '@angular/core';\nimport {WorkbenchStorage} from '../storage/workbench-storage';\nimport {takeUntilDestroyed, toObservable} from '@angular/core/rxjs-interop';\nimport {skipUntil} from 'rxjs/operators';\n\n/**\n * Creates a writable signal to read and write specified flag from and to workbench storage.\n */\nexport function renderingFlag<T extends string | number | boolean | null>(storageKey: string, defaultValue: T, options?: {injector?: Injector}): WritableSignal<T> {\n  const injector = options?.injector ?? inject(Injector);\n  const workbenchStorage = injector.get(WorkbenchStorage);\n  const flag = signal<T>(defaultValue);\n\n  // Read flag from storage.\n  const whenReadFromStorage = readFromStorage(storageKey).then(storedValue => {\n    if (storedValue === null) {\n      return;\n    }\n    switch (typeof defaultValue) {\n      case 'number': {\n        flag.set(numberAttribute(storedValue, defaultValue) as T);\n        break;\n      }\n      case 'boolean': {\n        flag.set(booleanAttribute(storedValue) as T);\n        break;\n      }\n      default: {\n        flag.set(storedValue as T);\n      }\n    }\n  });\n\n  // Write flag to storage.\n  toObservable(flag, {injector})\n    .pipe(\n      skipUntil(whenReadFromStorage),\n      takeUntilDestroyed(injector.get(DestroyRef)),\n    )\n    .subscribe(value => void workbenchStorage.store(storageKey, `${value}`));\n\n  return flag;\n}\n\nasync function readFromStorage(key: string): Promise<string | null> {\n  return inject(WorkbenchStorage).load(key);\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 {UUID} from '@scion/toolkit/uuid';\n\n/**\n * Generates a UID (unique identifier).\n */\nexport const UID = {\n  /**\n   * Generates a UID (unique identifier) with length 8.\n   */\n  randomUID: (): string => {\n    return UUID.randomUUID().substring(0, 8);\n  },\n};\n","import {coerceElement} from '@angular/cdk/coercion';\nimport {booleanAttribute, DestroyRef, ElementRef, inject, Injector, numberAttribute, DOCUMENT} from '@angular/core';\nimport {Arrays} from '@scion/toolkit/util';\n\nimport {UID} from './uid.util';\nimport {DisposeFn} from './disposable';\nimport {Observable} from 'rxjs';\n\n/**\n * Creates an HTML element and optionally adds it to the DOM.\n */\nexport function createElement(tag: string, options: ElementCreateOptions): HTMLElement {\n  const element = document.createElement(tag);\n  options.style && setStyle(element, options.style);\n  options.cssClass && element.classList.add(...Arrays.coerce(options.cssClass));\n  options.attributes && setAttribute(element, options.attributes);\n  options.text && (element.innerText = options.text);\n  options.parent?.appendChild(element);\n  return element;\n}\n\n/**\n * Applies the given style(s) to the given element.\n *\n * Specify styles to be modified by passing a dictionary containing CSS property names (hyphen case).\n * To remove a style, set its value to `null`.\n */\nexport function setStyle(element: HTMLElement | ElementRef<HTMLElement>, styles: {[style: string]: string | null}): void {\n  const target = coerceElement(element);\n  Object.entries(styles).forEach(([name, value]) => {\n    if (value === null) {\n      target.style.removeProperty(name);\n    }\n    else {\n      target.style.setProperty(name, value);\n    }\n  });\n}\n\n/**\n * Sets the given attribute(s) on the given element.\n * To remove an attribute, set its value to `null`.\n */\nexport function setAttribute(element: HTMLElement | ElementRef<HTMLElement>, attributes: {[name: string]: string | null}): void {\n  const target = coerceElement(element);\n  Object.entries(attributes).forEach(([name, value]) => {\n    if (value === null) {\n      target.removeAttribute(name);\n    }\n    else {\n      target.setAttribute(name, value);\n    }\n  });\n}\n\n/**\n * Sets specified CSS variable(s) to the given element.\n *\n * To remove a CSS variable, set its value to `null`, or use {@link unsetCssVariable}.\n */\nexport function setCssVariable(element: HTMLElement | ElementRef<HTMLElement>, variables: {[name: string]: string | null}): void {\n  const target = coerceElement(element);\n  Object.entries(variables).forEach(([name, value]) => {\n    if (value === null) {\n      target.style.removeProperty(name);\n    }\n    else {\n      target.style.setProperty(name, value);\n    }\n  });\n}\n\n/**\n * Removes specified CSS variable(s) from the given element.\n */\nexport function unsetCssVariable(element: HTMLElement | ElementRef<HTMLElement>, ...names: string[]): void {\n  const target = coerceElement(element);\n  names.forEach(name => target.style.removeProperty(name));\n}\n\n/**\n * Reads and parses specified CSS variable from given element. Defaults to the specified value if not available.\n */\nexport function readCssVariable<T extends string | number | boolean | null>(element: Element, variable: string, defaultValue: T): T {\n  const value = getComputedStyle(element).getPropertyValue(variable) || defaultValue; // empty string if not set\n  switch (typeof defaultValue) {\n    case 'number': {\n      return numberAttribute(value, defaultValue) as T;\n    }\n    case 'boolean': {\n      return booleanAttribute(value) as T;\n    }\n    default: {\n      return value as T;\n    }\n  }\n}\n\n/**\n * Sets specified CSS class(es) to the given element.\n */\nexport function setCssClass(element: HTMLElement | ElementRef<HTMLElement>, ...classes: string[]): void {\n  coerceElement(element).classList.add(...classes);\n}\n\n/**\n * Removes specified CSS class(es) from the given element.\n */\nexport function unsetCssClass(element: HTMLElement | ElementRef<HTMLElement>, ...classes: string[]): void {\n  coerceElement(element).classList.remove(...classes);\n}\n\n/**\n * Reads the current vertical and horizontal translation of given element.\n */\nexport function getCssTranslation(element: Element): {translateX: string | 'none'; translateY: string | 'none'} {\n  const transformStyle = getComputedStyle(element).getPropertyValue('transform');\n  if (transformStyle === 'none') {\n    return {\n      translateX: 'none',\n      translateY: 'none',\n    };\n  }\n\n  // The transform property returns a matrix in the form `matrix(a, b, c, d, tx, ty)`, where `tx` is the horizontal translation and `ty` is the vertical translation.\n  const matrix = transformStyle.slice('matrix('.length, -1).split(/,\\s+/);\n  return {\n    translateX: matrix[4]!,\n    translateY: matrix[5]!,\n  };\n}\n\n/**\n * Ensures that the given HTML element is positioned, setting its position to `relative` if it is not already positioned.\n *\n * Positioning is set using a constructable CSS stylesheet with a CSS layer. CSS layers have lower priority than \"normal\"\n * CSS declarations, and the layer name indicates the styling originates from `@scion/workbench`.\n *\n * This function adds an attribute to the element to locate it from the stylesheet, with the name containing a random identifier plus the context.\n *\n * This function must be passed an injector or called in an injection context. Destroying the injector will remove the attribute and the stylesheet.\n */\nexport function positionElement(elementLike: Element | ElementRef<Element>, options: {context: string; injector?: Injector}): void {\n  const injector = options.injector ?? inject(Injector);\n  const element = coerceElement(elementLike);\n  const document = injector.get(DOCUMENT);\n  const disposables = new Array<DisposeFn>();\n\n  // Generate identifiers to locate the element from the stylesheet.\n  const elementIdentifier = `data-wb-${options.context}-${UID.randomUID()}`;\n  const elementIdentifierImportant = `${elementIdentifier}-important`;\n\n  // Add stylesheet to change the element's position to relative.\n  const styleSheet = new CSSStyleSheet({});\n  styleSheet.insertRule(`\n      @layer sci-workbench {\n        [${elementIdentifier}] {\n          position: relative;\n        }\n      }`,\n  );\n  document.adoptedStyleSheets.push(styleSheet);\n  disposables.push(() => Arrays.remove(document.adoptedStyleSheets, styleSheet));\n\n  // Add attribute to locate the element from the stylesheet.\n  element.setAttribute(elementIdentifier, '');\n  disposables.push(() => element.removeAttribute(elementIdentifier));\n\n  // If CSS layer styles have no effect due to 'static' positioning or unset styles, enforce positioning with !important.\n  const animationFrame = requestAnimationFrame(() => {\n    if (getComputedStyle(element).position === 'static') {\n      styleSheet.insertRule(`\n        [${elementIdentifierImportant}] {\n          position: relative !important;\n        }\n      `);\n      element.setAttribute(elementIdentifierImportant, '');\n      disposables.push(() => element.removeAttribute(elementIdentifierImportant));\n    }\n  });\n  disposables.push(() => cancelAnimationFrame(animationFrame));\n\n  // Clean up when the injection context is destroyed.\n  injector.get(DestroyRef).onDestroy(() => disposables.forEach(disposable => disposable()));\n}\n\n/**\n * Emits when the next animation frame is executed.\n *\n * Unlike using `timer(0, animationFrameScheduler)`, this observable emits within the zone where it is subscribed.\n *\n * Note that the RxJS `animationFrameScheduler` may not necessarily execute in the current execution context, such as inside or outside Angular.\n * The scheduler always executes tasks in the zone where it was first used in the application.\n */\nexport function nextAnimationFrame$(): Observable<void> {\n  return new Observable<void>(observer => {\n    const animationFrame = requestAnimationFrame(() => observer.next());\n    return () => cancelAnimationFrame(animationFrame);\n  });\n}\n\n/**\n * Describes how to create a new HTML element.\n */\nexport interface ElementCreateOptions {\n  /**\n   * Specifies the parent where to add this element to the DOM tree.\n   * If not specified, the element is not added to the DOM.\n   */\n  parent?: Node;\n  cssClass?: string | string[];\n  style?: {[style: string]: any};\n  attributes?: {[name: string]: any};\n  text?: string;\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 {computed, DOCUMENT, inject, Injectable, signal} from '@angular/core';\nimport {ɵWorkbenchLayout} from './ɵworkbench-layout';\nimport {throwError} from '../common/throw-error.util';\nimport {resolveWhen} from '../common/resolve-when.util';\nimport {renderingFlag} from './rendering-flag';\nimport {readCssVariable} from '../common/dom.util';\n\n/**\n * Provides access to the workbench layout.\n */\n@Injectable({providedIn: 'root'})\nexport class WorkbenchLayoutService {\n\n  private readonly _layout = signal<ɵWorkbenchLayout | null>(null);\n  private readonly _dragging = signal(false);\n  private readonly _moving = signal(false);\n  private readonly _resizing = signal(false);\n\n  /**\n   * Provides the layout of the workbench, throwing an error if the initial layout is not yet available.\n   */\n  public readonly layout = computed(() => this._layout() ?? throwError('[NullLayoutError] Workbench layout not available yet.'));\n\n  /**\n   * Indicates whether the layout is available, i.e., after Angular has performed the initial navigation.\n   */\n  public readonly hasLayout = computed(() => this._layout() !== null);\n\n  /**\n   * Resolves when the layout is available, i.e., after Angular has performed the initial navigation.\n   */\n  public readonly whenLayoutAvailable = resolveWhen(this.hasLayout);\n\n  /**\n   * Indicates if a drag operation is active, such as moving a view or dialog, or resizing a part.\n   */\n  public readonly dragging = computed(() => this._dragging() || this._moving() || this._resizing());\n\n  /**\n   * Controls the alignment of the bottom activity panel.\n   *\n   * Defaults to the `--sci-workbench-layout-panel-align` design token, or `justify` if not set.\n   */\n  public readonly panelAlignment = renderingFlag(\n    'scion.workbench.layout.panel.align',\n    readCssVariable(inject(DOCUMENT).documentElement, '--sci-workbench-layout-panel-align', 'justify'),\n  );\n\n  /**\n   * Controls animation of activity panels.\n   *\n   * Defaults to the `--sci-workbench-layout-panel-animate` design token, or `true` if not set.\n   */\n  public readonly panelAnimation = renderingFlag(\n    'scion.workbench.layout.panel.animate',\n    readCssVariable(inject(DOCUMENT).documentElement, '--sci-workbench-layout-panel-animate', true),\n  );\n\n  /**\n   * Signals dragging a workbench element, such as dragging a view tab.\n   */\n  public signalDragging(dragging: boolean): void {\n    this._dragging.set(dragging);\n  }\n\n  /**\n   * Signals moving a workbench element, such as moving a dialog.\n   */\n  public signalMoving(moving: boolean): void {\n    this._moving.set(moving);\n  }\n\n  /**\n   * Signals resizing a workbench element, such as resizing a dialog or part.\n   */\n  public signalResizing(resizing: boolean): void {\n    this._resizing.set(resizing);\n  }\n\n  /**\n   * Sets the given {@link WorkbenchLayout}.\n   */\n  public setLayout(layout: ɵWorkbenchLayout): void {\n    this._layout.set(layout);\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 {InjectionToken} from '@angular/core';\nimport {Route} from '@angular/router';\n\n/**\n * Represents the id prefix of parts.\n *\n * @see PartId\n */\nexport const PART_ID_PREFIX = 'part.';\n\n/**\n * Represents the id prefix of views.\n *\n * @see ViewId\n */\nexport const VIEW_ID_PREFIX = 'view.';\n\n/**\n * Represents the id prefix of activities.\n */\nexport const ACTIVITY_ID_PREFIX = 'activity.';\n\n/**\n * Represents the id prefix of popups.\n */\nexport const POPUP_ID_PREFIX = 'popup.';\n\n/**\n * Represents the id prefix of dialogs.\n */\nexport const DIALOG_ID_PREFIX = 'dialog.';\n\n/**\n * Represents the id prefix of message boxes.\n */\nexport const MESSAGE_BOX_ID_PREFIX = 'messagebox.';\n\n/**\n * Format of a part outlet name.\n */\nexport type PartOutlet = `${typeof PART_ID_PREFIX}${string}`;\n\n/**\n * Format of a view outlet name.\n */\nexport type ViewOutlet = `${typeof VIEW_ID_PREFIX}${number}`;\n\n/**\n * Format of a popup outlet name.\n */\nexport type PopupOutlet = `${typeof POPUP_ID_PREFIX}${string}`;\n\n/**\n * Format of a dialog outlet name.\n */\nexport type DialogOutlet = `${typeof DIALOG_ID_PREFIX}${string}`;\n\n/**\n * Format of a messagebox outlet name.\n */\nexport type MessageBoxOutlet = `${typeof MESSAGE_BOX_ID_PREFIX}${string}`;\n\n/**\n * Union of workbench outlets.\n */\nexport type WorkbenchOutlet = PartOutlet | ViewOutlet | PopupOutlet | DialogOutlet | MessageBoxOutlet;\n\n/**\n * Name of the query parameter that contains the layout of the main area.\n */\nexport const MAIN_AREA_LAYOUT_QUERY_PARAM = 'main_area';\n\n/**\n * Defines the context in which a viewtab is rendered.\n *\n * - `tab`: if rendered as view tab in the tabbar\n * - `list-item`:  if rendered as list item in the view list menu\n * - `drag-image`: if rendered as drag image while dragging a view tab\n */\nexport type ViewTabRenderingContext = 'tab' | 'list-item' | 'drag-image';\n\n/**\n * DI token to inject the context in which the view tab is rendered.\n */\nexport const VIEW_TAB_RENDERING_CONTEXT = new InjectionToken<ViewTabRenderingContext>('VIEW_TAB_RENDERING_CONTEXT');\n\n/**\n * Prefix used to identify an anonymous perspective that the workbench creates for views moved to a new window.\n */\nexport const ANONYMOUS_PERSPECTIVE_ID_PREFIX = 'anonymous.';\n\n/**\n * DI token for registering workbench-specific routes for workbench outlets.\n */\nexport const WORKBENCH_ROUTE = new InjectionToken<Route>('WORKBENCH_ROUTE');\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 {Observable, OperatorFunction} from 'rxjs';\nimport {filter, mergeMap} from 'rxjs/operators';\n\n/**\n * Serializes the execution of elements emitted by the source Observable.\n *\n * For each element emitted by the source, the specified callback function is called.\n * The next element will only be processed once the Promise or Observable returned by\n * the callback function resolves or completes.\n */\nexport function serializeExecution<IN, OUT>(fn: (value: IN) => Observable<OUT> | Promise<OUT>): OperatorFunction<IN, OUT> {\n  return mergeMap(element => fn(element), 1);\n}\n\n/**\n * Mirrors the source except for `null` emissions.\n */\nexport function filterNull<T>(): OperatorFunction<T | null, T> {\n  return filter((item: T | null): item is T => item !== null);\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 {asapScheduler, AsyncSubject, lastValueFrom, Subject} from 'rxjs';\nimport {serializeExecution} from '../common/operators';\nimport {catchError, observeOn} from 'rxjs/operators';\nimport {InjectionToken} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\n\n/**\n * Serializes navigation requests to the Angular Router to prevent the cancellation of previously initiated asynchronous navigations.\n */\nexport const ANGULAR_ROUTER_MUTEX = new InjectionToken<SingleTaskExecutor>('ANGULAR_ROUTER_MUTEX', {\n  providedIn: 'root',\n  factory: () => new SingleTaskExecutor(),\n});\n\n/**\n * Allows the serial execution of tasks.\n *\n * At any one time, there is only one task executing. When submitting a task and if there is a task already executing,\n * the submitted task will be queued for later execution.\n *\n * This executor must be constructed within an injection context. Destroying the injection context will also destroy the executor.\n */\nexport class SingleTaskExecutor {\n\n  private _task$ = new Subject<Task>();\n\n  constructor() {\n    this._task$\n      .pipe(\n        // Schedule the task asynchronously so that it is not executed if the executor is destroyed in the same \"call stack\",\n        // happening, for example, when destroying the Testbed in unit tests. Angular destroys contexts from the bottom up,\n        // i.e., child contexts are destroyed before parent contexts. If a task is scheduled in a destroy lifecycle hook of\n        // a child context, the task would still be executed because the executor is not destroyed yet.\n        observeOn(asapScheduler),\n        serializeExecution(task => task.execute()),\n        catchError((error, caught) => caught),\n        takeUntilDestroyed(),\n      )\n      .subscribe();\n  }\n\n  /**\n   * Submits a task for serial execution.\n   *\n   * Returns a Promise that resolves to the result of the passed task.\n   */\n  public submit<T>(task: () => Promise<T>): Promise<T> {\n    const ɵtask = new Task<T>(task);\n    this._task$.next(ɵtask);\n    return ɵtask.await();\n  }\n}\n\nclass Task<T = any> {\n\n  private _done$ = new AsyncSubject<T>();\n\n  constructor(private _work: () => Promise<T>) {\n  }\n\n  public async execute(): Promise<void> {\n    try {\n      const result = await this._work();\n      this._done$.next(result);\n      this._done$.complete();\n    }\n    catch (error) {\n      this._done$.error(error);\n    }\n  }\n\n  public await(): Promise<T> {\n    return lastValueFrom(this._done$);\n  }\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 {Navigation} from '@angular/router';\nimport {NavigationStates} from './routing.model';\nimport {ActivityId} from '../activity/workbench-activity.model';\n\n/**\n * Provides methods to associate {@link WorkbenchNavigationalState} with a navigation.\n */\nexport const WorkbenchNavigationalStates = {\n\n  /**\n   * Returns workbench-specific state associated with given navigation, or `null` if the navigation was not performed through the workbench router.\n   */\n  fromNavigation: (navigation: Navigation): WorkbenchNavigationalState | null => {\n    return navigation.extras.state?.[WORKBENCH_NAVIGATION_STATE_KEY] as WorkbenchNavigationalState | undefined ?? null;\n  },\n\n  /**\n   * Creates a state object with workbench-specific data that can be passed to a workbench navigation.\n   */\n  create: (state: WorkbenchNavigationalState): {[key: string]: unknown} => {\n    return {\n      [WORKBENCH_NAVIGATION_STATE_KEY]: state,\n    };\n  },\n} as const;\n\n/**\n * Represents workbench-specific state associated with a navigation.\n */\nexport interface WorkbenchNavigationalState {\n  /**\n   * Arrangement of parts and views.\n   */\n  grids: {\n    /**\n     * Serialized main grid.\n     */\n    main: string;\n    /**\n     * Serialized activity grids.\n     */\n    [activityId: ActivityId]: string;\n  };\n  /**\n   * Arrangement of activities.\n   */\n  activityLayout: string;\n  /**\n   * Identifies the perspective that is navigated.\n   */\n  perspectiveId?: string;\n  /**\n   * Provides navigation state of views contained in the workbench layout.\n   */\n  navigationStates: NavigationStates;\n}\n\n/**\n * Key for associating workbench-specific state with a navigation.\n */\nconst WORKBENCH_NAVIGATION_STATE_KEY = 'ɵworkbench';\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 {ActivatedRoute, ActivatedRouteSnapshot, ActivationEnd, ActivationStart, ChildrenOutletContexts, Event, NavigationStart, OutletContext, PRIMARY_OUTLET, Router, RouterEvent, UrlSegment, UrlSegmentGroup, UrlTree} from '@angular/router';\nimport {Commands} from '../routing/routing.model';\nimport {DIALOG_ID_PREFIX, DialogOutlet, MESSAGE_BOX_ID_PREFIX, MessageBoxOutlet, PART_ID_PREFIX, PartOutlet, POPUP_ID_PREFIX, PopupOutlet, VIEW_ID_PREFIX, ViewOutlet, WorkbenchOutlet} from '../workbench.constants';\nimport {inject} from '@angular/core';\nimport {EMPTY, iif, MonoTypeOperatorFunction, Observable, of, OperatorFunction, pairwise, race, switchMap} from 'rxjs';\nimport {filter, map, startWith, take} from 'rxjs/operators';\n\n/**\n * Provides utility functions for router operations.\n */\nexport const Routing = {\n\n  /**\n   * Converts given URL segments into an array of commands that can be passed to the Angular router for navigation.\n   */\n  segmentsToCommands: (segments: UrlSegment[]): Commands => {\n    const commands = new Array<unknown>();\n\n    segments.forEach(segment => {\n      if (segment.path) {\n        commands.push(segment.path);\n      }\n      if (Object.keys(segment.parameters).length) {\n        commands.push(segment.parameters);\n      }\n    });\n\n    return commands;\n  },\n\n  /**\n   * Constructs URL segments from given commands, resolving any relative navigational symbols.\n   *\n   * This function must be called within an injection context.\n   */\n  commandsToSegments: (commands: Commands, options?: {relativeTo?: ActivatedRoute | null}): UrlSegment[] => {\n    // Ignore `relativeTo` for absolute commands.\n    const isAbsolutePath = typeof commands[0] === 'string' && commands[0].startsWith('/');\n    const relativeTo = isAbsolutePath ? null : (options?.relativeTo ?? null);\n\n    // Angular throws the error 'NG04003: Root segment cannot have matrix parameters' when passing an empty-path command\n    // followed by a matrix params object, but not when passing matrix params as the first command. For consistency, when\n    // passing matrix params as the first command, we prepend an empty-path for Angular to throw the same error.\n    if (typeof commands[0] === 'object' && (!relativeTo || Routing.hasEmptyPathFromRoot(relativeTo))) {\n      commands = ['', ...commands];\n    }\n\n    const urlTree = inject(Router).createUrlTree(commands, {relativeTo});\n    return urlTree.root.children[relativeTo?.pathFromRoot[1]?.outlet ?? PRIMARY_OUTLET]?.segments ?? [];\n  },\n\n  /**\n   * Parses the given path and matrix parameters into an array of commands that can be passed to the Angular router for navigation.\n   *\n   * This function must be called within an injection context.\n   */\n  pathToCommands: (path: string): Commands => {\n    const urlTree = inject(Router).parseUrl(path);\n    const segmentGroup = urlTree.root.children[PRIMARY_OUTLET] as UrlSegmentGroup | undefined;\n    if (!segmentGroup?.segments) {\n      throw Error(`[RouterError] Cannot match any routes for path '${path}'.`);\n    }\n    return Routing.segmentsToCommands(segmentGroup.segments);\n  },\n\n  /**\n   * Resolves the effective (=leaf) {@link ActivatedRoute} activated in a router outlet.\n   *\n   * Depending on the route hierarchy, when navigating to a child route with component-less parent routes, the route of an outlet may not be the effectively activated child route.\n   */\n  resolveEffectiveRoute: (route: ActivatedRoute): ActivatedRoute => {\n    return route.firstChild ? Routing.resolveEffectiveRoute(route.firstChild) : route;\n  },\n\n  /**\n   * Resolves the effective (=leaf) {@link OutletContext} of a router outlet.\n   *\n   * Depending on the route hierarchy, when navigating to a child route with component-less parent routes, the context of an outlet may not be the effectively activated child context.\n   */\n  resolveEffectiveOutletContext: (outletContext: OutletContext | null): OutletContext | null => {\n    const childOutletContext = outletContext?.children.getContext(PRIMARY_OUTLET);\n    return childOutletContext ? Routing.resolveEffectiveOutletContext(childOutletContext) : outletContext;\n  },\n\n  /**\n   * Looks for requested data on given route, or its parent route(s) if not found.\n   */\n  lookupRouteData: <T>(activatedRoute: ActivatedRouteSnapshot, dataKey: string): T | undefined => {\n    return activatedRoute.pathFromRoot.reduceRight<T | undefined>((resolvedData, route) => resolvedData ?? route.data[dataKey] as T | undefined, undefined);\n  },\n\n  /**\n   * Tests if the given outlet matches the format of a workbench outlet.\n   */\n  isWorkbenchOutlet: (outlet: string | undefined | null): outlet is WorkbenchOutlet => {\n    return Routing.isPartOutlet(outlet) || Routing.isViewOutlet(outlet) || Routing.isPopupOutlet(outlet) || Routing.isDialogOutlet(outlet) || Routing.isMessageBoxOutlet(outlet);\n  },\n\n  /**\n   * Tests if the given outlet matches the format of the view outlet.\n   */\n  isViewOutlet: (outlet: string | undefined | null): outlet is ViewOutlet => {\n    return outlet?.startsWith(VIEW_ID_PREFIX) ?? false;\n  },\n\n  /**\n   * Tests if the given outlet matches the format of the part outlet.\n   */\n  isPartOutlet: (outlet: string | undefined | null): outlet is PartOutlet => {\n    return outlet?.startsWith(PART_ID_PREFIX) ?? false;\n  },\n\n  /**\n   * Tests if the given outlet matches the format of a popup outlet.\n   */\n  isPopupOutlet: (outlet: string | undefined | null): outlet is PopupOutlet => {\n    return outlet?.startsWith(POPUP_ID_PREFIX) ?? false;\n  },\n\n  /**\n   * Tests if the given outlet matches the format of a dialog outlet.\n   */\n  isDialogOutlet: (outlet: string | undefined | null): outlet is DialogOutlet => {\n    return outlet?.startsWith(DIALOG_ID_PREFIX) ?? false;\n  },\n\n  /**\n   * Tests if the given outlet matches the format of a message box outlet.\n   */\n  isMessageBoxOutlet: (outlet: string | undefined | null): outlet is MessageBoxOutlet => {\n    return outlet?.startsWith(MESSAGE_BOX_ID_PREFIX) ?? false;\n  },\n\n  /**\n   * Reads outlets from given URL.\n   */\n  parseOutlets: parseOutlets,\n\n  /**\n   * Tests if given route has an empty path from root.\n   */\n  hasEmptyPathFromRoot(route: ActivatedRoute): boolean {\n    return route.snapshot.pathFromRoot.flatMap(route => route.url).filter(segment => segment.path.length).length === 0;\n  },\n\n  /**\n   * Observes the route activation for the specified outlet.\n   *\n   * The observable emits after the previous component has been destroyed (if any) but before constructing the new component.\n   *\n   * Options to control when to emit:\n   * - `routeChange`: Emit only when navigating the outlet to a different route.\n   * - `routeOrParamChange`: Emit when navigating the outlet to a different route or changing params (named path params or matrix params).\n   * - `always`: Emit at every navigation, even if the outlet is not the target of the navigation.\n   *\n   * This method must be called within an injection context.\n   *\n   * Note: Listening for route activations/deactivations on the router outlet alone is insufficient for nested routes, as the outlet does not report\n   * activations/deactivations of child routes.\n   *\n   * @param outlet - Specifies the outlet to observe.\n   * @param options - Controls when to emit the observable.\n   * @return An observable emitting a tuple of the previous and current route snapshots.\n   */\n  activatedRoute$(outlet: string, options: {emitOn: 'routeChange' | 'routeOrParamChange' | 'always'}): Observable<[ActivatedRouteSnapshot | null, ActivatedRouteSnapshot]> {\n    const router = inject(Router);\n    const childrenOutletContexts = inject(ChildrenOutletContexts);\n\n    const onNavigationStart$ = router.events.pipe(filterNavigationStart());\n    const onActivationStart$ = router.events.pipe(filterActivationStart(), filterByOutlet(outlet));\n    const onActivationEnd$ = router.events.pipe(filterActivationEnd(), filterByOutlet(outlet));\n\n    // On each navigation start (`NavigationStart`), subscribe to the outlet's `ActivationStart` event and then to the outlet's deactivate event,\n    // enabling continuing of the execution chain after the previous component has been destroyed.\n    //\n    // If `emitOn` is set to `always`, additionally subscribe to the outlet's `ActivationEnd` event, since no activation (`ActivationStart`) occurs if\n    // the outlet is not navigated (e.g., navigating another outlet or updating query params).\n    //\n    // Note that Angular activates nested routes from parent to child and deactivates them from child to parent, triggering multiple `ActivationStart`\n    // and `ActivationEnd` events. For the outlet, the latest `ActivationStart` and the first `ActivationEnd` events are relevant.\n    //\n    // `ActivationStart` is emitted only if the outlet is actually navigated (route or parameter change), whereas `ActivationEnd` is always emitted.\n    //\n    // If a navigation is currently in progress, start immediately, allowing subscriptions even during ongoing navigation, such as after the navigation\n    // has started.\n    return iif(() => !router.getCurrentNavigation(), onNavigationStart$, onNavigationStart$.pipe(startWith(undefined)))\n      .pipe(\n        // Subscribe to the outlet's `ActivationStart` (and also `ActivationEnd` if the `emitOn` option is set to `always`).\n        switchMap(() => options.emitOn === 'always' ? race(onActivationStart$, onActivationEnd$.pipe(take(1))) : onActivationStart$),\n        map(event => event.snapshot),\n        startWith(null as unknown as ActivatedRouteSnapshot), // initialize pairwise operator\n        pairwise(),\n        switchMap(([previous, current]: [ActivatedRouteSnapshot | null, ActivatedRouteSnapshot]): Observable<[ActivatedRouteSnapshot | null, ActivatedRouteSnapshot]> => {\n          // If the route hasn't changed and `emitOn` is set to `always` or `routeOrParamChange`, emit immediately since no deactivation will occur.\n          const routeChanged = previous?.routeConfig !== current.routeConfig;\n          if (!routeChanged) {\n            return options.emitOn === 'routeChange' ? EMPTY : of([previous, current]);\n          }\n\n          // If there's no previously activated component in the outlet, emit immediately since no deactivation will occur.\n          const outletContext = Routing.resolveEffectiveOutletContext(childrenOutletContexts.getContext(outlet));\n          if (!outletContext?.outlet?.isActivated) {\n            return of([previous, current]);\n          }\n\n          // Delay emission until the previously activated component has been destroyed by subscribing to the outlet's deactivation event.\n          // Nested routes activate from parent to child, canceling \"deactivation\" subscriptions of parent outlets, so only the deactivation of the actual outlet is emitted.\n          return outletContext.outlet.deactivateEvents!.pipe(map(() => [previous, current]));\n        }),\n      );\n\n    /**\n     * Filters {@link NavigationStart} router events.\n     */\n    function filterNavigationStart(): OperatorFunction<Event | RouterEvent, NavigationStart> {\n      return filter((event: Event | RouterEvent): event is NavigationStart => event instanceof NavigationStart);\n    }\n\n    /**\n     * Filters {@link ActivationStart} router events.\n     */\n    function filterActivationStart(): OperatorFunction<Event | RouterEvent, ActivationStart> {\n      return filter((event: Event | RouterEvent): event is ActivationStart => event instanceof ActivationStart);\n    }\n\n    /**\n     * Filters {@link ActivationEnd} router events. This event is emitted for each outlet regardless of whether it has been navigated or not.\n     */\n    function filterActivationEnd(): OperatorFunction<Event | RouterEvent, ActivationEnd> {\n      return filter((event: Event | RouterEvent): event is ActivationEnd => event instanceof ActivationEnd);\n    }\n\n    /**\n     * Filters router events for the specified outlet.\n     */\n    function filterByOutlet<T extends ActivationStart | ActivationEnd>(outlet: string): MonoTypeOperatorFunction<T> {\n      return filter(event => event.snapshot.pathFromRoot[1]?.outlet === outlet);\n    }\n  },\n} as const;\n\nfunction parseOutlets(url: UrlTree, selector: {view: true}): Map<ViewOutlet, UrlSegment[]>;\nfunction parseOutlets(url: UrlTree, selector: {part: true}): Map<PartOutlet, UrlSegment[]>;\nfunction parseOutlets(url: UrlTree, selector: {dialog: true}): Map<DialogOutlet, UrlSegment[]>;\nfunction parseOutlets(url: UrlTree, selector: {popup: true}): Map<PopupOutlet, UrlSegment[]>;\nfunction parseOutlets(url: UrlTree, selector: {messagebox: true}): Map<MessageBoxOutlet, UrlSegment[]>;\nfunction parseOutlets(url: UrlTree, selector: {view?: true; part?: true; dialog?: true; popup?: true; messagebox?: true}): Map<WorkbenchOutlet, UrlSegment[]>;\nfunction parseOutlets(url: UrlTree, selector: {view?: true; part?: true; dialog?: true; popup?: true; messagebox?: true}): Map<WorkbenchOutlet, UrlSegment[]> {\n  const outlets = new Map<WorkbenchOutlet, UrlSegment[]>();\n  Object.entries(url.root.children).forEach(([outlet, segmentGroup]) => {\n    if (selector.view && Routing.isViewOutlet(outlet)) {\n      outlets.set(outlet, segmentGroup.segments);\n    }\n    if (selector.part && Routing.isPartOutlet(outlet)) {\n      outlets.set(outlet, segmentGroup.segments);\n    }\n    if (selector.dialog && Routing.isDialogOutlet(outlet)) {\n      outlets.set(outlet, segmentGroup.segments);\n    }\n    if (selector.popup && Routing.isPopupOutlet(outlet)) {\n      outlets.set(outlet, segmentGroup.segments);\n    }\n    if (selector.messagebox && Routing.isMessageBoxOutlet(outlet)) {\n      outlets.set(outlet, segmentGroup.segments);\n    }\n  });\n  return outlets;\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 {UrlSegment} from '@angular/router';\nimport {Objects} from '@scion/toolkit/util';\n\n/**\n * Matches an array of URL segments against another array of URL segments.\n *\n * Flags:\n * - matchWildcardPath: Indicates if wildcard path matching is enabled. If enabled, the asterisk `*` path matches any path of the segment.\n * - matchMatrixParams: Controls whether to match matrix parameters.\n */\nexport class UrlSegmentMatcher {\n\n  constructor(private _pattern: UrlSegment[], private _flags: {matchWildcardPath: boolean; matchMatrixParams: boolean}) {\n  }\n\n  /**\n   * Matches given array of URL segments.\n   */\n  public matches(segments: UrlSegment[]): boolean {\n    if (segments === this._pattern) {\n      return true;\n    }\n\n    if (segments.length !== this._pattern.length) {\n      return false;\n    }\n\n    return segments.every((segment, index) => {\n      const checkMatrixParams = this._flags.matchMatrixParams;\n      const checkPath = !this._flags.matchWildcardPath || this._pattern[index]!.path !== '*';\n\n      if (checkPath && segment.path !== this._pattern[index]!.path) {\n        return false;\n      }\n      if (checkMatrixParams && !Objects.isEqual(segment.parameters, this._pattern[index]!.parameters)) {\n        return false;\n      }\n      return true;\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 {Dictionaries, Objects as ToolkitObjects} from '@scion/toolkit/util';\n\n/**\n * Provides helper functions for working with objects.\n */\nexport const Objects = {\n\n  /**\n   * Like {@link Object.keys}, but preserving the data type of keys.\n   */\n  keys: <T, P extends keyof T>(object: T): P[] => {\n    return Object.keys(object as Record<P, unknown>) as Array<P>;\n  },\n\n  /**\n   * Like {@link Object.values}, but preserving the data type of values and supporting optional properties.\n   */\n  values: <T, P extends keyof T>(object: T): Array<T[P]> => {\n    return Object.values(object as Record<P, T[P]>);\n  },\n\n  /**\n   * Like {@link Object.entries}, but preserving the data type of keys and supporting optional properties.\n   */\n  entries: <T, P extends keyof T>(object: T): Array<[P, T[P]]> => {\n    return Object.entries(object as Record<P, T[P]>) as Array<[P, T[P]]>;\n  },\n\n  /**\n   * Like {@link Dictionaries.withoutUndefinedEntries}, but preserving the object data type.\n   */\n  withoutUndefinedEntries: <T>(object: T & Record<string, unknown>): T => {\n    return Dictionaries.withoutUndefinedEntries(object) as T;\n  },\n  /**\n   * Stringifies given object to matrix notation: a=b;c=d;e=f\n   */\n  toMatrixNotation: (object: Record<string, unknown> | null | undefined): string => {\n    return Object.entries(object ?? {}).map(([key, value]) => `${key}=${value}`).join(';');\n  },\n  /**\n   * Compares the two objects for shallow equality, ignoring the propery order.\n   */\n  isEqual: (a: unknown, b: unknown): boolean => {\n    return ToolkitObjects.isEqual(a, b);\n  },\n} as const;\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 {DestroyRef, inject, signal} from '@angular/core';\n\n/**\n * Provides a registry for workbench model objects.\n */\nexport class WorkbenchObjectRegistry<KEY, T> {\n\n  private readonly _objects = signal<T[]>([]);\n  private readonly _objectsById = new Map<KEY, T>();\n\n  private readonly _nullObjectErrorFn: (key: KEY) => Error;\n  private readonly _onUnregister: ((object: T) => void) | undefined;\n\n  public readonly objects = this._objects.asReadonly();\n\n  /**\n   * Creates an instance of the registry.\n   *\n   * This registry must be constructed within an injection context. Destroying the injection context will also destroy the registry,\n   * invoking the specified `onUnregister` function for each object in the registry.\n   *\n   * @param config - Configures the registry.\n   * @param config.nullObjectErrorFn - Function to provide an error when looking up an object not contained in the registry.\n   * @param config.onUnregister - Function invoked when an object is unregistered.\n   */\n  constructor(config?: {nullObjectErrorFn?: (key: KEY) => Error; onUnregister?: (object: T) => void}) {\n    this._nullObjectErrorFn = config?.nullObjectErrorFn ?? ((key: KEY) => Error(`[NullObjectError] Object '${key}' not found.`));\n    this._onUnregister = config?.onUnregister;\n\n    // Clear registry when the current injection context is destroyed.\n    inject(DestroyRef).onDestroy(() => this.clear());\n  }\n\n  /**\n   * Registers an object under given key, replacing any previously registered object with the same key.\n   */\n  public register(key: KEY, object: T): void {\n    const prevObject = this._objectsById.get(key);\n\n    // Add to Map.\n    this._objectsById.set(key, object);\n\n    // Add to Signal.\n    this._objects.update(objects => {\n      const copy = [...objects];\n      if (prevObject) {\n        copy.splice(copy.indexOf(prevObject), 1, object); // Replace object.\n      }\n      else {\n        copy.push(object); // Append object.\n      }\n      return copy;\n    });\n  }\n\n  /**\n   * Unregisters specified object.\n   */\n  public unregister(key: KEY): T | null {\n    const object = this._objectsById.get(key);\n    if (!object) {\n      return null;\n    }\n\n    // Invoke unregister function.\n    this._onUnregister?.(object);\n\n    // Remove from Map.\n    this._objectsById.delete(key);\n    // Remove from Signal.\n    this._objects.update(objects => {\n      const copy = [...objects];\n      copy.splice(copy.indexOf(object), 1);\n      return copy;\n    });\n    return object;\n  }\n\n  /**\n   * Returns the object of the given identity. If not found, by default, throws an error unless setting the `orElseNull` option.\n   */\n  public get(key: KEY): T;\n  public get(key: KEY, options?: {orElse: null}): T | null;\n  public get(key: KEY, options?: {orElse: null}): T | null {\n    const object = this._objectsById.get(key);\n    if (!object && !options) {\n      throw this._nullObjectErrorFn(key);\n    }\n    return object ?? null;\n  }\n\n  /**\n   * Indicates whether an object with the specified key exists or not.\n   */\n  public has(key: KEY): boolean {\n    return this._objectsById.has(key);\n  }\n\n  /**\n   * Indicates whether this registry is empty.\n   */\n  public isEmpty(): boolean {\n    return this._objectsById.size === 0;\n  }\n\n  /**\n   * Clears this registry.\n   */\n  public clear(): void {\n    this._onUnregister && this.objects().forEach(this._onUnregister);\n    this._objectsById.clear();\n    this._objects.set([]);\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 {InjectionToken} from '@angular/core';\nimport {ɵWorkbenchView} from './ɵworkbench-view.model';\nimport {WorkbenchObjectRegistry} from '../registry/workbench-object-registry';\nimport {ViewId} from './workbench-view.model';\n\n/**\n * Registry for {@link WorkbenchView} model objects.\n */\nexport const WORKBENCH_VIEW_REGISTRY = new InjectionToken<WorkbenchObjectRegistry<ViewId, ɵWorkbenchView>>('WORKBENCH_VIEW_REGISTRY', {\n  providedIn: 'root',\n  factory: () => new WorkbenchObjectRegistry<ViewId, ɵWorkbenchView>({\n    nullObjectErrorFn: viewId => Error(`[NullViewError] View '${viewId}' not found.`),\n    onUnregister: view => view.destroy(),\n  }),\n});\n","import {Type} from '@angular/core';\nimport {Arrays} from '@scion/toolkit/util';\n\n/**\n * Asserts the given object to be of the given type (and not simply a JavaScript object literal).\n *\n * Throws an error if not of the given type, or if `null` or `undefined`.\n */\nexport function assertType(object: unknown, assert: {toBeOneOf: Type<any>[] | Type<any>}): void {\n  if (object === null) {\n    throw Error(`[AssertError] Object must not be 'null'.`);\n  }\n  if (object === undefined) {\n    throw Error(`[AssertError] Object must not be 'undefined'.`);\n  }\n  if (!Arrays.coerce(assert.toBeOneOf).some(expectedType => object instanceof expectedType)) {\n    const expectedType = Arrays.coerce(assert.toBeOneOf).map(it => it.name).join(' or ');\n    const actualType = object.constructor.name;\n    throw Error(`[AssertError] Object not of the expected type [expected=${expectedType}, actual=${actualType}].`);\n  }\n}\n\n/**\n * Asserts the given object not to be `null` or `undefined.\n */\nexport function assertNotNullish(value: any, errorFn?: () => Error): void {\n  if (value === null) {\n    throw errorFn?.() ?? Error('[AssertError] Value expected not to be `null`, but was `null`.');\n  }\n  if (value === undefined) {\n    throw errorFn?.() ?? Error('[AssertError] Value expected not to be `undefined`, but was `undefined`.');\n  }\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 {assertType} from '../common/asserts.util';\nimport {ViewId} from '../view/workbench-view.model';\nimport {NavigationData} from '../routing/routing.model';\nimport {PartId} from '../part/workbench-part.model';\nimport {ActivityId} from '../activity/workbench-activity.model';\n\n/**\n * Represents the arrangement of parts as grid.\n *\n * The M-prefix indicates this object is a model object that is serialized and stored, requiring migration on breaking change.\n */\nexport interface MPartGrid {\n  root: MTreeNode | MPart;\n  activePartId: PartId;\n}\n\n/**\n * {@link MPartGrid} with additional fields not serialized into the URL.\n */\nexport interface ɵMPartGrid extends MPartGrid {\n  /**\n   * Indicates if this grid was migrated from an older version.\n   */\n  migrated?: true;\n}\n\n/**\n * Represents a node in the grid.\n *\n * A node contains two children, which are either a {@link MPart} or a {@link MTreeNode}, respectively.\n * The ratio together with the direction describes how to arrange the two children.\n *\n * The M-prefix indicates this object is a model object that is serialized and stored, requiring migration on breaking change.\n */\nexport class MTreeNode {\n\n  /**\n   * Discriminator to unmarshall {@link MTreeNode} to its class type.\n   */\n  public readonly type = 'MTreeNode';\n  public id!: string;\n  public child1!: MTreeNode | MPart;\n  public child2!: MTreeNode | MPart;\n  public ratio!: number;\n  public direction!: 'column' | 'row';\n  public parent?: MTreeNode;\n\n  constructor(treeNode: Omit<MTreeNode, 'type'>) {\n    treeNode.parent && assertType(treeNode.parent, {toBeOneOf: MTreeNode}); // assert not to be an object literal\n    assertType(treeNode.child1, {toBeOneOf: [MTreeNode, MPart]}); // assert not to be an object literal\n    assertType(treeNode.child2, {toBeOneOf: [MTreeNode, MPart]}); // assert not to be an object literal\n    Object.assign(this, treeNode);\n  }\n\n  /**\n   * Tests if the given object is a {@link MTreeNode}.\n   */\n  public static isMTreeNode(object: unknown): object is MTreeNode {\n    return !!object && (object as Partial<MTreeNode>).type === 'MTreeNode';\n  }\n}\n\n/**\n * Represents a part in the grid.\n *\n * A part can be a stack of views or display content.\n *\n * The M-prefix indicates this object is a model object that is serialized and stored, requiring migration on breaking change.\n */\nexport class MPart {\n\n  /**\n   * Discriminator to unmarshall {@link MPart} to its class type.\n   */\n  public readonly type = 'MPart';\n  public id!: PartId;\n  public alternativeId?: string;\n  public title?: string;\n  public parent?: MTreeNode;\n  public views!: MView[];\n  public activeViewId?: ViewId;\n  public structural!: boolean;\n  public cssClass?: string[];\n  public navigation?: {\n    id: string;\n    hint?: string;\n    data?: NavigationData;\n    cssClass?: string[];\n  };\n\n  constructor(part: Omit<MPart, 'type'>) {\n    part.parent && assertType(part.parent, {toBeOneOf: MTreeNode}); // assert not to be an object literal\n    Object.assign(this, part);\n  }\n\n  /**\n   * Tests if the given object is a {@link MPart}.\n   */\n  public static isMPart(object: unknown): object is MPart {\n    return !!object && (object as Partial<MPart>).type === 'MPart';\n  }\n}\n\n/**\n * Represents a view contained in a {@link MPart}.\n *\n * The M-prefix indicates this object is a model object that is serialized and stored, requiring migration on breaking change.\n */\nexport interface MView {\n  id: ViewId;\n  alternativeId?: string;\n  cssClass?: string[];\n  markedForRemoval?: true;\n  navigation?: {\n    id: string;\n    hint?: string;\n    data?: NavigationData;\n    cssClass?: string[];\n  };\n}\n\n/**\n * Grids referenced in the workbench layout.\n */\nexport interface WorkbenchGrids<T = ɵMPartGrid> {\n  /**\n   * Reference to the \"root\" grid of the workbench layout.\n   */\n  main: T;\n  /**\n   * Reference to the main area grid, a sub-grid embedded by the main area part contained in the main grid.\n   */\n  mainArea?: T;\n\n  /**\n   * Grids associated with activities.\n   *\n   * An activity has at least one part, the reference part, specified when creating the activity (docked part).\n   * Removing the reference part removes the activity. Most activities have a grid with only the reference part.\n   */\n  [activityId: ActivityId]: T;\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 {Commands, NavigationData, NavigationState} from '../routing/routing.model';\nimport {ActivatedRoute} from '@angular/router';\nimport {ActivityId} from '../activity/workbench-activity.model';\nimport {Translatable} from '../text/workbench-text-provider.model';\nimport {WorkbenchLayoutFactory} from './workbench-layout.factory';\n\n/**\n * The workbench layout is 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 and can be dragged to other parts. Content can be displayed in both parts and views.\n *\n * A typical workbench application has a main area part and other parts docked to the side, providing navigation and context-sensitive assistance to\n * support the user's workflow.\n *\n * Multiple layouts, called perspectives, can be created. Users can switch between perspectives. Perspectives share the same main area, if any.\n *\n * The layout has methods for modifying it. The layout is immutable; each modification creates a new instance.\n */\nexport interface WorkbenchLayout {\n\n  /**\n   * Adds a part with the given id to this layout. Position and size are expressed relative to a reference part.\n   *\n   * A part can also be aligned relative to a docked part, enabling inline layouts within docked parts, such as splitting the docked parts into multiple sections.\n   *\n   * @param id - The id of the part to add. Use {@link MAIN_AREA} to add the main area.\n   * @param relativeTo - Specifies the reference part to lay out the part.\n   * @param extras - Controls how to add the part to the layout.\n   * @return a copy of this layout with the part added.\n   */\n  addPart(id: string | MAIN_AREA, relativeTo: ReferencePart, extras?: PartExtras): WorkbenchLayout;\n\n  /**\n   * Adds a part with the given id to this layout, docking it to the specified docking area.\n   *\n   * Docked parts can be minimized to create more space for the main content. Users cannot drag views into or out of docked parts.\n   *\n   * A part can be docked to the left, right, or bottom side of the workbench.\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   * A docked part may be navigated to display content, have views, or define a layout with multiple parts aligned relative to each other.\n   *\n   * @param id - The id of the part to add.\n   * @param dockTo - Controls to which area to dock the part.\n   * @param extras - Controls how to add the part to the layout.\n   * @return a copy of this layout with the part added.\n   */\n  addPart(id: string, dockTo: DockingArea, extras: DockedPartExtras): WorkbenchLayout;\n\n  /**\n   * Navigates the specified part based on the provided array of commands and extras.\n   *\n   * Navigating a part displays content when its view stack is empty. A navigated part can still have views but won't display\n   * navigated content unless its view stack is empty. Views cannot be dragged into parts displaying navigated content, except\n   * for the main area part.\n   *\n   * A command can be a string or an object literal. A string represents a path segment, an object literal associates matrix parameters with the preceding segment.\n   * Multiple segments can be combined into a single command, separated by a forward slash.\n   *\n   * By default, navigation is absolute. Set `relativeTo` in extras for relative navigation.\n   *\n   * Usage:\n   * ```\n   * layout.navigatePart(partId, ['path', 'to', 'part', {param 'value'}]);\n   * layout.navigatePart(partId, ['path/to/part', {param: 'value'}]);\n   * ```\n   *\n   * @param id - Identifies the part for navigation.\n   * @param commands - Instructs the router which route to navigate to.\n   * @param extras - Controls navigation:\n   * @param extras.hint - Allows differentiation between routes with identical paths.\n   *                      Multiple parts can navigate to the same path but still resolve to different routes, e.g., the empty-path route to maintain a clean URL.\n   *\n   *                      Example:\n   *                      ```ts\n   *                      import {canMatchWorkbenchPart} from '@scion/workbench';\n   *\n   *                      const routes = [\n   *                         {\n   *                           path: '',\n   *                           component: Part1Component,\n   *                           canMatch: [canMatchWorkbenchPart('hint-1')], // matches navigations with hint 'hint-1'\n   *                         },\n   *                         {\n   *                           path: '',\n   *                           component: Part2Component,\n   *                           canMatch: [canMatchWorkbenchPart('hint-2')], // matches navigations with hint 'hint-1'\n   *                         },\n   *                       ];\n   *                      ```\n   * @param extras.relativeTo - Specifies the route for relative navigation, supporting navigational symbols such as '/', './', or '../' in the commands.\n   * @param extras.data - Associates data with the navigation.\n   *                      Unlike matrix parameters, navigation data is stored in the layout and not added to the URL, allowing data to be passed to an empty-path navigation.\n   *                      Data must be JSON serializable. Data can be read from {@link WorkbenchPart.navigation.data}.\n   * @param extras.state - Passes state to the navigation.\n   *                       State is not persistent, unlike {@link data}; however, state is added to the browser's session history to support back/forward browser navigation.\n   *                       State can be read from {@link WorkbenchPart.navigation.state} or from the browser's session history via `history.state`.\n   * @param extras.cssClass - Specifies CSS class(es) to add to the part, e.g., to locate the part in tests.\n   * @return a copy of this layout with the part navigated.\n   */\n  navigatePart(id: string, commands: Commands, extras?: {hint?: string; relativeTo?: ActivatedRoute; data?: NavigationData; state?: NavigationState; cssClass?: string | string[]}): WorkbenchLayout;\n\n  /**\n   * Adds a view to the specified part.\n   *\n   * @param id - The id of the view to add.\n   * @param extras - Controls how to add the view to the layout.\n   * @param extras.partId - References the part to which to add the view.\n   * @param extras.position - Specifies the position where to insert the view. The position is zero-based. Defaults to `end`.\n   * @param extras.activateView - Controls whether to activate the view. Defaults to `false`.\n   * @param extras.activatePart - Controls whether to activate the part that contains the view. Defaults to `false`.\n   * @param extras.cssClass - Specifies CSS class(es) to add to the view, e.g., to locate the view in tests.\n   * @return a copy of this layout with the view added.\n   */\n  addView(id: string, extras: {partId: string; position?: number | 'start' | 'end' | 'before-active-view' | 'after-active-view'; activateView?: boolean; activatePart?: boolean; cssClass?: string | string[]}): WorkbenchLayout;\n\n  /**\n   * Navigates the specified view based on the provided array of commands and extras.\n   *\n   * A command can be a string or an object literal. A string represents a path segment, an object literal associates matrix parameters with the preceding segment.\n   * Multiple segments can be combined into a single command, separated by a forward slash.\n   *\n   * By default, navigation is absolute. Set `relativeTo` in extras for relative navigation.\n   *\n   * Usage:\n   * ```\n   * layout.navigateView(viewId, ['path', 'to', 'view', {param 'value'}]);\n   * layout.navigateView(viewId, ['path/to/view', {param: 'value'}]);\n   * ```\n   *\n   * @param id - Identifies the view for navigation.\n   * @param commands - Instructs the router which route to navigate to.\n   * @param extras - Controls navigation:\n   * @param extras.hint - Allows differentiation between routes with identical paths.\n   *                      Multiple views can navigate to the same path but still resolve to different routes, e.g., the empty-path route to maintain a clean URL.\n   *                      Like the path, a hint affects view resolution. If set, the router will only navigate views with an equivalent hint, or if not set, views without a hint.\n   *\n   *                      Example route config matching routes based on the hint passed to the navigation:\n   *                      ```ts\n   *                      import {canMatchWorkbenchView} from '@scion/workbench';\n   *\n   *                      const routes = [\n   *                        {\n   *                          path: '',\n   *                          component: View1Component,\n   *                          canMatch: [canMatchWorkbenchView('hint-1')], // matches navigations with hint 'hint-1'\n   *                        },\n   *                        {\n   *                          path: '',\n   *                          component: View2Component,\n   *                          canMatch: [canMatchWorkbenchView('hint-2')], // matches navigations with hint 'hint-2'\n   *                        },\n   *                      ];\n   *                      ```\n   * @param extras.relativeTo - Specifies the route for relative navigation, supporting navigational symbols such as '/', './', or '../' in the commands.\n   * @param extras.data - Associates data with the navigation.\n   *                      Unlike matrix parameters, navigation data is stored in the layout and not added to the URL, allowing data to be passed to an empty-path navigation.\n   *                      Data must be JSON serializable. Data can be read from {@link WorkbenchView.navigation.data}.\n   * @param extras.state - Passes state to the navigation.\n   *                       State is not persistent, unlike {@link data}; however, state is added to the browser's session history to support back/forward browser navigation.\n   *                       State can be read from {@link WorkbenchView.navigation.state} or from the browser's session history via `history.state`.\n   * @param extras.cssClass - Specifies CSS class(es) to add to the view, e.g., to locate the view in tests.\n   * @return a copy of this layout with the view navigated.\n   */\n  navigateView(id: string, commands: Commands, extras?: {hint?: string; relativeTo?: ActivatedRoute; data?: NavigationData; state?: NavigationState; cssClass?: string | string[]}): WorkbenchLayout;\n\n  /**\n   * Removes given view from the layout.\n   *\n   * - If the view is active, the last used view is activated.\n   * - If the view is the last view in the part, the part is removed unless it is the last part in its grid or a structural part.\n   *\n   * @param id - Specifies the id of the view to remove.\n   * @return a copy of this layout with the view removed.\n   */\n  removeView(id: string): WorkbenchLayout;\n\n  /**\n   * Removes given part from the layout.\n   *\n   * If the part is active, the last used part is activated.\n   *\n   * @param id - The id of the part to remove.\n   * @return a copy of this layout with the part removed.\n   */\n  removePart(id: string): WorkbenchLayout;\n\n  /**\n   * Moves a view to a different part or moves it within a part.\n   *\n   * @param id - The id of the view to be moved.\n   * @param targetPartId - The id of the part to which to move the view.\n   * @param options - Controls moving of the view.\n   * @param options.position - Specifies the position where to move the view in the target part. The position is zero-based. Defaults to `end` when moving the view to a different part.\n   * @param options.activateView - Controls if to activate the view. Defaults to `false`.\n   * @param options.activatePart - Controls if to activate the target part. Defaults to `false`.\n   * @return a copy of this layout with the view moved.\n   */\n  moveView(id: string, targetPartId: string, options?: {position?: number | 'start' | 'end' | 'before-active-view' | 'after-active-view'; activateView?: boolean; activatePart?: boolean}): WorkbenchLayout;\n\n  /**\n   * Activates the given view.\n   *\n   * @param id - The id of the view which to activate.\n   * @param options - Controls view activation.\n   * @param options.activatePart - Controls whether to activate the part that contains the view. Defaults to `false`.\n   * @return a copy of this layout with the view activated.\n   */\n  activateView(id: string, options?: {activatePart?: boolean}): WorkbenchLayout;\n\n  /**\n   * Activates the given part.\n   *\n   * @param id - The id of the part which to activate.\n   * @return a copy of this layout with the part activated.\n   */\n  activatePart(id: string): WorkbenchLayout;\n\n  /**\n   * Applies a modification function to this layout, enabling conditional changes while maintaining method chaining.\n   *\n   * @param modifyFn - A function that takes the current layout and returns a modified layout.\n   * @return The modified layout returned by the modify function.\n   */\n  modify(modifyFn: (layout: WorkbenchLayout) => WorkbenchLayout): WorkbenchLayout;\n}\n\n/**\n * Describes how to lay out a part relative to another part.\n */\nexport interface ReferencePart {\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 workbench 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 * Controls the appearance and behavior of a part.\n */\nexport interface PartExtras {\n  /**\n   * Title displayed in the part bar.\n   */\n  title?: Translatable;\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   * Controls whether to activate the part. Defaults to `false`.\n   */\n  activate?: boolean;\n}\n\n/**\n * Controls the appearance and behavior of a docked part.\n *\n * A docked part is a part that is docked to the left, right, or bottom side of the workbench.\n * Docked parts can be minimized to create more space for the main content. Users cannot drag\n * views into or out of docked parts.\n */\nexport interface DockedPartExtras {\n  /**\n   * Icon (key) of the toggle button in the sidebar, used to open or close the docked part.\n   *\n   * The actual icon is resolved through an {@link WorkbenchIconProviderFn} registered in {@link WorkbenchConfig.iconProvider}.\n   *\n   * If no icon provider is configured, the icon defaults to a Material Icon font ligature. The default icon provider requires\n   * the application to include the Material icon font, for example in `styles.scss`, as follows:\n   *\n   * ```scss\n   * @import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded');\n   * ```\n   *\n   * The application can then reference icons from the Material Icons Font: https://fonts.google.com/icons\n   */\n  icon: string;\n  /**\n   * Label of the toggle button in the sidebar.\n   */\n  label: Translatable;\n  /**\n   * Tooltip displayed when hovering over the toggle button in the sidebar.\n   */\n  tooltip?: Translatable;\n  /**\n   * Title displayed in the part bar.\n   *\n   * If not provided, defaults to {@link DockedPartExtras.label}. Set to `false` to not display a title.\n   */\n  title?: Translatable | false;\n  /**\n   * CSS class(es) to add to the docked part and its toggle button, e.g., to locate the part in tests.\n   */\n  cssClass?: string | string[];\n  /**\n   * Internal identifier for the docked part.\n   *\n   * @docs-private Not public API, intended for internal use only.\n   */\n  ɵactivityId?: ActivityId;\n}\n\n/**\n * A part can be docked to the left, right, or bottom side of the workbench.\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 */\nexport interface DockingArea {\n  /**\n   * Controls where to dock a part.\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   */\n  dockTo: 'left-top' | 'left-bottom' | 'right-top' | 'right-bottom' | 'bottom-left' | 'bottom-right';\n}\n\n/**\n * Identifies the main area part in the workbench layout.\n *\n * Refer to this part to align parts relative to the main area.\n *\n * The main area is a special part that can be added to the layout. The main area is where the workbench opens new 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 = 'part.main-area';\n\n/**\n * Represents the type of the {@link MAIN_AREA} constant.\n */\nexport type MAIN_AREA = 'part.main-area';\n\n/**\n * Represents the alternative id of the main area part.\n *\n * @see MAIN_AREA\n */\nexport const MAIN_AREA_ALTERNATIVE_ID = 'main-area';\n\n/**\n * Contains different versions of a workbench layout.\n *\n * The M-prefix indicates this object is a model object that is serialized and stored, requiring migration on breaking change.\n */\nexport interface MWorkbenchLayout {\n  /**\n   * Layout before any user personalization (initial layout).\n   */\n  referenceLayout: {\n    /**\n     * @see WorkbenchLayoutSerializer.serializeGrids\n     * @see WorkbenchLayoutSerializer.deserializeGrid\n     */\n    grids: {\n      main: string;\n      [activityId: ActivityId]: string;\n    };\n    /**\n     * @see WorkbenchLayoutSerializer.serializeActivityLayout\n     */\n    activityLayout: string;\n    /**\n     * @see WorkbenchLayoutSerializer.serializeOutlets\n     * @see WorkbenchLayoutSerializer.deserializeOutlets\n     */\n    outlets: string;\n  };\n  /**\n   * Layout personalized by the user.\n   */\n  userLayout: {\n    /**\n     * @see WorkbenchLayoutSerializer.serializeGrids\n     * @see WorkbenchLayoutSerializer.deserializeGrid\n     */\n    grids: {\n      main: string;\n      [activityId: ActivityId]: string;\n    };\n    /**\n     * @see WorkbenchLayoutSerializer.serializeActivityLayout\n     */\n    activityLayout: string;\n    /**\n     * @see WorkbenchLayoutSerializer.serializeOutlets\n     * @see WorkbenchLayoutSerializer.deserializeOutlets\n     */\n    outlets: string;\n  };\n}\n\n/**\n * Signature of a function to provide a workbench layout.\n *\n * The workbench will invoke this function with a factory object to create the layout. The layout is immutable; each modification creates a new instance.\n *\n * The function can call `inject` to get any required dependencies.\n *\n * ## Workbench Layout\n * The workbench layout is 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 and can be dragged to other parts. Content can be displayed in both parts and views.\n *\n * The layout typically has a main area part and other parts docked to the side, providing navigation and context-sensitive assistance to support\n * the user's workflow. Initially empty or displaying a welcome page, the main area is where the workbench opens new views by default.\n * Unlike any other part, the main area is shared between perspectives, and its layout is not reset when resetting perspectives.\n\n * ## Steps to create the layout\n * Start by adding parts to the layout. Parts can be docked to a specific area (`left-top`, `left-bottom`, `right-top`, `right-bottom`, `bottom-left`, `bottom-right`)\n * or aligned relative to each other. Views can be added to any part except the main area part. To display content, navigate parts and views to registered routes.\n *\n * To maintain a clean URL, navigate parts and views in the layout to empty-path routes and use a navigation hint for differentiation.\n * - Use the `canMatchWorkbenchPart` guard to match a route only for parts navigated with a particular hint.\n * - Use the `canMatchWorkbenchView` guard to match a route only for views navigated with a particular hint.\n *\n * ## Example\n * The following example defines a layout with a main area and four parts docked to the side:\n *\n * ```plain\n * +------+-----------+------+\n * |      |           |      |\n * |      |           |      |\n * | left | main area | right|\n * |      |           |      |\n * |      |           |      |\n * +------+-----------+------+\n * |          bottom         |\n * +-------------------------+\n * ```\n *\n * ```ts\n * import {bootstrapApplication} from '@angular/platform-browser';\n * import {MAIN_AREA, provideWorkbench, WorkbenchLayoutFactory} from '@scion/workbench';\n *\n * bootstrapApplication(AppComponent, {\n *   providers: [\n *     provideWorkbench({\n *       layout: (factory: WorkbenchLayoutFactory) => factory\n *         // Add parts to dock areas on the side.\n *         .addPart(MAIN_AREA)\n *         .addPart('navigator', {dockTo: 'left-top'}, {label: 'Navigator', icon: 'folder'})\n *         .addPart('find', {dockTo: 'bottom-left'}, {label: 'Find', icon: 'search'})\n *         .addPart('inventory', {dockTo: 'right-top'}, {label: 'Inventory', icon: 'inventory'})\n *         .addPart('notifications', {dockTo: 'right-bottom'}, {label: 'Notifications', icon: 'notifications'})\n *\n *         // Add views to parts.\n *         .addView('find1', {partId: 'find'})\n *         .addView('find2', {partId: 'find'})\n *         .addView('find3', {partId: 'find'})\n *\n *         // Navigate the main area to display a welcome page.\n *         .navigatePart(MAIN_AREA, [], {hint: 'welcome'})\n *\n *         // Navigate parts to display content.\n *         .navigatePart('navigator', [], {hint: 'navigator'})\n *         .navigatePart('inventory', ['path/to/inventory'])\n *         .navigatePart('notifications', [], {hint: 'notifications'})\n *\n *         // Navigate views to display content.\n *         .navigateView('find1', ['path/to/find'])\n *         .navigateView('find2', ['path/to/find'])\n *         .navigateView('find3', ['path/to/find'])\n *\n *         // Activate parts to open docked parts.\n *         .activatePart('navigator')\n *         .activatePart('find')\n *         .activatePart('inventory'),\n *     }),\n *   ],\n * });\n * ```\n *\n * The layout requires the following routes.\n *\n * ```ts\n * import {bootstrapApplication} from '@angular/platform-browser';\n * import {provideRouter} from '@angular/router';\n * import {canMatchWorkbenchView, canMatchWorkbenchPart} from '@scion/workbench';\n *\n * bootstrapApplication(AppComponent, {\n *   providers: [\n *     provideRouter([\n *      // Route for the \"MAIN_AREA Part\"\n *       {path: '', canMatch: [canMatchWorkbenchPart('welcome')], loadComponent: () => import('./welcome/welcome.component')},\n *       // Route for the \"Navigator Part\"\n *       {path: '', canMatch: [canMatchWorkbenchPart('navigator')], loadComponent: () => import('./navigator/navigator.component')},\n *       // Route for the \"Find View\"\n *       {path: 'path/to/find', loadComponent: () => import('./find/find.component')},\n *       // Route for the \"Inventory Part\"\n *       {path: 'path/to/inventory', loadComponent: () => import('./inventory/inventory.component')},\n *       // Route for the \"Notifications Part\"\n *       {path: '', canMatch: [canMatchWorkbenchPart('notifications')], loadComponent: () => import('./notifications/notifications.component')},\n *     ]),\n *   ],\n * });\n * ```\n */\nexport type WorkbenchLayoutFn = (factory: WorkbenchLayoutFactory) => Promise<WorkbenchLayout> | WorkbenchLayout;\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 {WorkbenchMigration} from './workbench-migration';\n\n/**\n * Migrates serialized workbench data to the latest version.\n */\nexport class WorkbenchMigrator {\n\n  private _migrators = new Map<number, WorkbenchMigration>();\n\n  /**\n   * Registers a migration from a specific version to the next version.\n   */\n  public registerMigration(fromVersion: number, migration: WorkbenchMigration): this {\n    this._migrators.set(fromVersion, migration);\n    return this;\n  }\n\n  /**\n   * Migrates serialized workbench data to the latest version.\n   */\n  public migrate(json: string, version: {from: number; to: number}): string {\n    for (let v = version.from; v < version.to; v++) {\n      const migrator = this._migrators.get(v);\n      if (!migrator) {\n        throw Error(`[NullMigrationError] Cannot perform workbench data migration. No migration registered for version ${v}.`);\n      }\n      json = migrator.migrate(json);\n    }\n    return json;\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\nexport interface MPartV3 {\n  type: 'MPart';\n  id: string;\n  views: MViewV3[];\n  activeViewId?: ViewIdV3;\n  structural: boolean;\n}\n\nexport interface MTreeNodeV3 {\n  type: 'MTreeNode';\n  nodeId: string;\n  child1: MTreeNodeV3 | MPartV3;\n  child2: MTreeNodeV3 | MPartV3;\n  ratio: number;\n  direction: 'column' | 'row';\n}\n\nexport interface MPartGridV3 {\n  root: MTreeNodeV3 | MPartV3;\n  activePartId: string;\n}\n\nexport interface MViewV3 {\n  id: ViewIdV3;\n  alternativeId?: string;\n  cssClass?: string[];\n  navigation?: {\n    hint?: string;\n    cssClass?: string[];\n  };\n}\n\nexport type ViewIdV3 = `view.${number}`;\n\nexport const VIEW_ID_PREFIX_V3 = 'view.';\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 {inject, Injectable} from '@angular/core';\nimport {MPartGridV2, MPartV2, MTreeNodeV2, MViewV2} from './model/workbench-grid-migration-v2.model';\nimport {MPartGridV3, MPartV3, MTreeNodeV3, MViewV3, VIEW_ID_PREFIX_V3, ViewIdV3} from './model/workbench-grid-migration-v3.model';\nimport {Router, UrlTree} from '@angular/router';\nimport {WorkbenchMigration} from '../../migration/workbench-migration';\nimport {Routing} from '../../routing/routing.util';\n\n/**\n * Migrates the workbench layout from version 2 to version 3.\n */\n@Injectable({providedIn: 'root'})\nexport class WorkbenchGridMigrationV3 implements WorkbenchMigration {\n\n  private readonly _router = inject(Router);\n\n  public migrate(json: string): string {\n    const partGridV2 = JSON.parse(json) as MPartGridV2;\n\n    // Consider the ids of views contained in the URL as already used.\n    // Otherwise, when migrating the main area and using a view id already present in the perspective,\n    // the view outlet would not be removed from the URL, resulting the migrated view to display\n    // \"Not Found\" page or incorrect content.\n    const viewOutlets = Routing.parseOutlets(this.getCurrentUrl(), {view: true});\n    const usedViewIds = new Set<ViewIdV3>([...viewOutlets.keys(), ...collectViewIds(partGridV2.root)]);\n\n    // Migrate the grid.\n    const partGridV3: MPartGridV3 = {\n      root: migrateGridElement(partGridV2.root),\n      activePartId: partGridV2.activePartId,\n    };\n    return JSON.stringify(partGridV3);\n\n    function migrateGridElement(elementV2: MTreeNodeV2 | MPartV2): MTreeNodeV3 | MPartV3 {\n      switch (elementV2.type) {\n        case 'MTreeNode':\n          return migrateNode(elementV2);\n        case 'MPart':\n          return migratePart(elementV2);\n        default:\n          throw Error(`[WorkbenchLayoutError] Unable to migrate to the latest version. Expected element to be of type 'MPart' or 'MTreeNode'. [version=2, element=${JSON.stringify(elementV2)}]`);\n      }\n    }\n\n    function migrateNode(nodeV2: MTreeNodeV2): MTreeNodeV3 {\n      return {\n        type: 'MTreeNode',\n        nodeId: nodeV2.nodeId,\n        child1: migrateGridElement(nodeV2.child1),\n        child2: migrateGridElement(nodeV2.child2),\n        ratio: nodeV2.ratio,\n        direction: nodeV2.direction,\n      };\n    }\n\n    function migratePart(partV2: MPartV2): MPartV3 {\n      const partV3: MPartV3 = {\n        type: 'MPart',\n        id: partV2.id,\n        structural: partV2.structural,\n        views: [],\n      };\n\n      // Add views and set the active view.\n      partV2.views.forEach((viewV2: MViewV2) => {\n        const viewV3: MViewV3 = migrateView(viewV2);\n        if (partV2.activeViewId === viewV2.id) {\n          partV3.activeViewId = viewV3.id;\n        }\n        partV3.views.push(viewV3);\n        usedViewIds.add(viewV3.id);\n      });\n\n      return partV3;\n    }\n\n    function migrateView(viewV2: MViewV2): MViewV3 {\n      if (isViewId(viewV2.id)) {\n        return {id: viewV2.id, navigation: {}};\n      }\n      else {\n        return {id: computeNextViewId(usedViewIds), navigation: {hint: viewV2.id}};\n      }\n    }\n  }\n\n  private getCurrentUrl(): UrlTree {\n    return this._router.getCurrentNavigation()?.initialUrl ?? this._router.parseUrl(this._router.url);\n  }\n}\n\nfunction computeNextViewId(viewIds: Iterable<ViewIdV3>): ViewIdV3 {\n  const ids = Array.from(viewIds)\n    .map(viewId => Number(viewId.substring(VIEW_ID_PREFIX_V3.length)))\n    .reduce((set, id) => set.add(id), new Set<number>());\n\n  for (let i = 1; i <= ids.size; i++) {\n    if (!ids.has(i)) {\n      return VIEW_ID_PREFIX_V3.concat(`${i}`) as ViewIdV3;\n    }\n  }\n  return VIEW_ID_PREFIX_V3.concat(`${ids.size + 1}`) as ViewIdV3;\n}\n\nfunction isViewId(viewId: string): viewId is ViewIdV3 {\n  return viewId.startsWith(VIEW_ID_PREFIX_V3);\n}\n\nfunction collectViewIds(node: MPartV2 | MTreeNodeV2): Set<ViewIdV3> {\n  if (node.type === 'MPart') {\n    return new Set(node.views.map(view => view.id).filter(isViewId));\n  }\n  else {\n    return new Set([...collectViewIds(node.child1), ...collectViewIds(node.child2)]);\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 {Injectable} from '@angular/core';\nimport {MPartGridV3, MPartV3, MTreeNodeV3, MViewV3} from './model/workbench-grid-migration-v3.model';\nimport {WorkbenchMigration} from '../../migration/workbench-migration';\nimport {MPartGridV4, MPartV4, MTreeNodeV4, MViewV4} from './model/workbench-grid-migration-v4.model';\n\n/**\n * Migrates the workbench layout from version 3 to version 4.\n */\n@Injectable({providedIn: 'root'})\nexport class WorkbenchGridMigrationV4 implements WorkbenchMigration {\n\n  public migrate(json: string): string {\n    const partGridV3 = JSON.parse(json) as MPartGridV3;\n\n    // Migrate the grid.\n    const partGridV4: MPartGridV4 = {\n      ...partGridV3,\n      root: migrateGridElement(partGridV3.root),\n    };\n    return JSON.stringify(partGridV4);\n\n    function migrateGridElement(elementV3: MTreeNodeV3 | MPartV3): MTreeNodeV4 | MPartV4 {\n      switch (elementV3.type) {\n        case 'MTreeNode':\n          return migrateNode(elementV3);\n        case 'MPart':\n          return migratePart(elementV3);\n        default:\n          throw Error(`[WorkbenchLayoutError] Unable to migrate to the latest version. Expected element to be of type 'MPart' or 'MTreeNode'. [version=3, element=${JSON.stringify(elementV3)}]`);\n      }\n    }\n\n    function migrateNode(nodeV3: MTreeNodeV3): MTreeNodeV4 {\n      return {\n        ...nodeV3,\n        child1: migrateGridElement(nodeV3.child1),\n        child2: migrateGridElement(nodeV3.child2),\n      };\n    }\n\n    function migratePart(partV3: MPartV3): MPartV4 {\n      return {...partV3, views: partV3.views.map(migrateView)};\n    }\n\n    function migrateView(viewV3: MViewV3): MViewV4 {\n      return {...viewV3, uid: undefined!}; // `uid` is transient, i.e., set when deserializing the grid.\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 {Injectable} from '@angular/core';\nimport {MPartGridV4, MPartV4, MTreeNodeV4, MViewV4} from './model/workbench-grid-migration-v4.model';\nimport {WorkbenchMigration} from '../../migration/workbench-migration';\nimport {MPartGridV5, MPartV5, MTreeNodeV5, MViewV5} from './model/workbench-grid-migration-v5.model';\nimport {UID} from '../../common/uid.util';\n\n/**\n * Migrates the workbench layout from version 4 to version 5.\n */\n@Injectable({providedIn: 'root'})\nexport class WorkbenchGridMigrationV5 implements WorkbenchMigration {\n\n  public migrate(json: string): string {\n    const partGridV4 = JSON.parse(json) as MPartGridV4;\n\n    // Migrate the grid.\n    const partGridV5: MPartGridV5 = {\n      ...partGridV4,\n      root: migrateGridElement(partGridV4.root),\n    };\n    return JSON.stringify(partGridV5);\n\n    function migrateGridElement(elementV4: MTreeNodeV4 | MPartV4): MTreeNodeV5 | MPartV5 {\n      switch (elementV4.type) {\n        case 'MTreeNode':\n          return migrateNode(elementV4);\n        case 'MPart':\n          return migratePart(elementV4);\n        default:\n          throw Error(`[WorkbenchLayoutError] Unable to migrate to the latest version. Expected element to be of type 'MPart' or 'MTreeNode'. [version=4, element=${JSON.stringify(elementV4)}]`);\n      }\n    }\n\n    function migrateNode(nodeV4: MTreeNodeV4): MTreeNodeV5 {\n      return {\n        ...nodeV4,\n        id: UID.randomUID(),\n        child1: migrateGridElement(nodeV4.child1),\n        child2: migrateGridElement(nodeV4.child2),\n      };\n    }\n\n    function migratePart(partV4: MPartV4): MPartV5 {\n      return {...partV4, views: partV4.views.map(migrateView)};\n    }\n\n    function migrateView(viewV4: MViewV4): MViewV5 {\n      const viewV5: MViewV5 = {\n        ...viewV4,\n        uid: UID.randomUID(),\n        navigation: viewV4.navigation ? {...viewV4.navigation, id: UID.randomUID()} : undefined,\n      };\n      if (!viewV5.navigation) {\n        delete viewV5.navigation;\n      }\n      return viewV5;\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 {Injectable} from '@angular/core';\nimport {MPartGridV5, MPartV5, MTreeNodeV5, MViewV5} from './model/workbench-grid-migration-v5.model';\nimport {MPartGridV6, MPartV6, MTreeNodeV6, MViewV6} from './model/workbench-grid-migration-v6.model';\nimport {WorkbenchMigration} from '../../migration/workbench-migration';\n\n/**\n * Migrates the workbench layout from version 5 to version 6.\n */\n@Injectable({providedIn: 'root'})\nexport class WorkbenchGridMigrationV6 implements WorkbenchMigration {\n\n  public migrate(json: string): string {\n    const partGridV5 = JSON.parse(json) as MPartGridV5;\n\n    // Migrate the grid.\n    const partGridV6: MPartGridV6 = {\n      ...partGridV5,\n      root: migrateGridElement(partGridV5.root),\n    };\n    return JSON.stringify(partGridV6);\n\n    function migrateGridElement(elementV5: MTreeNodeV5 | MPartV5): MTreeNodeV6 | MPartV6 {\n      switch (elementV5.type) {\n        case 'MTreeNode':\n          return migrateNode(elementV5);\n        case 'MPart':\n          return migratePart(elementV5);\n        default:\n          throw Error(`[WorkbenchLayoutError] Unable to migrate to the latest version. Expected element to be of type 'MPart' or 'MTreeNode'. [version=5, element=${JSON.stringify(elementV5)}]`);\n      }\n    }\n\n    function migrateNode(nodeV5: MTreeNodeV5): MTreeNodeV6 {\n      return {\n        ...nodeV5,\n        child1: migrateGridElement(nodeV5.child1),\n        child2: migrateGridElement(nodeV5.child2),\n      };\n    }\n\n    function migratePart(partV5: MPartV5): MPartV6 {\n      return {...partV5, views: partV5.views.map(migrateView)};\n    }\n\n    function migrateView(viewV5: MViewV5): MViewV6 {\n      const viewV6: MViewV6 = {...viewV5};\n      delete (viewV6 as Record<keyof MViewV5, unknown>).uid;\n      return viewV6;\n    }\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\n/**\n * Stringifies given data, exluding specified fields from serialization.\n *\n * @param data - Data to serialize to json.\n * @param options - Controls how to serialize data.\n * @param options.exclusions - Controls which fields to exclude from serialization.\\\n *                             To exclude a field, specify the path to the field in the object tree,\n *                             using the slash as delimiter. The path supports the asterisk (`*`) to match a\n *                             single segment or the globstar (`**`) to match multiple segments.\n * @param options.sort - Controls if to sort the fields by name. Defaults to `false`.\n */\nexport function stringify(data: unknown, options?: {exclusions?: Array<string | Exclusion>; sort?: true}): string {\n  const exclusions = options?.exclusions ?? [];\n  const sort = options?.sort ?? false;\n\n  const objectStack = new Array<ObjectValue>();\n  const compiledExclusions = exclusions.map(exclusion => new CompiledExclusion(exclusion));\n\n  return JSON.stringify(data, (key: string, value: unknown) => {\n    if (key === '') { // root node\n      return sort ? sortProperties(value) : value;\n    }\n\n    // Remove object(s) from the stack if finished their serialization.\n    while (objectStack.at(-1)?.fieldsToSerialize.size === 0) {\n      objectStack.pop();\n    }\n\n    // Mark current field as serialized.\n    objectStack.at(-1)?.fieldsToSerialize.delete(key);\n\n    // Check if to exclude the current field from serialization.\n    const exclude = compiledExclusions.some(exclusion => exclusion.matches(objectStack, key, value));\n\n    // Push object to stack if type of object.\n    if (!exclude && typeof value === 'object' && value !== null) {\n      objectStack.push({key, value, fieldsToSerialize: new Set(Object.keys(value))});\n    }\n\n    if (exclude) {\n      return undefined;\n    }\n\n    return sort ? sortProperties(value) : value;\n  });\n}\n\n/**\n * Sorts the properties of the passed object literal by name. The original object literal will not be changed. Has no effect if not an object literal.\n */\nfunction sortProperties(value: unknown): unknown {\n  if (typeof value !== 'object' || value === null || Array.isArray(value) || value instanceof Set || value instanceof Map) {\n    return value;\n  }\n\n  const unsorted = value as Record<string, unknown>;\n  return Object.keys(unsorted)\n    .sort()\n    .reduce((sorted, key) => {\n      sorted[key] = unsorted[key];\n      return sorted;\n    }, {} as Record<string, unknown>);\n}\n\n/**\n * Represents an object in the object tree.\n */\ninterface ObjectValue {\n  /**\n   * Key under which the object is associated in the parent object.\n   */\n  key: string;\n  /**\n   * Represents the object.\n   */\n  value: unknown;\n  /**\n   * Fields of the object that have not yet been serialized.\n   */\n  fieldsToSerialize: Set<string>;\n}\n\n/**\n * Describes a field to exclude from serialization.\n */\nexport interface Exclusion {\n  /**\n   * Specifies the path to the field in the object tree, using the slash as delimiter.\n   * The path supports the asterisk (`*`) to match a single segment or the globstar (`**`) to match multiple segments.\n   */\n  path: string;\n  /**\n   * Tests if to exclude the resolved field, enabling extended checks if the field cannot be uniquely identified via the path.\n   *\n   * @param objectPath - path to the field in the object tree.\n   * @param key - key under which the field is associated in the parent object.\n   * @param value - value of the field.\n   */\n  predicate: (objectPath: unknown[], key: string, value: unknown) => boolean;\n}\n\n/**\n * Represents an exclusion, with the path compiled to a regex.\n */\nclass CompiledExclusion {\n\n  private readonly _regex: RegExp;\n  private readonly _predicate: Exclusion['predicate'];\n\n  constructor(exclusion: string | Exclusion) {\n    exclusion = typeof exclusion === 'string' ? ({path: exclusion, predicate: () => true}) : exclusion;\n    const path = exclusion.path\n      .replaceAll('/*/', '/[^/]+/') // replace asterisk to match single segment\n      .replaceAll('**/', '.+/') // replace globstar to match multiple root segments\n      .replaceAll('/**/', '/.+/'); // replace globstar to match multiple segments\n    this._regex = new RegExp(`^${path}$`);\n    this._predicate = exclusion.predicate;\n  }\n\n  /**\n   * Tests if given field matches this exclusion.\n   */\n  public matches(objectStack: ObjectValue[], key: string, value: unknown): boolean {\n    const path = objectStack.map(objectValue => objectValue.key).concat(key).join('/');\n    if (!this._regex.test(path)) {\n      return false;\n    }\n\n    const objectPath = objectStack.map(objectValue => objectValue.value);\n    if (!this._predicate(objectPath, key, value)) {\n      return false;\n    }\n\n    return true;\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 {Injectable} from '@angular/core';\nimport {MPartGridV6, MPartV6, MTreeNodeV6} from './model/workbench-grid-migration-v6.model';\nimport {WorkbenchMigration} from '../../migration/workbench-migration';\nimport {MPartGridV7, MPartV7, MTreeNodeV7, PartIdV7} from './model/workbench-grid-migration-v7.model';\nimport {UID} from '../../common/uid.util';\n\n/**\n * Migrates the workbench layout from version 6 to version 7.\n */\n@Injectable({providedIn: 'root'})\nexport class WorkbenchGridMigrationV7 implements WorkbenchMigration {\n\n  public migrate(json: string): string {\n    const partGridV6 = JSON.parse(json) as MPartGridV6;\n    const oldActivePartId = partGridV6.activePartId;\n    const newActivePartId = migratePartId(oldActivePartId);\n\n    // Migrate the grid.\n    const partGridV7: MPartGridV7 = {\n      root: migrateGridElement(partGridV6.root),\n      activePartId: newActivePartId,\n    };\n    return JSON.stringify(partGridV7);\n\n    function migrateGridElement(elementV6: MTreeNodeV6 | MPartV6): MTreeNodeV7 | MPartV7 {\n      switch (elementV6.type) {\n        case 'MTreeNode':\n          return migrateNode(elementV6);\n        case 'MPart':\n          return migratePart(elementV6);\n        default:\n          throw Error(`[WorkbenchLayoutError] Unable to migrate to the latest version. Expected element to be of type 'MPart' or 'MTreeNode'. [version=6, element=${JSON.stringify(elementV6)}]`);\n      }\n    }\n\n    function migrateNode(nodeV6: MTreeNodeV6): MTreeNodeV7 {\n      return {\n        ...nodeV6,\n        child1: migrateGridElement(nodeV6.child1),\n        child2: migrateGridElement(nodeV6.child2),\n      };\n    }\n\n    function migratePart(partV6: MPartV6): MPartV7 {\n      return {\n        ...partV6,\n        id: partV6.id === oldActivePartId ? newActivePartId : migratePartId(partV6.id),\n        alternativeId: partV6.id,\n      };\n    }\n  }\n}\n\nfunction migratePartId(partId: string): PartIdV7 {\n  return partId === 'main-area' ? 'part.main-area' : `part.${UID.randomUID()}`;\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 {Injectable} from '@angular/core';\nimport {PerspectiveDataV1} from './model/workbench-layout-migration-v1.model';\nimport {MPerspectiveLayoutV2} from './model/workbench-layout-migration-v2.model';\nimport {Commands} from '../../routing/routing.model';\nimport {WorkbenchMigration} from '../../migration/workbench-migration';\n\n/**\n * Migrates the perspective layout from version 1 to version 2.\n */\n@Injectable({providedIn: 'root'})\nexport class WorkbenchLayoutMigrationV2 implements WorkbenchMigration {\n\n  public migrate(json: string): string {\n    const perspectiveDataV1 = JSON.parse(json) as PerspectiveDataV1;\n    const perspectiveLayoutV2: MPerspectiveLayoutV2 = {\n      userLayout: {\n        workbenchGrid: perspectiveDataV1.workbenchGrid,\n        viewOutlets: this.migrateViewOutlets(perspectiveDataV1.viewOutlets),\n      },\n      referenceLayout: {\n        workbenchGrid: perspectiveDataV1.initialWorkbenchGrid,\n        viewOutlets: JSON.stringify({}),\n      },\n    };\n    return JSON.stringify(perspectiveLayoutV2);\n  }\n\n  private migrateViewOutlets(viewOutlets: {[viewId: string]: Commands}): string {\n    return JSON.stringify(Object.fromEntries(Object.entries(viewOutlets)\n      .map(([viewId, commands]: [string, Commands]): [string, MUrlSegmentV2[]] => {\n        return [viewId, commandsToSegments(commands)];\n      }),\n    ));\n  }\n}\n\nfunction commandsToSegments(commands: Commands): MUrlSegmentV2[] {\n  const segments = new Array<MUrlSegmentV2>();\n\n  commands.forEach(command => {\n    if (typeof command === 'string') {\n      segments.push({path: command, parameters: {}});\n    }\n    else {\n      segments.at(-1)!.parameters = command as Record<string, string>;\n    }\n  });\n\n  return segments;\n}\n\ninterface MUrlSegmentV2 {\n  path: string;\n  parameters: {[name: string]: string};\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 {Injectable} from '@angular/core';\nimport {MPerspectiveLayoutV2} from './model/workbench-layout-migration-v2.model';\nimport {MPerspectiveLayoutV3} from './model/workbench-layout-migration-v3.model';\nimport {WorkbenchMigration} from '../../migration/workbench-migration';\n\n/**\n * Migrates the perspective layout from version 2 to version 3.\n */\n@Injectable({providedIn: 'root'})\nexport class WorkbenchLayoutMigrationV3 implements WorkbenchMigration {\n\n  public migrate(json: string): string {\n    const perspectiveLayoutV2 = JSON.parse(json) as MPerspectiveLayoutV2;\n    const perspectiveLayoutV3: MPerspectiveLayoutV3 = {\n      userLayout: {\n        workbenchGrid: perspectiveLayoutV2.userLayout.workbenchGrid,\n        outlets: perspectiveLayoutV2.userLayout.viewOutlets,\n      },\n      referenceLayout: {\n        workbenchGrid: perspectiveLayoutV2.referenceLayout.workbenchGrid,\n        outlets: perspectiveLayoutV2.referenceLayout.viewOutlets,\n      },\n    };\n    return JSON.stringify(perspectiveLayoutV3);\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 {Injectable} from '@angular/core';\nimport {MPerspectiveLayoutV3} from './model/workbench-layout-migration-v3.model';\nimport {WorkbenchMigration} from '../../migration/workbench-migration';\nimport {MWorkbenchLayoutV4} from './model/workbench-layout-migration-v4.model';\n\n/**\n * Migrates the perspective layout from version 3 to version 4.\n */\n@Injectable({providedIn: 'root'})\nexport class WorkbenchLayoutMigrationV4 implements WorkbenchMigration {\n\n  public migrate(json: string): string {\n    const perspectiveLayoutV3 = JSON.parse(json) as MPerspectiveLayoutV3;\n    const workbenchLayoutV4: MWorkbenchLayoutV4 = {\n      userLayout: {\n        grids: {\n          main: perspectiveLayoutV3.userLayout.workbenchGrid,\n        },\n        outlets: perspectiveLayoutV3.userLayout.outlets,\n        activityLayout: undefined!,\n      },\n      referenceLayout: {\n        grids: {\n          main: perspectiveLayoutV3.referenceLayout.workbenchGrid,\n        },\n        outlets: perspectiveLayoutV3.referenceLayout.outlets,\n        activityLayout: undefined!,\n      },\n    };\n    return JSON.stringify(workbenchLayoutV4);\n  }\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 {inject, Injectable} from '@angular/core';\nimport {MPart, MPartGrid, MTreeNode, WorkbenchGrids, ɵMPartGrid} from './workbench-grid.model';\nimport {Outlets} from '../routing/routing.model';\nimport {UrlSegment} from '@angular/router';\nimport {WorkbenchMigrator} from '../migration/workbench-migrator';\nimport {WorkbenchGridMigrationV3} from './migration/workbench-grid-migration-v3.service';\nimport {WorkbenchGridMigrationV4} from './migration/workbench-grid-migration-v4.service';\nimport {WorkbenchGridMigrationV5} from './migration/workbench-grid-migration-v5.service';\nimport {WorkbenchGridMigrationV6} from './migration/workbench-grid-migration-v6.service';\nimport {Exclusion, stringify} from './stringifier';\nimport {WorkbenchOutlet} from '../workbench.constants';\nimport {WorkbenchGridMigrationV7} from './migration/workbench-grid-migration-v7.service';\nimport {MActivityLayout} from '../activity/workbench-activity.model';\nimport {WorkbenchLayoutMigrationV2} from './migration/workbench-layout-migration-v2.service';\nimport {WorkbenchLayoutMigrationV3} from './migration/workbench-layout-migration-v3.service';\nimport {WorkbenchLayoutMigrationV4} from './migration/workbench-layout-migration-v4.service';\nimport {MWorkbenchLayout} from './workbench-layout';\n\n/**\n * Serializes and deserializes a base64-encoded JSON into a {@link MPartGrid}.\n */\n@Injectable({providedIn: 'root'})\nexport class WorkbenchLayoutSerializer {\n\n  /**\n   * Migrates a serialized {@link MWorkbenchLayout} to the latest version.\n   */\n  private _workbenchLayoutMigrator = new WorkbenchMigrator()\n    .registerMigration(1, inject(WorkbenchLayoutMigrationV2))\n    .registerMigration(2, inject(WorkbenchLayoutMigrationV3))\n    .registerMigration(3, inject(WorkbenchLayoutMigrationV4));\n\n  /**\n   * Migrates a serialized {@link MPartGrid} to the latest version.\n   */\n  private _workbenchGridMigrator = new WorkbenchMigrator()\n    .registerMigration(2, inject(WorkbenchGridMigrationV3))\n    .registerMigration(3, inject(WorkbenchGridMigrationV4))\n    .registerMigration(4, inject(WorkbenchGridMigrationV5))\n    .registerMigration(5, inject(WorkbenchGridMigrationV6))\n    .registerMigration(6, inject(WorkbenchGridMigrationV7));\n\n  /**\n   * Migrates a serialized {@link MActivityLayout} to the latest version.\n   */\n  private _workbenchActivityLayoutMigrator = new WorkbenchMigrator();\n\n  /**\n   * Serializes the given workbench layout into a URL-safe base64 string.\n   */\n  public serialize(data: MWorkbenchLayout): string {\n    const json = JSON.stringify(data);\n    return window.btoa(`${json}${VERSION_SEPARATOR}${WORKBENCH_LAYOUT_VERSION}`);\n  }\n\n  /**\n   * Deserializes the given base64-serialized workbench layout, applying necessary migrations if the serialized layout is outdated.\n   */\n  public deserialize(serialized: string | null | undefined): MWorkbenchLayout | null {\n    if (!serialized?.length) {\n      return null;\n    }\n\n    const [json, version] = window.atob(serialized).split(VERSION_SEPARATOR, 2);\n    const serializedVersion = Number.isNaN(Number(version)) ? 1 : Number(version);\n    const migrated = this._workbenchLayoutMigrator.migrate(json!, {from: serializedVersion, to: WORKBENCH_LAYOUT_VERSION});\n    return JSON.parse(migrated) as MWorkbenchLayout;\n  }\n\n  /**\n   * Serializes given grids into a URL-safe base64 string.\n   *\n   * @param grids - Specifies the grids to serialize.\n   * @param flags - Controls how to serialize the grids.\n   */\n  public serializeGrids(grids: WorkbenchGrids, flags?: LayoutSerializationFlags): WorkbenchGrids<string> {\n    const serializedGrids = Object.entries(grids).reduce((acc, [gridName, grid]: [string, ɵMPartGrid | undefined]) => {\n      if (grid === undefined) {\n        return acc;\n      }\n      const json = stringify(grid, {\n        exclusions: new Array<string | Exclusion>()\n          .concat('**/parent')\n          .concat('migrated')\n          .concat(flags?.excludeTreeNodeId ? ({path: '**/id', predicate: context => context.at(-1) instanceof MTreeNode}) : [])\n          .concat(flags?.excludeViewMarkedForRemoval ? '**/views/*/markedForRemoval' : [])\n          .concat(flags?.excludeViewNavigationId ? '**/views/*/navigation/id' : [])\n          .concat(flags?.excludePartNavigationId ? ({path: '**/navigation/id', predicate: context => context.at(-2) instanceof MPart}) : []),\n        sort: flags?.sort,\n      });\n      const serialized = window.btoa(`${json}${VERSION_SEPARATOR}${WORKBENCH_GRID_VERSION}`);\n\n      return acc.set(gridName, serialized);\n    }, new Map<string, string>());\n    return Object.fromEntries(serializedGrids) as unknown as WorkbenchGrids<string>;\n  }\n\n  /**\n   * Deserializes the given base64-serialized grid, applying necessary migrations if the serialized grid is outdated.\n   */\n  public deserializeGrid(serialized: string): ɵMPartGrid {\n    const [jsonGrid, jsonGridVersion] = window.atob(serialized).split(VERSION_SEPARATOR, 2);\n    const gridVersion = Number.isNaN(Number(jsonGridVersion)) ? 1 : Number(jsonGridVersion);\n    const migratedJsonGrid = this._workbenchGridMigrator.migrate(jsonGrid!, {from: gridVersion, to: WORKBENCH_GRID_VERSION});\n\n    // Parse the JSON.\n    const grid = JSON.parse(migratedJsonGrid, (key: string, value: unknown) => {\n      if (MPart.isMPart(value)) {\n        return new MPart(value); // create a class object from the object literal\n      }\n      if (MTreeNode.isMTreeNode(value)) {\n        return new MTreeNode(value); // create a class object from the object literal\n      }\n      return value;\n    }) as MPartGrid;\n\n    // Link parent tree nodes\n    (function linkParentNodes(node: MTreeNode | MPart, parent: MTreeNode | undefined): void {\n      node.parent = parent;\n\n      if (node instanceof MTreeNode) {\n        linkParentNodes(node.child1, node);\n        linkParentNodes(node.child2, node);\n      }\n    })(grid.root, undefined);\n\n    return (gridVersion < WORKBENCH_GRID_VERSION) ? {...grid, migrated: true} : grid;\n  }\n\n  /**\n   * Serializes given activity layout into a URL-safe base64 string.\n   *\n   * @param layout - Specifies the activity layout to serialize.\n   * @param flags - Controls how to serialize the activity layout.\n   */\n  public serializeActivityLayout(layout: MActivityLayout, flags?: LayoutSerializationFlags): string;\n  public serializeActivityLayout(layout: MActivityLayout | undefined, flags?: LayoutSerializationFlags): string | undefined;\n  public serializeActivityLayout(layout: MActivityLayout | undefined, flags?: LayoutSerializationFlags): string | undefined {\n    if (layout === undefined) {\n      return undefined;\n    }\n\n    const json = stringify(layout, {\n      sort: flags?.sort,\n    });\n    return window.btoa(`${json}${VERSION_SEPARATOR}${WORKBENCH_ACTIVITY_LAYOUT_VERSION}`);\n  }\n\n  /**\n   * Deserializes the given base64-serialized activity layout, applying necessary migrations if the serialized layout is outdated.\n   */\n  public deserializeActivityLayout(serialized: string): MActivityLayout {\n    const [jsonLayout, jsonLayoutVersion] = window.atob(serialized).split(VERSION_SEPARATOR, 2);\n    const layoutVersion = Number.isNaN(Number(jsonLayoutVersion)) ? 1 : Number(jsonLayoutVersion);\n    const migratedJsonLayout = this._workbenchActivityLayoutMigrator.migrate(jsonLayout!, {from: layoutVersion, to: WORKBENCH_ACTIVITY_LAYOUT_VERSION});\n    return JSON.parse(migratedJsonLayout) as MActivityLayout;\n  }\n\n  /**\n   * Serializes the given outlets.\n   */\n  public serializeOutlets(outlets: Outlets): string {\n    return JSON.stringify(Object.fromEntries(Object.entries(outlets)\n      .map(([outlet, segments]: [string, UrlSegment[]]): [string, MUrlSegment[]] => {\n        return [outlet, segments.map(segment => ({path: segment.path, parameters: segment.parameters}))];\n      })));\n  }\n\n  /**\n   * Deserializes the given outlets.\n   */\n  public deserializeOutlets(serialized: string): Outlets {\n    const outlets = JSON.parse(serialized) as {[outlet: WorkbenchOutlet]: MUrlSegment[]};\n\n    return Object.fromEntries(Object.entries(outlets)\n      .map(([outlet, segments]: [string, MUrlSegment[]]): [string, UrlSegment[]] => {\n        return [outlet, segments.map(segment => new UrlSegment(segment.path, segment.parameters))];\n      }));\n  }\n}\n\n/**\n * Represents the current version of the workbench layout.\n *\n * Increment this version and write a migrator when introducing a breaking change.\n *\n * @see WorkbenchMigrator\n */\nexport const WORKBENCH_LAYOUT_VERSION = 4;\n\n/**\n * Represents the current version of the workbench grid model.\n *\n * Increment this version and write a migrator when introducing a breaking layout model change.\n *\n * @see WorkbenchMigrator\n */\nconst WORKBENCH_GRID_VERSION = 7;\n\n/**\n * Represents the current version of the workbench activity layout model.\n *\n * Increment this version and write a migrator when introducing a breaking layout model change.\n *\n * @see WorkbenchMigrator\n */\nconst WORKBENCH_ACTIVITY_LAYOUT_VERSION = 1;\n\n/**\n * Separates the serialized JSON model and its version in the base64-encoded string.\n *\n * Format: <json>//<version>\n */\nconst VERSION_SEPARATOR = '//';\n\n/**\n * Represents a segment in the URL.\n *\n * The M-prefix indicates this object is a model object that is serialized and stored, requiring migration on breaking change.\n */\ninterface MUrlSegment {\n  path: string;\n  parameters: {[name: string]: string};\n}\n\n/**\n * Controls how to serialize the workbench layout.\n */\nexport interface LayoutSerializationFlags {\n  /**\n   * Excludes the node id from the serialization.\n   */\n  excludeTreeNodeId?: true;\n  /**\n   * Excludes views marked for removal from the serialization.\n   */\n  excludeViewMarkedForRemoval?: true;\n  /**\n   * Excludes the view navigation id from the serialization.\n   */\n  excludeViewNavigationId?: true;\n  /**\n   * Excludes the part navigation id from the serialization.\n   */\n  excludePartNavigationId?: true;\n  /**\n   * Assigns each part a stable id based on its position in the grid.\n   *\n   * Stable identifiers may be required to compare two layouts for equality.\n   */\n  assignStablePartIdentifier?: true;\n  /**\n   * Assigns each activity a stable id based on its position in the layout.\n   *\n   * Stable identifiers may be required to compare two layouts for equality.\n   */\n  assignStableActivityIdentifier?: true;\n  /**\n   * Controls if to sort the fields of object literals by name. Defaults to `false`.\n   *\n   * Stable sort order may be required to compare two layouts for equality.\n   */\n  sort?: true;\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 {InjectionToken} from '@angular/core';\nimport {ɵWorkbenchPart} from './ɵworkbench-part.model';\nimport {WorkbenchObjectRegistry} from '../registry/workbench-object-registry';\nimport {PartId} from './workbench-part.model';\n\n/**\n * Registry for {@link WorkbenchPart} model objects.\n */\nexport const WORKBENCH_PART_REGISTRY = new InjectionToken<WorkbenchObjectRegistry<PartId, ɵWorkbenchPart>>('WORKBENCH_PART_REGISTRY', {\n  providedIn: 'root',\n  factory: () => new WorkbenchObjectRegistry<PartId, ɵWorkbenchPart>({\n    nullObjectErrorFn: partId => Error(`[NullPartError] Part '${partId}' not found.`),\n    onUnregister: part => part.destroy(),\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 {Injectable} from '@angular/core';\n\n/**\n * Set of log levels to control logging output.\n */\nexport enum LogLevel {\n  DEBUG, INFO, WARN, ERROR,\n}\n\n/**\n * Provides information about a message to be logged.\n */\nexport interface LogEvent {\n  /**\n   * Severity of the message.\n   */\n  level: LogLevel;\n  /**\n   * Name of the logger used to log the message.\n   */\n  logger: string;\n  /**\n   * Supplies the message.\n   */\n  messageSupplier: () => string;\n  /**\n   * Arguments as passed to the logger.\n   */\n  args: any[];\n}\n\n/**\n * Delivers log events to a destination, e.g., writing logs to the console.\n */\n@Injectable(/* DO NOT provide via 'providedIn' metadata as used as DI token for the actual appenders. */)\nexport abstract class LogAppender {\n\n  /**\n   * Each message to be logged is passed to this method in the form of a {@link LogEvent} object.\n   */\n  public abstract onLogMessage(event: LogEvent): void;\n}\n\n/**\n * Logger name to be used to log a message.\n *\n * Pass an instance of this class as the first argument to the logger when logging a message.\n */\nexport class LoggerName {\n\n  constructor(private readonly _value: string) {\n  }\n\n  public toString(): string {\n    return this._value;\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 {Injectable} from '@angular/core';\nimport {LogAppender, LogEvent, LogLevel} from './logging.model';\n\n/**\n * Logs messages to the console, if available.\n */\n@Injectable(/* DO NOT provide via 'providedIn' metadata as registered under `LogAppender` DI token. */)\nexport class ConsoleAppender implements LogAppender {\n\n  public onLogMessage(event: LogEvent): void {\n    switch (event.level) {\n      case LogLevel.DEBUG: {\n        console.debug(...[`[${event.logger}] ${event.messageSupplier()}`].concat(event.args));\n        break;\n      }\n      case LogLevel.WARN: {\n        console.warn(...[`[${event.logger}] ${event.messageSupplier()}`].concat(event.args));\n        break;\n      }\n      case LogLevel.ERROR: {\n        console.error(...[`[${event.logger}] ${event.messageSupplier()}`].concat(event.args));\n        break;\n      }\n      default: {\n        console.log(...[`[${event.logger}] ${event.messageSupplier()}`].concat(event.args));\n        break;\n      }\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 {computed, inject, Injectable, Signal} from '@angular/core';\nimport {NavigationStart, Router} from '@angular/router';\nimport {filter, map, startWith} from 'rxjs/operators';\nimport {LogAppender, LogEvent, LoggerName, LogLevel} from './logging.model';\nimport {Logger} from './logger';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {WorkbenchConfig} from '../workbench-config';\n\n@Injectable(/* DO NOT provide via 'providedIn' metadata as registered under `Logger` DI token. */)\nexport class ɵLogger implements Logger {\n\n  // TODO [Angular 21] Remove cast when Angular supports type safety for multi-injection with abstract class DI tokens.\n  private readonly _logAppenders = inject(LogAppender, {optional: true}) as LogAppender[] | null ?? [];\n  private readonly _logLevel: Signal<LogLevel>;\n\n  constructor() {\n    const defaultLogLevel = inject(WorkbenchConfig, {optional: true})?.logging?.logLevel ?? LogLevel.INFO;\n    const logLevel = queryParam('loglevel');\n    this._logLevel = computed(() => parseLogLevel(logLevel()) ?? defaultLogLevel);\n  }\n\n  /** @inheritDoc */\n  public get logLevel(): LogLevel {\n    return this._logLevel();\n  }\n\n  /** @inheritDoc */\n  public debug(message: string | (() => string), ...args: any[]): void {\n    this.log(coerceLogEvent(LogLevel.DEBUG, message, args));\n  }\n\n  /** @inheritDoc */\n  public info(message: string | (() => string), ...args: any[]): void {\n    this.log(coerceLogEvent(LogLevel.INFO, message, args));\n  }\n\n  /** @inheritDoc */\n  public warn(message: string | (() => string), ...args: any[]): void {\n    this.log(coerceLogEvent(LogLevel.WARN, message, args));\n  }\n\n  /** @inheritDoc */\n  public error(message: string | (() => string), ...args: any[]): void {\n    this.log(coerceLogEvent(LogLevel.ERROR, message, args));\n  }\n\n  private log(event: LogEvent): void {\n    if (!this._logAppenders.length) {\n      return;\n    }\n\n    if (event.level < this.logLevel) {\n      return;\n    }\n\n    this._logAppenders.forEach(logAppender => logAppender.onLogMessage(event));\n  }\n}\n\n/**\n * Reads the specified query parameter from the URL.\n */\nfunction queryParam(queryParam: string): Signal<string | null> {\n  const router = inject(Router);\n  const queryParam$ = router.events\n    .pipe(\n      filter(event => event instanceof NavigationStart),\n      map(event => event.url),\n      startWith(router.url),\n      map(url => router.parseUrl(url).queryParamMap.get(queryParam)),\n    );\n  return toSignal(queryParam$, {requireSync: true});\n}\n\n/**\n * Parses the given log level string into a {@link LogLevel} enum.\n */\nfunction parseLogLevel(logLevel: string | null): LogLevel | undefined {\n  return logLevel ? LogLevel[logLevel.toUpperCase() as keyof typeof LogLevel] as LogLevel | undefined : undefined;\n}\n\n/**\n * Coerces the given arguments to a {@link LogEvent}.\n */\nfunction coerceLogEvent(level: LogLevel, message: string | (() => string), args: any[]): LogEvent {\n  const messageSupplier: () => string = typeof message === 'function' ? message : () => message;\n  if (args[0] instanceof LoggerName) {\n    return {level, messageSupplier, logger: args[0].toString(), args: args.slice(1)};\n  }\n  return {level, messageSupplier, logger: 'workbench', args};\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 {Injectable} from '@angular/core';\nimport {LoggerName, LogLevel} from './logging.model';\nimport {ɵLogger} from './ɵlogger';\n\n/**\n * Logger used by the workbench to log messages.\n *\n * Log messages are passed to registered log appenders in the form of log events for delivery to a destination.\n *\n * When configuring the workbench, you can register one or more log appenders and specify the minimum severity\n * level a message must have in order to be logged. At runtime, you can change the minimum required log level\n * by setting the `loglevel` query parameter. For example, to log messages with debug severity or higher, set\n * the query parameters as follows: `loglevel=debug`.\n *\n * By default, if not registering a log appender, the workbench registers a console log appender. The default\n * minimal required log level is set to {@link LogLevel#INFO}.\n *\n * @see {@link LogAppender}\n */\n@Injectable({providedIn: 'root', useClass: ɵLogger})\nexport abstract class Logger {\n\n  /**\n   * Log level of the workbench logger.\n   */\n  public abstract readonly logLevel: LogLevel;\n\n  /**\n   * Logs a message with debug severity.\n   *\n   * For messages that are expensive to compose, you can provide a message supplier function.\n   * The logger will call this function only if at least `DEBUG` log level is enabled.\n   *\n   * Optionally, you can pass the logger name as the first argument in the `args` list. The log message\n   * will then be prefixed with that logger name. Logger names must be instances of {@link LoggerName}.\n   */\n  public abstract debug(message: string | (() => string), ...args: any[]): void;\n  public abstract debug(message: string | (() => string), loggerName: LoggerName, ...args: any[]): void;\n\n  /**\n   * Logs a message with info severity.\n   *\n   * For messages that are expensive to compose, you can provide a message supplier function.\n   * The logger will call this function only if at least `INFO` log level is enabled.\n   *\n   * Optionally, you can pass the logger name as the first argument in the `args` list. The log message\n   * will then be prefixed with that logger name. Logger names must be instances of {@link LoggerName}.\n   */\n  public abstract info(message: string | (() => string), ...args: any[]): void;\n  public abstract info(message: string | (() => string), loggerName: LoggerName, ...args: any[]): void;\n\n  /**\n   * Logs a message with warn severity.\n   *\n   * For messages that are expensive to compose, you can provide a message supplier function.\n   * The logger will call this function only if at least `WARN` log level is enabled.\n   *\n   * Optionally, you can pass the logger name as the first argument in the `args` list. The log message\n   * will then be prefixed with that logger name. Logger names must be instances of {@link LoggerName}.\n   */\n  public abstract warn(message: string | (() => string), ...args: any[]): void;\n  public abstract warn(message: string | (() => string), loggerName: LoggerName, ...args: any[]): void;\n\n  /**\n   * Logs a message with error severity.\n   *\n   * For messages that are expensive to compose, you can provide a message supplier function.\n   * The logger will call this function only if at least `ERROR` log level is enabled.\n   *\n   * Optionally, you can pass the logger name as the first argument in the `args` list. The log message\n   * will then be prefixed with that logger name. Logger names must be instances of {@link LoggerName}.\n   */\n  public abstract error(message: string | (() => string), ...args: any[]): void;\n  public abstract error(message: string | (() => string), loggerName: LoggerName, ...args: any[]): 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 {LoggerName} from './logging.model';\n\n/**\n * Enumerates logger names used by the workbench.\n */\nexport const LoggerNames = {\n\n  /**\n   * Use this logger name to log messages related to workbench routing.\n   */\n  ROUTING: new LoggerName('workbench:router'),\n\n  /**\n   * Use this logger name to log messages related to the workbench lifecycle.\n   */\n  LIFECYCLE: new LoggerName('workbench:lifecycle'),\n\n  /**\n   * Use this logger name to log messages related to the microfrontend integration.\n   */\n  MICROFRONTEND: new LoggerName('workbench:microfrontend'),\n\n  /**\n   * Use this logger name to log messages related to the microfrontend routing.\n   */\n  MICROFRONTEND_ROUTING: new LoggerName('workbench:microfrontend/routing'),\n} as const;\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 {EnvironmentProviders, makeEnvironmentProviders, Provider, Type} from '@angular/core';\nimport {WorkbenchConfig} from '../workbench-config';\nimport {LogAppender} from './logging.model';\nimport {ConsoleAppender} from './console-appender.service';\n\n/**\n * Provides a set of DI providers for installing workbench logging.\n */\nexport function provideLogging(workbenchConfig: WorkbenchConfig): EnvironmentProviders {\n  const logAppenders: Type<LogAppender>[] = workbenchConfig.logging?.logAppenders ?? [ConsoleAppender];\n  return makeEnvironmentProviders([\n    logAppenders.map((logAppender: Type<LogAppender>): Provider => ({\n      provide: LogAppender,\n      multi: true,\n      useClass: logAppender,\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\nexport * from './console-appender.service';\nexport * from './logging.model';\nexport * from './logger';\nexport * from './logger-names';\nexport * from './logging-support';\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 {ACTIVITY_ID_PREFIX} from '../workbench.constants';\nimport {PartId} from '../part/workbench-part.model';\nimport {Translatable} from '../text/workbench-text-provider.model';\n\n/**\n * Format of an activity identifier.\n *\n * Each activity is assigned a unique identifier (e.g., `activity.9fdf7ab4`, `activity.c6485225`, etc.).\n *\n * @docs-private Not public API, intended for internal use only.\n */\nexport type ActivityId = `${typeof ACTIVITY_ID_PREFIX}${string}`;\n\n/**\n * Defines the arrangement of docked parts (also referred to as activities) in the workbench.\n *\n * Docked parts can be minimized to create more space for the main content.\n *\n * A part can be docked to the left, right, or bottom side of the workbench.\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 * A docked part may be navigated to display content, have views, or define a layout with multiple parts aligned relative to each other.\n *\n * The M-prefix indicates this object is a model object that is serialized and stored, requiring migration on breaking change.\n */\nexport interface MActivityLayout {\n  toolbars: {\n    leftTop: MActivityStack;\n    leftBottom: MActivityStack;\n    rightTop: MActivityStack;\n    rightBottom: MActivityStack;\n    bottomLeft: MActivityStack;\n    bottomRight: MActivityStack;\n  };\n  panels: {\n    left: {\n      width: number;\n      ratio: number;\n    };\n    right: {\n      width: number;\n      ratio: number;\n    };\n    bottom: {\n      height: number;\n      ratio: number;\n    };\n  };\n}\n\n/**\n * Stack of activities in a docking area.\n *\n * The M-prefix indicates this object is a model object that is serialized and stored, requiring migration on breaking change.\n */\nexport interface MActivityStack {\n  /**\n   * List of activities in the stack.\n   */\n  activities: MActivity[];\n  /**\n   * Reference to the currently active activity in the stack.\n   */\n  activeActivityId?: ActivityId;\n  /**\n   * Reference to the activity that was active prior to minimization, used to restore the active activity when exiting minimization mode.\n   */\n  minimizedActivityId?: ActivityId;\n}\n\n/**\n * Represents an activity docked to a side of the workbench.\n *\n * The M-prefix indicates this object is a model object that is serialized and stored, requiring migration on breaking change.\n */\nexport interface MActivity {\n  /** @see DockedPartExtras#ɵactivityId */\n  id: ActivityId;\n  /**\n   * Refers to the docked part specified when creating the activity.\n   *\n   * Characteristics of the reference part:\n   * - Structural part, remaining even if its last view is removed.\n   * - Provides the title of the activity, independent of visibility and position in the layout.\n   * - Explicitly removing this part removes the activity.\n   */\n  referencePartId: PartId;\n  /** @see DockedPartExtras#icon */\n  icon: string;\n  /** @see DockedPartExtras#label */\n  label: Translatable;\n  /** @see DockedPartExtras#tooltip */\n  tooltip?: Translatable;\n  /** @see DockedPartExtras#cssClass */\n  cssClass?: string | string[];\n}\n\n/**\n * Specifies the default width of the left and right activity panels.\n *\n * Used as the default width if the design tokens '--sci-workbench-layout-panel-left-width' or '--sci-workbench-layout-panel-right-width' are not set.\n */\nexport const ACTIVITY_PANEL_WIDTH = 300;\n\n/**\n * Specifies the default height of the bottom activity panel.\n *\n * Used as the default height if the design token '--sci-workbench-layout-panel-bottom-height' is not set.\n */\nexport const ACTIVITY_PANEL_HEIGHT = 250;\n\n/**\n * Specifies the default split ratio of the activity panels.\n */\nexport const ACTIVITY_PANEL_RATIO = .5;\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 */\nimport {MPart, MPartGrid, MTreeNode, MView, WorkbenchGrids, ɵMPartGrid} from './workbench-grid.model';\nimport {UID} from '../common/uid.util';\nimport {DockedPartExtras, DockingArea, MAIN_AREA, MAIN_AREA_ALTERNATIVE_ID, PartExtras, ReferencePart, WorkbenchLayout} from './workbench-layout';\nimport {LayoutSerializationFlags, WorkbenchLayoutSerializer} from './workench-layout-serializer.service';\nimport {WORKBENCH_VIEW_REGISTRY} from '../view/workbench-view.registry';\nimport {WORKBENCH_PART_REGISTRY} from '../part/workbench-part.registry';\nimport {DOCUMENT, inject, Injectable, InjectionToken, Injector, runInInjectionContext} from '@angular/core';\nimport {Routing} from '../routing/routing.util';\nimport {Commands, NavigationData, NavigationState, NavigationStates, Outlets} from '../routing/routing.model';\nimport {ActivatedRoute, UrlSegment} from '@angular/router';\nimport {ViewId} from '../view/workbench-view.model';\nimport {Arrays} from '@scion/toolkit/util';\nimport {UrlSegmentMatcher} from '../routing/url-segment-matcher';\nimport {WorkbenchLayouts} from './workbench-layouts.util';\nimport {Logger} from '../logging';\nimport {ACTIVITY_ID_PREFIX, PART_ID_PREFIX, WorkbenchOutlet} from '../workbench.constants';\nimport {PartId} from '../part/workbench-part.model';\nimport {ACTIVITY_PANEL_HEIGHT, ACTIVITY_PANEL_RATIO, ACTIVITY_PANEL_WIDTH, ActivityId, MActivity, MActivityLayout, MActivityStack} from '../activity/workbench-activity.model';\nimport {Objects} from '../common/objects.util';\nimport {RequireOne} from '../common/utility-types';\nimport {readCssVariable} from '../common/dom.util';\n\n/**\n * @inheritDoc\n *\n * IMPORTANT: Methods starting with an underscore indicate they are not working on a working copy, but modifying the layout instance.\n */\nexport class ɵWorkbenchLayout implements WorkbenchLayout {\n\n  private readonly _grids: WorkbenchGrids;\n  private readonly _activityLayout: MActivityLayout;\n  private readonly _outlets: Map<WorkbenchOutlet, UrlSegment[]>;\n  private readonly _navigationStates: Map<WorkbenchOutlet, NavigationState>;\n  private readonly _partActivationInstantProvider = inject(PartActivationInstantProvider);\n  private readonly _viewActivationInstantProvider = inject(ViewActivationInstantProvider);\n  private readonly _workbenchLayoutSerializer = inject(WorkbenchLayoutSerializer);\n  private readonly _injector = inject(Injector);\n\n  /** Identifies the perspective of this layout, if any. */\n  public readonly perspectiveId: string | undefined;\n\n  /**\n   * Creates a workbench layout based on given config.\n   *\n   * @see WorkbenchLayoutConstructConfig\n   */\n  constructor(config?: WorkbenchLayoutConstructConfig) {\n    this._grids = {\n      main: coerceMPartGrid(config?.grids?.main, {default: createDefaultMainGrid}),\n      mainArea: coerceMPartGrid(config?.grids?.mainArea, {default: createDefaultMainAreaGrid}),\n      ...WorkbenchLayouts.pickActivityGrids(config?.grids, grid => coerceMPartGrid(grid)),\n    };\n\n    this._activityLayout = coerceMActivityLayout(config?.activityLayout, {default: createDefaultActivityLayout});\n    this._outlets = new Map(Objects.entries(coerceOutlets(config?.outlets)));\n    this._navigationStates = new Map(Objects.entries(config?.navigationStates ?? {}));\n    this.perspectiveId = config?.perspectiveId;\n\n    // Delete main area grid if not contained in the main grid.\n    if (!this.hasPart(MAIN_AREA, {grid: 'main'})) {\n      delete this._grids.mainArea;\n    }\n\n    this.assertActivities();\n  }\n\n  public get activityLayout(): MActivityLayout {\n    return this._activityLayout;\n  }\n\n  public get grids(): WorkbenchGrids {\n    return this._grids;\n  }\n\n  /**\n   * Tests if given activity is contained in this layout.\n   */\n  public hasActivity(id: ActivityId): boolean {\n    return this.activities({id}).length > 0;\n  }\n\n  /**\n   * Indicates if this layout contains activities.\n   */\n  public hasActivities(): boolean {\n    return this.activities().length > 0;\n  }\n\n  /**\n   * Tests if given part is contained in the specified grid.\n   */\n  public hasPart(id: string, options?: {grid?: keyof WorkbenchGrids}): boolean {\n    return this.parts({id, grid: options?.grid}).length > 0;\n  }\n\n  /**\n   * Tests if given view is contained in the specified grid.\n   */\n  public hasView(id: string, options?: {grid?: keyof WorkbenchGrids}): boolean {\n    return this.views({id, grid: options?.grid}).length > 0;\n  }\n\n  /**\n   * Finds the URL of outlets based on the specified filter.\n   *\n   * @param selector - Defines the search scope.\n   * @return outlets matching the filter criteria.\n   */\n  public outlets(selector: RequireOne<{mainGrid: true; mainAreaGrid: true; activityGrids: true}>): Outlets {\n    const gridNames = new Array<keyof WorkbenchGrids>()\n      .concat(selector.mainGrid ? 'main' : [])\n      .concat(selector.mainAreaGrid ? 'mainArea' : [])\n      .concat(selector.activityGrids ? Objects.keys(WorkbenchLayouts.pickActivityGrids(this._grids)) : []);\n\n    const partOutlets = this.parts({grid: gridNames}).filter(part => this._outlets.has(part.id)).map<[PartId, UrlSegment[]]>(part => [part.id, this._outlets.get(part.id)!]);\n    const viewOutlets = this.views({grid: gridNames}).filter(view => this._outlets.has(view.id)).map<[ViewId, UrlSegment[]]>(view => [view.id, this._outlets.get(view.id)!]);\n    return Object.fromEntries([...partOutlets, ...viewOutlets]);\n  }\n\n  /**\n   * Finds navigational state based on the specified filter.\n   *\n   * @param findBy - Defines the search scope.\n   * @param findBy.grid - Searches outlets in the specified grid.\n   * @return state matching the filter criteria.\n   */\n  public navigationStates(findBy?: {grid?: keyof WorkbenchGrids}): NavigationStates {\n    const partStates = this.parts({grid: findBy?.grid}).filter(part => this._navigationStates.has(part.id)).map<[PartId, NavigationState]>(part => [part.id, this._navigationStates.get(part.id)!]);\n    const viewStates = this.views({grid: findBy?.grid}).filter(view => this._navigationStates.has(view.id)).map<[ViewId, NavigationState]>(view => [view.id, this._navigationStates.get(view.id)!]);\n    return Object.fromEntries([...partStates, ...viewStates]);\n  }\n\n  /**\n   * Finds the navigational state of specified outlet.\n   */\n  public navigationState(findBy: {outlet: WorkbenchOutlet}): NavigationState {\n    return this._navigationStates.get(findBy.outlet) ?? {};\n  }\n\n  /**\n   * Finds the URL of specified outlet.\n   */\n  public urlSegments(findBy: {outlet: WorkbenchOutlet}): UrlSegment[] {\n    return this._outlets.get(findBy.outlet) ?? [];\n  }\n\n  /**\n   * Maximizes the main content by minimizing activities, or restores activities to the state prior to the last minimization otherwise.\n   *\n   * Has no effect for layouts without activities.\n   *\n   * @return a copy of this layout with the maximization changed.\n   */\n  public toggleMaximized(): ɵWorkbenchLayout {\n    const workingCopy = this.workingCopy();\n    workingCopy.__toggleMaximized();\n    return workingCopy;\n  }\n\n  /**\n   * Finds activities based on the specified filter.\n   *\n   * @param findBy - Defines the search scope.\n   * @param findBy.id - Searches for activities with the specified id.\n   * @param findBy.active - Searches for activities which are active.\n   * @param findBy.partId - Searches for activities that contain the specified part.\n   * @param findBy.viewId - Searches for activities that contain the specified view.\n   * @param options - Controls the search.\n   * @param options.throwIfEmpty - Controls to error if no activity is found.\n   * @param options.throwIfMulti - Controls to error if multiple activities are found.\n   * @return activities matching the filter criteria.\n   */\n  public activities(findBy: {id?: ActivityId; active?: boolean; partId?: PartId; viewId?: ViewId}, options: {throwIfEmpty: (() => Error) | true; throwIfMulti: (() => Error) | true}): readonly [MActivity];\n  public activities(findBy: {id?: ActivityId; active?: boolean; partId?: PartId; viewId?: ViewId}, options: {throwIfEmpty: (() => Error) | true; throwIfMulti?: (() => Error) | true}): readonly [MActivity, ...MActivity[]];\n  public activities(findBy?: {id?: ActivityId; active?: boolean; partId?: PartId; viewId?: ViewId}, options?: {throwIfEmpty?: (() => Error) | true; throwIfMulti?: (() => Error) | true}): readonly MActivity[];\n  public activities(findBy?: {id?: ActivityId; active?: boolean; partId?: PartId; viewId?: ViewId}, options?: {throwIfEmpty?: (() => Error) | true; throwIfMulti?: (() => Error) | true}): readonly MActivity[] {\n    const activities = this.activityStacks().flatMap(stack => stack.activities.filter(activity => {\n      if (findBy?.id && activity.id !== findBy.id) {\n        return false;\n      }\n      if (findBy?.active !== undefined && (stack.activeActivityId === activity.id) !== findBy.active) {\n        return false;\n      }\n      if (findBy?.partId && !this.part({partId: findBy.partId, grid: activity.id}, {orElse: null})) {\n        return false;\n      }\n      if (findBy?.viewId && !this.part({viewId: findBy.viewId, grid: activity.id}, {orElse: null})) {\n        return false;\n      }\n      return true;\n    }));\n\n    if (options?.throwIfEmpty && !activities.length) {\n      throw typeof options.throwIfEmpty === 'function' ? options.throwIfEmpty() : Error(`[NullActivityError] No matching activity found: [${stringifyFilter(findBy ?? {})}]`);\n    }\n    if (options?.throwIfMulti && activities.length > 1) {\n      throw typeof options.throwIfMulti === 'function' ? options.throwIfMulti() : Error(`[MultiActivityError] Multiple activities found: [${stringifyFilter(findBy ?? {})}]`);\n    }\n    return activities;\n  }\n\n  /**\n   * Finds an activity based on the specified filter. If not found, by default, throws an error unless setting the `orElseNull` option.\n   *\n   * @param findBy - Defines the search scope.\n   * @param findBy.id - Searches for an activity with the specified id.\n   * @param findBy.active - Searches for an activity which is active.\n   * @param findBy.partId - Searches for an activity that contains the specified part.\n   * @param findBy.viewId - Searches for an activity that contains the specified view.\n   * @param options - Controls the search.\n   * @param options.orElse - Controls to return `null` instead of throwing an error if no activity is found.\n   * @return activity matching the filter criteria.\n   */\n  public activity(findBy: RequireOne<{id: ActivityId; active: boolean; partId: PartId; viewId: ViewId}>): MActivity;\n  public activity(findBy: RequireOne<{id: ActivityId; active: boolean; partId: PartId; viewId: ViewId}>, options: {orElse: null}): MActivity | null;\n  public activity(findBy: RequireOne<{id: ActivityId; active: boolean; partId: PartId; viewId: ViewId}>, options?: {orElse: null}): MActivity | null {\n    const [activity] = this.activities({id: findBy.id, active: findBy.active, partId: findBy.partId, viewId: findBy.viewId}, {throwIfMulti: true, throwIfEmpty: options?.orElse === null ? undefined : true});\n    return activity ?? null;\n  }\n\n  /**\n   * Finds activity stacks based on the specified filter.\n   *\n   * @param findBy - Defines the search scope.\n   * @param findBy.activityId - Searches for an activity stack that contains the specified activity.\n   * @param findBy.dockTo - Searches for an activity stack in the specified docking area.\n   * @param findBy.partId - Searches for an activity stack that contains the specified part.\n   * @param options - Controls the search.\n   * @param options.throwIfEmpty - Controls to error if no activity stack is found.\n   * @param options.throwIfMulti - Controls to error if multiple activity stacks are found.\n   * @return activity stacks matching the filter criteria.\n   */\n  public activityStacks(findBy: {activityId?: ActivityId; dockTo?: DockingArea; partId?: PartId}, options: {throwIfEmpty: (() => Error) | true; throwIfMulti: (() => Error) | true}): readonly [MActivityStack];\n  public activityStacks(findBy: {activityId?: ActivityId; dockTo?: DockingArea; partId?: PartId}, options: {throwIfEmpty: (() => Error) | true; throwIfMulti?: (() => Error) | true}): readonly [MActivityStack, ...MActivityStack[]];\n  public activityStacks(findBy?: {activityId?: ActivityId; dockTo?: DockingArea; partId?: PartId}, options?: {throwIfEmpty?: (() => Error) | true; throwIfMulti?: (() => Error) | true}): readonly MActivityStack[];\n  public activityStacks(findBy?: {activityId?: ActivityId; dockTo?: DockingArea; partId?: PartId}, options?: {throwIfEmpty?: (() => Error) | true; throwIfMulti?: (() => Error) | true}): readonly MActivityStack[] {\n    const activityStacks = {\n      'left-top': this.activityLayout.toolbars.leftTop,\n      'left-bottom': this.activityLayout.toolbars.leftBottom,\n      'right-top': this.activityLayout.toolbars.rightTop,\n      'right-bottom': this.activityLayout.toolbars.rightBottom,\n      'bottom-left': this.activityLayout.toolbars.bottomLeft,\n      'bottom-right': this.activityLayout.toolbars.bottomRight,\n    };\n\n    const stacks = Objects.entries(activityStacks)\n      .filter(([dockTo, stack]) => {\n        const activities = stack.activities;\n        if (findBy?.dockTo && findBy.dockTo.dockTo !== dockTo) {\n          return false;\n        }\n        if (findBy?.activityId && !activities.some(activity => activity.id === findBy.activityId)) {\n          return false;\n        }\n        if (findBy?.partId && !activities.some(activity => !!this.part({partId: findBy.partId!, grid: activity.id}, {orElse: null}))) {\n          return false;\n        }\n        return true;\n      })\n      .map(([_dockTo, stack]) => stack);\n\n    if (options?.throwIfEmpty && !stacks.length) {\n      throw typeof options.throwIfEmpty === 'function' ? options.throwIfEmpty() : Error(`[NullActivityStackError] No matching activity stack found: [${stringifyFilter(findBy ?? {})}]`);\n    }\n    if (options?.throwIfMulti && stacks.length > 1) {\n      throw typeof options.throwIfMulti === 'function' ? options.throwIfMulti() : Error(`[MultiActivityStackError] Multiple activity stacks found: [${stringifyFilter(findBy ?? {})}]`);\n    }\n    return stacks;\n  }\n\n  /**\n   * Finds an activity stack based on the specified filter. If not found, by default, throws an error unless setting the `orElseNull` option.\n   *\n   * @param findBy - Defines the search scope.\n   * @param findBy.activityId - Searches for an activity stack that contains the specified activity.\n   * @param findBy.dockTo - Searches for an activity stack in the specified docking area.\n   * @param findBy.partId - Searches for an activity stack that contains the specified part.\n   * @param options - Controls the search.\n   * @param options.orElse - Controls to return `null` instead of throwing an error if no activity stack is found.\n   * @return activity stack matching the filter criteria.\n   */\n  public activityStack(findBy: RequireOne<{activityId: ActivityId; dockTo: DockingArea; partId: PartId}>): MActivityStack;\n  public activityStack(findBy: RequireOne<{activityId: ActivityId; dockTo: DockingArea; partId: PartId}>, options: {orElse: null}): MActivityStack | null;\n  public activityStack(findBy: RequireOne<{activityId: ActivityId; dockTo: DockingArea; partId: PartId}>, options?: {orElse: null}): MActivityStack | null {\n    const [activityStack] = this.activityStacks({activityId: findBy.activityId, dockTo: findBy.dockTo, partId: findBy.partId}, {throwIfMulti: true, throwIfEmpty: options?.orElse === null ? undefined : true});\n    return activityStack ?? null;\n  }\n\n  /**\n   * Toggles the visibility of specified activity.\n   */\n  public toggleActivity(id: ActivityId): ɵWorkbenchLayout {\n    const workingCopy = this.workingCopy();\n    workingCopy.__toggleActivity(id);\n    return workingCopy;\n  }\n\n  /**\n   * Sets the size of the specified activity panel.\n   */\n  public setActivityPanelSize(panel: 'left' | 'right' | 'bottom', size: number): ɵWorkbenchLayout {\n    const workingCopy = this.workingCopy();\n    workingCopy.__setActivityPanelSize(panel, size);\n    return workingCopy;\n  }\n\n  /**\n   * Sets the split ratio of two activities displayed in the specified panel.\n   */\n  public setActivityPanelSplitRatio(panel: 'left' | 'right' | 'bottom', ratio: number): ɵWorkbenchLayout {\n    const workingCopy = this.workingCopy();\n    workingCopy.__setActivityPanelSplitRatio(panel, ratio);\n    return workingCopy;\n  }\n\n  /**\n   * Finds parts based on the specified filter.\n   *\n   * @param findBy - Defines the search scope.\n   * @param findBy.id - Searches for parts with the specified id.\n   * @param findBy.viewId - Searches for parts that contain the specified view.\n   * @param findBy.peripheral - Searches for parts located in or out of the peripheral area.\n   * @param findBy.grid - Searches for parts contained in the specified grid.\n   * @param options - Controls the search.\n   * @param options.throwIfEmpty - Controls to error if no part is found.\n   * @param options.throwIfMulti - Controls to error if multiple parts are found.\n   * @return parts matching the filter criteria.\n   */\n  public parts(findBy: {id?: string; viewId?: string; peripheral?: boolean; grid?: keyof WorkbenchGrids | Array<keyof WorkbenchGrids>}, options: {throwIfEmpty: (() => Error) | true; throwIfMulti: (() => Error) | true}): readonly [MPart];\n  public parts(findBy: {id?: string; viewId?: string; peripheral?: boolean; grid?: keyof WorkbenchGrids | Array<keyof WorkbenchGrids>}, options: {throwIfEmpty: (() => Error) | true; throwIfMulti?: (() => Error) | true}): readonly [MPart, ...MPart[]];\n  public parts(findBy?: {id?: string; viewId?: string; peripheral?: boolean; grid?: keyof WorkbenchGrids | Array<keyof WorkbenchGrids>}, options?: {throwIfEmpty?: (() => Error) | true; throwIfMulti?: (() => Error) | true}): readonly MPart[];\n  public parts(findBy?: {id?: string; viewId?: string; peripheral?: boolean; grid?: keyof WorkbenchGrids | Array<keyof WorkbenchGrids>}, options?: {throwIfEmpty?: (() => Error) | true; throwIfMulti?: (() => Error) | true}): readonly MPart[] {\n    const parts = this.findTreeElements((element: MTreeNode | MPart): element is MPart => {\n      if (!(element instanceof MPart)) {\n        return false;\n      }\n      if (findBy?.id !== undefined && !matchesPartId(findBy.id, element)) {\n        return false;\n      }\n      if (findBy?.viewId !== undefined && !element.views.some(view => matchesViewId(findBy.viewId!, view))) {\n        return false;\n      }\n      if (findBy?.peripheral !== undefined && this.isPeripheralPart(element.id) !== findBy.peripheral) {\n        return false;\n      }\n      return true;\n    }, {grid: findBy?.grid});\n\n    if (options?.throwIfEmpty && !parts.length) {\n      throw typeof options.throwIfEmpty === 'function' ? options.throwIfEmpty() : Error(`[NullPartError] No matching part found: [${stringifyFilter(findBy ?? {})}]`);\n    }\n    if (options?.throwIfMulti && parts.length > 1) {\n      throw typeof options.throwIfMulti === 'function' ? options.throwIfMulti() : Error(`[MultiPartError] Multiple parts found: [${stringifyFilter(findBy ?? {})}]`);\n    }\n    return parts;\n  }\n\n  /**\n   * Finds a part based on the specified filter. If not found, by default, throws an error unless setting the `orElseNull` option.\n   *\n   * @param findBy - Defines the search scope.\n   * @param findBy.partId - Searches for a part with the specified id.\n   * @param findBy.viewId - Searches for a part that contains the specified view.\n   * @param findBy.grid - Searches for a part contained in the specified grid.\n   * @param options - Controls the search.\n   * @param options.orElse - Controls to return `null` instead of throwing an error if no part is found.\n   * @return part matching the filter criteria.\n   */\n  public part(findBy: RequireOne<{partId: PartId; viewId: string}> & {grid?: keyof WorkbenchGrids}): MPart;\n  public part(findBy: RequireOne<{partId: PartId; viewId: string}> & {grid?: keyof WorkbenchGrids}, options: {orElse: null}): MPart | null;\n  public part(findBy: RequireOne<{partId: PartId; viewId: string}> & {grid?: keyof WorkbenchGrids}, options?: {orElse: null}): MPart | null {\n    const [part] = this.parts({id: findBy.partId, viewId: findBy.viewId, grid: findBy.grid}, {throwIfMulti: true, throwIfEmpty: options?.orElse === null ? undefined : true});\n    return part ?? null;\n  }\n\n  /**\n   * @inheritDoc\n   *\n   * @param id - @inheritDoc\n   * @param relativeTo - @inheritDoc\n   * @param extras - @inheritDoc\n   * @param extras.activate - @inheritDoc\n   * @param extras.structural - Specifies if this is a structural part. A structural part will not be removed when removing its last view. Defaults to `true`.\n   */\n  public addPart(id: string | MAIN_AREA, relativeTo: ReferenceElement, extras?: PartExtras & {structural?: boolean}): ɵWorkbenchLayout;\n  public addPart(id: string, dockTo: DockingArea, extras: DockedPartExtras): ɵWorkbenchLayout;\n  public addPart(id: string, reference: ReferencePart | DockingArea, extras?: (PartExtras & {structural?: boolean}) | DockedPartExtras): ɵWorkbenchLayout {\n    const partId = isPartId(id) ? id : (id === MAIN_AREA_ALTERNATIVE_ID ? MAIN_AREA : WorkbenchLayouts.computePartId());\n    const alternativeId = isPartId(id) ? (id === MAIN_AREA ? MAIN_AREA_ALTERNATIVE_ID : undefined) : id;\n    const workingCopy = this.workingCopy();\n\n    if ((reference as Partial<DockingArea>).dockTo) {\n      workingCopy.__addActivity(partId, reference as DockingArea, {...extras, alternativeId} as DockedPartExtras & {alternativeId?: string});\n    }\n    else {\n      workingCopy.__addPart(partId, reference as ReferencePart, {...extras, alternativeId} as PartExtras & {alternativeId?: string; structural?: boolean});\n    }\n    return workingCopy;\n  }\n\n  /** @inheritDoc */\n  public removePart(id: string): ɵWorkbenchLayout {\n    const workingCopy = this.workingCopy();\n    workingCopy.parts({id}, {throwIfEmpty: true}).forEach(part => workingCopy.__removePart(part));\n    return workingCopy;\n  }\n\n  /**\n   * Renames a part.\n   *\n   * @param id - Identifies the part to rename.\n   * @param newPartId - The new identity of the part.\n   * @return a copy of this layout with the part renamed.\n   */\n  public renamePart(id: PartId, newPartId: PartId): ɵWorkbenchLayout {\n    const workingCopy = this.workingCopy();\n    workingCopy.__renamePart(workingCopy.part({partId: id}), newPartId);\n    return workingCopy;\n  }\n\n  /** @inheritDoc */\n  public navigatePart(id: string, commands: Commands, extras?: {hint?: string; relativeTo?: ActivatedRoute | null; data?: NavigationData; state?: NavigationState; cssClass?: string | string[]}): ɵWorkbenchLayout {\n    const workingCopy = this.workingCopy();\n    workingCopy.parts({id}, {throwIfEmpty: true}).forEach(part => workingCopy.__navigatePart(part, commands, extras));\n    return workingCopy;\n  }\n\n  /**\n   * Returns the active part of the specified grid, or `null` if specified grid is not present.\n   */\n  public activePart(find: {grid: 'main'}): Readonly<MPart>;\n  public activePart(find: {grid: keyof WorkbenchGrids}): Readonly<MPart> | null;\n  public activePart(find: {grid: keyof WorkbenchGrids}): Readonly<MPart> | null {\n    const grid = this._grids[find.grid];\n    if (!grid) {\n      return null;\n    }\n    return this.part({partId: grid.activePartId, grid: find.grid});\n  }\n\n  /** @inheritDoc */\n  public activatePart(id: string): ɵWorkbenchLayout {\n    const workingCopy = this.workingCopy();\n    workingCopy.parts({id}, {throwIfEmpty: true}).forEach(part => workingCopy.__activatePart(part));\n    return workingCopy;\n  }\n\n  /**\n   * Finds a view based on the specified filter. If not found, by default, throws an error unless setting the `orElseNull` option.\n   *\n   * @param findBy - Defines the search scope.\n   * @param findBy.viewId - Searches for a view with the specified id.\n   * @param options - Controls the search.\n   * @param options.orElse - Controls to return `null` instead of throwing an error if no view is found.\n   * @return view matching the filter criteria.\n   */\n  public view(findBy: {viewId: ViewId}): MView;\n  public view(findBy: {viewId: ViewId}, options: {orElse: null}): MView | null;\n  public view(findBy: {viewId: ViewId}, options?: {orElse: null}): MView | null {\n    const [view] = this.views({id: findBy.viewId}, {throwIfMulti: true, throwIfEmpty: options?.orElse === null ? undefined : true});\n    return view ?? null;\n  }\n\n  /**\n   * Finds views based on the specified filter.\n   *\n   * @param findBy - Defines the search scope.\n   * @param findBy.id - Searches for views with the specified id.\n   * @param findBy.partId - Searches for views contained in the specified part.\n   * @param findBy.segments - Searches for views navigated to the specified URL.\n   * @param findBy.navigationHint - Searches for views navigated with given hint. Passing `null` searches for views navigated without a hint.\n   * @param findBy.markedForRemoval - Searches for views marked (or not marked) for removal.\n   * @param findBy.grid - Searches for views contained in the specified grid.\n   * @param options - Controls the search.\n   * @param options.throwIfEmpty - Controls to error if no view is found.\n   * @param options.throwIfMulti - Controls to error if multiple views are found.\n   * @return views matching the filter criteria.\n   */\n  public views(findBy: {id?: string; partId?: string; peripheral?: boolean; segments?: UrlSegmentMatcher; navigationHint?: string | null; markedForRemoval?: boolean; grid?: keyof WorkbenchGrids | Array<keyof WorkbenchGrids>}, options: {throwIfEmpty: (() => Error) | true; throwIfMulti: (() => Error) | true}): readonly [MView];\n  public views(findBy: {id?: string; partId?: string; peripheral?: boolean; segments?: UrlSegmentMatcher; navigationHint?: string | null; markedForRemoval?: boolean; grid?: keyof WorkbenchGrids | Array<keyof WorkbenchGrids>}, options: {throwIfEmpty: (() => Error) | true; throwIfMulti?: (() => Error) | true}): readonly [MView, ...MView[]];\n  public views(findBy?: {id?: string; partId?: string; peripheral?: boolean; segments?: UrlSegmentMatcher; navigationHint?: string | null; markedForRemoval?: boolean; grid?: keyof WorkbenchGrids | Array<keyof WorkbenchGrids>}, options?: {throwIfEmpty?: (() => Error) | true; throwIfMulti?: (() => Error) | true}): readonly MView[];\n  public views(findBy?: {id?: string; partId?: string; peripheral?: boolean; segments?: UrlSegmentMatcher; navigationHint?: string | null; markedForRemoval?: boolean; grid?: keyof WorkbenchGrids | Array<keyof WorkbenchGrids>}, options?: {throwIfEmpty?: (() => Error) | true; throwIfMulti?: (() => Error) | true}): readonly MView[] {\n    const views = this.parts({id: findBy?.partId, grid: findBy?.grid, peripheral: findBy?.peripheral})\n      .flatMap(part => part.views)\n      .filter(view => {\n        if (findBy?.id !== undefined && !matchesViewId(findBy.id, view)) {\n          return false;\n        }\n        if (findBy?.segments && !findBy.segments.matches(this.urlSegments({outlet: view.id}))) {\n          return false;\n        }\n        if (findBy?.navigationHint !== undefined && findBy.navigationHint !== (view.navigation?.hint ?? null)) {\n          return false;\n        }\n        if (findBy?.markedForRemoval !== undefined && findBy.markedForRemoval !== (view.markedForRemoval ?? false)) {\n          return false;\n        }\n        return true;\n      });\n\n    if (options?.throwIfEmpty && !views.length) {\n      throw typeof options.throwIfEmpty === 'function' ? options.throwIfEmpty() : Error(`[NullViewError] No matching view found: [${stringifyFilter(findBy ?? {})}]`);\n    }\n    if (options?.throwIfMulti && views.length > 1) {\n      throw typeof options.throwIfMulti === 'function' ? options.throwIfMulti() : Error(`[MultiViewError] Multiple views found: [${stringifyFilter(findBy ?? {})}]`);\n    }\n    return views;\n  }\n\n  /** @inheritDoc */\n  public addView(id: string, extras: {partId: string; position?: number | 'start' | 'end' | 'before-active-view' | 'after-active-view'; activateView?: boolean; activatePart?: boolean; cssClass?: string | string[]}): ɵWorkbenchLayout {\n    const workingCopy = this.workingCopy();\n    if (isViewId(id)) {\n      workingCopy.__addView({id}, extras);\n    }\n    else {\n      workingCopy.__addView({id: this.computeNextViewId(), alternativeId: id}, extras);\n    }\n    return workingCopy;\n  }\n\n  /** @inheritDoc */\n  public navigateView(id: string, commands: Commands, extras?: {hint?: string; relativeTo?: ActivatedRoute | null; data?: NavigationData; state?: NavigationState; cssClass?: string | string[]}): ɵWorkbenchLayout {\n    const workingCopy = this.workingCopy();\n    workingCopy.views({id}, {throwIfEmpty: true}).forEach(view => workingCopy.__navigateView(view, commands, extras));\n    return workingCopy;\n  }\n\n  /**\n   * @inheritDoc\n   *\n   * @param id - @inheritDoc\n   * @param options - Controls removal of the view.\n   * @param options.force - Specifies whether to force remove the view, bypassing `CanClose` guard.\n   */\n  public removeView(id: string, options?: {force?: boolean}): ɵWorkbenchLayout {\n    const workingCopy = this.workingCopy();\n    workingCopy.views({id}, {throwIfEmpty: true}).forEach(view => workingCopy.__removeView(view, {force: options?.force}));\n    return workingCopy;\n  }\n\n  /** @inheritDoc */\n  public moveView(id: string, targetPartId: string, options?: {position?: number | 'start' | 'end' | 'before-active-view' | 'after-active-view'; activateView?: boolean; activatePart?: boolean}): ɵWorkbenchLayout {\n    const workingCopy = this.workingCopy();\n    workingCopy.views({id}, {throwIfEmpty: true}).forEach(view => workingCopy.__moveView(view, targetPartId, options));\n    return workingCopy;\n  }\n\n  /** @inheritDoc */\n  public activateView(id: string, options?: {activatePart?: boolean}): ɵWorkbenchLayout {\n    const workingCopy = this.workingCopy();\n    workingCopy.views({id}, {throwIfEmpty: true}).forEach(view => workingCopy.__activateView(view, options));\n    return workingCopy;\n  }\n\n  /**\n   * Activates the preceding view if it exists, or the subsequent view otherwise.\n   *\n   * @param id - The id of the view to activate its adjacent view.\n   * @param options - Controls view activation.\n   * @param options.activatePart - Controls if to activate the part. Defaults to `false`.\n   * @return a copy of this layout with the adjacent view activated.\n   */\n  public activateAdjacentView(id: string, options?: {activatePart?: boolean}): ɵWorkbenchLayout {\n    const workingCopy = this.workingCopy();\n    workingCopy.views({id}, {throwIfEmpty: true}).forEach(view => workingCopy.__activateAdjacentView(view, options));\n    return workingCopy;\n  }\n\n  /**\n   * Renames a view.\n   *\n   * @param id - Identifies the view to rename.\n   * @param newViewId - The new identity of the view.\n   * @return a copy of this layout with the view renamed.\n   */\n  public renameView(id: ViewId, newViewId: ViewId): ɵWorkbenchLayout {\n    const workingCopy = this.workingCopy();\n    workingCopy.__renameView(workingCopy.view({viewId: id}), newViewId);\n    return workingCopy;\n  }\n\n  /**\n   * Renames an activity.\n   *\n   * @param id - Identifies the activity to rename.\n   * @param newActivityId - The new identity of the activity.\n   * @return a copy of this layout with the part renamed.\n   */\n  public renameActivity(id: ActivityId, newActivityId: ActivityId): ɵWorkbenchLayout {\n    const workingCopy = this.workingCopy();\n    workingCopy.__renameActivity(workingCopy.activity({id}), newActivityId);\n    return workingCopy;\n  }\n\n  /** @inheritDoc */\n  public modify(modifyFn: (layout: ɵWorkbenchLayout) => ɵWorkbenchLayout): ɵWorkbenchLayout {\n    return modifyFn(this.workingCopy());\n  }\n\n  /**\n   * Sets the split ratio for the two children of a {@link MTreeNode}.\n   *\n   * @param nodeId - The id of the node to set the split ratio for.\n   * @param ratio - The proportional size between the two children, expressed as closed interval [0,1].\n   *                Example: To give 1/3 of the space to the first child, set the ratio to `0.3`.\n   * @return a copy of this layout with the split ratio set.\n   */\n  public setTreeNodeSplitRatio(nodeId: string, ratio: number): ɵWorkbenchLayout {\n    const workingCopy = this.workingCopy();\n    workingCopy.__setTreeNodeSplitRatio(nodeId, ratio);\n    return workingCopy;\n  }\n\n  /**\n   * Serializes this layout into a URL-safe base64 string.\n   */\n  public serialize(flags?: LayoutSerializationFlags): SerializedWorkbenchLayout {\n    const workingCopy = this.workingCopy();\n\n    // Check if to assign each part a stable id based on its position in the grid.\n    if (flags?.assignStablePartIdentifier) {\n      workingCopy.__assignStablePartIdentifier();\n    }\n\n    // Check if to assign each activity a stable id based on its position in the activity layout.\n    if (flags?.assignStableActivityIdentifier) {\n      workingCopy.__assignStableActivityIdentifier();\n    }\n\n    return {\n      grids: this._workbenchLayoutSerializer.serializeGrids(workingCopy.grids, flags),\n      activityLayout: this._workbenchLayoutSerializer.serializeActivityLayout(workingCopy.activityLayout, flags),\n      outlets: (selector: RequireOne<{mainGrid: true; mainAreaGrid: true; activityGrids: true}>): string => {\n        return this._workbenchLayoutSerializer.serializeOutlets(workingCopy.outlets(selector));\n      },\n    };\n  }\n\n  /**\n   * Tests if the current layout is equal to another layout based on provided flags.\n   */\n  public equals(other: ɵWorkbenchLayout, flags?: LayoutSerializationFlags): boolean {\n    if (this === other) {\n      return true;\n    }\n\n    const layout1 = this.serialize(flags);\n    const layout2 = other.serialize(flags);\n\n    return (\n      Objects.isEqual(layout1.grids, layout2.grids) &&\n      layout1.activityLayout === layout2.activityLayout &&\n      layout1.outlets({mainGrid: true}) === layout2.outlets({mainGrid: true}) &&\n      layout1.outlets({mainAreaGrid: true}) === layout2.outlets({mainAreaGrid: true}) &&\n      layout1.outlets({activityGrids: true}) === layout2.outlets({activityGrids: true}) &&\n      this.perspectiveId === other.perspectiveId\n      // Navigational state is not tested for equality as it is set through view navigation, resulting in a new navigation id when modified.\n    );\n  }\n\n  /**\n   * Computes the next available view id.\n   */\n  public computeNextViewId(): ViewId {\n    return WorkbenchLayouts.computeNextViewId(this.views().map(view => view.id));\n  }\n\n  /**\n   * Note: This method name begins with underscores, indicating that it does not operate on a working copy, but modifies this layout instead.\n   */\n  private __addActivity(id: PartId, dockTo: DockingArea, extras: DockedPartExtras & {alternativeId?: string}): void {\n    if (this.hasPart(id)) {\n      throw Error(`[PartAddError] Part id must be unique. The layout already contains a part with the id '${id}'.`);\n    }\n\n    if (extras.ɵactivityId && this.hasActivity(extras.ɵactivityId)) {\n      throw Error(`[ActivityAddError] Activity id must be unique. The layout already contains an activity with the id '${extras.ɵactivityId}'.`);\n    }\n\n    const activityId = extras.ɵactivityId ?? WorkbenchLayouts.computeActivityId();\n    const title = extras.title === false ? undefined : extras.title ?? extras.label;\n    this._grids[activityId] = {\n      root: new MPart({\n        id,\n        alternativeId: extras.alternativeId,\n        title,\n        structural: true,\n        views: [],\n        cssClass: extras.cssClass ? Arrays.coerce(extras.cssClass) : undefined,\n      }),\n      activePartId: id,\n    };\n\n    const activityStack = this.activityStack({dockTo});\n    activityStack.activities.push({\n      id: activityId,\n      referencePartId: id,\n      icon: extras.icon,\n      label: extras.label,\n      tooltip: extras.tooltip ?? extras.label,\n      cssClass: extras.cssClass,\n    });\n  }\n\n  /**\n   * Note: This method name begins with underscores, indicating that it does not operate on a working copy, but modifies this layout instead.\n   */\n  private __removeActivity(activity: MActivity): void {\n    // Remove outlets and state of parts contained in this activity.\n    this.parts({grid: activity.id}).forEach(part => {\n      this._outlets.delete(part.id);\n      this._navigationStates.delete(part.id);\n    });\n    // Remove outlets and state of views contained in this activity.\n    this.views({grid: activity.id}).forEach(view => {\n      this._outlets.delete(view.id);\n      this._navigationStates.delete(view.id);\n    });\n\n    // Remove activity grid.\n    delete this._grids[activity.id]; // eslint-disable-line @typescript-eslint/no-dynamic-delete\n\n    // Remove activity from layout.\n    const activityStack = this.activityStack({activityId: activity.id});\n    Arrays.remove(activityStack.activities, activity);\n    if (activityStack.activeActivityId === activity.id) {\n      delete activityStack.activeActivityId;\n    }\n    if (activityStack.minimizedActivityId === activity.id) {\n      delete activityStack.minimizedActivityId;\n    }\n  }\n\n  /**\n   * Note: This method name begins with underscores, indicating that it does not operate on a working copy, but modifies this layout instead.\n   */\n  private __toggleActivity(id: ActivityId): void {\n    const stack = this.activityStack({activityId: id});\n    if (stack.activeActivityId === id) {\n      delete stack.activeActivityId;\n    }\n    else {\n      stack.activeActivityId = id;\n    }\n  }\n\n  /**\n   * Note: This method name begins with underscores, indicating that it does not operate on a working copy, but modifies this layout instead.\n   */\n  private __assignStableActivityIdentifier(): void {\n    this.activities().forEach((activity, index) => this.__renameActivity(activity, `${ACTIVITY_ID_PREFIX}__${index + 1}__`)); // surround with underscores to avoid collision with existing identifiers\n  }\n\n  /**\n   * Note: This method name begins with underscores, indicating that it does not operate on a working copy, but modifies this layout instead.\n   */\n  private __renameActivity(activity: MActivity, newActivityId: ActivityId): void {\n    if (this.hasActivity(newActivityId)) {\n      throw Error(`[ActivityRenameError] Activity id must be unique. The layout already contains an activity with the id '${newActivityId}'.`);\n    }\n\n    // Rename grid.\n    this._grids[newActivityId] = this.grids[activity.id]!;\n    delete this.grids[activity.id]; // eslint-disable-line @typescript-eslint/no-dynamic-delete\n\n    // Rename references in activity stack.\n    const stack = this.activityStack({activityId: activity.id});\n    if (stack.activeActivityId === activity.id) {\n      stack.activeActivityId = newActivityId;\n    }\n    if (stack.minimizedActivityId === activity.id) {\n      stack.minimizedActivityId = newActivityId;\n    }\n\n    // Rename activity.\n    activity.id = newActivityId;\n  }\n\n  /**\n   * Note: This method name begins with underscores, indicating that it does not operate on a working copy, but modifies this layout instead.\n   */\n  private __toggleMaximized(): void {\n    if (!this.hasActivities()) {\n      return;\n    }\n\n    const minimize = this.activities({active: true}).length > 0;\n    this.activityStacks().forEach(activityStack => {\n      if (minimize) {\n        activityStack.minimizedActivityId = activityStack.activeActivityId;\n        activityStack.activeActivityId = undefined;\n      }\n      else {\n        activityStack.activeActivityId = activityStack.minimizedActivityId;\n        activityStack.minimizedActivityId = undefined;\n      }\n    });\n  }\n\n  /**\n   * Note: This method name begins with underscores, indicating that it does not operate on a working copy, but modifies this layout instead.\n   */\n  private __setActivityPanelSize(panel: 'left' | 'right' | 'bottom', size: number): void {\n    if (size < 0) {\n      throw Error(`[LayoutModifyError] '${panel}' activity panel size must be 0 or greater, but was '${size}'.`);\n    }\n\n    switch (panel) {\n      case 'left':\n        this._activityLayout.panels.left.width = size;\n        break;\n      case 'right':\n        this._activityLayout.panels.right.width = size;\n        break;\n      case 'bottom':\n        this._activityLayout.panels.bottom.height = size;\n        break;\n    }\n  }\n\n  /**\n   * Note: This method name begins with underscores, indicating that it does not operate on a working copy, but modifies this layout instead.\n   */\n  private __setActivityPanelSplitRatio(panel: 'left' | 'right' | 'bottom', ratio: number): void {\n    if (ratio < 0 || ratio > 1) {\n      throw Error(`[LayoutModifyError] Ratio for '${panel}' activity panel must be in the closed interval [0,1], but was '${ratio}'.`);\n    }\n    this._activityLayout.panels[panel].ratio = ratio;\n  }\n\n  /**\n   * Note: This method name begins with underscores, indicating that it does not operate on a working copy, but modifies this layout instead.\n   */\n  private __addPart(id: PartId, relativeTo: ReferenceElement, extras?: PartExtras & {alternativeId?: string; structural?: boolean}): void {\n    if (this.hasPart(id)) {\n      throw Error(`[PartAddError] Part id must be unique. The layout already contains a part with the id '${id}'.`);\n    }\n\n    const newPart = new MPart({\n      id,\n      alternativeId: extras?.alternativeId,\n      title: extras?.title,\n      structural: extras?.structural ?? true,\n      views: [],\n      cssClass: extras?.cssClass ? Arrays.coerce(extras.cssClass) : undefined,\n    });\n\n    // Find the reference element, if specified, or use the layout root as reference otherwise.\n    const referenceElement = relativeTo.relativeTo ? this.findTreeElement({id: relativeTo.relativeTo}) : this.grids.main.root;\n    const addBefore = relativeTo.align === 'left' || relativeTo.align === 'top';\n    const ratio = relativeTo.ratio ?? .5;\n\n    // Create a new tree node.\n    const newTreeNode: MTreeNode = new MTreeNode({\n      id: UID.randomUID(),\n      child1: addBefore ? newPart : referenceElement,\n      child2: addBefore ? referenceElement : newPart,\n      direction: relativeTo.align === 'left' || relativeTo.align === 'right' ? 'row' : 'column',\n      ratio: addBefore ? ratio : 1 - ratio,\n      parent: referenceElement.parent,\n    });\n\n    // Add the tree node to the layout.\n    if (!referenceElement.parent) {\n      const {grid} = this.grid(referenceElement.type === 'MPart' ? {partId: referenceElement.id} : {nodeId: referenceElement.id});\n      grid.root = newTreeNode; // top-level node\n    }\n    else if (referenceElement.parent.child1 === referenceElement) {\n      referenceElement.parent.child1 = newTreeNode;\n    }\n    else {\n      referenceElement.parent.child2 = newTreeNode;\n    }\n    referenceElement.parent = newTreeNode;\n    newPart.parent = newTreeNode;\n\n    // Activate the part.\n    if (extras?.activate) {\n      this.__activatePart(newPart);\n    }\n  }\n\n  /**\n   * Note: This method name begins with underscores, indicating that it does not operate on a working copy, but modifies this layout instead.\n   */\n  private __removePart(part: MPart): void {\n    // Remove activity if this part is the reference part of the activity.\n    const activity = this.activity({partId: part.id}, {orElse: null});\n    if (activity?.referencePartId === part.id) {\n      this.__removeActivity(activity);\n      return;\n    }\n\n    // The last part is never removed.\n    const {gridName, grid} = this.grid({partId: part.id});\n    const parts = this.parts({grid: gridName});\n    if (parts.length === 1) {\n      return;\n    }\n\n    // Remove the part.\n    const parentPart = part.parent!;\n    const siblingElement = (parentPart.child1 === part ? parentPart.child2 : parentPart.child1);\n    if (!parentPart.parent) {\n      grid.root = siblingElement;\n      grid.root.parent = undefined;\n    }\n    else if (parentPart.parent.child1 === part.parent) {\n      parentPart.parent.child1 = siblingElement;\n    }\n    else {\n      parentPart.parent.child2 = siblingElement;\n    }\n\n    // Remove the part outlet.\n    this._outlets.delete(part.id);\n\n    // Remove navigation state.\n    this._navigationStates.delete(part.id);\n\n    // Remove outlets and state of views contained in the part.\n    part.views.forEach(view => {\n      this._outlets.delete(view.id);\n      this._navigationStates.delete(view.id);\n    });\n\n    // If the removed part was the active part, make the last used part the active part.\n    if (grid.activePartId === part.id) {\n      const [activePart] = parts\n        .filter(mPart => mPart.id !== part.id)\n        .sort((part1, part2) => {\n          const activationInstantPart1 = this._partActivationInstantProvider.getActivationInstant(part1.id);\n          const activationInstantPart2 = this._partActivationInstantProvider.getActivationInstant(part2.id);\n          return activationInstantPart2 - activationInstantPart1;\n        });\n      grid.activePartId = activePart!.id;\n    }\n  }\n\n  /**\n   * Note: This method name begins with underscores, indicating that it does not operate on a working copy, but modifies this layout instead.\n   */\n  private __navigatePart(part: MPart, commands: Commands, extras?: {hint?: string; relativeTo?: ActivatedRoute | null; data?: NavigationData; state?: NavigationState; cssClass?: string | string[]}): void {\n    if (!commands.length && !extras?.hint && !extras?.relativeTo) {\n      throw Error('[NavigateError] Commands, relativeTo or hint must be set.');\n    }\n\n    const urlSegments = runInInjectionContext(this._injector, () => Routing.commandsToSegments(commands, {relativeTo: extras?.relativeTo}));\n    if (urlSegments.length) {\n      this._outlets.set(part.id, urlSegments);\n    }\n    else {\n      this._outlets.delete(part.id);\n    }\n\n    if (extras?.state && Objects.keys(extras.state).length) {\n      this._navigationStates.set(part.id, extras.state);\n    }\n    else {\n      this._navigationStates.delete(part.id);\n    }\n\n    part.navigation = Objects.withoutUndefinedEntries({\n      id: UID.randomUID(),\n      hint: extras?.hint,\n      data: extras?.data,\n      cssClass: extras?.cssClass ? Arrays.coerce(extras.cssClass) : undefined,\n    } satisfies MPart['navigation']);\n  }\n\n  /**\n   * Note: This method name begins with underscores, indicating that it does not operate on a working copy, but modifies this layout instead.\n   */\n  private __renamePart(part: MPart, newPartId: PartId): void {\n    if (this.hasPart(newPartId)) {\n      throw Error(`[PartRenameError] Part id must be unique. The layout already contains a part with the id '${newPartId}'.`);\n    }\n\n    if (this._outlets.has(part.id)) {\n      this._outlets.set(newPartId, this._outlets.get(part.id)!);\n      this._outlets.delete(part.id);\n    }\n    if (this._navigationStates.has(part.id)) {\n      this._navigationStates.set(newPartId, this._navigationStates.get(part.id)!);\n      this._navigationStates.delete(part.id);\n    }\n    const activity = this.activity({partId: part.id}, {orElse: null});\n    if (activity?.referencePartId === part.id) {\n      activity.referencePartId = newPartId;\n    }\n    const {grid} = this.grid({partId: part.id});\n    if (grid.activePartId === part.id) {\n      grid.activePartId = newPartId;\n    }\n\n    part.id = newPartId;\n  }\n\n  /**\n   * Note: This method name begins with underscores, indicating that it does not operate on a working copy, but modifies this layout instead.\n   */\n  private __assignStablePartIdentifier(): void {\n    this.parts().forEach((part, index) => this.__renamePart(part, `${PART_ID_PREFIX}__${index + 1}__`)); // surround with underscores to avoid collision with existing identifiers\n  }\n\n  /**\n   * Note: This method name begins with underscores, indicating that it does not operate on a working copy, but modifies this layout instead.\n   */\n  private __addView(view: MView, options: {partId: string; position?: number | 'start' | 'end' | 'before-active-view' | 'after-active-view'; activateView?: boolean; activatePart?: boolean; cssClass?: string | string[]}): void {\n    if (this.hasView(view.id)) {\n      throw Error(`[ViewAddError] View id must be unique. The layout already contains a view with the id '${view.id}'.`);\n    }\n    const [part] = this.parts({id: options.partId}, {\n      throwIfEmpty: () => Error(`[ViewAddError] Cannot add view. No part found with id '${options.partId}'.`),\n      throwIfMulti: () => Error(`[ViewAddError] Cannot add view to multiple parts. Multiple parts found with id '${options.partId}'.`),\n    });\n\n    const position = coerceViewPosition(options.position ?? 'end', part);\n    part.views.splice(position, 0, view);\n\n    if (options.activateView) {\n      this.__activateView(view);\n    }\n    if (options.activatePart) {\n      this.__activatePart(part);\n    }\n    if (options.cssClass) {\n      view.cssClass = Arrays.coerce(options.cssClass);\n    }\n  }\n\n  /**\n   * Note: This method name begins with underscores, indicating that it does not operate on a working copy, but modifies this layout instead.\n   */\n  private __navigateView(view: MView, commands: Commands, extras?: {hint?: string; relativeTo?: ActivatedRoute | null; data?: NavigationData; state?: NavigationState; cssClass?: string | string[]}): void {\n    if (!commands.length && !extras?.hint && !extras?.relativeTo) {\n      throw Error('[NavigateError] Commands, relativeTo or hint must be set.');\n    }\n\n    const urlSegments = runInInjectionContext(this._injector, () => Routing.commandsToSegments(commands, {relativeTo: extras?.relativeTo}));\n    if (urlSegments.length) {\n      this._outlets.set(view.id, urlSegments);\n    }\n    else {\n      this._outlets.delete(view.id);\n    }\n\n    if (extras?.state && Objects.keys(extras.state).length) {\n      this._navigationStates.set(view.id, extras.state);\n    }\n    else {\n      this._navigationStates.delete(view.id);\n    }\n\n    view.navigation = Objects.withoutUndefinedEntries({\n      id: UID.randomUID(),\n      hint: extras?.hint,\n      data: extras?.data,\n      cssClass: extras?.cssClass ? Arrays.coerce(extras.cssClass) : undefined,\n    } satisfies MView['navigation']);\n  }\n\n  /**\n   * Note: This method name begins with underscores, indicating that it does not operate on a working copy, but modifies this layout instead.\n   */\n  private __moveView(view: MView, targetPartId: string, options?: {position?: number | 'start' | 'end' | 'before-active-view' | 'after-active-view'; activateView?: boolean; activatePart?: boolean}): void {\n    const sourcePart = this.part({viewId: view.id});\n    const [targetPart] = this.parts({id: targetPartId}, {\n      throwIfEmpty: () => Error(`[ViewMoveError] Cannot move view. No part found with id '${targetPartId}'.`),\n      throwIfMulti: () => Error(`[ViewMoveError] Cannot move view. Multiple parts found with id '${targetPartId}'.`),\n    });\n\n    // Move the view.\n    if (sourcePart !== targetPart) {\n      this.__removeView(view, {removeOutlet: false, removeNavigationState: false, force: true});\n      this.__addView(view, {partId: targetPartId, position: options?.position});\n    }\n    else if (options?.position !== undefined) {\n      const position = coerceViewPosition(options.position, targetPart);\n      const referenceView: MView | undefined = sourcePart.views.at(position);\n      sourcePart.views.splice(sourcePart.views.indexOf(view), 1);\n      sourcePart.views.splice(referenceView ? sourcePart.views.indexOf(referenceView) : sourcePart.views.length, 0, view);\n    }\n\n    // Activate view and part.\n    if (options?.activatePart) {\n      this.__activatePart(targetPart);\n    }\n    if (options?.activateView) {\n      this.__activateView(view);\n    }\n  }\n\n  /**\n   * Note: This method name begins with underscores, indicating that it does not operate on a working copy, but modifies this layout instead.\n   */\n  private __removeView(view: MView, options?: {removeOutlet?: false; removeNavigationState?: false; force?: boolean}): void {\n    if (!options?.force) {\n      view.markedForRemoval = true;\n      return;\n    }\n\n    const part = this.part({viewId: view.id});\n\n    // Remove view.\n    part.views.splice(part.views.indexOf(view), 1);\n\n    // Remove outlet.\n    if (options.removeOutlet ?? true) {\n      this._outlets.delete(view.id);\n    }\n\n    // Remove navigation state.\n    if (options.removeNavigationState ?? true) {\n      this._navigationStates.delete(view.id);\n    }\n\n    // Activate the last used view if this view was active.\n    if (part.activeViewId === view.id) {\n      const [lastUsedViewId] = part.views\n        .map(view => view.id)\n        .sort((viewId1, viewId2) => {\n          const activationInstantView1 = this._viewActivationInstantProvider.getActivationInstant(viewId1);\n          const activationInstantView2 = this._viewActivationInstantProvider.getActivationInstant(viewId2);\n          return activationInstantView2 - activationInstantView1;\n        });\n      part.activeViewId = lastUsedViewId;\n    }\n\n    // Remove the part when removing its last view, but only if the part has no navigation and is not a structural part.\n    if (!part.views.length && !part.navigation && !part.structural) {\n      this.__removePart(part);\n    }\n\n    // Close activity when removing its last view, but only if having no navigated parts.\n    const activity = this.activity({partId: part.id}, {orElse: null});\n    if (activity && !this.views({grid: activity.id}).length && !this.parts({grid: activity.id}).some(part => part.navigation)) {\n      const stack = this.activityStack({activityId: activity.id});\n      delete stack.activeActivityId;\n    }\n  }\n\n  /**\n   * Note: This method name begins with underscores, indicating that it does not operate on a working copy, but modifies this layout instead.\n   */\n  private __activateView(view: MView, options?: {activatePart?: boolean}): void {\n    // Activate the view.\n    const part = this.part({viewId: view.id});\n    part.activeViewId = view.id;\n\n    // Activate the part.\n    if (options?.activatePart) {\n      this.__activatePart(part);\n    }\n  }\n\n  /**\n   * Note: This method name begins with underscores, indicating that it does not operate on a working copy, but modifies this layout instead.\n   */\n  private __activateAdjacentView(view: MView, options?: {activatePart?: boolean}): void {\n    const part = this.part({viewId: view.id});\n    const viewIndex = part.views.indexOf(view);\n    part.activeViewId = ((part.views[viewIndex - 1] ?? part.views[viewIndex + 1]) as MView | undefined)?.id; // is `undefined` if it is the last view of the part\n\n    // Activate the part.\n    if (options?.activatePart) {\n      this.__activatePart(part);\n    }\n  }\n\n  /**\n   * Note: This method name begins with underscores, indicating that it does not operate on a working copy, but modifies this layout instead.\n   */\n  private __setTreeNodeSplitRatio(nodeId: string, ratio: number): void {\n    if (ratio < 0 || ratio > 1) {\n      throw Error(`[LayoutModifyError] Ratio for node '${nodeId}' must be in the closed interval [0,1], but was '${ratio}'.`);\n    }\n    this.findTreeElement<MTreeNode>({id: nodeId}).ratio = ratio;\n  }\n\n  /**\n   * Note: This method name begins with underscores, indicating that it does not operate on a working copy, but modifies this layout instead.\n   */\n  private __activatePart(part: MPart): void {\n    // Activate part.\n    this.grid({partId: part.id}).grid.activePartId = part.id;\n\n    // Activate activity.\n    const activity = this.activity({partId: part.id}, {orElse: null});\n    if (activity) {\n      this.activityStack({activityId: activity.id}).activeActivityId = activity.id;\n    }\n  }\n\n  /**\n   * Note: This method name begins with underscores, indicating that it does not operate on a working copy, but modifies this layout instead.\n   */\n  private __renameView(view: MView, newViewId: ViewId): void {\n    if (this.hasView(newViewId)) {\n      throw Error(`[ViewRenameError] View id must be unique. The layout already contains a view with the id '${newViewId}'.`);\n    }\n\n    const part = this.part({viewId: view.id});\n\n    if (this._outlets.has(view.id)) {\n      this._outlets.set(newViewId, this._outlets.get(view.id)!);\n      this._outlets.delete(view.id);\n    }\n    if (this._navigationStates.has(view.id)) {\n      this._navigationStates.set(newViewId, this._navigationStates.get(view.id)!);\n      this._navigationStates.delete(view.id);\n    }\n\n    if (part.activeViewId === view.id) {\n      part.activeViewId = newViewId;\n    }\n\n    view.id = newViewId;\n  }\n\n  /**\n   * Finds a grid based on the specified filter. If not found, by default, throws an error unless setting the `orElseNull` option.\n   *\n   * @param findBy - Defines the search scope.\n   * @param findBy.partId - Searches for a grid that contains the specified part.\n   * @param findBy.viewId - Searches for a grid that contains the specified view.\n   * @param findBy.nodeId - Searches for a grid that contains the specified node.\n   * @param findBy.grid - Searches for specified grid.\n   * @param options - Controls the search.\n   * @param options.orElse - Controls to return `null` instead of throwing an error if no grid is found.\n   * @return grid matching the filter criteria.\n   */\n  public grid(findBy: RequireOne<{partId: PartId; viewId: ViewId; nodeId: string; grid: MPartGrid}>): {gridName: keyof WorkbenchGrids; grid: MPartGrid};\n  public grid(findBy: RequireOne<{partId: PartId; viewId: ViewId; nodeId: string; grid: MPartGrid}>, options: {orElse: null}): {gridName: keyof WorkbenchGrids; grid: MPartGrid} | null;\n  public grid(findBy: RequireOne<{partId: PartId; viewId: ViewId; nodeId: string; grid: MPartGrid}>, options?: {orElse: null}): {gridName: keyof WorkbenchGrids; grid: MPartGrid} | null {\n    const gridName = Objects.keys(this._grids).find(gridName => {\n      if (findBy.grid && this._grids[gridName] !== findBy.grid) {\n        return false;\n      }\n\n      return this.findTreeElements((element: MTreeNode | MPart): element is MPart | MTreeNode => {\n        if (findBy.partId && (element.type !== 'MPart' || element.id !== findBy.partId)) {\n          return false;\n        }\n        if (findBy.nodeId && (element.type !== 'MTreeNode' || element.id !== findBy.nodeId)) {\n          return false;\n        }\n        if (findBy.viewId && (element.type !== 'MPart' || !element.views.some(view => matchesViewId(findBy.viewId!, view)))) {\n          return false;\n        }\n        return true;\n      }, {findFirst: true, grid: gridName}).length > 0;\n    });\n\n    if (!gridName && !options) {\n      throw Error(`[NullGridError] No matching grid found: [${stringifyFilter(findBy)}]`);\n    }\n\n    return gridName ? {gridName, grid: this._grids[gridName]!} : null;\n  }\n\n  /**\n   * Computes if the specified part is located in the peripheral area.\n   */\n  public isPeripheralPart(partId: PartId): boolean {\n    if (partId === MAIN_AREA) {\n      return false;\n    }\n    else if (this.hasActivities()) {\n      return this.activity({partId}, {orElse: null}) !== null;\n    }\n    else {\n      return this.hasPart(partId, {grid: 'main'}) && !!this.grids.mainArea;\n    }\n  }\n\n  /**\n   * Traverses the tree to find an element that matches the given predicate.\n   *\n   * @param findBy - Defines the search scope.\n   * @param findBy.id - Searches for an element with the specified id.\n   * @return Element matching the filter criteria.\n   */\n  private findTreeElement<T extends MTreeNode | MPart>(findBy: {id: string}): T {\n    const [element] = this.findTreeElements((element: MTreeNode | MPart): element is T => {\n      if (element instanceof MPart) {\n        return matchesPartId(findBy.id, element);\n      }\n      return element.id === findBy.id;\n    }, {findFirst: true});\n\n    if (!element) {\n      throw Error(`[NullElementError] No element found with id '${findBy.id}'.`);\n    }\n    return element;\n  }\n\n  /**\n   * Traverses the tree to find elements that match the given predicate.\n   *\n   * @param predicateFn - Predicate function to match.\n   * @param options - Defines search scope and options.\n   * @param options.findFirst - If specified, stops traversing on first match. If not set, defaults to `false`.\n   * @param options.grid - Searches for an element contained in the specified grid.\n   * @return Elements matching the filter criteria.\n   */\n  private findTreeElements<T extends MTreeNode | MPart>(predicateFn: (element: MTreeNode | MPart) => element is T, options?: {findFirst?: boolean; grid?: keyof WorkbenchGrids | Array<keyof WorkbenchGrids>}): T[] {\n    const result: T[] = [];\n    const gridFilter = options?.grid ? new Set<keyof WorkbenchGrids>(Arrays.coerce(options.grid)) : undefined;\n    for (const [gridName, grid] of Objects.entries(this._grids)) {\n      if (!grid) {\n        continue;\n      }\n      if (gridFilter && !gridFilter.has(gridName)) {\n        continue;\n      }\n      if (!visitGridElements(grid.root)) {\n        break;\n      }\n    }\n\n    return result;\n\n    function visitGridElements(element: MTreeNode | MPart): boolean {\n      if (predicateFn(element)) {\n        result.push(element);\n        if (options?.findFirst) {\n          return false; // stop visiting other elements\n        }\n      }\n\n      if (element instanceof MTreeNode) {\n        return visitGridElements(element.child1) && visitGridElements(element.child2);\n      }\n      return true;\n    }\n  }\n\n  /**\n   * Asserts each activity to have a grid.\n   */\n  private assertActivities(): void {\n    const mActivities = this.activityStacks().flatMap(stack => stack.activities);\n\n    // Assert each MActivity to have a MPartGrid.\n    mActivities.forEach(activity => {\n      if (!this._grids[activity.id]) {\n        throw Error(`[NullGridError] Missing MPartGrid for activity ${activity.id}.`);\n      }\n    });\n\n    // Assert each activity MPartGrid to have a MActivity.\n    Objects.keys(WorkbenchLayouts.pickActivityGrids(this._grids)).forEach(activityId => {\n      if (!mActivities.some(activity => activity.id === activityId)) {\n        throw Error(`[NullActivityError] Missing MActivity ${activityId}.`);\n      }\n    });\n\n    // Assert reference part to be contained in the grid.\n    mActivities.forEach(activity => {\n      if (!this.part({partId: activity.referencePartId, grid: activity.id}, {orElse: null})) {\n        throw Error(`[NullReferencePartError] Missing reference part for activity ${activity.id}.`);\n      }\n    });\n  }\n\n  /**\n   * Creates a copy of this layout.\n   */\n  private workingCopy(): ɵWorkbenchLayout {\n    return runInInjectionContext(this._injector, () => new ɵWorkbenchLayout({\n      grids: this._workbenchLayoutSerializer.serializeGrids(this._grids),\n      activityLayout: this._workbenchLayoutSerializer.serializeActivityLayout(this._activityLayout),\n      perspectiveId: this.perspectiveId,\n      outlets: Object.fromEntries(this._outlets),\n      navigationStates: Object.fromEntries(this._navigationStates),\n    }));\n  }\n}\n\n/**\n * Creates the layout to dock parts to well-defined areas in the workbench layout.\n */\nfunction createDefaultActivityLayout(): MActivityLayout {\n  const documentRoot = inject(DOCUMENT).documentElement;\n  return {\n    toolbars: {\n      leftTop: {activities: []},\n      leftBottom: {activities: []},\n      rightTop: {activities: []},\n      rightBottom: {activities: []},\n      bottomLeft: {activities: []},\n      bottomRight: {activities: []},\n    },\n    panels: {\n      left: {\n        width: Number.parseInt(readCssVariable(documentRoot, '--sci-workbench-layout-panel-left-width', `${ACTIVITY_PANEL_WIDTH}px`)),\n        ratio: ACTIVITY_PANEL_RATIO,\n      },\n      right: {\n        width: Number.parseInt(readCssVariable(documentRoot, '--sci-workbench-layout-panel-right-width', `${ACTIVITY_PANEL_WIDTH}px`)),\n        ratio: ACTIVITY_PANEL_RATIO,\n      },\n      bottom: {\n        height: Number.parseInt(readCssVariable(documentRoot, '--sci-workbench-layout-panel-bottom-height', `${ACTIVITY_PANEL_HEIGHT}px`)),\n        ratio: ACTIVITY_PANEL_RATIO,\n      },\n    },\n  };\n}\n\n/**\n * Creates the default main grid with a main area.\n */\nfunction createDefaultMainGrid(): MPartGrid {\n  return {\n    root: new MPart({id: MAIN_AREA, alternativeId: MAIN_AREA_ALTERNATIVE_ID, structural: true, views: []}),\n    activePartId: MAIN_AREA,\n  };\n}\n\n/**\n * Creates the default main area grid with an initial part.\n *\n * The DI token {@link MAIN_AREA_INITIAL_PART_ID} is used to assign the initial part its identity.\n */\nfunction createDefaultMainAreaGrid(): MPartGrid {\n  return {\n    root: new MPart({id: inject(MAIN_AREA_INITIAL_PART_ID), structural: false, views: []}),\n    activePartId: inject(MAIN_AREA_INITIAL_PART_ID),\n  };\n}\n\n/**\n * Coerces {@link MActivityLayout}, applying necessary migrations if the serialized layout is outdated.\n */\nfunction coerceMActivityLayout(layout: string | MActivityLayout | undefined, options: {default: () => MActivityLayout}): MActivityLayout {\n  if (!layout) {\n    return options.default();\n  }\n  if (typeof layout === 'object') {\n    return layout;\n  }\n\n  try {\n    return inject(WorkbenchLayoutSerializer).deserializeActivityLayout(layout);\n  }\n  catch (error) {\n    inject(Logger).error('[WorkbenchSerializeError] Failed to deserialize \"MActivityLayout\". Please clear your browser storage and reload the application.', error);\n    return options.default();\n  }\n}\n\n/**\n * Coerces {@link MPartGrid}, applying necessary migrations if the serialized grid is outdated.\n */\nfunction coerceMPartGrid(grid: string | MPartGrid | undefined): ɵMPartGrid | undefined;\nfunction coerceMPartGrid(grid: string | MPartGrid | undefined, options: {default: () => MPartGrid}): ɵMPartGrid;\nfunction coerceMPartGrid(grid: string | MPartGrid | undefined, options?: {default: () => MPartGrid}): ɵMPartGrid | undefined {\n  if (!grid) {\n    return options?.default();\n  }\n  if (typeof grid === 'object') {\n    return grid;\n  }\n\n  try {\n    return inject(WorkbenchLayoutSerializer).deserializeGrid(grid);\n  }\n  catch (error) {\n    inject(Logger).error('[WorkbenchSerializeError] Failed to deserialize \"MPartGrid\". Please clear your browser storage and reload the application.', error);\n    return options?.default ? {...options.default(), migrated: true} : undefined;\n  }\n}\n\n/**\n * Coerces {@link Outlets}, applying necessary migrations if the serialized outlets are outdated.\n */\nfunction coerceOutlets(outlets: string | Outlets | undefined): Outlets {\n  if (!outlets) {\n    return {};\n  }\n\n  if (typeof outlets === 'object') {\n    return outlets;\n  }\n\n  try {\n    return inject(WorkbenchLayoutSerializer).deserializeOutlets(outlets);\n  }\n  catch (error) {\n    inject(Logger).error('[WorkbenchSerializeError] Failed to deserialize \"Outlets\". Please clear your browser storage and reload the application.', error);\n    return {};\n  }\n}\n\n/**\n * Coerces a view position, returning the given position if it is a number, or computes it from the given literal otherwise.\n */\nfunction coerceViewPosition(position: number | 'start' | 'end' | 'before-active-view' | 'after-active-view', part: MPart): number {\n  switch (position) {\n    case 'start': {\n      return 0;\n    }\n    case 'end': {\n      return part.views.length;\n    }\n    case 'before-active-view': {\n      const activeViewIndex = part.views.findIndex(view => view.id === part.activeViewId);\n      return (activeViewIndex > -1 ? activeViewIndex : part.views.length);\n    }\n    case 'after-active-view': {\n      const activeViewIndex = part.views.findIndex(view => view.id === part.activeViewId);\n      return (activeViewIndex > -1 ? activeViewIndex + 1 : part.views.length);\n    }\n    default: {\n      return position;\n    }\n  }\n}\n\n/**\n * Describes how to lay out a part relative to another part or node.\n */\nexport interface ReferenceElement extends ReferencePart {\n  /**\n   * Specifies the part or node which to use as the reference element to lay out the part.\n   * If not set, the part will be aligned relative to the root of the workbench layout.\n   */\n  relativeTo?: string;\n}\n\n/**\n * DI token to control the identity of the initial part in the main area.\n *\n * The initial part is automatically created by the workbench if the main area has no part, but it has no\n * special meaning to the workbench and can be removed by the user. If not set, a UUID is assigned.\n *\n * Overwrite this DI token in tests to control the identity of the initial part.\n *\n * ```ts\n * TestBed.overrideProvider(MAIN_AREA_INITIAL_PART_ID, {useValue: 'part.initial'})\n * ```\n *\n * @docs-private Not public API, intended for internal use only.\n */\nexport const MAIN_AREA_INITIAL_PART_ID = new InjectionToken<PartId>('MAIN_AREA_INITIAL_PART_ID', {\n  providedIn: 'root',\n  factory: () => WorkbenchLayouts.computePartId(),\n});\n\n/**\n * Provides the instant when a part was last activated.\n *\n * Overwrite DI token in tests to control part activation instants.\n * ```\n * TestBed.overrideProvider(PartActivationInstantProvider, {useValue: ...});\n * ```\n */\n@Injectable({providedIn: 'root'})\nexport class PartActivationInstantProvider {\n\n  private _partRegistry = inject(WORKBENCH_PART_REGISTRY);\n\n  /**\n   * Returns the instant when the specified part was last activated.\n   */\n  public getActivationInstant(partId: PartId): number {\n    return this._partRegistry.get(partId, {orElse: null})?.activationInstant ?? 0;\n  }\n}\n\n/**\n * Provides the instant when a view was last activated.\n *\n * Overwrite DI token in tests to control view activation instants.\n * ```\n * TestBed.overrideProvider(ViewActivationInstantProvider, {useValue: ...});\n * ```\n */\n@Injectable({providedIn: 'root'})\nexport class ViewActivationInstantProvider {\n\n  private _viewRegistry = inject(WORKBENCH_VIEW_REGISTRY);\n\n  /**\n   * Returns the instant when the specified view was last activated.\n   */\n  public getActivationInstant(viewId: ViewId): number {\n    return this._viewRegistry.get(viewId, {orElse: null})?.activationInstant ?? 0;\n  }\n}\n\n/**\n * Matches given view by its primary or alternative id, depending on the type of the passed id.\n */\nfunction matchesViewId(id: ViewId | string, view: MView): boolean {\n  if (isViewId(id)) {\n    return view.id === id;\n  }\n  else {\n    return view.alternativeId === id;\n  }\n}\n\n/**\n * Matches given part by its primary or alternative id, depending on the type of the passed id.\n */\nfunction matchesPartId(id: PartId | string, part: MPart): boolean {\n  if (isPartId(id)) {\n    return part.id === id;\n  }\n  else {\n    return part.alternativeId === id;\n  }\n}\n\n/**\n * Tests if the given id matches the format of an activity identifier.\n */\nexport function isActivityId(activityId: string | undefined | null): activityId is ActivityId {\n  return activityId?.startsWith(ACTIVITY_ID_PREFIX) ?? false;\n}\n\n/**\n * Tests if the given id matches the format of a part identifier.\n */\nexport function isPartId(partId: string | undefined | null): partId is PartId {\n  return Routing.isPartOutlet(partId);\n}\n\n/**\n * Tests if the given id matches the format of a view identifier.\n */\nfunction isViewId(viewId: string | undefined | null): viewId is ViewId {\n  return Routing.isViewOutlet(viewId);\n}\n\n/**\n * Stringifies the given filter to be used in error messages.\n */\nfunction stringifyFilter(filter: {[property: string]: unknown}): string {\n  return Object.entries(filter).map(([key, value]) => `${key}=${value}`).join(', ');\n}\n\n/**\n * Serialized artifacts of the workbench layout.\n */\nexport interface SerializedWorkbenchLayout {\n  grids: WorkbenchGrids<string>;\n  activityLayout: string;\n  outlets: (selector: RequireOne<{mainGrid: true; mainAreaGrid: true; activityGrids: true}>) => string;\n}\n\n/**\n * Configuration for constructing the workbench layout.\n *\n * Grids and the activity layout can be passed in serialized or deserialized form.\n * If they are not provided, default layouts will be created.\n *\n * The following rules apply:\n * - If the main grid is not provided, it defaults to a layout with a main area.\n * - If the grid for the main area is not provided, but the main grid has a main area part,\n *   it defaults to a main area grid with an initial part. The DI token {@link MAIN_AREA_INITIAL_PART_ID}\n *   can be used to assign the initial part its identity.\n */\nexport interface WorkbenchLayoutConstructConfig {\n  grids?: Partial<WorkbenchGrids<MPartGrid | string>>;\n  activityLayout?: MActivityLayout | string;\n  perspectiveId?: string;\n  outlets?: Outlets | string;\n  navigationStates?: NavigationStates;\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 {MPart, MPartGrid, MTreeNode, WorkbenchGrids} from './workbench-grid.model';\nimport {MAIN_AREA} from './workbench-layout';\nimport {ViewId} from '../view/workbench-view.model';\nimport {ACTIVITY_ID_PREFIX, PART_ID_PREFIX, VIEW_ID_PREFIX} from '../workbench.constants';\nimport {UID} from '../common/uid.util';\nimport {PartId} from '../part/workbench-part.model';\nimport {ActivityId} from '../activity/workbench-activity.model';\nimport {isActivityId} from './ɵworkbench-layout';\n\n/**\n * Provides helper functions for operating on a workbench layout.\n */\nexport const WorkbenchLayouts = {\n\n  /**\n   * Recursively collects all parts of a given element and its descendants.\n   */\n  collectParts: (element: MPart | MTreeNode): MPart[] => {\n    const parts = new Array<MPart>();\n    if (element instanceof MPart) {\n      parts.push(element);\n    }\n    else {\n      parts.push(...WorkbenchLayouts.collectParts(element.child1));\n      parts.push(...WorkbenchLayouts.collectParts(element.child2));\n    }\n    return parts;\n  },\n\n  /**\n   * Tests if the given {@link MTreeNode} or {@link MPart} is visible.\n   *\n   * - A part is considered visible if it is the main area part or has at least one view.\n   * - A node is considered visible if it has at least one visible part in its child hierarchy.\n   */\n  isGridElementVisible: (element: MTreeNode | MPart): boolean => {\n    if (element instanceof MPart) {\n      return element.id === MAIN_AREA || element.views.length > 0 || !!element.navigation;\n    }\n    return WorkbenchLayouts.isGridElementVisible(element.child1) || WorkbenchLayouts.isGridElementVisible(element.child2);\n  },\n\n  /**\n   * Tests if the given {@link MPartGrid} is empty.\n   *\n   * An empty grid has a single, non-structural part with no views and no navigation.\n   */\n  isGridEmpty: (grid: MPartGrid | undefined): boolean => {\n    return !grid || (grid.root instanceof MPart && !grid.root.views.length && !grid.root.navigation && !grid.root.structural);\n  },\n\n  /**\n   * Computes the next available view id.\n   */\n  computeNextViewId: (viewIds: Iterable<ViewId>): ViewId => {\n    const ids = Array.from(viewIds)\n      .map(viewId => Number(viewId.substring(VIEW_ID_PREFIX.length)))\n      .reduce((set, id) => set.add(id), new Set<number>());\n\n    for (let i = 1; i <= ids.size; i++) {\n      if (!ids.has(i)) {\n        return `${VIEW_ID_PREFIX}${i}`;\n      }\n    }\n    return `${VIEW_ID_PREFIX}${ids.size + 1}`;\n  },\n\n  /**\n   * Computes a random part id.\n   */\n  computePartId: (): PartId => `${PART_ID_PREFIX}${UID.randomUID()}`,\n\n  /**\n   * Computes a random activity id.\n   */\n  computeActivityId: (): ActivityId => `${ACTIVITY_ID_PREFIX}${UID.randomUID()}`,\n\n  /**\n   * Picks grids related to activities from the given grids, optionally filtering and/or transforming them.\n   *\n   * If the transform function returns `undefined`, the grid is excluded.\n   */\n  pickActivityGrids: pickActivityGrids,\n} as const;\n\nfunction pickActivityGrids<T>(grids: Partial<WorkbenchGrids<T>> | undefined): {[activityId: ActivityId]: T};\nfunction pickActivityGrids<T, P>(grids: Partial<WorkbenchGrids<T>> | undefined, transformFn: (activityGrid: T) => P | undefined): {[activityId: ActivityId]: P};\nfunction pickActivityGrids<T, P = T>(grids: Partial<WorkbenchGrids<T>> | undefined, transformFn?: (activityGrid: T) => P | undefined): {[activityId: ActivityId]: P | T} {\n  return Object.fromEntries(Object.entries(grids ?? {}).reduce((acc, [gridName, grid]) => {\n    if (!grid) {\n      return acc;\n    }\n    if (!isActivityId(gridName)) {\n      return acc;\n    }\n\n    if (!transformFn) {\n      return acc.set(gridName, grid);\n    }\n\n    const transformedGrid = transformFn(grid);\n    return transformedGrid ? acc.set(gridName, transformedGrid) : acc;\n  }, new Map<ActivityId, P | T>()));\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 {NavigationExtras, Router, UrlSegment, UrlTree} from '@angular/router';\nimport {WorkbenchRouter} from './workbench-router.service';\nimport {Defined} from '@scion/toolkit/util';\nimport {assertNotInReactiveContext, inject, Injectable, Injector, NgZone, runInInjectionContext} from '@angular/core';\nimport {WorkbenchLayoutService} from '../layout/workbench-layout.service';\nimport {MAIN_AREA_LAYOUT_QUERY_PARAM, WorkbenchOutlet} from '../workbench.constants';\nimport {ANGULAR_ROUTER_MUTEX, SingleTaskExecutor} from '../executor/single-task-executor';\nimport {firstValueFrom} from 'rxjs';\nimport {WorkbenchNavigationalStates} from './workbench-navigational-states';\nimport {ɵWorkbenchLayout} from '../layout/ɵworkbench-layout';\nimport {Routing} from './routing.util';\nimport {Commands, Outlets, WorkbenchNavigationContext, WorkbenchNavigationExtras} from './routing.model';\nimport {UrlSegmentMatcher} from './url-segment-matcher';\nimport {Objects} from '../common/objects.util';\nimport {WORKBENCH_VIEW_REGISTRY} from '../view/workbench-view.registry';\nimport {ɵWorkbenchView} from '../view/ɵworkbench-view.model';\nimport {ViewId} from '../view/workbench-view.model';\nimport {WorkbenchLayouts} from '../layout/workbench-layouts.util';\n\n/** @inheritDoc */\n@Injectable({providedIn: 'root'})\nexport class ɵWorkbenchRouter implements WorkbenchRouter {\n\n  private readonly _router = inject(Router);\n  private readonly _workbenchLayoutService = inject(WorkbenchLayoutService);\n  private readonly _workbenchViewRegistry = inject(WORKBENCH_VIEW_REGISTRY);\n  private readonly _injector = inject(Injector);\n  private readonly _zone = inject(NgZone);\n  /** Mutex to serialize Workbench Router navigation requests, preventing race conditions when modifying the active workbench layout to operate on the most-recent layout. */\n  private readonly _workbenchRouterMutex = new SingleTaskExecutor();\n  /** Mutex to serialize Angular Router navigation requests, preventing the cancellation of previously initiated asynchronous navigations. */\n  private readonly _angularRouterMutex = inject(ANGULAR_ROUTER_MUTEX);\n  /** Holds the current navigational context during a workbench navigation, or `null` if no navigation is in progress. */\n  private _currentNavigationContext: WorkbenchNavigationContext | null = null;\n\n  constructor() {\n    // Instruct the Angular router to process navigations that do not change the current URL, i.e., when only updating navigation state.\n    // For example, the main grid is passed to the navigation as state, not as a query parameter. Without this flag set, changes to\n    // the main grid would not be added to the browsing history stack.\n    // Although the `onSameUrlNavigation` flag can be set per navigation via the navigation extras, this is not sufficient because the\n    // Angular router ignores it when navigating back and forth in the browsing history.\n    // See Angular router.ts#setUpLocationChangeListener and router.ts#navigateToSyncWithBrowser\n    this._router.onSameUrlNavigation = 'reload';\n  }\n\n  /** @inheritDoc */\n  public navigate(commands: Commands, extras?: WorkbenchNavigationExtras): Promise<boolean>;\n  public navigate(navigateFn: ɵNavigateFn, extras?: Omit<NavigationExtras, 'relativeTo' | 'state'>): Promise<boolean>;\n  public navigate(commandsOrNavigateFn: Commands | ɵNavigateFn, extras?: WorkbenchNavigationExtras | Omit<NavigationExtras, 'relativeTo' | 'state'>): Promise<boolean>;\n  public async navigate(commandsOrNavigateFn: Commands | ɵNavigateFn, extras?: WorkbenchNavigationExtras | Omit<NavigationExtras, 'relativeTo' | 'state'>): Promise<boolean> {\n    assertNotInReactiveContext(this.navigate, 'Call WorkbenchRouter.navigate() in a non-reactive (non-tracking) context, such as within the untracked() function.');\n\n    // Ensure to run in Angular zone.\n    if (!NgZone.isInAngularZone()) {\n      return this._zone.run(() => this.navigate(commandsOrNavigateFn, extras));\n    }\n\n    const navigateFn = typeof commandsOrNavigateFn === 'function' ? commandsOrNavigateFn : createNavigationFromCommands(commandsOrNavigateFn, extras ?? {});\n\n    // Serialize navigation requests to avoid race conditions when modifying the active workbench layout, ensuring layout operations are performed on the most-recent layout.\n    const newLayout = await this._workbenchRouterMutex.submit(async () => {\n      // Wait until Angular has performed the initial navigation to avoid overriding the layout as specified in the URL.\n      if (!this._workbenchLayoutService.hasLayout()) {\n        await this._workbenchLayoutService.whenLayoutAvailable;\n      }\n\n      // Let the navigator compute the new workbench layout.\n      const currentLayout = this._workbenchLayoutService.layout();\n      let newLayout = await runInInjectionContext(this._injector, () => navigateFn(currentLayout));\n      if (!newLayout) {\n        return null;\n      }\n\n      // Remove views marked for removal that have no `CanClose` guard.\n      // Views with a `CanClose` guard are removed later, outside the navigation mutex, to avoid blocking the workbench router.\n      newLayout = this.removeViewsWithoutGuard(newLayout);\n\n      // Skip navigation if the layout has not changed, such as when only closing views with a `CanClose` guard.\n      if (newLayout.equals(currentLayout, {excludeViewMarkedForRemoval: true})) {\n        return newLayout;\n      }\n\n      // Create extras with workbench navigation instructions.\n      extras = createNavigationExtras({newLayout, currentLayout}, extras);\n\n      // Perform the navigation.\n      const currentOutlets = currentLayout.outlets({mainGrid: true, mainAreaGrid: true, activityGrids: true});\n      const newOutlets = newLayout.outlets({mainGrid: true, mainAreaGrid: true, activityGrids: true});\n      const commands: Commands = computeNavigationCommands(currentOutlets, newOutlets);\n      if (!await this._angularRouterMutex.submit(() => this._router.navigate(commands, extras))) {\n        return null;\n      }\n\n      // Block subsequent navigation(s) until Angular has flushed the changed layout to the DOM.\n      await firstValueFrom(this._zone.onStable);\n      return newLayout;\n    });\n\n    if (!newLayout) {\n      return false;\n    }\n\n    // Remove views marked for removal, confirming closing by calling each view's `CanClose` guard.\n    return this.scheduleViewRemoval(newLayout);\n  }\n\n  /**\n   * Performs changes to the current workbench layout.\n   *\n   * Unlike {@link navigate}, does not perform the navigation but returns the URL tree instead.\n   *\n   * The router will invoke the callback and pass the current layout for modification. The callback can call `inject` to get any required dependencies.\n   *\n   * The following example adds a part to the left of the main area, inserts a view and navigates it.\n   *\n   * ```ts\n   * inject(WorkbenchRouter).createUrlTree(layout => layout\n   *   .addPart('left', {relativeTo: MAIN_AREA, align: 'left'})\n   *   .addView('navigator', {partId: 'left'})\n   *   .navigateView('navigator', ['path/to/view'])\n   *   .activateView('navigator'),\n   * );\n   * ```\n   *\n   * @param onNavigate - Specifies the callback to modify the layout.\n   * @param extras - Controls how to perform the navigation.\n   * @see NavigateFn\n   */\n  public async createUrlTree(onNavigate: (layout: ɵWorkbenchLayout) => Promise<ɵWorkbenchLayout | null> | ɵWorkbenchLayout | null, extras?: Omit<NavigationExtras, 'relativeTo' | 'state'>): Promise<UrlTree | null> {\n    assertNotInReactiveContext(this.createUrlTree, 'Call WorkbenchRouter.createUrlTree() in a non-reactive (non-tracking) context, such as within the untracked() function.');\n\n    // Ensure to run in Angular zone.\n    if (!NgZone.isInAngularZone()) {\n      return this._zone.run(() => this.createUrlTree(onNavigate, extras));\n    }\n\n    // Serialize navigation requests to avoid race conditions when modifying the active workbench layout, ensuring layout operations are performed on the most-recent layout.\n    return this._workbenchRouterMutex.submit(async () => {\n      // Wait until Angular has performed the initial navigation to avoid overriding the layout as specified in the URL.\n      if (!this._workbenchLayoutService.hasLayout()) {\n        await this._workbenchLayoutService.whenLayoutAvailable;\n      }\n\n      // Let the navigator compute the new workbench layout.\n      const currentLayout = this._workbenchLayoutService.layout();\n      let newLayout: ɵWorkbenchLayout | null = await runInInjectionContext(this._injector, () => onNavigate(currentLayout));\n      if (!newLayout) {\n        return null;\n      }\n\n      // Remove views marked for removal.\n      newLayout.views({markedForRemoval: true}).forEach(view => {\n        newLayout = newLayout!.removeView(view.id, {force: true});\n      });\n\n      // Create extras with workbench navigation instructions.\n      extras = createNavigationExtras({newLayout, currentLayout}, extras);\n\n      // Create the new URL tree.\n      const currentOutlets = currentLayout.outlets({mainGrid: true, mainAreaGrid: true, activityGrids: true});\n      const newOutlets = newLayout.outlets({mainGrid: true, mainAreaGrid: true, activityGrids: true});\n      const commands: Commands = computeNavigationCommands(currentOutlets, newOutlets);\n      return this._router.createUrlTree(commands, extras);\n    });\n  }\n\n  /**\n   * Remove views marked for removal that have no `CanClose` guard.\n   */\n  private removeViewsWithoutGuard(layout: ɵWorkbenchLayout): ɵWorkbenchLayout {\n    return layout.views({markedForRemoval: true}).reduce((layout, mView) => {\n      const view = this._workbenchViewRegistry.get(mView.id, {orElse: null});\n      if (!view || (view.isClosable() && !view.canCloseGuard)) {\n        return layout.removeView(mView.id, {force: true});\n      }\n      return layout;\n    }, layout);\n  }\n\n  /**\n   * Removes views marked for removal, confirming closing by calling each view's `CanClose` guard.\n   *\n   * Guards are executed in parallel, and views are removed in separate navigations.\n   *\n   * @return a Promise that resolves to `true` when all marked views were successfully closed or declined closing.\n   */\n  private async scheduleViewRemoval(layout: ɵWorkbenchLayout): Promise<boolean> {\n    const navigations = layout.views({markedForRemoval: true})\n      .map(mView => this._workbenchViewRegistry.get(mView.id, {orElse: null}))\n      .filter((view): view is ɵWorkbenchView => !!view && view.isClosable())\n      .map(async view => {\n        // Capture current navigation id to not proceed closing if navigated in the meantime.\n        const navigationId = view.navigation()?.id;\n        // Make view non-closable to prevent closing the view again while awaiting closing confirmation.\n        view.closable = false;\n        try {\n          const close = await view.canCloseGuard!();\n          if (close && view.navigation()?.id === navigationId) {\n            return await this.navigate(layout => layout.removeView(view.id, {force: true}));\n          }\n          return true;\n        }\n        finally {\n          view.closable = true;\n        }\n      });\n\n    // Wait for all `CanClose` guards to resolve and subsequent navigations to complete.\n    return (await Promise.all(navigations)).every(Boolean);\n  }\n\n  /**\n   * Returns the context of the current workbench navigation, when being invoked during navigation, or throws an error otherwise.\n   */\n  public getCurrentNavigationContext(): WorkbenchNavigationContext {\n    if (!this._currentNavigationContext) {\n      throw Error('[NavigateError] Navigation context not available because no navigation is in progress.');\n    }\n    return this._currentNavigationContext;\n  }\n\n  /**\n   * Sets navigational contextual data.\n   */\n  public setCurrentNavigationContext(context: WorkbenchNavigationContext | null): void {\n    this._currentNavigationContext = context;\n  }\n}\n\n/**\n * Creates a navigation to navigate view(s) based on the provided array of commands and extras.\n */\nexport function createNavigationFromCommands(commands: Commands, extras: WorkbenchNavigationExtras): ɵNavigateFn {\n  return (layout: ɵWorkbenchLayout): ɵWorkbenchLayout | null => {\n    if (extras.close) {\n      if (extras.target) {\n        if (commands.length || extras.hint || extras.partId || extras.relativeTo) {\n          throw Error('[NavigateError] Commands, hint, part or relativeTo must not be set when closing a view by id.');\n        }\n        return layout.removeView(extras.target);\n      }\n      const urlSegments = Routing.commandsToSegments(commands, {relativeTo: extras.relativeTo});\n      return layout\n        .views({\n          peripheral: extras.partId ? undefined : false,\n          partId: extras.partId,\n          segments: new UrlSegmentMatcher(urlSegments, {matchMatrixParams: false, matchWildcardPath: true}),\n          navigationHint: extras.hint ?? null,\n        })\n        .reduce((layout, view) => layout.removeView(view.id), layout);\n    }\n    else {\n      switch (extras.target ?? 'auto') {\n        case 'blank': {\n          return addView(layout.computeNextViewId(), layout);\n        }\n        case 'auto': {\n          const urlSegments = Routing.commandsToSegments(commands, {relativeTo: extras.relativeTo});\n          const views = layout.views({\n            peripheral: extras.partId ? undefined : false,\n            partId: extras.partId,\n            segments: new UrlSegmentMatcher(urlSegments, {matchMatrixParams: false, matchWildcardPath: false}),\n            navigationHint: extras.hint ?? null,\n          });\n          if (views.length) {\n            return views.reduce((layout, view) => updateView(view.id, layout), layout);\n          }\n          else {\n            return addView(layout.computeNextViewId(), layout);\n          }\n        }\n        default: {\n          const viewId = extras.target!;\n          if (layout.hasView(viewId)) {\n            return updateView(viewId, layout);\n          }\n          else {\n            return addView(viewId, layout);\n          }\n        }\n      }\n    }\n  };\n\n  /**\n   * Adds the specified view to the layout.\n   */\n  function addView(viewId: ViewId | string, layout: ɵWorkbenchLayout): ɵWorkbenchLayout {\n    // Default to the active part if not specified or not in the layout, with the active part of the main area taking precedence.\n    const partId = ((): string => {\n      if (extras.partId && layout.hasPart(extras.partId)) {\n        return extras.partId;\n      }\n      return layout.activePart({grid: 'mainArea'})?.id ?? layout.activePart({grid: 'main'}).id;\n    })();\n\n    return layout\n      .addView(viewId, {\n        partId: partId,\n        position: extras.position ?? 'after-active-view',\n        activateView: extras.activate ?? true,\n        activatePart: extras.activate ?? true,\n      })\n      .navigateView(viewId, commands, {\n        relativeTo: extras.relativeTo,\n        hint: extras.hint,\n        cssClass: extras.cssClass,\n        data: extras.data,\n        state: extras.state,\n      });\n  }\n\n  /**\n   * Updates the specified view.\n   */\n  function updateView(viewId: ViewId | string, layout: ɵWorkbenchLayout): ɵWorkbenchLayout {\n    if (extras.activate ?? true) {\n      layout = layout.activateView(viewId, {activatePart: true});\n    }\n\n    return layout.navigateView(viewId, commands, {\n      relativeTo: extras.relativeTo,\n      hint: extras.hint,\n      cssClass: extras.cssClass,\n      data: extras.data,\n      state: extras.state,\n    });\n  }\n}\n\n/**\n * Creates navigation extras with workbench navigation instructions.\n */\nfunction createNavigationExtras(layouts: {newLayout: ɵWorkbenchLayout; currentLayout?: ɵWorkbenchLayout | undefined}, extras?: Omit<NavigationExtras, 'relativeTo' | 'state'>): NavigationExtras {\n  const {newLayout, currentLayout} = layouts;\n  const newLayoutSerialized = newLayout.serialize({excludeViewMarkedForRemoval: true});\n\n  // IMPORTANT: Update `ɵWorkbenchLayout.equals` function when adding new state properties.\n\n  return {\n    ...extras,\n    // Instruct the Angular router to process the navigation even if the URL does not change, e.g., when changing the main grid which is not contained in the URL.\n    onSameUrlNavigation: 'reload',\n    // Unset `relativeTo` because commands are already normalized to their absolute form.\n    relativeTo: null,\n    // Associate workbench-specific state with the navigation.\n    state: WorkbenchNavigationalStates.create({\n      grids: {\n        main: newLayoutSerialized.grids.main,\n        ...WorkbenchLayouts.pickActivityGrids(newLayoutSerialized.grids),\n      },\n      activityLayout: newLayoutSerialized.activityLayout,\n      // Fall back to the current layout's perspective if not specified by the new layout,\n      // e.g., the navigator provides a new layout to replace the current layout.\n      perspectiveId: newLayout.perspectiveId ?? currentLayout?.perspectiveId,\n      navigationStates: newLayout.navigationStates(),\n    }),\n    // Add the main area as query parameter.\n    queryParams: {\n      ...extras?.queryParams,\n      [MAIN_AREA_LAYOUT_QUERY_PARAM]: WorkbenchLayouts.isGridEmpty(newLayout.grids.mainArea) ? undefined : newLayoutSerialized.grids.mainArea,\n    },\n    // Merge with existing query params unless specified an explicit strategy, e.g., for migrating an outdated layout URL.\n    // Note that `null` is a valid strategy for clearing existing query params, so do not use the nullish coalescing operator (??).\n    queryParamsHandling: Defined.orElse(extras?.queryParamsHandling, 'merge'),\n  };\n}\n\n/**\n * Computes commands that can be passed to the Angular router to navigate views and parts.\n */\nfunction computeNavigationCommands(currentOutlets: Outlets, newOutlets: Outlets): [{outlets: {[outlet: WorkbenchOutlet]: Commands | null}}] | [] {\n  const currentOutletMap = new Map<WorkbenchOutlet, UrlSegment[]>(Objects.entries(currentOutlets));\n  const newOutletMap = new Map<WorkbenchOutlet, UrlSegment[]>(Objects.entries(newOutlets));\n\n  const commands = new Map<WorkbenchOutlet, Commands | null>();\n  const outlets = new Set<WorkbenchOutlet>([...currentOutletMap.keys(), ...newOutletMap.keys()]);\n\n  outlets.forEach(outlet => {\n    // Test if the outlet has been added to the layout.\n    if (!currentOutletMap.has(outlet)) {\n      commands.set(outlet, Routing.segmentsToCommands(newOutletMap.get(outlet)!));\n    }\n    // Test if the outlet has been removed from the layout.\n    else if (!newOutletMap.has(outlet)) {\n      commands.set(outlet, null);\n    }\n    // Test if the outlet has been changed.\n    else if (!new UrlSegmentMatcher(currentOutletMap.get(outlet)!, {matchMatrixParams: true, matchWildcardPath: false}).matches(newOutletMap.get(outlet)!)) {\n      commands.set(outlet, Routing.segmentsToCommands(newOutletMap.get(outlet)!));\n    }\n  });\n\n  // Add commands to the 'outlets' property to be interpreted by the Angular router.\n  return commands.size ? [{outlets: Object.fromEntries(commands)}] : [];\n}\n\n/**\n * @inheritDoc\n * @see NavigateFn\n */\nexport type ɵNavigateFn = (layout: ɵWorkbenchLayout) => Promise<ɵWorkbenchLayout | null> | ɵWorkbenchLayout | null;\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 {NavigationExtras} from '@angular/router';\nimport {Injectable} from '@angular/core';\nimport {Commands, NavigateFn, WorkbenchNavigationExtras} from './routing.model';\nimport {ɵWorkbenchRouter} from './ɵworkbench-router.service';\n\n/**\n * Enables navigation of workbench views and modification of the workbench layout.\n *\n * A view is a visual workbench element for displaying content side-by-side or stacked. A view can be navigated to any route.\n *\n * A view can inject `ActivatedRoute` to get parameters passed to the navigation and read data associated with the route.\n */\n@Injectable({providedIn: 'root', useExisting: ɵWorkbenchRouter})\nexport abstract class WorkbenchRouter {\n\n  /**\n   * Navigates views based on the provided array of commands and extras. This method is similar to Angular's `Router.navigate(...)`, but with a view as the navigation target.\n   *\n   * A command can be a string or an object literal. A string represents a path segment, an object literal associates matrix parameters with the preceding segment.\n   * Multiple segments can be combined into a single command, separated by a forward slash.\n   *\n   * By default, navigates existing views that match the path, or opens a new view otherwise. Matrix params do not affect view resolution.\n   * This behavior can be changed by setting an explicit navigation target in navigation extras.\n   *\n   * By default, navigation is absolute. Set `relativeTo` in extras for relative navigation.\n   *\n   * The router supports for closing views matching the routing commands by setting `close` in navigation extras.\n   *\n   * ### Usage\n   * ```\n   * inject(WorkbenchRouter).navigate(['team', 33, 'user', 11]);\n   * inject(WorkbenchRouter).navigate(['team/11/user', userName, {details: true}]); // multiple static segments can be merged into one\n   * inject(WorkbenchRouter).navigate(['teams', {selection: 33'}]); // matrix parameter `selection` with the value `33`.\n   * ```\n   *\n   * @see WorkbenchRouterLinkDirective\n   */\n  public abstract navigate(commands: Commands, extras?: WorkbenchNavigationExtras): Promise<boolean>;\n\n  /**\n   * Performs changes to the current workbench layout.\n   *\n   * The router will invoke this function with the current workbench layout. The layout has methods for modifying it.\n   * The layout is immutable; each modification creates a new instance.\n   *\n   * The function can call `inject` to get any required dependencies.\n   *\n   * ## Workbench Layout\n   * The workbench layout is 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 and can be dragged to other parts. Content can be displayed in both parts and views.\n   *\n   * ## Example\n   * The following example adds a part to the left of the main area, inserts a view and navigates it.\n   *\n   * ```ts\n   * inject(WorkbenchRouter).navigate(layout => layout\n   *   .addPart('left', {relativeTo: MAIN_AREA, align: 'left'})\n   *   .addView('navigator', {partId: 'left'})\n   *   .navigateView('navigator', ['path/to/view'])\n   *   .activateView('navigator')\n   * );\n   * ```\n   *\n   * @param onNavigate - Specifies the callback to modify the layout.\n   * @param extras - Controls how to perform the navigation.\n   * @see NavigateFn\n   */\n  public abstract navigate(onNavigate: NavigateFn, extras?: Omit<NavigationExtras, 'relativeTo' | 'state'>): Promise<boolean>;\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 {isPartId, WorkbenchLayoutConstructConfig, ɵWorkbenchLayout} from './ɵworkbench-layout';\nimport {MPart} from './workbench-grid.model';\nimport {WorkbenchLayoutFactory} from './workbench-layout.factory';\nimport {inject, Injectable, Injector, runInInjectionContext} from '@angular/core';\nimport {MAIN_AREA, MAIN_AREA_ALTERNATIVE_ID, PartExtras} from './workbench-layout';\nimport {WorkbenchLayouts} from './workbench-layouts.util';\nimport {Arrays} from '@scion/toolkit/util';\n\n/**\n * @inheritDoc\n */\n@Injectable({providedIn: 'root'})\nexport class ɵWorkbenchLayoutFactory implements WorkbenchLayoutFactory {\n\n  private readonly _injector = inject(Injector);\n\n  /**\n   * @inheritDoc\n   */\n  public addPart(id: string | MAIN_AREA, extras?: PartExtras): ɵWorkbenchLayout {\n    const partId = isPartId(id) ? id : (id === MAIN_AREA_ALTERNATIVE_ID ? MAIN_AREA : WorkbenchLayouts.computePartId());\n    const alternativeId = isPartId(id) ? (id === MAIN_AREA ? MAIN_AREA_ALTERNATIVE_ID : undefined) : id;\n\n    return this.create({\n      grids: {\n        main: {\n          root: new MPart({\n            id: partId,\n            alternativeId,\n            title: extras?.title,\n            structural: true,\n            views: [],\n            cssClass: extras?.cssClass ? Arrays.coerce(extras.cssClass) : undefined,\n          }),\n          activePartId: partId,\n        },\n      },\n    });\n  }\n\n  /**\n   * Creates a workbench layout that consists of the specified grids.\n   *\n   * @see ɵWorkbenchLayout.constructor\n   */\n  public create(config?: WorkbenchLayoutConstructConfig): ɵWorkbenchLayout {\n    return runInInjectionContext(this._injector, () => new ɵWorkbenchLayout(config));\n  }\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 */\nimport {Injectable} from '@angular/core';\nimport {ɵWorkbenchLayout} from './ɵworkbench-layout';\n\n/**\n * Performs a three-way merge of the local and remote layouts, using the base layout (common ancestor) as the base of the merge operation.\n *\n * TODO [#452] This implementation discards local changes when a new layout is available.\n */\n@Injectable({providedIn: 'root'})\nexport class WorkbenchLayoutMerger {\n\n  /**\n   * Performs a merge of given local and remote layouts, using the base layout as the common ancestor.\n   */\n  public merge(layouts: {local: ɵWorkbenchLayout; remote: ɵWorkbenchLayout; base: ɵWorkbenchLayout}): ɵWorkbenchLayout {\n    if (!layouts.base.equals(layouts.remote, {excludeTreeNodeId: true, excludePartNavigationId: true, excludeViewNavigationId: true, assignStablePartIdentifier: true, assignStableActivityIdentifier: true, sort: true})) {\n      return layouts.remote;\n    }\n\n    return layouts.local;\n  }\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 {inject, Injectable} from '@angular/core';\nimport {WorkbenchStorage} from '../storage/workbench-storage';\nimport {Logger} from '../logging';\nimport {WorkbenchLayoutSerializer} from './workench-layout-serializer.service';\nimport {MWorkbenchLayout} from './workbench-layout';\n\n/**\n * Provides API for reading and writing the workbench layout to storage.\n */\n@Injectable({providedIn: 'root'})\nexport class WorkbenchLayoutStorageService {\n\n  private readonly _storage = inject(WorkbenchStorage);\n  private readonly _workbenchLayoutSerializer = inject(WorkbenchLayoutSerializer);\n  private readonly _logger = inject(Logger);\n\n  /**\n   * Loads specified layout from storage, applying necessary migrations if the serialized layout is outdated.\n   */\n  public async load(perspectiveId: string): Promise<MWorkbenchLayout | null> {\n    const layoutStorageKey = storageKeys.layout(perspectiveId);\n    const serialized = await this._storage.load(layoutStorageKey);\n    try {\n      return this._workbenchLayoutSerializer.deserialize(serialized);\n    }\n    catch (error) {\n      this._logger.error(`[WorkbenchSerializeError] Failed to deserialize the layout of the perspective '${perspectiveId}'. Please clear your browser storage and reload the application.`, error);\n      return null;\n    }\n  }\n\n  /**\n   * Stores specified layout to storage.\n   */\n  public async store(perspectiveId: string, layout: MWorkbenchLayout): Promise<void> {\n    const serialized = this._workbenchLayoutSerializer.serialize(layout);\n    const layoutStorageKey = storageKeys.layout(perspectiveId);\n    await this._storage.store(layoutStorageKey, serialized);\n  }\n\n  /**\n   * Reads the id of the active perspective from storage.\n   */\n  public async loadActivePerspectiveId(): Promise<string | null> {\n    return this._storage.load(storageKeys.activePerspectiveId);\n  }\n\n  /**\n   * Writes the id of the active perspective to storage.\n   */\n  public async storeActivePerspectiveId(perspectiveId: string): Promise<void> {\n    return this._storage.store(storageKeys.activePerspectiveId, perspectiveId);\n  }\n}\n\n/**\n * Represents keys to associate data in the storage.\n */\nconst storageKeys = {\n  layout: (perspectiveId: string): string => `scion.workbench.perspectives.${perspectiveId}`,\n  activePerspectiveId: 'scion.workbench.perspective',\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 */\nimport {Injectable} from '@angular/core';\nimport {Arrays} from '@scion/toolkit/util';\nimport {ViewId} from '../view/workbench-view.model';\nimport {WorkbenchLayouts} from '../layout/workbench-layouts.util';\nimport {ɵWorkbenchLayout} from '../layout/ɵworkbench-layout';\nimport {Objects} from '../common/objects.util';\n\n/**\n * Detects and resolves conflicting view ids, that may occur when switching between perspectives.\n */\n@Injectable({providedIn: 'root'})\nexport class WorkbenchPerspectiveViewConflictResolver {\n\n  /**\n   * Detects and resolves id clashes of views contained in the new layout and views contained in the main area of the current layout,\n   * assigning views of the new layout a new identity.\n   *\n   * @param currentLayout - The current workbench layout.\n   * @param newLayout - The new workbench layout.\n   * @return new layout with conflicts resolved.\n   */\n  public resolve(currentLayout: ɵWorkbenchLayout, newLayout: ɵWorkbenchLayout): ɵWorkbenchLayout {\n    const activityGrids = WorkbenchLayouts.pickActivityGrids(newLayout.grids);\n    const activityViewIds = newLayout.views({grid: Objects.keys(activityGrids)}).map(view => view.id);\n    const mainViewIds = newLayout.views({grid: 'main'}).map(view => view.id);\n    const mainAreaViewIds = currentLayout.views({grid: 'mainArea'}).map(view => view.id);\n\n    // Test if there are conflicts.\n    const conflictingViewIds = Arrays.intersect([...activityViewIds, ...mainViewIds], mainAreaViewIds);\n    if (!conflictingViewIds.length) {\n      return newLayout;\n    }\n\n    // Rename conflicting views.\n    const usedViewIds = new Set<ViewId>(activityViewIds.concat(mainViewIds).concat(mainAreaViewIds));\n    conflictingViewIds.forEach(conflictingViewId => {\n      const newViewId = WorkbenchLayouts.computeNextViewId(usedViewIds);\n      newLayout = newLayout.renameView(conflictingViewId, newViewId);\n      usedViewIds.add(newViewId);\n    });\n\n    return newLayout;\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 {DestroyRef, inject} from '@angular/core';\n\n/**\n * Executes submitted tasks in serial order.\n *\n * Unlike {@link SingleTaskExecutor}, this executor has a queue size of 1, with only the most recently scheduled task being queued.\n *\n * Tasks are executed in serial order. At any one time, there is only one task executing and a maximum of one task pending.\n * When a task is submitted and there is a task already executing, the submitted task will be queued for later execution.\n * Any task previously placed in the queue is discarded.\n *\n * This executor must be constructed within an injection context. Destroying the injection context will also destroy the executor.\n */\nexport class LatestTaskExecutor {\n\n  private _executing = false;\n  private _latestTask: (() => Promise<void>) | undefined;\n\n  constructor() {\n    // Clear pending tasks when the current injection context is destroyed.\n    inject(DestroyRef).onDestroy(() => this.onDestroy());\n  }\n\n  /**\n   * Submits a task for serial execution.\n   */\n  public submit(task: () => Promise<void>): void {\n    this._latestTask = task;\n    this.executeLatestTask();\n  }\n\n  /**\n   * Executes the last task in the queue (if any).\n   * After completion, this process is repeated until the task queue is empty.\n   */\n  private executeLatestTask(): void {\n    if (this._executing || !this._latestTask) {\n      return;\n    }\n\n    const task = this._latestTask;\n    this._latestTask = undefined;\n\n    this._executing = true;\n    void task().finally(() => {\n      this._executing = false;\n      this.executeLatestTask();\n    });\n  }\n\n  private onDestroy(): void {\n    this._latestTask = 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 {InjectionToken} from '@angular/core';\nimport {WorkbenchObjectRegistry} from '../registry/workbench-object-registry';\nimport {ɵWorkbenchPerspective} from './ɵworkbench-perspective.model';\n\n/**\n * Registry for {@link ɵWorkbenchPerspective} model objects.\n */\nexport const WORKBENCH_PERSPECTIVE_REGISTRY = new InjectionToken<WorkbenchObjectRegistry<string, ɵWorkbenchPerspective>>('WORKBENCH_PERSPECTIVE_REGISTRY', {\n  providedIn: 'root',\n  factory: () => new WorkbenchObjectRegistry<string, ɵWorkbenchPerspective>({\n    nullObjectErrorFn: perspectiveId => Error(`[NullPerspectiveError] Perspective '${perspectiveId}' not found.`),\n    onUnregister: perspective => perspective.destroy(),\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 {EnvironmentProviders, InjectionToken, Injector, makeEnvironmentProviders, runInInjectionContext} from '@angular/core';\n\n/**\n * Registers a function that is executed during the startup of the SCION Workbench.\n *\n * Initializers help to run initialization tasks (synchronous or asynchronous) during startup of the SCION Workbench.\n * The workbench is fully started once all initializers have completed.\n *\n * Initializers can specify a phase for execution. Initializers in lower phases execute before initializers in higher phases.\n * Initializers in the same phase may execute in parallel. If no phase is specified, the initializer executes in the `Startup` phase.\n *\n * Available phases, in order of execution:\n * - {@link WorkbenchStartupPhase.PreStartup}\n * - {@link WorkbenchStartupPhase.Startup}\n * - {@link WorkbenchStartupPhase.PostStartup}\n *\n * The function can call `inject` to get any required dependencies.\n *\n * @param initializerFn - Specifies the function to execute.\n * @param options - Controls execution of the function.\n * @return A set of dependency-injection providers to be registered in Angular.\n */\nexport function provideWorkbenchInitializer(initializerFn: WorkbenchInitializerFn, options?: WorkbenchInitializerOptions): EnvironmentProviders {\n  return makeEnvironmentProviders([{\n    provide: (() => {\n      switch (options?.phase) {\n        case WorkbenchStartupPhase.PreStartup:\n          return WORKBENCH_PRE_STARTUP;\n        case WorkbenchStartupPhase.PostStartup:\n          return WORKBENCH_POST_STARTUP;\n        default:\n          return WORKBENCH_STARTUP;\n      }\n    })(),\n    useValue: initializerFn,\n    multi: true,\n  }]);\n}\n\n/**\n * Controls the execution of an initializer function during the startup of the SCION Workbench.\n */\nexport interface WorkbenchInitializerOptions {\n  /**\n   * Controls in which phase to execute the initializer.\n   */\n  phase?: WorkbenchStartupPhase;\n}\n\n/**\n * Enumeration of phases for running a {@link WorkbenchInitializerFn} function during the startup of the SCION Workbench.\n *\n * Functions associated with the same phase may run in parallel. Defaults to {@link Startup} phase.\n */\nexport enum WorkbenchStartupPhase {\n  /**\n   * Use to run an initializer before starting the workbench.\n   */\n  PreStartup = 0,\n  /**\n   * Use to run an initializer function after initializers of the {@link PreStartup} phase.\n   *\n   * This is the default phase if not specifying a phase.\n   */\n  Startup = 1,\n  /**\n   * Use to run an initializer function after initializers of the {@link Startup} phase.\n   */\n  PostStartup = 2,\n}\n\n/**\n * The signature of a function executed during the startup of the SCION Workbench.\n *\n * Initializers help to run initialization tasks (synchronous or asynchronous) during startup of the SCION Workbench.\n * The workbench is fully started once all initializers have completed.\n *\n * Initializers are registered using the `provideWorkbenchInitializer()` function and can specify a phase for execution.\n * Initializers in lower phases execute before initializers in higher phases. Initializers in the same phase may\n * execute in parallel. If no phase is specified, the initializer executes in the `Startup` phase.\n *\n * Available phases, in order of execution:\n * - {@link WorkbenchStartupPhase.PreStartup}\n * - {@link WorkbenchStartupPhase.Startup}\n * - {@link WorkbenchStartupPhase.PostStartup}\n *\n * The function can call `inject` to get any required dependencies.\n *\n * ### Example:\n *\n * ```ts\n * import {provideWorkbench, provideWorkbenchInitializer} from '@scion/workbench';\n * import {bootstrapApplication} from '@angular/platform-browser';\n * import {inject} from '@angular/core';\n *\n * bootstrapApplication(AppComponent, {\n *   providers: [\n *     provideWorkbench(),\n *     provideWorkbenchInitializer(() => inject(SomeService).init()),\n *   ],\n * });\n * ```\n * @see provideWorkbenchInitializer\n */\nexport type WorkbenchInitializerFn = () => void | Promise<void>;\n\n/**\n * The signature of a class to hook into the startup of the SCION Workbench.\n *\n * The SCION Workbench defines a set of DI tokens called at defined points during startup, enabling the application's controlled initialization.\n *\n * Available DI tokens, in order of execution:\n * - {@link WORKBENCH_PRE_STARTUP}\n * - {@link WORKBENCH_STARTUP}\n * - {@link WORKBENCH_POST_STARTUP}\n *\n * ### Example:\n *\n * ```ts\n * import {provideWorkbench, WORKBENCH_STARTUP, WorkbenchInitializer} from '@scion/workbench';\n * import {bootstrapApplication} from '@angular/platform-browser';\n * import {Injectable} from '@angular/core';\n *\n * @Injectable()\n * export class Initializer implements WorkbenchInitializer {\n *   public async init(): Promise<void> {\n *     // initialize application\n *   }\n * }\n *\n * bootstrapApplication(AppComponent, {\n *   providers: [\n *     provideWorkbench(),\n *     {\n *       provide: WORKBENCH_STARTUP,\n *       multi: true,\n *       useClass: Initializer,\n *     },\n *   ],\n * });\n * ```\n * @see WORKBENCH_PRE_STARTUP\n * @see WORKBENCH_STARTUP\n * @see WORKBENCH_POST_STARTUP\n *\n * @deprecated since version 19.0.0-beta.3. Register an initializer function instead. The function can call `inject` to get required dependencies. See `WorkbenchInitializerFn` for an example. API will be removed in version 21.\n */\nexport interface WorkbenchInitializer {\n\n  /**\n   * This method is called during the startup of the SCION Workbench.\n   *\n   * The method can call `inject` to get required dependencies.\n   *\n   * @return A Promise blocking startup until it resolves.\n   */\n  init(): Promise<void>;\n}\n\n/**\n * DI token to register a {@link WorkbenchInitializerFn} as a multi-provider to hook into the startup process of the SCION Workbench.\n *\n * Initializers associated with this DI token are executed before starting the SCION Workbench.\n *\n * @see WorkbenchInitializerFn\n * @deprecated since version 19.0.0-beta.3. Register initializer using `provideWorkbenchInitializer` function. See `provideWorkbenchInitializer` for an example. API will be removed in version 21.\n */\nexport const WORKBENCH_PRE_STARTUP = new InjectionToken<WorkbenchInitializerFn | WorkbenchInitializer | object>('WORKBENCH_PRE_STARTUP');\n\n/**\n * DI token to register a {@link WorkbenchInitializerFn} as a multi-provider to hook into the startup process of the SCION Workbench.\n *\n * Initializers associated with this DI token are executed after initializers of {@link WORKBENCH_PRE_STARTUP}.\n *\n * @see WorkbenchInitializerFn\n * @deprecated since version 19.0.0-beta.3. Register initializer using `provideWorkbenchInitializer` function. See `provideWorkbenchInitializer` for an example. API will be removed in version 21.\n */\nexport const WORKBENCH_STARTUP = new InjectionToken<WorkbenchInitializerFn | WorkbenchInitializer | object>('WORKBENCH_STARTUP');\n\n/**\n * DI token to register a {@link WorkbenchInitializerFn} as a multi-provider to hook into the startup process of the SCION Workbench.\n *\n * Initializers associated with this DI token are executed after initializers of {@link WORKBENCH_STARTUP}.\n *\n * @see WorkbenchInitializerFn\n * @deprecated since version 19.0.0-beta.3. Register initializer using `provideWorkbenchInitializer` function. See `provideWorkbenchInitializer` for an example. API will be removed in version 21.\n */\nexport const WORKBENCH_POST_STARTUP = new InjectionToken<WorkbenchInitializerFn | WorkbenchInitializer | object>('WORKBENCH_POST_STARTUP');\n\n/**\n * Runs workbench initializers associated with the given DI token. Initializer functions can call `inject` to get required dependencies.\n */\nexport async function runWorkbenchInitializers(token: InjectionToken<WorkbenchInitializerFn | WorkbenchInitializer | object>, injector: Injector): Promise<void> {\n  const initializers = injector.get(token, [], {optional: true}) as Array<WorkbenchInitializerFn | WorkbenchInitializer | object>;\n  if (!initializers.length) {\n    return;\n  }\n\n  // Run and await initializer functions.\n  await Promise.all(initializers\n    .filter((initializer): initializer is WorkbenchInitializerFn | WorkbenchInitializer => typeof initializer === 'function' || typeof (initializer as Partial<WorkbenchInitializer>).init === 'function')\n    .reduce((acc, initializer) => runInInjectionContext(injector, () => {\n      return acc.concat(typeof initializer === 'function' ? initializer() : initializer.init());\n    }), new Array<void | Promise<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 {WorkbenchConfig} from '../workbench-config';\nimport {ApplicationInitStatus, assertNotInReactiveContext, computed, inject, Injectable, Injector, NgZone, signal} from '@angular/core';\nimport {runWorkbenchInitializers, WORKBENCH_POST_STARTUP, WORKBENCH_PRE_STARTUP, WORKBENCH_STARTUP} from './workbench-initializer';\nimport {Logger, LoggerNames} from '../logging';\nimport {WorkbenchLauncher} from './workbench-launcher.service';\nimport {resolveWhen} from '../common/resolve-when.util';\n\n@Injectable({providedIn: 'root'})\nexport class ɵWorkbenchLauncher implements WorkbenchLauncher {\n\n  private readonly _logger: Logger;\n  private readonly _zone: NgZone;\n  private readonly _injector: Injector;\n  private readonly _whenStarted = resolveWhen(computed(() => this.state() === LaunchState.Started));\n\n  public readonly state = signal(LaunchState.Stopped);\n\n  constructor() {\n    const workbenchConfig = inject(WorkbenchConfig, {optional: true});\n    if (!workbenchConfig) {\n      throw Error(`[WorkbenchError] Missing required workbench providers. Did you forget to call 'provideWorkbench()' in the providers array of 'bootstrapApplication' or the root 'NgModule'?`);\n    }\n\n    // Do not inject dependencies before the above check to avoid `NullInjectorError` error.\n    this._logger = inject(Logger);\n    this._zone = inject(NgZone);\n    this._injector = inject(Injector);\n  }\n\n  /** @inheritDoc */\n  public async launch(): Promise<true> {\n    assertNotInReactiveContext(this.launch, 'Call WorkbenchLauncher.launch() in a non-reactive (non-tracking) context, such as within the untracked() function.');\n\n    // Ensure to run in the Angular zone to check the workbench for changes even if called from outside the Angular zone, e.g. in unit tests.\n    if (!NgZone.isInAngularZone()) {\n      return this._zone.run(() => this.launch());\n    }\n\n    switch (this.state()) {\n      case LaunchState.Stopped: {\n        this._logger.debug(() => `Starting Workbench. Waiting for workbench initializers to complete. [launcher=${this._injector.get(ApplicationInitStatus).done as boolean ? 'LAZY' : 'APP_INITIALIZER'}]`, LoggerNames.LIFECYCLE);\n        this.state.set(LaunchState.Starting);\n        await runWorkbenchInitializers(WORKBENCH_PRE_STARTUP, this._injector);\n        await runWorkbenchInitializers(WORKBENCH_STARTUP, this._injector);\n        await runWorkbenchInitializers(WORKBENCH_POST_STARTUP, this._injector);\n        this.state.set(LaunchState.Started);\n        this._logger.debug(() => 'Workbench started.', LoggerNames.LIFECYCLE);\n        return true;\n      }\n      case LaunchState.Starting:\n      case LaunchState.Started: {\n        await this._whenStarted;\n        return true;\n      }\n    }\n  }\n}\n\nexport enum LaunchState {\n  Stopped, Starting, Started,\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 {computed, inject, Injectable} from '@angular/core';\nimport {WorkbenchStartup} from './workbench-startup.service';\nimport {resolveWhen} from '../common/resolve-when.util';\nimport {WorkbenchLayoutService} from '../layout/workbench-layout.service';\nimport {LaunchState, ɵWorkbenchLauncher} from './ɵworkbench-launcher.service';\n\n@Injectable(/* DO NOT provide via 'providedIn' metadata as registered under `WorkbenchStartup` DI token. */)\nexport class ɵWorkbenchStartup implements WorkbenchStartup {\n\n  private readonly _launcher = inject(ɵWorkbenchLauncher);\n  private readonly _workbenchLayoutService = inject(WorkbenchLayoutService);\n\n  /** @inheritDoc */\n  public readonly done = computed(() => this._launcher.state() === LaunchState.Started && this._workbenchLayoutService.hasLayout());\n\n  /** @inheritDoc */\n  public readonly whenDone = resolveWhen(this.done);\n\n  /** @inheritDoc */\n  public readonly isStarted = this.done;\n\n  /** @inheritDoc */\n  public readonly whenStarted = this.whenDone.then<true>(() => true);\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 {Injectable, Signal} from '@angular/core';\nimport {ɵWorkbenchStartup} from './ɵworkbench-startup.service';\n\n/**\n * Provides the status of the SCION Workbench startup.\n */\n@Injectable({providedIn: 'root', useClass: ɵWorkbenchStartup})\nexport abstract class WorkbenchStartup {\n\n  /**\n   * Indicates whether the workbench has completed startup.\n   *\n   * After startup, the workbench layout is available.\n   */\n  public abstract readonly done: Signal<boolean>;\n\n  /**\n   * Resolves when the workbench has completed startup.\n   *\n   * After startup, the workbench layout is available.\n   */\n  public abstract readonly whenDone: Promise<void>;\n\n  /**\n   * Indicates whether the workbench has completed startup.\n   *\n   * After startup, the workbench layout is available.\n   *\n   * @deprecated since version 19.0.0-beta.3. Use `WorkbenchStartup.done` instead. API will be removed in version 21.\n   */\n  public abstract readonly isStarted: Signal<boolean>;\n\n  /**\n   * Resolves when the workbench completes startup.\n   *\n   * After startup, the workbench layout is available.\n   *\n   * @deprecated since version 19.0.0-beta.3. Use `WorkbenchStartup.whenDone` instead. API will be removed in version 21.\n   */\n  public abstract readonly whenStarted: Promise<true>;\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 */\nimport {ɵWorkbenchLayoutFactory} from '../layout/ɵworkbench-layout.factory';\nimport {computed, EnvironmentInjector, inject, InjectionToken, Injector, runInInjectionContext, Signal} from '@angular/core';\nimport {WorkbenchPerspective, WorkbenchPerspectiveDefinition} from './workbench-perspective.model';\nimport {ɵWorkbenchRouter} from '../routing/ɵworkbench-router.service';\nimport {ɵWorkbenchLayout} from '../layout/ɵworkbench-layout';\nimport {WorkbenchLayoutMerger} from '../layout/workbench-layout-merger.service';\nimport {WorkbenchLayoutStorageService} from '../layout/workbench-layout-storage.service';\nimport {WorkbenchLayoutService} from '../layout/workbench-layout.service';\nimport {WorkbenchPerspectiveViewConflictResolver} from './workbench-perspective-view-conflict-resolver.service';\nimport {LatestTaskExecutor} from '../executor/latest-task-executor';\nimport {UrlSegment} from '@angular/router';\nimport {WorkbenchLayoutFn} from '../layout/workbench-layout';\nimport {WORKBENCH_PERSPECTIVE_REGISTRY} from './workbench-perspective.registry';\nimport {WorkbenchStartup} from '../startup/workbench-startup.service';\nimport {Objects} from '../common/objects.util';\nimport {WorkbenchLayouts} from '../layout/workbench-layouts.util';\nimport {takeUntilDestroyed, toObservable} from '@angular/core/rxjs-interop';\nimport {filter, skip, switchMap} from 'rxjs/operators';\nimport {from} from 'rxjs';\n\n/**\n * @inheritDoc\n */\nexport class ɵWorkbenchPerspective implements WorkbenchPerspective {\n\n  private readonly _perspectiveEnvironmentInjector = inject(EnvironmentInjector);\n  private readonly _workbenchLayoutFactory = inject(ɵWorkbenchLayoutFactory);\n  private readonly _workbenchLayoutService = inject(WorkbenchLayoutService);\n  private readonly _workbenchLayoutMerger = inject(WorkbenchLayoutMerger);\n  private readonly _workbenchlayoutStorageService = inject(WorkbenchLayoutStorageService);\n  private readonly _workbenchRouter = inject(ɵWorkbenchRouter);\n  private readonly _initialLayoutFn: WorkbenchLayoutFn;\n  private readonly _perspectiveViewConflictResolver = inject(WorkbenchPerspectiveViewConflictResolver);\n  private readonly _activePerspective = inject(ACTIVE_PERSPECTIVE);\n\n  public readonly id: string;\n  public readonly transient: boolean;\n  public readonly data: {[key: string]: any};\n  public readonly active: Signal<boolean>;\n\n  private _initialLayout: ɵWorkbenchLayout | undefined;\n  private _layout: ɵWorkbenchLayout | undefined;\n\n  constructor(definition: WorkbenchPerspectiveDefinition) {\n    this.id = definition.id;\n    this.transient = definition.transient ?? false;\n    this.data = definition.data ?? {};\n\n    const activePerspective = inject(ACTIVE_PERSPECTIVE);\n    this.active = computed(() => activePerspective()?.id === this.id);\n\n    this._initialLayoutFn = definition.layout;\n    this.installLayoutPersister();\n  }\n\n  /**\n   * Activates this perspective.\n   */\n  public async activate(): Promise<boolean> {\n    // Create the initial layout when constructed for the first time.\n    this._initialLayout ??= await this.createInitialLayout();\n\n    // Load the layout from the storage, if present, or use the initial layout otherwise.\n    this._layout = (await this.loadLayout()) ?? this._initialLayout;\n\n    // Do not push new state into browser session history when activating the initial workbench perspective.\n    const replaceUrl = this._activePerspective() === undefined;\n\n    // Perform navigation to activate the layout of this perspective.\n    return this._workbenchRouter.navigate(currentLayout => this.createLayoutForActivation(currentLayout), {replaceUrl});\n  }\n\n  /**\n   * Resets this perspective to its initial layout.\n   */\n  public async reset(): Promise<void> {\n    this._layout = this._initialLayout;\n\n    // Reset to the initial layout.\n    await this._workbenchRouter.navigate(currentLayout => this.createLayoutForActivation(currentLayout));\n  }\n\n  /**\n   * Reference to the handle's injector. The injector will be destroyed when unregistering the perspective.\n   */\n  public get injector(): Injector {\n    return this._perspectiveEnvironmentInjector;\n  }\n\n  /**\n   * Creates the perspective layout using the main area of the current layout.\n   *\n   * When switching perspective, id clashes between views contained in the perspective and the main area are possible.\n   * The activation detects and resolves conflicts, changing the layout of this perspective if necessary.\n   */\n  private createLayoutForActivation(currentLayout: ɵWorkbenchLayout): ɵWorkbenchLayout {\n    if (!this._layout) {\n      throw Error(`[PerspectiveActivateError] Perspective '${this.id}' not constructed.`);\n    }\n\n    // Outlets of the new layout.\n    const outlets = new Map<string, UrlSegment[]>();\n\n    // Add outlets of the main area and resolve conflicts if any.\n    if (currentLayout.grids.mainArea && this._layout.grids.mainArea) {\n      // Detect and resolve id clashes between views defined by this perspective and views contained in the main area,\n      // assigning views of this perspective a new identity.\n      this._layout = this._perspectiveViewConflictResolver.resolve(currentLayout, this._layout);\n\n      // Add outlets contained in the main area.\n      Objects.entries(currentLayout.outlets({mainAreaGrid: true})).forEach(([outlet, segments]) => {\n        outlets.set(outlet, segments);\n      });\n    }\n\n    // Add outlets contained in this perspective.\n    Objects.entries(this._layout.outlets({mainGrid: true, activityGrids: true})).forEach(([outlet, segments]) => {\n      outlets.set(outlet, segments);\n    });\n\n    // Create the layout for this perspective.\n    return this._workbenchLayoutFactory.create({\n      grids: {\n        ...this._layout.grids,\n        mainArea: currentLayout.grids.mainArea,\n      },\n      activityLayout: this._layout.activityLayout,\n      perspectiveId: this.id,\n      outlets: Object.fromEntries(outlets),\n      navigationStates: currentLayout.navigationStates({grid: 'mainArea'}), // preserve navigation state of parts and views in the main area; navigation state of parts and views outside the main area cannot be restored since not persisted.\n    });\n  }\n\n  /**\n   * Creates the initial layout of this perspective as defined in the perspective definition.\n   */\n  private async createInitialLayout(): Promise<ɵWorkbenchLayout> {\n    const initialLayout = await runInInjectionContext(this._perspectiveEnvironmentInjector, () => this._initialLayoutFn(this._workbenchLayoutFactory)) as ɵWorkbenchLayout;\n    return this.ensureActiveView(initialLayout);\n  }\n\n  /**\n   * Activates the first view of each part if not specified.\n   */\n  private ensureActiveView(layout: ɵWorkbenchLayout): ɵWorkbenchLayout {\n    return layout.parts()\n      .filter(part => part.views.length)\n      .reduce((acc, part) => part.activeViewId ? acc : acc.activateView(part.views[0]!.id), layout);\n  }\n\n  /**\n   * Sets up automatic persistence of the perspective layout on every layout change.\n   */\n  private installLayoutPersister(): void {\n    const executor = new LatestTaskExecutor();\n    const injector = inject(Injector);\n\n    from(this._workbenchLayoutService.whenLayoutAvailable)\n      .pipe(\n        switchMap(() => toObservable(this._workbenchLayoutService.layout, {injector})),\n        skip(1), // Skip immediate layout emission to only persist on layout change.\n        filter(() => this.active()),\n        takeUntilDestroyed(),\n      )\n      .subscribe(layout => executor.submit(() => this.storeLayout(layout)));\n  }\n\n  /**\n   * Loads the layout of this perspective from storage, applying necessary migrations if the layout is outdated.\n   * Returns `undefined` if not stored or could not be deserialized.\n   */\n  private async loadLayout(): Promise<ɵWorkbenchLayout | undefined> {\n    if (this.transient) {\n      return this._layout;\n    }\n\n    const layout = await this._workbenchlayoutStorageService.load(this.id);\n    if (!layout) {\n      return undefined;\n    }\n\n    return this._workbenchLayoutMerger.merge({\n      local: this._workbenchLayoutFactory.create({\n        grids: {\n          main: layout.userLayout.grids.main,\n          ...WorkbenchLayouts.pickActivityGrids(layout.userLayout.grids),\n        },\n        activityLayout: layout.userLayout.activityLayout,\n        outlets: layout.userLayout.outlets,\n      }),\n      base: this._workbenchLayoutFactory.create({\n        grids: {\n          main: layout.referenceLayout.grids.main,\n          ...WorkbenchLayouts.pickActivityGrids(layout.referenceLayout.grids),\n        },\n        activityLayout: layout.referenceLayout.activityLayout,\n        outlets: layout.referenceLayout.outlets,\n      }),\n      remote: this._initialLayout!,\n    });\n  }\n\n  /**\n   * Stores the layout of this perspective.\n   *\n   * If an anonymous perspective, only memoizes the layout, but does not write it to storage.\n   */\n  private async storeLayout(currentLayout: ɵWorkbenchLayout): Promise<void> {\n    // Memoize the layout of this perspective.\n    this._layout = this._workbenchLayoutFactory.create({\n      grids: {\n        main: currentLayout.grids.main,\n        ...WorkbenchLayouts.pickActivityGrids(currentLayout.grids),\n      },\n      activityLayout: currentLayout.activityLayout,\n      outlets: currentLayout.outlets({mainGrid: true, activityGrids: true}),\n    });\n\n    // Do not store the layout if a transient perspective.\n    if (this.transient) {\n      return;\n    }\n\n    const serializedReferenceLayout = this._initialLayout!.serialize();\n    const serializedUserLayout = this._layout.serialize();\n\n    await this._workbenchlayoutStorageService.store(this.id, {\n      referenceLayout: {\n        grids: {\n          main: serializedReferenceLayout.grids.main,\n          ...WorkbenchLayouts.pickActivityGrids(serializedReferenceLayout.grids),\n        },\n        activityLayout: serializedReferenceLayout.activityLayout,\n        outlets: serializedReferenceLayout.outlets({mainGrid: true, activityGrids: true}),\n      },\n      userLayout: {\n        grids: {\n          main: serializedUserLayout.grids.main,\n          ...WorkbenchLayouts.pickActivityGrids(serializedUserLayout.grids),\n        },\n        activityLayout: serializedUserLayout.activityLayout,\n        outlets: serializedUserLayout.outlets({mainGrid: true, activityGrids: true}),\n      },\n    });\n  }\n\n  public destroy(): void {\n    this._perspectiveEnvironmentInjector.destroy();\n  }\n}\n\n/**\n * Provides the currently active perspective in the workbench.\n */\nexport const ACTIVE_PERSPECTIVE = new InjectionToken<Signal<ɵWorkbenchPerspective | undefined>>('ACTIVE_PERSPECTIVE', {\n  providedIn: 'root',\n  factory: (): Signal<ɵWorkbenchPerspective | undefined> => {\n    const layout = inject(WorkbenchLayoutService).layout;\n    const workbenchPerspectiveRegistry = inject(WORKBENCH_PERSPECTIVE_REGISTRY);\n    const workbenchStartup = inject(WorkbenchStartup);\n\n    return computed(() => {\n      // Perspectives are not registered until the workbench startup is complete.\n      if (!workbenchStartup.done()) {\n        return undefined;\n      }\n\n      const perspectiveId = layout().perspectiveId;\n      if (!perspectiveId) {\n        return undefined; // The initial perspective has not been activated yet.\n      }\n\n      return workbenchPerspectiveRegistry.get(perspectiveId);\n    });\n  },\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 */\nimport {ApplicationInitStatus, createEnvironmentInjector, EnvironmentInjector, inject, Injectable, runInInjectionContext, Signal, signal} from '@angular/core';\nimport {ACTIVE_PERSPECTIVE, ɵWorkbenchPerspective} from './ɵworkbench-perspective.model';\nimport {WorkbenchPerspectiveDefinition} from './workbench-perspective.model';\nimport {WorkbenchLayoutStorageService} from '../layout/workbench-layout-storage.service';\nimport {ANONYMOUS_PERSPECTIVE_ID_PREFIX} from '../workbench.constants';\nimport {MAIN_AREA} from '../layout/workbench-layout';\nimport {WorkbenchConfig} from '../workbench-config';\nimport {WorkbenchLayoutFactory} from '../layout/workbench-layout.factory';\nimport {WORKBENCH_PERSPECTIVE_REGISTRY} from './workbench-perspective.registry';\n\n/**\n * Enables registration and activation of perspectives.\n */\n@Injectable({providedIn: 'root'})\nexport class WorkbenchPerspectiveService {\n\n  private readonly _workbenchConfig = inject(WorkbenchConfig);\n  private readonly _perspectiveRegistry = inject(WORKBENCH_PERSPECTIVE_REGISTRY);\n  private readonly _environmentInjector = inject(EnvironmentInjector);\n  private readonly _applicationInitStatus = inject(ApplicationInitStatus);\n  private readonly _layoutStorageService = inject(WorkbenchLayoutStorageService);\n\n  private readonly _switchingPerspective = signal(false);\n  private readonly _resettingPerspective = signal(false);\n\n  public readonly activePerspective = inject(ACTIVE_PERSPECTIVE);\n\n  public async init(): Promise<void> {\n    await this.registerPerspectivesFromConfig();\n    await this.registerAnonymousPerspectiveFromWindowName();\n    await this.activateInitialPerspective();\n  }\n\n  /**\n   * Registers perspectives configured in {@link WorkbenchConfig}.\n   */\n  private async registerPerspectivesFromConfig(): Promise<void> {\n    const layout = this._workbenchConfig.layout;\n\n    // Create perspective from layout (if any).\n    if (typeof layout === 'function') {\n      await this.registerPerspective({id: DEFAULT_WORKBENCH_PERSPECTIVE_ID, layout});\n    }\n    // Register configured perspectives (if any).\n    else if (layout?.perspectives?.length) {\n      for (const perspective of layout.perspectives) {\n        await this.registerPerspective(perspective);\n      }\n    }\n    // Register default perspective if no perspective is registered.\n    else if (this._perspectiveRegistry.isEmpty()) {\n      await this.registerPerspective({id: DEFAULT_WORKBENCH_PERSPECTIVE_ID, layout: (factory: WorkbenchLayoutFactory) => factory.addPart(MAIN_AREA)});\n    }\n  }\n\n  /**\n   * Registers an anonymous perspective if the window name indicates it.\n   * The perspective is marked transient, with its layout only memoized, not persisted.\n   */\n  private async registerAnonymousPerspectiveFromWindowName(): Promise<void> {\n    const windowPerspectiveId = parsePerspectiveIdFromWindowName();\n    if (windowPerspectiveId?.startsWith(ANONYMOUS_PERSPECTIVE_ID_PREFIX)) {\n      await this.registerPerspective({\n        id: windowPerspectiveId,\n        layout: factory => factory.addPart(MAIN_AREA),\n        transient: true,\n      });\n    }\n  }\n\n  /**\n   * Registers the given perspective to arrange views around the main area.\n   */\n  public async registerPerspective(definition: WorkbenchPerspectiveDefinition): Promise<void> {\n    const perspectiveId = definition.id;\n\n    if (this._perspectiveRegistry.has(perspectiveId)) {\n      throw Error(`Failed to register perspective '${perspectiveId}'. Another perspective is already registered under that identity.`);\n    }\n    if (definition.canActivate && !(await runInInjectionContext(this._environmentInjector, () => definition.canActivate!()))) {\n      return;\n    }\n\n    this._perspectiveRegistry.register(perspectiveId, this.createPerspective(definition));\n  }\n\n  private createPerspective(definition: WorkbenchPerspectiveDefinition): ɵWorkbenchPerspective {\n    // Construct the handle in an injection context that shares the perspective's lifecycle, allowing for automatic cleanup of effects and RxJS interop functions.\n    const perspectiveEnvironmentInjector = createEnvironmentInjector([], this._environmentInjector, `Workbench Perspective ${definition.id}`);\n    return runInInjectionContext(perspectiveEnvironmentInjector, () => new ɵWorkbenchPerspective(definition));\n  }\n\n  /**\n   * Switches to the specified perspective. The main area will not change, if any.\n   *\n   * @param id - Specifies the id of the perspective to activate.\n   * @param options - Controls activation of the perspective.\n   * @param options.storePerspectiveAsActive - Controls if to store the perspective as the active perspective. Defaults to `true`.\n   * @return `true` if activated the perspective, otherwise `false`.\n   */\n  public async switchPerspective(id: string, options?: {storePerspectiveAsActive?: boolean}): Promise<boolean> {\n    if (this.activePerspective()?.id === id) {\n      return true;\n    }\n\n    // Switch perspective.\n    this._switchingPerspective.set(true);\n    const activated = await this._perspectiveRegistry.get(id).activate().finally(() => this._switchingPerspective.set(false));\n\n    // Store activated perspective.\n    if (activated && (options?.storePerspectiveAsActive ?? true)) {\n      await this._layoutStorageService.storeActivePerspectiveId(id);\n      window.name = generatePerspectiveWindowName(id);\n    }\n    return activated;\n  }\n\n  /**\n   * Resets the currently active perspective to its initial layout. The main area will not change.\n   */\n  public async resetPerspective(): Promise<void> {\n    const activePerspective = this.activePerspective();\n    if (!activePerspective) {\n      return;\n    }\n    this._resettingPerspective.set(true);\n    try {\n      await activePerspective.reset();\n    }\n    finally {\n      this._resettingPerspective.set(false);\n    }\n  }\n\n  /**\n   * Indicates when switching perspective.\n   */\n  public get switchingPerspective(): Signal<boolean> {\n    return this._switchingPerspective;\n  }\n\n  /**\n   * Indicates when resetting perspective.\n   */\n  public get resettingPerspective(): Signal<boolean> {\n    return this._resettingPerspective;\n  }\n\n  /**\n   * Activates the initial perspective.\n   */\n  private async activateInitialPerspective(): Promise<void> {\n    if (this._perspectiveRegistry.isEmpty()) {\n      throw Error('[NullPerspectiveError] No perspective found to activate.');\n    }\n\n    const perspectiveId = await this.determineInitialPerspective() ?? this._perspectiveRegistry.objects()[0]!.id;\n    const activation = this.switchPerspective(perspectiveId, {storePerspectiveAsActive: false});\n\n    // Switching perspective blocks until the initial navigation has been performed. By default, Angular performs\n    // the initial navigation after running app initializers. Therefore, do not await perspective activation when\n    // starting the workbench during app initialization. Otherwise, Angular would never complete app initialization.\n    if (this._applicationInitStatus.done as boolean) {\n      await activation;\n    }\n  }\n\n  /**\n   * Determines which perspective to activate, with the following precedence:\n   *\n   * 1. Perspective defined as window name.\n   * 2. Perspective defined in storage.\n   * 3. Perspective configured in the workbench config.\n   */\n  private async determineInitialPerspective(): Promise<string | undefined> {\n    // Find perspective in window name.\n    const perspectiveFromWindow = parsePerspectiveIdFromWindowName();\n    if (perspectiveFromWindow && this._perspectiveRegistry.has(perspectiveFromWindow)) {\n      return perspectiveFromWindow;\n    }\n\n    // Find perspective in storage.\n    const perspectiveFromStorage = await this._layoutStorageService.loadActivePerspectiveId();\n    if (perspectiveFromStorage && this._perspectiveRegistry.has(perspectiveFromStorage)) {\n      return perspectiveFromStorage;\n    }\n\n    // Find perspective in config.\n    const perspectiveFromConfig = typeof this._workbenchConfig.layout === 'object' && this._workbenchConfig.layout.initialPerspective;\n    if (typeof perspectiveFromConfig === 'string') {\n      return perspectiveFromConfig;\n    }\n    if (typeof perspectiveFromConfig === 'function') {\n      return (await runInInjectionContext(this._environmentInjector, () => perspectiveFromConfig([...this._perspectiveRegistry.objects()])));\n    }\n    return undefined;\n  }\n}\n\n/**\n * Identifier for the \"default\" perspective that the workbench creates if not providing a named layout.\n */\nconst DEFAULT_WORKBENCH_PERSPECTIVE_ID = 'default';\n\n/**\n * Generates the window name for given perspective to control which perspective to display in a window.\n */\nexport function generatePerspectiveWindowName(perspectiveId: string): string {\n  return `scion.workbench.perspective.${perspectiveId}`;\n}\n\n/**\n * Parses the perspective identity from the window name, returning `null` if not set.\n */\nfunction parsePerspectiveIdFromWindowName(): string | null {\n  const windowNameRegex = new RegExp(`^${generatePerspectiveWindowName('(?<perspective>.+)')}$`);\n  return window.name.match(windowNameRegex)?.groups!['perspective'] ?? null;\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 {WorkbenchPartActionFn} from '../workbench.model';\nimport {InjectionToken} from '@angular/core';\nimport {WorkbenchObjectRegistry} from '../registry/workbench-object-registry';\n\n/**\n * Registry for {@link WorkbenchPartAction} factory functions.\n */\nexport const WORKBENCH_PART_ACTION_REGISTRY = new InjectionToken<WorkbenchObjectRegistry<WorkbenchPartActionFn, WorkbenchPartActionFn>>('WORKBENCH_PART_ACTION_REGISTRY', {\n  providedIn: 'root',\n  factory: () => new WorkbenchObjectRegistry<WorkbenchPartActionFn, WorkbenchPartActionFn>(),\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 {DOCUMENT, effect, inject, Injectable, untracked} from '@angular/core';\nimport {fromMutation$} from '@scion/toolkit/observable';\nimport {map, subscribeOn} from 'rxjs/operators';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {renderingFlag} from '../layout/rendering-flag';\nimport {readCssVariable} from '../common/dom.util';\nimport {animationFrameScheduler} from 'rxjs';\n\n/**\n * Enables switching between workbench themes.\n */\n@Injectable({providedIn: 'root'})\nexport class WorkbenchThemeSwitcher {\n\n  /**\n   * Specifies the workbench theme.\n   *\n   * Defaults to the `sci-theme` attribute set on the HTML root element, or to the user's OS color scheme preference if not set.\n   *\n   * Built-in themes: `scion-light` and `scion-dark`.\n   */\n  public readonly theme = renderingFlag<string | null>(\n    'scion.workbench.theme',\n    readCssVariable(inject(DOCUMENT).documentElement, '--sci-theme', null),\n  );\n\n  constructor() {\n    this.installThemeAttributeSynchronizer();\n  }\n\n  /**\n   * Synchronizes {@link WorkbenchService.settings.theme} and 'sci-theme' attribute on HTML root element.\n   *\n   * ```html\n   * <html [attr.sci-theme]=\"workbenchService.settings.theme\">\n   *   ...\n   * </html>\n   * ```\n   */\n  private installThemeAttributeSynchronizer(): void {\n    const documentRoot = inject(DOCUMENT).documentElement;\n\n    // Add theme attribute to the HTML root element.\n    effect(() => {\n      const theme = this.theme();\n      untracked(() => {\n        if (theme) {\n          documentRoot.setAttribute('sci-theme', theme);\n        }\n        else {\n          documentRoot.removeAttribute('sci-theme');\n        }\n      });\n    });\n\n    // Read theme from HTML root element.\n    fromMutation$(documentRoot, {attributeFilter: ['sci-theme']})\n      .pipe(\n        subscribeOn(animationFrameScheduler), // ensure styles of theme to be applied when reading computed styles\n        map(() => getComputedStyle(documentRoot).getPropertyValue('--sci-theme') || null),\n        takeUntilDestroyed(),\n      )\n      .subscribe(theme => {\n        this.theme.set(theme);\n      });\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 {WorkbenchViewMenuItemFn} from '../workbench.model';\nimport {InjectionToken} from '@angular/core';\nimport {WorkbenchObjectRegistry} from '../registry/workbench-object-registry';\n\n/**\n * Registry for {@link WorkbenchMenuItem} factory functions to contribute menu items to the context menu of views.\n */\nexport const WORKBENCH_VIEW_MENU_ITEM_REGISTRY = new InjectionToken<WorkbenchObjectRegistry<WorkbenchViewMenuItemFn, WorkbenchViewMenuItemFn>>('WORKBENCH_VIEW_MENU_ITEM_REGISTRY', {\n  providedIn: 'root',\n  factory: () => new WorkbenchObjectRegistry<WorkbenchViewMenuItemFn, WorkbenchViewMenuItemFn>(),\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 {assertNotInReactiveContext, computed, DOCUMENT, inject, Injectable, Signal, untracked} from '@angular/core';\nimport {WorkbenchPartActionFn, WorkbenchTheme, WorkbenchViewMenuItemFn} from './workbench.model';\nimport {Disposable} from './common/disposable';\nimport {WorkbenchService} from './workbench.service';\nimport {WorkbenchRouter} from './routing/workbench-router.service';\nimport {WORKBENCH_VIEW_REGISTRY} from './view/workbench-view.registry';\nimport {WorkbenchPerspectiveService} from './perspective/workbench-perspective.service';\nimport {WorkbenchPerspectiveDefinition} from './perspective/workbench-perspective.model';\nimport {WORKBENCH_PART_REGISTRY} from './part/workbench-part.registry';\nimport {ɵWorkbenchView} from './view/ɵworkbench-view.model';\nimport {ɵWorkbenchPart} from './part/ɵworkbench-part.model';\nimport {ɵWorkbenchPerspective} from './perspective/ɵworkbench-perspective.model';\nimport {WORKBENCH_PERSPECTIVE_REGISTRY} from './perspective/workbench-perspective.registry';\nimport {WORKBENCH_PART_ACTION_REGISTRY} from './part/workbench-part-action.registry';\nimport {WorkbenchThemeSwitcher} from './theme/workbench-theme-switcher.service';\nimport {ViewId} from './view/workbench-view.model';\nimport {WorkbenchLayoutService} from './layout/workbench-layout.service';\nimport {PartId} from './part/workbench-part.model';\nimport {WORKBENCH_VIEW_MENU_ITEM_REGISTRY} from './view/workbench-view-menu-item.registry';\n\n@Injectable({providedIn: 'root'})\nexport class ɵWorkbenchService implements WorkbenchService {\n\n  private readonly _workbenchRouter = inject(WorkbenchRouter);\n  private readonly _perspectiveRegistry = inject(WORKBENCH_PERSPECTIVE_REGISTRY);\n  private readonly _partRegistry = inject(WORKBENCH_PART_REGISTRY);\n  private readonly _partActionRegistry = inject(WORKBENCH_PART_ACTION_REGISTRY);\n  private readonly _viewMenuItemRegistry = inject(WORKBENCH_VIEW_MENU_ITEM_REGISTRY);\n  private readonly _viewRegistry = inject(WORKBENCH_VIEW_REGISTRY);\n  private readonly _perspectiveService = inject(WorkbenchPerspectiveService);\n\n  public readonly layout = inject(WorkbenchLayoutService).layout;\n  public readonly perspectives = inject(WORKBENCH_PERSPECTIVE_REGISTRY).objects;\n  public readonly parts = inject(WORKBENCH_PART_REGISTRY).objects;\n  public readonly views = inject(WORKBENCH_VIEW_REGISTRY).objects;\n  public readonly activePerspective = inject(WorkbenchPerspectiveService).activePerspective;\n  public readonly theme = this.computeLegacyThemeObject();\n  public readonly settings = {\n    theme: inject(WorkbenchThemeSwitcher).theme,\n    panelAlignment: inject(WorkbenchLayoutService).panelAlignment,\n    panelAnimation: inject(WorkbenchLayoutService).panelAnimation,\n  };\n\n  /** @inheritDoc */\n  public getPerspective(perspectiveId: string): ɵWorkbenchPerspective | null {\n    return this._perspectiveRegistry.get(perspectiveId, {orElse: null});\n  }\n\n  /** @inheritDoc */\n  public getPart(partId: PartId): ɵWorkbenchPart | null {\n    return this._partRegistry.get(partId, {orElse: null});\n  }\n\n  /** @inheritDoc */\n  public getView(viewId: ViewId): ɵWorkbenchView | null {\n    return this._viewRegistry.get(viewId, {orElse: null});\n  }\n\n  /** @inheritDoc */\n  public registerPerspective(perspective: WorkbenchPerspectiveDefinition): Promise<void> {\n    assertNotInReactiveContext(this.registerPerspective, 'Call WorkbenchService.registerPerspective() in a non-reactive (non-tracking) context, such as within the untracked() function.');\n    return this._perspectiveService.registerPerspective(perspective);\n  }\n\n  /** @inheritDoc */\n  public switchPerspective(id: string): Promise<boolean> {\n    assertNotInReactiveContext(this.switchPerspective, 'Call WorkbenchService.switchPerspective() in a non-reactive (non-tracking) context, such as within the untracked() function.');\n    return this._perspectiveService.switchPerspective(id);\n  }\n\n  /** @inheritDoc */\n  public async resetPerspective(): Promise<void> {\n    assertNotInReactiveContext(this.resetPerspective, 'Call WorkbenchService.resetPerspective() in a non-reactive (non-tracking) context, such as within the untracked() function.');\n    await this._perspectiveService.resetPerspective();\n  }\n\n  /** @inheritDoc */\n  public async closeViews(...viewIds: ViewId[]): Promise<boolean> {\n    assertNotInReactiveContext(this.closeViews, 'Call WorkbenchService.closeViews() in a non-reactive (non-tracking) context, such as within the untracked() function.');\n    return this._workbenchRouter.navigate(layout => viewIds.reduce((layout, viewId) => layout.removeView(viewId), layout));\n  }\n\n  /** @inheritDoc */\n  public registerPartAction(fn: WorkbenchPartActionFn): Disposable {\n    assertNotInReactiveContext(this.registerPartAction, 'Call WorkbenchService.registerPartAction() in a non-reactive (non-tracking) context, such as within the untracked() function.');\n    this._partActionRegistry.register(fn, fn);\n    return {\n      dispose: () => this._partActionRegistry.unregister(fn),\n    };\n  }\n\n  /** @inheritDoc */\n  public registerViewMenuItem(fn: WorkbenchViewMenuItemFn): Disposable {\n    assertNotInReactiveContext(this.registerViewMenuItem, 'Call WorkbenchService.registerViewMenuItem() in a non-reactive (non-tracking) context, such as within the untracked() function.');\n    this._viewMenuItemRegistry.register(fn, fn);\n    return {\n      dispose: () => this._viewMenuItemRegistry.unregister(fn),\n    };\n  }\n\n  /** @inheritDoc */\n  public async switchTheme(theme: string): Promise<void> {\n    assertNotInReactiveContext(this.switchTheme, 'Call WorkbenchService.switchTheme() in a non-reactive (non-tracking) context, such as within the untracked() function.');\n    this.settings.theme.set(theme);\n  }\n\n  private computeLegacyThemeObject(): Signal<WorkbenchTheme | null> {\n    const documentElement = inject(DOCUMENT).documentElement;\n\n    return computed(() => {\n      const theme = this.settings.theme();\n\n      return untracked(() => {\n        if (!theme) {\n          return null;\n        }\n\n        return {\n          name: theme,\n          colorScheme: getComputedStyle(documentElement).colorScheme as 'light' | 'dark',\n        };\n      });\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 {Disposable} from './common/disposable';\nimport {WorkbenchPartActionFn, WorkbenchTheme, WorkbenchViewMenuItemFn} from './workbench.model';\nimport {ViewId, WorkbenchView} from './view/workbench-view.model';\nimport {WorkbenchPerspective, WorkbenchPerspectiveDefinition} from './perspective/workbench-perspective.model';\nimport {PartId, WorkbenchPart} from './part/workbench-part.model';\nimport {Injectable, Signal, WritableSignal} from '@angular/core';\nimport {ɵWorkbenchService} from './ɵworkbench.service';\nimport {WorkbenchLayout} from './layout/workbench-layout';\n\n/**\n * The central class of the SCION Workbench.\n *\n * SCION Workbench enables the creation of Angular web applications that require a flexible layout to display content side-by-side\n * or stacked, all personalizable by the user via drag & drop. This type of layout is ideal for applications with non-linear workflows,\n * enabling users to work on content in parallel.\n *\n * An application can have multiple layouts, called perspectives. A perspective defines an arrangement of parts and views.\n * Parts can be docked to the side or positioned relative to each other. Views are stacked in parts and can be dragged to other parts.\n * 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 last layout of each perspective,\n * restoring it the next time it is activated.\n *\n * A perspective typically has a main area part and other parts docked to the side, providing navigation and context-sensitive assistance to support\n * the user's workflow. Initially empty or displaying a welcome page, the main area is where the workbench opens new views by default. Users can split\n * the main area (or any other part) by dragging views side-by-side, vertically and horizontally, even across windows.\n *\n * Unlike any other part, the main area is shared between perspectives, and its layout is not reset when resetting perspectives. Having a main area and\n * multiple perspectives is optional.\n */\n@Injectable({providedIn: 'root', useExisting: ɵWorkbenchService})\nexport abstract class WorkbenchService {\n\n  /**\n   * Provides the layout of the workbench.\n   *\n   * The layout is an immutable object. Modifications have no side effects. The layout can be modified using {@link WorkbenchRouter.navigate}.\n   */\n  public abstract readonly layout: Signal<WorkbenchLayout>;\n\n  /**\n   * Provides the handles of the perspectives registered in the workbench.\n   *\n   * Each handle represents a perspective registered in the workbench. The handle has methods to interact with the perspective.\n   * Perspectives are registered via {@link WorkbenchConfig} passed to {@link provideWorkbench} or via {@link WorkbenchService}.\n   */\n  public abstract readonly perspectives: Signal<WorkbenchPerspective[]>;\n\n  /**\n   * Provides the active perspective, or `undefined` if none is active (e.g., during workbench startup).\n   */\n  public abstract readonly activePerspective: Signal<WorkbenchPerspective | undefined>;\n\n  /**\n   * Returns the handle of the specified perspective, or `null` if not found.\n   */\n  public abstract getPerspective(perspectiveId: string): WorkbenchPerspective | null;\n\n  /**\n   * Registers the given perspective.\n   *\n   * The perspective can be activated via {@link WorkbenchService#switchPerspective}.\n   */\n  public abstract registerPerspective(perspective: WorkbenchPerspectiveDefinition): Promise<void>;\n\n  /**\n   * Switches to the specified perspective.\n   *\n   * Switching perspective does not change the layout of the main area, if any.\n   */\n  public abstract switchPerspective(id: string): Promise<boolean>;\n\n  /**\n   * Resets the currently active perspective to its initial layout. Resetting the perspective does not change the layout of the main area, if any.\n   */\n  public abstract resetPerspective(): Promise<void>;\n\n  /**\n   * Provides the handles of the parts in the current workbench layout.\n   *\n   * Each handle represents a part in the layout. The handle has methods to interact with the part. Parts are added to the layout via {@link WorkbenchRouter}.\n   */\n  public abstract readonly parts: Signal<WorkbenchPart[]>;\n\n  /**\n   * Returns the handle of the specified part, or `null` if not found.\n   *\n   * A handle represents a part in the layout. The handle has methods to interact with the part. A part is added to the layout via {@link WorkbenchRouter}.\n   */\n  public abstract getPart(partId: PartId): WorkbenchPart | null;\n\n  /**\n   * Provides the handles of the views in the current workbench layout.\n   *\n   * Each handle represents a view in the layout. The handle has methods to interact with the view. Views are opened via {@link WorkbenchRouter}.\n   */\n  public abstract readonly views: Signal<WorkbenchView[]>;\n\n  /**\n   * Returns the handle of the specified view, or `null` if not found.\n   *\n   * A handle represents a view in the layout. The handle has methods to interact with the view. A view is opened via {@link WorkbenchRouter}.\n   */\n  public abstract getView(viewId: ViewId): WorkbenchView | null;\n\n  /**\n   * Closes the specified workbench views.\n   *\n   * Note: This instruction runs asynchronously via URL routing.\n   */\n  public abstract closeViews(...viewIds: ViewId[]): Promise<boolean>;\n\n  /**\n   * Registers a factory function to contribute an action to a {@link WorkbenchPart}.\n   *\n   * Part actions are displayed in the part bar, enabling interaction with the part and its content. Actions can be aligned to the left or right.\n   *\n   * The function:\n   * - Can return a component or template, or an object literal for an object literal for more control.\n   * - Is called per part. Returning the action adds it to the part, returning `null` skips it.\n   * - Can call `inject` to get any required dependencies.\n   * - Runs in a reactive context and is called again when tracked signals change.\n   *   Use Angular's untracked function to execute code outside this reactive context.\n   *\n   * Alternatively to registering a function, actions can be provided declaratively in HTML templates using the {@link WorkbenchPartActionDirective}.\n   *\n   * ```html\n   * <ng-template wbPartAction let-part>\n   *   ...\n   * </ng-template>\n   * ```\n   *\n   * @param fn - function to contribute an action.\n   * @return handle to unregister the action.\n   */\n  public abstract registerPartAction(fn: WorkbenchPartActionFn): Disposable;\n\n  /**\n   * Registers a factory function to contribute a menu item to the context menu of a {@link WorkbenchView}.\n   *\n   * Right-clicking on a view tab opens a context menu to interact with the view and its content.\n   *\n   * The function:\n   * - Is called per view. Returning the menu item adds it to the context menu of the view, returning `null` skips it.\n   * - Can call `inject` to get any required dependencies.\n   * - Runs in a reactive context and is called again when tracked signals change.\n   *   Use Angular's `untracked` function to execute code outside this reactive context.\n   *\n   * Alternatively to registering a function, menu items can be provided declaratively in HTML templates using the {@link WorkbenchViewMenuItemDirective}.\n   *\n   * ```html\n   * <ng-template wbViewMenuItem (action)=\"...\" let-view>\n   *   ...\n   * </ng-template>\n   * ```\n   *\n   * @param fn - function to contribute a menu item.\n   * @return handle to unregister the menu item.\n   */\n  public abstract registerViewMenuItem(fn: WorkbenchViewMenuItemFn): Disposable;\n\n  /**\n   * Switches the theme of the workbench.\n   *\n   * Themes can be registered when loading the `@scion/workbench` SCSS module in the application's `styles.scss` file.\n   * By default, SCION provides a light and a dark theme, `scion-light` and `scion-dark`.\n   *\n   * See the documentation of `@scion/workbench` SCSS module for more information.\n   *\n   * @param theme - The name of the theme to switch to.\n   *\n   * @deprecated since version 19.0.0-beta.3. Switch theme using `WorkbenchService.settings.theme` signal. API will be removed in version 21.\n   */\n  public abstract switchTheme(theme: string): Promise<void>;\n\n  /**\n   * Defines settings to adapt the workbench to personal preferences and working styles.\n   *\n   * Settings are stored in {@link WorkbenchConfig.storage} (defaults to local storage).\n   */\n  public abstract readonly settings: {\n    /**\n     * Specifies the workbench theme.\n     *\n     * Defaults to the `sci-theme` attribute set on the HTML root element, or to the user's OS color scheme preference if not set.\n     *\n     * Built-in themes: `scion-light` and `scion-dark`.\n     */\n    theme: WritableSignal<string | null>;\n    /**\n     * Controls the alignment of the bottom docked panel.\n     *\n     * Defaults to the `--sci-workbench-layout-panel-align` design token, or `justify` if not set.\n     */\n    panelAlignment: WritableSignal<'left' | 'right' | 'center' | 'justify'>;\n    /**\n     * Controls animation of docked panels.\n     *\n     * Defaults to the `--sci-workbench-layout-panel-animate` design token, or `true` if not set.\n     */\n    panelAnimation: WritableSignal<boolean>;\n  };\n\n  /**\n   * Provides the current workbench theme, if any.\n   *\n   * @deprecated since version 19.0.0-beta.3. Read the theme from `WorkbenchService.settings.theme` signal, and the color scheme from 'getComputedStyle(inject(DOCUMENT).documentElement).colorScheme'. API will be removed in version 21.\n   */\n  public abstract readonly theme: Signal<WorkbenchTheme | null>;\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 {InjectionToken, Signal} from '@angular/core';\n\n/**\n * Signature of a function to provide texts to the SCION Workbench.\n *\n * Texts starting with the percent symbol (`%`) are passed to the text provider for translation, with the percent symbol omitted.\n * Otherwise, the text is returned as is.\n *\n * A text provider can be registered via configuration passed to the {@link provideWorkbench} function.\n *\n * The function:\n * - Can call `inject` to get any required dependencies.\n * - Can call `toSignal` to convert an Observable to a Signal.\n *\n * @param key - Key for which to provide the text.\n * @param params - Parameters associated with the translation key.\n * @return The text associated with the provided key, or `undefined` if not found.\n */\nexport type WorkbenchTextProviderFn = (key: string, params: {[name: string]: string}) => Signal<string> | string | undefined;\n\n/**\n * Represents either a text or a key for translation.\n *\n * A translation key starts with the percent symbol (`%`) and can include parameters in matrix notation.\n * Key and parameters are passed to {@link WorkbenchConfig.textProvider} for translation.\n *\n * Examples:\n * - `text`: no translatable text\n * - `%key`: translation key\n * - `%key;param=value`: translation key with a single param\n * - `%key;param1=value1;param2=value2`: translation key with multiple parameters\n */\nexport type Translatable = string | `%${string}`;\n\n/**\n * DI token for injecting text providers to localize the SCION Workbench.\n *\n * Multiple text providers can be registered. Providers are called in registration order.\n * If a provider does not provide the text, the next provider is called, and so on.\n */\nexport const WORKBENCH_TEXT_PROVIDER = new InjectionToken<WorkbenchTextProviderFn>('WORKBENCH_TEXT_PROVIDER');\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 {assertNotInReactiveContext, computed, createEnvironmentInjector, DestroyRef, EnvironmentInjector, inject, Injector, isSignal, runInInjectionContext, signal, Signal, untracked} from '@angular/core';\nimport {Translatable, WORKBENCH_TEXT_PROVIDER, WorkbenchTextProviderFn} from './workbench-text-provider.model';\n\n/**\n * Provides the text for the given {@link Translatable} based on registered text providers.\n *\n * A {@link Translatable} is a string that, if starting with the percent symbol (`%`), is passed to the text provider for translation, with the percent symbol omitted.\n * Otherwise, the text is returned as is. A translation key can include parameters in matrix notation.\n *\n * Examples:\n * - `text`: no translatable text\n * - `%key`: translation key\n * - `%key;param=value`: translation key with a single param\n * - `%key;param1=value1;param2=value2`: translation key with multiple parameters\n *\n * The function:\n * - Must be called within an injection context, or an explicit {@link Injector} passed.\n * - Must be called in a non-reactive (non-tracking) context.\n *\n * @experimental since 20.0.0-beta.3; API and behavior may change in any version without notice.\n */\nexport function text(translatable: Signal<Translatable> | Translatable, options?: {injector?: Injector}): Signal<string>;\nexport function text(translatable: Signal<Translatable | undefined> | Translatable | undefined, options?: {injector?: Injector}): Signal<string | undefined>;\nexport function text(translatable: Signal<Translatable | null> | Translatable | null, options?: {injector?: Injector}): Signal<string | null>;\nexport function text(translatable: Signal<Translatable | undefined | null> | Translatable | undefined | null, options?: {injector?: Injector}): Signal<string | undefined | null>;\nexport function text(translatable: Signal<Translatable | undefined | null> | Translatable | undefined | null, options?: {injector?: Injector}): Signal<string | undefined | null> {\n  assertNotInReactiveContext(text, 'Call text() in a non-reactive (non-tracking) context, as it may allocate resources that are not released until the injection context is destroyed.');\n  const injector = options?.injector ?? inject(Injector);\n\n  // Use a separate injection context per translatable to clean up allocated resources when it changes.\n  let provideTextInjector: EnvironmentInjector | undefined;\n  injector.get(DestroyRef).onDestroy(() => provideTextInjector?.destroy());\n\n  // Call the text provider function.\n  const translation = computed(() => {\n    const keyOrText = isSignal(translatable) ? translatable() : translatable;\n\n    return untracked(() => {\n      // Destroy previous injection context (if any) to clean up allocated resources, like RxJS subscriptions.\n      provideTextInjector?.destroy();\n      // Create a separate injection context.\n      provideTextInjector = createEnvironmentInjector([], injector.get(EnvironmentInjector));\n      // Call text provider.\n      return runInInjectionContext(provideTextInjector, () => provideText(keyOrText));\n    });\n  });\n\n  // Track translation in separate reactive context to not call the text provider function on translation change.\n  return computed(() => translation()());\n}\n\n/**\n * Provides the text for the given {@link Translatable} based on text providers registered under the {@link WORKBENCH_TEXT_PROVIDER} DI token.\n *\n * Multiple text providers can be registered. Providers are called in registration order. If a provider does not provide the text, the next provider is called, and so on.\n */\nfunction provideText(translatable: Translatable | undefined | null): Signal<string | undefined | null> {\n  const textProviders = inject(WORKBENCH_TEXT_PROVIDER, {optional: true}) as WorkbenchTextProviderFn[] | null;\n  if (!textProviders?.length || !translatable?.startsWith('%') || translatable === '%') {\n    return signal(translatable);\n  }\n\n  const {key, params} = parseTranslatable(translatable as `%${string}`);\n  for (const textProvider of textProviders) {\n    const text = textProvider(key, params);\n    if (text !== undefined) {\n      return isSignal(text) ? text : signal(text);\n    }\n  }\n  return signal(translatable);\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 param\n * - %key;param1=value1;param2=value2 // translation key with multiple parameters\n */\nfunction parseTranslatable(translationKey: `%${string}`): {key: string; params: Record<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): Record<string, string> {\n  if (!matrixParams?.length) {\n    return {};\n  }\n\n  const params: Record<string, string> = {};\n  for (const match of escapeSemicolon(matrixParams).matchAll(/(?<paramName>[^=;]+)=(?<paramValue>[^;]*)/g)) {\n    const {paramName, paramValue} = match.groups!;\n    params[unescapeSemicolon(paramName!)] = unescapeSemicolon(paramValue!);\n  }\n  return params;\n\n  /**\n   * Replaces escaped semicolons (`\\;`) with the placeholder (`ɵ`) to prevent interpretation as key-value separators.\n   */\n  function escapeSemicolon(value: string): string {\n    return value.replaceAll('\\\\;', 'ɵ');\n  }\n\n  /**\n   * Restores escaped semicolons by replacing the placeholder (`ɵ`) back to semicolons (`;`).\n   */\n  function unescapeSemicolon(value: string): string {\n    return value.replaceAll('ɵ', ';');\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 {Pipe, PipeTransform, signal, Signal, untracked} from '@angular/core';\nimport {Translatable} from './workbench-text-provider.model';\nimport {text} from './text';\n\n/**\n * Enables the translation of a given {@link Translatable}.\n *\n * A {@link Translatable} is a string that, if starting with the percent symbol (`%`), is passed to the text provider for translation, with the percent symbol omitted.\n * Otherwise, the text is returned as is. A translation key can include parameters in matrix notation.\n *\n * Examples:\n * - `text`: no translatable text\n * - `%key`: translation key\n * - `%key;param=value`: translation key with a single param\n * - `%key;param1=value1;param2=value2`: translation key with multiple parameters\n *\n * @experimental since 20.0.0-beta.3; API and behavior may change in any version without notice.\n */\n@Pipe({name: 'wbText'})\nexport class TextPipe implements PipeTransform {\n\n  private _translatable = signal<Translatable | undefined | null>(undefined);\n  private _text = text(this._translatable);\n\n  public transform(translatable: Translatable): Signal<string>;\n  public transform(translatable: Translatable | undefined): Signal<string | undefined>;\n  public transform(translatable: Translatable | null): Signal<string | null>;\n  public transform(translatable: Translatable | undefined | null): Signal<string | undefined | null> {\n    // DO NOT call text() on key change to avoid stale RxJS subscriptions of previous texts,\n    // as allocated resources are only cleaned up when the injection context, such as this pipe, is destroyed.\n    untracked(() => this._translatable.set(translatable));\n    return this._text;\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 {UrlSegment} from '@angular/router';\nimport {CanCloseFn, CanCloseRef, WorkbenchMenuItem} from '../workbench.model';\nimport {WorkbenchPart} from '../part/workbench-part.model';\nimport {NavigationData, NavigationState} from '../routing/routing.model';\nimport {Signal} from '@angular/core';\nimport {ViewOutlet} from '../workbench.constants';\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 component can inject this handle to interact with the view.\n *\n * @see WorkbenchRouter\n */\nexport abstract class WorkbenchView {\n\n  /**\n   * Unique identity of this view.\n   *\n   * @see alternativeId\n   */\n  public abstract readonly id: ViewId;\n\n  /**\n   * Alternative identity of this view.\n   *\n   * A view can have an alternative id, a meaningful but not necessarily unique name. A view can\n   * be identified either by its unique or alternative id.\n   *\n   * @see id\n   */\n  public abstract readonly alternativeId: string | undefined;\n\n  /**\n   * Provides navigation details of this view.\n   *\n   * A view can be navigated using {@link WorkbenchRouter#navigate} or {@link WorkbenchLayout#navigateView}.\n   */\n  public abstract readonly navigation: Signal<WorkbenchViewNavigation | undefined>;\n\n  /**\n   * Hint passed to the navigation.\n   *\n   * @deprecated since version 19.0.0-beta.2. Use {@link navigation.hint} instead. API will be removed in version 21.\n   */\n  public abstract readonly navigationHint: Signal<string | undefined>;\n\n  /**\n   * Data passed to the navigation.\n   *\n   * @deprecated since version 19.0.0-beta.2. Use {@link navigation.data} instead. API will be removed in version 21.\n   */\n  public abstract readonly navigationData: Signal<NavigationData>;\n\n  /**\n   * State passed to the navigation.\n   *\n   * @deprecated since version 19.0.0-beta.2. Use {@link navigation.state} instead. API will be removed in version 21.\n   */\n  public abstract readonly navigationState: Signal<NavigationState>;\n\n  /**\n   * Part which contains this view.\n   *\n   * Note: the part of a view can change, e.g., when the view is moved to another part.\n   */\n  public abstract readonly part: Signal<WorkbenchPart>;\n\n  /**\n   * Title displayed in the view tab.\n   */\n  public abstract get title(): Signal<Translatable | null>;\n  public abstract set title(title: Translatable | null);\n\n  /**\n   * Subtitle displayed in the view tab.\n   */\n  public abstract get heading(): Signal<Translatable | null>;\n  public abstract set heading(heading: Translatable | null);\n\n  /**\n   * Specifies CSS class(es) to add to the view, e.g., to locate the view in tests.\n   */\n  public abstract get cssClass(): Signal<string[]>;\n  public abstract set cssClass(cssClass: string | string[]);\n\n  /**\n   * Indicates whether the view has unsaved changes.\n   * If marked as dirty, a visual indicator is displayed in the view tab.\n   */\n  public abstract get dirty(): Signal<boolean>;\n  public abstract set dirty(dirty: boolean);\n\n  /**\n   * Controls whether the view can be closed. Defaults to `true`.\n   */\n  public abstract get closable(): Signal<boolean>;\n  public abstract set closable(closable: boolean);\n\n  /**\n   * Computes whether this view can be effectively closed based on its current state, e.g., is closable and not blocked.\n   *\n   * @internal\n   */\n  public abstract readonly isClosable: Signal<boolean>;\n\n  /**\n   * Indicates whether this view is active or inactive.\n   */\n  public abstract readonly active: Signal<boolean>;\n\n  /**\n   * The position of this view in the tabbar.\n   */\n  public abstract readonly position: Signal<number>;\n\n  /**\n   * `True` when this view is the first view in the tabbar.\n   */\n  public abstract readonly first: Signal<boolean>;\n\n  /**\n   * `True` when this view is the last view in the tabbar.\n   */\n  public abstract readonly last: Signal<boolean>;\n\n  /**\n   * Indicates whether the tab of this view is scrolled into the tabbar.\n   */\n  public abstract readonly scrolledIntoView: Signal<boolean>;\n\n  /**\n   * Menu items associated with this view.\n   */\n  public abstract readonly menuItems: Signal<WorkbenchMenuItem[]>;\n\n  /**\n   * Indicates whether this view is destroyed.\n   */\n  public abstract readonly destroyed: boolean;\n\n  /**\n   * URL associated with this view.\n   *\n   * @deprecated since version 19.0.0-beta.2. Use {@link navigation.path} instead. API will be removed in version 21.\n   */\n  public abstract readonly urlSegments: Signal<UrlSegment[]>;\n\n  /**\n   * Activates this view.\n   *\n   * Note: This instruction runs asynchronously via URL routing.\n   */\n  public abstract activate(): Promise<boolean>;\n\n  /**\n   * Destroys this view (or sibling views) and the associated routed component.\n   *\n   * Note: This instruction runs asynchronously via URL routing.\n   *\n   * @param target\n   *        Allows to control which view(s) to close:\n   *\n   *        - self: closes this view\n   *        - all-views: closes all views of this part\n   *        - other-views: closes the other views of this part\n   *        - views-to-the-right: closes the views to the right of this view\n   *        - views-to-the-left: closes the views to the left of this view\n   *\n   */\n  public abstract close(target?: 'self' | 'all-views' | 'other-views' | 'views-to-the-right' | 'views-to-the-left'): Promise<boolean>;\n\n  /**\n   * Moves this view to a new browser window.\n   */\n  public abstract move(target: 'new-window'): void;\n\n  /**\n   * Moves this view to a different or new part in the specified region.\n   *\n   * Specifying a target workbench identifier allows the view to be moved to a workbench in a different browser window.\n   * The target workbench ID is available via {@link WORKBENCH_ID} DI token in the target application.\n   */\n  public abstract move(partId: string, options?: {region?: 'north' | 'south' | 'west' | 'east'; workbenchId?: string}): void;\n\n  /**\n   * Registers a guard to confirm closing the view, replacing any previous guard.\n   *\n   * The callback can call `inject` to get dependencies.\n   *\n   * Example:\n   * ```ts\n   * import {inject} from '@angular/core';\n   * import {WorkbenchMessageBoxService, WorkbenchView} from '@scion/workbench';\n   *\n   * inject(WorkbenchView).canClose(async () => {\n   *   if (!inject(WorkbenchView).dirty()) {\n   *     return true;\n   *   }\n   *   const action = await inject(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 * Format of a view identifier.\n *\n * Each view is assigned a unique identifier (e.g., `view.1`, `view.2`, etc.).\n * A view can also have an alternative id, a meaningful but not necessarily unique name. A view can\n * be identified either by its unique or alternative id.\n */\nexport type ViewId = ViewOutlet;\n\n/**\n * Provides navigation details of a workbench view.\n */\nexport interface WorkbenchViewNavigation {\n  /**\n   * Unique ID per navigation.\n   *\n   * @internal\n   */\n  id: string;\n\n  /**\n   * Path of this view.\n   */\n  path: UrlSegment[];\n\n  /**\n   * Hint passed to the navigation.\n   */\n  hint?: string;\n\n  /**\n   * Data passed to the navigation.\n   */\n  data?: NavigationData;\n\n  /**\n   * State passed to the navigation.\n   */\n  state?: NavigationState;\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 {WorkbenchPartAction} from '../workbench.model';\nimport {ViewId} from '../view/workbench-view.model';\nimport {Signal} from '@angular/core';\nimport {PartOutlet} from '../workbench.constants';\nimport {NavigationData, NavigationState} from '../routing/routing.model';\nimport {UrlSegment} from '@angular/router';\n\n/**\n * A part is a visual workbench element to create the workbench layout. Parts can be docked to the side or\n * positioned relative to each other. A part can be a stack of views or display content.\n *\n * The part component can inject this handle to interact with the part.\n *\n * @see WorkbenchView\n */\nexport abstract class WorkbenchPart {\n\n  /**\n   * Unique identity of this part.\n   */\n  public abstract readonly id: PartId;\n\n  /**\n   * Alternative identity of this part.\n   *\n   * A part can have an alternative id, a meaningful but not necessarily unique name. A part can\n   * be identified either by its unique or alternative id.\n   *\n   * @see id\n   */\n  public abstract readonly alternativeId: string | undefined;\n\n  /**\n   * Title displayed in the part bar.\n   *\n   * Note that the title of the top-leftmost part of a docked part cannot be changed.\n   */\n  public abstract get title(): Signal<string | undefined>;\n  public abstract set title(title: string | undefined);\n\n  /**\n   * Indicates whether this part is located in the workbench main area.\n   */\n  public abstract readonly isInMainArea: boolean;\n\n  /**\n   * Indicates whether this part is located in the workbench peripheral area.\n   */\n  public abstract readonly peripheral: Signal<boolean>;\n\n  /**\n   * Indicates whether this part is the top-leftmost part.\n   */\n  public abstract readonly topLeft: Signal<boolean>;\n\n  /**\n   * Indicates whether this part is the top-rightmost part.\n   */\n  public abstract readonly topRight: Signal<boolean>;\n\n  /**\n   * Indicates whether this part is active or inactive.\n   */\n  public abstract readonly active: Signal<boolean>;\n\n  /**\n   * Identifies the active view, or `null` if none.\n   */\n  public abstract readonly activeViewId: Signal<ViewId | null>;\n\n  /**\n   * Identifies views opened in this part.\n   */\n  public abstract readonly viewIds: Signal<ViewId[]>;\n\n  /**\n   * Actions associated with this part.\n   */\n  public abstract readonly actions: Signal<WorkbenchPartAction[]>;\n\n  /**\n   * Specifies CSS class(es) to add to the part, e.g., to locate the part in tests.\n   */\n  public abstract get cssClass(): Signal<string[]>;\n  public abstract set cssClass(cssClass: string | string[]);\n\n  /**\n   * Provides navigation details of this part.\n   *\n   * A part can be navigated to display content when its view stack is empty.\n   * A navigated part can still have views but won't display navigated content unless its view stack is empty.\n   *\n   * A part can be navigated using {@link WorkbenchLayout#navigatePart}.\n   */\n  public abstract readonly navigation: Signal<WorkbenchPartNavigation | undefined>;\n}\n\n/**\n * Format of a part identifier.\n *\n * Each part is assigned a unique identifier (e.g., `part.9fdf7ab4`, `part.c6485225`, etc.).\n * A part can also have an alternative id, a meaningful but not necessarily unique name. A part can\n * be identified either by its unique or alternative id.\n */\nexport type PartId = PartOutlet;\n\n/**\n * Provides navigation details of a workbench part.\n */\nexport interface WorkbenchPartNavigation {\n  /**\n   * Unique ID per navigation.\n   *\n   * @internal\n   */\n  id: string;\n\n  /**\n   * Path of this part.\n   */\n  path: UrlSegment[];\n\n  /**\n   * Hint passed to the navigation.\n   */\n  hint?: string;\n\n  /**\n   * Data passed to the navigation.\n   */\n  data?: NavigationData;\n\n  /**\n   * State passed to the navigation.\n   */\n  state?: NavigationState;\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 {signal, Signal, untracked} from '@angular/core';\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 component can inject this handle to interact with the dialog, such as setting the title or closing the dialog.\n *\n * Dialog inputs are available as input properties in the dialog component.\n */\nexport abstract class WorkbenchDialog<R = unknown> {\n\n  /**\n   * Sets the title of the dialog.\n   */\n  public abstract get title(): Signal<Translatable | undefined>;\n  public abstract set title(title: Translatable | undefined);\n\n  /**\n   * Specifies the preferred dialog size.\n   */\n  public abstract readonly size: WorkbenchDialogSize;\n\n  /**\n   * Controls if to apply a padding to the content of the dialog. Defaults to `true`.\n   *\n   * This setting does not affect the padding of the dialog header and footer.\n   *\n   * The default padding can be changed via the CSS variable `--sci-workbench-dialog-padding`.\n   */\n  public abstract get padding(): Signal<boolean>;\n  public abstract set padding(padding: boolean);\n\n  /**\n   * Specifies if to display a close button in the dialog header. Defaults to `true`.\n   */\n  public abstract get closable(): Signal<boolean>;\n  public abstract set closable(closable: boolean);\n\n  /**\n   * Specifies if the user can resize the dialog. Defaults to `true`.\n   */\n  public abstract get resizable(): Signal<boolean>;\n  public abstract set resizable(resizable: boolean);\n\n  /**\n   * Specifies CSS class(es) to add to the dialog, e.g., to locate the dialog in tests.\n   */\n  public abstract get cssClass(): Signal<string[]>;\n  public abstract set cssClass(cssClass: string | string[]);\n\n  /**\n   * Closes the dialog. Optionally, pass a result or an error to the dialog opener.\n   */\n  public abstract close(result?: R | Error): void;\n}\n\n/**\n * Represents the preferred dialog size.\n */\nexport interface WorkbenchDialogSize {\n\n  /**\n   * Specifies the minimum height of the dialog.\n   */\n  get minHeight(): Signal<string | undefined>;\n\n  set minHeight(minHeight: string | undefined);\n\n  /**\n   * Specifies the height of the dialog, displaying a vertical scrollbar if its content overflows.\n   * If not specified, the dialog adapts its height to its context height, respecting any `minHeight' or `maxHeight' constraint.\n   */\n  get height(): Signal<string | undefined>;\n\n  set height(height: string | undefined);\n\n  /**\n   * Specifies the maximum height of the dialog.\n   */\n  get maxHeight(): Signal<string | undefined>;\n\n  set maxHeight(maxHeight: string | undefined);\n\n  /**\n   * Specifies the minimum width of the dialog.\n   */\n  get minWidth(): Signal<string | undefined>;\n\n  set minWidth(minWidth: string | undefined);\n\n  /**\n   * Specifies the width of the dialog, displaying a horizontal scrollbar if its content overflows.\n   * If not specified, the dialog adapts its width to its context width, respecting any `minWidth' or `maxWidth' constraint.\n   */\n  get width(): Signal<string | undefined>;\n\n  set width(width: string | undefined);\n\n  /**\n   * Specifies the maximum width of the dialog.\n   */\n  get maxWidth(): Signal<string | undefined>;\n\n  set maxWidth(maxWidth: string | undefined);\n}\n\n/** @inheritDoc */\nexport class ɵWorkbenchDialogSize implements WorkbenchDialogSize {\n\n  private readonly _minHeight = signal<string | undefined>(undefined);\n  private readonly _height = signal<string | undefined>(undefined);\n  private readonly _maxHeight = signal<string | undefined>(undefined);\n  private readonly _minWidth = signal<string | undefined>(undefined);\n  private readonly _width = signal<string | undefined>(undefined);\n  private readonly _maxWidth = signal<string | undefined>(undefined);\n\n  /** @inheritDoc */\n  public get minHeight(): Signal<string | undefined> {\n    return this._minHeight;\n  }\n\n  /** @inheritDoc */\n  public set minHeight(minHeight: string | undefined) {\n    untracked(() => this._minHeight.set(minHeight));\n  }\n\n  /** @inheritDoc */\n  public get height(): Signal<string | undefined> {\n    return this._height;\n  }\n\n  /** @inheritDoc */\n  public set height(height: string | undefined) {\n    untracked(() => this._height.set(height));\n  }\n\n  /** @inheritDoc */\n  public get maxHeight(): Signal<string | undefined> {\n    return this._maxHeight;\n  }\n\n  /** @inheritDoc */\n  public set maxHeight(maxHeight: string | undefined) {\n    untracked(() => this._maxHeight.set(maxHeight));\n  }\n\n  /** @inheritDoc */\n  public get minWidth(): Signal<string | undefined> {\n    return this._minWidth;\n  }\n\n  /** @inheritDoc */\n  public set minWidth(minWidth: string | undefined) {\n    untracked(() => this._minWidth.set(minWidth));\n  }\n\n  /** @inheritDoc */\n  public get width(): Signal<string | undefined> {\n    return this._width;\n  }\n\n  /** @inheritDoc */\n  public set width(width: string | undefined) {\n    untracked(() => this._width.set(width));\n  }\n\n  /** @inheritDoc */\n  public get maxWidth(): Signal<string | undefined> {\n    return this._maxWidth;\n  }\n\n  /** @inheritDoc */\n  public set maxWidth(maxWidth: string | undefined) {\n    untracked(() => this._maxWidth.set(maxWidth));\n  }\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 {Injectable, OnDestroy} from '@angular/core';\nimport {ɵWorkbenchDialog} from './ɵworkbench-dialog';\nimport {BehaviorSubject, Observable} from 'rxjs';\nimport {distinctUntilChanged, map} from 'rxjs/operators';\nimport {ViewId} from '../view/workbench-view.model';\n\n/**\n * Registry for {@link ɵWorkbenchDialog} objects.\n */\n@Injectable({providedIn: 'root'})\nexport class WorkbenchDialogRegistry implements OnDestroy {\n\n  private _dialogs$ = new BehaviorSubject<ɵWorkbenchDialog[]>([]);\n\n  public register(dialog: ɵWorkbenchDialog): void {\n    this._dialogs$.next(this._dialogs$.value.concat(dialog));\n  }\n\n  public unregister(dialog: ɵWorkbenchDialog): void {\n    this._dialogs$.next(this._dialogs$.value.filter(candidate => candidate !== dialog));\n  }\n\n  public indexOf(dialog: ɵWorkbenchDialog): number {\n    const index = this.dialogs({viewId: dialog.context.view?.id}).indexOf(dialog);\n    if (index === -1) {\n      throw Error('[NullDialogError] Dialog not found');\n    }\n    return index;\n  }\n\n  /**\n   * Returns currently opened dialogs, sorted by the time they were opened, based on the specified filter.\n   */\n  public dialogs(filter?: {viewId?: ViewId} | ((dialog: ɵWorkbenchDialog) => boolean)): ɵWorkbenchDialog[] {\n    const filterFn = typeof filter === 'function' ? filter : (dialog: ɵWorkbenchDialog) => !filter?.viewId || dialog.context.view?.id === filter.viewId;\n    return this._dialogs$.value.filter(filterFn);\n  }\n\n  /**\n   * Observes the topmost dialog in the given context.\n   *\n   * If a view context is specified, the topmost dialog that overlays that view is returned.\n   * This can be either a view-modal or an application-modal dialog. Otherwise, returns\n   * the topmost application-modal dialog.\n   */\n  public top$(context?: {viewId?: ViewId}): Observable<ɵWorkbenchDialog | null> {\n    return this._dialogs$\n      .pipe(\n        map(() => this.top(context)),\n        distinctUntilChanged(),\n      );\n  }\n\n  /**\n   * Returns the topmost dialog in the given context.\n   *\n   * If a view context is specified, the topmost dialog that overlays that view is returned.\n   * This can be either a view-modal or an application-modal dialog. Otherwise, returns\n   * the topmost application-modal dialog.\n   */\n  public top(context?: {viewId?: ViewId}): ɵWorkbenchDialog | null {\n    return this.dialogs(dialog => !dialog.context.view || dialog.context.view.id === context?.viewId).at(-1) ?? null;\n  }\n\n  public ngOnDestroy(): void {\n    this._dialogs$.value.forEach(dialog => dialog.destroy());\n    this._dialogs$.next([]);\n  }\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 {fromEvent, merge, Observable, Subject} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\n/**\n * Allows sending events between browsing contexts of this origin.\n *\n * Like the native `BroadcastChannel`, but also receives events posted on this channel instance.\n */\nexport class WorkbenchBroadcastChannel<T> {\n\n  /**\n   * Channel to transport events to other `BroadcastChannel` instances.\n   */\n  private _broadcastChannel: BroadcastChannel;\n  /**\n   * Subject to transport events to this instance since the native `BroadcastChannel` transports events only to other `BroadcastChannel` instances.\n   */\n  private _localBrowsingContextEvent$ = new Subject<T>();\n  /**\n   * Receives events posted on this broadcast channel. Events are received across app instances of the same origin.\n   */\n  public readonly observe$: Observable<T>;\n\n  constructor(name: string) {\n    this._broadcastChannel = new BroadcastChannel(name);\n    this.observe$ = merge(this._localBrowsingContextEvent$, fromEvent<MessageEvent<T>>(this._broadcastChannel, 'message').pipe(map(event => event.data)));\n  }\n\n  /**\n   * Posts the given event to app instances of this origin.\n   */\n  public postMessage(event?: T): void {\n    this._localBrowsingContextEvent$.next(event as T); // Emit locally since the native broadcast channel does not emit on the instance that posted the message.\n    this._broadcastChannel.postMessage(event);\n  }\n\n  public destroy(): void {\n    this._broadcastChannel.close();\n    this._localBrowsingContextEvent$.complete();\n  }\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 {Injectable} from '@angular/core';\n\n/**\n * Provides instants for the activation of workbench components like parts or views.\n */\n@Injectable({providedIn: 'root'})\nexport class ActivationInstantProvider {\n\n  /**\n   * Provides the current instant.\n   */\n  public now(): number {\n    return Date.now();\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 {Arrays} from '@scion/toolkit/util';\nimport {computed, Signal, signal} from '@angular/core';\n\n/**\n * Container for managing CSS classes set in different scopes.\n */\nexport class ClassList {\n\n  private readonly _layout = signal<string[]>([], {equal: isEqualArray});\n  private readonly _navigation = signal<string[]>([], {equal: isEqualArray});\n  private readonly _route = signal<string[]>([], {equal: isEqualArray});\n  private readonly _application = signal<string[]>([], {equal: isEqualArray});\n\n  /**\n   * CSS classes as list.\n   */\n  public readonly asList: Signal<string[]>;\n\n  /**\n   * CSS classes as {@link Map} grouped by scope.\n   */\n  public readonly asMap: Signal<ClassListMap>;\n\n  constructor() {\n    this.asList = computed(() => Arrays.distinct(new Array<string>()\n      .concat(this._layout())\n      .concat(this._navigation())\n      .concat(this._route())\n      .concat(this._application())));\n\n    this.asMap = computed(() => removeEmptyEntries(new Map<ClassListScopes, string[]>()\n      .set('layout', this._layout())\n      .set('navigation', this._navigation())\n      .set('route', this._route())\n      .set('application', this._application())));\n  }\n\n  /**\n   * Specifies CSS classes defined by the layout.\n   */\n  public set layout(cssClasses: string | string[] | null | undefined) {\n    this._layout.set(Arrays.coerce(cssClasses));\n  }\n\n  /**\n   * Returns CSS classes defined in the scope 'layout'.\n   */\n  public get layout(): Signal<string[]> {\n    return this._layout;\n  }\n\n  /**\n   * Specifies CSS classes associated with the navigation.\n   */\n  public set navigation(cssClasses: string | string[] | null | undefined) {\n    this._navigation.set(Arrays.coerce(cssClasses));\n  }\n\n  /**\n   * Returns CSS classes defined in the scope 'navigation'.\n   */\n  public get navigation(): Signal<string[]> {\n    return this._navigation;\n  }\n\n  /**\n   * Specifies CSS classes defined by the route.\n   */\n  public set route(cssClasses: string | string[] | null | undefined) {\n    this._route.set(Arrays.coerce(cssClasses));\n  }\n\n  /**\n   * Returns CSS classes defined in the scope 'route'.\n   */\n  public get route(): Signal<string[]> {\n    return this._route;\n  }\n\n  /**\n   * Specifies CSS classes set by the application.\n   */\n  public set application(cssClasses: string | string[] | null | undefined) {\n    this._application.set(Arrays.coerce(cssClasses));\n  }\n\n  /**\n   * Returns classes defined in the scope 'application'.\n   */\n  public get application(): Signal<string[]> {\n    return this._application;\n  }\n}\n\n/**\n * Represents scopes used in {@link ClassList}.\n *\n * `layout`: Use for CSS classes defined on the layout.\n * `navigation`: Use for CSS classes associated with the navigation.\n * `route`: Use for CSS classes defined on the route.\n * `application`: Use for CSS classes set by the application.\n */\nexport type ClassListScopes = 'layout' | 'navigation' | 'route' | 'application';\n\n/**\n * CSS classes grouped by scope.\n */\nexport type ClassListMap = ReadonlyMap<ClassListScopes, string[]>;\n\n/**\n * Creates a copy with empty map entries removed.\n */\nfunction removeEmptyEntries<K, V>(map: Map<K, V[]>): Map<K, V[]> {\n  const copy = new Map<K, V[]>(map);\n  for (const key of copy.keys()) {\n    if (!copy.get(key)?.length) {\n      copy.delete(key);\n    }\n  }\n  return copy;\n}\n\n/**\n * Compares two arrays of strings for equality, ignoring element order.\n */\nfunction isEqualArray(a: string[], b: string[]): boolean {\n  return Arrays.isEqual(a, b, {exactOrder: false});\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\n/**\n * Keys for associating workbench-specific data with a route in {@link Route.data}.\n *\n * @see Route.data\n */\nexport const WorkbenchRouteData = {\n\n  /**\n   * Property to set the title of a view in {@link Route.data}.\n   *\n   * Use a {@link Translatable} to localize the title.\n   */\n  title: 'ɵworkbenchViewTitle',\n\n  /**\n   * Property to set the heading of a view in {@link Route.data}.\n   *\n   * Use a {@link Translatable} to localize the heading.\n   */\n  heading: 'ɵworkbenchViewHeading',\n\n  /**\n   * Property to associate CSS class(es) with a workbench element in {@link Route.data}, e.g., to locate it in tests.\n   */\n  cssClass: 'ɵworkbenchCssClass',\n\n  /**\n   * @internal\n   *\n   * Property to obtain the outlet name of the route. This property is only set on the top-level route.\n   *\n   * Use if the route's injection context is not available, e.g., in a {@link UrlMatcher}.\n   * Otherwise, the outlet can be injected using the {@link WORKBENCH_AUXILIARY_ROUTE_OUTLET} DI token,\n   * even in child routes, e.g., in guards.\n   */\n  ɵoutlet: 'ɵworkbenchOutlet',\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 */\nimport {assertNotInReactiveContext, computed, effect, EnvironmentInjector, inject, Injector, IterableDiffers, runInInjectionContext, Signal, signal, TemplateRef, untracked, WritableSignal} from '@angular/core';\nimport {Arrays} from '@scion/toolkit/util';\nimport {WorkbenchPartAction, WorkbenchPartActionFn} from '../workbench.model';\nimport {PartId, WorkbenchPart, WorkbenchPartNavigation} from './workbench-part.model';\nimport {WORKBENCH_VIEW_REGISTRY} from '../view/workbench-view.registry';\nimport {ComponentPortal, ComponentType} from '@angular/cdk/portal';\nimport {ActivationInstantProvider} from '../activation-instant.provider';\nimport {ɵWorkbenchLayout} from '../layout/ɵworkbench-layout';\nimport {WorkbenchLayoutService} from '../layout/workbench-layout.service';\nimport {ViewId} from '../view/workbench-view.model';\nimport {ActivatedRouteSnapshot, ChildrenOutletContexts} from '@angular/router';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {ɵWorkbenchRouter} from '../routing/ɵworkbench-router.service';\nimport {WORKBENCH_PART_ACTION_REGISTRY} from './workbench-part-action.registry';\nimport {ClassList} from '../common/class-list';\nimport {Routing} from '../routing/routing.util';\nimport {WorkbenchRouteData} from '../routing/workbench-route-data';\nimport {MPart, MTreeNode, WorkbenchGrids} from '../layout/workbench-grid.model';\nimport {WorkbenchLayouts} from '../layout/workbench-layouts.util';\nimport {MActivity} from '../activity/workbench-activity.model';\n\nexport class ɵWorkbenchPart implements WorkbenchPart {\n\n  private readonly _partEnvironmentInjector = inject(EnvironmentInjector);\n  private readonly _workbenchRouter = inject(ɵWorkbenchRouter);\n  private readonly _rootOutletContexts = inject(ChildrenOutletContexts);\n  private readonly _layout = inject(WorkbenchLayoutService).layout;\n  private readonly _viewRegistry = inject(WORKBENCH_VIEW_REGISTRY);\n  private readonly _activationInstantProvider = inject(ActivationInstantProvider);\n  private readonly _partComponent: ComponentType<PartComponent | MainAreaPartComponent>; // eslint-disable-line @typescript-eslint/no-duplicate-type-constituents\n  private readonly _title = signal<string | undefined>(undefined);\n  private readonly _titleComputed = this.computeTitle();\n\n  public readonly alternativeId: string | undefined;\n  public readonly navigation = signal<WorkbenchPartNavigation | undefined>(undefined);\n  public readonly active = signal(false);\n  public readonly viewIds = signal<ViewId[]>([], {equal: (a, b) => Arrays.isEqual(a, b, {exactOrder: true})});\n  public readonly activeViewId = signal<ViewId | null>(null);\n  public readonly gridName: WritableSignal<keyof WorkbenchGrids>;\n  public readonly peripheral = signal(false);\n  public readonly topLeft = signal(false);\n  public readonly topRight = signal(false);\n  public readonly activity = signal<MActivity | null>(null);\n  public readonly canMinimize = computed(() => this.activity() !== null && this.topRight());\n  public readonly actions: Signal<WorkbenchPartAction[]>;\n  public readonly classList = new ClassList();\n\n  private _isInMainArea: boolean | undefined;\n  private _activationInstant: number | undefined;\n\n  /**\n   * Reference to the HTML element of {@link PartComponent} or {@link MainAreaPartComponent}.\n   */\n  public partComponent = signal<HTMLElement | undefined>(undefined);\n\n  constructor(public readonly id: PartId, layout: ɵWorkbenchLayout, options: {component: ComponentType<PartComponent | MainAreaPartComponent>}) { // eslint-disable-line @typescript-eslint/no-duplicate-type-constituents\n    this.alternativeId = layout.part({partId: this.id}).alternativeId;\n    this._partComponent = options.component;\n    this.gridName = signal(layout.grid({partId: id}).gridName);\n    this.actions = this.computePartActions();\n    this.touchOnActivate();\n    this.installModelUpdater();\n    this.onLayoutChange({layout});\n  }\n\n  /**\n   * Constructs the portal using the given injection context.\n   */\n  public createPortalFromInjectionContext(injectionContext: Injector): ComponentPortal<PartComponent | MainAreaPartComponent> { // eslint-disable-line @typescript-eslint/no-duplicate-type-constituents\n    const injector = Injector.create({\n      parent: injectionContext,\n      providers: [\n        {provide: ɵWorkbenchPart, useValue: this},\n        {provide: WorkbenchPart, useExisting: ɵWorkbenchPart},\n      ],\n    });\n    return new ComponentPortal(this._partComponent, null, injector);\n  }\n\n  /**\n   * Method invoked when the workbench layout has changed.\n   *\n   * This method:\n   * - is called on every layout change, enabling the update of part properties defined in the layout (navigation hint, navigation data, ...).\n   * - is called on route activation (after destroyed the previous component (if any), but before constructing the new component).\n   */\n  private onLayoutChange(change: {layout: ɵWorkbenchLayout; route?: ActivatedRouteSnapshot; previousRoute?: ActivatedRouteSnapshot | null}): void {\n    const {layout, route, previousRoute} = change;\n\n    this._isInMainArea ??= layout.hasPart(this.id, {grid: 'mainArea'});\n    const mPart = layout.part({partId: this.id});\n    const {gridName, grid} = layout.grid({partId: this.id});\n    this.gridName.set(gridName);\n    this.peripheral.set(layout.isPeripheralPart(this.id));\n    this.active.set(grid.activePartId === this.id);\n    this.viewIds.set(mPart.views.map(view => view.id));\n    this.activeViewId.set(mPart.activeViewId ?? null);\n    this.activity.set(layout.activity({partId: this.id}, {orElse: null}));\n    this.topLeft.set(isTopLeft(grid.root, layout.part({partId: this.id})));\n    this.topRight.set(isTopRight(grid.root, layout.part({partId: this.id})));\n\n    this.classList.layout = mPart.cssClass;\n\n    // Test if a new route has been activated for this part.\n    const routeChanged = route && route.routeConfig !== previousRoute?.routeConfig;\n    if (routeChanged) {\n      this.classList.route = Routing.lookupRouteData(route, WorkbenchRouteData.cssClass);\n      this.classList.application = [];\n    }\n\n    // Test if this part was navigated. Navigation does not necessarily cause the route to change.\n    const navigationChanged = mPart.navigation?.id !== this.navigation()?.id;\n    if (navigationChanged) {\n      this.navigation.set(mPart.navigation && {\n        id: mPart.navigation.id,\n        hint: mPart.navigation.hint,\n        data: mPart.navigation.data,\n        state: layout.navigationState({outlet: this.id}),\n        path: layout.urlSegments({outlet: this.id}),\n      });\n      this.classList.navigation = mPart.navigation?.cssClass;\n    }\n  }\n\n  private computeTitle(): Signal<string | undefined> {\n    return computed(() => {\n      const activity = this.activity();\n\n      // If this part is not contained in an activity, return the title from the handle or layout.\n      if (!activity) {\n        return this._title() ?? this._layout().part({partId: this.id}).title;\n      }\n\n      // If this part is the top-leftmost part, return the activity title set on the layout.\n      if (this.topLeft()) {\n        return this._layout().part({partId: activity.referencePartId}).title;\n      }\n\n      // If this part is the reference part but not positioned top-leftmost, only return the handle's title, not the activity title set on the layout.\n      if (this.id === activity.referencePartId) {\n        return this._title();\n      }\n\n      // Default to the title set on the handle or defined on the layout.\n      return this._title() ?? this._layout().part({partId: this.id}).title;\n    });\n  }\n\n  /**\n   * Returns the component of this part. Returns `null` if not displaying navigated content.\n   */\n  public getComponent<T = unknown>(): T | null {\n    const outlet = Routing.resolveEffectiveOutletContext(this._rootOutletContexts.getContext(this.id))?.outlet;\n    return outlet?.isActivated ? outlet.component as T : null;\n  }\n\n  /**\n   * Activates this part.\n   *\n   * Note: This instruction runs asynchronously via URL routing.\n   */\n  public async activate(): Promise<boolean> {\n    assertNotInReactiveContext(this.activate, 'Call WorkbenchPart.activate() in a non-reactive (non-tracking) context, such as within the untracked() function.');\n    if (this.active()) {\n      return true;\n    }\n\n    const currentLayout = this._layout();\n    return this._workbenchRouter.navigate(\n      layout => currentLayout === layout ? layout.activatePart(this.id) : null, // cancel navigation if the layout has become stale\n      {skipLocationChange: true}, // do not add part activation into browser session history stack\n    );\n  }\n\n  public get activationInstant(): number | undefined {\n    return this._activationInstant;\n  }\n\n  /** @inheritDoc */\n  public get isInMainArea(): boolean {\n    return this._isInMainArea ?? false;\n  }\n\n  /**\n   * Reference to the handle's injector. The injector will be destroyed when removing the part.\n   */\n  public get injector(): Injector {\n    return this._partEnvironmentInjector;\n  }\n\n  /** @inheritDoc */\n  public get title(): Signal<string | undefined> {\n    return this._titleComputed;\n  }\n\n  /** @inheritDoc */\n  public set title(title: string | undefined) {\n    untracked(() => this._title.set(title));\n  }\n\n  /** @inheritDoc */\n  public set cssClass(cssClass: string | string[]) {\n    untracked(() => this.classList.application = cssClass);\n  }\n\n  /** @inheritDoc */\n  public get cssClass(): Signal<string[]> {\n    return this.classList.application;\n  }\n\n  /**\n   * Computes actions matching this part.\n   */\n  private computePartActions(): Signal<WorkbenchPartAction[]> {\n    const injector = Injector.create({\n      parent: inject(Injector),\n      providers: [\n        {provide: ɵWorkbenchPart, useValue: this},\n        {provide: WorkbenchPart, useExisting: ɵWorkbenchPart},\n      ],\n    });\n\n    // Use a differ to avoid re-creating every action on registration or change.\n    const differ = inject(IterableDiffers).find([]).create<WorkbenchPartActionFn>();\n    const partActionRegistry = inject(WORKBENCH_PART_ACTION_REGISTRY);\n    const partActions = new Map<WorkbenchPartActionFn, Signal<WorkbenchPartAction | null>>();\n\n    return computed(() => {\n      const changes = differ.diff(partActionRegistry.objects());\n      changes?.forEachAddedItem(({item: fn}) => partActions.set(fn, computed(() => runInInjectionContext(injector, () => constructAction(this, fn)))));\n      changes?.forEachRemovedItem(({item: fn}) => partActions.delete(fn));\n      return Array.from(partActions.values()).map(partAction => partAction()).filter(partAction => !!partAction);\n    }, {equal: (a, b) => Arrays.isEqual(a, b)});\n\n    function constructAction(part: WorkbenchPart, factoryFn: WorkbenchPartActionFn): WorkbenchPartAction | null {\n      const action: WorkbenchPartAction | ComponentType<unknown> | TemplateRef<unknown> | null = factoryFn(part);\n      if (action instanceof TemplateRef || typeof action === 'function') {\n        return {content: action};\n      }\n      return action;\n    }\n  }\n\n  /**\n   * Updates the activation instant when this part is activated.\n   */\n  private touchOnActivate(): void {\n    effect(() => {\n      if (this.active()) {\n        this._activationInstant = this._activationInstantProvider.now();\n      }\n    });\n  }\n\n  /**\n   * Sets up automatic synchronization of {@link WorkbenchPart} on every layout change.\n   *\n   * If the operation is cancelled (e.g., due to a navigation failure), it reverts the changes.\n   */\n  private installModelUpdater(): void {\n    Routing.activatedRoute$(this.id, {emitOn: 'always'})\n      .pipe(takeUntilDestroyed())\n      .subscribe(([previousRoute, route]: [ActivatedRouteSnapshot | null, ActivatedRouteSnapshot]) => {\n        const navigationContext = this._workbenchRouter.getCurrentNavigationContext();\n        const {layout, previousLayout, layoutDiff} = navigationContext;\n\n        if (layoutDiff.removedParts.includes(this.id)) {\n          return;\n        }\n\n        this.onLayoutChange({layout, route, previousRoute});\n\n        // Revert change in case the navigation fails.\n        if (previousLayout?.hasPart(this.id)) {\n          navigationContext.registerUndoAction(() => this.onLayoutChange({layout: previousLayout, route: previousRoute!, previousRoute: route}));\n        }\n      });\n  }\n\n  public destroy(): void {\n    this._partEnvironmentInjector.destroy();\n    // IMPORTANT: Only detach the active view, not destroy it, because views are explicitly destroyed when view handles are removed.\n    // Otherwise, moving the last view to another part would fail because the view would already be destroyed.\n    if (this.activeViewId()) {\n      this._viewRegistry.get(this.activeViewId()!, {orElse: null})?.portal.detach();\n    }\n  }\n}\n\n/**\n * Tests if this part is the top-leftmost part.\n */\nfunction isTopLeft(element: MTreeNode | MPart, testee: MPart): boolean {\n  if (element instanceof MPart) {\n    return element.id === testee.id;\n  }\n\n  const child1Visible = WorkbenchLayouts.isGridElementVisible(element.child1);\n  return isTopLeft(child1Visible ? element.child1 : element.child2, testee);\n}\n\n/**\n * Tests if this part is the top-rightmost part.\n */\nfunction isTopRight(element: MTreeNode | MPart, testee: MPart): boolean {\n  if (element instanceof MPart) {\n    return element.id === testee.id;\n  }\n\n  const child1Visible = WorkbenchLayouts.isGridElementVisible(element.child1);\n  const child2Visible = WorkbenchLayouts.isGridElementVisible(element.child2);\n\n  if (child1Visible && child2Visible) {\n    return element.direction === 'column' ? isTopRight(element.child1, testee) : isTopRight(element.child2, testee);\n  }\n  return isTopRight(child1Visible ? element.child1 : element.child2, testee);\n}\n\n/**\n * Represents a pseudo-type for the actual {@link PartComponent} which must not be referenced in order to avoid import cycles.\n */\ntype PartComponent = unknown;\n\n/**\n * Represents a pseudo-type for the actual {@link MainAreaPartComponent} which must not be referenced in order to avoid import cycles.\n */\ntype MainAreaPartComponent = unknown;\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 {InjectionToken} from '@angular/core';\nimport {UUID} from '@scion/toolkit/uuid';\n\n/**\n * DI token to get a unique id of the workbench.\n *\n * The id is different each time the app is reloaded. Different workbench windows have different ids.\n */\nexport const WORKBENCH_ID = new InjectionToken<string>('WORKBENCH_ID', {\n  providedIn: 'root',\n  factory: () => UUID.randomUUID(),\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 {computed, effect, inject, Injectable, Injector, isSignal, NgZone, OnDestroy, Signal, untracked} from '@angular/core';\nimport {BehaviorSubject, EMPTY, fromEvent, merge, mergeMap, mergeWith, MonoTypeOperatorFunction, Observable, Observer, Subject, switchMap, TeardownLogic} from 'rxjs';\nimport {filter, map} from 'rxjs/operators';\nimport {Arrays} from '@scion/toolkit/util';\nimport {WorkbenchBroadcastChannel} from '../communication/workbench-broadcast-channel';\nimport {observeIn, subscribeIn} from '@scion/toolkit/operators';\nimport {ViewId, WorkbenchViewNavigation} from '../view/workbench-view.model';\nimport {ClassListMap} from '../common/class-list';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {PartId} from '../part/workbench-part.model';\nimport {Translatable} from '../text/workbench-text-provider.model';\nimport {ActivityId, MActivity} from '../activity/workbench-activity.model';\nimport {MPartGrid} from '../layout/workbench-grid.model';\nimport {WorkbenchLayoutService} from '../layout/workbench-layout.service';\nimport {isActivityId, ɵWorkbenchLayout} from '../layout/ɵworkbench-layout';\nimport {ɵWorkbenchPart} from '../part/ɵworkbench-part.model';\nimport {WORKBENCH_ID} from '../workbench-id';\n\n/**\n * Coordinates cross application drag and drop of views.\n *\n * Views can only be moved across applications of the same origin.\n */\n@Injectable({providedIn: 'root'})\nexport class ViewDragService implements OnDestroy {\n\n  private readonly _injector = inject(Injector);\n  private readonly _workbenchId = inject(WORKBENCH_ID);\n  private readonly _zone = inject(NgZone);\n  private readonly _workbenchLayoutService = inject(WorkbenchLayoutService);\n  private readonly _viewDragStartBroadcastChannel = new WorkbenchBroadcastChannel<ViewDragData>('workbench/view/dragstart');\n  private readonly _viewDragEndBroadcastChannel = new WorkbenchBroadcastChannel<void>('workbench/view/dragend');\n  private readonly _viewMoveBroadcastChannel = new WorkbenchBroadcastChannel<ViewMoveEvent>('workbench/view/move');\n  private readonly _tabbarDragOver$ = new BehaviorSubject<PartId | false>(false);\n  private readonly _viewMoved$ = new Subject<ViewMoveEvent>();\n\n  /**\n   * Notifies when to move a view. The event is broadcasted to all application instances of the same origin.\n   */\n  public readonly viewMove$: Observable<ViewMoveEvent> = this._viewMoveBroadcastChannel.observe$;\n\n  /**\n   * Notifies when the layout of this application has been updated after a view move event.\n   */\n  public readonly viewMoved$: Observable<ViewMoveEvent> = this._viewMoved$;\n\n  /**\n   * Notifies when dragging a tab over a tabbar. The event is the id of the part being dragged over, or `false` if not dragging over a tabbar.\n   *\n   * Upon subscription, emits the current dragover state, and then each time the state changes. The observable never completes.\n   */\n  public readonly tabbarDragOver$: Observable<PartId | false> = this._tabbarDragOver$;\n\n  /**\n   * Provides the drag data of the current drag operation. Is `null` if no drag operation is in progress.\n   */\n  public readonly viewDragData = toSignal<ViewDragData | null>(\n    merge(\n      this._viewDragStartBroadcastChannel.observe$,\n      this._viewDragEndBroadcastChannel.observe$.pipe(map(() => null)),\n    ),\n    {initialValue: null},\n  );\n\n  /**\n   * Indicates if a drag operation is active across application instances of the same origin.\n   */\n  public readonly dragging = computed<boolean>(() => this.viewDragData() !== null);\n\n  constructor() {\n    this.installDragDetector();\n  }\n\n  /**\n   * Signals start dragging a tab over specified tabbar (dragenter).\n   */\n  public signalTabbarDragEnter(partId: PartId): void {\n    this._tabbarDragOver$.next(partId);\n  }\n\n  /**\n   * Signals end dragging a tab over specified tabbar (dragleave).\n   */\n  public signalTabbarDragLeave(partId: PartId): void {\n    if (this._tabbarDragOver$.value === partId) {\n      this._tabbarDragOver$.next(false);\n    }\n  }\n\n  /**\n   * Signals successful move of a view in the layout of this app instance.\n   */\n  public signalViewMoved(event: ViewMoveEvent): void {\n    this._viewMoved$.next(event);\n  }\n\n  /**\n   * Indicates if dragging a tab over a tabbar, returning the id of the part being dragged over, or `false` if not dragging over a tabbar.\n   */\n  public get isDragOverTabbar(): PartId | false {\n    return this._tabbarDragOver$.value;\n  }\n\n  /**\n   * Tests given event to be a view drag event of an app of this origin.\n   */\n  public isViewDragEvent(event: DragEvent): boolean {\n    if (!event.dataTransfer?.types.includes(VIEW_DRAG_TRANSFER_TYPE)) {\n      return false;\n    }\n    // Test the event to originate from an app of this origin.\n    return this.dragging();\n  }\n\n  /**\n   * Tests if a view can be dropped on the specified target.\n   */\n  public canDrop(target: ɵWorkbenchPart | MPartGrid | Signal<ɵWorkbenchPart | MPartGrid>): Signal<boolean> {\n    return computed(() => {\n      const dropTarget = isSignal(target) ? target() : target;\n      const dragData = this.viewDragData();\n\n      return untracked(() => {\n        if (!dragData) {\n          return false;\n        }\n\n        // Dragging a view from or to an activity is only valid within the same activity and application instance.\n        const dragSourceActivityId = dragData.activityId;\n        const dropTargetActivityId = getContainingActivity(dropTarget, this._workbenchLayoutService.layout())?.id;\n        if (dragSourceActivityId || dropTargetActivityId) {\n          return dragSourceActivityId === dropTargetActivityId && dragData.workbenchId === this._workbenchId;\n        }\n\n        return true;\n      });\n\n      /**\n       * Gets the activity that contains the specified element, or `null` if the element is not contained in an activity.\n       */\n      function getContainingActivity(element: ɵWorkbenchPart | MPartGrid, layout: ɵWorkbenchLayout): MActivity | null {\n        if (element instanceof ɵWorkbenchPart) {\n          return layout.activity({partId: element.id}, {orElse: null});\n        }\n\n        const gridName = layout.grid({grid: element}).gridName;\n        return isActivityId(gridName) ? layout.activity({id: gridName}) : null;\n      }\n    });\n  }\n\n  /**\n   * Listens for same-origin view drag events on the given target element.\n   *\n   * Unlike when installing a \"native\" event handler for `dragenter` and/or `dragleave` events,\n   * this observable does not emit when dragging over child elements of the target element.\n   *\n   * Following drag events are emitted:\n   * - dragstart: when start dragging a view tab\n   * - dragend: when end dragging a view tab\n   * - dragenter: when entering the target element while dragging a view tab\n   * - dragover: when dragging a view tab over the target element, every few hundred milliseconds\n   * - dragleave: when leaving the target element while dragging a view tab\n   * - drop: when dropping a view tab on a valid drop target\n   *\n   * As by design of native drag and drop, the `dragleave` event is not fired on drop action.\n   * Therefore, always handle both events, `dragleave` and `drop` events, respectively.\n   *\n   * @param target - Specifies the element on which to subscribe for drag events.\n   * @param options - Controls how to subscribe for drag events.\n   * @param options.eventType - Filters for specified drag events; defaults to any event.\n   * @param options.capture - Controls whether to subscribe for drag events in the capturing phase; defaults to `false`, i.e., `bubbling` phase.\n   */\n  public viewDrag$(target: Element | Window, options?: ViewDragEventListenerOptions): Observable<DragEvent> {\n    const filteredEventTypes = new Set<string>(Arrays.coerce(options?.eventType));\n    const isViewDragEvent = this.isViewDragEvent.bind(this);\n\n    return new Observable((observer: Observer<DragEvent>): TeardownLogic => {\n      const insideAngular = NgZone.isInAngularZone();\n\n      const subscription = merge(\n        shouldSubscribe('dragstart') ? dragstart$() : EMPTY,\n        shouldSubscribe('dragend') ? dragend$() : EMPTY,\n        shouldSubscribe('dragover') ? dragover$() : EMPTY,\n        shouldSubscribe('dragenter') || shouldSubscribe('dragleave') || shouldSubscribe('drop') ? dragenterOrDragleaveOrDrop$() : EMPTY,\n      )\n        .pipe(\n          subscribeIn(fn => this._zone.runOutsideAngular(fn)),\n          observeIn(fn => insideAngular ? this._zone.run(fn) : this._zone.runOutsideAngular(fn)),\n        )\n        .subscribe(observer);\n\n      return (): void => subscription.unsubscribe();\n    });\n\n    function dragstart$(): Observable<DragEvent> {\n      return fromEvent<DragEvent>(target, 'dragstart', options ?? {})\n        .pipe(filter(event => isViewDragEvent(event)));\n    }\n\n    function dragend$(): Observable<DragEvent> {\n      // The `dragend` event does not contain a drag transfer type.\n      // To filter view-related `dragend` events, we subscribe to view-related `dragstart` events in the first place.\n      // When receiving a `dragstart` event we subscribe for the next `dragend` event, expecting it to be view-related.\n      return fromEvent<DragEvent>(target, 'dragstart', options ?? {})\n        .pipe(\n          filter(event => isViewDragEvent(event)),\n          switchMap(() => fromEvent<DragEvent>(target, 'dragend', {...options, once: true})),\n        );\n    }\n\n    function dragover$(): Observable<DragEvent> {\n      return fromEvent<DragEvent>(target, 'dragover', options ?? {})\n        .pipe(filter(event => isViewDragEvent(event)));\n    }\n\n    function dragenterOrDragleaveOrDrop$(): Observable<DragEvent> {\n      // We emit `dragenter` only when entering the target element (or any child element) for the first time\n      // and only again after entering it again. The same applies for `dragleave`.\n      let dragEnterCount = 0;\n      return merge(\n        fromEvent<DragEvent>(target, 'dragenter', options ?? {}),\n        fromEvent<DragEvent>(target, 'dragleave', options ?? {}),\n        fromEvent<DragEvent>(target, 'drop', options ?? {}),\n      )\n        .pipe(\n          filter(event => isViewDragEvent(event)),\n          filter((event: DragEvent) => {\n            switch (event.type) {\n              case 'dragenter': {\n                return (++dragEnterCount === 1);\n              }\n              case 'dragleave':\n              case 'drop': {\n                return (--dragEnterCount === 0);\n              }\n              default:\n                return true;\n            }\n          }),\n          resetOnDragEnd(),\n          filter(event => shouldSubscribe(event.type)),\n        );\n\n      /**\n       * Resets `dragEnterCount` on `dragend` to prevent inconsistent state if `dragend` should not be triggered.\n       */\n      function resetOnDragEnd<T>(): MonoTypeOperatorFunction<T> {\n        return mergeWith(fromEvent<DragEvent>(target, 'dragend', options ?? {})\n          .pipe(mergeMap(() => {\n            dragEnterCount = 0;\n            return EMPTY;\n          })),\n        );\n      }\n    }\n\n    function shouldSubscribe(eventType: string): boolean {\n      return !filteredEventTypes.size || filteredEventTypes.has(eventType);\n    }\n  }\n\n  /**\n   * Dispatches the given view move event, broadcasting it to all application instances of the same origin.\n   */\n  public dispatchViewMoveEvent(event: ViewMoveEvent): void {\n    // Dispatch the event after the current drag operation, if any, has ended, preventing destruction of the drag source\n    // during the drag operation which would break the drag operation, i.e., `dragend` and `dragleave` events would not be fired.\n    this.onDragEnd(() => this._viewMoveBroadcastChannel.postMessage(event), {once: true, injector: this._injector});\n  }\n\n  /**\n   * Sets given drag data, broadcasting it to all application instances of the same origin.\n   *\n   * Invoke this method inside 'dragstart' event handler of the element where the drag operation started.\n   */\n  public setViewDragData(viewDragData: ViewDragData): void {\n    this._viewDragStartBroadcastChannel.postMessage(viewDragData);\n  }\n\n  /**\n   * Unsets the current drag data.\n   *\n   * Invoke this method inside 'dragend' event handler of the element where the drag operation started.\n   */\n  public unsetViewDragData(): void {\n    this._viewDragEndBroadcastChannel.postMessage();\n  }\n\n  /**\n   * Registers a callback to be executed when a drag operation ends, executing it immediately if no drag operation is in progress at the time of registration.\n   *\n   * Automatically unregisters the function when the current injection context or the provided injector is destroyed.\n   * Setting `once` unregisters the function after the first execution.\n   */\n  public onDragEnd(onDragEnd: () => void, options?: {injector?: Injector; once?: true}): void {\n    const effectRef = effect(() => {\n      if (!this.dragging()) {\n        untracked(() => onDragEnd());\n        options?.once && effectRef.destroy();\n      }\n    }, {injector: options?.injector});\n  }\n\n  /**\n   * Signals when start dragging a view.\n   */\n  private installDragDetector(): void {\n    effect(() => {\n      const dragging = this.dragging();\n      untracked(() => this._workbenchLayoutService.signalDragging(dragging));\n    });\n  }\n\n  public ngOnDestroy(): void {\n    this._viewMoveBroadcastChannel.destroy();\n    this._viewDragStartBroadcastChannel.destroy();\n    this._viewDragEndBroadcastChannel.destroy();\n  }\n}\n\n/**\n * Represents data of a view drag operation.\n */\nexport interface ViewDragData {\n  /**\n   * Unique id of the drag operation.\n   */\n  uid: string;\n  /**\n   * X-coordinate of the mouse pointer, relative to the view tab drag image.\n   */\n  viewTabPointerOffsetX: number;\n  /**\n   * Y-coordinate of the mouse pointer, relative to the view tab drag image.\n   */\n  viewTabPointerOffsetY: number;\n  viewId: ViewId;\n  partId: PartId;\n  activityId?: ActivityId;\n  alternativeViewId?: string;\n  viewTitle: Translatable | null;\n  viewHeading: Translatable | null;\n  navigation?: Omit<WorkbenchViewNavigation, 'id' | 'state'>;\n  viewClosable: boolean | 'disabled';\n  viewDirty: boolean;\n  viewTabWidth: number;\n  viewTabHeight: number;\n  viewTitleOffsetRight?: string | undefined;\n  workbenchId: string;\n  classList?: ClassListMap;\n}\n\n/**\n * Event for moving a view in the workbench layout.\n */\nexport interface ViewMoveEvent {\n  /**\n   * Describes which view to move.\n   */\n  source: ViewMoveEventSource;\n  /**\n   * Describes where to move the view.\n   */\n  target: ViewMoveEventTarget;\n  /**\n   * Drag data associated with this operation. Is only set if moving a view via drag and drop.\n   */\n  dragData?: ViewDragData;\n}\n\n/**\n * Describes which view to move.\n */\nexport interface ViewMoveEventSource {\n  viewId: ViewId;\n  partId: PartId;\n  navigation?: Omit<WorkbenchViewNavigation, 'id' | 'state'>;\n  alternativeViewId?: string;\n  workbenchId: string;\n  classList?: ClassListMap;\n}\n\n/**\n * Describes where to move a view.\n */\nexport interface ViewMoveEventTarget {\n  /**\n   * Part (or node) where (or relative to which) to add the view.\n   *\n   * Rules for different regions:\n   * - If not specifying a region, {@link elementId} is mandatory and must reference a part.\n   * - For regions `north`, `south`, `east`, or `west`, {@link elementId} can reference a part or node,\n   *   relative to which to align the view. If not set, the view is aligned relative to the root of\n   *   the entire layout.\n   *\n   * Note: Property is ignored when moving the view to a new window.\n   */\n  elementId?: PartId | string;\n  /**\n   * Region of {@link elementId} where to add the view (in a new part).\n   *\n   * If not specified, {@link elementId} must reference a part to which to add the view.\n   *\n   * Note:\n   * - Property is ignored when moving the view to a new window.\n   * - Property is required if {@link elementId} is a node.\n   */\n  region?: 'north' | 'east' | 'south' | 'west';\n  /**\n   * Position where to insert the view. The position is zero-based. If not set, adds the view after the active view.\n   */\n  position?: number | 'start' | 'end';\n  /**\n   * Identifier of the target workbench, or 'new-window' to move the view to a new browser window.\n   */\n  workbenchId: string | 'new-window';\n  /**\n   * Describes the part to be created if the region is 'north', 'east', 'south', or 'west'.\n   */\n  newPart?: {\n    /**\n     * Identity of the new part. If not set, assigns a random id.\n     */\n    id?: PartId;\n    /**\n     * 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/**\n * Controls how to subscribe to drag events.\n */\nexport interface ViewDragEventListenerOptions extends EventListenerOptions {\n  /**\n   * Controls which event(s) to subscribe.\n   */\n  eventType?: ViewDragEventType | ViewDragEventType[];\n}\n\n/**\n * Represents the type of drag event.\n */\nexport type ViewDragEventType = 'dragstart' | 'dragend' | 'dragenter' | 'dragover' | 'dragleave' | 'drop';\n\n/**\n * Transfer type for dragging a view.\n */\nexport const VIEW_DRAG_TRANSFER_TYPE = 'workbench/view';\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 {ComponentType} from '@angular/cdk/portal';\nimport {assertNotInReactiveContext, ComponentRef, createComponent, EnvironmentInjector, inject, Injector, Provider, Signal, signal, ViewContainerRef} from '@angular/core';\nimport {Logger, LoggerNames} from '../logging';\n\n/**\n * Like the Angular CDK 'ComponentPortal' but does not destroy the component on detach.\n *\n * IMPORTANT: In order for the component to have the \"correct\" injection context, construct it the time attaching it to the Angular component tree,\n * or by calling {@link createComponentFromInjectionContext}. The \"correct\" injection context is crucial, for example, if the portal is displayed\n * in a router outlet, so that child outlets can register with their logical parent outlet. The Angular router uses the logical outlet hierarchy to\n * resolve and activate child routes.\n *\n * @see WbComponentPortal\n */\nexport class WbComponentPortal<T = any> {\n\n  private _viewContainerRef: ViewContainerRef | null | undefined;\n  private _componentRef: ComponentRef<T> | null | undefined;\n  private _logger = inject(Logger);\n  private _attached = signal(false);\n\n  constructor(private _componentType: ComponentType<T>, private _options?: PortalOptions) {\n    // Do not construct the component here but the time attaching it to the Angular component tree. See the comment above.\n  }\n\n  /**\n   * Constructs the portal's component using given injection context.\n   */\n  private createComponent(elementInjector: Injector): ComponentRef<T> {\n    const componentRef = createComponent(this._componentType, {\n      elementInjector: Injector.create({\n        name: 'WbComponentPortalInjector',\n        parent: elementInjector,\n        providers: this._options?.providers ?? [],\n      }),\n      environmentInjector: elementInjector.get(EnvironmentInjector),\n    });\n    componentRef.onDestroy(() => this.onDestroy());\n    return componentRef;\n  }\n\n  /**\n   * Constructs the portal's component using the given injection context.\n   */\n  public createComponentFromInjectionContext(injectionContext: Injector): void {\n    if (this.isConstructed) {\n      throw Error(`[PortalConstructError] Component already constructed. [component=${this._componentType}]`);\n    }\n    this._componentRef = this.createComponent(injectionContext);\n    // Trigger change detection to complete the initialization of the component, necessary for components detached from the Angular component tree.\n    this._componentRef.changeDetectorRef.detectChanges();\n  }\n\n  /**\n   * Attaches this portal to the given {@link ViewContainerRef} according to the following rules:\n   *\n   * - If the component is not yet constructed, constructs it based on the given view container's injection context.\n   * - If already attached to the given view container, does nothing.\n   * - If already attached to a different view container, detaches it first.\n   */\n  public attach(viewContainerRef: ViewContainerRef): void {\n    assertNotInReactiveContext(this.attach);\n    if (this.isAttachedTo(viewContainerRef)) {\n      return;\n    }\n    if (this.attached()) {\n      this.detach();\n    }\n\n    this._viewContainerRef = viewContainerRef;\n    this._componentRef = this._componentRef ?? this.createComponent(this._viewContainerRef.injector);\n    this._logger.debug(() => 'Attaching portal', LoggerNames.LIFECYCLE, this._componentRef);\n\n    this._componentRef.changeDetectorRef.reattach();\n    this._viewContainerRef.insert(this._componentRef.hostView);\n    this._attached.set(true);\n    (this._componentRef.instance as Partial<OnAttach>).onAttach?.();\n  }\n\n  /**\n   * Detaches this portal from its view container without destroying it. Does nothing if not attached.\n   *\n   * The portal is removed from the DOM and its change detector detached from the Angular change detector tree,\n   * so it will not be checked for changes until it is reattached.\n   */\n  public detach(): void {\n    assertNotInReactiveContext(this.detach);\n    if (!this.attached()) {\n      return;\n    }\n\n    this._logger.debug(() => 'Detaching portal', LoggerNames.LIFECYCLE, this._componentRef);\n    (this._componentRef!.instance as Partial<OnDetach>).onDetach?.();\n    const index = this._viewContainerRef!.indexOf(this._componentRef!.hostView);\n    this._viewContainerRef!.detach(index);\n    this._componentRef!.changeDetectorRef.detach();\n    this._attached.set(false);\n  }\n\n  public get isConstructed(): boolean {\n    return !!this._componentRef;\n  }\n\n  public isAttachedTo(viewContainerRef: ViewContainerRef): boolean {\n    return this._viewContainerRef === viewContainerRef && this.attached();\n  }\n\n  public get isDestroyed(): boolean {\n    return this._componentRef === null;\n  }\n\n  public get componentRef(): ComponentRef<T> {\n    if (this._componentRef === null) {\n      throw Error('[NullPortalError] Portal destroyed.');\n    }\n    if (this._componentRef === undefined) {\n      throw Error('[NullPortalError] Component not constructed yet.');\n    }\n    return this._componentRef;\n  }\n\n  public get attached(): Signal<boolean> {\n    return this._attached;\n  }\n\n  private onDestroy(): void {\n    this._componentRef = null;\n    this._viewContainerRef = null;\n    this._attached.set(false);\n  }\n\n  /**\n   * Destroys the component instance and all the data structures associated with it.\n   */\n  public destroy(): void {\n    this._componentRef?.destroy();\n  }\n}\n\n/**\n * Controls instantiation of the component.\n */\nexport interface PortalOptions {\n  /**\n   * Providers registered with the injector for the instantiation of the component.\n   */\n  providers?: Provider[];\n}\n\n/**\n * Lifecycle hook for component rendered by {@link WbComponentPortal} when attaching to the DOM.\n */\nexport interface OnAttach {\n\n  /**\n   * Method invoked after attached this component to the DOM.\n   */\n  onAttach(): void;\n}\n\n/**\n * Lifecycle hook for component rendered by {@link WbComponentPortal} when detaching from the DOM.\n */\nexport interface OnDetach {\n\n  /**\n   * Method invoked before detaching this component from the DOM.\n   */\n  onDetach(): 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 {DestroyRef} from '@angular/core';\nimport {noop} from 'rxjs';\n\n/**\n * Implementation of {@link DestroyRef} that can be used in non-Angular managed workbench objects such as handles.\n */\nexport class ɵDestroyRef implements DestroyRef {\n\n  private _callbacks = new Set<() => void>();\n  private _destroyed = false;\n\n  public onDestroy(callback: () => void): () => void {\n    if (this._destroyed) {\n      callback();\n      return noop;\n    }\n\n    this._callbacks.add(callback);\n    return () => this._callbacks.delete(callback);\n  }\n\n  public destroy(): void {\n    this._callbacks.forEach(callback => callback());\n    this._callbacks.clear();\n    this._destroyed = true;\n  }\n\n  public get destroyed(): boolean {\n    return this._destroyed;\n  }\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 {fromEvent, Observable, race} from 'rxjs';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {ɵDestroyRef} from './ɵdestroy-ref';\n\n/**\n * Makes the given handle \"movable\" for the user to move it by mouse or touch gesture.\n *\n * The returned Observable emits when start moving the handle, while moving it, and when stop moving the handle.\n * The Observable never completes.\n */\nexport function fromMoveHandle$(handle: HTMLElement): Observable<HandleMoveEvent> {\n  return new Observable<HandleMoveEvent>(observer => {\n    const destroyRef = new ɵDestroyRef();\n    const document = handle.ownerDocument;\n\n    // Subscribe for mousedown events.\n    fromEvent<MouseEvent>(handle, 'mousedown')\n      .pipe(takeUntilDestroyed(destroyRef))\n      .subscribe((event: MouseEvent) => onMouseDown(event));\n\n    // Subscribe for touch start events.\n    fromEvent<TouchEvent>(handle, 'touchstart')\n      .pipe(takeUntilDestroyed(destroyRef))\n      .subscribe((event: TouchEvent) => onTouchStart(event));\n\n    return () => destroyRef.destroy();\n\n    function onMouseDown(mouseDownEvent: MouseEvent): void {\n      if (mouseDownEvent.button !== 0) { // 0 = main button pressed, usually the left button\n        return;\n      }\n      mouseDownEvent.preventDefault(); // prevent drag & drop and user selection\n      observer.next({type: 'mousestart', mouseEvent: mouseDownEvent});\n\n      // Subscribe for 'mousemove' events\n      const mouseMoveSubscription = fromEvent<MouseEvent>(document, 'mousemove')\n        .pipe(takeUntilDestroyed(destroyRef))\n        .subscribe((mouseMoveEvent: MouseEvent) => {\n          mouseMoveEvent.preventDefault(); // prevent drag & drop and user selection\n          observer.next({type: 'mousemove', mouseEvent: mouseMoveEvent});\n        });\n\n      // Subscribe for 'mouseup' events\n      fromEvent<MouseEvent>(document, 'mouseup', {once: true})\n        .pipe(takeUntilDestroyed(destroyRef))\n        .subscribe((mouseUpEvent: MouseEvent) => {\n          mouseMoveSubscription.unsubscribe();\n          observer.next({type: 'mouseend', mouseEvent: mouseUpEvent});\n        });\n    }\n\n    function onTouchStart(touchStartEvent: TouchEvent): void {\n      touchStartEvent.preventDefault(); // prevent moving page viewport\n      observer.next({type: 'touchstart', touchEvent: touchStartEvent});\n\n      // Subscribe for 'touchmove' events\n      const touchMoveSubscription = fromEvent<TouchEvent>(document, 'touchmove')\n        .pipe(takeUntilDestroyed(destroyRef))\n        .subscribe((touchMoveEvent: TouchEvent) => {\n          observer.next({type: 'touchmove', touchEvent: touchMoveEvent});\n        });\n\n      // Subscribe for 'touchend' and 'touchcancel' events\n      race(fromEvent<TouchEvent>(document, 'touchend', {once: true}), fromEvent<TouchEvent>(document, 'touchcancel', {once: true}))\n        .pipe(takeUntilDestroyed(destroyRef))\n        .subscribe((touchEndEvent: TouchEvent) => {\n          touchMoveSubscription.unsubscribe();\n          observer.next({type: 'touchend', touchEvent: touchEndEvent});\n        });\n    }\n  });\n}\n\n/**\n * Event emitted when moving the handle by mouse.\n */\nexport interface MouseMoveEvent {\n  type: 'mousestart' | 'mousemove' | 'mouseend';\n  mouseEvent: MouseEvent;\n}\n\n/**\n * Event emitted when moving the handle by touch gesture.\n */\nexport interface TouchMoveEvent {\n  type: 'touchstart' | 'touchmove' | 'touchend';\n  touchEvent: TouchEvent;\n}\n\n/**\n * Event emitted when moving the handle.\n */\nexport type HandleMoveEvent = MouseMoveEvent | TouchMoveEvent;\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 {Directive, effect, ElementRef, inject, input, output, untracked} from '@angular/core';\nimport {WorkbenchLayoutService} from '../layout/workbench-layout.service';\nimport {getCssTranslation} from '../common/dom.util';\nimport {fromMoveHandle$, HandleMoveEvent} from '../common/observables';\nimport {Disposable} from '../common/disposable';\n\n/**\n * Enables moving the host element via mouse or touch gesture.\n *\n * This directive makes the specified handle 'movable', emitting an event\n * when moving it. The host must apply the changed position by updating\n * respective DOM properties.\n */\n@Directive({selector: '[wbMovable]'})\nexport class MovableDirective {\n\n  public readonly wbHandleElement = input.required<HTMLElement>({alias: 'wbHandle'});\n  public readonly wbMove = output<WbMoveEvent>({alias: 'wbMovableMove'});\n\n  private readonly _workbenchLayoutService = inject(WorkbenchLayoutService);\n  private readonly _host = inject(ElementRef).nativeElement as HTMLElement;\n\n  private _x = 0;\n  private _y = 0;\n\n  constructor() {\n    this.installMoveHandle();\n  }\n\n  /**\n   * Installs a handle for moving the element.\n   */\n  private installMoveHandle(): void {\n    effect(onCleanup => {\n      const element = this.wbHandleElement();\n      const handle = untracked(() => this.createMoveHandle(element));\n      onCleanup(() => handle.dispose());\n    });\n  }\n\n  /**\n   * Method invoked when start moving the handle.\n   */\n  private onMoveStart(event: MouseEvent | Touch): void {\n    this._workbenchLayoutService.signalMoving(true);\n    this._x = event.clientX;\n    this._y = event.clientY;\n  }\n\n  /**\n   * Method invoked while moving the handle.\n   */\n  private onMove(event: MouseEvent | Touch): void {\n    const translation = getComputedTranslation(this._host);\n    const deltaX = event.clientX - this._x;\n    const deltaY = event.clientY - this._y;\n\n    this._x = event.clientX;\n    this._y = event.clientY;\n\n    this.wbMove.emit({\n      translateX: translation.translateX + deltaX,\n      translateY: translation.translateY + deltaY,\n    });\n  }\n\n  /**\n   * Method invoked when end moving the handle.\n   */\n  private onMoveEnd(): void {\n    this._workbenchLayoutService.signalMoving(false);\n  }\n\n  private createMoveHandle(element: HTMLElement): Disposable {\n    // Subscribe to move events.\n    const subscription = fromMoveHandle$(element)\n      .subscribe((event: HandleMoveEvent) => {\n        switch (event.type) {\n          case 'mousestart': {\n            this.onMoveStart(event.mouseEvent);\n            break;\n          }\n          case 'touchstart': {\n            this.onMoveStart(event.touchEvent.touches[0]!);\n            break;\n          }\n          case 'mousemove': {\n            this.onMove(event.mouseEvent);\n            break;\n          }\n          case 'touchmove': {\n            this.onMove(event.touchEvent.touches[0]!);\n            break;\n          }\n          case 'mouseend': {\n            this.onMoveEnd();\n            break;\n          }\n          case 'touchend': {\n            this.onMoveEnd();\n            break;\n          }\n        }\n      });\n\n    return {\n      dispose: () => subscription.unsubscribe(),\n    };\n  }\n}\n\n/**\n * Event emitted when moving the handle.\n */\nexport interface WbMoveEvent {\n  /**\n   * Specifies the new horizontal translation of the host.\n   */\n  translateX: number;\n  /**\n   * Specifies the new vertical translation of the host.\n   */\n  translateY: number;\n}\n\n/**\n * Reads the current CSS translation of given element.\n */\nfunction getComputedTranslation(element: HTMLElement): {translateX: number; translateY: number} {\n  const {translateX, translateY} = getCssTranslation(element);\n  return {\n    translateX: translateX === 'none' ? 0 : parseInt(translateX, 10),\n    translateY: translateY === 'none' ? 0 : parseInt(translateY, 10),\n  };\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 {Directive, effect, ElementRef, inject, input, output, untracked} from '@angular/core';\nimport {createElement, positionElement, getCssTranslation} from '../common/dom.util';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {ɵDestroyRef} from '../common/ɵdestroy-ref';\nimport {WorkbenchLayoutService} from '../layout/workbench-layout.service';\nimport {fromMoveHandle$, HandleMoveEvent} from '../common/observables';\n\nconst HANDLE_SIZE = 6;\n\n/**\n * Enables resizing the host element via mouse or touch gesture.\n *\n * This directive adds resize handles to the boundaries and corners of the host\n * element, emitting an event when moving the handles. The host must apply the\n * changed position and size by updating respective DOM properties.\n *\n * The following requirements apply for the host:\n * - must be positioned, either relative or absolute\n * - must be horizontally centered in its layout\n */\n@Directive({selector: '[wbResizable]'})\nexport class ResizableDirective {\n\n  public readonly enabled = input(true, {alias: 'wbResizableEnabled'});\n  public readonly wbResize = output<WbResizeEvent>({alias: 'wbResizableResize'});\n\n  private readonly _workbenchLayoutService = inject(WorkbenchLayoutService);\n  private readonly _host = inject(ElementRef).nativeElement as HTMLElement;\n\n  private minHeight: number | undefined;\n  private maxHeight: number | undefined;\n\n  private minWidth: number | undefined;\n  private maxWidth: number | undefined;\n\n  constructor() {\n    positionElement(this._host, {context: 'resizable'});\n    this.installResizeHandles();\n  }\n\n  /**\n   * Installs handles for resizing the host at its edges and corners.\n   */\n  private installResizeHandles(): void {\n    effect(onCleanup => {\n      if (this.enabled()) {\n        const handles = untracked(() => this.createResizeHandles());\n        onCleanup(() => handles.forEach(handle => handle.dispose()));\n      }\n    });\n  }\n\n  private createResizeHandles(): ResizeHandle[] {\n    // Calculate offset to be flush with the component boundaries, not the content boundaries.\n    const borderWidth = parseInt(getComputedStyle(this._host).borderWidth, 10);\n    const justified = `-${borderWidth + HANDLE_SIZE / 2}px`;\n\n    return [\n      // top handle\n      new ResizeHandle(this._host, {\n        cursor: 'ns-resize',\n        left: justified, top: justified, right: justified, height: `${HANDLE_SIZE}px`,\n        onResizeStart: () => this.onResizeStart(),\n        onResize: event => this.onResizeTop(event),\n        onResizeEnd: () => this.onResizeEnd(),\n      }),\n      // right handle\n      new ResizeHandle(this._host, {\n        cursor: 'ew-resize',\n        top: justified, right: justified, bottom: justified, width: `${HANDLE_SIZE}px`,\n        onResizeStart: () => this.onResizeStart(),\n        onResize: event => this.onResizeRight(event),\n        onResizeEnd: () => this.onResizeEnd(),\n      }),\n      // bottom handle\n      new ResizeHandle(this._host, {\n        cursor: 'ns-resize',\n        left: justified, bottom: justified, right: justified, height: `${HANDLE_SIZE}px`,\n        onResizeStart: () => this.onResizeStart(),\n        onResize: event => this.onResizeBottom(event),\n        onResizeEnd: () => this.onResizeEnd(),\n      }),\n      // left handle\n      new ResizeHandle(this._host, {\n        cursor: 'ew-resize',\n        top: justified, left: justified, bottom: justified, width: `${HANDLE_SIZE}px`,\n        onResizeStart: () => this.onResizeStart(),\n        onResize: event => this.onResizeLeft(event),\n        onResizeEnd: () => this.onResizeEnd(),\n      }),\n      // top-left handle\n      new ResizeHandle(this._host, {\n        cursor: 'nwse-resize',\n        top: justified, left: justified, width: `${HANDLE_SIZE}px`, height: `${HANDLE_SIZE}px`,\n        onResizeStart: () => this.onResizeStart(),\n        onResize: event => {\n          this.onResizeTop(event);\n          this.onResizeLeft(event);\n        },\n        onResizeEnd: () => this.onResizeEnd(),\n      }),\n      // top-right handle\n      new ResizeHandle(this._host, {\n        cursor: 'nesw-resize',\n        top: justified, right: justified, width: `${HANDLE_SIZE}px`, height: `${HANDLE_SIZE}px`,\n        onResizeStart: () => this.onResizeStart(),\n        onResize: event => {\n          this.onResizeTop(event);\n          this.onResizeRight(event);\n        },\n        onResizeEnd: () => this.onResizeEnd(),\n      }),\n      // bottom-right handle\n      new ResizeHandle(this._host, {\n        cursor: 'nwse-resize',\n        bottom: justified, right: justified, width: `${HANDLE_SIZE}px`, height: `${HANDLE_SIZE}px`,\n        onResizeStart: () => this.onResizeStart(),\n        onResize: event => {\n          this.onResizeBottom(event);\n          this.onResizeRight(event);\n        },\n        onResizeEnd: () => this.onResizeEnd(),\n      }),\n      // bottom-left handle\n      new ResizeHandle(this._host, {\n        cursor: 'nesw-resize',\n        bottom: justified, left: justified, width: `${HANDLE_SIZE}px`, height: `${HANDLE_SIZE}px`,\n        onResizeStart: () => this.onResizeStart(),\n        onResize: event => {\n          this.onResizeBottom(event);\n          this.onResizeLeft(event);\n        },\n        onResizeEnd: () => this.onResizeEnd(),\n      }),\n    ];\n  }\n\n  /**\n   * Method invoked when start resizing the host.\n   */\n  private onResizeStart(): void {\n    const {minHeight, maxHeight, minWidth, maxWidth} = getComputedStyle(this._host);\n    const parent = this._host.parentElement!;\n\n    this.minHeight = toPixel(minHeight, {parentSize: parent.clientHeight});\n    this.maxHeight = toPixel(maxHeight, {parentSize: parent.clientHeight});\n    this.minWidth = toPixel(minWidth, {parentSize: parent.clientWidth});\n    this.maxWidth = toPixel(maxWidth, {parentSize: parent.clientWidth});\n    if (this.maxWidth !== undefined && this.minWidth !== undefined && this.minWidth > this.maxWidth) {\n      this.maxWidth = this.minWidth; // prefer min-width over max-width (as in CSS)\n    }\n    if (this.maxHeight !== undefined && this.minHeight !== undefined && this.minHeight > this.maxHeight) {\n      this.maxHeight = this.minHeight; // prefer min-height over max-height (as in CSS)\n    }\n    this._workbenchLayoutService.signalResizing(true);\n  }\n\n  /**\n   * Method invoked when end resizing the host.\n   */\n  private onResizeEnd(): void {\n    this.minHeight = undefined;\n    this.maxHeight = undefined;\n    this.minWidth = undefined;\n    this.maxWidth = undefined;\n    this._workbenchLayoutService.signalResizing(false);\n  }\n\n  /**\n   * Method invoked when moving the top handle.\n   */\n  private onResizeTop(event: MouseEvent | Touch): void {\n    const hostBounds = this._host.getBoundingClientRect();\n\n    // Calculate delta, respecting minimal and maximal size constraints.\n    const delta = (() => {\n      // Round the delta to the nearest integer to get stable positioning since CSS translations do not have decimal precision.\n      const delta = Math.round(event.clientY - hostBounds.top);\n      // Do not enlarge if the cursor is located below the handle and moving it upwards.\n      if (delta < 0 && event.clientY > hostBounds.top) {\n        return 0;\n      }\n      // Ensure minimal height.\n      if (this.minHeight && delta > 0 && event.clientY > hostBounds.bottom - this.minHeight) {\n        return hostBounds.height - this.minHeight;\n      }\n      // Ensure maximal height.\n      if (this.maxHeight && delta < 0 && event.clientY < hostBounds.bottom - this.maxHeight) {\n        return hostBounds.height - this.maxHeight;\n      }\n      return delta;\n    })();\n\n    if (delta === 0) {\n      return;\n    }\n\n    this.wbResize.emit({\n      height: hostBounds.height - delta,\n      translateY: getComputedTranslateY(this._host) + delta,\n    });\n  }\n\n  /**\n   * Method invoked when moving the bottom handle.\n   */\n  private onResizeBottom(event: MouseEvent | Touch): void {\n    const hostBounds = this._host.getBoundingClientRect();\n\n    // Calculate delta, respecting minimal and maximal size constraints.\n    const delta = (() => {\n      // Round the delta to the nearest integer to get stable positioning since CSS translations do not have decimal precision.\n      const delta = Math.round(event.clientY - hostBounds.bottom);\n      // Do not enlarge if the cursor is located above the handle and moving it downwards.\n      if (delta > 0 && event.clientY < hostBounds.bottom) {\n        return 0;\n      }\n      // Ensure minimal height.\n      if (this.minHeight && delta < 0 && event.clientY < hostBounds.top + this.minHeight) {\n        return this.minHeight - hostBounds.height;\n      }\n      // Ensure maximal height.\n      if (this.maxHeight && delta > 0 && event.clientY > hostBounds.top + this.maxHeight) {\n        return this.maxHeight - hostBounds.height;\n      }\n      return delta;\n    })();\n\n    if (delta === 0) {\n      return;\n    }\n\n    this.wbResize.emit({\n      height: hostBounds.height + delta,\n    });\n  }\n\n  /**\n   * Method invoked when moving the left handle.\n   */\n  private onResizeLeft(event: MouseEvent | Touch): void {\n    const hostBounds = this._host.getBoundingClientRect();\n\n    // Calculate delta, respecting minimal and maximal size constraints.\n    const delta = (() => {\n      // Divide the delta by two because the host only needs to be moved by half the delta as centered horizontally.\n      // Also round the delta to the nearest integer to get stable positioning since CSS translations do not have decimal precision.\n      const delta = Math.round((event.clientX - hostBounds.left) / 2) * 2;\n      // Do not enlarge if the cursor is located right to the handle and moving it to the left.\n      if (delta < 0 && event.clientX > hostBounds.left) {\n        return 0;\n      }\n      // Ensure minimal width.\n      if (this.minWidth && delta > 0 && event.clientX > hostBounds.right - this.minWidth) {\n        return Math.round((hostBounds.width - this.minWidth) / 2) * 2; // Ensure delta to be dividable by two without remainder to have a stable position as CSS translations do not have decimal precision.\n      }\n      // Ensure maximal width.\n      if (this.maxWidth && delta < 0 && event.clientX < hostBounds.right - this.maxWidth) {\n        return Math.round((hostBounds.width - this.maxWidth) / 2) * 2; // Ensure delta to be dividable by two without remainder to have a stable position as CSS translations do not have decimal precision.\n      }\n      return delta;\n    })();\n\n    if (delta === 0) {\n      return;\n    }\n\n    this.wbResize.emit({\n      width: hostBounds.width - delta,\n      translateX: getComputedTranslateX(this._host) + delta / 2, // Move only by half the delta as centered horizontally.\n    });\n  }\n\n  /**\n   * Method invoked when moving the right handle.\n   */\n  private onResizeRight(event: MouseEvent | Touch): void {\n    const hostBounds = this._host.getBoundingClientRect();\n\n    // Calculate delta, respecting minimal and maximal size constraints.\n    const delta = (() => {\n      // Divide the delta by two because the host only needs to be moved by half the delta as centered horizontally.\n      // Also round the delta to the nearest integer to get stable positioning since CSS translations do not have decimal precision.\n      const delta = Math.round((event.clientX - hostBounds.right) / 2) * 2;\n      // Do not enlarge if the cursor is located left to the handle and moving it to the right.\n      if (delta > 0 && event.clientX < hostBounds.right) {\n        return 0;\n      }\n      // Ensure minimal width.\n      if (this.minWidth && delta < 0 && event.clientX < hostBounds.left + this.minWidth) {\n        return Math.round((this.minWidth - hostBounds.width) / 2) * 2; // Ensure delta to be dividable by two without remainder to have a stable position as CSS translations do not have decimal precision.\n      }\n      // Ensure maximal width.\n      if (this.maxWidth && delta > 0 && event.clientX > hostBounds.left + this.maxWidth) {\n        return Math.round((this.maxWidth - hostBounds.width) / 2) * 2; // Ensure delta to be dividable by two without remainder to have a stable position as CSS translations do not have decimal precision.\n      }\n      return delta;\n    })();\n\n    if (delta === 0) {\n      return;\n    }\n\n    this.wbResize.emit({\n      width: hostBounds.width + delta,\n      translateX: getComputedTranslateX(this._host) + delta / 2, // Move only by half the delta as centered horizontally.\n    });\n  }\n}\n\n/**\n * Represents a handle to resize the host element.\n */\nclass ResizeHandle {\n\n  private readonly _document: Document;\n  private readonly _destroyRef = new ɵDestroyRef();\n  private readonly _handleElement: HTMLElement;\n\n  constructor(host: HTMLElement, private _config: ResizeHandleConfig) {\n    this._document = host.ownerDocument;\n    this._handleElement = createElement('div', {\n      parent: host,\n      cssClass: 'e2e-resize-handle',\n      style: {\n        cursor: this._config.cursor,\n        position: 'absolute',\n        top: this._config.top ?? null,\n        right: this._config.right ?? null,\n        bottom: this._config.bottom ?? null,\n        left: this._config.left ?? null,\n        width: this._config.width ?? null,\n        height: this._config.height ?? null,\n      },\n    });\n    this.makeHandleMovable();\n  }\n\n  private makeHandleMovable(): void {\n    let prevBodyCursor: string | undefined;\n\n    fromMoveHandle$(this._handleElement)\n      .pipe(takeUntilDestroyed(this._destroyRef))\n      .subscribe((event: HandleMoveEvent) => {\n        switch (event.type) {\n          case 'mousestart': {\n            // Apply cursor on document level to prevent flickering while resizing\n            prevBodyCursor = this._document.body.style.cursor;\n            this._document.body.style.cursor = this._config.cursor;\n            this._config.onResizeStart();\n            break;\n          }\n          case 'touchstart': {\n            this._config.onResizeStart();\n            break;\n          }\n          case 'mousemove': {\n            this._config.onResize(event.mouseEvent);\n            break;\n          }\n          case 'touchmove': {\n            this._config.onResize(event.touchEvent.touches[0]!);\n            break;\n          }\n          case 'mouseend': {\n            this._document.body.style.cursor = prevBodyCursor!;\n            this._config.onResizeEnd();\n            break;\n          }\n          case 'touchend': {\n            this._config.onResizeEnd();\n            break;\n          }\n        }\n      });\n  }\n\n  public dispose(): void {\n    this._handleElement.remove();\n    this._destroyRef.destroy();\n  }\n}\n\n/**\n * Event emitted when resizing the host element.\n */\nexport interface WbResizeEvent {\n  /**\n   * Specifies the new width of the host.\n   */\n  width?: number;\n  /**\n   * Specifies the new height of the host.\n   */\n  height?: number;\n  /**\n   * Specifies the new horizontal translation of the host.\n   */\n  translateX?: number;\n  /**\n   * Specifies the new vertical translation of the host.\n   */\n  translateY?: number;\n}\n\n/**\n * Configuration of a resize handle.\n */\ninterface ResizeHandleConfig {\n  top?: string;\n  right?: string;\n  bottom?: string;\n  left?: string;\n  height?: string;\n  width?: string;\n  cursor: 'ew-resize' | 'ns-resize' | 'nwse-resize' | 'nesw-resize';\n  onResizeStart: () => void;\n  onResize: (event: MouseEvent | Touch) => void;\n  onResizeEnd: () => void;\n}\n\n/**\n * Converts the passed pixel or percentage value into a numerical pixel value, or returns `undefined` if passing `none`.\n */\nfunction toPixel(size: string | 'none', options: {parentSize: number}): number | undefined {\n  if (size === 'none') {\n    return undefined;\n  }\n  return size.endsWith('%') ? options.parentSize * parseInt(size, 10) / 100 : parseInt(size, 10);\n}\n\nfunction getComputedTranslateX(element: HTMLElement): number {\n  const {translateX} = getCssTranslation(element);\n  return translateX === 'none' ? 0 : parseInt(translateX, 10);\n}\n\nfunction getComputedTranslateY(element: HTMLElement): number {\n  const {translateY} = getCssTranslation(element);\n  return translateY === 'none' ? 0 : parseInt(translateY, 10);\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 {InjectionToken, Injector} from '@angular/core';\nimport {ComponentType} from '@angular/cdk/portal';\n\n/**\n * Signature of a function to provide icons to the SCION Workbench.\n *\n * An icon provider is a function that returns the component for an icon. The component renders the icon.\n *\n * Alternatively, the icon provider can return a descriptor, allowing for additional configuration such as inputs.\n * Inputs are available as input properties in the component. The component can use the inputs to render the icon.\n *\n * Icon keys used by the SCION Workbench start with the `workbench.` prefix. To not replace built-in workbench icons,\n * the icon provider can return `undefined` for icons starting with the `workbench.` prefix.\n *\n * An icon provider can be registered via configuration passed to the {@link provideWorkbench} function.\n *\n * The function can call `inject` to get any required dependencies.\n *\n * @param icon - The key of the icon for which to provide the icon component.\n * @return ComponentType or {@link WorkbenchIconDescriptor} to render the icon, or `undefined` if not found.\n */\nexport type WorkbenchIconProviderFn = (icon: string) => ComponentType<unknown> | WorkbenchIconDescriptor | undefined;\n\n/**\n * Controls rendering of a workbench icon.\n */\nexport interface WorkbenchIconDescriptor {\n  /**\n   * Specifies the component to render the icon.\n   */\n  component: ComponentType<unknown>;\n  /**\n   * Optional data to pass to the component. Inputs are available as input properties in the component.\n   *\n   * ```ts\n   * @Component({...})\n   * class SomeIconComponent {\n   *   icon = input.required<string>();\n   * }\n   * ```\n   */\n  inputs?: {[name: string]: unknown};\n  /**\n   * Sets the injector for the instantiation of the component, giving control over the objects available for injection.\n   *\n   * **Example:**\n   * ```ts\n   * Injector.create({\n   *   parent: ...,\n   *   providers: [\n   *    {provide: <TOKEN>, useValue: <VALUE>}\n   *   ],\n   * })\n   * ```\n   */\n  injector?: Injector;\n}\n\n/**\n * DI token for injecting icon providers to provide icons to the SCION Workbench.\n *\n * Multiple icon providers can be registered. Providers are called in registration order.\n * If a provider does not provide the icon, the next provider is called, and so on.\n */\nexport const WORKBENCH_ICON_PROVIDER = new InjectionToken<WorkbenchIconProviderFn>('WORKBENCH_ICON_PROVIDER');\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 {ChangeDetectionStrategy, Component, computed, createComponent, effect, ElementRef, EnvironmentInjector, inject, Injector, input, Renderer2, runInInjectionContext, signal, Signal, untracked} from '@angular/core';\nimport {WORKBENCH_ICON_PROVIDER, WorkbenchIconDescriptor, WorkbenchIconProviderFn} from './workbench-icon-provider.model';\n\n/**\n * Renders an icon based on registered icon providers.\n *\n * Multiple icon providers can be registered. Providers are called in registration order.\n * If a provider does not provide the icon, the next provider is called, and so on.\n *\n * @experimental since 20.0.0-beta.3; API and behavior may change in any version without notice.\n */\n@Component({\n  selector: 'wb-icon',\n  template: '',\n  styleUrl: './icon.component.scss',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class IconComponent {\n\n  /**\n   * Specifies the icon to display.\n   *\n   * Refer to the installed icon providers for a list of supported icons.\n   */\n  public readonly icon = input.required<string | undefined>();\n\n  private readonly _injector = inject(Injector);\n  private readonly _host = inject(ElementRef).nativeElement as HTMLElement;\n  private readonly _renderer = inject(Renderer2);\n\n  private readonly _iconDescriptor = computeIconDescriptor(this.icon);\n\n  constructor() {\n    // Render icon in an animation frame to capture CSS classes set on the host.\n    requestAnimationFrame(() => this.renderIcon());\n  }\n\n  /**\n   * Renders the icon, using this element (`wb-icon`) as the host of the icon component.\n   */\n  private renderIcon(): void {\n    effect(onCleanup => {\n      const {component, injector, inputs} = this._iconDescriptor() ?? {};\n\n      untracked(() => {\n        // Capture CSS classes of the host (before constructing the icon component).\n        const hostCssClass = this._host.classList.value;\n\n        // Create the icon component and attach it, rendering a placeholder component if no provider\n        // is found to effectively remove the previous component (if any) from the DOM.\n        const componentRef = createComponent(component ?? NullIconComponent, {\n          elementInjector: injector ?? this._injector,\n          environmentInjector: this._injector.get(EnvironmentInjector),\n          hostElement: this._host,\n        });\n\n        // Set inputs.\n        for (const input in inputs) {\n          componentRef.setInput(input, inputs[input]);\n        }\n        componentRef.changeDetectorRef.detectChanges();\n\n        // Destroy the component when the icon is changed.\n        onCleanup(() => {\n          componentRef.destroy();\n          // Destroying the component does not unset its host bindings, e.g., CSS classes applied to the host element.\n          // Therefore, manually reset CSS classes to the CSS classes of the host.\n          this._renderer.setAttribute(this._host, 'class', hostCssClass);\n        });\n      });\n    }, {injector: this._injector});\n  }\n}\n\n/**\n * Computes the icon descriptor for the specified icon based on the installed icon providers.\n */\nfunction computeIconDescriptor(icon: Signal<string | undefined>): Signal<WorkbenchIconDescriptor | undefined> {\n  const injector = inject(Injector);\n  const iconProviders = inject(WORKBENCH_ICON_PROVIDER, {optional: true}) as WorkbenchIconProviderFn[] | null;\n  if (!iconProviders?.length) {\n    return signal(undefined);\n  }\n\n  return computed(() => {\n    if (!icon()) {\n      return undefined;\n    }\n\n    return untracked(() => {\n      for (const iconProvider of iconProviders) {\n        const componentOrDescriptor = runInInjectionContext(injector, () => iconProvider(icon()!));\n        if (componentOrDescriptor) {\n          return typeof componentOrDescriptor === 'function' ? {component: componentOrDescriptor} : componentOrDescriptor;\n        }\n      }\n      return undefined;\n    });\n  });\n}\n\n/**\n * Acts as placeholder if no icon could be found.\n */\n@Component({template: ''})\nexport class NullIconComponent {\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 {Component, inject} from '@angular/core';\nimport {ɵWorkbenchDialog} from '../ɵworkbench-dialog';\nimport {TextPipe} from '../../text/text.pipe';\nimport {IconComponent} from '../../icon/icon.component';\n\n/**\n * Renders the dialog header with a close button and optional title.\n */\n@Component({\n  selector: 'wb-dialog-header',\n  templateUrl: './dialog-header.component.html',\n  styleUrls: ['./dialog-header.component.scss'],\n  imports: [\n    TextPipe,\n    IconComponent,\n  ],\n})\nexport class DialogHeaderComponent {\n\n  protected readonly dialog = inject(ɵWorkbenchDialog);\n\n  protected onCloseClick(): void {\n    this.dialog.close();\n  }\n\n  protected onCloseMouseDown(event: Event): void {\n    event.stopPropagation(); // Prevent dragging the dialog with the close button.\n  }\n}\n","@if (dialog.title(); as title) {\n  <div class=\"title e2e-title\">\n    <span>{{(title | wbText)()}}</span>\n  </div>\n}\n\n@if (dialog.closable()) {\n  <button tabindex=\"-1\" class=\"close e2e-close\"\n          [title]=\"('%workbench.close.tooltip' | wbText)()\"\n          (mousedown)=\"onCloseMouseDown($event)\"\n          (click)=\"onCloseClick()\">\n    <wb-icon icon=\"workbench.close\"/>\n  </button>\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 {Pipe, PipeTransform} from '@angular/core';\n\n/**\n * Returns `null` if the given object is empty.\n */\n@Pipe({name: 'wbNullIfEmpty'})\nexport class NullIfEmptyPipe implements PipeTransform {\n\n  public transform<T>(value: T): T | null {\n    if (value === null || value === undefined) {\n      return null;\n    }\n    else if (value instanceof Map || value instanceof Set) {\n      return value.size ? value : null;\n    }\n    else if (Array.isArray(value) || typeof value === 'string') {\n      return value.length ? value : null;\n    }\n    else if (typeof value === 'object') {\n      return Object.keys(value).length ? value : null;\n    }\n    return value;\n  }\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 {Pipe, PipeTransform} from '@angular/core';\nimport {WorkbenchDialogActionDirective} from './workbench-dialog-action.directive';\n\n/**\n * Filters actions by specified alignment.\n */\n@Pipe({name: 'wbDialogActionFilter'})\nexport class DialogActionFilterPipe implements PipeTransform {\n\n  public transform(actions: WorkbenchDialogActionDirective[] | null | undefined, align: 'start' | 'end'): WorkbenchDialogActionDirective[] {\n    return actions?.filter(action => action.align() === align) ?? [];\n  }\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 */\nimport {Component, inject} from '@angular/core';\nimport {ɵWorkbenchDialog} from '../ɵworkbench-dialog';\nimport {NgTemplateOutlet} from '@angular/common';\nimport {NullIfEmptyPipe} from '../../common/null-if-empty.pipe';\nimport {DialogActionFilterPipe} from './dialog-action-filter.pipe';\n\n/**\n * Renders the dialog footer with actions modeled as {@link WorkbenchDialogActionDirective} templates.\n */\n@Component({\n  selector: 'wb-dialog-footer',\n  templateUrl: './dialog-footer.component.html',\n  styleUrls: ['./dialog-footer.component.scss'],\n  imports: [\n    NgTemplateOutlet,\n    NullIfEmptyPipe,\n    DialogActionFilterPipe,\n  ],\n})\nexport class DialogFooterComponent {\n\n  protected readonly dialog = inject(ɵWorkbenchDialog);\n}\n","<!-- Start Actions -->\n@if (dialog.actions | wbDialogActionFilter:'start' | wbNullIfEmpty; as actions) {\n  <div class=\"actions start\">\n    @for (action of actions; track action) {\n      <ng-container *ngTemplateOutlet=\"action.template\"/>\n    }\n  </div>\n}\n\n<!-- End Actions -->\n@if (dialog.actions | wbDialogActionFilter:'end' | wbNullIfEmpty; as actions) {\n  <div class=\"actions end\">\n    @for (action of actions; track action) {\n      <ng-container *ngTemplateOutlet=\"action.template\"/>\n    }\n  </div>\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 {AfterViewInit, Directive, ElementRef, inject, InjectionToken, Injector, OnDestroy, runInInjectionContext} from '@angular/core';\nimport {createElement, positionElement, setStyle} from '../common/dom.util';\nimport {fromEvent} from 'rxjs';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {ɵDestroyRef} from '../common/ɵdestroy-ref';\nimport {coerceElement} from '@angular/cdk/coercion';\nimport {Blocking} from './blocking';\nimport {Blockable} from './blockable';\nimport {Arrays} from '@scion/toolkit/util';\n\n/**\n * Prevents user interaction of the host when blocked by placing a glass pane over the host element.\n *\n * Configure this direktive via the following DI tokens. These tokens must be provided at the component level.\n * - {@link GLASS_PANE_BLOCKABLE}: Represents the object to be blocked.\n * - {@link GLASS_PANE_TARGET_ELEMENT}: Controls the HTML element to block. Defaults to the directive's host element if not set.\n * - {@link GLASS_PANE_OPTIONS}: Configures the glass pane.\n */\n@Directive({selector: '[wbGlassPane]'})\nexport class GlassPaneDirective implements OnDestroy, AfterViewInit {\n\n  private readonly _injector = inject(Injector);\n  private readonly _targetElement = coerceElement<HTMLElement>(inject(GLASS_PANE_TARGET_ELEMENT, {optional: true, host: true}) ?? inject(ElementRef));\n  private readonly _options = inject(GLASS_PANE_OPTIONS, {optional: true, host: true}) ?? undefined;\n\n  private _glassPane: GlassPane | null = null;\n\n  constructor() {\n    positionElement(this._targetElement, {context: 'glasspane'});\n  }\n\n  public ngAfterViewInit(): void {\n    // Install the glass pane after Angular has finished initializing the component's view, critical\n    // if the component is already blocked at construction time, so that the glass pane is added after\n    // the view children.\n    runInInjectionContext(this._injector, () => this.installGlassPane());\n  }\n\n  private installGlassPane(): void {\n    inject(GLASS_PANE_BLOCKABLE, {host: true}).blockedBy$\n      .pipe(takeUntilDestroyed())\n      .subscribe((blockedBy: Blocking | null) => {\n        this._glassPane?.dispose();\n        this._glassPane = blockedBy ? new GlassPane(this._targetElement, blockedBy, this._options) : null;\n      });\n  }\n\n  public ngOnDestroy(): void {\n    this._glassPane?.dispose();\n  }\n}\n\n/**\n * Represents the glass pane added to the target element.\n */\nclass GlassPane {\n\n  private readonly _destroyRef = new ɵDestroyRef();\n\n  constructor(targetElement: HTMLElement, blockedBy: Blocking, options?: GlassPaneOptions) {\n    const glassPaneElement = createElement('div', {\n      parent: targetElement,\n      cssClass: ['glasspane', 'e2e-glasspane', ...Arrays.coerce(options?.cssClass)],\n      attributes: {\n        'data-owner': blockedBy.id,\n        ...options?.attributes,\n      },\n      style: {\n        'position': 'absolute',\n        'inset': 0,\n        'pointer-events': 'auto',\n      },\n    });\n\n    // Indicate the user that this element is blocked when clicking it.\n    fromEvent<MouseEvent>(glassPaneElement, 'mousedown')\n      .pipe(takeUntilDestroyed(this._destroyRef))\n      .subscribe((event: MouseEvent) => {\n        event.preventDefault(); // to not lose focus\n        blockedBy.blink();\n      });\n\n    // Prevent the target from gaining focus via sequential keyboard navigation.\n    fromEvent(targetElement, 'focusin')\n      .pipe(takeUntilDestroyed(this._destroyRef))\n      .subscribe(() => {\n        blockedBy.focus();\n      });\n\n    // Ignore pointer events to block elements overlapping the glass pane, e.g., resize handles of a dialog.\n    const currentPointerEvents = targetElement.style.pointerEvents || null;\n    setStyle(targetElement, {'pointer-events': 'none'});\n\n    this._destroyRef.onDestroy(() => {\n      glassPaneElement.remove();\n      setStyle(targetElement, {'pointer-events': currentPointerEvents});\n    });\n  }\n\n  public dispose(): void {\n    this._destroyRef.destroy();\n  }\n}\n\n/**\n * Configures the glass pane.\n */\nexport interface GlassPaneOptions {\n  /**\n   * Specifies CSS class(es) to add to the glass pane HTML element.\n   */\n  cssClass?: string | string[];\n  /**\n   * Specifies attributes to add to the glass pane HTML element.\n   */\n  attributes?: {[key: string]: string};\n}\n\n/**\n * DI token to configure the {@link GlassPaneDirective} with the [object]{@link Blockable} to block.\n */\nexport const GLASS_PANE_BLOCKABLE = new InjectionToken<Blockable>('GLASS_PANE_BLOCKABLE');\n\n/**\n * DI token to configure the {@link GlassPaneDirective} with the HTML element to block.\n * Defaults to the host element of the {@link GlassPaneDirective} if not specified.\n */\nexport const GLASS_PANE_TARGET_ELEMENT = new InjectionToken<HTMLElement | ElementRef<HTMLElement>>('GLASS_PANE_TARGET_ELEMENT');\n\n/**\n * DI token to configure the {@link GlassPaneDirective}.\n */\nexport const GLASS_PANE_OPTIONS = new InjectionToken<GlassPaneOptions>('GLASS_PANE_OPTIONS');\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 {effect, inject, IterableDiffers, Renderer2, Signal} from '@angular/core';\n\n/**\n * Tracks changes to the provided CSS classes and applies them to the given element.\n */\nexport function synchronizeCssClasses(element: HTMLElement, classes: Signal<string[]>): void {\n  const classListDiffer = inject(IterableDiffers).find([]).create<string>();\n  const renderer = inject(Renderer2);\n  effect(() => {\n    const diff = classListDiffer.diff(classes());\n    if (diff) {\n      diff.forEachAddedItem(({item}) => renderer.addClass(element, item));\n      diff.forEachRemovedItem(({item}) => renderer.removeClass(element, item));\n    }\n  });\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 {Component, effect, ElementRef, HostListener, inject, NgZone, Provider, signal, untracked, viewChild} from '@angular/core';\nimport {BehaviorSubject, fromEvent} from 'rxjs';\nimport {CdkTrapFocus} from '@angular/cdk/a11y';\nimport {AsyncPipe, NgComponentOutlet, NgTemplateOutlet} from '@angular/common';\nimport {ɵWorkbenchDialog} from './ɵworkbench-dialog';\nimport {SciViewportComponent} from '@scion/components/viewport';\nimport {animate, AnimationMetadata, style, transition, trigger} from '@angular/animations';\nimport {subscribeIn} from '@scion/toolkit/operators';\nimport {MovableDirective, WbMoveEvent} from './movable.directive';\nimport {ResizableDirective, WbResizeEvent} from './resizable.directive';\nimport {SciDimension, SciDimensionDirective} from '@scion/components/dimension';\nimport {DialogHeaderComponent} from './dialog-header/dialog-header.component';\nimport {DialogFooterComponent} from './dialog-footer/dialog-footer.component';\nimport {GLASS_PANE_BLOCKABLE, GLASS_PANE_OPTIONS, GlassPaneDirective, GlassPaneOptions} from '../glass-pane/glass-pane.directive';\nimport {filter, map, startWith, takeUntil} from 'rxjs/operators';\nimport {fromMutation$} from '@scion/toolkit/observable';\nimport {synchronizeCssClasses} from '../common/css-class.util';\n\n/**\n * Renders the workbench dialog.\n *\n * This component is added to a CDK overlay aligned to the modality context defined by the dialog.\n * The dialog itself is rendered in the center of its modality context.\n */\n@Component({\n  selector: 'wb-dialog',\n  templateUrl: './workbench-dialog.component.html',\n  styleUrls: ['./workbench-dialog.component.scss'],\n  imports: [\n    NgComponentOutlet,\n    NgTemplateOutlet,\n    CdkTrapFocus,\n    AsyncPipe,\n    MovableDirective,\n    ResizableDirective,\n    SciViewportComponent,\n    SciDimensionDirective,\n    DialogHeaderComponent,\n    DialogFooterComponent,\n    GlassPaneDirective,\n  ],\n  animations: [\n    trigger('enter', provideEnterAnimation()),\n  ],\n  viewProviders: [\n    configureDialogGlassPane(),\n  ],\n  host: {\n    '[style.--ɵdialog-transform-translate-x]': 'transformTranslateX()',\n    '[style.--ɵdialog-transform-translate-y]': 'transformTranslateY()',\n    '[style.--ɵdialog-min-height]': 'dialog.size.minHeight() ?? headerHeight()',\n    '[style.--ɵdialog-height]': 'dialog.size.height()',\n    '[style.--ɵdialog-max-height]': 'dialog.size.maxHeight()',\n    '[style.--ɵdialog-min-width]': 'dialog.size.minWidth() ?? \\'100px\\'',\n    '[style.--ɵdialog-width]': 'dialog.size.width()',\n    '[style.--ɵdialog-max-width]': 'dialog.size.maxWidth()',\n    '[class.justified]': '!dialog.padding()',\n    '[attr.data-dialogid]': 'dialog.id',\n  },\n})\nexport class WorkbenchDialogComponent {\n\n  private readonly _zone = inject(NgZone);\n  private readonly _cdkTrapFocus = viewChild.required(CdkTrapFocus);\n  private readonly _dialogElement = viewChild.required<ElementRef<HTMLElement>>('dialog_element');\n\n  /** Element of the dialog that has or last had focus */\n  private readonly _activeElement$ = new BehaviorSubject<HTMLElement | undefined>(undefined);\n\n  protected readonly dialog = inject(ɵWorkbenchDialog);\n\n  protected headerHeight = signal<string | undefined>(undefined);\n  protected transformTranslateX = signal(0);\n  protected transformTranslateY = signal(0);\n\n  constructor() {\n    this.setDialogOffset();\n    this.addHostCssClasses();\n    this.trackFocus();\n    this.autoFocus();\n  }\n\n  private setDialogOffset(): void {\n    const stackPosition = this.dialog.getPositionInDialogStack();\n    this.transformTranslateX.set(stackPosition * 10);\n    this.transformTranslateY.set(stackPosition * 10);\n  }\n\n  private addHostCssClasses(): void {\n    const host = inject(ElementRef).nativeElement as HTMLElement;\n    synchronizeCssClasses(host, this.dialog.cssClass);\n  }\n\n  /**\n   * Focuses this dialog, restoring the focus to the last element that had the focus,\n   * or otherwise focuses the first focusable element.\n   */\n  public focus(): void {\n    const activeElement = this._activeElement$.getValue();\n    if (activeElement) {\n      activeElement.focus();\n    }\n    else if (!this._cdkTrapFocus().focusTrap.focusFirstTabbableElement()) {\n      // Focus dialog element so that it can be closed via Escape keystroke.\n      this._dialogElement().nativeElement.focus();\n    }\n  }\n\n  /**\n   * Tracks the focus of the dialog.\n   */\n  private trackFocus(): void {\n    effect(onCleanup => {\n      const dialogElement = this._dialogElement().nativeElement;\n\n      untracked(() => {\n        const subscription = fromEvent<FocusEvent>(dialogElement, 'focusin')\n          .pipe(\n            subscribeIn(fn => this._zone.runOutsideAngular(fn)),\n            map(event => event.target instanceof HTMLElement ? event.target : undefined),\n            // The dialog is focused if it has no focusable element, so the dialog can be closed via Escape.\n            // However, in order not to cancel the autofocus, the dialog element must not be memoized as the\n            // active element. Otherwise, delayed content would not be focused.\n            filter(element => element !== dialogElement),\n          )\n          .subscribe(activeElement => {\n            this._activeElement$.next(activeElement);\n          });\n        onCleanup(() => subscription.unsubscribe());\n      });\n    });\n  }\n\n  /**\n   * Focuses the first focusable element in the dialog. Has no effect if an element in the dialog already has the focus.\n   *\n   * If no focusable element can be found, the focusing will be repeated on the next DOM change until an element has the\n   * focus, allowing delayed content to get focus.\n   */\n  private autoFocus(): void {\n    effect(onCleanup => {\n      const dialogElement = this._dialogElement().nativeElement;\n\n      untracked(() => {\n        const subscription = fromMutation$(dialogElement, {subtree: true, childList: true})\n          .pipe(\n            startWith(undefined as void),\n            takeUntil(this._activeElement$.pipe(filter(Boolean))),\n          )\n          .subscribe(() => {\n            this.focus();\n          });\n        onCleanup(() => subscription.unsubscribe());\n      });\n    });\n  }\n\n  @HostListener('keydown.escape', ['$event'])\n  protected onEscape(event: Event): void {\n    if (this.dialog.closable()) {\n      this.dialog.close();\n      event.stopPropagation();\n    }\n  }\n\n  protected onMove(event: WbMoveEvent): void {\n    this.transformTranslateX.set(event.translateX);\n    this.transformTranslateY.set(event.translateY);\n  }\n\n  protected onResize(event: WbResizeEvent): void {\n    if (event.height !== undefined) {\n      this.dialog.size.height = `${event.height}px`;\n    }\n    if (event.width !== undefined) {\n      this.dialog.size.width = `${event.width}px`;\n    }\n    if (event.translateX !== undefined) {\n      this.transformTranslateX.set(event.translateX);\n    }\n    if (event.translateY !== undefined) {\n      this.transformTranslateY.set(event.translateY);\n    }\n  }\n\n  protected onHeaderDimensionChange(dimension: SciDimension): void {\n    this.headerHeight.set(`${dimension.offsetHeight}px`);\n  }\n}\n\n/**\n * Returns animation metadata to slide-in a new dialog.\n */\nfunction provideEnterAnimation(): AnimationMetadata[] {\n  return [\n    transition(':enter', [\n      style({opacity: 0, bottom: '100%', top: 'unset'}),\n      animate('.1s ease-out', style({opacity: 1, bottom: '*'})),\n    ]),\n  ];\n}\n\n/**\n * Blocks this dialog when other dialog(s) overlay it.\n */\nfunction configureDialogGlassPane(): Provider[] {\n  return [\n    {\n      provide: GLASS_PANE_BLOCKABLE,\n      useFactory: () => inject(ɵWorkbenchDialog),\n    },\n    {\n      provide: GLASS_PANE_OPTIONS,\n      useFactory: () => ({attributes: {'data-dialogid': inject(ɵWorkbenchDialog).id}}) satisfies GlassPaneOptions,\n    },\n  ];\n}\n","<div class=\"dialog e2e-dialog\"\n     [class.blinking]=\"dialog.blinking$ | async\"\n     [tabindex]=\"-1\"\n     wbMovable [wbHandle]=\"header\" (wbMovableMove)=\"onMove($event)\"\n     wbResizable [wbResizableEnabled]=\"dialog.resizable()\" (wbResizableResize)=\"onResize($event)\"\n     @enter\n     [@.disabled]=\"!dialog.animate\"\n     wbGlassPane\n     #dialog_element>\n  <div class=\"dialog-box e2e-dialog-box\" cdkTrapFocus>\n    <header #header\n            class=\"e2e-dialog-header\"\n            [class.divider]=\"dialog.header?.divider() ?? true\"\n            sciDimension (sciDimensionChange)=\"onHeaderDimensionChange($event)\">\n      <ng-container *ngTemplateOutlet=\"dialog.header?.template ?? default_dialog_header\"/>\n    </header>\n\n    <sci-viewport class=\"content e2e-dialog-content\">\n      <ng-container *ngComponentOutlet=\"dialog.component; inputs: dialog.inputs\"/>\n    </sci-viewport>\n\n    @if (dialog.footer || dialog.actions.length) {\n      <footer class=\"e2e-dialog-footer\" [class.divider]=\"dialog.footer?.divider() ?? true\">\n        <ng-container *ngTemplateOutlet=\"dialog.footer?.template ?? default_dialog_footer\"/>\n      </footer>\n    }\n  </div>\n</div>\n\n<ng-template #default_dialog_header>\n  <wb-dialog-header/>\n</ng-template>\n\n<ng-template #default_dialog_footer>\n  <wb-dialog-footer/>\n</ng-template>\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 {InjectionToken, signal, TemplateRef, ViewContainerRef, WritableSignal} from '@angular/core';\n\n/**\n * DI token to inject the DOM location where to attach iframes.\n */\nexport const IFRAME_OVERLAY_HOST = new InjectionToken<WritableSignal<ViewContainerRef | undefined>>('IFRAME_OVERLAY_HOST', {\n  providedIn: 'root',\n  factory: () => signal(undefined),\n});\n\n/**\n * DI token to inject the DOM location where to attach the visual placeholder when dragging a view over a drop zone.\n */\nexport const VIEW_DROP_ZONE_OVERLAY_HOST = new InjectionToken<WritableSignal<ViewContainerRef | undefined>>('VIEW_DROP_ZONE_OVERLAY_HOST', {\n  providedIn: 'root',\n  factory: () => signal(undefined),\n});\n\n/**\n * DI token to inject the DOM location of the {@link WorkbenchComponent} HTML element.\n */\nexport const WORKBENCH_ELEMENT_REF = new InjectionToken<WritableSignal<ViewContainerRef | undefined>>('WORKBENCH_ELEMENT_REF', {\n  providedIn: 'root',\n  factory: () => signal(undefined),\n});\n\n/**\n * DI token to inject the template for the desktop, if any.\n */\nexport const DESKTOP = new InjectionToken<WritableSignal<TemplateRef<void> | undefined>>('DESKTOP', {\n  providedIn: 'root',\n  factory: () => signal(undefined),\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 {BehaviorSubject, concatWith, delay, firstValueFrom, map, of, Subject, switchMap} from 'rxjs';\nimport {ApplicationRef, assertNotInReactiveContext, ComponentRef, computed, effect, EnvironmentInjector, inject, Injector, Signal, signal, untracked} from '@angular/core';\nimport {WorkbenchDialog, WorkbenchDialogSize, ɵWorkbenchDialogSize} from './workbench-dialog';\nimport {WorkbenchDialogOptions} from './workbench-dialog.options';\nimport {ComponentPortal, ComponentType} from '@angular/cdk/portal';\nimport {Overlay, OverlayRef} from '@angular/cdk/overlay';\nimport {WorkbenchDialogComponent} from './workbench-dialog.component';\nimport {ɵWorkbenchView} from '../view/ɵworkbench-view.model';\nimport {WorkbenchDialogRegistry} from './workbench-dialog.registry';\nimport {ɵDestroyRef} from '../common/ɵdestroy-ref';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {setStyle} from '../common/dom.util';\nimport {fromResize$} from '@scion/toolkit/observable';\nimport {ViewDragService} from '../view-dnd/view-drag.service';\nimport {WORKBENCH_ELEMENT_REF} from '../workbench-element-references';\nimport {Arrays} from '@scion/toolkit/util';\nimport {WorkbenchConfig} from '../workbench-config';\nimport {distinctUntilChanged, filter} from 'rxjs/operators';\nimport {WorkbenchDialogActionDirective} from './dialog-footer/workbench-dialog-action.directive';\nimport {WorkbenchDialogFooterDirective} from './dialog-footer/workbench-dialog-footer.directive';\nimport {WorkbenchDialogHeaderDirective} from './dialog-header/workbench-dialog-header.directive';\nimport {Disposable} from '../common/disposable';\nimport {Blockable} from '../glass-pane/blockable';\nimport {Blocking} from '../glass-pane/blocking';\nimport {provideViewContext} from '../view/view-context-provider';\nimport {boundingClientRect} from '@scion/components/dimension';\nimport {Translatable} from '../text/workbench-text-provider.model';\n\n/** @inheritDoc */\nexport class ɵWorkbenchDialog<R = unknown> implements WorkbenchDialog<R>, Blockable, Blocking {\n\n  private readonly _dialogEnvironmentInjector = inject(EnvironmentInjector);\n\n  private readonly _overlayRef: OverlayRef;\n  private readonly _portal: ComponentPortal<WorkbenchDialogComponent>;\n  private readonly _workbenchDialogRegistry = inject(WorkbenchDialogRegistry);\n  private readonly _workbenchConfig = inject(WorkbenchConfig);\n  private readonly _destroyRef = new ɵDestroyRef();\n  private readonly _blink$ = new Subject<void>();\n  private readonly _attached: Signal<boolean>;\n  private readonly _title = signal<Translatable | undefined>(undefined);\n  private readonly _closable = signal(true);\n  private readonly _resizable = signal(true);\n  private readonly _padding = signal(true);\n  private readonly _cssClass = signal<string[]>([]);\n\n  /**\n   * Result (or error) to be passed to the dialog opener.\n   */\n  private _result: R | Error | undefined;\n  private _componentRef: ComponentRef<WorkbenchDialogComponent> | undefined;\n\n  /**\n   * Indicates whether this dialog is blocked by other dialog(s) that overlay this dialog.\n   */\n  public readonly blockedBy$ = new BehaviorSubject<ɵWorkbenchDialog | null>(null);\n  public readonly size: WorkbenchDialogSize = new ɵWorkbenchDialogSize();\n  public readonly blinking$ = new BehaviorSubject(false);\n  public readonly context = {\n    view: inject(ɵWorkbenchView, {optional: true}),\n  };\n\n  public header: WorkbenchDialogHeaderDirective | undefined;\n  public footer: WorkbenchDialogFooterDirective | undefined;\n  public actions = new Array<WorkbenchDialogActionDirective>();\n\n  constructor(public id: string,\n              public component: ComponentType<unknown>,\n              private _options: WorkbenchDialogOptions) {\n    this._overlayRef = this.createOverlay();\n    this._portal = this.createPortal();\n    this._cssClass.set(Arrays.coerce(this._options.cssClass));\n    this._attached = this.monitorHostElementAttached();\n\n    this.stickToHostElement();\n    this.blockWhenNotOnTop();\n    this.restoreFocusOnAttach();\n    this.restoreFocusOnUnblock();\n    this.blinkOnRequest();\n  }\n\n  public async open(): Promise<R | undefined> {\n    // Wait for the overlay to be initially positioned to have a smooth slide-in animation.\n    if (this.animate) {\n      await firstValueFrom(fromResize$(this._overlayRef.hostElement));\n    }\n\n    // Attach the dialog portal to the overlay.\n    this._componentRef = this._overlayRef.attach(this._portal);\n\n    // Ensure to destroy this handle on browser back/forward navigation.\n    this._componentRef.onDestroy(() => this.destroy());\n\n    // Trigger a manual change detection cycle to avoid 'ExpressionChangedAfterItHasBeenCheckedError'\n    // when the dialog sets dialog-specific properties such as title or size during construction.\n    this._componentRef.changeDetectorRef.detectChanges();\n\n    // Wait for the dialog to close, resolving to its result or rejecting if closed with an error.\n    return new Promise<R | undefined>((resolve, reject) => {\n      this._destroyRef.onDestroy(() => {\n        this._result instanceof Error ? reject(this._result) : resolve(this._result);\n      });\n    });\n  }\n\n  /** @inheritDoc */\n  public close(result?: R | Error): void {\n    assertNotInReactiveContext(this.close, 'Call WorkbenchDialog.close() in a non-reactive (non-tracking) context, such as within the untracked() function.');\n    this._result = result;\n    this.destroy();\n  }\n\n  /**\n   * Inputs passed to the dialog.\n   */\n  public get inputs(): {[name: string]: unknown} | undefined {\n    return this._options.inputs;\n  }\n\n  /**\n   * Indicates if to animate the dialog.\n   */\n  public get animate(): boolean {\n    return this._options.animate ?? false;\n  }\n\n  /** @inheritDoc */\n  public focus(): void {\n    if (!this.blockedBy$.value) {\n      this._componentRef?.instance.focus();\n    }\n  }\n\n  public registerHeader(header: WorkbenchDialogHeaderDirective): Disposable {\n    this.header = header;\n    return {\n      dispose: () => {\n        if (this.header === header) {\n          this.header = undefined;\n        }\n      },\n    };\n  }\n\n  public registerFooter(footer: WorkbenchDialogFooterDirective): Disposable {\n    if (this.actions.length) {\n      throw Error('[DialogInitError] Custom dialog footer not supported if using dialog actions.');\n    }\n    this.footer = footer;\n    return {\n      dispose: () => {\n        if (this.footer === footer) {\n          this.footer = undefined;\n        }\n      },\n    };\n  }\n\n  public registerAction(action: WorkbenchDialogActionDirective): Disposable {\n    if (this.footer) {\n      throw Error('[DialogInitError] Dialog actions not supported if using a custom dialog footer.');\n    }\n    this.actions = this.actions.concat(action);\n    return {\n      dispose: () => this.actions = this.actions.filter(candidate => candidate !== action),\n    };\n  }\n\n  /** @inheritDoc */\n  public get title(): Signal<Translatable | undefined> {\n    return this._title;\n  }\n\n  /** @inheritDoc */\n  public set title(title: Translatable | undefined) {\n    untracked(() => this._title.set(title));\n  }\n\n  /** @inheritDoc */\n  public get closable(): Signal<boolean> {\n    return this._closable;\n  }\n\n  /** @inheritDoc */\n  public set closable(closable: boolean) {\n    untracked(() => this._closable.set(closable));\n  }\n\n  /** @inheritDoc */\n  public get resizable(): Signal<boolean> {\n    return this._resizable;\n  }\n\n  /** @inheritDoc */\n  public set resizable(resizable: boolean) {\n    untracked(() => this._resizable.set(resizable));\n  }\n\n  /** @inheritDoc */\n  public get padding(): Signal<boolean> {\n    return this._padding;\n  }\n\n  /** @inheritDoc */\n  public set padding(padding: boolean) {\n    untracked(() => this._padding.set(padding));\n  }\n\n  /** @inheritDoc */\n  public get cssClass(): Signal<string[]> {\n    return this._cssClass;\n  }\n\n  /** @inheritDoc */\n  public set cssClass(cssClass: string | string[]) {\n    untracked(() => this._cssClass.set(new Array<string>().concat(this._options.cssClass ?? []).concat(cssClass)));\n  }\n\n  /**\n   * Returns the position of the dialog in the dialog stack.\n   */\n  public getPositionInDialogStack(): number {\n    return this._workbenchDialogRegistry.indexOf(this);\n  }\n\n  /** @inheritDoc */\n  public blink(): void {\n    this._blink$.next();\n  }\n\n  /**\n   * Reference to the handle's injector. The injector will be destroyed when closing the dialog.\n   */\n  public get injector(): Injector {\n    return this._dialogEnvironmentInjector;\n  }\n\n  private createPortal(): ComponentPortal<WorkbenchDialogComponent> {\n    return new ComponentPortal(WorkbenchDialogComponent, null, Injector.create({\n      // Use the root environment injector instead of the dialog's environment injector.\n      // Otherwise, if an application-modal dialog opens a view-modal dialog, the view-modal dialog\n      // would not open because it uses the same environment injector, which, however, was destroyed\n      // when closed the application-modal dialog. View-modal dialogs are only opened after\n      // all application-modal dialogs have been closed.\n      parent: this._options.injector ?? inject(ApplicationRef).injector,\n      providers: [\n        provideViewContext(this.context.view),\n        {provide: ɵWorkbenchDialog, useValue: this},\n        {provide: WorkbenchDialog, useExisting: ɵWorkbenchDialog},\n      ],\n    }));\n  }\n\n  /**\n   * Creates a dedicated overlay per dialog to place it on top of previously created overlays, such as dialogs, popups, dropdowns, etc.\n   */\n  private createOverlay(): OverlayRef {\n    const overlay = inject(Overlay);\n    return overlay.create({\n      disposeOnNavigation: true, // dispose dialog on browser back/forward navigation\n      panelClass: ['wb-dialog-modality-context'],\n      positionStrategy: overlay.position().global(),\n      scrollStrategy: overlay.scrollStrategies.noop(),\n    });\n  }\n\n  /**\n   * Restores focus when re-attaching this dialog.\n   */\n  private restoreFocusOnAttach(): void {\n    effect(() => {\n      const attached = this._attached();\n      untracked(() => attached && this.focus());\n    });\n  }\n\n  /**\n   * Restores focus when unblocking this dialog.\n   */\n  private restoreFocusOnUnblock(): void {\n    this.blockedBy$\n      .pipe(\n        filter(blockedBy => !blockedBy),\n        takeUntilDestroyed(),\n      )\n      .subscribe(() => {\n        this.focus();\n      });\n  }\n\n  /**\n   * Monitors attachment of the host element.\n   */\n  private monitorHostElementAttached(): Signal<boolean> {\n    if (this.context.view) {\n      return this.context.view.portal.attached;\n    }\n    if (this._workbenchConfig.dialog?.modalityScope === 'viewport') {\n      return computed(() => true);\n    }\n    const workbenchElementRef = inject(WORKBENCH_ELEMENT_REF);\n    return computed(() => !!workbenchElementRef());\n  }\n\n  /**\n   * Aligns this dialog with the boundaries of the host element.\n   */\n  private stickToHostElement(): void {\n    if (this._options.modality === 'application' && this._workbenchConfig.dialog?.modalityScope === 'viewport') {\n      setStyle(this._overlayRef.hostElement, {inset: '0'});\n    }\n    else {\n      const workbenchElementRef = inject(WORKBENCH_ELEMENT_REF);\n      const hostElement = computed(() => (this.context.view ? this.context.view.portal.componentRef.location.nativeElement : workbenchElementRef()?.element.nativeElement) as HTMLElement);\n      const hostBounds = boundingClientRect(hostElement);\n      const viewDragService = inject(ViewDragService);\n\n      effect(() => {\n        const visible = this._attached() && !viewDragService.dragging();\n\n        // Maintain position and size when hidden to prevent flickering when visible again and to support for virtual scrolling in dialog content.\n        if (!visible) {\n          setStyle(this._overlayRef.overlayElement, {visibility: 'hidden'}); // Hide via `visibility` instead of `display` property to retain the size.\n          return;\n        }\n\n        // IMPORTANT: Track host bounds only if visible to prevent flickering.\n        const {left, top, width, height} = hostBounds();\n        setStyle(this._overlayRef.overlayElement, {visibility: null});\n        setStyle(this._overlayRef.hostElement, {\n          top: `${top}px`,\n          left: `${left}px`,\n          width: `${width}px`,\n          height: `${height}px`,\n        });\n      });\n    }\n  }\n\n  /**\n   * Blocks this dialog if not the topmost dialog in its context.\n   */\n  private blockWhenNotOnTop(): void {\n    this._workbenchDialogRegistry.top$({viewId: this.context.view?.id})\n      .pipe(\n        map(top => top === this ? null : top),\n        takeUntilDestroyed(),\n      )\n      .subscribe(this.blockedBy$);\n  }\n\n  private blinkOnRequest(): void {\n    this._blink$\n      .pipe(\n        switchMap(() => of(true).pipe(concatWith(of(false).pipe(delay(300))))),\n        distinctUntilChanged(),\n        takeUntilDestroyed(),\n      )\n      .subscribe(this.blinking$);\n  }\n\n  /**\n   * Destroys this dialog and associated resources.\n   */\n  public destroy(): void {\n    if (!this._destroyRef.destroyed) {\n      this._dialogEnvironmentInjector.destroy();\n      this._destroyRef.destroy();\n      this._overlayRef.dispose();\n    }\n  }\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 {assertNotInReactiveContext, createEnvironmentInjector, DOCUMENT, EnvironmentInjector, inject, Injectable, NgZone, runInInjectionContext} from '@angular/core';\nimport {WorkbenchDialogOptions} from './workbench-dialog.options';\nimport {ɵWorkbenchDialog} from './ɵworkbench-dialog';\nimport {ɵWorkbenchView} from '../view/ɵworkbench-view.model';\nimport {WORKBENCH_VIEW_REGISTRY} from '../view/workbench-view.registry';\nimport {firstValueFrom} from 'rxjs';\nimport {WorkbenchDialogRegistry} from './workbench-dialog.registry';\nimport {filter} from 'rxjs/operators';\nimport {ComponentType} from '@angular/cdk/portal';\nimport {WorkbenchDialogService} from './workbench-dialog.service';\nimport {provideViewContext} from '../view/view-context-provider';\nimport {UUID} from '@scion/toolkit/uuid';\n\n/** @inheritDoc */\n@Injectable({providedIn: 'root'})\nexport class ɵWorkbenchDialogService implements WorkbenchDialogService {\n\n  private readonly _document = inject(DOCUMENT);\n  private readonly _viewRegistry = inject(WORKBENCH_VIEW_REGISTRY);\n  private readonly _dialogRegistry = inject(WorkbenchDialogRegistry);\n  private readonly _zone = inject(NgZone);\n  private readonly _environmentInjector = inject(EnvironmentInjector);\n  private readonly _view = inject(ɵWorkbenchView, {optional: true});\n\n  /** @inheritDoc */\n  public async open<R>(component: ComponentType<unknown>, options?: WorkbenchDialogOptions): Promise<R | undefined> {\n    assertNotInReactiveContext(this.open, 'Call WorkbenchDialogService.open() in a non-reactive (non-tracking) context, such as within the untracked() function.');\n\n    // Ensure to run in Angular zone to display the dialog even when called from outside the Angular zone.\n    if (!NgZone.isInAngularZone()) {\n      return this._zone.run(() => this.open(component, options));\n    }\n\n    // Resolve view that opened the dialog, if any.\n    const contextualView = this.resolveContextualView(options);\n\n    // Delay the opening of a view-modal dialog until all application-modal dialogs are closed.\n    // Otherwise, the view-modal dialog would overlap already opened application-modal dialogs.\n    if (contextualView) {\n      await this.waitUntilApplicationModalDialogsClosed();\n    }\n\n    // Create the dialog.\n    const dialog = this.createDialog<R>(component, {...options, contextualView});\n    this._dialogRegistry.register(dialog);\n\n    // Capture focused element to restore focus when closing the dialog.\n    const previouslyFocusedElement = this._document.activeElement instanceof HTMLElement ? this._document.activeElement : undefined;\n    try {\n      return await dialog.open();\n    }\n    finally {\n      this._dialogRegistry.unregister(dialog);\n\n      // Restore focus to previously focused element when closing the last dialog in the current context.\n      if (previouslyFocusedElement && !this._dialogRegistry.top({viewId: contextualView?.id})) {\n        previouslyFocusedElement.focus();\n      }\n    }\n  }\n\n  /**\n   * Creates the dialog handle.\n   */\n  private createDialog<R>(component: ComponentType<unknown>, options: WorkbenchDialogOptions & {contextualView: ɵWorkbenchView | null}): ɵWorkbenchDialog<R> {\n    // Construct the handle in an injection context that shares the dialog's lifecycle, allowing for automatic cleanup of effects and RxJS interop functions.\n    const dialogId = UUID.randomUUID();\n    const dialogEnvironmentInjector = createEnvironmentInjector([provideViewContext(options.contextualView)], this._environmentInjector, `Workbench Dialog ${dialogId}`);\n    return runInInjectionContext(dialogEnvironmentInjector, () => new ɵWorkbenchDialog<R>(dialogId, component, options));\n  }\n\n  /**\n   * Resolves the contextual view to stick the dialog to.\n   */\n  private resolveContextualView(options?: WorkbenchDialogOptions): ɵWorkbenchView | null {\n    if (options?.modality === 'application') {\n      return null;\n    }\n    if (options?.context?.viewId) {\n      return this._viewRegistry.get(options.context.viewId);\n    }\n    else if (this._view) {\n      return this._view;\n    }\n    return null;\n  }\n\n  /**\n   * Returns a Promise that resolves when all application modal-dialogs are closed. If none are opened, the Promise resolves immediately.\n   */\n  private async waitUntilApplicationModalDialogsClosed(): Promise<void> {\n    await firstValueFrom(this._dialogRegistry.top$().pipe(filter(top => !top)));\n  }\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 {Injectable} from '@angular/core';\nimport {WorkbenchDialogOptions} from './workbench-dialog.options';\nimport {ComponentType} from '@angular/cdk/portal';\nimport {ɵWorkbenchDialogService} from './ɵworkbench-dialog.service';\n\n/**\n * Enables the display of a component in a modal 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 or resize a dialog.\n *\n * Displayed on top of other content, a dialog blocks interaction with other parts of the application.\n *\n * ## Modality\n * A dialog can be view-modal or application-modal.\n *\n * A view-modal dialog blocks only a specific view, allowing the user to interact with other views. An application-modal dialog blocks\n * the workbench, or the browser's viewport if configured in {@link WorkbenchConfig.dialog.modalityScope}.\n *\n * ## Dialog Stack\n * Multiple dialogs are stacked, and only the topmost dialog in each modality stack can be interacted with.\n *\n * ## Dialog Component\n * The dialog component can inject the {@link WorkbenchDialog} handle to interact with the dialog, such as setting the title or closing the dialog.\n * Inputs passed to the dialog are available as input properties in the dialog component.\n *\n * ## Dialog Header\n * By default, the dialog displays the title and a close button in the header. Alternatively, the dialog supports the use of a custom header.\n * To provide a custom header, add an Angular template to the HTML of the dialog component and decorate it with the `wbDialogHeader` directive.\n *\n * ```html\n * <ng-template wbDialogHeader>\n *   <app-dialog-header/>\n * </ng-template>\n * ```\n *\n * ## Dialog Footer\n * A dialog has a default footer that displays actions defined in the HTML of the dialog component. An action is an Angular template decorated with\n * the `wbDialogAction` directive. Multiple actions are supported, rendered in modeling order, and can be left- or right-aligned.\n *\n * ```html\n * <!-- Checkbox -->\n * <ng-template wbDialogAction align=\"start\">\n *   <label>\n *     <input type=\"checkbox\"/>\n *     Do not ask me again\n *   </label>\n * </ng-template>\n *\n * <!-- OK Button -->\n * <ng-template wbDialogAction align=\"end\">\n *   <button (click)=\"...\">OK</button>\n * </ng-template>\n *\n * <!-- Cancel Button -->\n * <ng-template wbDialogAction align=\"end\">\n *   <button (click)=\"...\">Cancel</button>\n * </ng-template>\n * ```\n *\n * Alternatively, the dialog supports the use of a custom footer. To provide a custom footer, add an Angular template to the HTML of the dialog component and\n * decorate it with the `wbDialogFooter` directive.\n *\n * ```html\n * <ng-template wbDialogFooter>\n *   <app-dialog-footer/>\n * </ng-template>\n * ```\n *\n * ## Styling\n * The following CSS variables can be set to customize the default look of a dialog.\n *\n * - `--sci-workbench-dialog-padding`\n * - `--sci-workbench-dialog-header-height`\n * - `--sci-workbench-dialog-header-background-color`\n * - `--sci-workbench-dialog-title-font-family`\n * - `--sci-workbench-dialog-title-font-weight`\n * - `--sci-workbench-dialog-title-font-size`\n * - `--sci-workbench-dialog-title-align`\n */\n@Injectable({providedIn: 'root', useExisting: ɵWorkbenchDialogService})\nexport abstract class WorkbenchDialogService {\n\n  /**\n   * Opens a dialog with the specified component and options.\n   *\n   * By default, the calling context determines the modality of the dialog. If the dialog is opened from a view, only this view is blocked.\n   * To open the dialog with a different modality, specify the modality in {@link WorkbenchDialogOptions.modality}.\n   *\n   * Data can be passed to the component as inputs via {@link WorkbenchDialogOptions.inputs} property or by providing a custom injector\n   * via {@link WorkbenchDialogOptions.injector} property. Dialog inputs are available as input properties in the dialog component.\n   *\n   * @param component - Specifies the component to display in the dialog.\n   * @param options - Controls how to open a dialog.\n   * @returns Promise that resolves to the dialog result, if any, or that rejects if the dialog couldn't be opened or was closed with an error.\n   */\n  public abstract open<R>(component: ComponentType<unknown>, options?: WorkbenchDialogOptions): Promise<R | undefined>;\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 */\nimport {Component, ElementRef, inject, input, output, viewChildren} from '@angular/core';\nimport {KeyValuePipe} from '@angular/common';\nimport {observeOn} from 'rxjs/operators';\nimport {animationFrameScheduler, firstValueFrom} from 'rxjs';\nimport {fromResize$} from '@scion/toolkit/observable';\nimport {TextPipe} from '../../text/text.pipe';\n\n@Component({\n  selector: 'wb-message-box-footer',\n  templateUrl: './message-box-footer.component.html',\n  styleUrls: ['./message-box-footer.component.scss'],\n  imports: [\n    KeyValuePipe,\n    TextPipe,\n  ],\n  host: {\n    '[attr.data-severity]': 'severity()',\n  },\n})\nexport class MessageBoxFooterComponent {\n\n  public readonly actions = input.required<{[key: string]: string}>();\n  public readonly severity = input.required<'info' | 'warn' | 'error'>();\n  public readonly action = output<string>();\n  public readonly preferredSizeChange = output<number>();\n\n  private readonly _actionButtons = viewChildren<ElementRef<HTMLElement>>('action_button');\n\n  constructor() {\n    void this.emitPreferredSize();\n  }\n\n  protected insertionSortOrderFn = (): number => 0;\n\n  protected onAction(key: string): void {\n    this.action.emit(key);\n  }\n\n  protected onArrowKey(index: number, direction: 'left' | 'right'): void {\n    const actionButtonCount = this._actionButtons().length;\n    const newIndex = (direction === 'left' ? index - 1 : index + 1);\n    this._actionButtons()[(newIndex + actionButtonCount) % actionButtonCount]!.nativeElement.focus();\n  }\n\n  private async emitPreferredSize(): Promise<void> {\n    const host = inject(ElementRef).nativeElement as HTMLElement;\n    host.classList.add('calculating-min-width');\n    try {\n      // Wait for the CSS class to take effect, then wait an animation frame to avoid the error: \"ResizeObserver loop completed with undelivered notifications\".\n      await firstValueFrom(fromResize$(host).pipe(observeOn(animationFrameScheduler)));\n      this.preferredSizeChange.emit(host.offsetWidth);\n    }\n    finally {\n      host.classList.remove('calculating-min-width');\n    }\n  }\n}\n","@for (action of actions() | keyvalue:insertionSortOrderFn; track action.key) {\n  <button #action_button\n          (click)=\"onAction(action.key)\"\n          (keydown.arrowLeft)=\"onArrowKey($index, 'left')\"\n          (keydown.arrowRight)=\"onArrowKey($index, 'right')\"\n          [attr.data-action]=\"action.key\"\n          class=\"action e2e-action\">\n    {{(action.value | wbText)()}}\n  </button>\n\n  @if (!$last) {\n    <span class=\"divider\"></span>\n  }\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 {booleanAttribute, DestroyRef, Directive, inject, input, TemplateRef} from '@angular/core';\nimport {ɵWorkbenchDialog} from '../ɵworkbench-dialog';\nimport {Disposable} from '../../common/disposable';\nimport {asapScheduler} from 'rxjs';\n\n/**\n * Use this directive to replace the default dialog footer that renders actions contributed via the {@link WorkbenchDialogActionDirective} directive.\n *\n * The host element of this modeling directive must be a <ng-template>. The footer shares the lifecycle of the host element.\n *\n * **Example:**\n * ```html\n * <ng-template wbDialogFooter>\n *   <app-dialog-footer/>\n * </ng-template>\n * ```\n */\n@Directive({selector: 'ng-template[wbDialogFooter]'})\nexport class WorkbenchDialogFooterDirective {\n\n  /**\n   * Specifies if to display a visual separator between the dialog content and this footer.\n   * Defaults to `true`.\n   */\n  public readonly divider = input(undefined, {transform: booleanAttribute});\n  public readonly template = inject(TemplateRef) as TemplateRef<void>;\n\n  private _footer: Disposable | undefined;\n\n  constructor() {\n    const dialog = inject(ɵWorkbenchDialog);\n\n    // Defer registering footer to avoid `ExpressionChangedAfterItHasBeenCheckedError`.\n    asapScheduler.schedule(() => this._footer = dialog.registerFooter(this));\n\n    // Defer disposing footer to avoid `ExpressionChangedAfterItHasBeenCheckedError`.\n    inject(DestroyRef).onDestroy(() => asapScheduler.schedule(() => this._footer?.dispose()));\n  }\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 {booleanAttribute, DestroyRef, Directive, inject, input, TemplateRef} from '@angular/core';\nimport {ɵWorkbenchDialog} from '../ɵworkbench-dialog';\nimport {Disposable} from '../../common/disposable';\nimport {asapScheduler} from 'rxjs';\n\n/**\n * Use this directive to replace the default dialog header that displays the title and a close button.\n *\n * The host element of this modeling directive must be a <ng-template>. The header shares the lifecycle of the host element.\n *\n * **Example:**\n * ```html\n * <ng-template wbDialogHeader>\n *   <app-dialog-header/>\n * </ng-template>\n * ```\n */\n@Directive({selector: 'ng-template[wbDialogHeader]'})\nexport class WorkbenchDialogHeaderDirective {\n\n  /**\n   * Specifies if to display a visual separator between this header and the dialog content.\n   * Defaults to `true`.\n   */\n  public readonly divider = input(undefined, {transform: booleanAttribute});\n  public readonly template = inject(TemplateRef) as TemplateRef<void>;\n\n  private _header: Disposable | undefined;\n\n  constructor() {\n    const dialog = inject(ɵWorkbenchDialog);\n\n    // Defer registering header to avoid `ExpressionChangedAfterItHasBeenCheckedError`.\n    asapScheduler.schedule(() => this._header = dialog.registerHeader(this));\n\n    // Defer disposing header to avoid `ExpressionChangedAfterItHasBeenCheckedError`.\n    inject(DestroyRef).onDestroy(() => asapScheduler.schedule(() => this._header?.dispose()));\n  }\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 */\nimport {Component, input} from '@angular/core';\nimport {Translatable} from '../../text/workbench-text-provider.model';\nimport {TextPipe} from '../../text/text.pipe';\n\n@Component({\n  selector: 'wb-message-box-header',\n  templateUrl: './message-box-header.component.html',\n  styleUrls: ['./message-box-header.component.scss'],\n  imports: [\n    TextPipe,\n  ],\n  host: {\n    '[attr.data-severity]': 'severity()',\n  },\n})\nexport class MessageBoxHeaderComponent {\n\n  public readonly title = input<Translatable>();\n  public readonly severity = input.required<'info' | 'warn' | 'error'>();\n}\n","@if (title()) {\n  <span class=\"title e2e-title\">{{(title() | wbText)()}}</span>\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 {Pipe, PipeTransform} from '@angular/core';\n\n/**\n * Tests if the object is of the specified type.\n */\n@Pipe({name: 'wbTypeof'})\nexport class TypeofPipe implements PipeTransform {\n\n  public transform<T>(object: T, type: 'undefined' | 'object' | 'boolean' | 'number' | 'string' | 'symbol' | 'function' | 'bigint'): object is T {\n    return typeof object === type;\n  }\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 */\nimport {Component, HostBinding, HostListener, inject, input} from '@angular/core';\nimport {MessageBoxFooterComponent} from './message-box-footer/message-box-footer.component';\nimport {WorkbenchMessageBoxOptions} from './workbench-message-box.options';\nimport {ɵWorkbenchDialog} from '../dialog/ɵworkbench-dialog';\nimport {NgComponentOutlet} from '@angular/common';\nimport {WorkbenchDialogFooterDirective} from '../dialog/dialog-footer/workbench-dialog-footer.directive';\nimport {WorkbenchDialogHeaderDirective} from '../dialog/dialog-header/workbench-dialog-header.directive';\nimport {MessageBoxHeaderComponent} from './message-box-header/message-box-header.component';\nimport {ComponentType} from '@angular/cdk/portal';\nimport {TypeofPipe} from '../common/typeof.pipe';\nimport {SciDimension, SciDimensionDirective} from '@scion/components/dimension';\nimport {TextPipe} from '../text/text.pipe';\nimport {Translatable} from '../text/workbench-text-provider.model';\n\n/**\n * Renders the workbench message box.\n *\n * This component is designed to be opened in a workbench dialog.\n */\n@Component({\n  selector: 'wb-message-box',\n  templateUrl: './workbench-message-box.component.html',\n  styleUrls: ['./workbench-message-box.component.scss'],\n  imports: [\n    NgComponentOutlet,\n    SciDimensionDirective,\n    WorkbenchDialogHeaderDirective,\n    WorkbenchDialogFooterDirective,\n    MessageBoxHeaderComponent,\n    MessageBoxFooterComponent,\n    TypeofPipe,\n    TextPipe,\n  ],\n})\nexport class WorkbenchMessageBoxComponent {\n\n  public readonly message = input.required({transform: nullIfEmptyMessage});\n  public readonly options = input<WorkbenchMessageBoxOptions>();\n\n  private readonly _dialog = inject(ɵWorkbenchDialog);\n\n  // Ensure host element to be focusable in order to close the message box on Escape keystroke.\n  @HostBinding('attr.tabindex')\n  protected tabindex = -1;\n\n  @HostBinding('class.empty')\n  protected empty = false;\n\n  @HostBinding('class.content-selectable')\n  protected get contentSelectable(): boolean | undefined {\n    return this.options()?.contentSelectable;\n  }\n\n  @HostBinding('class.has-title')\n  protected get hasTitle(): boolean {\n    return !!this.options()?.title;\n  }\n\n  constructor() {\n    this._dialog.closable = false;\n    this._dialog.resizable = false;\n    this._dialog.padding = false;\n    this._dialog.size.maxWidth = 'var(--sci-workbench-messagebox-max-width)';\n  }\n\n  protected onAction(action: string): void {\n    this._dialog.close(action);\n  }\n\n  @HostListener('keydown.escape')\n  protected onEscape(): void {\n    if ('cancel' in (this.options()?.actions ?? {})) {\n      this._dialog.close('cancel');\n    }\n  }\n\n  protected onFooterPreferredSizeChange(preferredSize: number): void {\n    this._dialog.size.minWidth = `${preferredSize}px`;\n  }\n\n  protected onContentDimensionChange(dimension: SciDimension): void {\n    this.empty = !dimension.offsetHeight;\n  }\n}\n\nfunction nullIfEmptyMessage(message: Translatable | ComponentType<unknown>): Translatable | ComponentType<unknown> | null {\n  return message || null;\n}\n","@let options = this.options() ?? {};\n<ng-template wbDialogHeader [divider]=\"false\">\n  <wb-message-box-header [title]=\"options.title\" [severity]=\"options.severity ?? 'info'\"/>\n</ng-template>\n\n@let message = this.message();\n<div class=\"message e2e-message\" [class.text]=\"message | wbTypeof:'string'\" sciDimension (sciDimensionChange)=\"onContentDimensionChange($event)\">\n  @if (message | wbTypeof:'string') {\n    {{($any(message) | wbText)()}}\n  } @else {\n    <ng-container *ngComponentOutlet=\"message; inputs: options.inputs\"/>\n  }\n</div>\n\n<ng-template wbDialogFooter>\n  <wb-message-box-footer [actions]=\"options.actions ?? {ok: '%workbench.ok.action'}\"\n                         [severity]=\"options.severity ?? 'info'\"\n                         (action)=\"onAction($event)\"\n                         (keydown.escape)=\"onEscape()\"\n                         (preferredSizeChange)=\"onFooterPreferredSizeChange($event)\"/>\n</ng-template>\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 */\nimport {assertNotInReactiveContext, inject, Injectable, NgZone} from '@angular/core';\nimport {WorkbenchMessageBoxOptions} from './workbench-message-box.options';\nimport {WorkbenchDialogService} from '../dialog/workbench-dialog.service';\nimport {WorkbenchMessageBoxComponent} from './workbench-message-box.component';\nimport {ComponentType} from '@angular/cdk/portal';\nimport {WorkbenchMessageBoxService} from './workbench-message-box.service';\nimport {Translatable} from '../text/workbench-text-provider.model';\n\n/** @inheritDoc */\n@Injectable({providedIn: 'root'})\nexport class ɵWorkbenchMessageBoxService implements WorkbenchMessageBoxService {\n\n  private readonly _workbenchDialogService = inject(WorkbenchDialogService);\n  private readonly _zone = inject(NgZone);\n\n  /**\n   * @inheritDoc\n   */\n  public async open(message: Translatable | ComponentType<unknown>, options?: WorkbenchMessageBoxOptions): Promise<string> {\n    assertNotInReactiveContext(this.open, 'Call WorkbenchMessageBoxService.open() in a non-reactive (non-tracking) context, such as within the untracked() function.');\n\n    // Ensure to run in Angular zone to display the message box even if called from outside the Angular zone, e.g. from an error handler.\n    if (!NgZone.isInAngularZone()) {\n      return this._zone.run(() => this.open(message, options));\n    }\n\n    return (await this._workbenchDialogService.open<string>(WorkbenchMessageBoxComponent, {\n      inputs: {message, options},\n      modality: options?.modality,\n      injector: options?.injector,\n      cssClass: options?.cssClass,\n      context: options?.context,\n      animate: true,\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 {Component, effect, HostBinding, inject, Injector, Provider, viewChild} from '@angular/core';\nimport {ɵPopup} from './popup.config';\nimport {CdkPortalOutlet, ComponentPortal} from '@angular/cdk/portal';\nimport {CdkTrapFocus} from '@angular/cdk/a11y';\nimport {SciViewportComponent} from '@scion/components/viewport';\nimport {GLASS_PANE_BLOCKABLE, GLASS_PANE_OPTIONS, GlassPaneDirective, GlassPaneOptions} from '../glass-pane/glass-pane.directive';\n\n/**\n * Displays the configured popup component in the popup overlay.\n *\n * The component is added to a viewport so that it scrolls when it exceeds the maximum allowed popup overlay size.\n * A focus trap is installed and the initial focus is set.\n */\n@Component({\n  selector: 'wb-popup',\n  templateUrl: './popup.component.html',\n  styleUrls: ['./popup.component.scss'],\n  imports: [\n    CdkTrapFocus,\n    CdkPortalOutlet,\n    SciViewportComponent,\n  ],\n  hostDirectives: [\n    GlassPaneDirective,\n  ],\n  providers: [\n    configurePopupGlassPane(),\n  ],\n})\nexport class PopupComponent {\n\n  private readonly _popup = inject(ɵPopup);\n  private readonly _cdkTrapFocus = viewChild.required('focus_trap', {read: CdkTrapFocus});\n\n  protected portal = new ComponentPortal(this._popup.component, this._popup.viewContainerRef, inject(Injector));\n\n  @HostBinding('style.width')\n  protected get popupWidth(): string | undefined {\n    return this._popup.size?.width;\n  }\n\n  @HostBinding('style.min-width')\n  protected get popupMinWidth(): string | undefined {\n    return this._popup.size?.minWidth;\n  }\n\n  @HostBinding('style.max-width')\n  protected get popupMaxWidth(): string | undefined {\n    return this._popup.size?.maxWidth;\n  }\n\n  @HostBinding('style.height')\n  protected get popupHeight(): string | undefined {\n    return this._popup.size?.height;\n  }\n\n  @HostBinding('style.min-height')\n  protected get popupMinHeight(): string | undefined {\n    return this._popup.size?.minHeight;\n  }\n\n  @HostBinding('style.max-height')\n  protected get popupMaxHeight(): string | undefined {\n    return this._popup.size?.maxHeight;\n  }\n\n  @HostBinding('attr.class')\n  protected get cssClasses(): string {\n    return this._popup.cssClasses.join(' ');\n  }\n\n  @HostBinding('attr.data-popupid')\n  protected get id(): string {\n    return this._popup.id;\n  }\n\n  constructor() {\n    this.focusInitialElement();\n  }\n\n  private focusInitialElement(): void {\n    const effectRef = effect(() => {\n      // [Angular 14] The initial focus must not be requested via `cdkTrapFocusAutoCapture` as this would restore\n      // focus to the previously focused element when the `FocusTrap` is destroyed. This behavior is unwanted if the\n      // popup is closed by losing focus. Otherwise, the newly focused element that caused the loss of focus and thus\n      // the closing of the popup would immediately become unfocused again. This behavior could only be observed when\n      // the popup loses focus by clicking on an element in a microfrontend.\n      void this._cdkTrapFocus().focusTrap.focusInitialElementWhenReady();\n      effectRef.destroy();\n    });\n  }\n}\n\n/**\n * Blocks this popup when dialog(s) overlay it.\n */\nfunction configurePopupGlassPane(): Provider[] {\n  return [\n    {\n      provide: GLASS_PANE_BLOCKABLE,\n      useFactory: () => inject(ɵPopup),\n    },\n    {\n      provide: GLASS_PANE_OPTIONS,\n      useFactory: () => ({attributes: {'data-popupid': inject(ɵPopup).id}}) satisfies GlassPaneOptions,\n    },\n  ];\n}\n","<sci-viewport cdkTrapFocus class=\"e2e-popup-viewport\" #focus_trap>\n  <ng-container *cdkPortalOutlet=\"portal\"/>\n</sci-viewport>\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 * Returns the value clamped to the inclusive range of min and max.\n */\nexport function clamp(value: number, minmax: {min: number; max: number}): number {\n  return Math.max(minmax.min, Math.min(value, minmax.max));\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 {assertNotInReactiveContext, computed, createEnvironmentInjector, DestroyRef, DOCUMENT, effect, ElementRef, EnvironmentInjector, inject, Injectable, Injector, NgZone, runInInjectionContext, Signal, untracked} from '@angular/core';\nimport {ConnectedPosition, Overlay, OverlayConfig, OverlayRef} from '@angular/cdk/overlay';\nimport {firstValueFrom, fromEvent} from 'rxjs';\nimport {filter} from 'rxjs/operators';\nimport {ComponentPortal} from '@angular/cdk/portal';\nimport {Popup, PopupConfig, ɵPopup} from './popup.config';\nimport {FocusMonitor, FocusOrigin} from '@angular/cdk/a11y';\nimport {Observables} from '@scion/toolkit/util';\nimport {WORKBENCH_VIEW_REGISTRY} from '../view/workbench-view.registry';\nimport {fromResize$} from '@scion/toolkit/observable';\nimport {PopupComponent} from './popup.component';\nimport {observeIn, subscribeIn} from '@scion/toolkit/operators';\nimport {ɵWorkbenchView} from '../view/ɵworkbench-view.model';\nimport {BottomLeftPoint, BottomRightPoint, Point, PopupOrigin, TopLeftPoint, TopRightPoint} from './popup.origin';\nimport {takeUntilDestroyed, toObservable, toSignal} from '@angular/core/rxjs-interop';\nimport {provideViewContext} from '../view/view-context-provider';\nimport {UUID} from '@scion/toolkit/uuid';\nimport {boundingClientRect} from '@scion/components/dimension';\nimport {clamp} from '../common/math.util';\nimport {coerceElement} from '@angular/cdk/coercion';\n\nconst NORTH: ConnectedPosition = {originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', panelClass: 'wb-north'};\nconst SOUTH: ConnectedPosition = {originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', panelClass: 'wb-south'};\nconst WEST: ConnectedPosition = {originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center', panelClass: 'wb-west'};\nconst EAST: ConnectedPosition = {originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center', panelClass: 'wb-east'};\n\n/**\n * Enables the display of a component in a popup.\n *\n * A popup is a visual workbench component for displaying content above other content. It is positioned relative to an anchor and\n * moves when the anchor moves. Unlike a dialog, the popup closes on focus loss.\n */\n@Injectable({providedIn: 'root'})\nexport class PopupService {\n\n  private readonly _environmentInjector = inject(EnvironmentInjector);\n  private readonly _overlay = inject(Overlay);\n  private readonly _focusManager = inject(FocusMonitor);\n  private readonly _viewRegistry = inject(WORKBENCH_VIEW_REGISTRY);\n  private readonly _zone = inject(NgZone);\n  private readonly _document = inject(DOCUMENT);\n  private readonly _view = inject(ɵWorkbenchView, {optional: true});\n\n  /**\n   * Opens a popup with the specified component and options.\n   *\n   * The anchor is used to position the popup based on its preferred alignment:\n   * - Using an element: The popup opens and sticks to the element.\n   * - Using coordinates: The popup opens and sticks relative to the view or page bounds.\n   *\n   * If the popup is opened within a view, it only displays if the view is active and closes when the view is closed.\n   *\n   * By default, the popup closes on focus loss or when pressing the escape key.\n   *\n   * Pass data to the popup via {@link PopupConfig#input}. The component can inject the popup handle {@link Popup} to\n   * read input data or to close the popup.\n   *\n   * @param config - Controls popup behavior\n   * @returns Promise that resolves to the popup result, if any, or that rejects if the popup couldn't be opened or was closed with an error.\n   */\n  public async open<R>(config: PopupConfig): Promise<R | undefined> {\n    assertNotInReactiveContext(this.open, 'Call WorkbenchPopupService.open() in a non-reactive (non-tracking) context, such as within the untracked() function.');\n\n    // Ensure to run in Angular zone to display the popup even when called from outside the Angular zone.\n    if (!NgZone.isInAngularZone()) {\n      return this._zone.run(() => this.open(config));\n    }\n\n    const align = config.align ?? 'north';\n    const contextualView = this.resolveContextualView(config);\n    const popup = this.createPopup(config, {view: contextualView});\n    const popupDestroyRef = popup.injector.get(DestroyRef);\n    const popupOrigin = this.trackPopupOrigin(config, contextualView, popup.injector);\n\n    // Wait for the initial position.\n    const initialPosition = await firstValueFrom(toObservable(popupOrigin, {injector: popup.injector}).pipe(filter(Boolean)));\n\n    const overlayPositionStrategy = this._overlay.position()\n      .flexibleConnectedTo(initialPosition)\n      .withFlexibleDimensions(false)\n      .withLockedPosition(false) // If locked, the popup won't attempt to reposition itself if not enough space available.\n      .withPositions(((): ConnectedPosition[] => {\n        switch (align) {\n          case 'north':\n            return [NORTH, SOUTH, WEST, EAST];\n          case 'south':\n            return [SOUTH, NORTH, WEST, EAST];\n          case 'west':\n            return [WEST, EAST, NORTH, SOUTH];\n          case 'east':\n            return [EAST, WEST, NORTH, SOUTH];\n          default:\n            throw Error('[PopupPositionError] Illegal position; must be north, south, west or east');\n        }\n      })());\n\n    // Configure the popup overlay.\n    const overlayConfig = new OverlayConfig({\n      panelClass: 'wb-popup',\n      hasBackdrop: false,\n      positionStrategy: overlayPositionStrategy,\n      scrollStrategy: this._overlay.scrollStrategies.noop(),\n      disposeOnNavigation: true,\n    });\n\n    // Construct the popup component and attach it to the DOM.\n    const overlayRef = this._overlay.create(overlayConfig);\n    const popupPortal = new ComponentPortal(PopupComponent, null, Injector.create({\n      parent: config.componentConstructOptions?.injector ?? this._environmentInjector,\n      providers: [\n        {provide: ɵPopup, useValue: popup},\n        {provide: Popup, useExisting: ɵPopup},\n        provideViewContext(contextualView),\n        ...[config.componentConstructOptions?.providers ?? []],\n      ],\n    }));\n    const componentRef = overlayRef.attach(popupPortal);\n    const popupElement = componentRef.location.nativeElement as HTMLElement;\n\n    // Make the popup focusable and request the focus.\n    popupElement.setAttribute('tabindex', '-1');\n    this._focusManager.focusVia(popupElement, 'program'); // To not close the popup immediately when it opens, if using the 'onFocusLost' strategy.\n\n    // Reposition popup when the anchor is moved.\n    effect(() => {\n      const origin = popupOrigin();\n      untracked(() => {\n        if (origin) {\n          overlayPositionStrategy.setOrigin(origin);\n          overlayRef.updatePosition();\n        }\n      });\n    }, {injector: popup.injector});\n\n    // Reposition popup when resized.\n    fromResize$(overlayRef.overlayElement)\n      .pipe(\n        observeIn(fn => this._zone.run(fn)),\n        takeUntilDestroyed(popupDestroyRef),\n      )\n      .subscribe(() => {\n        overlayRef.updatePosition();\n      });\n\n    // Close the popup depending on the passed config.\n    this.installPopupCloser(config, popupElement, popup, contextualView);\n\n    // Hide the popup when detaching the contextual view, if any.\n    if (contextualView) {\n      this.hidePopupOnViewDetach(overlayRef, contextualView, popup);\n    }\n\n    // Dispose the popup when closing it.\n    popupDestroyRef.onDestroy(() => {\n      overlayRef.dispose();\n    });\n\n    return new Promise<R | undefined>((resolve, reject) => {\n      popupDestroyRef.onDestroy(() => {\n        popup.result instanceof Error ? reject(popup.result) : resolve(popup.result as R);\n      });\n    });\n  }\n\n  /**\n   * Creates the popup handle.\n   */\n  private createPopup<R>(config: PopupConfig, context: {view: ɵWorkbenchView | null}): ɵPopup<R> {\n    // Construct the handle in an injection context that shares the popup's lifecycle, allowing for automatic cleanup of effects and RxJS interop functions.\n    const popupId = config.id ?? UUID.randomUUID();\n    const popupEnvironmentInjector = createEnvironmentInjector([provideViewContext(context.view)], this._environmentInjector, `Workbench Popup ${popupId}`);\n    return runInInjectionContext(popupEnvironmentInjector, () => new ɵPopup<R>(popupId, config));\n  }\n\n  /**\n   * Closes the popup depending on the configured popup closing strategy.\n   */\n  private installPopupCloser(config: PopupConfig, popupElement: HTMLElement, popup: ɵPopup, contextualView: ɵWorkbenchView | null): void {\n    const popupDestroyRef = popup.injector.get(DestroyRef);\n\n    // Close the popup on escape keystroke.\n    if (config.closeStrategy?.onEscape ?? true) {\n      fromEvent<KeyboardEvent>(popupElement, 'keydown')\n        .pipe(\n          subscribeIn(fn => this._zone.runOutsideAngular(fn)),\n          filter((event: KeyboardEvent) => event.key === 'Escape'),\n          observeIn(fn => this._zone.run(fn)),\n          takeUntilDestroyed(popupDestroyRef),\n        )\n        .subscribe(() => popup.close());\n    }\n\n    // Close the popup on focus loss.\n    if (config.closeStrategy?.onFocusLost ?? true) {\n      this._focusManager.monitor(popupElement, true)\n        .pipe(\n          filter((focusOrigin: FocusOrigin) => !focusOrigin),\n          takeUntilDestroyed(popupDestroyRef),\n        )\n        .subscribe(() => popup.close(popup.result));\n    }\n\n    // Close the popup when closing the view.\n    if (contextualView) {\n      effect(() => {\n        if (!this._viewRegistry.objects().some(view => view.id === contextualView.id)) {\n          untracked(() => popup.close());\n        }\n      }, {injector: popup.injector});\n    }\n  }\n\n  /**\n   * Hides the popup when its contextual view is detached, and displays it when it is reattached. Also restores the focus on re-activation.\n   * The contextual view is detached if not active, or located in the peripheral area and the main area is maximized.\n   */\n  private hidePopupOnViewDetach(overlayRef: OverlayRef, contextualView: ɵWorkbenchView, popup: ɵPopup): void {\n    overlayRef.overlayElement.classList.add('wb-view-context');\n\n    const popupDestroyRef = popup.injector.get(DestroyRef);\n    let activeElement: HTMLElement | undefined;\n\n    effect(() => {\n      const attached = contextualView.portal.attached();\n      untracked(() => {\n        if (attached) {\n          overlayRef.overlayElement.classList.add('wb-view-attached');\n          activeElement?.focus();\n        }\n        else {\n          overlayRef.overlayElement.classList.remove('wb-view-attached');\n        }\n      });\n    }, {injector: popup.injector});\n\n    // Track the focus in the popup to restore it when attaching the popup.\n    fromEvent(overlayRef.overlayElement, 'focusin')\n      .pipe(\n        subscribeIn(fn => this._zone.runOutsideAngular(fn)),\n        takeUntilDestroyed(popupDestroyRef),\n      )\n      .subscribe(() => {\n        activeElement = this._document.activeElement instanceof HTMLElement ? this._document.activeElement : undefined;\n      });\n  }\n\n  /**\n   * Creates a signal that tracks the position of the popup anchor.\n   */\n  private trackPopupOrigin(config: PopupConfig, contextualView: ɵWorkbenchView | null, injector: Injector): Signal<DOMRect | undefined> {\n    const partBounds = boundingClientRect(computed(() => contextualView?.part().partComponent()), {injector});\n    const viewBounds = boundingClientRect(computed(() => contextualView?.portal.componentRef.location.nativeElement as HTMLElement | undefined), {injector});\n\n    if (config.anchor instanceof Element || config.anchor instanceof ElementRef) {\n      const anchor = coerceElement(config.anchor) as HTMLElement;\n      const anchorBounds = boundingClientRect(anchor, {injector});\n      return computed(() => {\n        // Maintain position and size when detached to prevent flickering when attached again and to support for virtual scrolling in popup content.\n        if (contextualView && !contextualView.portal.attached()) {\n          return undefined;\n        }\n\n        // IMPORTANT: Track anchor and host bounds only if attached to prevent flickering.\n\n        // The `boundingClientRect` signal does not detect position changes when the element is scrolled out of view.\n        // Consequently, if the popup anchor is scrolled out of view and the view is enlarged, the popup may not align\n        // with the view boundaries. Therefore, we read the anchor's bounding box directly from the DOM.\n        anchorBounds();\n\n        return constrainClientRect(constrainClientRect(anchor.getBoundingClientRect(), viewBounds()), partBounds());\n      }, {equal: isEqualDomRect});\n    }\n    else {\n      const documentBounds = boundingClientRect(document.documentElement, {injector});\n      const anchorBounds = toSignal(Observables.coerce(config.anchor), {injector});\n      return computed(() => {\n        // Maintain position and size when detached to prevent flickering when attached again and to support for virtual scrolling in popup content.\n        if (contextualView && !contextualView.portal.attached()) {\n          return undefined;\n        }\n\n        // IMPORTANT: Track anchor and host bounds only if attached to prevent flickering.\n        if (!anchorBounds()) {\n          return undefined;\n        }\n\n        const {x, y} = mapToPageCoordinates(anchorBounds()!, viewBounds() ?? documentBounds());\n        const {width, height} = anchorBounds()!;\n        return constrainClientRect(constrainClientRect(new DOMRect(x, y, width, height), viewBounds()), partBounds());\n      }, {equal: isEqualDomRect});\n    }\n  }\n\n  /**\n   * Resolves the contextual view to which the popup is bound.\n   */\n  private resolveContextualView(config: PopupConfig): ɵWorkbenchView | null {\n    if (config.context?.viewId) {\n      return this._viewRegistry.get(config.context.viewId);\n    }\n    if (config.context?.viewId === undefined) { // `null` means to open the popup outside the contextual view\n      return this._view ?? null;\n    }\n    return null;\n  }\n}\n\n/**\n * Maps given view coordinates to absolute page coordinates.\n */\nfunction mapToPageCoordinates(origin: PopupOrigin, relativeTo: DOMRect): Point {\n  const xy = origin as Partial<Point>;\n  if (xy.x !== undefined && xy.y !== undefined) {\n    return {\n      x: relativeTo.x + xy.x,\n      y: relativeTo.y + xy.y,\n    };\n  }\n  const topLeft = origin as Partial<TopLeftPoint>;\n  if (topLeft.top !== undefined && topLeft.left !== undefined) {\n    return {\n      x: relativeTo.x + topLeft.left,\n      y: relativeTo.y + topLeft.top,\n    };\n  }\n  const topRight = origin as Partial<TopRightPoint>;\n  if (topRight.top !== undefined && topRight.right !== undefined) {\n    return {\n      x: relativeTo.x + (relativeTo.width - topRight.right),\n      y: relativeTo.y + topRight.top,\n    };\n  }\n  const bottomLeft = origin as Partial<BottomLeftPoint>;\n  if (bottomLeft.bottom !== undefined && bottomLeft.left !== undefined) {\n    return {\n      x: relativeTo.x + bottomLeft.left,\n      y: relativeTo.y + (relativeTo.height - bottomLeft.bottom),\n    };\n  }\n  const bottomRight = origin as Partial<BottomRightPoint>;\n  if (bottomRight.bottom !== undefined && bottomRight.right !== undefined) {\n    return {\n      x: relativeTo.x + (relativeTo.width - bottomRight.right),\n      y: relativeTo.y + (relativeTo.height - bottomRight.bottom),\n    };\n  }\n  throw Error('[PopupOriginError] Illegal popup origin; must be \"Point\", \"TopLeftPoint\", \"TopRightPoint\", \"BottomLeftPoint\" or \"BottomRightPoint\".');\n}\n\nfunction constrainClientRect(clientRect: DOMRect, constraints: DOMRect | undefined): DOMRect {\n  if (!constraints) {\n    return clientRect;\n  }\n  const top = clamp(clientRect.top, {min: constraints.top, max: constraints.bottom});\n  const right = clamp(clientRect.right, {min: constraints.left, max: constraints.right});\n  const bottom = clamp(clientRect.bottom, {min: constraints.top, max: constraints.bottom});\n  const left = clamp(clientRect.left, {min: constraints.left, max: constraints.right});\n  const width = right - left;\n  const height = bottom - top;\n  return new DOMRect(left, top, width, height);\n}\n\nfunction isEqualDomRect(a: DOMRect | undefined, b: DOMRect | undefined): boolean {\n  return a?.top === b?.top && a?.right === b?.right && a?.bottom === b?.bottom && a?.left === b?.left;\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 */\nimport {WorkbenchMessageBoxOptions} from './workbench-message-box.options';\nimport {ComponentType} from '@angular/cdk/portal';\nimport {Injectable} from '@angular/core';\nimport {ɵWorkbenchMessageBoxService} from './ɵworkbench-message-box.service';\nimport {Translatable} from '../text/workbench-text-provider.model';\n\n/**\n * Provides 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. The message can be plain text or a component, allowing for\n * structured content or input prompts.\n *\n * ## Modality\n * Displayed on top of other content, a message box blocks interaction with other parts of the application.\n *\n * A message box can be view-modal or application-modal. A view-modal message box blocks only a specific view,\n * allowing the user to interact with other views. An application-modal message box blocks the workbench,\n * or the browser's viewport if configured in {@link WorkbenchConfig.dialog.modalityScope}.\n *\n * ## Stacking\n * Multiple message boxes are stacked, and only the topmost message box in each modality stack can be interacted with.\n *\n * ## Styling\n * The following CSS variables can be set to customize the default look of a message box.\n *\n * - `--sci-workbench-messagebox-max-width`\n * - `--sci-workbench-messagebox-severity-indicator-size`\n * - `--sci-workbench-messagebox-padding`\n * - `--sci-workbench-messagebox-text-align`\n * - `--sci-workbench-messagebox-title-align`\n * - `--sci-workbench-messagebox-title-font-family`\n * - `--sci-workbench-messagebox-title-font-weight`\n * - `--sci-workbench-messagebox-title-font-size`\n */\n@Injectable({providedIn: 'root', useExisting: ɵWorkbenchMessageBoxService})\nexport abstract class WorkbenchMessageBoxService {\n\n  /**\n   * Displays the specified message in a message box.\n   *\n   * By default, the calling context determines the modality of the message box. If the message box is opened from a view, only this view is blocked.\n   * To open the message box with a different modality, specify the modality in {@link WorkbenchMessageBoxOptions.modality}.\n   *\n   * **Example:**\n   *\n   * ```ts\n   * const action = await inject(WorkbenchMessageBoxService).open('Do you want to save changes?', {\n   *   actions: {\n   *     yes: 'Yes',\n   *     no: 'No',\n   *     cancel: 'Cancel',\n   *   },\n   * });\n   * ```\n   *\n   * @param  message - Specifies the text to display.\n   * @param options - Controls the appearance and behavior of the message box.\n   * @return Promise that resolves to the key of the action button that the user clicked to close the message box.\n   */\n  public abstract open(message: Translatable, options?: WorkbenchMessageBoxOptions): Promise<string>;\n\n  /**\n   * Displays the specified component in a message box.\n   *\n   * By default, the calling context determines the modality of the message box. If the message box is opened from a view, only this view is blocked.\n   * To open the message box with a different modality, specify the modality in {@link WorkbenchMessageBoxOptions.modality}.\n   *\n   * Data can be passed to the component as inputs via {@link WorkbenchMessageBoxOptions.inputs} property or by providing a custom injector\n   * via {@link WorkbenchMessageBoxOptions.injector} property. Inputs are available as input properties in the component.\n   *\n   * **Example:**\n   *\n   * ```ts\n   * const action = await inject(WorkbenchMessageBoxService).open(SomeComponent, {\n   *   inputs: {\n   *     a: '...',\n   *     b: '...',\n   *   },\n   *   actions: {\n   *     yes: 'Yes',\n   *     no: 'No',\n   *     cancel: 'Cancel',\n   *   },\n   * });\n   * ```\n   *\n   * ```ts\n   * @Component({...})\n   * export class SomeComponent {\n   *\n   *   @Input({required: true})\n   *   public a!: string;\n   *\n   *   @Input()\n   *   public b?: string;\n   * }\n   * ```\n   *\n   * @param component - Specifies the component to render as the message.\n   * @param options - Controls the appearance and behavior of the message box.\n   * @return Promise that resolves to the key of the action button that the user clicked to close the message box.\n   */\n  public abstract open(component: ComponentType<unknown>, options?: WorkbenchMessageBoxOptions): Promise<string>;\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 {ɵWorkbenchDialogService} from '../dialog/ɵworkbench-dialog.service';\nimport {ɵWorkbenchMessageBoxService} from '../message-box/ɵworkbench-message-box.service';\nimport {ɵWorkbenchView} from './ɵworkbench-view.model';\nimport {Provider} from '@angular/core';\nimport {WorkbenchView} from './workbench-view.model';\nimport {PopupService} from '../popup/popup.service';\nimport {WorkbenchDialogService} from '../dialog/workbench-dialog.service';\nimport {WorkbenchMessageBoxService} from '../message-box/workbench-message-box.service';\n\n/**\n * Configures an injector with providers that are aware of the specified view.\n */\nexport function provideViewContext(view: ɵWorkbenchView | null | undefined): Provider {\n  return [\n    {provide: ɵWorkbenchView, useValue: view ?? null},\n    {provide: WorkbenchView, useExisting: ɵWorkbenchView},\n    PopupService,\n    ɵWorkbenchDialogService,\n    {provide: WorkbenchDialogService, useExisting: ɵWorkbenchDialogService},\n    ɵWorkbenchMessageBoxService,\n    {provide: WorkbenchMessageBoxService, useExisting: ɵWorkbenchMessageBoxService},\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 {firstValueFrom, Observable} from 'rxjs';\nimport {ActivatedRouteSnapshot, ChildrenOutletContexts} from '@angular/router';\nimport {ViewDragService, ViewMoveEventSource} from '../view-dnd/view-drag.service';\nimport {CanCloseFn, CanCloseRef, WorkbenchMenuItem, WorkbenchViewMenuItemFn} from '../workbench.model';\nimport {ViewId, WorkbenchView, WorkbenchViewNavigation} from './workbench-view.model';\nimport {WorkbenchPart} from '../part/workbench-part.model';\nimport {ɵWorkbenchService} from '../ɵworkbench.service';\nimport {ComponentType} from '@angular/cdk/portal';\nimport {WbComponentPortal} from '../portal/wb-component-portal';\nimport {AbstractType, assertNotInReactiveContext, computed, effect, EnvironmentInjector, inject, Injector, IterableDiffers, runInInjectionContext, Signal, signal, Type, untracked} from '@angular/core';\nimport {ɵWorkbenchPart} from '../part/ɵworkbench-part.model';\nimport {ActivationInstantProvider} from '../activation-instant.provider';\nimport {WORKBENCH_PART_REGISTRY} from '../part/workbench-part.registry';\nimport {WorkbenchLayoutService} from '../layout/workbench-layout.service';\nimport {WorkbenchDialogRegistry} from '../dialog/workbench-dialog.registry';\nimport {takeUntilDestroyed, toObservable, toSignal} from '@angular/core/rxjs-interop';\nimport {provideViewContext} from './view-context-provider';\nimport {ɵWorkbenchDialog} from '../dialog/ɵworkbench-dialog';\nimport {Blockable} from '../glass-pane/blockable';\nimport {WORKBENCH_ID} from '../workbench-id';\nimport {ClassList} from '../common/class-list';\nimport {Routing} from '../routing/routing.util';\nimport {WorkbenchRouteData} from '../routing/workbench-route-data';\nimport {ɵWorkbenchRouter} from '../routing/ɵworkbench-router.service';\nimport {ɵWorkbenchLayout} from '../layout/ɵworkbench-layout';\nimport {Arrays, Observables} from '@scion/toolkit/util';\nimport {Logger} from '../logging/logger';\nimport {WORKBENCH_VIEW_MENU_ITEM_REGISTRY} from './workbench-view-menu-item.registry';\nimport {Translatable} from '../text/workbench-text-provider.model';\n\nexport class ɵWorkbenchView implements WorkbenchView, Blockable {\n\n  private readonly _viewEnvironmentInjector = inject(EnvironmentInjector);\n  private readonly _workbenchId = inject(WORKBENCH_ID);\n  private readonly _workbenchService = inject(ɵWorkbenchService);\n  private readonly _layout = inject(WorkbenchLayoutService).layout;\n  private readonly _workbenchRouter = inject(ɵWorkbenchRouter);\n  private readonly _rootOutletContexts = inject(ChildrenOutletContexts);\n  private readonly _partRegistry = inject(WORKBENCH_PART_REGISTRY);\n  private readonly _viewDragService = inject(ViewDragService);\n  private readonly _activationInstantProvider = inject(ActivationInstantProvider);\n  private readonly _workbenchDialogRegistry = inject(WorkbenchDialogRegistry);\n  private readonly _logger = inject(Logger);\n\n  private readonly _adapters = new Map<Type<unknown> | AbstractType<unknown>, unknown>();\n\n  private readonly _title = signal<Translatable | null>(null);\n  private readonly _heading = signal<Translatable | null>(null);\n  private readonly _dirty = signal(false);\n  private readonly _closable = signal(true);\n  private readonly _blockedBy: Signal<ɵWorkbenchDialog | null>;\n  private readonly _scrolledIntoView = signal(true);\n\n  private _activationInstant: number | undefined;\n\n  public alternativeId: string | undefined;\n  public readonly navigation = signal<WorkbenchViewNavigation | undefined>(undefined);\n  public readonly navigationHint = computed(() => this.navigation()?.hint);\n  public readonly navigationData = computed(() => this.navigation()?.data ?? {});\n  public readonly navigationState = computed(() => this.navigation()?.state ?? {});\n  public readonly urlSegments = computed(() => this.navigation()?.path ?? []);\n  public readonly position = computed(() => this.part().viewIds().indexOf(this.id));\n  public readonly first = computed(() => this.position() === 0);\n  public readonly last = computed(() => this.position() === this.part().viewIds().length - 1);\n\n  public readonly part = signal<ɵWorkbenchPart>(null!);\n  public readonly active = signal<boolean>(false);\n  public readonly menuItems: Signal<WorkbenchMenuItem[]>;\n  public readonly blockedBy$: Observable<ɵWorkbenchDialog | null>;\n  public readonly portal: WbComponentPortal;\n  public readonly classList = new ClassList();\n  public readonly isClosable = computed(() => this._closable() && !this._blockedBy());\n\n  /**\n   * Guard to confirm closing the view, if any.\n   *\n   * @see canClose\n   */\n  public canCloseGuard: (() => Promise<boolean>) | undefined;\n\n  constructor(public readonly id: ViewId, layout: ɵWorkbenchLayout, options: {component: ComponentType<ViewComponent>}) {\n    this.alternativeId = layout.view({viewId: this.id}).alternativeId;\n    this.portal = this.createPortal(options.component);\n    this.menuItems = this.computeMenuItems();\n    this._blockedBy = toSignal(inject(WorkbenchDialogRegistry).top$({viewId: this.id}), {requireSync: true});\n    this.blockedBy$ = toObservable<ɵWorkbenchDialog | null>(this._blockedBy);\n    this.touchOnActivate();\n    this.installModelUpdater();\n    this.onLayoutChange({layout});\n  }\n\n  private createPortal(viewComponent: ComponentType<ViewComponent>): WbComponentPortal {\n    return new WbComponentPortal(viewComponent, {\n      providers: [\n        provideViewContext(this),\n        // Prevent injecting this part into the view because the view may be dragged to a different part.\n        {provide: WorkbenchPart, useFactory: () => undefined},\n        {provide: ɵWorkbenchPart, useFactory: () => undefined},\n      ],\n    });\n  }\n\n  /**\n   * Method invoked when the workbench layout has changed.\n   *\n   * This method:\n   * - is called on every layout change, enabling the update of view properties defined in the layout (navigation hint, navigation data, part, ...).\n   * - is called on route activation (after destroyed the previous component (if any), but before constructing the new component).\n   */\n  private onLayoutChange(change: {layout: ɵWorkbenchLayout; route?: ActivatedRouteSnapshot; previousRoute?: ActivatedRouteSnapshot | null}): void {\n    const {layout, route, previousRoute} = change;\n\n    const mPart = layout.part({viewId: this.id});\n    const mView = layout.view({viewId: this.id});\n\n    this.part.set(this._partRegistry.get(mPart.id));\n    this.active.set(mPart.activeViewId === this.id);\n\n    // TODO [#626]: Remove assignment and change `alternativeId` to read only when resolved the issue #626\n    this.alternativeId = mView.alternativeId;\n    this.classList.layout = mView.cssClass;\n\n    // Test if a new route has been activated for this view.\n    const routeChanged = route && route.routeConfig !== previousRoute?.routeConfig;\n    if (routeChanged) {\n      this.title = Routing.lookupRouteData(route, WorkbenchRouteData.title) ?? null;\n      this.heading = Routing.lookupRouteData(route, WorkbenchRouteData.heading) ?? null;\n      this.dirty = false;\n      this.classList.route = Routing.lookupRouteData(route, WorkbenchRouteData.cssClass);\n      this.classList.application = [];\n      this.canCloseGuard = undefined;\n    }\n\n    // Test if this view was navigated. Navigation does not necessarily cause the route to change.\n    const navigationChanged = mView.navigation?.id !== this.navigation()?.id;\n    if (navigationChanged) {\n      this.navigation.set(mView.navigation && {\n        id: mView.navigation.id,\n        hint: mView.navigation.hint,\n        data: mView.navigation.data,\n        state: layout.navigationState({outlet: this.id}),\n        path: layout.urlSegments({outlet: this.id}),\n      });\n      this.classList.navigation = mView.navigation?.cssClass;\n    }\n\n    // If this view is inactive, Angular does not check it for changes as it is detached from the Angular component tree.\n    // To complete the initialization of the routed component (to ensure that `ngOnInit` is called), we manually trigger change\n    // detection. We cannot perform change detection right now because the routed component has not been activated/constructed yet.\n    // Use case: Navigating an (existing) inactive view to another route.\n    if (!this.active() && this.portal.isConstructed && routeChanged) {\n      this._workbenchRouter.getCurrentNavigationContext().registerPostNavigationAction(() => this.portal.componentRef.changeDetectorRef.detectChanges());\n    }\n  }\n\n  /**\n   * Returns the component of this view. Returns `null` if not navigated the view, or before it was activated for the first time.\n   */\n  public getComponent<T = unknown>(): T | null {\n    const outlet = Routing.resolveEffectiveOutletContext(this._rootOutletContexts.getContext(this.id))?.outlet;\n    return outlet?.isActivated ? outlet.component as T : null;\n  }\n\n  /** @inheritDoc */\n  public get title(): Signal<Translatable | null> {\n    return this._title;\n  }\n\n  /** @inheritDoc */\n  public set title(title: Translatable | null) {\n    untracked(() => this._title.set(title));\n  }\n\n  /** @inheritDoc */\n  public get heading(): Signal<Translatable | null> {\n    return this._heading;\n  }\n\n  /** @inheritDoc */\n  public set heading(heading: Translatable | null) {\n    untracked(() => this._heading.set(heading));\n  }\n\n  /** @inheritDoc */\n  public get dirty(): Signal<boolean> {\n    return this._dirty;\n  }\n\n  /** @inheritDoc */\n  public set dirty(dirty: boolean) {\n    untracked(() => this._dirty.set(dirty));\n  }\n\n  /** @inheritDoc */\n  public get scrolledIntoView(): Signal<boolean> {\n    return this._scrolledIntoView;\n  }\n\n  public set scrolledIntoView(scrolledIntoView: boolean) {\n    this._scrolledIntoView.set(scrolledIntoView);\n  }\n\n  /** @inheritDoc */\n  public set cssClass(cssClass: string | string[]) {\n    untracked(() => this.classList.application = cssClass);\n  }\n\n  /** @inheritDoc */\n  public get cssClass(): Signal<string[]> {\n    return this.classList.application;\n  }\n\n  /** @inheritDoc */\n  public set closable(closable: boolean) {\n    untracked(() => this._closable.set(closable));\n  }\n\n  /** @inheritDoc */\n  public get closable(): Signal<boolean> {\n    return this._closable;\n  }\n\n  /** @inheritDoc */\n  public async activate(options?: {skipLocationChange?: boolean}): Promise<boolean> {\n    assertNotInReactiveContext(this.activate, 'Call WorkbenchView.activate() in a non-reactive (non-tracking) context, such as within the untracked() function.');\n    if (this.active() && this.part().active()) {\n      return true;\n    }\n\n    const currentLayout = this._layout();\n    return this._workbenchRouter.navigate(\n      layout => currentLayout === layout ? layout.activateView(this.id, {activatePart: true}) : null, // cancel navigation if the layout has become stale\n      {skipLocationChange: options?.skipLocationChange},\n    );\n  }\n\n  public get activationInstant(): number | undefined {\n    return this._activationInstant;\n  }\n\n  /** @inheritDoc */\n  public close(target?: 'self' | 'all-views' | 'other-views' | 'views-to-the-right' | 'views-to-the-left'): Promise<boolean> {\n    assertNotInReactiveContext(this.close, 'Call WorkbenchView.close() in a non-reactive (non-tracking) context, such as within the untracked() function.');\n    switch (target ?? 'self') {\n      case 'self': {\n        return this._workbenchService.closeViews(this.id);\n      }\n      case 'all-views': {\n        return this._workbenchService.closeViews(...this.part().viewIds());\n      }\n      case 'other-views': {\n        return this._workbenchService.closeViews(...this.part().viewIds().filter(viewId => viewId !== this.id));\n      }\n      case 'views-to-the-right': {\n        const viewIds = this.part().viewIds();\n        return this._workbenchService.closeViews(...viewIds.slice(viewIds.indexOf(this.id) + 1));\n      }\n      case 'views-to-the-left': {\n        const viewIds = this.part().viewIds();\n        return this._workbenchService.closeViews(...viewIds.slice(0, viewIds.indexOf(this.id)));\n      }\n      default: {\n        return Promise.resolve(false);\n      }\n    }\n  }\n\n  /** @inheritDoc */\n  public move(target: 'new-window'): void;\n  public move(partId: string, options?: {region?: 'north' | 'south' | 'west' | 'east'; workbenchId?: string}): void;\n  public move(target: 'new-window' | string, options?: {region?: 'north' | 'south' | 'west' | 'east'; workbenchId?: string}): void {\n    assertNotInReactiveContext(this.move, 'Call WorkbenchView.move() in a non-reactive (non-tracking) context, such as within the untracked() function.');\n    const source: ViewMoveEventSource = {\n      workbenchId: this._workbenchId,\n      partId: this.part().id,\n      viewId: this.id,\n      alternativeViewId: this.alternativeId,\n      navigation: this.navigation() && {\n        path: this.navigation()!.path,\n        hint: this.navigation()!.hint,\n        data: this.navigation()!.data,\n      },\n      classList: this.classList.asMap(),\n    };\n\n    if (target === 'new-window') {\n      this._viewDragService.dispatchViewMoveEvent({source, target: {workbenchId: 'new-window'}});\n    }\n    else {\n      this._viewDragService.dispatchViewMoveEvent({\n        source,\n        target: {\n          elementId: target,\n          region: options?.region,\n          workbenchId: options?.workbenchId ?? this._workbenchId,\n        },\n      });\n    }\n  }\n\n  /** @inheritDoc */\n  public canClose(canClose: CanCloseFn): CanCloseRef {\n    const canCloseGuard = this.canCloseGuard = async (): Promise<boolean> => {\n      try {\n        const close = runInInjectionContext(this.portal.componentRef.injector, canClose);\n        return await firstValueFrom(Observables.coerce(close), {defaultValue: true});\n      }\n      catch (error) {\n        this._logger.error(`Unhandled error while invoking 'CanClose' function of view '${this.id}'.`, error);\n        return true;\n      }\n    };\n\n    return {\n      dispose: () => {\n        if (canCloseGuard === this.canCloseGuard) {\n          this.canCloseGuard = undefined;\n        }\n      },\n    };\n  }\n\n  /**\n   * Reference to the handle's injector. The injector will be destroyed when closing the view.\n   */\n  public get injector(): Injector {\n    return this._viewEnvironmentInjector;\n  }\n\n  /**\n   * Registers an adapter for this view, replacing any previously registered adapter of the same type.\n   *\n   * Adapters enable loosely coupled extension of an object, allowing one object to be adapted to another.\n   */\n  public registerAdapter<T>(adapterType: AbstractType<T> | Type<T>, object: T): void {\n    this._adapters.set(adapterType, object);\n  }\n\n  /**\n   * Unregisters the given adapter. Has no effect if not registered.\n   */\n  public unregisterAdapter(adapterType: AbstractType<unknown> | Type<unknown>): void {\n    this._adapters.delete(adapterType);\n  }\n\n  /**\n   * Adapts this object to the specified type. Returns `null` if no such object can be found.\n   */\n  public adapt<T>(adapterType: AbstractType<T> | Type<T>): T | null {\n    const adapter = this._adapters.get(adapterType);\n    return adapter ? adapter as T : null;\n  }\n\n  /** @inheritDoc */\n  public get destroyed(): boolean {\n    return this.portal.isDestroyed;\n  }\n\n  /**\n   * Updates the activation instant when this view is activated.\n   */\n  private touchOnActivate(): void {\n    effect(() => {\n      if (this.active()) {\n        this._activationInstant = this._activationInstantProvider.now();\n      }\n    });\n  }\n\n  /**\n   * Computes menu items matching this view.\n   */\n  private computeMenuItems(): Signal<WorkbenchMenuItem[]> {\n    const injector = inject(Injector);\n\n    // Use a differ to avoid re-creating every menu item on registration or change.\n    const differ = inject(IterableDiffers).find([]).create<WorkbenchViewMenuItemFn>();\n    const menuItemRegistry = inject(WORKBENCH_VIEW_MENU_ITEM_REGISTRY);\n    const menuItems = new Map<WorkbenchViewMenuItemFn, Signal<WorkbenchMenuItem | null>>();\n\n    return computed(() => {\n      const changes = differ.diff(menuItemRegistry.objects());\n      changes?.forEachAddedItem(({item: fn}) => menuItems.set(fn, computed(() => runInInjectionContext(constructInjector(this, this.part()), () => fn(this)))));\n      changes?.forEachRemovedItem(({item: fn}) => menuItems.delete(fn));\n      return Array.from(menuItems.values()).map(menuItem => menuItem()).filter(menuItem => !!menuItem);\n    }, {equal: (a, b) => Arrays.isEqual(a, b)});\n\n    function constructInjector(view: ɵWorkbenchView, part: ɵWorkbenchPart): Injector {\n      return Injector.create({\n        parent: injector,\n        providers: [\n          provideViewContext(view),\n          {provide: ɵWorkbenchPart, useValue: part},\n          {provide: WorkbenchPart, useExisting: ɵWorkbenchPart},\n        ],\n      });\n    }\n  }\n\n  /**\n   * Sets up automatic synchronization of {@link WorkbenchView} on every layout change.\n   *\n   * If the operation is cancelled (e.g., due to a navigation failure), it reverts the changes.\n   */\n  private installModelUpdater(): void {\n    Routing.activatedRoute$(this.id, {emitOn: 'always'})\n      .pipe(takeUntilDestroyed())\n      .subscribe(([previousRoute, route]: [ActivatedRouteSnapshot | null, ActivatedRouteSnapshot]) => {\n        const navigationContext = this._workbenchRouter.getCurrentNavigationContext();\n        const {layout, previousLayout, layoutDiff} = navigationContext;\n\n        if (layoutDiff.removedViews.includes(this.id)) {\n          return;\n        }\n\n        this.onLayoutChange({layout, route, previousRoute});\n\n        // Revert change in case the navigation fails.\n        if (previousLayout?.hasView(this.id)) {\n          navigationContext.registerUndoAction(() => this.onLayoutChange({layout: previousLayout, route: previousRoute!, previousRoute: route}));\n        }\n      });\n  }\n\n  public destroy(): void {\n    this._viewEnvironmentInjector.destroy();\n    this._workbenchDialogRegistry.dialogs({viewId: this.id}).forEach(dialog => dialog.destroy());\n    this.portal.destroy();\n  }\n}\n\n/**\n * Represents a pseudo-type for the actual {@link ViewComponent} which must not be referenced in order to avoid import cycles.\n */\ntype ViewComponent = any;\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 {assertNotInReactiveContext, ElementRef, EnvironmentInjector, inject, Injector, StaticProvider, Type, ViewContainerRef} from '@angular/core';\nimport {BehaviorSubject, Observable} from 'rxjs';\nimport {PopupOrigin} from './popup.origin';\nimport {Arrays} from '@scion/toolkit/util';\nimport {WorkbenchDialogRegistry} from '../dialog/workbench-dialog.registry';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {map} from 'rxjs/operators';\nimport {ɵWorkbenchDialog} from '../dialog/ɵworkbench-dialog';\nimport {Blockable} from '../glass-pane/blockable';\nimport {ViewId} from '../view/workbench-view.model';\nimport {ɵWorkbenchView} from '../view/ɵworkbench-view.model';\n\n/**\n * Configures the content to be displayed in a popup.\n *\n * A popup is a visual workbench component for displaying content above other content. It is positioned relative to an anchor,\n * which can be either a page coordinate (x/y) or an HTML element. When using an element as the popup anchor, the popup also\n * moves when the anchor element moves.\n */\nexport abstract class PopupConfig {\n  /**\n   * Specifies the unique identity of the popup. If not specified, assigns the popup a UUID.\n   *\n   * @internal\n   */\n  public abstract readonly id?: string;\n  /**\n   * Controls where to open the popup.\n   *\n   * Can be an HTML element or coordinates:\n   * - Using an element: The popup opens and sticks to the element.\n   * - Using coordinates: The popup opens and sticks relative to the view or page bounds.\n   *\n   * Supported coordinate pairs:\n   * - x/y: Relative to the top/left corner of the view or page.\n   * - top/left: Same as x/y.\n   * - top/right: Relative to the top/right corner.\n   * - bottom/left: Relative to the bottom/left corner.\n   * - bottom/right: Relative to the bottom/right corner.\n   *\n   * Coordinates can be updated using an Observable. The popup displays when the Observable emits the first coordinate.\n   */\n  public abstract readonly anchor: ElementRef<Element> | Element | PopupOrigin | Observable<PopupOrigin>;\n  /**\n   * Specifies the component to display in the popup.\n   *\n   * In the component, you can inject the popup handle {@link Popup} to interact with the popup, such as to close it\n   * or obtain its input data.\n   */\n  public abstract readonly component: Type<any>;\n  /**\n   * Instructs Angular how to construct the component. In most cases, construct options need not to be set.\n   */\n  public readonly componentConstructOptions?: {\n    /**\n     * Sets the injector for the instantiation of the popup component, giving you control over the objects available\n     * for injection into the popup component. If not specified, uses the application's root injector, or the view's\n     * injector if opened in the context of a view.\n     *\n     * ```ts\n     * Injector.create({\n     *   parent: ...,\n     *   providers: [\n     *    {provide: <DiToken>, useValue: <value>}\n     *   ],\n     * })\n     * ```\n     */\n    injector?: Injector;\n    /**\n     * Specifies providers to be registered with the popup injector. Unlike providers that are registered via a separate {@link injector},\n     * passed providers are registered in the same injector as the popup handle itself, allowing for dependency injection of the popup handle.\n     */\n    providers?: StaticProvider[];\n    /**\n     * Sets the component's attachment point in Angular's logical component tree (not the DOM tree used for rendering), effecting when\n     * Angular checks the component for changes during a change detection cycle. If not set, inserts the component at the top level\n     * in the component tree.\n     */\n    viewContainerRef?: ViewContainerRef;\n  };\n  /**\n   * Hint where to align the popup relative to the popup anchor, unless there is not enough space available in that area. By default,\n   * if not specified, the popup opens north of the anchor.\n   */\n  public readonly align?: 'east' | 'west' | 'north' | 'south';\n  /**\n   * Optional data to pass to the popup component. In the component, you can inject the popup handle {@link Popup} to read input data.\n   */\n  public readonly input?: any;\n  /**\n   * Controls when to close the popup.\n   */\n  public readonly closeStrategy?: CloseStrategy;\n  /**\n   * Specifies the preferred popup size. If not specified, the popup adjusts its size to the content size.\n   */\n  public readonly size?: PopupSize;\n  /**\n   * Specifies CSS class(es) to add to the popup, e.g., to locate the popup in tests.\n   */\n  public readonly cssClass?: string | string[];\n  /**\n   * Specifies the context in which to open the popup.\n   */\n  public readonly context?: {\n    /**\n     * Specifies the view the popup belongs to.\n     *\n     * Binds the popup to the lifecycle of a view so that it displays only if the view is active and closes when the view is closed.\n     *\n     * By default, if opening the popup in the context of a view, that view is used as the popup's contextual view.\n     * If you set the view id to `null`, the popup will open without referring to the contextual view.\n     */\n    viewId?: ViewId | null;\n  };\n}\n\n/**\n * Specifies when to close the popup.\n */\nexport interface CloseStrategy {\n  /**\n   * Controls if to close the popup on focus loss, returning the result set via {@link Popup#setResult} to the popup opener.\n   * Defaults to `true`.\n   */\n  onFocusLost?: boolean;\n  /**\n   * Controls if to close the popup when pressing escape. Defaults to `true`.\n   * No return value will be passed to the popup opener.\n   */\n  onEscape?: boolean;\n}\n\n/**\n * Represents the preferred popup size as specified by the popup opener.\n */\nexport interface PopupSize {\n  /**\n   * Specifies the min-height of the popup.\n   */\n  minHeight?: string;\n  /**\n   * Specifies the height of the popup.\n   */\n  height?: string;\n  /**\n   * Specifies the max-height of the popup.\n   */\n  maxHeight?: string;\n  /**\n   * Specifies the min-width of the popup.\n   */\n  minWidth?: string;\n  /**\n   * Specifies the width of the popup.\n   */\n  width?: string;\n  /**\n   * Specifies the max-width of the popup.\n   */\n  maxWidth?: string;\n}\n\n/**\n * Represents a handle that a popup component can inject to interact with the popup, for example,\n * to read input data or the configured size, or to close the popup.\n */\nexport abstract class Popup<T = unknown, R = unknown> {\n\n  /**\n   * Input data as passed by the popup opener when opened the popup, or `undefined` if not passed.\n   */\n  public abstract readonly input: T | undefined;\n\n  /**\n   * Preferred popup size as specified by the popup opener, or `undefined` if not set.\n   */\n  public abstract readonly size: PopupSize | undefined;\n\n  /**\n   * CSS classes associated with the popup.\n   */\n  public abstract readonly cssClasses: string[];\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(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(result?: R | Error): void;\n}\n\n/**\n * @internal\n */\nexport class ɵPopup<T = unknown, R = unknown> implements Popup<T, R>, Blockable {\n\n  private readonly _popupEnvironmentInjector = inject(EnvironmentInjector);\n  private readonly _context = {\n    view: inject(ɵWorkbenchView, {optional: true}),\n  };\n\n  public readonly cssClasses: string[];\n\n  /**\n   * Indicates whether this popup is blocked by dialog(s) that overlay it.\n   */\n  public readonly blockedBy$ = new BehaviorSubject<ɵWorkbenchDialog | null>(null);\n  public result: R | Error | undefined;\n\n  constructor(public id: string, private _config: PopupConfig) {\n    this.cssClasses = Arrays.coerce(this._config.cssClass);\n    this.blockWhenDialogOpened();\n  }\n\n  /**\n   * Blocks this popup when a dialog overlays it.\n   */\n  private blockWhenDialogOpened(): void {\n    const workbenchDialogRegistry = inject(WorkbenchDialogRegistry);\n    const initialTop = workbenchDialogRegistry.top({viewId: this._context.view?.id});\n\n    workbenchDialogRegistry.top$({viewId: this._context.view?.id})\n      .pipe(\n        map(top => top === initialTop ? null : top),\n        takeUntilDestroyed(),\n      )\n      .subscribe(this.blockedBy$);\n  }\n\n  /** @inheritDoc */\n  public setResult(result?: R): void {\n    this.result = result;\n  }\n\n  /** @inheritDoc */\n  public close(result?: R | Error): void {\n    assertNotInReactiveContext(this.close, 'Call WorkbenchPopup.close() in a non-reactive (non-tracking) context, such as within the untracked() function.');\n    this.result = result;\n    this.destroy();\n  }\n\n  /** @inheritDoc */\n  public get input(): T | undefined {\n    return this._config.input as T | undefined;\n  }\n\n  /** @inheritDoc */\n  public get size(): PopupSize | undefined {\n    return this._config.size;\n  }\n\n  public get component(): Type<any> {\n    return this._config.component;\n  }\n\n  public get viewContainerRef(): ViewContainerRef | undefined {\n    return this._config.componentConstructOptions?.viewContainerRef;\n  }\n\n  /**\n   * Reference to the handle's injector. The injector will be destroyed when closing the popup.\n   */\n  public get injector(): Injector {\n    return this._popupEnvironmentInjector;\n  }\n\n  /**\n   * Destroys this dialog and associated resources.\n   */\n  public destroy(): void {\n    this._popupEnvironmentInjector.destroy();\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 {ChangeDetectionStrategy, Component, computed, inject, isDevMode} from '@angular/core';\nimport {TextPipe} from '../text/text.pipe';\nimport {WorkbenchService} from '../workbench.service';\nimport {WORKBENCH_OUTLET} from '../routing/workbench-auxiliary-route-installer.service';\nimport {Routing} from '../routing/routing.util';\nimport {Router} from '@angular/router';\nimport {WorkbenchView} from '../view/workbench-view.model';\nimport {WorkbenchPart} from '../part/workbench-part.model';\nimport {WorkbenchDialog} from '../dialog/workbench-dialog';\nimport {Popup} from '../popup/popup.config';\n\n@Component({\n  selector: 'wb-page-not-found',\n  templateUrl: './page-not-found.component.html',\n  styleUrls: ['./page-not-found.component.scss'],\n  imports: [\n    TextPipe,\n  ],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport default class PageNotFoundComponent {\n\n  private readonly _router = inject(Router);\n\n  protected readonly isDevMode = isDevMode();\n  protected readonly Routing = Routing;\n  protected readonly workbenchService = inject(WorkbenchService);\n\n  protected readonly outlet = inject(WORKBENCH_OUTLET);\n  protected readonly view = inject(WorkbenchView, {optional: true});\n  protected readonly part = inject(WorkbenchPart, {optional: true});\n  protected readonly dialog = inject(WorkbenchDialog, {optional: true});\n  protected readonly popup = inject(Popup, {optional: true});\n\n  protected readonly path = computed(() => {\n    // Track the URL.\n    this.workbenchService.layout();\n\n    const urlTree = this._router.parseUrl(this._router.url);\n    const outlets = Routing.parseOutlets(urlTree, {\n      view: Routing.isViewOutlet(this.outlet) || undefined,\n      part: Routing.isPartOutlet(this.outlet) || undefined,\n      dialog: Routing.isDialogOutlet(this.outlet) || undefined,\n      messagebox: Routing.isMessageBoxOutlet(this.outlet) || undefined,\n      popup: Routing.isPopupOutlet(this.outlet) || undefined,\n    });\n    return outlets.get(this.outlet)?.map(segment => `${segment}`).join('/') ?? '';\n  });\n}\n","<header>{{('%workbench.page_not_found.title' | wbText)()}}</header>\n\n@if (Routing.isViewOutlet(outlet)) {\n  @let message = '%workbench.page_not_found_view.message;path=' + path() | wbText;\n  <section class=\"message\" [innerHTML]=\"message()\"></section>\n} @else if (Routing.isPartOutlet(outlet)) {\n  @let message = '%workbench.page_not_found_part.message;path=' + path() | wbText;\n  <section class=\"message\" [innerHTML]=\"message()\"></section>\n} @else {\n  @let message = '%workbench.page_not_found.message;path=' + path() | wbText;\n  <section class=\"message\" [innerHTML]=\"message()\"></section>\n}\n\n<section class=\"actions\">\n  @if (Routing.isViewOutlet(outlet)) {\n    <button (click)=\"workbenchService.resetPerspective()\">{{('%workbench.reset_perspective.action' | wbText)()}}</button>\n    <button (click)=\"view!.close()\">{{('%workbench.close.action' | wbText)()}}</button>\n  } @else if (Routing.isPartOutlet(outlet)) {\n    <button (click)=\"workbenchService.resetPerspective()\">{{('%workbench.reset_perspective.action' | wbText)()}}</button>\n  } @else if (Routing.isDialogOutlet(outlet)) {\n    <button (click)=\"dialog!.close()\">{{('%workbench.close.action' | wbText)()}}</button>\n  } @else if (Routing.isMessageBoxOutlet(outlet)) {\n    <button (click)=\"dialog!.close()\">{{('%workbench.close.action' | wbText)()}}</button>\n  } @else if (Routing.isPopupOutlet(outlet)) {\n    <button (click)=\"popup!.close()\">{{('%workbench.close.action' | wbText)()}}</button>\n  }\n</section>\n\n@if (isDevMode) {\n  @let hint = '%workbench.page_not_found_developer_hint.message' | wbText;\n  @let tooltip = '%workbench.dev_mode_only_hint.tooltip' | wbText;\n  <section class=\"developer-hint\" [title]=\"tooltip()\">{{hint()}}</section>\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 {Component} from '@angular/core';\nimport {RouterOutlet} from '@angular/router';\n\n/**\n * Angular standardizes component-less auxiliary routes by adding the `ɵEmptyOutletComponent` component,\n * but only for routes registered via {@link ROUTES} DI token or passed to {@link Router#resetConfig}.\n *\n * Consequently, auxiliary routes that the workbench dynamically registers based on the current workbench\n * state must also be standardized. However, we do not use Angular's {@link ɵEmptyOutletComponent} component\n * as it does not fill the content to the available space, required for view content.\n *\n * For more information, see the `standardizeConfig` function in Angular.\n */\n@Component({\n  templateUrl: './empty-outlet.component.html',\n  styleUrls: ['./empty-outlet.component.scss'],\n  imports: [RouterOutlet],\n})\nexport class ɵEmptyOutletComponent {\n}\n","<router-outlet/>\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 {Component, inject, isDevMode} from '@angular/core';\nimport {TextPipe} from '../text/text.pipe';\nimport {WorkbenchView} from '../view/workbench-view.model';\n\n/**\n * Indicates that there is no content to display.\n */\n@Component({\n  selector: 'wb-null-content',\n  templateUrl: './null-content.component.html',\n  styleUrls: ['./null-content.component.scss'],\n  imports: [\n    TextPipe,\n  ],\n})\nexport class NullContentComponent {\n\n  protected readonly isDevMode = isDevMode();\n  protected readonly view = inject(WorkbenchView, {optional: true});\n}\n","@if (isDevMode && view) {\n  @let hint = '%workbench.null_view_developer_hint.message;view=' + (view.alternativeId ?? view.id) | wbText;\n  @let tooltip = '%workbench.dev_mode_only_hint.tooltip' | wbText;\n  <section class=\"developer-hint\" [title]=\"tooltip()\" [innerHTML]=\"hint()\"></section>\n} @else {\n  {{('%workbench.null_content.message' | wbText)()}}\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 {CanMatchFn, Route, UrlSegment} from '@angular/router';\nimport {inject} from '@angular/core';\nimport {ɵWorkbenchRouter} from './ɵworkbench-router.service';\nimport {Routing} from './routing.util';\nimport {WORKBENCH_OUTLET} from './workbench-auxiliary-route-installer.service';\n\n/**\n * Configures a route to only match workbench views navigated with a specific hint.\n *\n * Use as a `canMatch` guard in {@link Route} config to differentiate between routes with identical paths.\n * For example, multiple views can navigate to the same path while resolving to different routes, such as the empty-path route to maintain a clean URL.\n *\n * Example for navigating a view to the 'SearchComponent':\n * ```ts\n * // Navigation\n * inject(WorkbenchRouter).navigate([], {hint: 'search'});\n * ```\n *\n * // Routes\n * ```ts\n * const routes: Routes = [\n *   {path: '', canMatch: [canMatchWorkbenchView('search')], component: SearchComponent},\n *   {path: '', canMatch: [canMatchWorkbenchView('outline')], component: OutlineComponent},\n * ];\n * ```\n */\nexport function canMatchWorkbenchView(navigationHint: string): CanMatchFn;\n/**\n * Configures a route to only or never match workbench views.\n *\n * @see canMatchWorkbenchOutlet\n */\nexport function canMatchWorkbenchView(canMatch: boolean): CanMatchFn;\nexport function canMatchWorkbenchView(condition: string | boolean): CanMatchFn {\n  return (): boolean => {\n    const outlet = inject(WORKBENCH_OUTLET, {optional: true});\n\n    switch (condition) {\n      case true:\n        return Routing.isViewOutlet(outlet);\n      case false:\n        return !Routing.isViewOutlet(outlet);\n      default: { // hint\n        if (!Routing.isViewOutlet(outlet)) {\n          return false;\n        }\n\n        const layout = inject(ɵWorkbenchRouter).getCurrentNavigationContext().layout;\n        const view = layout.view({viewId: outlet}, {orElse: null});\n        return view?.navigation?.hint === condition;\n      }\n    }\n  };\n}\n\n/**\n * Configures a route to only match workbench parts navigated with a specific hint.\n *\n * Use as a `canMatch` guard in {@link Route} config to differentiate between routes with identical paths.\n * For example, multiple parts can navigate to the same path while resolving to different routes, such as the empty-path route to maintain a clean URL.\n *\n * Example for navigating a part to the 'SearchComponent':\n * ```ts\n * inject(WorkbenchRouter).navigate(layout => {\n *   return layout.navigatePart('search', [], {hint: 'search'});\n * });\n * ```\n *\n * // Routes\n * ```ts\n * const routes: Routes = [\n *   {path: '', canMatch: [canMatchWorkbenchPart('search')], component: SearchComponent},\n *   {path: '', canMatch: [canMatchWorkbenchPart('outline')], component: OutlineComponent},\n * ];\n * ```\n */\nexport function canMatchWorkbenchPart(navigationHint: string): CanMatchFn;\n/**\n * Configures a route to only or never match workbench parts.\n *\n * @see canMatchWorkbenchOutlet\n */\nexport function canMatchWorkbenchPart(canMatch: boolean): CanMatchFn;\nexport function canMatchWorkbenchPart(condition: string | boolean): CanMatchFn {\n  return (): boolean => {\n    const outlet = inject(WORKBENCH_OUTLET, {optional: true});\n\n    switch (condition) {\n      case true:\n        return Routing.isPartOutlet(outlet);\n      case false:\n        return !Routing.isPartOutlet(outlet);\n      default: { // hint\n        if (!Routing.isPartOutlet(outlet)) {\n          return false;\n        }\n\n        const layout = inject(ɵWorkbenchRouter).getCurrentNavigationContext().layout;\n        const part = layout.part({partId: outlet}, {orElse: null});\n        return part?.navigation?.hint === condition;\n      }\n    }\n  };\n}\n\n/**\n * Configures a route to only or never match workbench outlets.\n *\n * A workbench outlet can be a part, view, dialog, popup, or messagebox.\n *\n * Usage:\n * - Use `canMatchWorkbenchOutlet(false)` guard on the application's default route (`\"\"`) to prevent matching workbench outlets, such as parts and views, avoiding infinite loops.\n * - Use `canMatchWorkbenchOutlet(true)` guard on view and part routes to prevent matching the primary router outlet.\n *\n * Example:\n *\n * ```ts\n * import {Routes} from '@angular/router';\n * import {canMatchWorkbenchOutlet, canMatchWorkbenchPart, canMatchWorkbenchView, WorkbenchComponent} from '@scion/workbench';\n *\n * const routes: Routes = [\n *   {\n *     path: '',\n *     canActivate: [authorizedGuard()],\n *     children: [\n *       // Default route\n *       {\n *         path: '',\n *         canMatch: [canMatchWorkbenchOutlet(false)],\n *         component: WorkbenchComponent,\n *       },\n *       // Workbench view and part routes\n *       {\n *         path: '',\n *         canMatch: [canMatchWorkbenchOutlet(true)],\n *         children: [\n *           {path: 'path/to/page1', component: ...},\n *           {path: 'path/to/page2', component: ...},\n *           {path: '', canMatch: [canMatchWorkbenchPart('hint-1')], component: ...},\n *           {path: '', canMatch: [canMatchWorkbenchView('hint-2')], component: ...},\n *           ...\n *         ],\n *       },\n *     ],\n *   },\n * ];\n * ```\n *\n * @see canMatchWorkbenchPart\n * @see canMatchWorkbenchView\n */\nexport function canMatchWorkbenchOutlet(matchWorkbenchOutlet: boolean): CanMatchFn {\n  return (): boolean => {\n    const outlet = inject(WORKBENCH_OUTLET, {optional: true});\n    return matchWorkbenchOutlet ? Routing.isWorkbenchOutlet(outlet) : !Routing.isWorkbenchOutlet(outlet);\n  };\n}\n\n/**\n * Matches the route based on the active perspective.\n *\n * Can be used to activate a different route based on the active perspective.\n */\nexport function canMatchWorkbenchPerspective(id: string): CanMatchFn {\n  return (): boolean => {\n    return inject(ɵWorkbenchRouter).getCurrentNavigationContext().layout.perspectiveId === id;\n  };\n}\n\n/**\n * Matches the route only if it has been navigated.\n *\n * @internal\n */\nexport const matchesIfNavigated: CanMatchFn = (_route: Route, segments: UrlSegment[]): boolean => {\n  const outlet = inject(WORKBENCH_OUTLET, {optional: true});\n\n  if (Routing.isViewOutlet(outlet)) {\n    const layout = inject(ɵWorkbenchRouter).getCurrentNavigationContext().layout;\n    const view = layout.view({viewId: outlet}, {orElse: null});\n    return !!view?.navigation;\n  }\n  if (Routing.isPartOutlet(outlet)) {\n    const layout = inject(ɵWorkbenchRouter).getCurrentNavigationContext().layout;\n    const part = layout.part({partId: outlet}, {orElse: null});\n    return !!part?.navigation;\n  }\n  return segments.length > 0;\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 {inject, Injectable, InjectionToken} from '@angular/core';\nimport {CanMatchFn, PRIMARY_OUTLET, Route, Router, Routes} from '@angular/router';\nimport {WorkbenchConfig} from '../workbench-config';\nimport PageNotFoundComponent from '../page-not-found/page-not-found.component';\nimport {WorkbenchRouteData} from './workbench-route-data';\nimport {ɵEmptyOutletComponent} from './empty-outlet/empty-outlet.component';\nimport {NullContentComponent} from '../null-content/null-content.component';\nimport {WORKBENCH_ROUTE, WorkbenchOutlet} from '../workbench.constants';\nimport {matchesIfNavigated} from './workbench-route-guards';\nimport {ComponentType} from '@angular/cdk/portal';\n\n/**\n * Enables the registration of auxiliary routes of top-level primary routes.\n */\n@Injectable({providedIn: 'root'})\nexport class WorkbenchAuxiliaryRouteInstaller {\n\n  private readonly _workbenchConfig = inject(WorkbenchConfig);\n  private readonly _router = inject(Router);\n  private readonly _workbenchRoutes = inject(WORKBENCH_ROUTE, {optional: true}) as Route[] | null ?? [];\n\n  /**\n   * Creates an empty-path auxiliary route for each passed outlet and adds the primary routes defined in the router config as child routes,\n   * enabling navigation in specified router outlets.\n   *\n   * @param outlets - Specifies outlets for which to create auxiliary routes.\n   * @param config - Specifies the config of the auxiliary routes.\n   */\n  public registerAuxiliaryRoutes(outlets: WorkbenchOutlet[], config: AuxiliaryRouteConfig = {}): Routes {\n    if (!outlets.length) {\n      return [];\n    }\n\n    const registeredRoutes = outlets\n      .map((outlet: WorkbenchOutlet): Route => ({\n        path: '',\n        outlet,\n        providers: [{provide: WORKBENCH_OUTLET, useValue: outlet}],\n        component: ɵEmptyOutletComponent,\n        children: [\n          // Add workbench-specific routes.\n          ...this._workbenchRoutes\n            // Provide outlet for {@link UrlMatcher} as not called inside a route's injection context.\n            .map(route => ({...route, data: {...route.data, [WorkbenchRouteData.ɵoutlet]: outlet}})),\n          // Add application-specific routes.\n          ...this._router.config\n            // Filter primary routes.\n            .filter(route => !route.outlet || route.outlet === PRIMARY_OUTLET)\n            // Filter wildcard route as most likely not indended for workbench outlets. Otherwise, the \"Not Found\" and \"Nothing to Show\" pages would never be matched.\n            .filter(route => route.path !== '**')\n            // Only match the route if the outlet has been navigated, preventing the following issues for application having an empty-path parent route (tested in `app-with-guard.e2e-spec.ts`, `app-with-redirect.e2e-spec.ts`):\n            // - Redirecting in a `CanActivate` guard on an empty-path parent route would lead to an infinite loop.\n            // - The \"Not Found\" page would not be displayed for an empty-path navigation.\n            // - The \"Not Found\" page would not be displayed when clearing the outlets from the URL.\n            // - The \"Nothing to Show\" page would not be displayed at all.\n            //\n            // The issues are caused because Angular always attempts to match empty-path auxiliary routes if the outlet is not included in the URL, regardless\n            // of whether the outlet has been navigated to the empty-path route or not. Additionally, Angular's route matcher does not backtrack if it cannot\n            // find a route for an empty-path outlet in an empty-path subtree. This prevents fallback to a top-level wildcard route, such as a \"Not Found\" or\n            // \"Nothing to Show\" route.\n            .map(route => ({...route, canMatch: [...route.canMatch ?? [], matchesIfNavigated]})),\n        ],\n      }))\n      // Add \"Page Not Found\" wildcard route.\n      .map(route => addNotFoundWildcardRoute(route, {component: this._workbenchConfig.pageNotFoundComponent, canMatch: config.notFoundRoute}))\n      // Add \"Nothing to Show\" wildcard route.\n      .map(route => addNullContentWildcardRoute(route));\n\n    this.replaceRouterConfig([\n      ...this._router.config,\n      ...registeredRoutes,\n    ]);\n\n    return registeredRoutes;\n  }\n\n  /**\n   * Unregisters auxiliary routes for the given outlet.\n   */\n  public unregisterAuxiliaryRoutes(outlets: string[]): void {\n    const outletsToRemove = new Set<string>(outlets);\n\n    function shouldRemoveRoute(route: Route): boolean {\n      return !!route.outlet && outletsToRemove.has(route.outlet);\n    }\n\n    this.replaceRouterConfig(this._router.config.filter(route => !shouldRemoveRoute(route)));\n  }\n\n  /**\n   * Replaces the router configuration to install or uninstall auxiliary routes.\n   */\n  private replaceRouterConfig(config: Routes): void {\n    // Note:\n    //   - Do not use Router.resetConfig(...) which would destroy any currently routed component because copying all routes\n    //   - Do not assign the router a new Routes object (Router.config = ...) to allow resolution of routes added during `NavigationStart` (since Angular 7.x)\n    //     (because Angular uses a reference to the Routes object during route navigation)\n    const newRoutes: Routes = [...config];\n    this._router.config.splice(0, this._router.config.length, ...newRoutes);\n  }\n}\n\n/**\n * Recursively adds a \"Not Found\" wildcard route to the specified route and its child routes.\n *\n * Has no effect if the route has no child routes or if no `CanMatch` guard is provided.\n *\n * @see PageNotFoundComponent\n */\nfunction addNotFoundWildcardRoute(route: Route, options: {component?: ComponentType<unknown>; canMatch?: true | CanMatchFn}): Route {\n  if (!options.canMatch) {\n    return route;\n  }\n  if (!route.children) {\n    return route;\n  }\n\n  return {\n    ...route,\n    children: [\n      ...route.children.map(child => addNotFoundWildcardRoute(child, options)),\n      {\n        path: '**',\n        component: options.component ?? PageNotFoundComponent,\n        data: {[WorkbenchRouteData.title]: '%workbench.page_not_found.title', [WorkbenchRouteData.cssClass]: 'e2e-page-not-found'},\n        canMatch: options.canMatch === true ? undefined : [options.canMatch],\n      },\n    ],\n  };\n}\n\n/**\n * Adds the \"Nothing to Show\" wildcard route as child route.\n *\n * @see NullContentComponent\n */\nfunction addNullContentWildcardRoute(route: Route): Route {\n  return {\n    ...route,\n    children: [\n      ...route.children ?? [],\n      {\n        path: '**',\n        component: NullContentComponent,\n      },\n    ],\n  };\n}\n\n/**\n * Configures auxiliary routes.\n */\nexport interface AuxiliaryRouteConfig {\n  /**\n   * Controls whether to install the wildcard route (\"**\") if no route matches.\n   *\n   * A `CanMatch` guard can be provided for conditional installation.\n   *\n   * Defaults to not adding the wildcard route.\n   */\n  notFoundRoute?: true | CanMatchFn;\n}\n\n/**\n * DI token to inject the outlet name of a workbench auxiliary route.\n *\n * Can be injected in a `CanMatch` guard to obtain a reference to the workbench element.\n */\nexport const WORKBENCH_OUTLET = new InjectionToken<WorkbenchOutlet>('ɵWORKBENCH_OUTLET');\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 {Pipe, PipeTransform} from '@angular/core';\n\n/**\n * Formats given keyboard accelerator for display to the user.\n */\n@Pipe({name: 'wbFormatAccelerator'})\nexport class WbFormatAcceleratorPipe implements PipeTransform {\n\n  public transform(accelerator: string[] | null | undefined): string {\n    if (!accelerator || accelerator.length === 0) {\n      return '';\n    }\n\n    return accelerator\n      .map(key => key[0]!.toUpperCase() + key.substring(1).toLowerCase())\n      .join('+');\n  }\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 {Pipe, PipeTransform, Type} from '@angular/core';\n\n/**\n * Tests if the object is of the specified type. If so, returns the object, otherwise returns `null`.\n */\n@Pipe({name: 'wbInstanceof'})\nexport class InstanceofPipe implements PipeTransform {\n\n  public transform<T>(object: unknown | undefined, type: Type<T>): T | null {\n    return object instanceof type ? object : null;\n  }\n}\n","/*\r\n * Copyright (c) 2018-2025 Swiss Federal Railways\r\n *\r\n * This program and the accompanying materials are made\r\n * available under the terms of the Eclipse Public License 2.0\r\n * which is available at https://www.eclipse.org/legal/epl-2.0/\r\n *\r\n * SPDX-License-Identifier: EPL-2.0\r\n */\r\n\r\nimport {Component, inject, Injector, input, runInInjectionContext, TemplateRef} from '@angular/core';\r\nimport {WorkbenchMenuItem} from '../../../workbench.model';\r\nimport {ComponentType} from '@angular/cdk/portal';\r\nimport {NgComponentOutlet, NgTemplateOutlet} from '@angular/common';\r\nimport {InstanceofPipe} from '../../../common/instanceof.pipe';\r\nimport {provideViewContext} from '../../../view/view-context-provider';\r\nimport {ɵWorkbenchView} from '../../../view/ɵworkbench-view.model';\r\nimport {ɵWorkbenchPart} from '../../ɵworkbench-part.model';\r\nimport {WorkbenchPart} from '../../workbench-part.model';\r\n\r\n@Component({\r\n  selector: 'wb-menu-item',\r\n  templateUrl: './menu-item.component.html',\r\n  styleUrl: './menu-item.component.scss',\r\n  imports: [\r\n    NgTemplateOutlet,\r\n    NgComponentOutlet,\r\n    InstanceofPipe,\r\n  ],\r\n})\r\nexport class MenuItemComponent {\r\n\r\n  public readonly menuItem = input.required({transform: (menuItem: WorkbenchMenuItem) => runInInjectionContext(this._injector, () => transform(menuItem))});\r\n\r\n  private readonly _injector = inject(Injector);\r\n\r\n  protected readonly TemplateMenuItem = TemplateMenuItem;\r\n  protected readonly ComponentMenuItem = ComponentMenuItem;\r\n}\r\n\r\n/**\r\n * Transforms a {@link WorkbenchMenuItem} into a {@link ComponentMenuItem} or {@link TemplateMenuItem}.\r\n */\r\nfunction transform(menuItem: WorkbenchMenuItem): ComponentMenuItem | TemplateMenuItem {\r\n  const view = inject(ɵWorkbenchView);\r\n  const injector = Injector.create({\r\n    parent: menuItem.injector ?? inject(Injector),\r\n    providers: [\r\n      provideViewContext(view),\r\n      {provide: ɵWorkbenchPart, useValue: view.part()},\r\n      {provide: WorkbenchPart, useExisting: ɵWorkbenchPart},\r\n    ],\r\n  });\r\n\r\n  if (menuItem.content instanceof TemplateRef) {\r\n    return new TemplateMenuItem(menuItem.content, {$implicit: view, ...menuItem.inputs}, injector);\r\n  }\r\n  else {\r\n    return new ComponentMenuItem(menuItem.content, menuItem.inputs, injector);\r\n  }\r\n}\r\n\r\n/**\r\n * Represents a menu item with a component.\r\n */\r\nclass ComponentMenuItem {\r\n\r\n  constructor(public component: ComponentType<unknown>,\r\n              public inputs: {[name: string]: unknown} | undefined,\r\n              public injector: Injector) {\r\n  }\r\n}\r\n\r\n/**\r\n * Represents a menu item with a template.\r\n */\r\nexport class TemplateMenuItem {\r\n\r\n  constructor(public template: TemplateRef<unknown>,\r\n              public context: {[name: string]: unknown},\r\n              public injector: Injector) {\r\n  }\r\n}\r\n","@if (menuItem() | wbInstanceof:TemplateMenuItem; as menuItem) {\r\n  <ng-container *ngTemplateOutlet=\"menuItem.template; context: menuItem.context; injector: menuItem.injector\"/>\r\n}\r\n@if (menuItem() | wbInstanceof:ComponentMenuItem; as menuItem) {\r\n  <ng-container *ngComponentOutlet=\"menuItem.component; inputs: menuItem.inputs; injector: menuItem.injector\"/>\r\n}\r\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 {Component, computed, HostBinding, HostListener, inject, Injector, runInInjectionContext, Signal} from '@angular/core';\nimport {OverlayRef} from '@angular/cdk/overlay';\nimport {WorkbenchMenuItem} from '../../workbench.model';\nimport {ɵWorkbenchView} from '../../view/ɵworkbench-view.model';\nimport {KeyValuePipe, NgClass} from '@angular/common';\nimport {WbFormatAcceleratorPipe} from './accelerator-format.pipe';\nimport {ViewId} from '../../view/workbench-view.model';\nimport {Maps} from '@scion/toolkit/util';\nimport {MenuItemComponent} from './menu-item/menu-item.component';\n\n/**\n * Renders the menu items of a {@link WorkbenchView} grouped by their menu item group.\n */\n@Component({\n  selector: 'wb-view-menu',\n  templateUrl: './view-menu.component.html',\n  styleUrls: ['./view-menu.component.scss'],\n  imports: [\n    NgClass,\n    KeyValuePipe,\n    WbFormatAcceleratorPipe,\n    MenuItemComponent,\n  ],\n})\nexport class ViewMenuComponent {\n\n  private readonly _overlayRef = inject(OverlayRef);\n  private readonly _view = inject(ɵWorkbenchView);\n  private readonly _injector = inject(Injector);\n\n  protected readonly menuItemGroups: Signal<Map<string, WorkbenchMenuItem[]>>;\n\n  constructor() {\n    this.menuItemGroups = this.groupMenuItems();\n  }\n\n  protected onMenuItemClick(menuItem: WorkbenchMenuItem): void {\n    if (menuItem.disabled) {\n      return;\n    }\n    runInInjectionContext(this._injector, () => menuItem.onAction());\n    this._overlayRef.dispose();\n  }\n\n  @HostBinding('attr.data-viewid')\n  protected get viewId(): ViewId {\n    return this._view.id;\n  }\n\n  @HostListener('document:keydown.escape')\n  protected onEscape(): void {\n    this._overlayRef.dispose();\n  }\n\n  @HostListener('mousedown', ['$event'])\n  @HostListener('sci-microfrontend-focusin', ['$event'])\n  protected onHostCloseEvent(event: Event): void {\n    event.stopPropagation(); // Prevent closing this overlay if emitted from a child of this overlay.\n  }\n\n  @HostListener('document:mousedown')\n  @HostListener('document:sci-microfrontend-focusin')\n  protected onDocumentCloseEvent(): void {\n    this._overlayRef.dispose();\n  }\n\n  private groupMenuItems(): Signal<Map<string, WorkbenchMenuItem[]>> {\n    return computed(() => this._view.menuItems().reduce((groups, menuItem) => {\n      return Maps.addListValue(groups, menuItem.group ?? 'default', menuItem);\n    }, new Map<string, WorkbenchMenuItem[]>()));\n  }\n}\n","@for (menuItemGroup of menuItemGroups() | keyvalue; track menuItemGroup; let isLast = $last) {\n  @for (menuItem of menuItemGroup.value; track menuItem) {\n    <button class=\"menu-item\"\n            [ngClass]=\"menuItem.cssClass\"\n            [disabled]=\"menuItem.disabled\"\n            (click)=\"onMenuItemClick(menuItem)\">\n      <wb-menu-item [menuItem]=\"menuItem\"/>\n      <div class=\"accelerator\">{{menuItem.accelerator | wbFormatAccelerator}}</div>\n    </button>\n  }\n  @if (!isLast) {\n    <hr>\n  }\n}\n","import {Component, input} from '@angular/core';\r\nimport {TextPipe} from '../../../text/text.pipe';\r\n\r\n@Component({\r\n  selector: 'wb-text',\r\n  template: '{{(text() | wbText)()}}',\r\n  styleUrl: './text.component.scss',\r\n  imports: [\r\n    TextPipe,\r\n  ],\r\n})\r\nexport class TextComponent {\r\n\r\n  public readonly text = input.required<string>();\r\n}\r\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 {ApplicationRef, CreateEffectOptions, DestroyRef, effect, EffectCleanupRegisterFn, EffectRef, inject, Injector} from '@angular/core';\n\n/**\n * Registers an effect outside Angular's component context, not disabling the effect if the component is detached from the change detector tree.\n *\n * Use this type of effect in components that may be detached, such as workbench views, to still execute if detached.\n *\n * The effect's lifecycle is bound to the calling injection context (or passed injector) and will be unregistered when the injector is destroyed.\n *\n * Unlike regular effects, a root effect executes during the change detection of the root component, so it should not rely on component inputs being\n * available in its first execution.\n */\nexport function rootEffect(effectFn: (onCleanup: EffectCleanupRegisterFn) => void, options?: CreateEffectOptions): EffectRef {\n  const injector = options?.injector ?? inject(Injector);\n  const rootInjector = injector.get(ApplicationRef).injector;\n\n  const effectRef = effect(effectFn, {\n    ...options,\n    injector: rootInjector,\n    manualCleanup: true,\n  });\n\n  const manualCleanup = options?.manualCleanup ?? false;\n  if (!manualCleanup) {\n    injector.get(DestroyRef).onDestroy(() => effectRef.destroy());\n  }\n\n  return effectRef;\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 {ElementRef, inject, Injectable, Injector, isSignal, NgZone, runInInjectionContext, Signal, untracked} from '@angular/core';\nimport {ConnectedPosition, Overlay, OverlayConfig, OverlayRef} from '@angular/cdk/overlay';\nimport {ComponentPortal} from '@angular/cdk/portal';\nimport {ViewMenuComponent} from './view-menu.component';\nimport {WorkbenchMenuItem} from '../../workbench.model';\nimport {WORKBENCH_VIEW_REGISTRY} from '../../view/workbench-view.registry';\nimport {fromEvent, Subscription} from 'rxjs';\nimport {MenuItemConfig, WorkbenchConfig} from '../../workbench-config';\nimport {WorkbenchService} from '../../workbench.service';\nimport {subscribeIn} from '@scion/toolkit/operators';\nimport {ViewId, WorkbenchView} from '../../view/workbench-view.model';\nimport {provideViewContext} from '../../view/view-context-provider';\nimport {Arrays} from '@scion/toolkit/util';\nimport {TextComponent} from './text/text.component';\nimport {coerceElement} from '@angular/cdk/coercion';\nimport {rootEffect} from '../../common/root-effect';\n\n/**\n * Shows menu items of a {@link WorkbenchView} in a menu.\n */\n@Injectable({providedIn: 'root'})\nexport class ViewMenuService {\n\n  private static readonly TOP_LEFT: ConnectedPosition = {originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'top'};\n  private static readonly TOP_RIGHT: ConnectedPosition = {originX: 'start', originY: 'top', overlayX: 'end', overlayY: 'top'};\n  private static readonly BOTTOM_LEFT: ConnectedPosition = {originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom'};\n  private static readonly BOTTOM_RIGHT: ConnectedPosition = {originX: 'start', originY: 'top', overlayX: 'end', overlayY: 'bottom'};\n\n  private readonly _overlay = inject(Overlay);\n  private readonly _injector = inject(Injector);\n  private readonly _viewRegistry = inject(WORKBENCH_VIEW_REGISTRY);\n  private readonly _workbenchService = inject(WorkbenchService);\n  private readonly _workbenchConfig = inject(WorkbenchConfig);\n\n  constructor() {\n    this.registerBuiltInMenuItems();\n  }\n\n  /**\n   * Registers built-in menu items added to the context menu of every view tab.\n   */\n  private registerBuiltInMenuItems(): void {\n    const config = this._workbenchConfig.viewMenuItems ?? {};\n    if (config === false) {\n      return;\n    }\n\n    this.registerCloseMenuItem(config.close ?? {});\n    this.registerCloseOtherTabsMenuItem(config.closeOthers ?? {});\n    this.registerCloseAllTabsMenuItem(config.closeAll ?? {});\n    this.registerCloseRightTabsMenuItem(config.closeToTheRight ?? {});\n    this.registerCloseLeftTabsMenuItem(config.closeToTheLeft ?? {});\n    this.registerMoveRightMenuItem(config.moveRight ?? {});\n    this.registerMoveLeftMenuItem(config.moveLeft ?? {});\n    this.registerMoveUpMenuItem(config.moveUp ?? {});\n    this.registerMoveDownMenuItem(config.moveDown ?? {});\n    this.registerMoveToNewWindowMenuItem(config.moveToNewWindow ?? {});\n  }\n\n  /**\n   * Shows a menu with menu items registered in given {@link WorkbenchView}.\n   *\n   * @see {@link WorkbenchView.registerViewMenuItem}\n   */\n  public async showMenu(location: Point, viewId: ViewId): Promise<boolean> {\n    const view = this._viewRegistry.get(viewId);\n\n    // Do not show the menu if there are no menu items registered.\n    if (!view.menuItems().length) {\n      return false;\n    }\n\n    // Prepare and display the menu overlay.\n    const config = new OverlayConfig({\n      scrollStrategy: this._overlay.scrollStrategies.noop(),\n      disposeOnNavigation: true,\n      positionStrategy: this._overlay.position()\n        .flexibleConnectedTo(location)\n        .withFlexibleDimensions(false)\n        .withPositions([ViewMenuService.TOP_LEFT, ViewMenuService.TOP_RIGHT, ViewMenuService.BOTTOM_LEFT, ViewMenuService.BOTTOM_RIGHT]),\n    });\n\n    const overlayRef = this._overlay.create(config);\n    const injector = Injector.create({\n      parent: this._injector,\n      providers: [\n        {provide: OverlayRef, useValue: overlayRef},\n        provideViewContext(view),\n      ],\n    });\n    overlayRef.attach(new ComponentPortal(ViewMenuComponent, null, injector));\n    return true;\n  }\n\n  /**\n   * Subscribes to keyboard events for menu items of given {@link WorkbenchView} on specified element.\n   *\n   * This method must be passed an injector or called in an injection context. If used in a component, use the component's injector.\n   * Unsubscribes from keyboard events when the injection context is destroyed.\n   */\n  public installMenuAccelerators(elementLike: HTMLElement | ElementRef<HTMLElement> | Signal<HTMLElement | ElementRef<HTMLElement>>, viewLike: WorkbenchView | Signal<WorkbenchView>, options?: {injector?: Injector}): void {\n    const injector = options?.injector ?? inject(Injector);\n    const zone = injector.get(NgZone);\n\n    // Run as root effect to run even if the parent component is detached from change detection (e.g., if the view is not visible).\n    rootEffect(onCleanup => {\n      const element = coerceElement(isSignal(elementLike) ? elementLike() : elementLike);\n      const view = isSignal(viewLike) ? viewLike() : viewLike;\n\n      untracked(() => {\n        const subscription = installMenuAccelerators(element, view);\n        onCleanup(() => subscription.unsubscribe());\n      });\n    }, {injector});\n\n    /**\n     * Subscribes to keyboard events for menu items of given {@link WorkbenchView} on specified element.\n     */\n    function installMenuAccelerators(element: HTMLElement, view: WorkbenchView): Subscription {\n      return fromEvent<KeyboardEvent>(element, 'keydown')\n        .pipe(subscribeIn(fn => zone.runOutsideAngular(fn)))\n        .subscribe(event => {\n          const menuItems = findMatchingMenuItems(view.menuItems(), event);\n          if (!menuItems.length) {\n            return;\n          }\n\n          runInInjectionContext(injector, () => zone.run(() => {\n            menuItems.forEach(menuItem => menuItem.onAction());\n          }));\n\n          event.preventDefault();\n          event.stopPropagation();\n        });\n    }\n\n    /**\n     * Finds menu items that match the given keyboard event.\n     */\n    function findMatchingMenuItems(menuItems: WorkbenchMenuItem[], event: KeyboardEvent): WorkbenchMenuItem[] {\n      const eventKey = (event.key as string | undefined)?.toLowerCase(); // `event.key` can be `undefined`, for example, when selecting an option from an input element's datalist.\n      const eventModifierKeys = getModifierState(event);\n\n      return menuItems\n        .filter(menuItem => !menuItem.disabled)\n        .filter(menuItem => {\n          const accelerator = menuItem.accelerator;\n          if (!accelerator?.length) {\n            return false;\n          }\n\n          const key = accelerator.at(-1)!.toLocaleLowerCase();\n          const modifierKeys = accelerator.slice(0, -1);\n          return key === eventKey && Arrays.isEqual(modifierKeys, eventModifierKeys, {exactOrder: false});\n        });\n    }\n  }\n\n  private registerCloseMenuItem(config: MenuItemConfig | false): void {\n    if (isEnabled(config)) {\n      this._workbenchService.registerViewMenuItem(view => ({\n        content: TextComponent,\n        inputs: {text: '%workbench.close_tab.action'},\n        accelerator: config.accelerator ?? ['ctrl', 'k'],\n        group: config.group ?? 'close',\n        cssClass: config.cssClass ?? 'e2e-close',\n        disabled: !view.isClosable(),\n        onAction: () => void view.close(),\n      }));\n    }\n  }\n\n  private registerCloseOtherTabsMenuItem(config: MenuItemConfig | false): void {\n    if (isEnabled(config)) {\n      this._workbenchService.registerViewMenuItem(view => ({\n        content: TextComponent,\n        inputs: {text: '%workbench.close_other_tabs.action'},\n        accelerator: config.accelerator ?? ['ctrl', 'shift', 'k'],\n        group: config.group ?? 'close',\n        cssClass: config.cssClass ?? 'e2e-close-other-tabs',\n        disabled: view.first() && view.last(),\n        onAction: () => void view.close('other-views'),\n      }));\n    }\n  }\n\n  private registerCloseAllTabsMenuItem(config: MenuItemConfig | false): void {\n    if (isEnabled(config)) {\n      this._workbenchService.registerViewMenuItem(view => ({\n        content: TextComponent,\n        inputs: {text: '%workbench.close_all_tabs.action'},\n        accelerator: config.accelerator ?? ['ctrl', 'shift', 'alt', 'k'],\n        group: config.group ?? 'close',\n        cssClass: config.cssClass ?? 'e2e-close-all-tabs',\n        onAction: () => void view.close('all-views'),\n      }));\n    }\n  }\n\n  private registerCloseRightTabsMenuItem(config: MenuItemConfig | false): void {\n    if (isEnabled(config)) {\n      this._workbenchService.registerViewMenuItem(view => ({\n        content: TextComponent,\n        inputs: {text: '%workbench.close_tabs_to_the_right.action'},\n        group: config.group ?? 'close',\n        cssClass: config.cssClass ?? 'e2e-close-right-tabs',\n        disabled: view.last(),\n        onAction: () => void view.close('views-to-the-right'),\n      }));\n    }\n  }\n\n  private registerCloseLeftTabsMenuItem(config: MenuItemConfig | false): void {\n    if (isEnabled(config)) {\n      this._workbenchService.registerViewMenuItem(view => ({\n        content: TextComponent,\n        inputs: {text: '%workbench.close_tabs_to_the_left.action'},\n        group: config.group ?? 'close',\n        cssClass: config.cssClass ?? 'e2e-close-left-tabs',\n        disabled: view.first(),\n        onAction: () => void view.close('views-to-the-left'),\n      }));\n    }\n  }\n\n  private registerMoveRightMenuItem(config: MenuItemConfig | false): void {\n    if (isEnabled(config)) {\n      this._workbenchService.registerViewMenuItem(view => ({\n        content: TextComponent,\n        inputs: {text: '%workbench.move_tab_to_the_right.action'},\n        accelerator: ['ctrl', 'alt', 'end'],\n        group: config.group ?? 'move',\n        cssClass: config.cssClass ?? 'e2e-move-right',\n        disabled: view.first() && view.last(),\n        onAction: () => view.move(view.part().id, {region: 'east'}),\n      }));\n    }\n  }\n\n  private registerMoveLeftMenuItem(config: MenuItemConfig | false): void {\n    if (isEnabled(config)) {\n      this._workbenchService.registerViewMenuItem(view => ({\n        content: TextComponent,\n        inputs: {text: '%workbench.move_tab_to_the_left.action'},\n        group: config.group ?? 'move',\n        cssClass: config.cssClass ?? 'e2e-move-left',\n        disabled: view.first() && view.last(),\n        onAction: () => view.move(view.part().id, {region: 'west'}),\n      }));\n    }\n  }\n\n  private registerMoveUpMenuItem(config: MenuItemConfig | false): void {\n    if (isEnabled(config)) {\n      this._workbenchService.registerViewMenuItem(view => ({\n        content: TextComponent,\n        inputs: {text: '%workbench.move_tab_up.action'},\n        group: config.group ?? 'move',\n        cssClass: config.cssClass ?? 'e2e-move-up',\n        disabled: view.first() && view.last(),\n        onAction: () => view.move(view.part().id, {region: 'north'}),\n      }));\n    }\n  }\n\n  private registerMoveDownMenuItem(config: MenuItemConfig | false): void {\n    if (isEnabled(config)) {\n      this._workbenchService.registerViewMenuItem(view => ({\n        content: TextComponent,\n        inputs: {text: '%workbench.move_tab_down.action'},\n        group: config.group ?? 'move',\n        cssClass: config.cssClass ?? 'e2e-move-down',\n        disabled: view.first() && view.last(),\n        onAction: () => view.move(view.part().id, {region: 'south'}),\n      }));\n    }\n  }\n\n  private registerMoveToNewWindowMenuItem(config: MenuItemConfig | false): void {\n    if (isEnabled(config)) {\n      this._workbenchService.registerViewMenuItem(view => {\n        if (view.part().peripheral()) {\n          return null;\n        }\n\n        return {\n          content: TextComponent,\n          inputs: {text: '%workbench.move_tab_to_new_window.action'},\n          group: config.group ?? 'open',\n          cssClass: config.cssClass ?? 'e2e-move-to-new-window',\n          onAction: () => view.move('new-window'),\n        };\n      });\n    }\n  }\n}\n\n/**\n * Tests if given built-in menu item is enabled for display.\n */\nfunction isEnabled(config: MenuItemConfig | false): config is MenuItemConfig {\n  return config && (config.visible ?? true);\n}\n\n/**\n * Returns the pressed modifier keys (ctrl, shift, alt, meta) as array items.\n */\nfunction getModifierState(event: KeyboardEvent): string[] {\n  const modifierState: string[] = [];\n  if (event.ctrlKey) {\n    modifierState.push('ctrl');\n  }\n  if (event.shiftKey) {\n    modifierState.push('shift');\n  }\n  if (event.altKey) {\n    modifierState.push('alt');\n  }\n  if (event.metaKey) {\n    modifierState.push('meta');\n  }\n  return modifierState;\n}\n\nexport interface Point {\n  x: number;\n  y: number;\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 {ApplicationRef, Directive, inject} from '@angular/core';\nimport {ChildrenOutletContexts} from '@angular/router';\n\n/**\n * Pretends the router outlet to be a top-level router outlet.\n *\n * Use this directive on nested router outlets to be the target of top-level routes, i.e., routes registered by the workbench for each part and view.\n */\n@Directive({\n  selector: 'router-outlet[wbRouterOutletRootContext]',\n  providers: [\n    {provide: ChildrenOutletContexts, useFactory: () => inject(ApplicationRef).injector.get(ChildrenOutletContexts)},\n  ],\n})\nexport class RouterOutletRootContextDirective {\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 {Component, DestroyRef, effect, ElementRef, HostBinding, inject, Provider, untracked, viewChild} from '@angular/core';\nimport {RouterOutlet} from '@angular/router';\nimport {SciViewportComponent} from '@scion/components/viewport';\nimport {ViewMenuService} from '../part/view-context-menu/view-menu.service';\nimport {ɵWorkbenchView} from './ɵworkbench-view.model';\nimport {Logger, LoggerNames} from '../logging';\nimport {CdkTrapFocus} from '@angular/cdk/a11y';\nimport {ViewDragService} from '../view-dnd/view-drag.service';\nimport {GLASS_PANE_BLOCKABLE, GLASS_PANE_OPTIONS, GlassPaneDirective, GlassPaneOptions} from '../glass-pane/glass-pane.directive';\nimport {ViewId, WorkbenchView} from './workbench-view.model';\nimport {OnAttach, OnDetach} from '../portal/wb-component-portal';\nimport {synchronizeCssClasses} from '../common/css-class.util';\nimport {RouterOutletRootContextDirective} from '../routing/router-outlet-root-context.directive';\n\n/**\n * Renders the workbench view, using a router-outlet to display view content.\n */\n@Component({\n  selector: 'wb-view',\n  templateUrl: './view.component.html',\n  styleUrls: ['./view.component.scss'],\n  imports: [\n    RouterOutlet,\n    RouterOutletRootContextDirective,\n    CdkTrapFocus,\n    SciViewportComponent,\n  ],\n  hostDirectives: [\n    GlassPaneDirective,\n  ],\n  providers: [\n    configureViewGlassPane(),\n  ],\n})\nexport class ViewComponent implements OnAttach, OnDetach {\n\n  private readonly _view = inject(ɵWorkbenchView);\n  private readonly _viewDragService = inject(ViewDragService);\n  private readonly _viewport = viewChild.required(SciViewportComponent);\n\n  private _scrollTop = 0;\n  private _scrollLeft = 0;\n\n  @HostBinding('attr.data-viewid')\n  protected get viewId(): ViewId {\n    return this._view.id;\n  }\n\n  @HostBinding('class.view-drag')\n  protected get isViewDragActive(): boolean {\n    return this._viewDragService.viewDragData() !== null;\n  }\n\n  constructor() {\n    this.installComponentLifecycleLogger();\n    this.installMenuAccelerators();\n    this.installOnActivateView();\n    this.addHostCssClasses();\n  }\n\n  /**\n   * Method invoked after attached this component to the DOM.\n   */\n  public onAttach(): void {\n    this._viewport().scrollTop = this._scrollTop;\n    this._viewport().scrollLeft = this._scrollLeft;\n  }\n\n  /**\n   * Method invoked before detaching this component from the DOM.\n   */\n  public onDetach(): void {\n    this._scrollTop = this._viewport().scrollTop;\n    this._scrollLeft = this._viewport().scrollLeft;\n  }\n\n  private onActivateView(): void {\n    // Gain focus only if in the active part.\n    if (this._view.part().active()) {\n      this._viewport().focus();\n    }\n  }\n\n  private installMenuAccelerators(): void {\n    inject(ViewMenuService).installMenuAccelerators(inject(ElementRef), this._view);\n  }\n\n  private installOnActivateView(): void {\n    effect(() => {\n      if (this._view.active()) {\n        untracked(() => this.onActivateView());\n      }\n    });\n  }\n\n  private addHostCssClasses(): void {\n    const host = inject(ElementRef).nativeElement as HTMLElement;\n    synchronizeCssClasses(host, this._view.classList.asList);\n  }\n\n  private installComponentLifecycleLogger(): void {\n    const logger = inject(Logger);\n    logger.debug(() => `Constructing ViewComponent. [viewId=${this.viewId}]`, LoggerNames.LIFECYCLE);\n    inject(DestroyRef).onDestroy(() => logger.debug(() => `Destroying ViewComponent [viewId=${this.viewId}]'`, LoggerNames.LIFECYCLE));\n  }\n}\n\n/**\n * Blocks this view when dialog(s) overlay it.\n */\nfunction configureViewGlassPane(): Provider[] {\n  return [\n    {\n      provide: GLASS_PANE_BLOCKABLE,\n      useFactory: () => inject(ɵWorkbenchView),\n    },\n    {\n      provide: GLASS_PANE_OPTIONS,\n      useFactory: () => ({attributes: {'data-viewid': inject(WorkbenchView).id}}) satisfies GlassPaneOptions,\n    },\n  ];\n}\n","<sci-viewport cdkTrapFocus>\n  <router-outlet [name]=\"viewId\" wbRouterOutletRootContext/>\n</sci-viewport>\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 {inject, Injectable, IterableChanges, IterableDiffer, IterableDiffers} from '@angular/core';\nimport {ɵWorkbenchLayout} from '../layout/ɵworkbench-layout';\nimport {ViewId} from '../view/workbench-view.model';\nimport {PartId} from '../part/workbench-part.model';\n\n/**\n * Stateful differ for finding added/removed workbench layout elements.\n */\n@Injectable({providedIn: 'root'})\nexport class WorkbenchLayoutDiffer {\n\n  private _partsDiffer: IterableDiffer<PartId>;\n  private _viewsDiffer: IterableDiffer<ViewId>;\n\n  constructor() {\n    const differs = inject(IterableDiffers);\n\n    this._partsDiffer = differs.find([]).create<PartId>();\n    this._viewsDiffer = differs.find([]).create<ViewId>();\n  }\n\n  /**\n   * Computes differences in the layout since last time {@link WorkbenchLayoutDiffer#diff} was invoked.\n   */\n  public diff(workbenchLayout: ɵWorkbenchLayout | null): WorkbenchLayoutDiff {\n    const parts = workbenchLayout?.parts().map(part => part.id);\n    const views = workbenchLayout?.views().map(view => view.id);\n    return new WorkbenchLayoutDiff({\n      parts: this._partsDiffer.diff(parts),\n      views: this._viewsDiffer.diff(views),\n    });\n  }\n}\n\n/**\n * Lists the layout elements added/removed in the current navigation.\n */\nexport class WorkbenchLayoutDiff {\n\n  public readonly addedParts = new Array<PartId>();\n  public readonly removedParts = new Array<PartId>();\n\n  public readonly addedViews = new Array<ViewId>();\n  public readonly removedViews = new Array<ViewId>();\n\n  constructor(changes: {parts: IterableChanges<PartId> | null; views: IterableChanges<ViewId> | null}) {\n    changes.parts?.forEachAddedItem(({item}) => this.addedParts.push(item));\n    changes.parts?.forEachRemovedItem(({item}) => this.removedParts.push(item));\n\n    changes.views?.forEachAddedItem(({item}) => this.addedViews.push(item));\n    changes.views?.forEachRemovedItem(({item}) => this.removedViews.push(item));\n  }\n\n  public toString(): string {\n    return new Array<string>()\n      .concat(this.addedParts.length ? `addedParts=[${this.addedParts}]` : [])\n      .concat(this.removedParts.length ? `removedParts=[${this.removedParts}]` : [])\n      .concat(this.addedViews.length ? `addedViews=[${this.addedViews}]` : [])\n      .concat(this.removedViews.length ? `removedViews=[${this.removedViews}]` : [])\n      .join(', ');\n  }\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 {inject, Injectable} from '@angular/core';\nimport {createElement, setAttribute, setStyle} from '../common/dom.util';\nimport {VIEW_DROP_ZONE_OVERLAY_HOST} from '../workbench-element-references';\n\n/**\n * Renders the visual placeholder when dragging a view over a valid drop zone.\n *\n * To animate the transition of the placeholder, we use a single HTML element for the placeholder and\n * adjust its position when the drop zone changes.\n */\n@Injectable({providedIn: 'root'})\nexport class ViewDropPlaceholderRenderer {\n\n  private readonly _dropPlaceholderOverlayHost = inject(VIEW_DROP_ZONE_OVERLAY_HOST);\n\n  private _dropPlaceholder: HTMLElement | null = null;\n\n  /**\n   * Identifies the drop zone displaying the placeholder.\n   *\n   * This id is used to guard disposal, so that only the drop zone displaying the placeholder can remove it.\n   */\n  private _dropZoneId: string | null = null;\n\n  /**\n   * Renders the placeholder.\n   *\n   * @param dropZoneId - Identifies the drop zone which renders the placeholder.\n   * @param rect - Specifies position and size of the placeholder. Passing `null` removes the placeholder.\n   */\n  public render(dropZoneId: string, rect: DOMRect | null): void {\n    if (rect) {\n      this._dropZoneId = dropZoneId;\n      this._dropPlaceholder ??= this.createDropPlaceholder();\n\n      setStyle(this._dropPlaceholder, {\n        top: `${rect.top}px`,\n        left: `${rect.left}px`,\n        width: `${rect.width}px`,\n        height: `${rect.height}px`,\n      });\n      setAttribute(this._dropPlaceholder, {\n        'data-dropzoneid': this._dropZoneId,\n      });\n    }\n    else if (dropZoneId === this._dropZoneId) {\n      this._dropPlaceholder?.remove();\n      this._dropPlaceholder = null;\n      this._dropZoneId = null;\n    }\n  }\n\n  private createDropPlaceholder(): HTMLElement {\n    return createElement('div', {\n      parent: this._dropPlaceholderOverlayHost()!.element.nativeElement as HTMLElement,\n      cssClass: 'e2e-drop-placeholder',\n      style: {\n        'position': 'fixed',\n        'background-color': 'var(--sci-workbench-part-dropzone-background-color)',\n        'border': '1px var(--sci-workbench-part-dropzone-border-style) var(--sci-workbench-part-dropzone-border-color)',\n        'border-radius': 'var(--sci-workbench-part-dropzone-border-radius)',\n        'pointer-events': 'none',\n        'transition-duration': '125ms',\n        'transition-property': 'top,left,width,height',\n        'transition-timing-function': 'ease-out',\n      },\n    });\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 {computed, Directive, effect, ElementRef, inject, input, NgZone, output, untracked} from '@angular/core';\nimport {createElement, nextAnimationFrame$, positionElement, setAttribute, setStyle} from '../common/dom.util';\nimport {ViewDragData, ViewDragService} from './view-drag.service';\nimport {ViewDropPlaceholderRenderer} from './view-drop-placeholder-renderer.service';\nimport {Disposable} from '../common/disposable';\nimport {boundingClientRect} from '@scion/components/dimension';\nimport {UUID} from '@scion/toolkit/uuid';\nimport {audit, BehaviorSubject, delay, identity, Observable, of, share, SubjectLike, switchMap} from 'rxjs';\nimport {subscribeIn} from '@scion/toolkit/operators';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {finalize, tap} from 'rxjs/operators';\n\n/**\n * Makes the host element a drop zone for views.\n *\n * Views can be dropped in the configured region(s) (north, east, south, west, center).\n *\n * The drop zone is aligned with the bounds of the host element, requiring the host to define a positioning context.\n * If not positioned, the element is changed to be positioned relative.\n */\n@Directive({selector: '[wbViewDropZone]'})\nexport class ViewDropZoneDirective {\n\n  /**\n   * Specifies the regions where views can be dropped. Defaults to every region.\n   */\n  public readonly regions = input<DropZoneRegion | false>(undefined, {alias: 'wbViewDropZoneRegions'});\n\n  /**\n   * Specifies attribute(s) to add to the drop zone.\n   */\n  public readonly attributes = input<{[name: string]: unknown} | undefined>(undefined, {alias: 'wbViewDropZoneAttributes'});\n\n  /**\n   * Specifies the size of a drop zone region, either as percentage value [0,1] or absolute pixel value.\n   */\n  public readonly dropRegionSize = input(.5, {alias: 'wbViewDropZoneRegionSize', transform: (value: number | undefined) => value ?? .5});\n\n  /**\n   * Specifies the size of the visual placeholder when dragging a view over a drop region.\n   * Can be a percentage value [0,1] or absolute pixel value. Defaults to {@link dropRegionSize}.\n   */\n  public readonly dropPlaceholderSize = input<number | undefined>(undefined, {alias: 'wbViewDropZonePlaceholderSize'});\n\n  /**\n   * Notifies when dropping a view.\n   */\n  public readonly viewDrop = output<WbViewDropEvent>({alias: 'wbViewDropZoneDrop'});\n\n  private readonly _host = inject(ElementRef).nativeElement as HTMLElement;\n  private readonly _viewDragService = inject(ViewDragService);\n  private readonly _viewDropPlaceholderRenderer = inject(ViewDropPlaceholderRenderer);\n  private readonly _zone = inject(NgZone);\n  private readonly _id = UUID.randomUUID();\n  private readonly _boundingClientRect = boundingClientRect(inject(ElementRef));\n  private readonly _dropRegion$ = createDropRegionObservable();\n\n  private readonly _dropRegionSize = computed(() => ({\n    maxHeight: coercePixelValue(this.dropRegionSize(), {containerSize: this._boundingClientRect().height}),\n    maxWidth: coercePixelValue(this.dropRegionSize(), {containerSize: this._boundingClientRect().width}),\n  }));\n\n  constructor() {\n    this.installDropZone();\n    this.installDropPlaceholderRenderer();\n    positionElement(this._host, {context: 'dropzone'});\n  }\n\n  /**\n   * Creates a drop zone when start dragging a view and disposes it when end dragging the view.\n   *\n   * When a view is dragged over the drop zone, computes the drop region and renders the drop placeholder using the {@link ViewDropPlaceholderRenderer}.\n   */\n  private installDropZone(): void {\n    effect(onCleanup => {\n      if (this._viewDragService.dragging()) {\n        const dropZone = untracked(() => this.createDropZone());\n        onCleanup(() => dropZone.dispose());\n      }\n    });\n  }\n\n  /**\n   * Creates the drop zone element.\n   *\n   * Views can be dropped in configured drop regions (north, east, south, west, center).\n   * The current drop region is computed based on the pointer position. Adjacent drop regions are split\n   * at a 45° angle.\n   *\n   * +-----------------------+\n   * | \\       north       / |\n   * | w +---------------+ e |\n   * | e |               | a |\n   * | s |    center     | s |\n   * | t |               | t |\n   * |   +---------------+   |\n   * | /       south       \\ |\n   * +-----------------------+\n   */\n  public createDropZone(): Disposable {\n    const dropZoneElement = createElement('div', {\n      parent: this._host,\n      attributes: {\n        ...this.attributes(),\n        'data-id': this._id,\n      },\n      cssClass: 'e2e-drop-zone',\n      style: {\n        'position': 'absolute',\n        'inset': 0,\n        'pointer-events': 'none',\n      },\n    });\n\n    // Subscribe to drag events on the host, not on the drop zone element, because disabled when not dragging over an allowed drop region.\n    // Moving the pointer out of allowed drop regions disables the drop zone element, making pointer events available to nested drop zones.\n    // Moving the pointer back re-enables the drop zone element.\n    const dragHandler = this._viewDragService.viewDrag$(this._host, {eventType: ['dragenter', 'dragover', 'dragleave', 'drop']})\n      .pipe(subscribeIn(fn => this._zone.runOutsideAngular(fn)))\n      .subscribe((event: DragEvent) => {\n        // Unset region when dragging over the tab bar or out of the host element.\n        if (this._viewDragService.isDragOverTabbar || event.type === 'dragleave') {\n          this._dropRegion$.next(null);\n          return;\n        }\n\n        // Compute the drop region.\n        const region = this.computeDropZoneRegion(event);\n        this._dropRegion$.next(region);\n        if (!region) {\n          return;\n        }\n\n        switch (event.type) {\n          case 'dragover':\n            event.preventDefault(); // allow view drop\n            break;\n          case 'drop':\n            this._zone.run(() => this.viewDrop.emit({\n              dropRegion: region,\n              dragData: this._viewDragService.viewDragData()!,\n            }));\n            break;\n        }\n      });\n\n    // Enable drop zone based on dragging over an allowed drop region.\n    // If enabled, drag events are not received by nested drop zones.\n    const dropZoneActivator = this._dropRegion$.subscribe(dropRegion => {\n      setStyle(dropZoneElement, {'pointer-events': dropRegion ? null : 'none'});\n      setAttribute(dropZoneElement, {'data-region': dropRegion});\n    });\n\n    return {\n      dispose: () => {\n        dragHandler.unsubscribe();\n        dropZoneActivator.unsubscribe();\n        dropZoneElement.remove();\n        this._dropRegion$.next(null);\n      },\n    };\n  }\n\n  /**\n   * Renders or removes the drop placeholder based on the current drop region.\n   */\n  private installDropPlaceholderRenderer(): void {\n    // Use an observable instead of an effect to control when to call `ViewDropPlaceholderRenderer.render`.\n    // Child elements must invoke the render method before parent elements. Otherwise, nested drop zones\n    // would override the drop placeholder of parent drop zones.\n\n    // Component effects always execute top-down the component tree, the opposite direction to drag events\n    // that bubble up the component tree. The same applies to root effects, which execute in registration\n    // order rather than in the order of tracked signal changes.\n\n    const dragging = this._viewDragService.dragging;\n    this._dropRegion$\n      .pipe(\n        // When leaving the drop zone (no drop region) but continue dragging, remove the drop zone asynchronously\n        // to animate transition of the placeholder to another drop zone. If ended dragging, remove the placeholder\n        // immediately.\n        switchMap((region: Region | null) => of(region).pipe(!region && dragging() ? delay(50) : identity)),\n        finalize(() => this._viewDropPlaceholderRenderer.render(this._id, null)),\n        takeUntilDestroyed(),\n      )\n      .subscribe((region: Region | null) => {\n        if (region) {\n          // Render the drop placeholder.\n          const rect = this.computeDropPlaceholderRect(region, this.dropPlaceholderSize() ?? this.dropRegionSize());\n          this._viewDropPlaceholderRenderer.render(this._id, rect);\n        }\n        else {\n          // Remove the drop placeholder.\n          this._viewDropPlaceholderRenderer.render(this._id, null);\n        }\n      });\n  }\n\n  /**\n   * Computes the drop region based on the pointer position and allowed regions, returning `null` if not dragging over an allowed region.\n   */\n  private computeDropZoneRegion(event: DragEvent): Region | null {\n    const regions = this.regions() ?? {north: true, east: true, south: true, west: true, center: true};\n    if (!regions) {\n      return null;\n    }\n\n    const {width, height, left, top, right, bottom} = this._boundingClientRect();\n    const {maxHeight, maxWidth} = this._dropRegionSize();\n    const hCenter = width / 2;\n    const vCenter = height / 2;\n\n    // Calculate pointer insets relative to the host.\n    const pointerInset = {\n      top: event.clientY - top,\n      right: right - event.clientX,\n      bottom: bottom - event.clientY,\n      left: event.clientX - left,\n    };\n\n    // Compute allowed regions.\n    const north = regions.north && pointerInset.top <= maxHeight && 'north';\n    const south = regions.south && pointerInset.bottom <= maxHeight && 'south';\n    const east = regions.east && pointerInset.right <= maxWidth && 'east';\n    const west = regions.west && pointerInset.left <= maxWidth && 'west';\n    const center = regions.center && 'center';\n\n    // Calculate region in top/left quadrant.\n    if (pointerInset.left <= hCenter && pointerInset.top <= vCenter) {\n      if (pointerInset.left < pointerInset.top) {\n        return west || north || center || null;\n      }\n      else {\n        return north || west || center || null;\n      }\n    }\n    // Calculate region in top/right quadrant.\n    else if (pointerInset.left >= hCenter && pointerInset.top <= vCenter) {\n      if (pointerInset.right < pointerInset.top) {\n        return east || north || center || null;\n      }\n      else {\n        return north || east || center || null;\n      }\n    }\n    // Calculate region in bottom/left quadrant.\n    else if (pointerInset.left <= hCenter && pointerInset.top >= vCenter) {\n      if (pointerInset.left < pointerInset.bottom) {\n        return west || south || center || null;\n      }\n      else {\n        return south || west || center || null;\n      }\n    }\n    // Calculate region in bottom/right quadrant.\n    else if (pointerInset.left >= hCenter && pointerInset.top >= vCenter) {\n      if (pointerInset.right < pointerInset.bottom) {\n        return east || south || center || null;\n      }\n      else {\n        return south || east || center || null;\n      }\n    }\n\n    return center || null;\n  }\n\n  /**\n   * Calculates the bounding box of the drop placeholder in given region based on the given size.\n   *\n   * If passing a ratio [0,1] for the size, the size is interpreted as a percentage value relative to the size of the host element.\n   */\n  private computeDropPlaceholderRect(region: Region, size: number): DOMRect {\n    const {x, y, width, height} = this._boundingClientRect();\n    return new DOMRect(\n      x + (region === 'east' ? width - coercePixelValue(size, {containerSize: width}) : 0),\n      y + (region === 'south' ? height - coercePixelValue(size, {containerSize: height}) : 0),\n      region === 'west' || region === 'east' ? coercePixelValue(size, {containerSize: width}) : width,\n      region === 'north' || region === 'south' ? coercePixelValue(size, {containerSize: height}) : height,\n    );\n  }\n}\n\n/**\n * Coerces given value to a CSS pixel value.\n *\n * If passing a ratio [0,1], it is interpreted as a percentage value relative to the size of the container.\n */\nfunction coercePixelValue(pixelOrRatio: number, options: {containerSize: number}): number {\n  return (pixelOrRatio <= 1) ? options.containerSize * pixelOrRatio : pixelOrRatio;\n}\n\n/**\n * Event that is emitted when dropping a view.\n */\nexport interface WbViewDropEvent {\n  dropRegion: Region;\n  dragData: ViewDragData;\n}\n\n/**\n * Specifies the regions where a drop zone should be installed.\n */\nexport interface DropZoneRegion {\n  north: boolean;\n  south: boolean;\n  west: boolean;\n  east: boolean;\n  center: boolean;\n}\n\n/**\n * Represents a drop region.\n */\ntype Region = 'north' | 'east' | 'south' | 'west' | 'center';\n\n/**\n * Creates a subject-like observable to observe and set the drop region,\n * multicasting the drop zone to many observers while throttling emission\n * to the latest drop region per animation frame.\n */\nfunction createDropRegionObservable(): Observable<Region | null> & Pick<SubjectLike<Region | null>, 'next'> {\n  const zone = inject(NgZone);\n  const region$ = new BehaviorSubject<Region | null>(null);\n\n  const observe$ = region$\n    .pipe(\n      subscribeIn(fn => zone.runOutsideAngular(fn)),\n      // Ensure not to be in Angular.\n      tap(() => NgZone.assertNotInAngularZone()),\n      // Throttle emission to a single event per animation frame.\n      audit(() => nextAnimationFrame$()),\n      share(),\n    ) as Observable<Region | null> & Pick<SubjectLike<Region | null>, 'next'>;\n\n  // Add notifier function.\n  observe$.next = (region: Region | null): void => {\n    if (region$.value !== region) {\n      zone.runOutsideAngular(() => region$.next(region));\n    }\n  };\n\n  return observe$;\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 {Pipe, PipeTransform} from '@angular/core';\nimport {MPartGrid} from '../layout/workbench-grid.model';\nimport {WorkbenchLayouts} from '../layout/workbench-layouts.util';\n\n/**\n * Returns given grid, but only if visible.\n *\n * @see isGridElementVisible\n */\n@Pipe({name: 'wbGridIfVisible'})\nexport class GridIfVisiblePipe implements PipeTransform {\n\n  public transform(grid: MPartGrid | null | undefined): MPartGrid | null {\n    if (grid && WorkbenchLayouts.isGridElementVisible(grid.root)) {\n      return grid;\n    }\n    return null;\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 {ViewMoveEventTarget} from './view-drag.service';\nimport {MPart, MPartGrid} from '../layout/workbench-grid.model';\n\n/**\n * Provides helper functions for dragging a view to a grid.\n */\nexport const GridDropTargets = {\n\n  /**\n   * Resolves the drop target for moving a view to the root part (or node) of a grid.\n   *\n   * Examples:\n   * - Droping a view at the grid's boundaries (north, south, east, west).\n   * - Dropping a view on the grid's desktop (center).\n   *\n   * When dropping a view on the grid's desktop, the root of the grid can be a part or a node,\n   * depending on whether the grid contains structural parts.\n   */\n  resolve: (target: {grid: MPartGrid; dropRegion: 'west' | 'east' | 'north' | 'south' | 'center'; workbenchId: string}): ViewMoveEventTarget => {\n    const {grid, dropRegion, workbenchId} = target;\n\n    switch (dropRegion) {\n      case 'center': {\n        if (grid.root instanceof MPart) {\n          return {elementId: grid.root.id, workbenchId};\n        }\n        return {elementId: grid.activePartId, workbenchId};\n      }\n      default: {\n        return {\n          elementId: grid.root.id,\n          region: dropRegion,\n          workbenchId,\n          newPart: {ratio: .2},\n        };\n      }\n    }\n  },\n} as const;\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 {inject, Injector, Pipe, PipeTransform} from '@angular/core';\nimport {WORKBENCH_PART_REGISTRY} from './workbench-part.registry';\nimport type {PartComponent} from './part.component';\nimport type {MainAreaPartComponent} from './main-area-part/main-area-part.component';\nimport {ComponentPortal} from '@angular/cdk/portal';\nimport {PartId} from './workbench-part.model';\n\n/**\n * Constructs the portal for the given part in the calling injection context,\n * or throws an error if the part is not registered.\n */\n@Pipe({name: 'wbPartPortal'})\nexport class PartPortalPipe implements PipeTransform {\n\n  private readonly _partRegistry = inject(WORKBENCH_PART_REGISTRY);\n  private readonly _injector = inject(Injector);\n\n  public transform(partId: PartId | null): ComponentPortal<PartComponent | MainAreaPartComponent> | null {\n    if (!partId) {\n      return null;\n    }\n\n    return this._partRegistry.get(partId).createPortalFromInjectionContext(this._injector) as ComponentPortal<PartComponent | MainAreaPartComponent>;\n  }\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 {Component, computed, inject, input, Signal, untracked} from '@angular/core';\nimport {MPart, MTreeNode} from '../workbench-grid.model';\nimport {ɵWorkbenchRouter} from '../../routing/ɵworkbench-router.service';\nimport {WorkbenchLayoutService} from '../workbench-layout.service';\nimport {InstanceofPipe} from '../../common/instanceof.pipe';\nimport {CdkPortalOutlet} from '@angular/cdk/portal';\nimport {PartPortalPipe} from '../../part/part-portal.pipe';\nimport {SciSashboxComponent, SciSashDirective} from '@scion/components/sashbox';\nimport {WorkbenchLayouts} from '../workbench-layouts.util';\nimport {NullContentComponent} from '../../null-content/null-content.component';\n\n/**\n * Renders a {@link MTreeNode} or {@link MPart}.\n *\n * The workbench layout is modeled as a tree of nodes `{@link MTreeNode}` and parts `{@link MPart}`.\n * Each node has two children, which can be either another node or a part (leaf). A node defines\n * a split layout in which the two children are arranged vertically or horizontally.\n *\n * Nodes are rendered as {@link SciSashboxComponent} and parts as {@link PartComponent} or {@link MainAreaPartComponent}.\n */\n@Component({\n  selector: 'wb-grid-element',\n  templateUrl: './grid-element.component.html',\n  styleUrls: ['./grid-element.component.scss'],\n  imports: [\n    InstanceofPipe,\n    CdkPortalOutlet,\n    PartPortalPipe,\n    SciSashboxComponent,\n    SciSashDirective,\n    NullContentComponent,\n  ],\n  host: {\n    '[attr.data-parentnodeid]': 'element().parent?.id',\n    '[attr.data-nodeid]': 'nodeId()',\n    '[attr.data-partid]': 'partId()',\n  },\n})\nexport class GridElementComponent {\n\n  public readonly element = input.required<MTreeNode | MPart>();\n\n  private readonly _workbenchRouter = inject(ɵWorkbenchRouter);\n  private readonly _workbenchLayoutService = inject(WorkbenchLayoutService);\n\n  protected readonly MTreeNode = MTreeNode;\n  protected readonly MPart = MPart;\n\n  protected readonly nodeId = computed(() => this.element() instanceof MTreeNode ? this.element().id : undefined);\n  protected readonly partId = computed(() => this.element() instanceof MPart ? this.element().id : undefined);\n  protected readonly children = this.computeChildren();\n\n  protected onSashStart(): void {\n    this._workbenchLayoutService.signalResizing(true);\n  }\n\n  protected onSashEnd(treeNode: MTreeNode, {sash1, sash2}: {[sashKey: string]: number}): void {\n    const ratio = sash1! / (sash1! + sash2!);\n    this._workbenchLayoutService.signalResizing(false);\n    void this._workbenchRouter.navigate(layout => layout.setTreeNodeSplitRatio(treeNode.id, ratio));\n  }\n\n  private computeChildren(): Signal<ChildElement[]> {\n    return computed(() => {\n      const treeNode = this.element();\n      if (!(treeNode instanceof MTreeNode)) {\n        return [];\n      }\n\n      return untracked(() => {\n        const child1Visible = WorkbenchLayouts.isGridElementVisible(treeNode.child1);\n        const child2Visible = WorkbenchLayouts.isGridElementVisible(treeNode.child2);\n\n        if (child1Visible && child2Visible) {\n          const [size1, size2] = calculateSashSizes(treeNode.ratio);\n          return [\n            {element: treeNode.child1, size: size1},\n            {element: treeNode.child2, size: size2},\n          ];\n        }\n        else if (child1Visible) {\n          return [{element: treeNode.child1}];\n        }\n        else if (child2Visible) {\n          return [{element: treeNode.child2}];\n        }\n        return [];\n      });\n    });\n  }\n}\n\n/**\n * Calculates the two sash proportions for the given ratio. Each proportion is >= 1.\n */\nfunction calculateSashSizes(ratio: number): [string, string] {\n  // Important: `SciSashboxComponent` requires proportions to be >= 1. For this reason we cannot simply calculate [ratio, 1 - ratio].\n  if (ratio === 0) {\n    return ['0px', '1'];\n  }\n  if (ratio === 1) {\n    return ['1', '0px'];\n  }\n\n  return [`${1 / (1 - ratio)}`, `${1 / ratio}`];\n}\n\n/**\n * Represents a visible child of a {@link MTreeNode}.\n */\ninterface ChildElement {\n  element: MTreeNode | MPart;\n  size?: string;\n}\n","<!-- MPart (leaf) -->\n@if (element() | wbInstanceof:MPart; as part) {\n  <ng-container [cdkPortalOutlet]=\"part.id | wbPartPortal\"/>\n}\n\n<!-- MTreeNode -->\n@if (element() | wbInstanceof:MTreeNode; as treeNode) {\n  @let children = this.children();\n\n  @switch (children.length) {\n    @case (0) {\n      <!-- Node with no visible children. -->\n      <wb-null-content/>\n    }\n    @case (1) {\n      <!-- Node with a single visible child. -->\n      <wb-grid-element [element]=\"children[0]!.element\"/>\n    }\n    @default {\n      <!-- Node with multiple visible children. -->\n      <sci-sashbox [direction]=\"treeNode.direction\"\n                   [attr.data-nodeid]=\"treeNode.id\"\n                   (sashStart)=\"onSashStart()\"\n                   (sashEnd)=\"onSashEnd(treeNode, $event)\">\n        @for (child of children; track child.element.id) {\n          <ng-template sciSash [size]=\"child.size\" [key]=\"'sash' + ($index + 1)\">\n            <wb-grid-element [element]=\"child.element\" [class]=\"'sash-' + ($index + 1)\"/>\n          </ng-template>\n        }\n      </sci-sashbox>\n    }\n  }\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 {Pipe, PipeTransform} from '@angular/core';\nimport {MPart, MTreeNode} from '../layout/workbench-grid.model';\nimport {MAIN_AREA} from '../layout/workbench-layout';\nimport {WorkbenchLayouts} from '../layout/workbench-layouts.util';\n\n/**\n * Determines whether the given element requires a drop zone in the specified region.\n *\n * An element requires a drop zone if its layout is divided into multiple parts in that region.\n */\n@Pipe({name: 'wbRequiresDropZone'})\nexport class RequiresDropZonePipe implements PipeTransform {\n\n  public transform(element: MTreeNode | MPart, region: 'north' | 'south' | 'east' | 'west'): boolean {\n    return requiresDropZone(element, region);\n  }\n}\n\nfunction requiresDropZone(element: MTreeNode | MPart, region: 'north' | 'south' | 'east' | 'west'): boolean {\n  if (element instanceof MPart) {\n    // Return `false` for every part except the main area part, allowing for dragging a first view to the side of the main area grid.\n    return element.id === MAIN_AREA;\n  }\n\n  const child1Visible = WorkbenchLayouts.isGridElementVisible(element.child1);\n  const child2Visible = WorkbenchLayouts.isGridElementVisible(element.child2);\n\n  if (child1Visible && child2Visible) {\n    switch (region) {\n      case 'north':\n        // The element requires a drop zone if the element (or its first child) is divided horizontally into multiple parts.\n        return element.direction === 'row' || requiresDropZone(element.child1, region);\n      case 'south':\n        // The element requires a drop zone if the element (or its second child) is divided horizontally into multiple parts.\n        return element.direction === 'row' || requiresDropZone(element.child2, region);\n      case 'west':\n        // The element requires a drop zone if the element (or its first child) is divided vertically into multiple parts.\n        return element.direction === 'column' || requiresDropZone(element.child1, region);\n      case 'east':\n        // The element requires a drop zone if the element (or its second child) is divided vertically into multiple parts.\n        return element.direction === 'column' || requiresDropZone(element.child2, region);\n      default:\n        return false; // unsupported\n    }\n  }\n  return requiresDropZone(child1Visible ? element.child1 : element.child2, region);\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 {Component, inject, input} from '@angular/core';\nimport {GridElementComponent} from '../grid-element/grid-element.component';\nimport {RequiresDropZonePipe} from '../../view-dnd/requires-drop-zone.pipe';\nimport {ViewDropZoneDirective, WbViewDropEvent} from '../../view-dnd/view-drop-zone.directive';\nimport {MPartGrid} from '../workbench-grid.model';\nimport {GridDropTargets} from '../../view-dnd/grid-drop-targets.util';\nimport {WORKBENCH_ID} from '../../workbench-id';\nimport {ViewDragService} from '../../view-dnd/view-drag.service';\n\n/**\n * Renders the layout of the workbench.\n *\n * The workbench layout is a grid of parts. It contains at least one part. A special part, the main area part, is not a stack of views\n * but embeds a sub-grid, the main area grid. It defines the arrangement of parts in the main area. The main area is optional.\n *\n * The layout is modeled as a tree of nodes `{@link MTreeNode}` and parts `{@link MPart}`. Each node has two children, which can be either\n * another node or a part (leaf). A node defines a split layout in which the two children are arranged vertically or horizontally.\n *\n *                       MTreeNode\n *                           |\n *            +--------------+--------------+\n *            |                             |                        +--------+-----------------------+\n *        MTreeNode                       MPart                      |  left  | +---------+---------+ |\n *     +------+------+                 (MAIN_AREA)                   |  top   | |         |         | |\n *     |             |                      |              ======>   |--------+ | left    | right   | |\n *   MPart         MPart                 MTreeNode         renders   |  left  | |         |         | |\n * (left-top)  (left-bottom)         +------+------+                 | bottom | +---------+---------+ |\n *                                   |             |                 +--------+-----------------------+\n *                                 MPart         MPart\n *                                (left)        (right)\n */\n@Component({\n  selector: 'wb-grid',\n  templateUrl: './grid.component.html',\n  styleUrls: ['./grid.component.scss'],\n  imports: [\n    GridElementComponent,\n    ViewDropZoneDirective,\n    RequiresDropZonePipe,\n  ],\n})\nexport class GridComponent {\n\n  /**\n   * Specifies the grid to render.\n   */\n  public readonly grid = input.required<MPartGrid>();\n\n  /**\n   * Controls dropping at the grid boundaries.\n   */\n  public readonly gridDropZone = input<GridDropZoneConfig | false>(false);\n\n  private readonly _workbenchId = inject(WORKBENCH_ID);\n  private readonly _viewDragService = inject(ViewDragService);\n\n  protected readonly canDrop = inject(ViewDragService).canDrop(this.grid);\n\n  protected onViewDrop(event: WbViewDropEvent): void {\n    this._viewDragService.dispatchViewMoveEvent({\n      source: {\n        workbenchId: event.dragData.workbenchId,\n        partId: event.dragData.partId,\n        viewId: event.dragData.viewId,\n        alternativeViewId: event.dragData.alternativeViewId,\n        navigation: event.dragData.navigation,\n        classList: event.dragData.classList,\n      },\n      target: GridDropTargets.resolve({\n        grid: this.grid(),\n        workbenchId: this._workbenchId,\n        dropRegion: event.dropRegion,\n      }),\n      dragData: event.dragData,\n    });\n  }\n}\n\n/**\n * Configures the drop zones of a grid.\n */\nexport interface GridDropZoneConfig {\n  /**\n   * Specifies the size of a drop zone region, either as percentage value [0,1] or absolute pixel value.\n   */\n  dropRegionSize?: number;\n  /**\n   * Specifies the size of the visual placeholder when dragging a view over a drop region.\n   * Can be a percentage value [0,1] or absolute pixel value. Defaults to {@link dropRegionSize}.\n   */\n  dropPlaceholderSize?: number;\n  /**\n   * Specifies attribute(s) to add to the drop zones.\n   */\n  dropZoneAttributes?: {[name: string]: unknown};\n}\n","@let dropZone = gridDropZone();\n@if (dropZone) {\n  <wb-grid-element [element]=\"grid().root\"\n                   wbViewDropZone\n                   [wbViewDropZoneRegionSize]=\"dropZone.dropRegionSize\"\n                   [wbViewDropZonePlaceholderSize]=\"dropZone.dropPlaceholderSize\"\n                   [wbViewDropZoneRegions]=\"canDrop() && {\n                     north: false,\n                     south: grid().root | wbRequiresDropZone:'south',\n                     west: grid().root | wbRequiresDropZone:'west',\n                     east: grid().root | wbRequiresDropZone:'east',\n                     center: false,\n                   }\"\n                   [wbViewDropZoneAttributes]=\"dropZone.dropZoneAttributes\"\n                   (wbViewDropZoneDrop)=\"onViewDrop($event)\"/>\n} @else {\n  <wb-grid-element [element]=\"grid().root\"/>\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\n/**\n * Converts a camelCase string to a dash-separated string.\n */\nexport function dasherize(value: string): string {\n  return value.replace(/[A-Z]/g, match => `-${match.toLowerCase()}`);\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 {Component, computed, ElementRef, inject} from '@angular/core';\nimport {ɵWorkbenchPart} from '../ɵworkbench-part.model';\nimport {WorkbenchLayoutService} from '../../layout/workbench-layout.service';\nimport {ViewDragService} from '../../view-dnd/view-drag.service';\nimport {ViewDropZoneDirective, WbViewDropEvent} from '../../view-dnd/view-drop-zone.directive';\nimport {RouterOutlet} from '@angular/router';\nimport {SciViewportComponent} from '@scion/components/viewport';\nimport {GridIfVisiblePipe} from '../../common/grid-if-visible.pipe';\nimport {WORKBENCH_ID} from '../../workbench-id';\nimport {GridDropTargets} from '../../view-dnd/grid-drop-targets.util';\nimport {RouterOutletRootContextDirective} from '../../routing/router-outlet-root-context.directive';\nimport {Logger} from '../../logging';\nimport {MAIN_AREA} from '../../layout/workbench-layout';\nimport {DESKTOP} from '../../workbench-element-references';\nimport {NgTemplateOutlet} from '@angular/common';\nimport {GridComponent} from '../../layout/grid/grid.component';\nimport {dasherize} from '../../common/dasherize.util';\n\n/**\n * Renders the layout of the {@link MAIN_AREA} part.\n *\n * The main area is a special part that is a subgrid, not a stack of views.\n *\n * The main area has the following characteristics:\n * - is optional;\n * - is the primary place to open views;\n * - is shared by perspectives having a main area;\n * - can be maximized;\n *\n * The layout is modeled as a tree of nodes `{@link MTreeNode}` and parts `{@link MPart}`. Each node has two children, which can be either\n * another node or a part (leaf). A node defines a split layout in which the two children are arranged vertically or horizontally.\n *\n *         MTreeNode\n *            |                         +------+-------+\n *     +------+------+        ======>   | left | right |\n *     |             |        renders   +------+-------+\n *   MPart         MPart\n *  (left)        (right)\n */\n@Component({\n  selector: `wb-part[data-partid=\"${MAIN_AREA}\"]`, // eslint-disable-line @angular-eslint/component-selector\n  templateUrl: './main-area-part.component.html',\n  styleUrls: ['./main-area-part.component.scss'],\n  imports: [\n    GridComponent,\n    ViewDropZoneDirective,\n    RouterOutlet,\n    RouterOutletRootContextDirective,\n    SciViewportComponent,\n    GridIfVisiblePipe,\n    NgTemplateOutlet,\n  ],\n  host: {\n    '[attr.data-grid]': 'dasherize(part.gridName())',\n  },\n})\nexport class MainAreaPartComponent {\n\n  private readonly _workbenchId = inject(WORKBENCH_ID);\n  private readonly _layout = inject(WorkbenchLayoutService).layout;\n  private readonly _viewDragService = inject(ViewDragService);\n  private readonly _logger = inject(Logger);\n\n  protected readonly part = inject(ɵWorkbenchPart);\n  protected readonly mainAreaGrid = computed(() => this._layout().grids.mainArea!);\n  protected readonly desktop = inject(DESKTOP);\n  protected readonly dasherize = dasherize;\n  protected readonly canDrop = inject(ViewDragService).canDrop(computed(() => this._layout().grids.mainArea!));\n\n  constructor() {\n    inject(ɵWorkbenchPart).partComponent.set(inject(ElementRef).nativeElement as HTMLElement);\n  }\n\n  protected onDesktopViewDrop(event: WbViewDropEvent): void {\n    this._viewDragService.dispatchViewMoveEvent({\n      source: {\n        workbenchId: event.dragData.workbenchId,\n        partId: event.dragData.partId,\n        viewId: event.dragData.viewId,\n        alternativeViewId: event.dragData.alternativeViewId,\n        navigation: event.dragData.navigation,\n        classList: event.dragData.classList,\n      },\n      target: GridDropTargets.resolve({\n        grid: this.mainAreaGrid(),\n        workbenchId: this._workbenchId,\n        dropRegion: event.dropRegion,\n      }),\n      dragData: event.dragData,\n    });\n  }\n\n  protected onLegacyStartPageActivate(): void {\n    this._logger.warn('[Deprecation] The configuration for displaying a start page in the workbench has changed. The main area must now be navigated. Previously, no navigation was required and the component associated with the empty-path route was used as the start page. Legacy support will be removed in version 21.', `\n\n      // Example for navigating the main area:\n      \n      import {bootstrapApplication} from '@angular/platform-browser';\n      import {provideRouter} from '@angular/router';\n      import {MAIN_AREA, provideWorkbench} from '@scion/workbench';\n      \n      bootstrapApplication(AppComponent, {\n        providers: [\n          provideWorkbench({\n            layout: factory => factory\n              .addPart(MAIN_AREA)\n              .navigatePart(MAIN_AREA, ['path/to/desktop'])\n          }),\n          provideRouter([\n            {\n              path: 'path/to/desktop',\n              component: DesktopComponent,\n            }\n          ])\n        ]\n      });\n\n      // Example for navigating the main area to the empty-path route:\n      \n      import {bootstrapApplication} from '@angular/platform-browser';\n      import {provideRouter} from '@angular/router';\n      import {canMatchWorkbenchPart, MAIN_AREA, provideWorkbench} from '@scion/workbench';\n      \n      bootstrapApplication(AppComponent, {\n        providers: [\n          provideWorkbench({\n            layout: factory => factory\n              .addPart(MAIN_AREA)\n              .navigatePart(MAIN_AREA, [], {hint: 'desktop'}) // pass hint to match a specific empty-path route\n          }),\n          provideRouter([\n            {\n              path: '',\n              component: DesktopComponent,\n              canMatch: [canMatchWorkbenchPart('desktop')] // only match if navigating with the specified hint\n            }\n          ])\n        ],\n      });\n\n      Alternatively, or for layouts without a main area, provide a desktop using an '<ng-template>' with the 'wbDesktop' directive. The template content is used as the desktop content.\n\n      <wb-workbench>\n        <ng-template wbDesktop>\n          Welcome\n        </ng-template>\n      </wb-workbench>\n    `);\n  }\n}\n","@if (mainAreaGrid() | wbGridIfVisible; as grid) {\n  <wb-grid [grid]=\"grid\"\n           [gridDropZone]=\"{\n             dropRegionSize: 100,\n             dropPlaceholderSize: 100,\n             dropZoneAttributes: {\n               'data-grid': 'main-area',\n               'data-partid': part.id,\n             }\n           }\"\n           [attr.data-grid]=\"'main-area'\"\n           class=\"e2e-content\"/>\n} @else {\n  <sci-viewport class=\"desktop e2e-part-content e2e-content\"\n                wbViewDropZone\n                [wbViewDropZoneRegions]=\"canDrop() && {center: true, north: false, south: false, west: false, east: false}\"\n                [wbViewDropZoneAttributes]=\"{\n                  'data-desktop': '',\n                  'data-partid': part.id,\n                }\"\n                (wbViewDropZoneDrop)=\"onDesktopViewDrop($event)\">\n    @if (part.navigation()) {\n      <router-outlet [name]=\"part.id\" wbRouterOutletRootContext/>\n    } @else if (desktop()) {\n      <ng-container *ngTemplateOutlet=\"desktop()!\"/>\n    } @else {\n      <router-outlet (activate)=\"onLegacyStartPageActivate()\"/>\n    }\n  </sci-viewport>\n}\n","/*\r\n * Copyright (c) 2018-2025 Swiss Federal Railways\r\n *\r\n * This program and the accompanying materials are made\r\n * available under the terms of the Eclipse Public License 2.0\r\n * which is available at https://www.eclipse.org/legal/epl-2.0/\r\n *\r\n * SPDX-License-Identifier: EPL-2.0\r\n */\r\n\r\nimport {Component, inject, Injector, input, runInInjectionContext, TemplateRef} from '@angular/core';\r\nimport {WorkbenchPartAction} from '../../workbench.model';\r\nimport {WorkbenchPart} from '../workbench-part.model';\r\nimport {ComponentType} from '@angular/cdk/portal';\r\nimport {NgComponentOutlet, NgTemplateOutlet} from '@angular/common';\r\nimport {ɵWorkbenchPart} from '../ɵworkbench-part.model';\r\nimport {InstanceofPipe} from '../../common/instanceof.pipe';\r\n\r\n@Component({\r\n  selector: 'wb-part-action',\r\n  templateUrl: './part-action.component.html',\r\n  styleUrl: './part-action.component.scss',\r\n  imports: [\r\n    NgTemplateOutlet,\r\n    NgComponentOutlet,\r\n    InstanceofPipe,\r\n  ],\r\n})\r\nexport class PartActionComponent {\r\n\r\n  public readonly action = input.required({transform: (action: WorkbenchPartAction) => runInInjectionContext(this._injector, () => transform(action))});\r\n\r\n  private readonly _injector = inject(Injector);\r\n\r\n  protected readonly TemplatePartAction = TemplatePartAction;\r\n  protected readonly ComponentPartAction = ComponentPartAction;\r\n}\r\n\r\n/**\r\n * Transforms a {@link WorkbenchPartAction} into a {@link ComponentPartAction} or {@link TemplatePartAction}.\r\n */\r\nfunction transform(action: WorkbenchPartAction): ComponentPartAction | TemplatePartAction {\r\n  const part = inject(WorkbenchPart);\r\n  const injector = Injector.create({\r\n    parent: action.injector ?? inject(Injector),\r\n    providers: [\r\n      {provide: ɵWorkbenchPart, useValue: part},\r\n      {provide: WorkbenchPart, useExisting: ɵWorkbenchPart},\r\n    ],\r\n  });\r\n\r\n  if (action.content instanceof TemplateRef) {\r\n    return new TemplatePartAction(action.content, {$implicit: part, ...action.inputs}, injector);\r\n  }\r\n  else {\r\n    return new ComponentPartAction(action.content, action.inputs, injector);\r\n  }\r\n}\r\n\r\n/**\r\n * Represents a part action with a component.\r\n */\r\nclass ComponentPartAction {\r\n\r\n  constructor(public component: ComponentType<unknown>,\r\n              public inputs: {[name: string]: unknown} | undefined,\r\n              public injector: Injector) {\r\n  }\r\n}\r\n\r\n/**\r\n * Represents a part action with a template.\r\n */\r\nexport class TemplatePartAction {\r\n\r\n  constructor(public template: TemplateRef<unknown>,\r\n              public context: {[name: string]: unknown},\r\n              public injector: Injector) {\r\n  }\r\n}\r\n","@if (action() | wbInstanceof:TemplatePartAction; as action) {\r\n  <ng-container *ngTemplateOutlet=\"action.template; context: action.context; injector: action.injector\"/>\r\n}\r\n@if (action() | wbInstanceof:ComponentPartAction; as action) {\r\n  <ng-container *ngComponentOutlet=\"action.component; inputs: action.inputs; injector: action.injector\"/>\r\n}\r\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 {booleanAttribute, ChangeDetectionStrategy, ChangeDetectorRef, Component, DestroyRef, effect, ElementRef, forwardRef, HostBinding, HostListener, inject, input, linkedSignal, output, untracked, viewChild} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR, NonNullableFormBuilder, ReactiveFormsModule} from '@angular/forms';\nimport {noop} from 'rxjs';\nimport {FocusMonitor, FocusOrigin} from '@angular/cdk/a11y';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {UUID} from '@scion/toolkit/uuid';\nimport {TextPipe} from '../text/text.pipe';\nimport {IconComponent} from '../icon/icon.component';\n\n/**\n * Provides a filter control.\n */\n@Component({\n  selector: 'wb-filter-field',\n  templateUrl: './filter-field.component.html',\n  styleUrls: ['./filter-field.component.scss'],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  imports: [\n    ReactiveFormsModule,\n    TextPipe,\n    IconComponent,\n  ],\n  providers: [\n    {provide: NG_VALUE_ACCESSOR, multi: true, useExisting: forwardRef(() => FilterFieldComponent)},\n  ],\n})\nexport class FilterFieldComponent implements ControlValueAccessor {\n\n  /**\n   * Sets focus order in sequential keyboard navigation.\n   * If not specified, the focus order is according to the position in the document (tabindex=0).\n   */\n  public readonly tabindex = input<number>();\n\n  /**\n   * Specifies the hint displayed when this field is empty.\n   */\n  public readonly placeholder = input<string>();\n  public readonly disabled = input(false, {transform: booleanAttribute});\n\n  /**\n   * Emits on filter change.\n   */\n  public readonly filter = output<string>();\n\n  private readonly _host = inject(ElementRef).nativeElement as HTMLElement;\n  private readonly _focusManager = inject(FocusMonitor);\n  private readonly _cd = inject(ChangeDetectorRef);\n  private readonly _inputElement = viewChild.required<ElementRef<HTMLInputElement>>('input');\n  private readonly _disabled = linkedSignal(() => this.disabled());\n\n  protected readonly id = UUID.randomUUID();\n  protected readonly formControl = inject(NonNullableFormBuilder).control('', {updateOn: 'change'});\n\n  private _cvaChangeFn: (value: string) => void = noop;\n  private _cvaTouchedFn: () => void = noop;\n\n  @HostBinding('attr.tabindex')\n  protected componentTabindex = -1; // component is not focusable in sequential keyboard navigation, but tabindex (if any) is installed on input field\n\n  @HostBinding('class.empty')\n  protected get empty(): boolean {\n    return !this.formControl.value;\n  }\n\n  constructor() {\n    this.formControl.valueChanges\n      .pipe(takeUntilDestroyed())\n      .subscribe(value => {\n        this._cvaChangeFn(value);\n        this.filter.emit(value);\n      });\n\n    this._focusManager.monitor(this._host, true)\n      .pipe(takeUntilDestroyed())\n      .subscribe((focusOrigin: FocusOrigin) => {\n        if (!focusOrigin) {\n          this._cvaTouchedFn(); // triggers form field validation and signals a blur event\n        }\n      });\n\n    effect(() => {\n      const disabled = this._disabled();\n      // Prevent value emission when changing form control enabled state.\n      untracked(() => disabled ? this.formControl.disable({emitEvent: false}) : this.formControl.enable({emitEvent: false}));\n    });\n\n    inject(DestroyRef).onDestroy(() => this._focusManager.stopMonitoring(this._host));\n  }\n\n  @HostListener('focus')\n  public focus(): void {\n    this._inputElement().nativeElement.focus();\n  }\n\n  protected onClear(): void {\n    this.formControl.setValue('');\n    this.focus(); // restore the focus\n  }\n\n  /**\n   * Method implemented as part of `ControlValueAccessor` to work with Angular forms API\n   * @docs-private\n   */\n  public registerOnChange(fn: (value: string) => void): void {\n    this._cvaChangeFn = fn;\n  }\n\n  /**\n   * Method implemented as part of `ControlValueAccessor` to work with Angular forms API\n   * @docs-private\n   */\n  public registerOnTouched(fn: () => void): void {\n    this._cvaTouchedFn = fn;\n  }\n\n  /**\n   * Method implemented as part of `ControlValueAccessor` to work with Angular forms API\n   * @docs-private\n   */\n  public setDisabledState(isDisabled: boolean): void {\n    this._disabled.set(isDisabled);\n  }\n\n  /**\n   * Method implemented as part of `ControlValueAccessor` to work with Angular forms API\n   * @docs-private\n   */\n  public writeValue(value: string | null | undefined): void {\n    this.formControl.setValue(value ?? '', {emitEvent: false});\n    this._cd.markForCheck();\n  }\n}\n","<label [for]=\"id\" class=\"filter-icon\">\n  <wb-icon icon=\"workbench.search\"/>\n</label>\n<input #input\n       [attr.id]=\"id\"\n       autocomplete=\"off\"\n       [formControl]=\"formControl\"\n       [tabindex]=\"tabindex() ?? 0\"\n       [placeholder]=\"placeholder() ?? ''\">\n<button class=\"clear\" tabindex=\"-1\" (click)=\"onClear()\" [title]=\"('%workbench.clear.tooltip' | wbText)()\">\n  <wb-icon icon=\"workbench.clear\"/>\n</button>\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 {Component, inject} from '@angular/core';\nimport {WorkbenchView} from '../../view/workbench-view.model';\nimport {TextPipe} from '../../text/text.pipe';\nimport {IconComponent} from '../../icon/icon.component';\n\n@Component({\n  selector: 'wb-view-tab-content',\n  templateUrl: './view-tab-content.component.html',\n  styleUrls: ['./view-tab-content.component.scss'],\n  imports: [\n    TextPipe,\n    IconComponent,\n  ],\n})\nexport class ViewTabContentComponent {\n\n  protected readonly view = inject(WorkbenchView);\n}\n","@if (view.dirty()) {\n  <wb-icon icon=\"workbench.dirty\" class=\"dirty e2e-dirty\"/>\n}\n\n<span class=\"title e2e-title\">\n  {{(view.title() | wbText)()}}\n</span>\n\n@if (view.heading()) {\n  <span class=\"heading e2e-heading\">\n    {{(view.heading() | wbText)()}}\n  </span>\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 {ChangeDetectionStrategy, Component, computed, inject, Injector, input, Signal} from '@angular/core';\nimport {CdkPortalOutlet, ComponentPortal} from '@angular/cdk/portal';\nimport {WORKBENCH_VIEW_REGISTRY} from '../../view/workbench-view.registry';\nimport {ViewTabContentComponent} from '../view-tab-content/view-tab-content.component';\nimport {WorkbenchConfig} from '../../workbench-config';\nimport {ViewId, WorkbenchView} from '../../view/workbench-view.model';\nimport {VIEW_TAB_RENDERING_CONTEXT, ViewTabRenderingContext} from '../../workbench.constants';\nimport {TextPipe} from '../../text/text.pipe';\nimport {IconComponent} from '../../icon/icon.component';\n\n@Component({\n  selector: 'wb-view-list-item',\n  templateUrl: './view-list-item.component.html',\n  styleUrls: ['./view-list-item.component.scss'],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  imports: [\n    CdkPortalOutlet,\n    TextPipe,\n    IconComponent,\n  ],\n  host: {\n    '[class.active]': 'view().active()',\n    '[attr.data-viewid]': 'view().id',\n  },\n})\nexport class ViewListItemComponent {\n\n  public readonly viewId = input.required<ViewId>();\n\n  private readonly _viewRegistry = inject(WORKBENCH_VIEW_REGISTRY);\n\n  protected view = computed(() => this._viewRegistry.get(this.viewId()));\n  protected viewTabContentPortal = this.computeViewTabContentPortal();\n\n  protected onClose(): void {\n    void this.view().close();\n  }\n\n  private computeViewTabContentPortal(): Signal<ComponentPortal<unknown>> {\n    const injector = inject(Injector);\n    const workbenchConfig = inject(WorkbenchConfig);\n\n    return computed(() => {\n      const componentType = workbenchConfig.viewTabComponent ?? ViewTabContentComponent;\n      return new ComponentPortal(componentType, null, Injector.create({\n        parent: injector,\n        providers: [\n          {provide: WorkbenchView, useValue: this.view()},\n          {provide: VIEW_TAB_RENDERING_CONTEXT, useValue: 'list-item' satisfies ViewTabRenderingContext},\n        ],\n      }));\n    });\n  }\n}\n","<div class=\"content\">\n  <ng-container *cdkPortalOutlet=\"viewTabContentPortal()\"/>\n</div>\n\n@if (view().closable()) {\n  <button (click)=\"onClose()\"\n          [title]=\"('%workbench.close.tooltip' | wbText)()\"\n          [disabled]=\"!view().isClosable()\"\n          class=\"close e2e-close\">\n    <wb-icon icon=\"workbench.close\"/>\n  </button>\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 {ChangeDetectionStrategy, Component, computed, effect, HostBinding, HostListener, inject, Signal, viewChild} from '@angular/core';\nimport {OverlayRef} from '@angular/cdk/overlay';\nimport {WORKBENCH_VIEW_REGISTRY} from '../../view/workbench-view.registry';\nimport {ViewId, WorkbenchView} from '../../view/workbench-view.model';\nimport {NonNullableFormBuilder, ReactiveFormsModule} from '@angular/forms';\nimport {FilterFieldComponent} from '../../filter-field/filter-field.component';\nimport {PartId, WorkbenchPart} from '../workbench-part.model';\nimport {SciViewportComponent} from '@scion/components/viewport';\nimport {ViewListItemComponent} from '../view-list-item/view-list-item.component';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {text} from '../../text/text';\n\n@Component({\n  selector: 'wb-view-list',\n  templateUrl: './view-list.component.html',\n  styleUrls: ['./view-list.component.scss'],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  imports: [\n    ReactiveFormsModule,\n    FilterFieldComponent,\n    ViewListItemComponent,\n    SciViewportComponent,\n  ],\n})\nexport class ViewListComponent {\n\n  private readonly _filterFieldComponent = viewChild.required(FilterFieldComponent);\n  private readonly _part = inject(WorkbenchPart);\n  private readonly _overlayRef = inject(OverlayRef);\n\n  /** Views that are scrolled into the tab bar. */\n  protected readonly viewsInsideTabbar: Signal<WorkbenchView[]>;\n  /** Views that are scrolled out of the tab bar. */\n  protected readonly viewsOutsideTabbar: Signal<WorkbenchView[]>;\n  protected readonly filterFormControl = inject(NonNullableFormBuilder).control('');\n\n  @HostBinding('attr.data-partid')\n  protected get partId(): PartId {\n    return this._part.id;\n  }\n\n  constructor() {\n    const filterText = toSignal(this.filterFormControl.valueChanges, {initialValue: this.filterFormControl.value});\n    const views = this._part.viewIds().map(viewId => new FilterableView(viewId));\n\n    this.viewsInsideTabbar = computed(() => views\n      .filter(view => view.ref.scrolledIntoView())\n      .filter(view => view.matches(filterText()))\n      .map(view => view.ref),\n    );\n    this.viewsOutsideTabbar = computed(() => views\n      .filter(view => !view.ref.scrolledIntoView())\n      .filter(view => view.matches(filterText()))\n      .map(view => view.ref),\n    );\n\n    const effectRef = effect(() => {\n      this._filterFieldComponent().focus();\n      effectRef.destroy();\n    });\n  }\n\n  protected onActivateView(view: WorkbenchView): void {\n    void view.activate();\n    this._overlayRef.dispose();\n  }\n\n  @HostListener('document:keydown.escape')\n  protected onEscape(): void {\n    this._overlayRef.dispose();\n  }\n\n  @HostListener('mousedown', ['$event'])\n  @HostListener('sci-microfrontend-focusin', ['$event'])\n  protected onHostCloseEvent(event: Event): void {\n    event.stopPropagation(); // Prevent closing this overlay if emitted from a child of this overlay.\n  }\n\n  @HostListener('document:mousedown')\n  @HostListener('document:sci-microfrontend-focusin')\n  protected onDocumentCloseEvent(): void {\n    this._overlayRef.dispose();\n  }\n}\n\n/**\n * Creates a regular expression of the given filter text.\n */\nfunction toFilterRegExp(filterText: string): RegExp {\n  // Escape the user input\n  const escapedString = filterText.replace(/[-[\\]/{}()*+?.\\\\^$|]/g, '\\\\$&');\n  return new RegExp(escapedString, 'i');\n}\n\n/**\n * Represents a {@link WorkbenchView} that can be filtered by its translated title and heading.\n */\nclass FilterableView {\n\n  public readonly ref: WorkbenchView;\n  private readonly _title: Signal<string | null>;\n  private readonly _heading: Signal<string | null>;\n\n  constructor(public readonly viewId: ViewId) {\n    this.ref = inject(WORKBENCH_VIEW_REGISTRY).get(viewId);\n    this._title = text(this.ref.title);\n    this._heading = text(this.ref.heading);\n  }\n\n  /**\n   * Checks if this view matches the specified filter text.\n   */\n  public matches(filterText: string): boolean {\n    const viewText = `${this._title() ?? ''} ${this._heading() ?? ''}`;\n    return !filterText || !!viewText.match(toFilterRegExp(filterText));\n  }\n}\n","<wb-filter-field [formControl]=\"filterFormControl\"/>\n\n@if (viewsOutsideTabbar().length || viewsInsideTabbar().length) {\n  <sci-viewport>\n    @for (view of viewsOutsideTabbar(); track view.id) {\n      <wb-view-list-item [viewId]=\"view.id\" (click)=\"onActivateView(view)\"/>\n    }\n    @if (viewsOutsideTabbar().length && viewsInsideTabbar().length) {\n      <hr>\n    }\n    @for (view of viewsInsideTabbar(); track view.id) {\n      <wb-view-list-item [viewId]=\"view.id\" (click)=\"onActivateView(view)\"/>\n    }\n  </sci-viewport>\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 {Component, computed, DestroyRef, ElementRef, HostListener, inject, Injector, signal, Signal} from '@angular/core';\nimport {ConnectedPosition, Overlay, OverlayConfig, OverlayRef} from '@angular/cdk/overlay';\nimport {ComponentPortal} from '@angular/cdk/portal';\nimport {ViewListComponent} from '../view-list/view-list.component';\nimport {WorkbenchPart} from '../workbench-part.model';\nimport {WORKBENCH_VIEW_REGISTRY} from '../../view/workbench-view.registry';\nimport {IconComponent} from '../../icon/icon.component';\n\n@Component({\n  selector: 'wb-view-list-button',\n  templateUrl: './view-list-button.component.html',\n  styleUrls: ['./view-list-button.component.scss'],\n  host: {\n    '[class.menu-open]': `menuState() === 'open'`,\n    '[attr.tabindex]': '0',\n  },\n  imports: [\n    IconComponent,\n  ],\n})\nexport class ViewListButtonComponent {\n\n  private static readonly SOUTH: ConnectedPosition = {originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top', panelClass: 'wb-south'};\n  private static readonly NORTH: ConnectedPosition = {originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom', panelClass: 'wb-north'};\n\n  private readonly _host = inject(ElementRef);\n  private readonly _overlay = inject(Overlay);\n  private readonly _injector = inject(Injector);\n  private readonly _destroyRef = inject(DestroyRef);\n\n  /** Number of views that are scrolled out of the tab bar. */\n  protected readonly scrolledOutOfViewTabCount: Signal<number>;\n  protected readonly menuState = signal<'open' | 'closed'>('closed');\n\n  constructor() {\n    const part = inject(WorkbenchPart);\n    const viewRegistry = inject(WORKBENCH_VIEW_REGISTRY);\n    this.scrolledOutOfViewTabCount = computed(() => part.viewIds()\n      .map(viewId => viewRegistry.get(viewId))\n      .reduce((count, view) => view.scrolledIntoView() ? count : count + 1, 0));\n  }\n\n  @HostListener('click')\n  @HostListener('keydown.enter')\n  @HostListener('keydown.space')\n  protected onClick(): void {\n    this.menuState.set('open');\n    void this.openMenu().finally(() => this.menuState.set('closed'));\n  }\n\n  private openMenu(): Promise<void> {\n    const positionStrategy = this._overlay.position()\n      .flexibleConnectedTo(this._host)\n      .withFlexibleDimensions(false)\n      .withPositions([ViewListButtonComponent.SOUTH, ViewListButtonComponent.NORTH]);\n\n    const overlayRef = this._overlay.create(new OverlayConfig({\n      scrollStrategy: this._overlay.scrollStrategies.noop(),\n      disposeOnNavigation: true,\n      panelClass: 'wb-view-list-menu',\n      positionStrategy,\n    }));\n\n    const componentRef = overlayRef.attach(new ComponentPortal(ViewListComponent, null, Injector.create({\n      parent: this._injector,\n      providers: [{provide: OverlayRef, useValue: overlayRef}],\n    })));\n\n    this._destroyRef.onDestroy(() => overlayRef.dispose());\n    return new Promise<void>(resolve => componentRef.onDestroy(resolve));\n  }\n}\n","<wb-icon icon=\"workbench.menu_down\" class=\"menu-down\"/>\n@if (scrolledOutOfViewTabCount(); as count) {\n  <span class=\"count e2e-hidden-tab-count\">{{count}}</span>\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 {Component, computed, ElementRef, HostListener, inject, Injector, input, Signal} from '@angular/core';\nimport {WORKBENCH_VIEW_REGISTRY} from '../../view/workbench-view.registry';\nimport {VIEW_DRAG_TRANSFER_TYPE, ViewDragService} from '../../view-dnd/view-drag.service';\nimport {createElement} from '../../common/dom.util';\nimport {CdkPortalOutlet, ComponentPortal} from '@angular/cdk/portal';\nimport {VIEW_TAB_RENDERING_CONTEXT, ViewTabRenderingContext} from '../../workbench.constants';\nimport {WorkbenchConfig} from '../../workbench-config';\nimport {ViewTabContentComponent} from '../view-tab-content/view-tab-content.component';\nimport {ViewMenuService} from '../view-context-menu/view-menu.service';\nimport {ViewId, WorkbenchView} from '../../view/workbench-view.model';\nimport {WORKBENCH_ID} from '../../workbench-id';\nimport {boundingClientRect} from '@scion/components/dimension';\nimport {UUID} from '@scion/toolkit/uuid';\nimport {synchronizeCssClasses} from '../../common/css-class.util';\nimport {TextPipe} from '../../text/text.pipe';\nimport {IconComponent} from '../../icon/icon.component';\nimport {WorkbenchLayoutService} from '../../layout/workbench-layout.service';\n\n/**\n * IMPORTANT: HTML and CSS also used by {@link ViewTabDragImageComponent}.\n *\n * @see ViewTabDragImageComponent\n */\n@Component({\n  selector: 'wb-view-tab',\n  templateUrl: './view-tab.component.html',\n  styleUrls: ['./view-tab.component.scss'],\n  imports: [\n    CdkPortalOutlet,\n    TextPipe,\n    IconComponent,\n  ],\n  host: {\n    '[class.view-drag]': 'viewDragService.dragging()',\n    '[class.active]': 'view().active()',\n    '[class.part-active]': 'view().part().active()',\n    '[class.e2e-dirty]': 'view().dirty()',\n    '[attr.data-viewid]': 'view().id',\n    '[attr.draggable]': 'true',\n    '[attr.tabindex]': '-1', // make the view focusable to install view menu accelerators\n    '[style.--sci-workbench-tab-title-offset-right]': 'viewTitleOffsetRight()',\n  },\n})\nexport class ViewTabComponent {\n\n  private readonly _workbenchId = inject(WORKBENCH_ID);\n  private readonly _workbenchConfig = inject(WorkbenchConfig);\n  private readonly _viewRegistry = inject(WORKBENCH_VIEW_REGISTRY);\n  private readonly _viewMenuService = inject(ViewMenuService);\n  private readonly _layout = inject(WorkbenchLayoutService).layout;\n  private readonly _injector = inject(Injector);\n\n  public readonly host = inject(ElementRef).nativeElement as HTMLElement;\n  public readonly view = input.required({alias: 'viewId', transform: (viewId: ViewId) => this._viewRegistry.get(viewId)});\n  public readonly boundingClientRect = boundingClientRect(inject(ElementRef));\n\n  protected readonly viewTabContentPortal: Signal<ComponentPortal<unknown>>;\n  protected readonly viewDragService = inject(ViewDragService);\n  protected readonly viewTitleOffsetRight = computed(() => this.view().closable() ? '1.5rem' : undefined); // offset for the title to not overlap the close button\n\n  constructor() {\n    this.addHostCssClasses();\n    this.installMenuAccelerators();\n    this.viewTabContentPortal = this.createViewTabContentPortal();\n  }\n\n  @HostListener('click')\n  protected onClick(): void {\n    void this.view().activate();\n  }\n\n  protected onClose(event: MouseEvent): void {\n    event.stopPropagation(); // prevent the view from being activated\n\n    if (event.altKey) {\n      void this.view().close('other-views');\n    }\n    else {\n      void this.view().close();\n    }\n  }\n\n  @HostListener('mousedown', ['$event'])\n  protected onMousedown(event: MouseEvent): void {\n    if (event.buttons === AUXILARY_MOUSE_BUTTON) {\n      void this.view().close();\n      event.stopPropagation();\n      event.preventDefault();\n    }\n  }\n\n  @HostListener('contextmenu', ['$event'])\n  protected onContextmenu(event: MouseEvent): void {\n    void this._viewMenuService.showMenu({x: event.clientX, y: event.clientY}, this.view().id);\n    event.stopPropagation();\n    event.preventDefault();\n  }\n\n  @HostListener('dragstart', ['$event'])\n  protected onDragStart(event: DragEvent): void {\n    if (!event.dataTransfer) {\n      return;\n    }\n\n    const view = this.view();\n    event.dataTransfer.effectAllowed = 'move';\n    event.dataTransfer.setData(VIEW_DRAG_TRANSFER_TYPE, view.id);\n    // Use an invisible <div> as the native drag image because the workbench renders the drag image in {@link ViewTabDragImageRenderer}.\n    event.dataTransfer.setDragImage(createElement('div', {style: {display: 'none'}}), 0, 0);\n\n    this.viewDragService.setViewDragData({\n      uid: UUID.randomUUID(),\n      viewId: view.id,\n      viewTitle: view.title(),\n      viewHeading: view.heading(),\n      viewDirty: view.dirty(),\n      viewClosable: view.isClosable() || (view.closable() ? 'disabled' : false),\n      navigation: view.navigation() && {\n        path: view.navigation()!.path,\n        hint: view.navigation()!.hint,\n        data: view.navigation()!.data,\n      },\n      alternativeViewId: view.alternativeId,\n      partId: view.part().id,\n      viewTabPointerOffsetX: event.offsetX,\n      viewTabPointerOffsetY: event.offsetY,\n      viewTabWidth: this.host.getBoundingClientRect().width,\n      viewTabHeight: this.host.getBoundingClientRect().height,\n      viewTitleOffsetRight: this.viewTitleOffsetRight(),\n      workbenchId: this._workbenchId,\n      classList: view.classList.asMap(),\n      activityId: this._layout().activity({viewId: view.id}, {orElse: null})?.id,\n    });\n\n    if (!view.active()) {\n      void view.activate();\n    }\n  }\n\n  @HostListener('dragend')\n  protected onDragEnd(): void {\n    this.viewDragService.unsetViewDragData();\n  }\n\n  private addHostCssClasses(): void {\n    const host = inject(ElementRef).nativeElement as HTMLElement;\n    synchronizeCssClasses(host, computed(() => this.view().classList.asList()));\n  }\n\n  private installMenuAccelerators(): void {\n    this._viewMenuService.installMenuAccelerators(this.host, this.view);\n  }\n\n  private createViewTabContentPortal(): Signal<ComponentPortal<unknown>> {\n    return computed(() => {\n      const componentType = this._workbenchConfig.viewTabComponent ?? ViewTabContentComponent;\n      return new ComponentPortal(componentType, null, Injector.create({\n        parent: this._injector,\n        providers: [\n          {provide: WorkbenchView, useValue: this.view()},\n          {provide: VIEW_TAB_RENDERING_CONTEXT, useValue: 'tab' satisfies ViewTabRenderingContext},\n        ],\n      }));\n    });\n  }\n}\n\n/**\n * Indicates that the auxilary mouse button is pressed (usually the mouse wheel button or middle button).\n */\nconst AUXILARY_MOUSE_BUTTON = 4;\n","<!-- IMPORTANT: THIS HTML FILE IS ALSO USED BY `ViewTabDragImageComponent` -->\n\n@if (view().active()) {\n  <div class=\"corner-radius start\">\n    <div class=\"circle\"></div>\n  </div>\n}\n\n<div class=\"content\">\n  <ng-container *cdkPortalOutlet=\"viewTabContentPortal()\"/>\n</div>\n\n@if (view().active()) {\n  <div class=\"corner-radius end\">\n    <div class=\"circle\"></div>\n  </div>\n}\n\n@if (view().closable()) {\n  <button (click)=\"onClose($event)\"\n          [title]=\"('%workbench.close_tab.tooltip;close_others_modifier=Alt' | wbText)()\"\n          [disabled]=\"!view().isClosable()\"\n          class=\"close e2e-close\">\n    <wb-icon icon=\"workbench.close\"/>\n  </button>\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 {Component, computed, DOCUMENT, inject, Injector, NgZone, signal, Signal, untracked} from '@angular/core';\nimport {ViewDragService} from '../../view-dnd/view-drag.service';\nimport {CdkPortalOutlet, ComponentPortal} from '@angular/cdk/portal';\nimport {WorkbenchConfig} from '../../workbench-config';\nimport {ViewTabContentComponent} from '../view-tab-content/view-tab-content.component';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {WorkbenchView} from '../../view/workbench-view.model';\nimport {subscribeIn} from '@scion/toolkit/operators';\nimport {distinctUntilChanged, map} from 'rxjs/operators';\nimport {WORKBENCH_PART_REGISTRY} from '../workbench-part.registry';\nimport {IconComponent} from '../../icon/icon.component';\nimport {TextPipe} from '../../text/text.pipe';\nimport {PartId} from '../workbench-part.model';\n\n/**\n * @see ViewTabComponent\n */\n@Component({\n  selector: 'wb-view-tab-drag-image',\n  templateUrl: '../view-tab/view-tab.component.html',\n  styleUrls: [\n    '../view-tab/view-tab.component.scss',\n    './view-tab-drag-image.partial.component.scss',\n  ],\n  imports: [\n    CdkPortalOutlet,\n    TextPipe,\n    IconComponent,\n  ],\n  host: {\n    '[class.view-drag]': 'true',\n    '[class.active]': 'true',\n    '[class.can-drop]': 'canDrop()',\n    '[class.drag-over-tabbar]': 'isDragOverTabbar()',\n    '[class.drag-over-peripheral-tabbar]': 'isDragOverPeripheralTabbar()',\n  },\n})\nexport class ViewTabDragImageComponent {\n\n  protected readonly view = signal(inject(WorkbenchView)).asReadonly();\n  protected readonly viewTabContentPortal = signal(createViewTabContentPortal()).asReadonly();\n\n  /**\n   * Indicates if dragging this view tab over a tabbar.\n   */\n  protected readonly isDragOverTabbar = this.computeDragOverTabbar();\n\n  /**\n   * Indicates if dragging this view tab over a tabbar located in the peripheral area.\n   */\n  protected readonly isDragOverPeripheralTabbar = this.computeDragOverPeripheralTabbar();\n\n  /**\n   * Indicates if dragging this view tab over a valid drop target.\n   */\n  protected readonly canDrop = this.computeCanDrop();\n\n  protected onClose(..._: unknown[]): void {\n    throw Error('[UnsupportedOperationError]');\n  }\n\n  /**\n   * Computes if dragging this view tab over a tabbar.\n   */\n  private computeDragOverTabbar(): Signal<PartId | false> {\n    return toSignal(inject(ViewDragService).tabbarDragOver$, {requireSync: true});\n  }\n\n  /**\n   * Computes if dragging this view tab over a tabbar located in the peripheral area.\n   */\n  private computeDragOverPeripheralTabbar(): Signal<boolean> {\n    const partRegistry = inject(WORKBENCH_PART_REGISTRY);\n    return computed(() => {\n      const partId = this.isDragOverTabbar();\n      return untracked(() => partId && partRegistry.get(partId).peripheral());\n    });\n  }\n\n  /**\n   * Computes if dragging this view tab over a valid drop target.\n   */\n  private computeCanDrop(): Signal<boolean> {\n    const documentRoot = inject(DOCUMENT).documentElement;\n    const zone = inject(NgZone);\n    const canDrop$ = inject(ViewDragService).viewDrag$(documentRoot, {eventType: 'dragover'})\n      .pipe(\n        subscribeIn(fn => zone.runOutsideAngular(fn)),\n        map(event => event.defaultPrevented),\n        distinctUntilChanged(),\n      );\n    return toSignal(canDrop$, {initialValue: false});\n  }\n}\n\nfunction createViewTabContentPortal(): ComponentPortal<unknown> {\n  const componentType = inject(WorkbenchConfig).viewTabComponent ?? ViewTabContentComponent;\n  return new ComponentPortal(componentType, null, inject(Injector));\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 {ApplicationRef, computed, inject, Injectable, Injector, NgZone, signal, Signal} from '@angular/core';\nimport {take} from 'rxjs/operators';\nimport {createElement, setStyle} from '../common/dom.util';\nimport {ViewDragData, ViewDragService} from './view-drag.service';\nimport {ComponentPortal, DomPortalOutlet} from '@angular/cdk/portal';\nimport {subscribeIn} from '@scion/toolkit/operators';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {ViewTabDragImageComponent} from '../part/view-tab-drag-image/view-tab-drag-image.component';\nimport {UrlSegment} from '@angular/router';\nimport {CanCloseFn, CanCloseRef, WorkbenchMenuItem} from '../workbench.model';\nimport {ViewId, WorkbenchView, WorkbenchViewNavigation} from '../view/workbench-view.model';\nimport {VIEW_TAB_RENDERING_CONTEXT, ViewTabRenderingContext} from '../workbench.constants';\nimport {WorkbenchPart} from '../part/workbench-part.model';\nimport {Disposable} from '../common/disposable';\nimport {NavigationData, NavigationState} from '../routing/routing.model';\nimport {throwError} from '../common/throw-error.util';\nimport {UUID} from '@scion/toolkit/uuid';\nimport {Translatable} from '../text/workbench-text-provider.model';\n\nexport type ConstrainFn = (rect: DOMRect) => DOMRect;\n\n/**\n * Renders a drag image during a view drag operation.\n *\n * Unlike when using the native drag image support, it allows controlling the drag image position and its size during the drag operation.\n * For instance, allows snapping the view tab into the view tab bar (drop zone) when being dragged over.\n */\n@Injectable({providedIn: 'root'})\nexport class ViewTabDragImageRenderer {\n\n  private readonly _viewDragService = inject(ViewDragService);\n  private readonly _applicationRef = inject(ApplicationRef);\n  private readonly _injector = inject(Injector);\n  private readonly _zone = inject(NgZone);\n\n  private _viewDragImagePortalOutlet: DomPortalOutlet | null = null;\n  private _constrainDragImageRectFn: ConstrainFn | null = null;\n\n  constructor() {\n    this.installWindowViewDragListener();\n  }\n\n  /**\n   * Allows to constrain the position and dimension of the drag image during a view drag operation.\n   */\n  public setConstrainDragImageRectFn(fn: ConstrainFn): void {\n    this._constrainDragImageRectFn = fn;\n  }\n\n  /**\n   * Unsets the drag image constrain function, if registered.\n   */\n  public unsetConstrainDragImageRectFn(fn: ConstrainFn): void {\n    if (fn === this._constrainDragImageRectFn) {\n      this._constrainDragImageRectFn = null;\n    }\n  }\n\n  private onWindowDragStart(event: DragEvent): void {\n    this.createDragImage(event);\n  }\n\n  private onWindowDragEnd(): void {\n    this.disposeDragImage();\n  }\n\n  /**\n   * Method invoked when dragging a view into the current window. It is invoked outside the Angular zone.\n   *\n   * If the user starts the drag operation in the current window, this method is invoked immediately,\n   * or when dragging the view tab into this window if started the drag operation in another window.\n   */\n  private onWindowDragEnter(event: DragEvent): void {\n    this.createDragImage(event);\n  }\n\n  /**\n   * Method invoked while dragging a view over the current window. It is invoked outside the Angular zone.\n   */\n  private onWindowDragOver(event: DragEvent): void {\n    const dragPosition = this.calculateDragImageRect(this._viewDragService.viewDragData()!, event);\n\n    // update the drag image position\n    setStyle(this._viewDragImagePortalOutlet!.outletElement as HTMLElement, {\n      left: `${dragPosition.x}px`,\n      top: `${dragPosition.y}px`,\n      height: `${dragPosition.height}px`,\n    });\n  }\n\n  /**\n   * Method invoked when the drag operation ends for the current window, which is when the user drags the view tab outside of\n   * the current window or when the user cancels the drag operation (e.g., by pressing the escape key).\n   */\n  private onWindowDragLeave(): void {\n    this.disposeDragImage();\n  }\n\n  /**\n   * Method invoked when the drag operation ends for the current window which is when the user drops the view.\n   */\n  private onWindowDrop(): void {\n    // Wait for the zone to stabilize before disposing the tab drag image. Otherwise, the tabbar would flicker\n    // because the tab has not yet been rendered at its new position.\n    this._zone.onStable\n      .pipe(take(1))\n      .subscribe(() => {\n        this.disposeDragImage();\n      });\n  }\n\n  private createDragImage(event: DragEvent): void {\n    if (this._viewDragImagePortalOutlet) {\n      return;\n    }\n\n    const dragData = this._viewDragService.viewDragData()!;\n    const dragPosition = this.calculateDragImageRect(dragData, event);\n\n    // create the drag image\n    const outletElement = createElement('div', {\n      parent: document.body,\n      cssClass: 'wb-view-tab-drag-image',\n      style: {\n        left: `${dragPosition.x}px`,\n        top: `${dragPosition.y}px`,\n        width: `${dragPosition.width}px`,\n        height: `${dragPosition.height}px`,\n        '--sci-workbench-tab-title-offset-right': dragData.viewTitleOffsetRight,\n      },\n    });\n    this._viewDragImagePortalOutlet = new DomPortalOutlet(outletElement, this._applicationRef, this._injector);\n    const componentRef = this._viewDragImagePortalOutlet.attachComponentPortal(new ComponentPortal(ViewTabDragImageComponent, null, Injector.create({\n      parent: this._injector,\n      providers: [\n        {provide: WorkbenchView, useValue: new DragImageWorkbenchView(dragData)},\n        {provide: VIEW_TAB_RENDERING_CONTEXT, useValue: 'drag-image' satisfies ViewTabRenderingContext},\n      ],\n    })));\n    // Detect for changes because constructed outside of Angular.\n    componentRef.changeDetectorRef.detectChanges();\n  }\n\n  private disposeDragImage(): void {\n    this._viewDragImagePortalOutlet?.dispose();\n    this._viewDragImagePortalOutlet = null;\n  }\n\n  /**\n   * Calculates client position and dimension for the drag image, accounting for any constraints.\n   */\n  public calculateDragImageRect(dragData: ViewDragData, event: DragEvent): DOMRect {\n    const rect = new DOMRect(\n      event.clientX - dragData.viewTabPointerOffsetX,\n      event.clientY - dragData.viewTabPointerOffsetY,\n      dragData.viewTabWidth,\n      dragData.viewTabHeight,\n    );\n    return this._constrainDragImageRectFn ? this._constrainDragImageRectFn(rect) : rect;\n  }\n\n  private installWindowViewDragListener(): void {\n    this._viewDragService.viewDrag$(window)\n      .pipe(\n        subscribeIn(fn => this._zone.runOutsideAngular(fn)),\n        takeUntilDestroyed(),\n      )\n      .subscribe((event: DragEvent) => {\n        switch (event.type) {\n          case 'dragstart':\n            this.onWindowDragStart(event);\n            break;\n          case 'dragenter':\n            this.onWindowDragEnter(event);\n            break;\n          case 'dragover':\n            this.onWindowDragOver(event);\n            break;\n          case 'dragleave':\n            this.onWindowDragLeave();\n            break;\n          case 'drop':\n            this.onWindowDrop();\n            break;\n          case 'dragend':\n            this.onWindowDragEnd();\n            break;\n        }\n      });\n  }\n}\n\nclass DragImageWorkbenchView implements WorkbenchView {\n\n  public readonly id: ViewId;\n  public readonly alternativeId: string | undefined;\n  public readonly navigation: Signal<WorkbenchViewNavigation | undefined>;\n  public readonly navigationHint: Signal<string | undefined>;\n  public readonly navigationData: Signal<NavigationData>;\n  public readonly navigationState: Signal<NavigationState>;\n  public readonly part: Signal<WorkbenchPart>;\n  public readonly title: Signal<Translatable | null>;\n  public readonly heading: Signal<Translatable | null>;\n  public readonly dirty: Signal<boolean>;\n  public readonly closable: Signal<boolean>;\n  public readonly destroyed = false;\n  public readonly active = signal(true).asReadonly();\n  public readonly blocked = false;\n  public readonly cssClass = signal([]).asReadonly();\n  public readonly urlSegments: Signal<UrlSegment[]>;\n  public readonly first = signal(true).asReadonly();\n  public readonly last = signal(true).asReadonly();\n  public readonly position = signal(0).asReadonly();\n  public readonly scrolledIntoView = signal(true).asReadonly();\n  public readonly menuItems = signal([]);\n  public readonly isClosable: Signal<boolean>;\n\n  constructor(dragData: ViewDragData) {\n    this.id = dragData.viewId;\n    this.alternativeId = dragData.alternativeViewId;\n    this.part = computed(() => throwError('UnsupportedOperationError'));\n    this.navigation = signal(dragData.navigation && {...dragData.navigation, id: UUID.randomUUID()});\n    this.navigationHint = computed(() => this.navigation()?.hint);\n    this.navigationData = computed(() => this.navigation()?.data ?? {});\n    this.navigationState = computed(() => this.navigation()?.state ?? {});\n    this.urlSegments = computed(() => this.navigation()?.path ?? []);\n    this.title = signal(dragData.viewTitle).asReadonly();\n    this.heading = signal(dragData.viewHeading).asReadonly();\n    this.dirty = signal(dragData.viewDirty).asReadonly();\n    this.closable = signal(dragData.viewClosable !== false).asReadonly();\n    this.isClosable = signal(dragData.viewClosable === true).asReadonly();\n  }\n\n  public close(): Promise<boolean> {\n    throw Error('[UnsupportedOperationError]');\n  }\n\n  public move(target: 'new-window' | string, options?: {region?: 'north' | 'south' | 'west' | 'east'; workbenchId?: string}): void {\n    throw Error('[UnsupportedOperationError]');\n  }\n\n  public registerMenuItem(menuItem: WorkbenchMenuItem): Disposable {\n    throw Error('[UnsupportedOperationError]');\n  }\n\n  public activate(): Promise<boolean> {\n    throw Error('[UnsupportedOperationError]');\n  }\n\n  public canClose(canClose: CanCloseFn): CanCloseRef {\n    throw Error('[UnsupportedOperationError]');\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 {Component, computed, effect, ElementRef, inject, input, NgZone, OnDestroy, signal, untracked, viewChild, viewChildren} from '@angular/core';\nimport {ViewTabComponent} from '../view-tab/view-tab.component';\nimport {map, mergeMap, takeUntil} from 'rxjs/operators';\nimport {from, fromEvent, merge, Observable, OperatorFunction, Subject, timer} from 'rxjs';\nimport {ConstrainFn, ViewTabDragImageRenderer} from '../../view-dnd/view-tab-drag-image-renderer.service';\nimport {ViewDragData, ViewDragService, ViewMoveEvent} from '../../view-dnd/view-drag.service';\nimport {getCssTranslation, setCssClass, setCssVariable, unsetCssClass, unsetCssVariable} from '../../common/dom.util';\nimport {ɵWorkbenchPart} from '../ɵworkbench-part.model';\nimport {filterArray, subscribeIn} from '@scion/toolkit/operators';\nimport {SciViewportComponent} from '@scion/components/viewport';\nimport {ɵWorkbenchRouter} from '../../routing/ɵworkbench-router.service';\nimport {boundingClientRect, dimension} from '@scion/components/dimension';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {WORKBENCH_ID} from '../../workbench-id';\nimport {clamp} from '../../common/math.util';\nimport {PART_BAR_ELEMENT} from '../part-bar/part-bar.component';\n\n/**\n * Renders view tabs of a {@link WorkbenchPart}.\n *\n * Tabs are added to a viewport, which the user can scroll if not enough space. The viewport grows with its tabs,\n * allowing actions to be placed directly after the last tab or on the right side.\n *\n * ## Drag and Drop\n * This component subscribes to drag events to visualize tabs during a drag operation. The drag operation is initiated in {@link ViewTabComponent}.\n *\n * We use native drag and drop to support dragging views to other windows.\n *\n * Following events are triggered:\n * - dragstart: when start dragging a tab (only received in the tabbar where the drag operation has started)\n * - dragend:   when end dragging a tab, either via drop or cancel (only received in the tabbar where the drag operation has started)\n * - dragenter: when a tab enters the tabbar\n * - dragover:  when dragging a tab over the tabbar, every few hundred milliseconds\n * - dragleave: when a tab leaves the tabbar\n * - drop:      when the user drops a tab in the tabbar\n *\n * - Note that `dragleave` event is not fired on drop action. Therefore, always handle both events, `dragleave` and `drop` events, respectively.\n *\n * ## Terminology\n * - Drag source: Tab that is being dragged.\n * - Drop target: Tab before which to insert the drag source on drop, or `end` if dropping it after the last tab.\n * - Drag image:  Image for the tab to be dragged. We do not use the native drag image support to control drag image position and size,\n *                e.g., to snap the drag image to the tabbar when dragging near it.\n */\n@Component({\n  selector: 'wb-view-tab-bar',\n  templateUrl: './view-tab-bar.component.html',\n  styleUrls: ['./view-tab-bar.component.scss'],\n  imports: [\n    SciViewportComponent,\n    ViewTabComponent,\n  ],\n})\nexport class ViewTabBarComponent implements OnDestroy {\n\n  /**\n   * Defines the maximum available width for the tab bar, used to constrain the drag image to the tab bar bounds.\n   */\n  public readonly maxWidth = input.required<number>();\n\n  private readonly _host = inject(ElementRef).nativeElement as HTMLElement;\n  private readonly _partBarElement = inject(PART_BAR_ELEMENT);\n  private readonly _viewportChange$ = new Subject<void>();\n  private readonly _workbenchId = inject(WORKBENCH_ID);\n  private readonly _router = inject(ɵWorkbenchRouter);\n  private readonly _viewTabDragImageRenderer = inject(ViewTabDragImageRenderer);\n  private readonly _viewDragService = inject(ViewDragService);\n  private readonly _zone = inject(NgZone);\n  private readonly _viewTabs = viewChildren(ViewTabComponent);\n  private readonly _hostBoundingClientRect = boundingClientRect(inject(ElementRef));\n  private readonly _viewportComponent = viewChild.required(SciViewportComponent);\n  private readonly _viewportComponentElement = viewChild.required(SciViewportComponent, {read: ElementRef<HTMLElement>});\n  private readonly _tabCornerRadiusElement = viewChild.required('tab_corner_radius', {read: ElementRef<HTMLElement>});\n  private readonly _viewportBoundingBox = boundingClientRect(this._viewportComponentElement);\n  private readonly _canDrop = inject(ViewDragService).canDrop(inject(ɵWorkbenchPart));\n\n  /**\n   * Reference to the part.\n   */\n  protected readonly part = inject(ɵWorkbenchPart);\n\n  /**\n   * Reference to the tab before which to insert the drag source on drop, or `end` if dropping it after the last tab.\n   */\n  protected dropTargetViewTab = signal<ViewTabComponent | 'end' | null>(null);\n\n  /**\n   * Reference to the tab where the drag operation was started.\n   * This reference is only set if the drag operation started on a tab of this tabbar.\n   */\n  protected dragSourceViewTab = signal<ViewTabComponent | null>(null);\n\n  /**\n   * Transfer data of the tab being dragged over this tabbar.\n   */\n  private _dragData: ViewDragData | null = null;\n\n  /**\n   * Function for snapping the drag image to the tabbar when dragging near it.\n   */\n  private _constrainFn: ConstrainFn | null = null;\n\n  /**\n   * Signals when unsetting drag state.\n   */\n  private _onUnsetDragState = signal<void>(undefined, {equal: () => false});\n\n  /**\n   * Tabbar indents where to display the rounded bottom corners of the first and last view tab.\n   */\n  private _tabbarIndent = {\n    left: 0,\n    right: 0,\n  };\n\n  constructor() {\n    this.installActiveViewScroller();\n    this.installScrolledIntoViewUpdater();\n    this.installViewDragListener();\n    this.installTabbarIndentSizeTracker();\n    this.installViewportChangeTracker();\n  }\n\n  /**\n   * Method invoked when the user starts dragging a tab of this tabbar, only in the tabbar where the drag started.\n   */\n  private onTabDragStart(): void {\n    // Memoize drag data.\n    this._dragData = this._viewDragService.viewDragData()!;\n\n    // Indicate dragging over this tabbar.\n    this._viewDragService.signalTabbarDragEnter(this.part.id);\n\n    // Snap drag image to tabbar when dragging near it.\n    this._constrainFn = this.createDragImageConstrainFn();\n    this._viewTabDragImageRenderer.setConstrainDragImageRectFn(this._constrainFn);\n\n    // Disable pointer events to not break the drag operation (in Firefox, but not Chrome and Edge).\n    requestAnimationFrame(() => setCssClass(this._host, 'pointer-events-disabled'));\n\n    // Set CSS class to not animate start dragging.\n    setCssClass(this._host, 'on-drag-start');\n    this.onDragAnimationStable(() => unsetCssClass(this._host, 'on-drag-start'));\n\n    // Check if the user continues dragging over this tabbar.\n    // If not, the user has quickly dragged the tab out of the tabbar, so manually call `onTabbarDragEnter` and `onTabbarDragLeave`.\n    fromEvent<DragEvent>(window, 'dragenter', {once: true})\n      .pipe(takeUntil(merge(fromEvent(this._partBarElement, 'dragenter'), fromEvent(this._partBarElement, 'dragend'))))\n      .subscribe(event => {\n        this.onTabbarDragEnter(event);\n        this.onTabbarDragLeave(event);\n      });\n  }\n\n  /**\n   * Method invoked when the user ends dragging a tab of this tabbar, either by drop or cancel, only in the tabbar where the drag started.\n   */\n  private onTabDragEnd(event: DragEvent): void {\n    // Unset drag state only on cancel, not on drop, to prevent tabs from temporarily reverting to their pre-drag state. Drag state is reset in `onTabMoved` after a drop.\n    if (event.dataTransfer!.dropEffect === 'none') {\n      // Reactivate the drag source view on cancel.\n      void this.dragSourceViewTab()?.view().activate({skipLocationChange: true});\n      // Unset drag state.\n      this.unsetDragState();\n    }\n  }\n\n  /**\n   * Method invoked when the layout has changed after a drop. The drop may not be related to a tab of this tabbar.\n   */\n  private onTabMoved(event: ViewMoveEvent): void {\n    // Unset drag state only if no new drag has started since the drop.\n    if (this._dragData?.uid === event.dragData?.uid) {\n      this.unsetDragState();\n    }\n  }\n\n  /**\n   * Method invoked when the user drags a tab into this tabbar.\n   */\n  private onTabbarDragEnter(event: DragEvent): void {\n    if (!this._canDrop()) {\n      return;\n    }\n\n    // Memoize drag data.\n    const dragData = this._dragData = this._viewDragService.viewDragData()!;\n\n    // Indicate dragging over this tabbar.\n    this._viewDragService.signalTabbarDragEnter(this.part.id);\n\n    // Snap drag image to tabbar when dragging near it.\n    this._constrainFn = this.createDragImageConstrainFn();\n    this._viewTabDragImageRenderer.setConstrainDragImageRectFn(this._constrainFn);\n\n    // Set drag source, but only if started the drag operation in this part.\n    // We do not set the drag source in `dragstart` to not break the drag operation (in Chrome and Edge, but not Firefox).\n    if (this._host.classList.contains('on-drag-start')) {\n      this.dragSourceViewTab.set(this._viewTabs().find(viewTab => viewTab.view().id === dragData.viewId) ?? null);\n      setCssVariable(this._host, {'--ɵpart-bar-drag-placeholder-width': `${dragData.viewTabWidth}px`});\n    }\n\n    // Locate the tab the user is dragging over.\n    this.dropTargetViewTab.set(this.computeDropTarget(event));\n\n    // Disable pointer events on the tabbar for a smoother drag and drop experience when quickly swapping tabs.\n    setCssClass(this._host, 'pointer-events-disabled');\n\n    // Set CSS class to animate entering the tabbar.\n    setCssClass(this._host, 'on-drag-enter');\n    this.onDragAnimationStable(() => unsetCssClass(this._host, 'on-drag-enter'));\n\n    // Inject drag source width into CSS.\n    setCssVariable(this._host, {'--ɵpart-bar-drag-source-width': `${dragData.viewTabWidth}px`});\n  }\n\n  /**\n   * Method invoked when the user drags a tab out of this tabbar.\n   */\n  private onTabbarDragLeave(event: DragEvent): void {\n    if (!this._canDrop()) {\n      return;\n    }\n\n    // Set CSS class to animate leaving the tabbar, but not when canceling the drag operation for instant reset.\n    // Pointer coordinates are not set when the drag operation is canceled or when dragging the tab out of the window.\n    if (event.screenX || event.screenY) {\n      setCssClass(this._host, 'on-drag-leave');\n      this.onDragAnimationStable(() => unsetCssClass(this._host, 'on-drag-leave'));\n    }\n\n    // Activate the adjacent tab, only if the drag operation is not canceled.\n    // The drag event does not provide information about cancelation. Therefore, we wait for a macrotask, canceling it when receiving `dragend`, i.e., the drag operation has been canceled.\n    if (this.dragSourceViewTab()?.view().active) {\n      timer(0)\n        .pipe(takeUntil(fromEvent(window, 'dragend')))\n        .subscribe(() => void this._router.navigate(layout => layout.activateAdjacentView(this.dragSourceViewTab()!.view().id), {skipLocationChange: true}));\n    }\n\n    // Clean up drag state.\n    this.unsetDragState({unsetDragSource: false, unsetDragData: false});\n  }\n\n  /**\n   * Method invoked when the user is dragging a tab over this tabbar.\n   */\n  private onTabbarDragOver(event: DragEvent, dragDistance: number, scrollDistance: number): void {\n    NgZone.assertNotInAngularZone();\n\n    if (!this._canDrop()) {\n      return;\n    }\n\n    event.preventDefault(); // allow view drop\n\n    // Locate the tab the user is dragging over.\n    // - Run in animation frame for better performance, most noticeable on lower CPU power.\n    // - Do not wait for the drag animation to complete for a smoother drag and drop experience when quickly moving the tab in the tabbar.\n    requestAnimationFrame(() => {\n      // Skip if the drag operation has ended.\n      if (this._viewDragService.isDragOverTabbar !== this.part.id) {\n        return;\n      }\n\n      // Ignore the drag distance if `drag-enter` animation is in progress to avoid incorrect drop target computation when dragging a tab from the left.\n      if (this._host.classList.contains('on-drag-enter')) {\n        this.dropTargetViewTab.set(this.computeDropTarget(event, 0));\n      }\n      // Compute drop target only when moving the drag pointer to prevent tabs from sliding back and forth (while animation is in progress)\n      else if (dragDistance) {\n        this.dropTargetViewTab.set(this.computeDropTarget(event, dragDistance));\n      }\n      // Compute drop target when scrolling the viewport, i.e., not moving the drag pointer but scrolling the viewport because placed the drag pointer at the viewport edges.\n      else if (scrollDistance) {\n        this.dropTargetViewTab.set(this.computeDropTarget(event, scrollDistance));\n      }\n\n      // Set CSS class to animate dragging over the tabbar.\n      setCssClass(this._host, 'drag-over');\n\n      // Calculate the new size of the drag source placeholder.\n      // The placeholder expands the viewport when dragging a tab to the right, moving part actions along with the dragover event.\n      setCssVariable(this._host, {'--ɵpart-bar-drag-placeholder-width': `${this.calculateDragPlaceholderWidth(event)}px`});\n    });\n  }\n\n  /**\n   * Method invoked when the user drops a tab in this tabbar.\n   */\n  private async onTabbarDrop(): Promise<void> {\n    const dragData = this._dragData!;\n    const dropTargetViewTab = this.dropTargetViewTab()!;\n    const dropPosition = dropTargetViewTab === 'end' ? 'end' : this._viewTabs().indexOf(dropTargetViewTab);\n\n    this._viewDragService.dispatchViewMoveEvent({\n      source: {\n        workbenchId: dragData.workbenchId,\n        partId: dragData.partId,\n        viewId: dragData.viewId,\n        alternativeViewId: dragData.alternativeViewId,\n        navigation: dragData.navigation,\n        classList: dragData.classList,\n      },\n      target: {\n        workbenchId: this._workbenchId,\n        position: dropPosition,\n        elementId: this.part.id,\n      },\n      dragData: dragData,\n    });\n  }\n\n  /**\n   * Locates the tab before which the dragged tab is to be inserted when it is dropped. Dragging beyond the last tab returns `end`.\n   */\n  private computeDropTarget(event: DragEvent, dragDistanceX: number = 0): ViewTabComponent | 'end' {\n    const dragImage = this._viewTabDragImageRenderer.calculateDragImageRect(this._dragData!, event);\n    const viewTabs = this._viewTabs().filter(viewTab => viewTab !== this.dragSourceViewTab());\n\n    for (const viewTab of viewTabs) {\n      const {left, width} = viewTab.boundingClientRect();\n      const viewTabHCenter = left + (width / 2);\n\n      // Moving the pointer to the left.\n      if (dragDistanceX <= 0 && dragImage.left < viewTabHCenter) {\n        return viewTab;\n      }\n      // Moving the pinter to the right.\n      if (dragDistanceX > 0 && dragImage.right < viewTabHCenter) {\n        return viewTab;\n      }\n    }\n    return 'end';\n  }\n\n  /**\n   * Creates the function for snapping the drag image to the tabbar when dragging near it.\n   */\n  private createDragImageConstrainFn(): ConstrainFn {\n    return (dragImage: DOMRect): DOMRect => new DOMRect(\n      clamp(dragImage.x, {\n        min: this._hostBoundingClientRect().left + this._tabbarIndent.left,\n        max: this._hostBoundingClientRect().left + this.maxWidth() - dragImage.width - this._tabbarIndent.right,\n      }),\n      this._viewportBoundingBox().top,\n      dragImage.width,\n      this._viewportBoundingBox().height, // fit into tabbar, e.g., when dragging a tab into a tabbar of a different height\n    );\n  }\n\n  /**\n   * Calculates the width for the drag placeholder.\n   *\n   * The placeholder expands the viewport when dragging a tab to the right, moving part actions along with the dragover event.\n   *\n   * Calculation:\n   * - When dragging over tabs, the width is equal to the width of the drag source.\n   * - When dragging to the right of the last tab, the width of the placeholder is the distance between the last tab and the position of the drag pointer.\n   */\n  private calculateDragPlaceholderWidth(event: DragEvent): number {\n    const viewDragImageRect = this._viewTabDragImageRenderer.calculateDragImageRect(this._dragData!, event);\n    const lastViewTab = this._viewTabs().filter(viewTab => viewTab !== this.dragSourceViewTab()).at(-1);\n    const lastViewTabRight = lastViewTab?.boundingClientRect().right ?? this._hostBoundingClientRect().left + this._tabbarIndent.left;\n    return Math.max(lastViewTabRight + viewDragImageRect.width, viewDragImageRect.right) - lastViewTabRight;\n  }\n\n  /**\n   * Indicates whether CSS animations have finished when dragging a tab over the tabbar.\n   * The animation is considered stable when all tabs have moved to their final position.\n   */\n  private isDragAnimationStable(): boolean {\n    const dropTargetViewTab = this.dropTargetViewTab();\n    if (this._viewDragService.isDragOverTabbar !== this.part.id) {\n      return this._viewTabs().every(viewTab => getCssTranslation(viewTab.host).translateX === 'none');\n    }\n\n    const viewTabs = this._viewTabs().filter(viewTab => viewTab !== this.dragSourceViewTab());\n    const dropTargetIndex = dropTargetViewTab === 'end' ? viewTabs.length : viewTabs.indexOf(dropTargetViewTab!);\n    const dragSourceWidth = this._dragData!.viewTabWidth;\n\n    return viewTabs.every((viewTab, i) => {\n      const viewTabTranslateX = getCssTranslation(viewTab.host).translateX;\n      // Expect tabs preceding the drop target not to be shifted to the right.\n      if (i < dropTargetIndex && viewTabTranslateX !== 'none') {\n        return false;\n      }\n      // Expect drop target and tabs following the drop target to be shifted to the right.\n      if (i >= dropTargetIndex && Math.floor(Number(viewTabTranslateX)) !== Math.floor(dragSourceWidth)) { // compare floored numbers because `translateX` is not precise\n        return false;\n      }\n      return true;\n    });\n  }\n\n  /**\n   * Cleans up the drag state, unsetting drag data and drag source based on provided options.\n   */\n  private unsetDragState(options?: {unsetDragSource?: false; unsetDragData?: false}): void {\n    this.dropTargetViewTab.set(null);\n    this._onUnsetDragState.set();\n    this._viewTabDragImageRenderer.unsetConstrainDragImageRectFn(this._constrainFn!);\n    this._viewDragService.signalTabbarDragLeave(this.part.id);\n    this._constrainFn = null;\n\n    unsetCssClass(this._host, 'drag-over', 'pointer-events-disabled');\n    unsetCssVariable(this._host, '--ɵpart-bar-drag-source-width', '--ɵpart-bar-drag-placeholder-width');\n\n    if (options?.unsetDragSource ?? true) {\n      this.dragSourceViewTab.set(null);\n    }\n    if (options?.unsetDragData ?? true) {\n      this._dragData = null;\n    }\n  }\n\n  /**\n   * Executes given function when the drag animation has finished, i.e., tabs have transitioned to their final position.\n   */\n  private onDragAnimationStable(callback: () => void): void {\n    if (NgZone.isInAngularZone()) {\n      this._zone.runOutsideAngular(() => this.onDragAnimationStable(callback));\n      return;\n    }\n    requestAnimationFrame(() => this.isDragAnimationStable() ? callback() : this.onDragAnimationStable(callback));\n  }\n\n  /**\n   * Scrolls the tab of the active view into view.\n   */\n  private installActiveViewScroller(): void {\n    effect(() => {\n      // Track the active view.\n      const activeViewId = this.part.activeViewId();\n      // There may be no active view, e.g., if no view has been activated, or when dragging the last view out of the tabbar.\n      if (!activeViewId) {\n        return;\n      }\n\n      // Do not track rendered tabs in general to prevent unwanted scrolling when opening or closing inactive tabs.\n      const viewTabs = untracked(() => this._viewTabs());\n\n      // Get a reference to the currently rendered active tab, waiting if necessary by tracking the rendered tabs.\n      const activeViewTab = viewTabs.find(viewTab => viewTab.view().id === activeViewId);\n      if (!activeViewTab) {\n        this._viewTabs(); // Track rendered tabs to re-execute once rendered.\n        return;\n      }\n\n      // Track navigation of the active view, scrolling its tab into view if necessary.\n      activeViewTab.view().navigation();\n\n      // Track unsetting drag state to ensure the active view is scrolled into view after drop or cancel.\n      this._onUnsetDragState();\n\n      // Scroll the tab into view if scrolled out of view.\n      untracked(() => requestAnimationFrame(() => {\n        if (!this._viewportComponent().isElementInView(activeViewTab.host, 'full')) {\n          this._viewportComponent().scrollIntoView(activeViewTab.host);\n        }\n      }));\n    });\n  }\n\n  /**\n   * Updates {@link ɵWorkbenchView} when its tab is scrolled into view.\n   */\n  private installScrolledIntoViewUpdater(): void {\n    this._viewportChange$\n      .pipe(\n        map(() => this._viewTabs()),\n        filterArray(viewTab => viewTab !== this.dragSourceViewTab()), // skip drag source as always scrolled out of view\n        mergeMap(viewTabs => from(viewTabs)),\n        takeUntilDestroyed(),\n      )\n      .subscribe(viewTab => {\n        viewTab.view().scrolledIntoView = this._viewportComponent().isElementInView(viewTab.host, 'full');\n      });\n  }\n\n  /**\n   * Subscribes to drag events.\n   */\n  private installViewDragListener(): void {\n    const zone = inject(NgZone);\n\n    // Subscribe to drag events relevant for this tabbar.\n    this._viewDragService.viewDrag$(this._partBarElement)\n      .pipe(\n        subscribeIn(fn => zone.runOutsideAngular(fn)),\n        calculateDistance(() => this._viewportComponent()), // provide viewport lazily because not injected yet\n        takeUntilDestroyed(),\n      )\n      .subscribe(({event, dragDistance, scrollDistance}) => {\n        switch (event.type) {\n          case 'dragstart':\n            this.onTabDragStart();\n            break;\n          case 'dragend':\n            this.onTabDragEnd(event);\n            break;\n          case 'dragenter':\n            this.onTabbarDragEnter(event);\n            break;\n          case 'dragover':\n            this.onTabbarDragOver(event, dragDistance, scrollDistance);\n            break;\n          case 'dragleave':\n            this.onTabbarDragLeave(event);\n            break;\n          case 'drop':\n            void this.onTabbarDrop();\n            break;\n        }\n      });\n\n    // Get notified when a view has moved in the layout.\n    this._viewDragService.viewMoved$\n      .pipe(\n        subscribeIn(fn => zone.runOutsideAngular(fn)),\n        takeUntilDestroyed(),\n      )\n      .subscribe(event => this.onTabMoved(event));\n\n    /**\n     * Calculates the distance the drag pointer and viewport have moved since the last drag event.\n     */\n    function calculateDistance(viewport: () => SciViewportComponent): OperatorFunction<DragEvent, DragEventPlusDistance> {\n      return source$ => new Observable<DragEventPlusDistance>(observer => {\n        let lastScreenX: number | undefined;\n        let lastScrollLeft: number | undefined;\n\n        const subscription = source$.subscribe(event => {\n          observer.next({\n            event,\n            dragDistance: event.screenX - (lastScreenX ?? event.screenX),\n            scrollDistance: viewport().scrollLeft - (lastScrollLeft ?? viewport().scrollLeft),\n          });\n          lastScreenX = event.screenX;\n          lastScrollLeft = viewport().scrollLeft;\n        });\n        return () => subscription.unsubscribe();\n      });\n    }\n  }\n\n  /**\n   * Emits on {@link _viewportChange$} when the viewport size or scroll position changes.\n   */\n  private installViewportChangeTracker(): void {\n    const viewportSize = dimension(computed(() => this._viewportComponentElement().nativeElement as HTMLElement));\n    const viewportClientSize = dimension(computed(() => this._viewportComponent().viewportClientElement));\n    const zone = inject(NgZone);\n\n    // Detect resizing.\n    effect(() => {\n      // Track viewport and viewport client sizes.\n      viewportSize();\n      viewportClientSize();\n      untracked(() => this._viewportChange$.next());\n    });\n\n    // Detect scrolling.\n    effect(onCleanup => {\n      const viewport = this._viewportComponent().viewportElement;\n      untracked(() => {\n        const subscription = fromEvent(viewport, 'scroll')\n          .pipe(subscribeIn(fn => zone.runOutsideAngular(fn)))\n          .subscribe(() => this._viewportChange$.next());\n        onCleanup(() => subscription.unsubscribe());\n      });\n    });\n  }\n\n  /**\n   * Tracks the tabbar indents.\n   */\n  private installTabbarIndentSizeTracker(): void {\n    const tabCornerRadiusDimension = dimension(this._tabCornerRadiusElement);\n\n    effect(() => {\n      const indent = tabCornerRadiusDimension().clientWidth;\n      this._tabbarIndent = {left: indent, right: indent};\n      setCssVariable(this._host, {\n        '--ɵpart-bar-indent-left': `${this._tabbarIndent.left}px`,\n        '--ɵpart-bar-indent-right': `${this._tabbarIndent.right}px`,\n      });\n    });\n  }\n\n  public ngOnDestroy(): void {\n    this.unsetDragState();\n  }\n}\n\n/**\n * Contains the event plus drag and scroll distance.\n */\ninterface DragEventPlusDistance {\n  /**\n   * Reference to the drag event.\n   */\n  event: DragEvent;\n  /**\n   * Distance the drag pointer has moved since the last drag event.\n   */\n  dragDistance: number;\n  /**\n   * Distance the viewport has scrolled since the last drag event.\n   */\n  scrollDistance: number;\n}\n","<sci-viewport class=\"e2e-tab-viewport\" scrollbarStyle=\"hidden\">\n  @for (viewId of part.viewIds(); track viewId) {\n    @if (viewtab === dropTargetViewTab()) {\n      <div class=\"divider\"></div>\n    }\n    <wb-view-tab #viewtab\n                 [viewId]=\"viewId\"\n                 [class.drag-source]=\"viewtab === dragSourceViewTab()\"\n                 [class.drop-target]=\"viewtab === dropTargetViewTab()\"/>\n    <div class=\"divider\"></div>\n  }\n\n  <!-- Placeholder for expanding the viewport when dragging a tab to the right, moving part actions along with the dragover event. -->\n  <div class=\"drag-placeholder\"></div>\n</sci-viewport>\n\n<!-- Element for injecting the corner radius into the component. -->\n<div class=\"tab-corner-radius\" #tab_corner_radius></div>\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 {Component, computed, effect, ElementRef, inject, InjectionToken, NgZone, Signal, untracked, viewChild} from '@angular/core';\nimport {ɵWorkbenchPart} from '../ɵworkbench-part.model';\nimport {ɵWorkbenchRouter} from '../../routing/ɵworkbench-router.service';\nimport {PartActionComponent} from '../part-action/part-action.component';\nimport {ViewListButtonComponent} from '../view-list-button/view-list-button.component';\nimport {ViewTabBarComponent} from '../view-tab-bar/view-tab-bar.component';\nimport {dimension} from '@scion/components/dimension';\nimport {NgClass} from '@angular/common';\nimport {EMPTY, fromEvent, mergeMap, of, pairwise, withLatestFrom} from 'rxjs';\nimport {subscribeIn} from '@scion/toolkit/operators';\nimport {TextPipe} from '../../text/text.pipe';\nimport {IconComponent} from '../../icon/icon.component';\n\n/**\n * DI token to inject the HTML element of the {@link PartBarComponent}.\n */\nexport const PART_BAR_ELEMENT = new InjectionToken<HTMLElement>('PART_BAR_ELEMENT');\n\n@Component({\n  selector: 'wb-part-bar',\n  templateUrl: './part-bar.component.html',\n  styleUrls: ['./part-bar.component.scss'],\n  imports: [\n    ViewTabBarComponent,\n    PartActionComponent,\n    ViewListButtonComponent,\n    NgClass,\n    TextPipe,\n    IconComponent,\n  ],\n  providers: [\n    {provide: PART_BAR_ELEMENT, useFactory: () => inject(ElementRef).nativeElement as HTMLElement},\n  ],\n})\nexport class PartBarComponent {\n\n  private readonly _router = inject(ɵWorkbenchRouter);\n  private readonly _viewTabBar = viewChild(ViewTabBarComponent, {read: ElementRef<HTMLElement>});\n  private readonly _fillerElement = viewChild.required<ElementRef<HTMLElement>>('filler');\n\n  protected readonly part = inject(ɵWorkbenchPart);\n  protected readonly startActions = computed(() => this.part.actions().filter(action => action.align === 'start'));\n  protected readonly endActions = computed(() => this.part.actions().filter(action => action.align !== 'start'));\n  protected readonly maxViewTabBarWidth: Signal<number>;\n\n  constructor() {\n    this.maxViewTabBarWidth = this.calculateMaxViewTabBarWidth();\n    this.installActivityMinimizer();\n  }\n\n  protected onMinimize(): void {\n    void this._router.navigate(layout => layout.toggleActivity(this.part.activity()!.id));\n  }\n\n  /**\n   * Minimizes activities when double-clicking the tabbar or filler, but only if the first and second clicks target the same DOM element.\n   * This prevents unintended maximization or minimization when double-clicking a tab's close button.\n   */\n  private installActivityMinimizer(): void {\n    const host = inject(ElementRef).nativeElement as HTMLElement;\n    const zone = inject(NgZone);\n\n    effect(onCleanup => {\n      // Maximization/minimization is only supported for tabs not located in the peripheral area.\n      if (this.part.peripheral()) {\n        return;\n      }\n\n      const viewTabBar = this._viewTabBar()?.nativeElement as HTMLElement | undefined;\n      const filler = this._fillerElement().nativeElement;\n\n      untracked(() => {\n        const subscription = fromEvent<MouseEvent>([filler].concat(viewTabBar ?? []), 'dblclick')\n          .pipe(\n            withLatestFrom(fromEvent<MouseEvent>(host, 'click', {capture: true}).pipe(pairwise(), subscribeIn(fn => zone.runOutsideAngular(fn)))),\n            mergeMap(([dblClickEvent, [clickEvent1, clickEvent2]]) => clickEvent1.target === clickEvent2.target ? of(dblClickEvent) : EMPTY),\n          )\n          .subscribe(event => {\n            void this._router.navigate(layout => layout.toggleMaximized());\n            event.preventDefault();\n          });\n        onCleanup(() => subscription.unsubscribe());\n      });\n    });\n  }\n\n  /**\n   * Calculates the maximum available width for the view tab bar.\n   */\n  private calculateMaxViewTabBarWidth(): Signal<number> {\n    const fillerDimension = dimension(this._fillerElement);\n    const viewTabBarDimension = dimension(this._viewTabBar);\n    return computed(() => (viewTabBarDimension()?.offsetWidth ?? 0) + fillerDimension().offsetWidth);\n  }\n}\n","<!-- Title -->\n@if (part.title()) {\n  <span class=\"title e2e-title\">{{(part.title() | wbText)()}}</span>\n}\n\n<!-- View Tabs -->\n@if (part.viewIds().length) {\n  <wb-view-tab-bar [maxWidth]=\"maxViewTabBarWidth()\"/>\n}\n\n<!-- Start Actions -->\n@if (startActions().length) {\n  <div class=\"actions\">\n    @for (action of startActions(); track action) {\n      <wb-part-action [action]=\"action\" [ngClass]=\"action.cssClass\" data-align=\"start\"/>\n    }\n  </div>\n}\n\n<!-- Filler -->\n<div class=\"filler\" #filler></div>\n\n<!-- End Actions -->\n@if (endActions().length) {\n  <div class=\"actions\">\n    @for (action of endActions(); track action) {\n      <wb-part-action [action]=\"action\" [ngClass]=\"action.cssClass\" data-align=\"end\"/>\n    }\n  </div>\n}\n\n<!-- View List Dropdown -->\n@if (part.viewIds().length) {\n  <wb-view-list-button [title]=\"('%workbench.show_open_tabs.tooltip' | wbText)()\"/>\n}\n\n<!-- Minimize Button -->\n@if (part.canMinimize()) {\n  <button (click)=\"onMinimize()\" [title]=\"('%workbench.minimize.tooltip' | wbText)()\" class=\"minimize e2e-minimize\">\n    <wb-icon icon=\"workbench.minimize\"/>\n  </button>\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 {DestroyRef, Directive, effect, inject, input, TemplateRef, untracked, ViewContainerRef} from '@angular/core';\nimport {WbComponentPortal} from './wb-component-portal';\n\n/**\n * Directive version of {@link WbComponentPortal}, enabling declarative use in templates.\n *\n * Unlike `CdkPortalOutlet` the portal is not destroyed on detach.\n *\n * ---\n * Usage:\n *\n * ```html\n * <ng-container *wbPortalOutlet=\"greeting\"/>\n * <!-- or -->\n * <ng-template [wbPortalOutlet]=\"greeting\"/>\n * ````\n *\n * @see WbComponentPortal\n */\n@Directive({selector: 'ng-template[wbPortalOutlet]'})\nexport class WorkbenchPortalOutletDirective {\n\n  public readonly portal = input.required<WbComponentPortal | null>({alias: 'wbPortalOutlet'});\n\n  private readonly _viewContainerRef = inject(ViewContainerRef);\n\n  private _portal: WbComponentPortal | null = null;\n\n  constructor() {\n    const nullTemplate = inject(TemplateRef) as TemplateRef<void>;\n\n    // To get notified before Angular destroys the portal, we insert a pseudo-element ahead of it.\n    // This pseudo-element gets destroyed first, allowing us to detach the portal and prevent its destruction.\n    this._viewContainerRef.createEmbeddedView(nullTemplate).onDestroy(() => this.detach());\n    // Additionally, we add an extra element between the pseudo-element and the portal to not break Angular's destroy algorithm.\n    // Angular's destroy algorithm terminates when an element removes its immediate successor during destruction, but it continues\n    // if the next but one element is removed instead. It is crucial to insert this intermediary element; otherwise, unmounting\n    // the workbench with opened views would fail to destroy the workbench component entirely.\n    // See tests `workbench-ummount.e2e-spec`.\n    this._viewContainerRef.createEmbeddedView(nullTemplate);\n\n    this.installPortal();\n\n    inject(DestroyRef).onDestroy(() => this.detach());\n  }\n\n  /**\n   * Attaches the portal, detaching the previous portal, if any.\n   */\n  private installPortal(): void {\n    effect(() => {\n      const portal = this.portal();\n      untracked(() => {\n        this.detach();\n        this._portal = portal;\n        this.attach();\n      });\n    });\n  }\n\n  private attach(): void {\n    this._portal?.attach(this._viewContainerRef);\n  }\n\n  private detach(): void {\n    if (this._portal?.isAttachedTo(this._viewContainerRef)) {\n      this._portal.detach();\n    }\n  }\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 {inject, Pipe, PipeTransform} from '@angular/core';\nimport {WORKBENCH_VIEW_REGISTRY} from './workbench-view.registry';\nimport {WbComponentPortal} from '../portal/wb-component-portal';\nimport type {ViewComponent} from '../view/view.component';\nimport {ViewId} from './workbench-view.model';\n\n/**\n * Resolves the portal for the given view, or throws an error if the view is not registered.\n */\n@Pipe({name: 'wbViewPortal'})\nexport class ViewPortalPipe implements PipeTransform {\n\n  private readonly _viewRegistry = inject(WORKBENCH_VIEW_REGISTRY);\n\n  public transform(viewId: ViewId | null): WbComponentPortal<ViewComponent> | null {\n    if (!viewId) {\n      return null;\n    }\n    return this._viewRegistry.get(viewId).portal;\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 {ChangeDetectorRef, Component, DestroyRef, effect, ElementRef, HostBinding, inject, Injector, OnInit, untracked} from '@angular/core';\nimport {EMPTY, fromEvent, merge, switchMap} from 'rxjs';\nimport {ViewDropZoneDirective, WbViewDropEvent} from '../view-dnd/view-drop-zone.directive';\nimport {ViewDragService} from '../view-dnd/view-drag.service';\nimport {ɵWorkbenchPart} from './ɵworkbench-part.model';\nimport {Logger, LoggerNames} from '../logging';\nimport {WORKBENCH_VIEW_REGISTRY} from '../view/workbench-view.registry';\nimport {PartBarComponent} from './part-bar/part-bar.component';\nimport {WorkbenchPortalOutletDirective} from '../portal/workbench-portal-outlet.directive';\nimport {ViewPortalPipe} from '../view/view-portal.pipe';\nimport {takeUntilDestroyed, toObservable} from '@angular/core/rxjs-interop';\nimport {WORKBENCH_ID} from '../workbench-id';\nimport {SciViewportComponent} from '@scion/components/viewport';\nimport {RouterOutletRootContextDirective} from '../routing/router-outlet-root-context.directive';\nimport {synchronizeCssClasses} from '../common/css-class.util';\nimport {RouterOutlet} from '@angular/router';\nimport {PartId} from './workbench-part.model';\nimport {dasherize} from '../common/dasherize.util';\n\n@Component({\n  selector: 'wb-part',\n  templateUrl: './part.component.html',\n  styleUrls: ['./part.component.scss'],\n  imports: [\n    PartBarComponent,\n    ViewDropZoneDirective,\n    WorkbenchPortalOutletDirective,\n    RouterOutlet,\n    RouterOutletRootContextDirective,\n    ViewPortalPipe,\n    SciViewportComponent,\n  ],\n  host: {\n    '[attr.data-peripheral]': `part.peripheral() ? '' : undefined`,\n    '[attr.data-grid]': 'dasherize(part.gridName())',\n  },\n})\nexport class PartComponent implements OnInit {\n\n  private readonly _workbenchId = inject(WORKBENCH_ID);\n  private readonly _viewRegistry = inject(WORKBENCH_VIEW_REGISTRY);\n  private readonly _viewDragService = inject(ViewDragService);\n  private readonly _injector = inject(Injector);\n  private readonly _cd = inject(ChangeDetectorRef);\n\n  protected readonly part = inject(ɵWorkbenchPart);\n  protected readonly canDrop = inject(ViewDragService).canDrop(inject(ɵWorkbenchPart));\n  protected readonly dasherize = dasherize;\n\n  @HostBinding('attr.tabindex')\n  protected tabIndex = -1;\n\n  @HostBinding('attr.data-partid')\n  protected get partId(): PartId {\n    return this.part.id;\n  }\n\n  @HostBinding('class.active')\n  protected get isActive(): boolean {\n    return this.part.active();\n  }\n\n  constructor() {\n    this.part.partComponent.set(inject(ElementRef).nativeElement as HTMLElement);\n    this.installComponentLifecycleLogger();\n    this.activatePartOnFocusIn();\n    this.constructInactiveViewComponents();\n    this.addHostCssClasses();\n  }\n\n  public ngOnInit(): void {\n    // Perform a manual change detection run to avoid `ExpressionChangedAfterItHasBeenCheckedError` that would occur\n    // when the view sets view properties in its constructor. Because the view tab is located before the view in the\n    // Angular component tree, Angular checks the view tab for changes before the view. Therefore, if the view sets\n    // its title during construction, then the view tab label will also change, causing the error.\n    this._cd.detectChanges();\n  }\n\n  /**\n   * Method invoked to move a view into this part.\n   */\n  protected onViewDrop(event: WbViewDropEvent): void {\n    this._viewDragService.dispatchViewMoveEvent({\n      source: {\n        workbenchId: event.dragData.workbenchId,\n        partId: event.dragData.partId,\n        viewId: event.dragData.viewId,\n        alternativeViewId: event.dragData.alternativeViewId,\n        navigation: event.dragData.navigation,\n        classList: event.dragData.classList,\n      },\n      target: {\n        workbenchId: this._workbenchId,\n        elementId: this.part.id,\n        region: event.dropRegion === 'center' ? undefined : event.dropRegion,\n      },\n      dragData: event.dragData,\n    });\n  }\n\n  /**\n   * Constructs view components of inactive views, so they can initialize, e.g., to set the view tab title.\n   */\n  private constructInactiveViewComponents(): void {\n    effect(() => {\n      const viewIds = this.part.viewIds();\n      untracked(() => viewIds\n        .map(viewId => this._viewRegistry.get(viewId))\n        .filter(view => !view.active() && !view.portal.isConstructed)\n        .forEach(inactiveView => {\n          inactiveView.portal.createComponentFromInjectionContext(this._injector);\n        }));\n    });\n  }\n\n  /**\n   * Activates this part when it gains focus.\n   */\n  private activatePartOnFocusIn(): void {\n    const host = inject(ElementRef).nativeElement as HTMLElement;\n\n    toObservable(this.part.active)\n      .pipe(\n        switchMap(active => active ? EMPTY : merge(fromEvent<FocusEvent>(host, 'focusin', {once: true}), fromEvent(host, 'sci-microfrontend-focusin', {once: true}))),\n        takeUntilDestroyed(),\n      )\n      .subscribe(() => {\n        void this.part.activate();\n      });\n  }\n\n  private addHostCssClasses(): void {\n    const host = inject(ElementRef).nativeElement as HTMLElement;\n    synchronizeCssClasses(host, this.part.classList.asList);\n  }\n\n  private installComponentLifecycleLogger(): void {\n    const logger = inject(Logger);\n    logger.debug(() => `Constructing PartComponent [partId=${this.partId}]`, LoggerNames.LIFECYCLE);\n    inject(DestroyRef).onDestroy(() => logger.debug(() => `Destroying PartComponent [partId=${this.partId}]'`, LoggerNames.LIFECYCLE));\n  }\n}\n","@if (part.title() || part.viewIds().length || part.actions().length || part.canMinimize()) {\n  <wb-part-bar/>\n}\n\n@if (part.viewIds().length) {\n  @let canSplit = !!part.activeViewId();\n  <div wbViewDropZone\n       [wbViewDropZoneRegionSize]=\".25\"\n       [wbViewDropZonePlaceholderSize]=\".5\"\n       [wbViewDropZoneAttributes]=\"{'data-partid': part.id}\"\n       [wbViewDropZoneRegions]=\"canDrop() && {center: true, north: canSplit, south: canSplit, west: canSplit, east: canSplit}\"\n       (wbViewDropZoneDrop)=\"onViewDrop($event)\"\n       class=\"active-view e2e-view-content e2e-content\">\n    <ng-container *wbPortalOutlet=\"part.activeViewId() | wbViewPortal\"/>\n  </div>\n} @else {\n  <sci-viewport class=\"part-content e2e-part-content e2e-content\"\n                wbViewDropZone\n                [wbViewDropZoneRegions]=\"canDrop() && {center: false, north: true, south: true, west: true, east: true}\"\n                [wbViewDropZoneAttributes]=\"{'data-partid': part.id}\"\n                (wbViewDropZoneDrop)=\"onViewDrop($event)\">\n    <router-outlet [name]=\"part.id\" wbRouterOutletRootContext/>\n  </sci-viewport>\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 {inject, Injectable, IterableChanges, IterableDiffers} from '@angular/core';\nimport {ɵWorkbenchLayout} from '../layout/ɵworkbench-layout';\nimport {UrlTree} from '@angular/router';\nimport {Routing} from './routing.util';\nimport {DialogOutlet, MessageBoxOutlet, PartOutlet, PopupOutlet, ViewOutlet} from '../workbench.constants';\n\n/**\n * Stateful differ to compute added and removed outlets.\n *\n * Use this differ to register/unregister auxiliary routes for added/removed outlets.\n */\n@Injectable({providedIn: 'root'})\nexport class WorkbenchOutletDiffer {\n\n  private readonly _viewsDiffer = inject(IterableDiffers).find([]).create<ViewOutlet>();\n  private readonly _partsDiffer = inject(IterableDiffers).find([]).create<PartOutlet>();\n  private readonly _popupsDiffer = inject(IterableDiffers).find([]).create<PopupOutlet>();\n  private readonly _dialogsDiffer = inject(IterableDiffers).find([]).create<DialogOutlet>();\n  private readonly _messageBoxDiffer = inject(IterableDiffers).find([]).create<MessageBoxOutlet>();\n\n  /**\n   * Computes differences since last time {@link WorkbenchOutletDiffer#diff} was invoked.\n   */\n  public diff(workbenchLayout: ɵWorkbenchLayout | null, urlTree: UrlTree): WorkbenchOutletDiff {\n    // Combine view outlets from the URL and the layout, using a `Set` to remove duplicate entries.\n    // We require both sources because the layout is not available during initial navigation, and\n    // the URL does not contain outlets for empty-path navigations.\n    const viewOutlets = new Set([\n      ...Routing.parseOutlets(urlTree, {view: true}).keys(),\n      ...workbenchLayout?.views().map(view => view.id) ?? [],\n    ]);\n    // Combine part outlets from the URL and the layout, using a `Set` to remove duplicate entries.\n    // We require both sources because the layout is not available during initial navigation, and\n    // the URL does not contain outlets for empty-path navigations.\n    const partOutlets = new Set([\n      ...Routing.parseOutlets(urlTree, {part: true}).keys(),\n      ...workbenchLayout?.parts().map(part => part.id) ?? [],\n    ]);\n\n    const popupOutlets = Routing.parseOutlets(urlTree, {popup: true}).keys();\n    const dialogOutlets = Routing.parseOutlets(urlTree, {dialog: true}).keys();\n    const messageBoxOutlets = Routing.parseOutlets(urlTree, {messagebox: true}).keys();\n\n    return new WorkbenchOutletDiff({\n      views: this._viewsDiffer.diff(viewOutlets),\n      parts: this._partsDiffer.diff(partOutlets),\n      popups: this._popupsDiffer.diff(popupOutlets),\n      dialogs: this._dialogsDiffer.diff(dialogOutlets),\n      messageBoxes: this._messageBoxDiffer.diff(messageBoxOutlets),\n    });\n  }\n}\n\n/**\n * Lists outlets added or removed in the current navigation.\n */\nexport class WorkbenchOutletDiff {\n\n  public readonly addedViewOutlets = new Array<ViewOutlet>();\n  public readonly removedViewOutlets = new Array<ViewOutlet>();\n\n  public readonly addedPartOutlets = new Array<PartOutlet>();\n  public readonly removedPartOutlets = new Array<PartOutlet>();\n\n  public readonly addedPopupOutlets = new Array<PopupOutlet>();\n  public readonly removedPopupOutlets = new Array<PopupOutlet>();\n\n  public readonly addedDialogOutlets = new Array<DialogOutlet>();\n  public readonly removedDialogOutlets = new Array<DialogOutlet>();\n\n  public readonly addedMessageBoxOutlets = new Array<MessageBoxOutlet>();\n  public readonly removedMessageBoxOutlets = new Array<MessageBoxOutlet>();\n\n  constructor(changes: WorkbenchOutletChanges) {\n    changes.views?.forEachAddedItem(({item}) => this.addedViewOutlets.push(item));\n    changes.views?.forEachRemovedItem(({item}) => this.removedViewOutlets.push(item));\n\n    changes.parts?.forEachAddedItem(({item}) => this.addedPartOutlets.push(item));\n    changes.parts?.forEachRemovedItem(({item}) => this.removedPartOutlets.push(item));\n\n    changes.popups?.forEachAddedItem(({item}) => this.addedPopupOutlets.push(item));\n    changes.popups?.forEachRemovedItem(({item}) => this.removedPopupOutlets.push(item));\n\n    changes.dialogs?.forEachAddedItem(({item}) => this.addedDialogOutlets.push(item));\n    changes.dialogs?.forEachRemovedItem(({item}) => this.removedDialogOutlets.push(item));\n\n    changes.messageBoxes?.forEachAddedItem(({item}) => this.addedMessageBoxOutlets.push(item));\n    changes.messageBoxes?.forEachRemovedItem(({item}) => this.removedMessageBoxOutlets.push(item));\n  }\n\n  public toString(): string {\n    return new Array<string>()\n      .concat(this.addedViewOutlets.length ? `addedViewOutlets=[${this.addedViewOutlets}]` : [])\n      .concat(this.removedViewOutlets.length ? `removedViewOutlets=[${this.removedViewOutlets}]` : [])\n\n      .concat(this.addedPartOutlets.length ? `addedPartOutlets=[${this.addedPartOutlets}]` : [])\n      .concat(this.removedPartOutlets.length ? `removedPartOutlets=[${this.removedPartOutlets}]` : [])\n\n      .concat(this.addedPopupOutlets.length ? `addedPopupOutlets=[${this.addedPopupOutlets}]` : [])\n      .concat(this.removedPopupOutlets.length ? `removedPopupOutlets=[${this.removedPopupOutlets}]` : [])\n\n      .concat(this.addedDialogOutlets.length ? `addedDialogOutlets=[${this.addedDialogOutlets}]` : [])\n      .concat(this.removedDialogOutlets.length ? `removedDialogOutlets=[${this.removedDialogOutlets}]` : [])\n\n      .concat(this.addedMessageBoxOutlets.length ? `addedMessageBoxOutlets=[${this.addedMessageBoxOutlets}]` : [])\n      .concat(this.removedMessageBoxOutlets.length ? `removedMessageBoxOutlets=[${this.removedMessageBoxOutlets}]` : [])\n      .join(', ');\n  }\n}\n\ninterface WorkbenchOutletChanges {\n  views: IterableChanges<ViewOutlet> | null;\n  parts: IterableChanges<PartOutlet> | null;\n  popups: IterableChanges<PopupOutlet> | null;\n  dialogs: IterableChanges<DialogOutlet> | null;\n  messageBoxes: IterableChanges<MessageBoxOutlet> | null;\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 {Event, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, Router, RouterEvent} from '@angular/router';\nimport {createEnvironmentInjector, EnvironmentInjector, inject, Injectable, runInInjectionContext} from '@angular/core';\nimport {WorkbenchAuxiliaryRouteInstaller} from './workbench-auxiliary-route-installer.service';\nimport {MAIN_AREA_LAYOUT_QUERY_PARAM} from '../workbench.constants';\nimport {WORKBENCH_VIEW_REGISTRY} from '../view/workbench-view.registry';\nimport {WORKBENCH_PART_REGISTRY} from '../part/workbench-part.registry';\nimport {WorkbenchLayoutService} from '../layout/workbench-layout.service';\nimport {ɵWorkbenchPart} from '../part/ɵworkbench-part.model';\nimport {ɵWorkbenchView} from '../view/ɵworkbench-view.model';\nimport {ViewComponent} from '../view/view.component';\nimport {WorkbenchLayoutDiffer} from './workbench-layout-differ';\nimport {Logger, LoggerNames} from '../logging';\nimport {WorkbenchNavigationalStates} from './workbench-navigational-states';\nimport {MainAreaPartComponent} from '../part/main-area-part/main-area-part.component';\nimport {PartComponent} from '../part/part.component';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {ɵWorkbenchLayoutFactory} from '../layout/ɵworkbench-layout.factory';\nimport {Routing} from './routing.util';\nimport {ViewId} from '../view/workbench-view.model';\nimport {ɵWorkbenchRouter} from './ɵworkbench-router.service';\nimport {WorkbenchNavigationContext} from './routing.model';\nimport {matchesIfNavigated} from './workbench-route-guards';\nimport {WorkbenchOutletDiffer} from './workbench-outlet-differ';\nimport {filter} from 'rxjs/operators';\nimport {MAIN_AREA} from '../layout/workbench-layout';\nimport {PartId} from '../part/workbench-part.model';\nimport {ɵWorkbenchLayout} from '../layout/ɵworkbench-layout';\nimport {WorkbenchLayouts} from '../layout/workbench-layouts.util';\nimport {MPartGrid} from '../layout/workbench-grid.model';\n\n/**\n * Tracks the browser URL for workbench layout changes.\n *\n * - For each added view, constructs a {@link WorkbenchView} and registers view specific auxiliary routes of all top-level routes\n * - For each removed view, destroys {@link WorkbenchView} and unregisters its auxiliary routes\n * - For each added part, constructs a {@link WorkbenchPart}\n * - For each removed part, destroys {@link WorkbenchPart}\n * - Parses the serialized layout and injects it into {@link WorkbenchLayoutService}.\n */\n@Injectable({providedIn: 'root'})\nexport class WorkbenchUrlObserver {\n\n  private readonly _router = inject(Router);\n  private readonly _auxiliaryRouteInstaller = inject(WorkbenchAuxiliaryRouteInstaller);\n  private readonly _viewRegistry = inject(WORKBENCH_VIEW_REGISTRY);\n  private readonly _partRegistry = inject(WORKBENCH_PART_REGISTRY);\n  private readonly _workbenchLayoutService = inject(WorkbenchLayoutService);\n  private readonly _environmentInjector = inject(EnvironmentInjector);\n  private readonly _workbenchRouter = inject(ɵWorkbenchRouter);\n  private readonly _workbenchLayoutFactory = inject(ɵWorkbenchLayoutFactory);\n  private readonly _workbenchLayoutDiffer = inject(WorkbenchLayoutDiffer);\n  private readonly _workbenchOutletDiffer = inject(WorkbenchOutletDiffer);\n  private readonly _logger = inject(Logger);\n\n  constructor() {\n    this.installRouterEventListeners();\n  }\n\n  /** Invoked at the beginning of each navigation */\n  private onNavigationStart(event: NavigationStart): void {\n    const context = this.createWorkbenchNavigationContext(event.url);\n    this._logger.debug(() => 'onNavigationStart', LoggerNames.ROUTING, event, `NavigationContext [parts=${context.layout.parts().map(part => part.id)}, layoutDiff=${context.layoutDiff}, outletDiff=${context.outletDiff}]`);\n    this._workbenchRouter.setCurrentNavigationContext(context);\n    this.registerAddedOutletAuxiliaryRoutes();\n    this.registerAddedWorkbenchParts();\n    this.registerAddedWorkbenchViews();\n  }\n\n  /** Invoked upon successful navigation */\n  private onNavigationEnd(event: NavigationEnd): void {\n    this._logger.debug(() => 'onNavigationEnd', LoggerNames.ROUTING, event);\n    this.unregisterRemovedOutletAuxiliaryRoutes();\n    this.unregisterRemovedWorkbenchParts();\n    this.unregisterRemovedWorkbenchViews();\n    this.applyWorkbenchLayout();\n    this.migrateURL();\n    this._workbenchRouter.getCurrentNavigationContext().runPostNavigationActions();\n    this._workbenchRouter.setCurrentNavigationContext(null);\n  }\n\n  /** Invoked when cancelled the navigation, e.g., in a guard */\n  private onNavigationCancel(event: NavigationCancel): void {\n    this._logger.debug(() => 'onNavigationCancel', LoggerNames.ROUTING, event);\n    this._workbenchRouter.getCurrentNavigationContext().undoChanges();\n    this._workbenchRouter.setCurrentNavigationContext(null);\n  }\n\n  /** Invoked when the navigation failed */\n  private onNavigationError(event: NavigationError): void {\n    this._logger.debug(() => 'onNavigationError', LoggerNames.ROUTING, event);\n    this._workbenchRouter.getCurrentNavigationContext().undoChanges();\n    this._workbenchRouter.setCurrentNavigationContext(null);\n  }\n\n  /**\n   * Creates the context of the current navigation. The context provides access to the new layout and how it differs from the current layout.\n   */\n  private createWorkbenchNavigationContext(url: string): WorkbenchNavigationContext {\n    const urlTree = this._router.parseUrl(url);\n    const workbenchNavigationalState = WorkbenchNavigationalStates.fromNavigation(this._router.getCurrentNavigation()!);\n    const previousLayout = this._workbenchLayoutService.hasLayout() ? this._workbenchLayoutService.layout() : null;\n    const previousUrl = this._router.parseUrl(this._router.url); // Browser URL is only updated after successful navigation\n\n    const newLayout = this._workbenchLayoutFactory.create({\n      grids: {\n        main: workbenchNavigationalState?.grids.main ?? previousLayout?.grids.main,\n        mainArea: (() => {\n          // Read the main area grid from the query parameter.\n          const mainAreaGrid = urlTree.queryParamMap.get(MAIN_AREA_LAYOUT_QUERY_PARAM);\n          if (mainAreaGrid) {\n            return mainAreaGrid;\n          }\n\n          // Do not fall back to the current layout if the navigation was performed via the Workbench Router.\n          const isWorkbenchRouterNavigation = workbenchNavigationalState !== null;\n          if (isWorkbenchRouterNavigation) {\n            return undefined;\n          }\n\n          // Do not fall back to the current layout if the navigation was triggered from outside the Angular Router, i.e., the browser back/forward buttons.\n          const isExternalNavigation = this._router.getCurrentNavigation()!.trigger === 'popstate';\n          if (isExternalNavigation) {\n            return undefined;\n          }\n\n          // Fall back to the current layout if the navigation was performed via the Angular router, i.e., the navigator did not preserve the query params.\n          return previousLayout?.grids.mainArea;\n        })(),\n        ...WorkbenchLayouts.pickActivityGrids<string | MPartGrid>(workbenchNavigationalState?.grids ?? previousLayout?.grids),\n      },\n      activityLayout: workbenchNavigationalState?.activityLayout ?? previousLayout?.activityLayout,\n      perspectiveId: workbenchNavigationalState?.perspectiveId ?? previousLayout?.perspectiveId,\n      navigationStates: workbenchNavigationalState?.navigationStates ?? previousLayout?.navigationStates(),\n      outlets: Object.fromEntries(Routing.parseOutlets(urlTree, {part: true, view: true})),\n    });\n\n    const undoActions = new Array<() => void>();\n    const postNavigationActions = new Array<() => void>();\n\n    return {\n      layout: newLayout,\n      previousLayout,\n      layoutDiff: this._workbenchLayoutDiffer.diff(newLayout),\n      outletDiff: this._workbenchOutletDiffer.diff(newLayout, urlTree),\n      undoChanges: () => {\n        // Revert differs to the state before the navigation.\n        this._workbenchLayoutDiffer.diff(previousLayout);\n        this._workbenchOutletDiffer.diff(previousLayout, previousUrl);\n        // Run registered undo actions.\n        undoActions.forEach(action => action());\n      },\n      runPostNavigationActions: () => postNavigationActions.forEach(action => action()),\n      registerUndoAction: action => undoActions.push(action),\n      registerPostNavigationAction: action => postNavigationActions.push(action),\n    };\n  }\n\n  /**\n   * For each added workbench outlet, registers auxiliary routes of all top-level routes.\n   */\n  private registerAddedOutletAuxiliaryRoutes(): void {\n    const navigationContext = this._workbenchRouter.getCurrentNavigationContext();\n\n    // Register view auxiliary routes.\n    const addedViewOutlets = navigationContext.outletDiff.addedViewOutlets;\n    if (addedViewOutlets.length) {\n      const auxiliaryRoutes = this._auxiliaryRouteInstaller.registerAuxiliaryRoutes(addedViewOutlets, {notFoundRoute: matchesIfNavigated});\n      this._logger.debug(() => `Registered auxiliary routes for views: ${addedViewOutlets}`, LoggerNames.ROUTING, auxiliaryRoutes);\n    }\n\n    // Register part auxiliary routes.\n    const addedPartOutlets = navigationContext.outletDiff.addedPartOutlets;\n    if (addedPartOutlets.length) {\n      const auxiliaryRoutes = this._auxiliaryRouteInstaller.registerAuxiliaryRoutes(addedPartOutlets, {notFoundRoute: matchesIfNavigated});\n      this._logger.debug(() => `Registered auxiliary routes for parts: ${addedPartOutlets}`, LoggerNames.ROUTING, auxiliaryRoutes);\n    }\n\n    // Register popup auxiliary routes.\n    const addedPopupOutlets = navigationContext.outletDiff.addedPopupOutlets;\n    if (addedPopupOutlets.length) {\n      const auxiliaryRoutes = this._auxiliaryRouteInstaller.registerAuxiliaryRoutes(addedPopupOutlets, {notFoundRoute: true});\n      this._logger.debug(() => `Registered auxiliary routes for popups: ${addedPopupOutlets}`, LoggerNames.ROUTING, auxiliaryRoutes);\n    }\n\n    // Register dialog auxiliary routes.\n    const addedDialogOutlets = navigationContext.outletDiff.addedDialogOutlets;\n    if (addedDialogOutlets.length) {\n      const auxiliaryRoutes = this._auxiliaryRouteInstaller.registerAuxiliaryRoutes(addedDialogOutlets, {notFoundRoute: true});\n      this._logger.debug(() => `Registered auxiliary routes for dialogs: ${addedDialogOutlets}`, LoggerNames.ROUTING, auxiliaryRoutes);\n    }\n\n    // Register message box auxiliary routes.\n    const addedMessageBoxOutlets = navigationContext.outletDiff.addedMessageBoxOutlets;\n    if (addedMessageBoxOutlets.length) {\n      const auxiliaryRoutes = this._auxiliaryRouteInstaller.registerAuxiliaryRoutes(addedMessageBoxOutlets, {notFoundRoute: true});\n      this._logger.debug(() => `Registered auxiliary routes for message boxes: ${addedMessageBoxOutlets}`, LoggerNames.ROUTING, auxiliaryRoutes);\n    }\n\n    // Revert registration if the navigation fails.\n    navigationContext.registerUndoAction(() => {\n      const addedOutlets = [...addedViewOutlets, ...addedPartOutlets, ...addedPopupOutlets, ...addedDialogOutlets, ...addedMessageBoxOutlets];\n      this._auxiliaryRouteInstaller.unregisterAuxiliaryRoutes(addedOutlets);\n    });\n  }\n\n  /**\n   * Unregisters auxiliary routes of removed workbench outlets.\n   */\n  private unregisterRemovedOutletAuxiliaryRoutes(): void {\n    const navigationContext = this._workbenchRouter.getCurrentNavigationContext();\n    const removedOutlets: string[] = [\n      ...navigationContext.outletDiff.removedViewOutlets,\n      ...navigationContext.outletDiff.removedPartOutlets,\n      ...navigationContext.outletDiff.removedPopupOutlets,\n      ...navigationContext.outletDiff.removedDialogOutlets,\n      ...navigationContext.outletDiff.removedMessageBoxOutlets,\n    ];\n    if (removedOutlets.length) {\n      this._logger.debug(() => 'Unregistering outlet auxiliary routes: ', LoggerNames.ROUTING, removedOutlets);\n      this._auxiliaryRouteInstaller.unregisterAuxiliaryRoutes(removedOutlets);\n    }\n  }\n\n  /**\n   * For each added part, constructs a {@link WorkbenchPart} and registers it in {@link WORKBENCH_PART_REGISTRY}.\n   */\n  private registerAddedWorkbenchParts(): void {\n    const navigationContext = this._workbenchRouter.getCurrentNavigationContext();\n    const {layoutDiff, layout} = navigationContext;\n\n    layoutDiff.addedParts.forEach(partId => {\n      this._logger.debug(() => `Constructing ɵWorkbenchPart [partId=${partId}]`, LoggerNames.LIFECYCLE);\n      this._partRegistry.register(partId, this.createWorkbenchPart(partId, layout));\n      navigationContext.registerUndoAction(() => this._partRegistry.unregister(partId));\n    });\n  }\n\n  /**\n   * For each removed part, destroys the {@link WorkbenchPart} and unregisters it in {@link WORKBENCH_PART_REGISTRY}.\n   */\n  private unregisterRemovedWorkbenchParts(): void {\n    const {layoutDiff} = this._workbenchRouter.getCurrentNavigationContext();\n\n    layoutDiff.removedParts.forEach(partId => {\n      this._logger.debug(() => `Destroying ɵWorkbenchPart [partId=${partId}]`, LoggerNames.LIFECYCLE);\n      this._partRegistry.unregister(partId);\n    });\n  }\n\n  /**\n   * For each added view, constructs a {@link WorkbenchView} and registers it in {@link WORKBENCH_VIEW_REGISTRY}.\n   */\n  private registerAddedWorkbenchViews(): void {\n    const navigationContext = this._workbenchRouter.getCurrentNavigationContext();\n    const {layoutDiff, layout} = navigationContext;\n\n    layoutDiff.addedViews.forEach(viewId => {\n      this._logger.debug(() => `Constructing ɵWorkbenchView [viewId=${viewId}]`, LoggerNames.LIFECYCLE);\n      this._viewRegistry.register(viewId, this.createWorkbenchView(viewId, layout));\n      navigationContext.registerUndoAction(() => this._viewRegistry.unregister(viewId));\n    });\n  }\n\n  /**\n   * For each removed view, destroys the {@link WorkbenchView} and unregisters it from {@link WORKBENCH_VIEW_REGISTRY}.\n   */\n  private unregisterRemovedWorkbenchViews(): void {\n    const {layoutDiff} = this._workbenchRouter.getCurrentNavigationContext();\n\n    layoutDiff.removedViews.forEach(viewId => {\n      this._logger.debug(() => `Destroying ɵWorkbenchView [viewId=${viewId}]`, LoggerNames.LIFECYCLE);\n      this._viewRegistry.unregister(viewId);\n    });\n  }\n\n  private createWorkbenchPart(partId: PartId, layout: ɵWorkbenchLayout): ɵWorkbenchPart {\n    // Construct the handle in an injection context that shares the part's lifecycle, allowing for automatic cleanup of effects and RxJS interop functions.\n    const partEnvironmentInjector = createEnvironmentInjector([], this._environmentInjector, `Workbench Part ${partId}`);\n    return runInInjectionContext(partEnvironmentInjector, () => new ɵWorkbenchPart(partId, layout, {\n      component: partId === MAIN_AREA ? MainAreaPartComponent : PartComponent,\n    }));\n  }\n\n  private createWorkbenchView(viewId: ViewId, layout: ɵWorkbenchLayout): ɵWorkbenchView {\n    // Construct the handle in an injection context that shares the view's lifecycle, allowing for automatic cleanup of effects and RxJS interop functions.\n    const viewEnvironmentInjector = createEnvironmentInjector([], this._environmentInjector, `Workbench View ${viewId}`);\n    return runInInjectionContext(viewEnvironmentInjector, () => new ɵWorkbenchView(viewId, layout, {component: ViewComponent}));\n  }\n\n  /**\n   * Applies the current layout to the workbench.\n   */\n  private applyWorkbenchLayout(): void {\n    const {layout} = this._workbenchRouter.getCurrentNavigationContext();\n    this._workbenchLayoutService.setLayout(layout);\n    this._logger.debug(() => 'Applied workbench layout', LoggerNames.ROUTING, layout);\n  }\n\n  /**\n   * Updates the URL if the layout has been migrated from an outdated version.\n   */\n  private migrateURL(): void {\n    const layout = this._workbenchRouter.getCurrentNavigationContext().layout;\n    if (layout.grids.mainArea?.migrated) {\n      // Update the URL with the migrated URL and clear existing query params, for example, if the layout query parameter has been renamed.\n      void this._workbenchRouter.navigate(layout => layout, {queryParamsHandling: null, replaceUrl: true});\n    }\n  }\n\n  private installRouterEventListeners(): void {\n    this._router.events\n      .pipe(\n        filter((event: Event | RouterEvent): event is RouterEvent => event instanceof RouterEvent),\n        takeUntilDestroyed(),\n      )\n      .subscribe((event: RouterEvent) => {\n        if (event instanceof NavigationStart) {\n          this.onNavigationStart(event);\n        }\n        else if (event instanceof NavigationEnd) {\n          this.onNavigationEnd(event);\n        }\n        else if (event instanceof NavigationCancel) {\n          this.onNavigationCancel(event);\n        }\n        else if (event instanceof NavigationError) {\n          this.onNavigationError(event);\n        }\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 {inject, Injectable} from '@angular/core';\nimport {ViewDragService, ViewMoveEvent} from '../view-dnd/view-drag.service';\nimport {Router} from '@angular/router';\nimport {LocationStrategy} from '@angular/common';\nimport {ɵWorkbenchRouter} from '../routing/ɵworkbench-router.service';\nimport {Routing} from '../routing/routing.util';\nimport {ɵWorkbenchLayoutFactory} from '../layout/ɵworkbench-layout.factory';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {Defined} from '@scion/toolkit/util';\nimport {generatePerspectiveWindowName} from '../perspective/workbench-perspective.service';\nimport {ANONYMOUS_PERSPECTIVE_ID_PREFIX} from '../workbench.constants';\nimport {WORKBENCH_ID} from '../workbench-id';\nimport {UID} from '../common/uid.util';\nimport {filter} from 'rxjs/operators';\nimport {WorkbenchLayouts} from '../layout/workbench-layouts.util';\n\n/**\n * Updates the workbench layout when receiving a {@link ViewMoveEvent} event relevant for this application.\n */\n@Injectable({providedIn: 'root'})\nexport class ViewMoveHandler {\n\n  private readonly _workbenchId = inject(WORKBENCH_ID);\n  private readonly _workbenchRouter = inject(ɵWorkbenchRouter);\n  private readonly _workbenchLayoutFactory = inject(ɵWorkbenchLayoutFactory);\n  private readonly _router = inject(Router);\n  private readonly _locationStrategy = inject(LocationStrategy);\n\n  constructor() {\n    this.installViewMoveHandler();\n  }\n\n  /**\n   * Updates the workbench layout when receiving a {@link ViewMoveEvent} event relevant for this application.\n   */\n  private async onViewMove(event: ViewMoveEvent): Promise<void> {\n    const crossWorkbenchViewDrag = (event.source.workbenchId !== event.target.workbenchId);\n\n    // Check if to remove the view from this workbench instance if being moved to another workbench instance.\n    if (crossWorkbenchViewDrag && event.source.workbenchId === this._workbenchId) {\n      // Check if to add the view to a new browser window.\n      if (event.target.workbenchId === 'new-window') {\n        await this.moveViewToNewWindow(event);\n      }\n      else {\n        await this.removeView(event);\n      }\n    }\n    // Check if to add the view to this workbench instance if being moved from another workbench instance to this workbench instance.\n    else if (crossWorkbenchViewDrag && event.target.workbenchId === this._workbenchId) {\n      await this.addView(event);\n    }\n    // Move the view within the same workbench instance.\n    else {\n      await this.moveView(event);\n    }\n  }\n\n  private async addView(event: ViewMoveEvent): Promise<void> {\n    const region = event.target.region;\n    const addToNewPart = !!region;\n    const commands = Routing.segmentsToCommands(event.source.navigation?.path ?? []);\n\n    await this._workbenchRouter.navigate(layout => {\n      const newViewId = event.source.alternativeViewId ?? layout.computeNextViewId();\n      if (addToNewPart) {\n        const newPartId = event.target.newPart?.id ?? WorkbenchLayouts.computePartId();\n        return layout\n          .addPart(newPartId, {relativeTo: event.target.elementId, align: coerceAlignProperty(region), ratio: event.target.newPart?.ratio}, {structural: false})\n          .addView(newViewId, {partId: newPartId, activateView: true, activatePart: true, cssClass: event.source.classList?.get('layout')})\n          .modify(layout => event.source.navigation ? layout.navigateView(newViewId, commands, {hint: event.source.navigation.hint, cssClass: event.source.classList?.get('navigation'), data: event.source.navigation.data}) : layout);\n      }\n      else {\n        return layout\n          .addView(newViewId, {\n            partId: Defined.orElseThrow(event.target.elementId, () => Error(`[ViewMoveError] Target part required for region 'center'.`)),\n            position: event.target.position ?? 'after-active-view',\n            cssClass: event.source.classList?.get('layout'),\n            activateView: true,\n            activatePart: true,\n          })\n          .modify(layout => event.source.navigation ? layout.navigateView(newViewId, commands, {hint: event.source.navigation.hint, cssClass: event.source.classList?.get('navigation'), data: event.source.navigation.data}) : layout);\n      }\n    });\n  }\n\n  private async moveViewToNewWindow(event: ViewMoveEvent): Promise<void> {\n    // Open the view \"standalone\" in a blank window in an anonymous perspective.\n    const urlTree = await this._workbenchRouter.createUrlTree(() => {\n      const newLayout = this._workbenchLayoutFactory.create();\n      const newViewId = event.source.alternativeViewId ?? newLayout.computeNextViewId();\n      const commands = Routing.segmentsToCommands(event.source.navigation?.path ?? []);\n      return newLayout\n        .addView(newViewId, {\n          partId: newLayout.activePart({grid: 'mainArea'})!.id,\n          activateView: true,\n          cssClass: event.source.classList?.get('layout'),\n        })\n        .modify(layout => event.source.navigation ? layout.navigateView(newViewId, commands, {hint: event.source.navigation.hint, cssClass: event.source.classList?.get('navigation'), data: event.source.navigation.data}) : layout);\n    });\n    const target = generatePerspectiveWindowName(`${ANONYMOUS_PERSPECTIVE_ID_PREFIX}${UID.randomUID()}`);\n    if (window.open(this._locationStrategy.prepareExternalUrl(this._router.serializeUrl(urlTree!)), target)) {\n      await this.removeView(event);\n    }\n  }\n\n  private async removeView(event: ViewMoveEvent): Promise<void> {\n    await this._workbenchRouter.navigate(layout => layout.removeView(event.source.viewId, {force: true}));\n  }\n\n  private async moveView(event: ViewMoveEvent): Promise<void> {\n    const addToNewPart = !!event.target.region;\n    if (addToNewPart) {\n      const newPartId = event.target.newPart?.id ?? WorkbenchLayouts.computePartId();\n      await this._workbenchRouter.navigate(layout => layout\n        .addPart(newPartId, {relativeTo: event.target.elementId, align: coerceAlignProperty(event.target.region!), ratio: event.target.newPart?.ratio}, {structural: false})\n        .moveView(event.source.viewId, newPartId, {activatePart: true, activateView: true}),\n      );\n    }\n    else {\n      const targetPartId = Defined.orElseThrow(event.target.elementId, () => Error(`[ViewMoveError] Target part required for region 'center'.`));\n      await this._workbenchRouter.navigate(layout => layout.moveView(event.source.viewId, targetPartId, {\n        position: event.target.position ?? (event.source.partId === targetPartId ? undefined : 'after-active-view'),\n        activateView: true,\n        activatePart: true,\n      }));\n    }\n  }\n\n  /**\n   * Subscribes to {@link ViewMoveEvent} events relevant for this app instance,\n   * invoking {@link onViewMove} for each event and signaling completion once the view has been moved.\n   */\n  private installViewMoveHandler(): void {\n    const viewDragService = inject(ViewDragService);\n\n    viewDragService.viewMove$\n      .pipe(\n        // Skip events not relevant for this app instance.\n        filter(event => event.source.workbenchId === this._workbenchId || event.target.workbenchId === this._workbenchId),\n        takeUntilDestroyed(),\n      )\n      .subscribe(event => {\n        void this.onViewMove(event).finally(() => viewDragService.signalViewMoved(event));\n      });\n  }\n}\n\nfunction coerceAlignProperty(region: 'north' | 'east' | 'south' | 'west' | 'center'): 'left' | 'right' | 'top' | 'bottom' {\n  switch (region) {\n    case 'west':\n      return 'left';\n    case 'east':\n      return 'right';\n    case 'north':\n      return 'top';\n    case 'south':\n      return 'bottom';\n    default:\n      throw Error(`[UnsupportedRegionError] Supported regions are 'north', 'east', 'south' or 'west', but is '${region}'.`);\n  }\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 {ComponentType} from '@angular/cdk/portal';\n\n/**\n * Patches '@scion/microfrontend-platform' typedef definition via module augmentation.\n */\ndeclare module '@scion/microfrontend-platform' {\n\n  /**\n   * Adds workbench-specific configuration to {@link @scion/microfrontend-platform!MicrofrontendPlatformConfig}.\n   */\n  export interface MicrofrontendPlatformConfig {\n    /**\n     * Splash to display until microfrontend signals readiness.\n     *\n     * A microfrontend can instruct the workbench to display a splash until signaled ready. By default, the workbench displays a loading indicator.\n     *\n     * @see WorkbenchViewCapability.properties.showSplash\n     * @see WorkbenchPopupCapability.properties.showSplash\n     */\n    splash?: ComponentType<unknown>;\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 {Observable} from 'rxjs';\nimport {inject, Injectable, NgZone} from '@angular/core';\nimport {observeIn, subscribeIn} from '@scion/toolkit/operators';\nimport {ObservableDecorator} from '@scion/microfrontend-platform';\n\n/**\n * Mirrors the source, but ensures subscription and emission {@link NgZone} to be identical.\n */\n@Injectable(/* DO NOT provide via 'providedIn' metadata as only registered if microfrontend support is enabled. */)\nexport class NgZoneObservableDecorator implements ObservableDecorator {\n\n  private readonly _zone = inject(NgZone);\n\n  public decorate$<T>(source$: Observable<T>): Observable<T> {\n    return new Observable<T>(observer => {\n      const insideAngular = NgZone.isInAngularZone();\n      const subscription = source$\n        .pipe(\n          subscribeIn(fn => this._zone.runOutsideAngular(fn)),\n          observeIn(fn => insideAngular ? this._zone.run(fn) : this._zone.runOutsideAngular(fn)),\n        )\n        .subscribe(observer);\n      return () => subscription.unsubscribe();\n    });\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 {EnvironmentProviders, InjectionToken, makeEnvironmentProviders} from '@angular/core';\nimport {WorkbenchInitializer, WorkbenchInitializerFn} from './../startup/workbench-initializer';\n\n/**\n * Registers a function that is executed during the startup of the SCION Microfrontend Platform.\n *\n * Initializers help to run initialization tasks (synchronous or asynchronous) during startup of the SCION Microfrontend Platform.\n *\n * Initializers can specify a phase for execution. Initializers in lower phases execute before initializers in higher phases.\n * Initializers in the same phase may execute in parallel. If no phase is specified, the initializer executes in the `PostStartup` phase.\n *\n * Available phases, in order of execution:\n * - {@link MicrofrontendPlatformStartupPhase.PreStartup}\n * - {@link MicrofrontendPlatformStartupPhase.PostStartup}\n *\n * The function can call `inject` to get any required dependencies.\n *\n * Initializers are only called if microfrontend support is enabled.\n *\n * @param initializerFn - Specifies the function to execute.\n * @param options - Controls execution of the function.\n * @return A set of dependency-injection providers to be registered in Angular.\n */\nexport function provideMicrofrontendPlatformInitializer(initializerFn: WorkbenchInitializerFn, options?: MicrofrontendPlatformInitializerOptions): EnvironmentProviders {\n  return makeEnvironmentProviders([{\n    provide: options?.phase === MicrofrontendPlatformStartupPhase.PreStartup ? MICROFRONTEND_PLATFORM_PRE_STARTUP : MICROFRONTEND_PLATFORM_POST_STARTUP,\n    useValue: initializerFn,\n    multi: true,\n  }]);\n}\n\n/**\n * Controls the execution of an initializer function during the startup of the SCION Microfrontend Platform.\n */\nexport interface MicrofrontendPlatformInitializerOptions {\n  /**\n   * Controls in which phase to execute the initializer.\n   */\n  phase?: MicrofrontendPlatformStartupPhase;\n}\n\n/**\n * Enumeration of phases for running a {@link WorkbenchInitializerFn} function during the startup of the SCION Microfrontend Platform.\n *\n * Functions associated with the same phase may run in parallel. Defaults to {@link PostStartup} phase.\n */\nexport enum MicrofrontendPlatformStartupPhase {\n  /**\n   * Use to run an initializer before starting the SCION Microfrontend Platform.\n   *\n   * Typically, you would configure the SCION Microfrontend Platform in this phase, for example, register interceptors or decorators.\n   * At this point, you cannot interact with the microfrontend platform because it has not been started yet.\n   *\n   * This phase is only called if microfrontend support is enabled.\n   */\n  PreStartup = 0,\n  /**\n   * Use to run an initializer after started the SCION Microfrontend Platform.\n   *\n   * Typically, you would install intent and message handlers in this phase.\n   * At this point, the activators of the micro applications are not yet installed.\n   *\n   * This phase is only called if microfrontend support is enabled.\n   */\n  PostStartup = 2,\n}\n\n/**\n * DI token to register a {@link WorkbenchInitializerFn} as a multi-provider to hook into the startup process of the SCION Microfrontend Platform.\n *\n * Initializers associated with this DI token are executed during {@link WORKBENCH_STARTUP} before starting the SCION Microfrontend Platform.\n *\n * Typically, you would configure the SCION Microfrontend Platform in this lifecycle hook, for example, register interceptors or decorators.\n * At this point, you cannot interact with the microfrontend platform because it has not been started yet.\n *\n * This lifecycle hook is only called if microfrontend support is enabled.\n *\n * @see WorkbenchInitializerFn\n * @deprecated since version 19.0.0-beta.3. Register initializer using `provideMicrofrontendPlatformInitializer` function. See `provideMicrofrontendPlatformInitializer` for an example. API will be removed in version 21.\n */\nexport const MICROFRONTEND_PLATFORM_PRE_STARTUP = new InjectionToken<WorkbenchInitializerFn | WorkbenchInitializer | object>('MICROFRONTEND_PLATFORM_PRE_STARTUP');\n\n/**\n * DI token to register a {@link WorkbenchInitializerFn} as a multi-provider to hook into the startup process of the SCION Microfrontend Platform.\n *\n * Initializers associated with this DI token are executed during {@link WORKBENCH_STARTUP} after started the SCION Microfrontend Platform.\n *\n * Typically, you would install intent and message handlers in this lifecycle hook.\n * At this point, the activators of the micro applications are not yet installed.\n *\n * This lifecycle hook is only called if microfrontend support is enabled.\n *\n * @see WorkbenchInitializerFn\n * @deprecated since version 19.0.0-beta.3. Register initializer using `provideMicrofrontendPlatformInitializer` function. See `provideMicrofrontendPlatformInitializer` for an example. API will be removed in version 21.\n */\nexport const MICROFRONTEND_PLATFORM_POST_STARTUP = new InjectionToken<WorkbenchInitializerFn | WorkbenchInitializer | object>('MICROFRONTEND_PLATFORM_POST_STARTUP');\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 {MicrofrontendPlatformConfig} from '@scion/microfrontend-platform';\nimport {Injectable} from '@angular/core';\n\n/**\n * Allows loading the configuration for the SCION Microfrontend Platform asynchronously, e.g., over the network or from a JSON file.\n */\n@Injectable(/* DO NOT provide via 'providedIn' metadata as used as DI token for the actual config. */)\nexport abstract class MicrofrontendPlatformConfigLoader {\n\n  /**\n   * Loads the platform configuration asynchronously.\n   */\n  public abstract load(): Promise<MicrofrontendPlatformConfig>;\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 {EnvironmentProviders, inject, Injectable, makeEnvironmentProviders} from '@angular/core';\nimport {Capability, ManifestService} from '@scion/microfrontend-platform';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {BehaviorSubject, Observable} from 'rxjs';\nimport {distinctUntilChanged, map, startWith} from 'rxjs/operators';\nimport {tapFirst} from '@scion/toolkit/operators';\nimport {provideMicrofrontendPlatformInitializer} from './microfrontend-platform-initializer.provider';\n\n@Injectable(/* DO NOT provide via 'providedIn' metadata as only registered if microfrontend support is enabled. */)\nexport class ManifestObjectCache {\n\n  private readonly _manifestService = inject(ManifestService);\n  private readonly _capabilities$ = new BehaviorSubject(new Map<string, Capability>());\n\n  public async init(): Promise<void> {\n    return new Promise<void>(resolve => {\n      this._manifestService.lookupCapabilities$()\n        .pipe(\n          tapFirst(() => resolve()),\n          takeUntilDestroyed(),\n        )\n        .subscribe(capabilities => {\n          this._capabilities$.next(capabilities.reduce((acc, capability) => acc.set(capability.metadata!.id, capability), new Map<string, Capability>()));\n        });\n    });\n  }\n\n  /**\n   * Tests if given capability exists.\n   */\n  public hasCapability(capabilityId: string): boolean {\n    return this._capabilities$.value.has(capabilityId);\n  }\n\n  /**\n   * Returns the specified capability. If not found, by default, throws an error unless setting the `orElseNull` option.\n   */\n  public getCapability<T extends Capability = Capability>(capabilityId: string): T;\n  public getCapability<T extends Capability = Capability>(capabilityId: string, options: {orElse: null}): T | null;\n  public getCapability<T extends Capability = Capability>(capabilityId: string, options?: {orElse: null}): T | null {\n    const capability = this._capabilities$.value.get(capabilityId) as T | undefined;\n    if (!capability && !options) {\n      throw Error(`[NullCapabilityError] No capability found with id '${capabilityId}'.`);\n    }\n    return capability ?? null;\n  }\n\n  /**\n   * Looks up specified capability.\n   *\n   * Upon subscription, emits the requested capability, and then emits continuously when it changes. It never completes.\n   */\n  public observeCapability$<T extends Capability = Capability>(capabilityId: string): Observable<T | null> {\n    return this._capabilities$\n      .pipe(\n        startWith(undefined as void),\n        map(() => this.getCapability<T>(capabilityId, {orElse: null})),\n        distinctUntilChanged((a, b) => JSON.stringify(a) === JSON.stringify(b)),\n      );\n  }\n}\n\n/**\n * Provides cached access to manifest objects.\n */\nexport function provideManifestObjectCache(): EnvironmentProviders {\n  return makeEnvironmentProviders([\n    ManifestObjectCache,\n    provideMicrofrontendPlatformInitializer(() => inject(ManifestObjectCache).init()),\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 {CanMatchFn, Params, Route, UrlMatcher, UrlMatchResult, UrlSegment, UrlSegmentGroup} from '@angular/router';\nimport {WorkbenchViewCapability, ɵMicrofrontendRouteParams} from '@scion/workbench-client';\nimport {inject, Injector} from '@angular/core';\nimport {Commands} from '../../routing/routing.model';\nimport {ɵWorkbenchRouter} from '../../routing/ɵworkbench-router.service';\nimport {Routing} from '../../routing/routing.util';\nimport {WorkbenchRouteData} from '../../routing/workbench-route-data';\nimport {MicrofrontendPlatform, PlatformState} from '@scion/microfrontend-platform';\nimport {ManifestObjectCache} from '../manifest-object-cache.service';\n\n/**\n * Provides functions and constants specific to microfrontend routes.\n */\nexport const MicrofrontendViewRoutes = {\n\n  /**\n   * Prefix to identify a microfrontend route.\n   */\n  ROUTE_PREFIX: '~',\n\n  /**\n   * Key for associating transient parameters with a navigation.\n   */\n  STATE_TRANSIENT_PARAMS: 'transientParams',\n\n  /**\n   * Custom URL matcher for microfrontend URLs, enabling transient parameters to be provided as regular route parameters.\n   *\n   * A microfrontend route consists of two segments:\n   * 1. An identifier segment (`~`) to identify a microfrontend route.\n   * 2. Capability segment to identify the microfrontend capability.\n   *\n   * Parameters are included in the second segment as matrix parameters.\n   *\n   * Example URL: `~/a538d2a;param1=value1;param2=value\n   *\n   * @see MicrofrontendViewRoutes.createMicrofrontendNavigateCommands\n   */\n  provideMicrofrontendRouteMatcher: (): UrlMatcher => {\n    const injector = inject(Injector);\n\n    return (segments: UrlSegment[], group: UrlSegmentGroup, route: Route): UrlMatchResult | null => {\n      // Test if the path matches.\n      const microfrontendURL = MicrofrontendViewRoutes.parseMicrofrontendURL(segments);\n      if (!microfrontendURL) {\n        return null;\n      }\n\n      // Test if navigating a view.\n      const outlet = route.data?.[WorkbenchRouteData.ɵoutlet] as string | undefined;\n      if (!Routing.isViewOutlet(outlet)) {\n        return null;\n      }\n\n      const {layout} = injector.get(ɵWorkbenchRouter).getCurrentNavigationContext();\n      const navigationState = layout.navigationState({outlet});\n      const transientParams = (navigationState[MicrofrontendViewRoutes.STATE_TRANSIENT_PARAMS] ?? {}) as Params;\n      // Pass transient parameters as positional parameters so they are available in `ActivatedRoute.params`.\n      // Note that we use an undocumented feature of `UrlMatcher` by passing an object instead of a string as the path of `UrlSegment`.\n      const posParams = Object.entries(transientParams).map<[string, UrlSegment]>(([name, value]) => [name, new UrlSegment(value as string, {})]);\n\n      return {\n        consumed: segments,\n        posParams: {\n          ...Object.fromEntries(posParams),\n          [ɵMicrofrontendRouteParams.ɵVIEW_CAPABILITY_ID]: segments[1]!,\n        },\n      };\n    };\n  },\n\n  /**\n   * Creates routing commands to navigate a microfrontend.\n   *\n   * Format: ['~', '<capabilityId>, {params}]\n   *\n   * @see MicrofrontendViewRoutes.provideMicrofrontendRouteMatcher\n   */\n  createMicrofrontendNavigateCommands: (viewCapabilityId: string, params: Params): Commands => {\n    if (Object.keys(params).length) {\n      return [MicrofrontendViewRoutes.ROUTE_PREFIX, viewCapabilityId, params];\n    }\n    else {\n      return [MicrofrontendViewRoutes.ROUTE_PREFIX, viewCapabilityId];\n    }\n  },\n\n  /**\n   * Parses the given microfrontend URL, if any, returning its capability and parameters, or `null` if not a microfrontend URL.\n   */\n  parseMicrofrontendURL: (segments: UrlSegment[]): {capabilityId: string; params: Params} | null => {\n    if (segments.length === 2 && segments[0]!.path === MicrofrontendViewRoutes.ROUTE_PREFIX) {\n      return {\n        capabilityId: segments[1]!.path,\n        params: segments[1]!.parameters,\n      };\n    }\n    return null;\n  },\n\n  /**\n   * Splits given params into URL and transient params.\n   */\n  splitParams: (params: Params, capability: WorkbenchViewCapability): {urlParams: Params; transientParams: Params} => {\n    const transientParamNames = new Set(capability.params?.filter(param => param.transient).map(param => param.name));\n\n    return Object.entries(params).reduce((groups, [name, value]: [string, unknown]) => {\n      if (transientParamNames.has(name)) {\n        groups.transientParams[name] = value;\n      }\n      else {\n        groups.urlParams[name] = value;\n      }\n      return groups;\n    }, {urlParams: {} as Params, transientParams: {} as Params});\n  },\n\n  /**\n   * Matches the route if target of a view capability (microfrontend) and the capability exists.\n   */\n  canMatchViewCapability: ((_route: Route, segments: UrlSegment[]): boolean => {\n    const microfrontendURL = MicrofrontendViewRoutes.parseMicrofrontendURL(segments);\n    if (!microfrontendURL) {\n      return false;\n    }\n\n    if (MicrofrontendPlatform.state !== PlatformState.Started) {\n      return true; // match until started the microfrontend platform to avoid flickering.\n    }\n\n    return inject(ManifestObjectCache).hasCapability(microfrontendURL.capabilityId);\n  }) satisfies CanMatchFn,\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 {Handler, IntentInterceptor, IntentMessage, MessageClient, MessageHeaders, ResponseStatusCodes} from '@scion/microfrontend-platform';\nimport {inject, Injectable} from '@angular/core';\nimport {WorkbenchCapabilities, WorkbenchNavigationExtras, WorkbenchViewCapability} from '@scion/workbench-client';\nimport {WorkbenchRouter} from '../../routing/workbench-router.service';\nimport {MicrofrontendViewRoutes} from './microfrontend-view-routes';\nimport {Logger, LoggerNames} from '../../logging';\nimport {Beans} from '@scion/toolkit/bean-manager';\nimport {Dictionaries} from '@scion/toolkit/util';\nimport {Objects} from '../../common/objects.util';\nimport {WorkbenchLayoutService} from '../../layout/workbench-layout.service';\n\n/**\n * Handles microfrontend view intents, instructing the workbench to navigate to the microfrontend of the resolved capability.\n *\n * View intents are handled in this interceptor and are not transported to the providing application, enabling support for applications\n * that are not connected to the SCION Workbench.\n */\n@Injectable(/* DO NOT provide via 'providedIn' metadata as only registered if microfrontend support is enabled. */)\nexport class MicrofrontendViewIntentHandler implements IntentInterceptor {\n\n  private readonly _workbenchRouter = inject(WorkbenchRouter);\n  private readonly _layout = inject(WorkbenchLayoutService).layout;\n  private readonly _logger = inject(Logger);\n\n  /**\n   * View intents are handled in this interceptor and then swallowed.\n   */\n  public intercept(intentMessage: IntentMessage, next: Handler<IntentMessage>): Promise<void> {\n    if (intentMessage.intent.type === WorkbenchCapabilities.View) {\n      return this.consumeViewIntent(intentMessage as IntentMessage<WorkbenchNavigationExtras | undefined>);\n    }\n    else {\n      return next.handle(intentMessage);\n    }\n  }\n\n  private async consumeViewIntent(message: IntentMessage<WorkbenchNavigationExtras | undefined>): Promise<void> {\n    const replyTo = message.headers.get(MessageHeaders.ReplyTo) as string;\n    const success = await this.navigate(message);\n    await Beans.get(MessageClient).publish(replyTo, success, {headers: new Map().set(MessageHeaders.Status, ResponseStatusCodes.TERMINAL)});\n  }\n\n  private async navigate(message: IntentMessage<WorkbenchNavigationExtras | undefined>): Promise<boolean> {\n    const viewCapability = message.capability as WorkbenchViewCapability;\n    const extras: WorkbenchNavigationExtras = message.body ?? {};\n\n    const intentParams = Objects.withoutUndefinedEntries(Dictionaries.coerce(message.intent.params));\n    const {urlParams, transientParams} = MicrofrontendViewRoutes.splitParams(intentParams, viewCapability);\n    const targets = this.resolveTargets(message, extras);\n    const commands = extras.close ? [] : MicrofrontendViewRoutes.createMicrofrontendNavigateCommands(viewCapability.metadata!.id, urlParams);\n    const partId = extras.close ? undefined : extras.partId;\n\n    this._logger.debug(() => `Navigating to: ${viewCapability.properties.path}`, LoggerNames.MICROFRONTEND_ROUTING, commands, viewCapability, transientParams);\n    const navigations = await Promise.all(targets.map(target => {\n      return this._workbenchRouter.navigate(commands, {\n        target,\n        partId,\n        activate: extras.activate,\n        close: extras.close,\n        position: extras.position,\n        cssClass: extras.cssClass,\n        state: Objects.withoutUndefinedEntries({\n          [MicrofrontendViewRoutes.STATE_TRANSIENT_PARAMS]: transientParams,\n        }),\n      });\n    }));\n    return navigations.every(Boolean);\n  }\n\n  /**\n   * Resolves the target(s) for this navigation.\n   */\n  private resolveTargets(intentMessage: IntentMessage, extras: WorkbenchNavigationExtras): string[] {\n    // Closing a microfrontend view by viewId is not allowed, as this would violate the concept of intent-based view navigation.\n    if (extras.close && extras.target) {\n      throw Error(`[NavigateError] The target must be empty if closing a view [target=${(extras.target)}]`);\n    }\n    if (extras.close) {\n      return this.findViews(intentMessage, extras, {matchWildcardParams: true}) ?? [];\n    }\n    if (!extras.target || extras.target === 'auto') {\n      return this.findViews(intentMessage, extras, {matchWildcardParams: false}) ?? ['blank'];\n    }\n    return [extras.target];\n  }\n\n  /**\n   * Finds views matching the given view intent.\n   *\n   * A view matches if its view capability and all its required parameters are equal.\n   *\n   * Allows matching wildcard parameters by setting the option `matchWildcardParams` to `true`.\n   */\n  private findViews(intentMessage: IntentMessage, extras: WorkbenchNavigationExtras, options: {matchWildcardParams: boolean}): string[] | null {\n    const requiredParams = intentMessage.capability.params?.filter(param => param.required) ?? [];\n\n    const viewIds = this._layout()\n      .views({\n        peripheral: extras.partId ? undefined : false,\n        partId: extras.partId,\n      })\n      .filter(mView => {\n        const url = this._layout().urlSegments({outlet: mView.id});\n        const microfrontendURL = MicrofrontendViewRoutes.parseMicrofrontendURL(url);\n        if (!microfrontendURL) {\n          return false;\n        }\n\n        // Test whether the capability matches.\n        if (microfrontendURL.capabilityId !== intentMessage.capability.metadata!.id) {\n          return false;\n        }\n\n        // Test whether all \"navigational\" params match.\n        return requiredParams.every(({name}) => {\n          const newParamValue = intentMessage.intent.params!.get(name) as unknown;\n          return (options.matchWildcardParams && newParamValue === '*') || newParamValue === microfrontendURL.params[name];\n        });\n\n      })\n      .map(view => view.id);\n\n    return viewIds.length ? viewIds : null;\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 {Component, inject} from '@angular/core';\nimport {eMESSAGE_BOX_MESSAGE_PARAM, WorkbenchMessageBox} from '@scion/workbench-client';\nimport {UUID} from '@scion/toolkit/uuid';\n\n/**\n * Displays the text message for the built-in message box capability.\n *\n * This component is designed to be displayed in {@link MicrofrontendHostMessageBoxComponent}.\n */\n@Component({\n  selector: 'wb-text-message',\n  styleUrls: ['./text-message.component.scss'],\n  templateUrl: './text-message.component.html',\n})\nexport default class TextMessageComponent {\n\n  protected message = inject(WorkbenchMessageBox).params.get(eMESSAGE_BOX_MESSAGE_PARAM) as string;\n}\n\n/**\n * Route for the built-in text message box capability provided by the workbench host application.\n */\nexport const TEXT_MESSAGE_BOX_CAPABILITY_ROUTE = '~/messagebox';\n/**\n * Property to identify the built-in text message box capability.\n */\nexport const TEXT_MESSAGE_BOX_CAPABILITY_IDENTITY_PROPERTY = 'ɵidentity';\n/**\n * Value to identify the built-in text message box capability.\n */\nexport const TEXT_MESSAGE_BOX_CAPABILITY_IDENTITY = UUID.randomUUID();\n","@if (message) {\n  {{message}}\n}","import {Injectable} from '@angular/core';\nimport {HostManifestInterceptor, Intention, Manifest} from '@scion/microfrontend-platform';\nimport {eMESSAGE_BOX_MESSAGE_PARAM, WorkbenchCapabilities, WorkbenchMessageBoxCapability, WorkbenchNotificationCapability} from '@scion/workbench-client';\nimport {TEXT_MESSAGE_BOX_CAPABILITY_IDENTITY, TEXT_MESSAGE_BOX_CAPABILITY_IDENTITY_PROPERTY, TEXT_MESSAGE_BOX_CAPABILITY_ROUTE} from '../microfrontend-host-message-box/text-message/text-message.component';\n\n/**\n * Intercepts the host manifest, registering workbench-specific intentions and capabilities.\n *\n * @internal\n */\n@Injectable(/* DO NOT provide via 'providedIn' metadata as only registered if microfrontend support is enabled. */)\nexport class WorkbenchHostManifestInterceptor implements HostManifestInterceptor {\n\n  public intercept(hostManifest: Manifest): void {\n    hostManifest.intentions = [\n      ...hostManifest.intentions ?? [],\n      providePerspectiveIntention(),\n      provideViewIntention(),\n    ];\n    hostManifest.capabilities = [\n      ...hostManifest.capabilities ?? [],\n      provideBuiltInTextMessageBoxCapability(),\n      provideBuiltInTextNotificationCapability(),\n    ];\n  }\n}\n\n/**\n * Provides a wildcard perspective intention for the workbench to register perspective capabilities as workbench perspectives.\n */\nfunction providePerspectiveIntention(): Intention {\n  return {\n    type: WorkbenchCapabilities.Perspective,\n    qualifier: {'*': '*'},\n  };\n}\n\n/**\n * Provides a wildcard view intention for the workbench to read view capabilities during microfrontend view routing.\n */\nfunction provideViewIntention(): Intention {\n  return {\n    type: WorkbenchCapabilities.View,\n    qualifier: {'*': '*'},\n  };\n}\n\n/**\n * Provides the built-in notification capability to display text.\n *\n * @see MicrofrontendNotificationIntentHandler\n */\nfunction provideBuiltInTextNotificationCapability(): WorkbenchNotificationCapability {\n  return {\n    type: WorkbenchCapabilities.Notification,\n    qualifier: {},\n    private: false,\n    description: 'Displays a text notification to the user.',\n  };\n}\n\n/**\n * Provides the built-in {@link WorkbenchMessageBoxCapability} to display text.\n *\n * @see MicrofrontendMessageBoxIntentHandler\n */\nfunction provideBuiltInTextMessageBoxCapability(): WorkbenchMessageBoxCapability {\n  return {\n    type: WorkbenchCapabilities.MessageBox,\n    qualifier: {},\n    params: [\n      {\n        name: eMESSAGE_BOX_MESSAGE_PARAM,\n        required: false,\n        description: 'Text to display to the user.',\n      }],\n    properties: {\n      path: TEXT_MESSAGE_BOX_CAPABILITY_ROUTE,\n      [TEXT_MESSAGE_BOX_CAPABILITY_IDENTITY_PROPERTY]: TEXT_MESSAGE_BOX_CAPABILITY_IDENTITY,\n    },\n    private: false,\n    description: 'Displays a text message to the user.',\n  };\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 {ChangeDetectionStrategy, Component} from '@angular/core';\nimport {SciThrobberComponent} from '@scion/components/throbber';\n\n@Component({\n  selector: 'wb-microfrontend-splash',\n  templateUrl: './microfrontend-splash.component.html',\n  styleUrls: ['./microfrontend-splash.component.scss'],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  imports: [SciThrobberComponent],\n})\nexport class MicrofrontendSplashComponent {\n}\n","<sci-throbber type=\"ellipsis\"/>\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 {Capability, SciRouterOutletElement} from '@scion/microfrontend-platform';\nimport {DOCUMENT, ElementRef, inject, Injector, Signal, untracked} from '@angular/core';\nimport {WorkbenchTheme, ɵTHEME_CONTEXT_KEY} from '@scion/workbench-client';\nimport {WorkbenchService} from '../../workbench.service';\nimport {Crypto} from '@scion/toolkit/crypto';\nimport {coerceElement} from '@angular/cdk/coercion';\nimport {first} from 'rxjs/operators';\nimport {rootEffect} from '../../common/root-effect';\n\n/**\n * Provides functions related to workbench themes.\n */\nexport const Microfrontends = {\n  /**\n   * Propagates the workbench theme and color scheme via contextual data to the microfrontend displayed in the given router outlet,\n   * ensuring consistent styling across microfrontends.\n   *\n   * This method must be passed an injector or called in an injection context. If used in a component, use the component's injector.\n   * Stops theme propagation when the injection context is destroyed.\n   */\n  propagateTheme: (routerOutletElement: Signal<SciRouterOutletElement | ElementRef<SciRouterOutletElement>>, options?: {injector?: Injector}): void => {\n    const injector = options?.injector ?? inject(Injector);\n    const documentRoot = injector.get(DOCUMENT).documentElement;\n    const settings = injector.get(WorkbenchService).settings;\n\n    // Run as root effect to run even if the parent component is detached from change detection (e.g., if the view is not visible).\n    rootEffect(() => {\n      const routerOutlet = coerceElement(routerOutletElement());\n      const theme = settings.theme();\n\n      untracked(() => {\n        if (theme) {\n          const colorScheme = getComputedStyle(documentRoot).colorScheme as 'light' | 'dark';\n          routerOutlet.setContextValue<WorkbenchTheme>(ɵTHEME_CONTEXT_KEY, {name: theme, colorScheme});\n          routerOutlet.setContextValue('color-scheme', colorScheme);\n        }\n        else {\n          routerOutlet.removeContextValue(ɵTHEME_CONTEXT_KEY);\n          routerOutlet.removeContextValue('color-scheme');\n        }\n      });\n    }, {injector});\n  },\n  /**\n   * Waits for contextual data to be available to embedded content.\n   *\n   * This method must be passed an injector or called in an injection context. If used in a component, use the component's injector.\n   * Stops waiting when the injection context is destroyed.\n   */\n  waitForContext: (routerOutletElement: Signal<SciRouterOutletElement | ElementRef<SciRouterOutletElement>>, name: string, options?: {injector?: Injector}): Promise<void> => {\n    const injector = options?.injector ?? inject(Injector);\n\n    return new Promise<void>(resolve => {\n      // Run as root effect to run even if the parent component is detached from change detection (e.g., if the view is not visible).\n      rootEffect(onCleanup => {\n        const routerOutlet = coerceElement(routerOutletElement());\n\n        untracked(() => {\n          const subscription = routerOutlet.contextValues$\n            .pipe(first(context => context.has(name)))\n            .subscribe(() => resolve());\n          onCleanup(() => subscription.unsubscribe());\n        });\n      }, {injector});\n    });\n  },\n  /**\n   * Creates a stable identifier for given capability.\n   */\n  createStableIdentifier: async (capability: Capability): Promise<string> => {\n    const qualifier = capability.qualifier!;\n    const application = capability.metadata!.appSymbolicName;\n\n    // Create identifier consisting of vendor and sorted qualifier entries.\n    const identifier = Object.entries(qualifier)\n      .sort(([key1], [key2]) => key1.localeCompare(key2))\n      .reduce(\n        (acc, [key, value]) => acc.concat(key).concat(`${value}`),\n        [application],\n      )\n      .join(';');\n\n    // Hash the identifier.\n    const identifierHash = await Crypto.digest(identifier);\n    // Use the first 7 digits of the hash.\n    return identifierHash.substring(0, 7);\n  },\n  /**\n   * Replaces named parameters in the given value with values contained in the given {@link Map}.\n   * Named parameters begin with a colon (`:`).\n   */\n  substituteNamedParameters,\n} as const;\n\nfunction substituteNamedParameters(value: string, params?: Map<string, unknown>): string;\nfunction substituteNamedParameters(value: string | null, params?: Map<string, unknown>): string | null;\nfunction substituteNamedParameters(value: string | undefined, params?: Map<string, unknown>): string | undefined;\nfunction substituteNamedParameters(value: string | null | undefined, params?: Map<string, unknown>): string | null | undefined {\n  if (!value || !params?.size) {\n    return value;\n  }\n  return [...params].reduce((acc, [paramKey, paramValue]) => {\n    if (paramValue === undefined) {\n      return acc;\n    }\n    return acc.replaceAll(`:${paramKey}`, `${paramValue}`);\n  }, value);\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 {Component, CUSTOM_ELEMENTS_SCHEMA, DestroyRef, effect, ElementRef, inject, untracked, viewChild} from '@angular/core';\nimport {ManifestService, MessageClient, MicrofrontendPlatformConfig, OutletRouter, SciRouterOutletElement} from '@scion/microfrontend-platform';\nimport {Logger, LoggerNames} from '../../logging';\nimport {ɵPOPUP_CONTEXT, ɵPopupContext, ɵWorkbenchCommands, ɵWorkbenchPopupMessageHeaders} from '@scion/workbench-client';\nimport {ɵPopup} from '../../popup/popup.config';\nimport {NgClass, NgComponentOutlet} from '@angular/common';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {WorkbenchLayoutService} from '../../layout/workbench-layout.service';\nimport {MicrofrontendSplashComponent} from '../microfrontend-splash/microfrontend-splash.component';\nimport {Microfrontends} from '../common/microfrontend.util';\n\n/**\n * Displays the microfrontend of a given {@link WorkbenchPopupCapability}.\n *\n * This component is designed to be displayed in a workbench popup.\n */\n@Component({\n  selector: 'wb-microfrontend-popup',\n  styleUrls: ['./microfrontend-popup.component.scss'],\n  templateUrl: './microfrontend-popup.component.html',\n  imports: [NgClass, NgComponentOutlet],\n  schemas: [CUSTOM_ELEMENTS_SCHEMA], // required because <sci-router-outlet> is a custom element\n  host: {\n    '[class.workbench-drag]': 'workbenchLayoutService.dragging()',\n  },\n})\nexport class MicrofrontendPopupComponent {\n\n  private readonly _host = inject(ElementRef).nativeElement as HTMLElement;\n  private readonly _outletRouter = inject(OutletRouter);\n  private readonly _logger = inject(Logger);\n  private readonly _routerOutletElement = viewChild.required<ElementRef<SciRouterOutletElement>>('router_outlet');\n\n  /** Splash to display until the microfrontend signals readiness. */\n  protected readonly splash = inject(MicrofrontendPlatformConfig).splash ?? MicrofrontendSplashComponent;\n  protected readonly popup = inject(ɵPopup) as ɵPopup<ɵPopupContext>;\n  protected readonly popupCapability = this.popupContext.capability;\n  protected readonly workbenchLayoutService = inject(WorkbenchLayoutService);\n\n  constructor() {\n    this._logger.debug(() => 'Constructing MicrofrontendPopupComponent.', LoggerNames.MICROFRONTEND);\n\n    this.installPopupResultListener();\n    this.installPopupCloseListener();\n    this.propagatePopupContext();\n    this.propagateWorkbenchTheme();\n\n    void this.navigate();\n\n    inject(DestroyRef).onDestroy(() => void this._outletRouter.navigate(null, {outlet: this.popup.id})); // Clear the outlet.\n  }\n\n  private async navigate(): Promise<void> {\n    const application = inject(ManifestService).getApplication(this.popupCapability.metadata!.appSymbolicName);\n    this._logger.debug(() => `Loading microfrontend into workbench popup [app=${this.popupCapability.metadata!.appSymbolicName}, baseUrl=${application.baseUrl}, path=${(this.popupCapability.properties.path)}].`, LoggerNames.MICROFRONTEND, this.popupContext.params, this.popupCapability);\n\n    // Wait for the context to be set on the router outlet, as @scion/workbench-client expects it to be available on startup.\n    await Microfrontends.waitForContext(this._routerOutletElement, ɵPOPUP_CONTEXT);\n\n    void this._outletRouter.navigate(this.popupCapability.properties.path, {\n      outlet: this.popup.id,\n      relativeTo: application.baseUrl,\n      params: this.popupContext.params,\n      pushStateToSessionHistoryStack: false,\n      showSplash: this.popupCapability.properties.showSplash,\n    });\n  }\n\n  /**\n   * Provides the popup context to embedded content.\n   */\n  private propagatePopupContext(): void {\n    effect(() => {\n      const routerOutletElement = this._routerOutletElement();\n\n      untracked(() => routerOutletElement.nativeElement.setContextValue(ɵPOPUP_CONTEXT, this.popupContext));\n    });\n  }\n\n  private installPopupResultListener(): void {\n    inject(MessageClient).observe$<unknown>(ɵWorkbenchCommands.popupResultTopic(this.popup.id))\n      .pipe(takeUntilDestroyed())\n      .subscribe(result => this.popup.setResult(result.body));\n  }\n\n  private installPopupCloseListener(): void {\n    inject(MessageClient).observe$<unknown>(ɵWorkbenchCommands.popupCloseTopic(this.popup.id))\n      .pipe(takeUntilDestroyed())\n      .subscribe(closeRequest => {\n        this.popup.close(closeRequest.headers.get(ɵWorkbenchPopupMessageHeaders.CLOSE_WITH_ERROR) ? new Error(closeRequest.body as string) : closeRequest.body);\n      });\n  }\n\n  protected onFocusWithin(event: Event): void {\n    const {detail: focusWithin} = event as CustomEvent<boolean>;\n\n    // Close the popup on focus loss.\n    if (this.popupContext.closeOnFocusLost && !focusWithin) {\n      this.popup.close(this.popup.result);\n    }\n\n    if (focusWithin) {\n      this._host.dispatchEvent(new CustomEvent('sci-microfrontend-focusin', {bubbles: true}));\n    }\n  }\n\n  private propagateWorkbenchTheme(): void {\n    Microfrontends.propagateTheme(this._routerOutletElement);\n  }\n\n  private get popupContext(): ɵPopupContext {\n    return this.popup.input!;\n  }\n}\n","<sci-router-outlet #router_outlet\n                   [name]=\"popup.id\"\n                   [attr.data-capabilityid]=\"popupCapability.metadata!.id\"\n                   [attr.data-app]=\"popupCapability.metadata!.appSymbolicName\"\n                   [ngClass]=\"popup.cssClasses\" class=\"e2e-popup\"\n                   keystrokes=\"keydown.escape\"\n                   (focuswithin)=\"onFocusWithin($event)\">\n  <ng-container *ngComponentOutlet=\"splash\"/>\n</sci-router-outlet>\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\n/**\n * Returns the error message if given an error object, or the `toString` representation otherwise.\n */\nexport function stringifyError(error: unknown): string {\n  if (error instanceof Error) {\n    return error.message;\n  }\n  return `${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 {Component, DestroyRef, inject, Injector, runInInjectionContext, StaticProvider} from '@angular/core';\nimport {WorkbenchPopup, ɵPopupContext} from '@scion/workbench-client';\nimport {Routing} from '../../routing/routing.util';\nimport {Commands} from '../../routing/routing.model';\nimport {Router, RouterOutlet} from '@angular/router';\nimport {Popup, ɵPopup} from '../../popup/popup.config';\nimport {NgTemplateOutlet} from '@angular/common';\nimport {Defined} from '@scion/toolkit/util';\nimport {POPUP_ID_PREFIX} from '../../workbench.constants';\nimport {Microfrontends} from '../common/microfrontend.util';\nimport {ANGULAR_ROUTER_MUTEX} from '../../executor/single-task-executor';\nimport {Objects} from '../../common/objects.util';\n\n/**\n * Displays the microfrontend of a popup capability provided by the host inside a workbench popup.\n *\n * Unlike {@link MicrofrontendPopupComponent}, this component uses a `<router-outlet>` instead of a `<sci-router-outlet>`\n * because integrating the microfrontend directly via Angular router and not via iframe.\n */\n@Component({\n  selector: 'wb-microfrontend-host-popup',\n  styleUrls: ['./microfrontend-host-popup.component.scss'],\n  templateUrl: './microfrontend-host-popup.component.html',\n  imports: [\n    RouterOutlet,\n    NgTemplateOutlet,\n  ],\n})\nexport class MicrofrontendHostPopupComponent {\n\n  private readonly _injector = inject(Injector);\n  private readonly _router = inject(Router);\n  /** Mutex to serialize Angular Router navigation requests, preventing the cancellation of previously initiated asynchronous navigations. */\n  private readonly _angularRouterMutex = inject(ANGULAR_ROUTER_MUTEX);\n\n  protected readonly outletName: string;\n  protected readonly outletInjector: Injector;\n\n  constructor() {\n    const popup = inject(ɵPopup) as ɵPopup<ɵPopupContext>;\n\n    const popupContext = popup.input!;\n    const capability = popupContext.capability;\n    const path = Defined.orElseThrow(capability.properties.path, () => Error(`[PopupProviderError] Missing required path for popup capability [application=\"${capability.metadata!.appSymbolicName}\", capability=${Objects.toMatrixNotation(capability.qualifier)}]`));\n    const params = popupContext.params;\n    this.outletName = POPUP_ID_PREFIX.concat(popup.id);\n    this.outletInjector = Injector.create({\n      parent: this._injector,\n      providers: [provideWorkbenchPopupHandle(popupContext)],\n    });\n\n    // Perform navigation in the named router outlet.\n    void this.navigate(path, {outletName: this.outletName, params}).then(success => {\n      if (!success) {\n        popup.close(Error('[PopupNavigateError] Navigation canceled, most likely by a route guard or a parallel navigation.'));\n      }\n    });\n\n    inject(DestroyRef).onDestroy(() => void this.navigate(null, {outletName: this.outletName})); // Remove the outlet from the URL\n  }\n\n  /**\n   * Performs navigation in the specified outlet, substituting path params if any. To clear navigation, pass `null` as the path.\n   */\n  private navigate(path: string | null, extras: {outletName: string; params?: Map<string, any>}): Promise<boolean> {\n    path = Microfrontends.substituteNamedParameters(path, extras.params);\n\n    const outletCommands: Commands | null = (path !== null ? runInInjectionContext(this._injector, () => Routing.pathToCommands(path)) : null);\n    const commands: Commands = [{outlets: {[extras.outletName]: outletCommands}}];\n    return this._angularRouterMutex.submit(() => this._router.navigate(commands, {skipLocationChange: true, queryParamsHandling: 'preserve'}));\n  }\n}\n\n/**\n * Provides the {WorkbenchPopup} handle to the routed component.\n */\nfunction provideWorkbenchPopupHandle(popupContext: ɵPopupContext): StaticProvider {\n  return {\n    provide: WorkbenchPopup,\n    useFactory: (): WorkbenchPopup => {\n      const popup = inject(Popup);\n\n      return new class implements WorkbenchPopup {\n        public readonly capability = popupContext.capability;\n        public readonly params = popupContext.params;\n        public readonly referrer = popupContext.referrer;\n\n        public setResult(result?: unknown): void {\n          popup.setResult(result);\n        }\n\n        public close(result?: unknown | Error): void {\n          popup.close(result);\n        }\n\n        public signalReady(): void {\n          // nothing to do since not an iframe-based microfrontend\n        }\n      }();\n    },\n  };\n}\n","<ng-container *ngTemplateOutlet=\"router_outlet; injector: outletInjector\"/>\n\n<ng-template #router_outlet>\n  <router-outlet [name]=\"outletName\"/>\n</ng-template>\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 {WorkbenchViewCapability} from '@scion/workbench-client';\nimport {Params} from '@angular/router';\n\n/**\n * Represents a view that displays a microfrontend.\n *\n * This type is registered as adapter in {@link ɵWorkbenchView}, allowing adaptation of views displaying a microfrontend.\n *\n * @see ɵWorkbenchView.adapt\n */\nexport class MicrofrontendWorkbenchView {\n\n  constructor(public readonly capability: WorkbenchViewCapability, public readonly params: Params) {\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 {inject, Injectable} from '@angular/core';\nimport {APP_IDENTITY, Handler, IntentInterceptor, IntentMessage, mapToBody, MessageClient, MessageHeaders, ResponseStatusCodes} from '@scion/microfrontend-platform';\nimport {WorkbenchCapabilities, WorkbenchPopupCapability, WorkbenchPopupReferrer, ɵPopupContext, ɵWorkbenchCommands, ɵWorkbenchPopupCommand} from '@scion/workbench-client';\nimport {MicrofrontendPopupComponent} from './microfrontend-popup.component';\nimport {Observable} from 'rxjs';\nimport {Logger, LoggerNames} from '../../logging';\nimport {Beans} from '@scion/toolkit/bean-manager';\nimport {stringifyError} from '../../common/stringify-error.util';\nimport {Arrays, Maps} from '@scion/toolkit/util';\nimport {PopupService} from '../../popup/popup.service';\nimport {PopupOrigin} from '../../popup/popup.origin';\nimport {WORKBENCH_VIEW_REGISTRY} from '../../view/workbench-view.registry';\nimport {MicrofrontendHostPopupComponent} from '../microfrontend-host-popup/microfrontend-host-popup.component';\nimport {MicrofrontendWorkbenchView} from '../microfrontend-view/microfrontend-workbench-view.model';\n\n/**\n * Handles popup intents, instructing the workbench to open a popup with the microfrontend declared on the resolved capability.\n *\n * Microfrontends of the host are displayed in {@link MicrofrontendHostPopupComponent}, microfrontends of other applications in {@link MicrofrontendPopupComponent}.\n *\n * Popup intents are handled in this interceptor and are not transported to the providing application, enabling support for applications\n * that are not connected to the SCION Workbench.\n */\n@Injectable(/* DO NOT provide via 'providedIn' metadata as only registered if microfrontend support is enabled. */)\nexport class MicrofrontendPopupIntentHandler implements IntentInterceptor {\n\n  private readonly _popupService = inject(PopupService);\n  private readonly _viewRegistry = inject(WORKBENCH_VIEW_REGISTRY);\n  private readonly _logger = inject(Logger);\n  private readonly _openedPopups = new Set<string>();\n\n  /**\n   * Popup intents are handled in this interceptor and then swallowed.\n   */\n  public intercept(intentMessage: IntentMessage, next: Handler<IntentMessage>): Promise<void> {\n    if (intentMessage.intent.type === WorkbenchCapabilities.Popup) {\n      const popupIntentMessage = intentMessage as IntentMessage<ɵWorkbenchPopupCommand>;\n      // Do not block the call until the popup is closed.\n      // Otherwise, the caller may receive a timeout error if not closing the popup before delivery confirmation expires.\n      this.consumePopupIntent(popupIntentMessage).catch((error: unknown) => this._logger.error('[PopupOpenError] Failed to open popup.', LoggerNames.MICROFRONTEND, intentMessage, error));\n      return Promise.resolve();\n    }\n    else {\n      return next.handle(intentMessage);\n    }\n  }\n\n  private async consumePopupIntent(message: IntentMessage<ɵWorkbenchPopupCommand>): Promise<void> {\n    const popupId = message.body!.popupId;\n    const replyTo = message.headers.get(MessageHeaders.ReplyTo) as string;\n\n    // Ignore subsequent intents if a popup is already open, as it would lead to the first popup being closed.\n    if (this._openedPopups.has(popupId)) {\n      this._logger.warn('Ignoring popup intent because multiple popup providers found that match the popup intent. Most likely this is not intended and may indicate an incorrect manifest configuration.', message.intent);\n      return;\n    }\n\n    this._openedPopups.add(popupId);\n    try {\n      const result = await this.openPopup(message);\n      // Use 'Beans.opt' to not error if the platform is destroyed, e.g., in tests if not closing popups.\n      await Beans.opt(MessageClient)?.publish(replyTo, result, {headers: new Map().set(MessageHeaders.Status, ResponseStatusCodes.TERMINAL)});\n    }\n    catch (error) {\n      // Use 'Beans.opt' to not error if the platform is destroyed, e.g., in tests if not closing popups.\n      await Beans.opt(MessageClient)?.publish(replyTo, stringifyError(error), {headers: new Map().set(MessageHeaders.Status, ResponseStatusCodes.ERROR)});\n    }\n    finally {\n      this._openedPopups.delete(popupId);\n    }\n  }\n\n  /**\n   * Opens the microfrontend declared by the resolved capability in a popup.\n   */\n  private async openPopup(message: IntentMessage<ɵWorkbenchPopupCommand>): Promise<unknown> {\n    const command = message.body!;\n    const capability = message.capability as WorkbenchPopupCapability;\n    const isHostProvider = capability.metadata!.appSymbolicName === Beans.get(APP_IDENTITY);\n    this._logger.debug(() => 'Handling microfrontend popup command', LoggerNames.MICROFRONTEND, command);\n\n    const popupContext: ɵPopupContext = {\n      popupId: command.popupId,\n      capability: capability,\n      params: new Map([\n        ...Maps.coerce(message.intent.params),\n        ...Maps.coerce(message.intent.qualifier),\n      ]),\n      closeOnFocusLost: command.closeStrategy?.onFocusLost ?? true,\n      referrer: this.getReferrer(command),\n    };\n\n    return this._popupService.open({\n      id: command.popupId,\n      component: isHostProvider ? MicrofrontendHostPopupComponent : MicrofrontendPopupComponent,\n      input: popupContext,\n      anchor: this.observePopupOrigin$(command),\n      context: command.context,\n      align: command.align,\n      size: capability.properties.size,\n      closeStrategy: isHostProvider ? command.closeStrategy : {\n        ...command.closeStrategy,\n        onFocusLost: false, // Closing the popup on focus loss is handled in {MicrofrontendPopupComponent}\n      },\n      cssClass: Arrays.coerce(capability.properties.cssClass).concat(Arrays.coerce(command.cssClass)),\n    });\n  }\n\n  /**\n   * Constructs an Observable that, upon subscription, emits the position of the popup anchor, and then each time it is repositioned.\n   */\n  private observePopupOrigin$(command: ɵWorkbenchPopupCommand): Observable<PopupOrigin> {\n    return Beans.get(MessageClient).observe$<PopupOrigin>(ɵWorkbenchCommands.popupOriginTopic(command.popupId)).pipe(mapToBody());\n  }\n\n  /**\n   * Returns information about the context in which a popup was opened.\n   */\n  private getReferrer(command: ɵWorkbenchPopupCommand): WorkbenchPopupReferrer {\n    if (!command.context?.viewId) {\n      return {};\n    }\n\n    const view = this._viewRegistry.get(command.context.viewId);\n    return {\n      viewId: view.id,\n      viewCapabilityId: view.adapt(MicrofrontendWorkbenchView)?.capability.metadata!.id,\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 {Capability, CapabilityInterceptor} from '@scion/microfrontend-platform';\nimport {Injectable} from '@angular/core';\nimport {WorkbenchCapabilities, WorkbenchPopupCapability} from '@scion/workbench-client';\nimport {Objects} from '../../common/objects.util';\n\n/**\n * Asserts popup capabilities to have required properties.\n */\n@Injectable(/* DO NOT provide via 'providedIn' metadata as only registered if microfrontend support is enabled. */)\nexport class MicrofrontendPopupCapabilityValidator implements CapabilityInterceptor {\n\n  public async intercept(capability: Capability): Promise<Capability> {\n    if (capability.type !== WorkbenchCapabilities.Popup) {\n      return capability;\n    }\n\n    const popupCapability = capability as Partial<WorkbenchPopupCapability>;\n    // Assert the popup capability to have a qualifier set.\n    if (!Object.keys(popupCapability.qualifier ?? {}).length) {\n      throw Error(`[NullQualifierError] Popup capability requires a qualifier [capability=${JSON.stringify(popupCapability)}]`);\n    }\n\n    // Assert the popup capability to have a \"properties\" section.\n    if (!popupCapability.properties) {\n      throw Error(`[NullPropertiesError] Popup capability requires a \"properties\" section [application=\"${popupCapability.metadata!.appSymbolicName}\", capability=\"${Objects.toMatrixNotation(popupCapability.qualifier)}\"]`);\n    }\n\n    // Assert the popup capability to have a path set.\n    const path = popupCapability.properties.path as unknown;\n    if (path === undefined || path === null) {\n      throw Error(`[NullPathError] Popup capability requires a path to the microfrontend in its properties [application=\"${popupCapability.metadata!.appSymbolicName}\", capability=\"${Objects.toMatrixNotation(popupCapability.qualifier)}\"]`);\n    }\n\n    return capability;\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 {Component, DestroyRef, effect, ElementRef, inject, Injector, input, runInInjectionContext, StaticProvider, untracked} from '@angular/core';\nimport {WorkbenchMessageBox, WorkbenchMessageBoxCapability} from '@scion/workbench-client';\nimport {Routing} from '../../routing/routing.util';\nimport {Commands} from '../../routing/routing.model';\nimport {Router, RouterOutlet} from '@angular/router';\nimport {NgTemplateOutlet} from '@angular/common';\nimport {MESSAGE_BOX_ID_PREFIX} from '../../workbench.constants';\nimport {UUID} from '@scion/toolkit/uuid';\nimport {ɵWorkbenchDialog} from '../../dialog/ɵworkbench-dialog';\nimport {Microfrontends} from '../common/microfrontend.util';\nimport {ANGULAR_ROUTER_MUTEX} from '../../executor/single-task-executor';\nimport {setStyle} from '../../common/dom.util';\n\n/**\n * Navigates to the microfrontend of a given {@link WorkbenchMessageBoxCapability} via {@link Router}.\n *\n * Unlike {@link MicrofrontendMessageBoxComponent}, this component uses a `<router-outlet>` instead of a `<sci-router-outlet>`\n * to allow direct integration of the content provided by the workbench host application via the Angular router.\n *\n * This component is designed to be displayed in a workbench message box.\n */\n@Component({\n  selector: 'wb-microfrontend-host-message-box',\n  styleUrls: ['./microfrontend-host-message-box.component.scss'],\n  templateUrl: './microfrontend-host-message-box.component.html',\n  imports: [\n    RouterOutlet,\n    NgTemplateOutlet,\n  ],\n})\nexport class MicrofrontendHostMessageBoxComponent {\n\n  public readonly capability = input.required<WorkbenchMessageBoxCapability>();\n  public readonly params = input.required<Map<string, unknown>>();\n\n  private readonly _host = inject(ElementRef).nativeElement as HTMLElement;\n  private readonly _dialog = inject(ɵWorkbenchDialog);\n  private readonly _injector = inject(Injector);\n  private readonly _router = inject(Router);\n  /** Mutex to serialize Angular Router navigation requests, preventing the cancellation of previously initiated asynchronous navigations. */\n  private readonly _angularRouterMutex = inject(ANGULAR_ROUTER_MUTEX);\n\n  protected readonly outletName = MESSAGE_BOX_ID_PREFIX.concat(UUID.randomUUID());\n\n  protected outletInjector!: Injector;\n\n  constructor() {\n    this.setMessageBoxProperties();\n    this.createOutletInjector();\n    this.navigateCapability();\n\n    inject(DestroyRef).onDestroy(() => void this.navigate(null)); // Remove the outlet from the URL\n  }\n\n  private navigateCapability(): void {\n    effect(() => {\n      const capability = this.capability();\n      const params = this.params();\n\n      untracked(() => {\n        void this.navigate(capability.properties.path, {params}).then(success => {\n          if (!success) {\n            this._dialog.close(Error('[MessageBoxNavigateError] Navigation canceled, most likely by a route guard or a parallel navigation.'));\n          }\n        });\n      });\n    });\n  }\n\n  /**\n   * Performs navigation in the named outlet, substituting path params if any. To clear navigation, pass `null` as the path.\n   */\n  private navigate(path: string | null, extras?: {params?: Map<string, any>}): Promise<boolean> {\n    path = Microfrontends.substituteNamedParameters(path, extras?.params);\n\n    const outletCommands: Commands | null = (path !== null ? runInInjectionContext(this._injector, () => Routing.pathToCommands(path)) : null);\n    const commands: Commands = [{outlets: {[this.outletName]: outletCommands}}];\n    return this._angularRouterMutex.submit(() => this._router.navigate(commands, {skipLocationChange: true, queryParamsHandling: 'preserve'}));\n  }\n\n  private createOutletInjector(): void {\n    effect(() => {\n      const capability = this.capability();\n      const params = this.params();\n\n      untracked(() => {\n        this.outletInjector = Injector.create({\n          parent: this._injector,\n          providers: [provideWorkbenchClientMessageBoxHandle(capability, params)],\n        });\n      });\n    });\n  }\n\n  private setMessageBoxProperties(): void {\n    effect(() => {\n      const properties = this.capability().properties;\n\n      untracked(() => {\n        setStyle(this._host, {\n          'width': properties.size?.width ?? null,\n          'min-width': properties.size?.minWidth ?? null,\n          'max-width': properties.size?.maxWidth ?? null,\n          'height': properties.size?.height ?? null,\n          'min-height': properties.size?.minHeight ?? null,\n          'max-height': properties.size?.maxHeight ?? null,\n        });\n      });\n    });\n  }\n}\n\n/**\n * Provides the {WorkbenchMessageBox} handle to the routed component.\n */\nexport function provideWorkbenchClientMessageBoxHandle(capability: WorkbenchMessageBoxCapability, params: Map<string, unknown>): StaticProvider {\n  return {\n    provide: WorkbenchMessageBox,\n    useFactory: (): WorkbenchMessageBox => {\n\n      return new class implements WorkbenchMessageBox {\n        public readonly capability = capability;\n        public readonly params = params;\n\n        public signalReady(): void {\n          // nothing to do since not an iframe-based microfrontend\n        }\n      }();\n    },\n  };\n}\n","<ng-container *ngTemplateOutlet=\"router_outlet; injector: outletInjector\"/>\n\n<ng-template #router_outlet>\n  <router-outlet [name]=\"outletName\"/>\n</ng-template>\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 {Component, CUSTOM_ELEMENTS_SCHEMA, DestroyRef, effect, ElementRef, inject, Injector, input, untracked, viewChild} from '@angular/core';\nimport {ManifestService, MicrofrontendPlatformConfig, OutletRouter, SciRouterOutletElement} from '@scion/microfrontend-platform';\nimport {Logger, LoggerNames} from '../../logging';\nimport {WorkbenchMessageBoxCapability, ɵMESSAGE_BOX_CONTEXT, ɵMessageBoxContext} from '@scion/workbench-client';\nimport {NgComponentOutlet} from '@angular/common';\nimport {WorkbenchLayoutService} from '../../layout/workbench-layout.service';\nimport {MicrofrontendSplashComponent} from '../microfrontend-splash/microfrontend-splash.component';\nimport {UUID} from '@scion/toolkit/uuid';\nimport {setStyle} from '../../common/dom.util';\nimport {Microfrontends} from '../common/microfrontend.util';\n\n/**\n * Displays the microfrontend of a given {@link WorkbenchMessageBoxCapability}.\n *\n * This component is designed to be displayed in a workbench message box.\n */\n@Component({\n  selector: 'wb-microfrontend-message-box',\n  styleUrls: ['./microfrontend-message-box.component.scss'],\n  templateUrl: './microfrontend-message-box.component.html',\n  imports: [\n    NgComponentOutlet,\n  ],\n  schemas: [CUSTOM_ELEMENTS_SCHEMA], // required because <sci-router-outlet> is a custom element\n  host: {\n    '[class.workbench-drag]': 'workbenchLayoutService.dragging()',\n  },\n})\nexport class MicrofrontendMessageBoxComponent {\n\n  public readonly capability = input.required<WorkbenchMessageBoxCapability>();\n  public readonly params = input.required<Map<string, unknown>>();\n\n  private readonly _outletRouter = inject(OutletRouter);\n  private readonly _logger = inject(Logger);\n  private readonly _routerOutletElement = viewChild.required<ElementRef<SciRouterOutletElement>>('router_outlet');\n\n  /** Splash to display until the microfrontend signals readiness. */\n  protected readonly splash = inject(MicrofrontendPlatformConfig).splash ?? MicrofrontendSplashComponent;\n  protected readonly outletName = UUID.randomUUID();\n  protected readonly workbenchLayoutService = inject(WorkbenchLayoutService);\n\n  constructor() {\n    this._logger.debug(() => 'Constructing MicrofrontendMessageBoxComponent.', LoggerNames.MICROFRONTEND);\n    this.setMessageBoxProperties();\n    this.propagateMessageBoxContext();\n    this.propagateWorkbenchTheme();\n    this.installNavigator();\n\n    inject(DestroyRef).onDestroy(() => void this._outletRouter.navigate(null, {outlet: this.outletName})); // Clear the outlet.\n  }\n\n  private installNavigator(): void {\n    const manifestService = inject(ManifestService);\n    const injector = inject(Injector);\n\n    effect(() => {\n      const capability = this.capability();\n      const params = this.params();\n\n      void untracked(async () => {\n        const application = manifestService.getApplication(capability.metadata!.appSymbolicName);\n        this._logger.debug(() => `Loading microfrontend into workbench message box [app=${capability.metadata!.appSymbolicName}, baseUrl=${application.baseUrl}, path=${capability.properties.path}].`, LoggerNames.MICROFRONTEND, params, capability);\n\n        // Wait for the context to be set on the router outlet, as @scion/workbench-client expects it to be available on startup.\n        await Microfrontends.waitForContext(this._routerOutletElement, ɵMESSAGE_BOX_CONTEXT, {injector});\n\n        void this._outletRouter.navigate(capability.properties.path, {\n          outlet: this.outletName,\n          relativeTo: application.baseUrl,\n          params: params,\n          pushStateToSessionHistoryStack: false,\n          showSplash: capability.properties.showSplash,\n        });\n      });\n    });\n  }\n\n  /**\n   * Provides the message box context to embedded content.\n   */\n  private propagateMessageBoxContext(): void {\n    effect(() => {\n      const context: ɵMessageBoxContext = {\n        capability: this.capability(),\n        params: this.params(),\n      };\n      const routerOutletElement = this._routerOutletElement().nativeElement;\n\n      untracked(() => routerOutletElement.setContextValue(ɵMESSAGE_BOX_CONTEXT, context));\n    });\n  }\n\n  private setMessageBoxProperties(): void {\n    effect(() => {\n      const routerOutletElement = this._routerOutletElement();\n      const properties = this.capability().properties;\n\n      untracked(() => {\n        setStyle(routerOutletElement, {\n          'width': properties.size?.width ?? '0', // allow content size to go bellow the default iframe size when reporting preferred size\n          'min-width': properties.size?.minWidth ?? null,\n          'max-width': properties.size?.maxWidth ?? null,\n          'height': properties.size?.height ?? '0', // allow content size to go bellow the default iframe size when reporting preferred size\n          'min-height': properties.size?.minHeight ?? null,\n          'max-height': properties.size?.maxHeight ?? null,\n        });\n      });\n    });\n  }\n\n  private propagateWorkbenchTheme(): void {\n    Microfrontends.propagateTheme(this._routerOutletElement);\n  }\n}\n","<sci-router-outlet #router_outlet\n                   [name]=\"outletName\"\n                   [attr.data-capabilityid]=\"capability().metadata!.id\"\n                   [attr.data-app]=\"capability().metadata!.appSymbolicName\"\n                   keystrokes=\"keydown.escape\">\n  <ng-container *ngComponentOutlet=\"splash\"/>\n</sci-router-outlet>\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 {inject, Injectable} from '@angular/core';\nimport {APP_IDENTITY, Handler, IntentInterceptor, IntentMessage, MessageClient, MessageHeaders, ResponseStatusCodes} from '@scion/microfrontend-platform';\nimport {WorkbenchCapabilities, WorkbenchMessageBoxCapability, WorkbenchMessageBoxOptions} from '@scion/workbench-client';\nimport {Logger, LoggerNames} from '../../logging';\nimport {Beans} from '@scion/toolkit/bean-manager';\nimport {stringifyError} from '../../common/stringify-error.util';\nimport {WorkbenchMessageBoxService} from '../../message-box/workbench-message-box.service';\nimport {Arrays} from '@scion/toolkit/util';\nimport {MicrofrontendHostMessageBoxComponent} from '../microfrontend-host-message-box/microfrontend-host-message-box.component';\nimport {MicrofrontendMessageBoxComponent} from './microfrontend-message-box.component';\n\n/**\n * Handles messagebox intents, instructing the workbench to open a message box with the microfrontend declared on the resolved capability.\n *\n * Microfrontends of the host are displayed in {@link MicrofrontendHostMessageBoxComponent}, microfrontends of other applications in {@link MicrofrontendMessageBoxComponent}.\n *\n * Message box intents are handled in this interceptor and are not transported to the providing application, enabling support for applications\n * that are not connected to the SCION Workbench.\n */\n@Injectable(/* DO NOT provide via 'providedIn' metadata as only registered if microfrontend support is enabled. */)\nexport class MicrofrontendMessageBoxIntentHandler implements IntentInterceptor {\n\n  private readonly _messageBoxService = inject(WorkbenchMessageBoxService);\n  private readonly _logger = inject(Logger);\n\n  /**\n   * Message box intents are handled in this interceptor and then swallowed.\n   */\n  public intercept(intentMessage: IntentMessage, next: Handler<IntentMessage>): Promise<void> {\n    if (intentMessage.intent.type === WorkbenchCapabilities.MessageBox) {\n      const messageBoxIntentMessage = intentMessage as IntentMessage<WorkbenchMessageBoxOptions>;\n      // Do not block the call until the message box is closed.\n      // Otherwise, the caller may receive a timeout error if not closing the message box before delivery confirmation expires.\n      this.consumeMessageBoxIntent(messageBoxIntentMessage).catch((error: unknown) => this._logger.error('[MessageBoxOpenError] Failed to open message box.', LoggerNames.MICROFRONTEND, intentMessage, error));\n      // Swallow the intent and do not pass it to other interceptors or handlers down the chain.\n      return Promise.resolve();\n    }\n    else {\n      return next.handle(intentMessage);\n    }\n  }\n\n  private async consumeMessageBoxIntent(message: IntentMessage<WorkbenchMessageBoxOptions>): Promise<void> {\n    const replyTo = message.headers.get(MessageHeaders.ReplyTo) as string;\n\n    try {\n      const result = await this.openMessageBox(message);\n      // Use 'Beans.opt' to not error if the platform is destroyed, e.g., in tests if not closing message boxes.\n      await Beans.opt(MessageClient)?.publish(replyTo, result, {headers: new Map().set(MessageHeaders.Status, ResponseStatusCodes.TERMINAL)});\n    }\n    catch (error) {\n      // Use 'Beans.opt' to not error if the platform is destroyed, e.g., in tests if not closing message boxes.\n      await Beans.opt(MessageClient)?.publish(replyTo, stringifyError(error), {headers: new Map().set(MessageHeaders.Status, ResponseStatusCodes.ERROR)});\n    }\n  }\n\n  /**\n   * Opens the microfrontend declared by the resolved capability in a message box.\n   */\n  private async openMessageBox(message: IntentMessage<WorkbenchMessageBoxOptions>): Promise<unknown> {\n    const options = message.body ?? {};\n    const capability = message.capability as WorkbenchMessageBoxCapability;\n    const params = message.intent.params ?? new Map();\n    const isHostProvider = capability.metadata!.appSymbolicName === Beans.get(APP_IDENTITY);\n\n    this._logger.debug(() => 'Handling microfrontend messagebox intent', LoggerNames.MICROFRONTEND, options);\n    return this._messageBoxService.open(isHostProvider ? MicrofrontendHostMessageBoxComponent : MicrofrontendMessageBoxComponent, {\n      inputs: {capability, params},\n      title: options.title,\n      actions: options.actions,\n      severity: options.severity,\n      modality: options.modality,\n      contentSelectable: options.contentSelectable,\n      cssClass: Arrays.coerce(capability.properties.cssClass).concat(Arrays.coerce(options.cssClass)),\n      context: options.context,\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 {Component, CUSTOM_ELEMENTS_SCHEMA, DestroyRef, effect, ElementRef, inject, Injector, input, untracked, viewChild} from '@angular/core';\nimport {ManifestService, MessageClient, MicrofrontendPlatformConfig, OutletRouter, SciRouterOutletElement} from '@scion/microfrontend-platform';\nimport {Logger, LoggerNames} from '../../logging';\nimport {WorkbenchDialogCapability, ɵDIALOG_CONTEXT, ɵDialogContext, ɵWorkbenchCommands, ɵWorkbenchDialogMessageHeaders} from '@scion/workbench-client';\nimport {NgComponentOutlet} from '@angular/common';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {WorkbenchLayoutService} from '../../layout/workbench-layout.service';\nimport {MicrofrontendSplashComponent} from '../microfrontend-splash/microfrontend-splash.component';\nimport {ɵWorkbenchDialog} from '../../dialog/ɵworkbench-dialog';\nimport {Microfrontends} from '../common/microfrontend.util';\n\n/**\n * Displays the microfrontend of a given {@link WorkbenchDialogCapability}.\n *\n * This component is designed to be displayed in a workbench dialog.\n */\n@Component({\n  selector: 'wb-microfrontend-dialog',\n  styleUrls: ['./microfrontend-dialog.component.scss'],\n  templateUrl: './microfrontend-dialog.component.html',\n  imports: [\n    NgComponentOutlet,\n  ],\n  schemas: [CUSTOM_ELEMENTS_SCHEMA], // required because <sci-router-outlet> is a custom element\n  host: {\n    '[class.workbench-drag]': 'workbenchLayoutService.dragging()',\n  },\n})\nexport class MicrofrontendDialogComponent {\n\n  public readonly capability = input.required<WorkbenchDialogCapability>();\n  public readonly params = input.required<Map<string, unknown>>();\n\n  private readonly _outletRouter = inject(OutletRouter);\n  private readonly _logger = inject(Logger);\n  private readonly _routerOutletElement = viewChild.required<ElementRef<SciRouterOutletElement>>('router_outlet');\n\n  protected readonly dialog = inject(ɵWorkbenchDialog);\n  /** Splash to display until the microfrontend signals readiness. */\n  protected readonly splash = inject(MicrofrontendPlatformConfig).splash ?? MicrofrontendSplashComponent;\n  protected readonly workbenchLayoutService = inject(WorkbenchLayoutService);\n\n  constructor() {\n    this._logger.debug(() => 'Constructing MicrofrontendDialogComponent.', LoggerNames.MICROFRONTEND);\n\n    this.installDialogTitleListener();\n    this.installDialogCloseListener();\n    this.setDialogProperties();\n    this.propagateDialogContext();\n    this.propagateWorkbenchTheme();\n    this.installNavigator();\n\n    inject(DestroyRef).onDestroy(() => void this._outletRouter.navigate(null, {outlet: this.dialog.id})); // Clear the outlet.\n  }\n\n  private installNavigator(): void {\n    const manifestService = inject(ManifestService);\n    const injector = inject(Injector);\n\n    effect(() => {\n      const capability = this.capability();\n      const params = this.params();\n\n      void untracked(async () => {\n        const application = manifestService.getApplication(capability.metadata!.appSymbolicName);\n        this._logger.debug(() => `Loading microfrontend into workbench dialog [app=${capability.metadata!.appSymbolicName}, baseUrl=${application.baseUrl}, path=${capability.properties.path}].`, LoggerNames.MICROFRONTEND, params, capability);\n\n        // Wait for the context to be set on the router outlet, as @scion/workbench-client expects it to be available on startup.\n        await Microfrontends.waitForContext(this._routerOutletElement, ɵDIALOG_CONTEXT, {injector});\n\n        void this._outletRouter.navigate(capability.properties.path, {\n          outlet: this.dialog.id,\n          relativeTo: application.baseUrl,\n          params: params,\n          pushStateToSessionHistoryStack: false,\n          showSplash: capability.properties.showSplash,\n        });\n      });\n    });\n  }\n\n  /**\n   * Provides the dialog context to embedded content.\n   */\n  private propagateDialogContext(): void {\n    effect(() => {\n      const context: ɵDialogContext = {\n        dialogId: this.dialog.id,\n        capability: this.capability(),\n        params: this.params(),\n      };\n      const routerOutletElement = this._routerOutletElement().nativeElement;\n\n      untracked(() => routerOutletElement.setContextValue(ɵDIALOG_CONTEXT, context));\n    });\n  }\n\n  private setDialogProperties(): void {\n    effect(() => {\n      const properties = this.capability().properties;\n      const params = this.params();\n\n      untracked(() => {\n        this.dialog.size.width = properties.size!.width;\n        this.dialog.size.height = properties.size!.height;\n        this.dialog.size.minWidth = properties.size!.minWidth;\n        this.dialog.size.maxWidth = properties.size!.maxWidth;\n        this.dialog.size.minHeight = properties.size!.minHeight;\n        this.dialog.size.maxHeight = properties.size!.maxHeight;\n\n        this.dialog.title = Microfrontends.substituteNamedParameters(properties.title, params);\n        this.dialog.closable = properties.closable ?? true;\n        this.dialog.resizable = properties.resizable ?? true;\n        this.dialog.padding = properties.padding ?? false;\n      });\n    });\n  }\n\n  private propagateWorkbenchTheme(): void {\n    Microfrontends.propagateTheme(this._routerOutletElement);\n  }\n\n  private installDialogCloseListener(): void {\n    inject(MessageClient).observe$<unknown>(ɵWorkbenchCommands.dialogCloseTopic(this.dialog.id))\n      .pipe(takeUntilDestroyed())\n      .subscribe(closeRequest => {\n        this.dialog.close(closeRequest.headers.get(ɵWorkbenchDialogMessageHeaders.CLOSE_WITH_ERROR) ? new Error(closeRequest.body as string) : closeRequest.body);\n      });\n  }\n\n  private installDialogTitleListener(): void {\n    inject(MessageClient).observe$<string>(ɵWorkbenchCommands.dialogTitleTopic(this.dialog.id))\n      .pipe(takeUntilDestroyed())\n      .subscribe(message => {\n        this.dialog.title = message.body;\n      });\n  }\n}\n","<sci-router-outlet #router_outlet\n                   [name]=\"dialog.id\"\n                   [attr.data-capabilityid]=\"capability().metadata!.id\"\n                   [attr.data-app]=\"capability().metadata!.appSymbolicName\"\n                   keystrokes=\"keydown.escape\">\n  <ng-container *ngComponentOutlet=\"splash\"/>\n</sci-router-outlet>\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 {Component, DestroyRef, effect, inject, Injector, input, runInInjectionContext, StaticProvider, untracked} from '@angular/core';\nimport {WorkbenchDialog as WorkbenchClientDialog, WorkbenchDialogCapability} from '@scion/workbench-client';\nimport {Routing} from '../../routing/routing.util';\nimport {Commands} from '../../routing/routing.model';\nimport {Router, RouterOutlet} from '@angular/router';\nimport {ɵWorkbenchDialog} from '../../dialog/ɵworkbench-dialog';\nimport {NgTemplateOutlet} from '@angular/common';\nimport {DIALOG_ID_PREFIX} from '../../workbench.constants';\nimport {Observable, Subject} from 'rxjs';\nimport {Microfrontends} from '../common/microfrontend.util';\nimport {ANGULAR_ROUTER_MUTEX} from '../../executor/single-task-executor';\nimport {Observables} from '@scion/toolkit/util';\nimport {takeUntil} from 'rxjs/operators';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\n\n/**\n * Navigates to the microfrontend of a given {@link WorkbenchDialogCapability} via {@link Router}.\n *\n * Unlike {@link MicrofrontendDialogComponent}, this component uses a `<router-outlet>` instead of a `<sci-router-outlet>`\n * to allow direct integration of the content provided by the workbench host application via the Angular router.\n *\n * This component is designed to be displayed in a workbench dialog.\n */\n@Component({\n  selector: 'wb-microfrontend-host-dialog',\n  styleUrls: ['./microfrontend-host-dialog.component.scss'],\n  templateUrl: './microfrontend-host-dialog.component.html',\n  imports: [\n    RouterOutlet,\n    NgTemplateOutlet,\n  ],\n})\nexport class MicrofrontendHostDialogComponent {\n\n  public readonly capability = input.required<WorkbenchDialogCapability>();\n  public readonly params = input.required<Map<string, unknown>>();\n\n  private readonly _dialog = inject(ɵWorkbenchDialog);\n  private readonly _injector = inject(Injector);\n  private readonly _router = inject(Router);\n  /** Mutex to serialize Angular Router navigation requests, preventing the cancellation of previously initiated asynchronous navigations. */\n  private readonly _angularRouterMutex = inject(ANGULAR_ROUTER_MUTEX);\n\n  protected readonly outletName = DIALOG_ID_PREFIX.concat(this._dialog.id);\n\n  protected outletInjector!: Injector;\n\n  constructor() {\n    this.setDialogProperties();\n    this.createOutletInjector();\n    this.navigateCapability();\n\n    inject(DestroyRef).onDestroy(() => void this.navigate(null)); // Remove the outlet from the URL\n  }\n\n  private navigateCapability(): void {\n    effect(() => {\n      const capability = this.capability();\n      const params = this.params();\n\n      untracked(() => {\n        void this.navigate(capability.properties.path, {params}).then(success => {\n          if (!success) {\n            this._dialog.close(Error('[DialogNavigateError] Navigation canceled, most likely by a route guard or a parallel navigation.'));\n          }\n        });\n      });\n    });\n  }\n\n  /**\n   * Performs navigation in the named outlet, substituting path params if any. To clear navigation, pass `null` as the path.\n   */\n  private navigate(path: string | null, extras?: {params?: Map<string, any>}): Promise<boolean> {\n    path = Microfrontends.substituteNamedParameters(path, extras?.params);\n\n    const outletCommands: Commands | null = (path !== null ? runInInjectionContext(this._injector, () => Routing.pathToCommands(path)) : null);\n    const commands: Commands = [{outlets: {[this.outletName]: outletCommands}}];\n    return this._angularRouterMutex.submit(() => this._router.navigate(commands, {skipLocationChange: true, queryParamsHandling: 'preserve'}));\n  }\n\n  private createOutletInjector(): void {\n    effect(() => {\n      const capability = this.capability();\n      const params = this.params();\n\n      untracked(() => {\n        this.outletInjector = Injector.create({\n          parent: this._injector,\n          providers: [provideWorkbenchClientDialogHandle(capability, params)],\n        });\n      });\n    });\n  }\n\n  private setDialogProperties(): void {\n    effect(() => {\n      const properties = this.capability().properties;\n      const params = this.params();\n\n      untracked(() => {\n        this._dialog.size.width = properties.size?.width;\n        this._dialog.size.height = properties.size?.height;\n        this._dialog.size.minWidth = properties.size?.minWidth;\n        this._dialog.size.maxWidth = properties.size?.maxWidth;\n        this._dialog.size.minHeight = properties.size?.minHeight;\n        this._dialog.size.maxHeight = properties.size?.maxHeight;\n\n        this._dialog.title = Microfrontends.substituteNamedParameters(properties.title, params);\n        this._dialog.closable = properties.closable ?? true;\n        this._dialog.resizable = properties.resizable ?? true;\n        this._dialog.padding = properties.padding ?? true;\n      });\n    });\n  }\n}\n\n/**\n * Provides the {WorkbenchDialog} handle to the routed component.\n */\nfunction provideWorkbenchClientDialogHandle(capability: WorkbenchDialogCapability, params: Map<string, unknown>): StaticProvider {\n  return {\n    provide: WorkbenchClientDialog,\n    useFactory: (): WorkbenchClientDialog => {\n      const dialog = inject(ɵWorkbenchDialog);\n      const titleChange$ = new Subject<void>();\n\n      return new class implements WorkbenchClientDialog {\n        public readonly capability = capability;\n        public readonly params = params;\n\n        public setTitle(title: string | Observable<string>): void {\n          titleChange$.next();\n\n          Observables.coerce(title)\n            .pipe(\n              takeUntilDestroyed(dialog.injector.get(DestroyRef)),\n              takeUntil(titleChange$),\n            )\n            .subscribe(title => dialog.title = title);\n        }\n\n        public close(result?: unknown | Error): void {\n          dialog.close(result);\n        }\n\n        public signalReady(): void {\n          // nothing to do since not an iframe-based microfrontend\n        }\n      }();\n    },\n  };\n}\n","<ng-container *ngTemplateOutlet=\"router_outlet; injector: outletInjector\"/>\n\n<ng-template #router_outlet>\n  <router-outlet [name]=\"outletName\"/>\n</ng-template>\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 {inject, Injectable} from '@angular/core';\nimport {APP_IDENTITY, Handler, IntentInterceptor, IntentMessage, MessageClient, MessageHeaders, ResponseStatusCodes} from '@scion/microfrontend-platform';\nimport {WorkbenchCapabilities, WorkbenchDialogCapability, WorkbenchDialogOptions} from '@scion/workbench-client';\nimport {Logger, LoggerNames} from '../../logging';\nimport {Beans} from '@scion/toolkit/bean-manager';\nimport {stringifyError} from '../../common/stringify-error.util';\nimport {Arrays} from '@scion/toolkit/util';\nimport {WorkbenchDialogService} from '../../dialog/workbench-dialog.service';\nimport {MicrofrontendDialogComponent} from './microfrontend-dialog.component';\nimport {MicrofrontendHostDialogComponent} from '../microfrontend-host-dialog/microfrontend-host-dialog.component';\n\n/**\n * Handles dialog intents, instructing the workbench to open a dialog with the microfrontend declared on the resolved capability.\n *\n * Microfrontends of the host are displayed in {@link MicrofrontendHostDialogComponent}, microfrontends of other applications in {@link MicrofrontendDialogComponent}.\n *\n * Dialog intents are handled in this interceptor and are not transported to the providing application, enabling support for applications\n * that are not connected to the SCION Workbench.\n */\n@Injectable(/* DO NOT provide via 'providedIn' metadata as only registered if microfrontend support is enabled. */)\nexport class MicrofrontendDialogIntentHandler implements IntentInterceptor {\n\n  private readonly _dialogService = inject(WorkbenchDialogService);\n  private readonly _logger = inject(Logger);\n\n  /**\n   * Dialog intents are handled in this interceptor and then swallowed.\n   */\n  public intercept(intentMessage: IntentMessage, next: Handler<IntentMessage>): Promise<void> {\n    if (intentMessage.intent.type === WorkbenchCapabilities.Dialog) {\n      const dialogIntentMessage = intentMessage as IntentMessage<WorkbenchDialogOptions>;\n      // Do not block the call until the dialog is closed.\n      // Otherwise, the caller may receive a timeout error if not closing the dialog before delivery confirmation expires.\n      this.consumeDialogIntent(dialogIntentMessage).catch((error: unknown) => this._logger.error('[DialogOpenError] Failed to open dialog.', LoggerNames.MICROFRONTEND, intentMessage, error));\n      // Swallow the intent and do not pass it to other interceptors or handlers down the chain.\n      return Promise.resolve();\n    }\n    else {\n      return next.handle(intentMessage);\n    }\n  }\n\n  private async consumeDialogIntent(message: IntentMessage<WorkbenchDialogOptions>): Promise<void> {\n    const replyTo = message.headers.get(MessageHeaders.ReplyTo) as string;\n\n    try {\n      const result = await this.openDialog(message);\n      // Use 'Beans.opt' to not error if the platform is destroyed, e.g., in tests if not closing dialogs.\n      await Beans.opt(MessageClient)?.publish(replyTo, result, {headers: new Map().set(MessageHeaders.Status, ResponseStatusCodes.TERMINAL)});\n    }\n    catch (error) {\n      // Use 'Beans.opt' to not error if the platform is destroyed, e.g., in tests if not closing dialogs.\n      await Beans.opt(MessageClient)?.publish(replyTo, stringifyError(error), {headers: new Map().set(MessageHeaders.Status, ResponseStatusCodes.ERROR)});\n    }\n  }\n\n  /**\n   * Opens the microfrontend declared by the resolved capability in a dialog.\n   */\n  private async openDialog(message: IntentMessage<WorkbenchDialogOptions>): Promise<unknown> {\n    const options = message.body ?? {};\n    const capability = message.capability as WorkbenchDialogCapability;\n    const params = message.intent.params ?? new Map();\n    const isHostProvider = capability.metadata!.appSymbolicName === Beans.get(APP_IDENTITY);\n    this._logger.debug(() => 'Handling microfrontend dialog intent', LoggerNames.MICROFRONTEND, options);\n\n    return this._dialogService.open(isHostProvider ? MicrofrontendHostDialogComponent : MicrofrontendDialogComponent, {\n      inputs: {capability, params},\n      modality: options.modality,\n      context: options.context,\n      animate: options.animate,\n      cssClass: Arrays.coerce(capability.properties.cssClass).concat(Arrays.coerce(options.cssClass)),\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 {APP_IDENTITY, Capability, CapabilityInterceptor} from '@scion/microfrontend-platform';\nimport {Injectable} from '@angular/core';\nimport {WorkbenchCapabilities, WorkbenchDialogCapability, WorkbenchDialogSize} from '@scion/workbench-client';\nimport {Beans} from '@scion/toolkit/bean-manager';\nimport {Objects} from '../../common/objects.util';\n\n/**\n * Asserts dialog capabilities to have required properties.\n */\n@Injectable(/* DO NOT provide via 'providedIn' metadata as only registered if microfrontend support is enabled. */)\nexport class MicrofrontendDialogCapabilityValidator implements CapabilityInterceptor {\n\n  public async intercept(capability: Capability): Promise<Capability> {\n    if (capability.type !== WorkbenchCapabilities.Dialog) {\n      return capability;\n    }\n\n    const dialogCapability = capability as Partial<WorkbenchDialogCapability>;\n    // Assert the dialog capability to have a qualifier.\n    if (!Object.keys(dialogCapability.qualifier ?? {}).length) {\n      throw Error(`[NullQualifierError] Dialog capability requires a qualifier [capability=${JSON.stringify(dialogCapability)}]`);\n    }\n\n    // Assert the dialog capability to have a \"properties\" section.\n    if (!dialogCapability.properties) {\n      throw Error(`[NullPropertiesError] Dialog capability requires a \"properties\" section [application=\"${dialogCapability.metadata!.appSymbolicName}\", capability=\"${Objects.toMatrixNotation(dialogCapability.qualifier)}\"]`);\n    }\n\n    // Assert the dialog capability to have a path.\n    const path = dialogCapability.properties.path as unknown;\n    if (path === undefined || path === null) {\n      throw Error(`[NullPathError] Dialog capability requires a path to the microfrontend in its properties [application=\"${dialogCapability.metadata!.appSymbolicName}\", capability=\"${Objects.toMatrixNotation(dialogCapability.qualifier)}\"]`);\n    }\n\n    // Assert the dialog capability to have a height and width, unless provided by the host application.\n    this.assertSize(dialogCapability);\n\n    return capability;\n  }\n\n  private assertSize(capability: Partial<WorkbenchDialogCapability>): void {\n    const isHostProvider = capability.metadata!.appSymbolicName === Beans.get(APP_IDENTITY);\n    if (isHostProvider) {\n      return;\n    }\n\n    const size = capability.properties?.size as Partial<WorkbenchDialogSize> | undefined;\n    if (!size?.width || !size.height) {\n      throw Error(`[NullSizeError] Dialog capability requires width and height in its size properties [application=\"${capability.metadata!.appSymbolicName}\", capability=\"${Objects.toMatrixNotation(capability.qualifier)}\"]`);\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 {Capability, CapabilityInterceptor} from '@scion/microfrontend-platform';\nimport {Injectable} from '@angular/core';\nimport {WorkbenchCapabilities, WorkbenchViewCapability} from '@scion/workbench-client';\nimport {Objects} from '../../common/objects.util';\n\n/**\n * Asserts view capabilities to have required properties.\n */\n@Injectable(/* DO NOT provide via 'providedIn' metadata as only registered if microfrontend support is enabled. */)\nexport class MicrofrontendViewCapabilityValidator implements CapabilityInterceptor {\n\n  public async intercept(capability: Capability): Promise<Capability> {\n    if (capability.type !== WorkbenchCapabilities.View) {\n      return capability;\n    }\n\n    const viewCapability = capability as Partial<WorkbenchViewCapability>;\n    // Assert the view capability to have a qualifier set.\n    if (!Object.keys(viewCapability.qualifier ?? {}).length) {\n      throw Error(`[NullQualifierError] View capability requires a qualifier [capability=${JSON.stringify(viewCapability)}]`);\n    }\n\n    // Assert the view capability to have a \"properties\" section.\n    if (!viewCapability.properties) {\n      throw Error(`[NullPropertiesError] View capability requires a \"properties\" section [application=\"${viewCapability.metadata!.appSymbolicName}\", capability=\"${Objects.toMatrixNotation(viewCapability.qualifier)}\"]`);\n    }\n\n    // Assert the view capability to have a path set.\n    const path = viewCapability.properties.path as unknown;\n    if (path === undefined || path === null) {\n      throw Error(`[NullPathError] View capability requires a path to the microfrontend in its properties [application=\"${viewCapability.metadata!.appSymbolicName}\", capability=\"${Objects.toMatrixNotation(viewCapability.qualifier)}\"]`);\n    }\n\n    return capability;\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 {Capability, CapabilityInterceptor} from '@scion/microfrontend-platform';\nimport {Microfrontends} from './common/microfrontend.util';\nimport {WorkbenchCapabilities} from '@scion/workbench-client';\nimport {Injectable} from '@angular/core';\n\n/**\n * Assigns perspective and view capabilities a stable identifer based on the qualifier and application.\n */\n@Injectable(/* DO NOT provide via 'providedIn' metadata as only registered if microfrontend support is enabled. */)\nexport class StableCapabilityIdAssigner implements CapabilityInterceptor {\n\n  private readonly _types = new Set<string>()\n    .add(WorkbenchCapabilities.Perspective)\n    .add(WorkbenchCapabilities.View);\n\n  public async intercept(capability: Capability): Promise<Capability> {\n    if (!this._types.has(capability.type)) {\n      return capability;\n    }\n\n    return {\n      ...capability,\n      metadata: {\n        ...capability.metadata!,\n        id: await Microfrontends.createStableIdentifier(capability),\n      },\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 {Capability, CapabilityInterceptor} from '@scion/microfrontend-platform';\nimport {Injectable} from '@angular/core';\nimport {WorkbenchCapabilities, WorkbenchMessageBoxCapability} from '@scion/workbench-client';\nimport {TEXT_MESSAGE_BOX_CAPABILITY_IDENTITY, TEXT_MESSAGE_BOX_CAPABILITY_IDENTITY_PROPERTY} from '../microfrontend-host-message-box/text-message/text-message.component';\nimport {Objects} from '../../common/objects.util';\n\n/**\n * Asserts message box capabilities to have required properties.\n */\n@Injectable(/* DO NOT provide via 'providedIn' metadata as only registered if microfrontend support is enabled. */)\nexport class MicrofrontendMessageBoxCapabilityValidator implements CapabilityInterceptor {\n\n  public async intercept(capability: Capability): Promise<Capability> {\n    if (capability.type !== WorkbenchCapabilities.MessageBox) {\n      return capability;\n    }\n\n    const messageBoxCapability = capability as Partial<WorkbenchMessageBoxCapability>;\n\n    // Assert capability to have a \"properties\" section.\n    if (!messageBoxCapability.properties) {\n      throw Error(`[NullPropertiesError] MessageBox capability requires a \"properties\" section [application=\"${messageBoxCapability.metadata!.appSymbolicName}\", capability=\"${Objects.toMatrixNotation(messageBoxCapability.qualifier)}\"]`);\n    }\n\n    // Assert capability to have a path.\n    const path = messageBoxCapability.properties.path as unknown;\n    if (path === undefined || path === null) {\n      throw Error(`[NullPathError] MessageBox capability requires a path to the microfrontend in its properties [application=\"${messageBoxCapability.metadata!.appSymbolicName}\", capability=\"${Objects.toMatrixNotation(messageBoxCapability.qualifier)}\"]`);\n    }\n\n    // Assert capability other than the built-in text messsage box capability to have a qualifier.\n    if (!isBuiltInTextMessageBoxCapability(messageBoxCapability) && !Object.keys(messageBoxCapability.qualifier ?? {}).length) {\n      throw Error(`[NullQualifierError] MessageBox capability requires a qualifier [capability=${JSON.stringify(messageBoxCapability)}]`);\n    }\n\n    return capability;\n  }\n}\n\nfunction isBuiltInTextMessageBoxCapability(capability: Partial<WorkbenchMessageBoxCapability>): boolean {\n  return capability.properties?.[TEXT_MESSAGE_BOX_CAPABILITY_IDENTITY_PROPERTY] === TEXT_MESSAGE_BOX_CAPABILITY_IDENTITY;\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 {Capability, CapabilityInterceptor} from '@scion/microfrontend-platform';\nimport {Injectable} from '@angular/core';\nimport {WorkbenchCapabilities, WorkbenchPerspectiveCapability} from '@scion/workbench-client';\nimport {Objects} from '../../common/objects.util';\nimport {MAIN_AREA} from '../../layout/workbench-layout';\n\n/**\n * Asserts perspective capabilities to have required properties.\n */\n@Injectable(/* DO NOT provide via 'providedIn' metadata as only registered if microfrontend support is enabled. */)\nexport class MicrofrontendPerspectiveCapabilityValidator implements CapabilityInterceptor {\n\n  public async intercept(capability: Capability): Promise<Capability> {\n    if (capability.type !== WorkbenchCapabilities.Perspective) {\n      return capability;\n    }\n\n    const perspectiveCapability = capability as Partial<WorkbenchPerspectiveCapability>;\n    // Assert the perspective capability to have a qualifier set.\n    if (!Object.keys(perspectiveCapability.qualifier ?? {}).length) {\n      throw Error(`[NullQualifierError] Perspective capability requires a qualifier [capability=${JSON.stringify(perspectiveCapability)}]`);\n    }\n\n    // Assert the perspective capability to have a \"properties\" section.\n    if (!perspectiveCapability.properties) {\n      throw Error(`[NullPropertiesError] Perspective capability requires a \"properties\" section [application=\"${perspectiveCapability.metadata!.appSymbolicName}\", capability=\"${Objects.toMatrixNotation(perspectiveCapability.qualifier)}\"]`);\n    }\n\n    // Assert the perspective capability to have a layout set.\n    if (!perspectiveCapability.properties.layout as unknown) {\n      throw Error(`[NullLayoutError] Perspective capability requires a layout [application=\"${perspectiveCapability.metadata!.appSymbolicName}\", capability=\"${Objects.toMatrixNotation(perspectiveCapability.qualifier)}\"]`);\n    }\n\n    // Assert the perspective capability to define parts.\n    if (!perspectiveCapability.properties.layout.length) {\n      throw Error(`[NullLayoutError] Perspective capability requires parts [application=\"${perspectiveCapability.metadata!.appSymbolicName}\", capability=\"${Objects.toMatrixNotation(perspectiveCapability.qualifier)}\"]`);\n    }\n\n    // Assert no views to be added to the main area.\n    if (perspectiveCapability.properties.layout.find(part => part.id === MAIN_AREA)?.views?.length) {\n      throw Error(`[PerspectiveLayoutError] Perspective capability cannot add views to the main area [application=\"${perspectiveCapability.metadata!.appSymbolicName}\", capability=\"${Objects.toMatrixNotation(perspectiveCapability.qualifier)}\"]`);\n    }\n\n    return capability;\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 {Handler, IntentInterceptor, IntentMessage, MessageClient, MessageHeaders, ResponseStatusCodes} from '@scion/microfrontend-platform';\nimport {inject, Injectable} from '@angular/core';\nimport {WorkbenchCapabilities} from '@scion/workbench-client';\nimport {Logger, LoggerNames} from '../../logging';\nimport {Beans} from '@scion/toolkit/bean-manager';\nimport {WorkbenchService} from '../../workbench.service';\n\n/**\n * Handles perspective intents, instructing the workbench to switch perspective.\n */\n@Injectable(/* DO NOT provide via 'providedIn' metadata as only registered if microfrontend support is enabled. */)\nexport class MicrofrontendPerspectiveIntentHandler implements IntentInterceptor {\n\n  private readonly _workbenchService = inject(WorkbenchService);\n  private readonly _logger = inject(Logger);\n\n  /**\n   * Perspective intents are handled in this interceptor and then swallowed.\n   */\n  public intercept(intentMessage: IntentMessage, next: Handler<IntentMessage>): Promise<void> {\n    if (intentMessage.intent.type === WorkbenchCapabilities.Perspective) {\n      return this.consumePerspectiveIntent(intentMessage as IntentMessage<void>);\n    }\n    else {\n      return next.handle(intentMessage);\n    }\n  }\n\n  private async consumePerspectiveIntent(message: IntentMessage<void>): Promise<void> {\n    const replyTo = message.headers.get(MessageHeaders.ReplyTo) as string;\n    const success = await this.switchPerspective(message);\n    if (replyTo) {\n      await Beans.get(MessageClient).publish(replyTo, success, {headers: new Map().set(MessageHeaders.Status, ResponseStatusCodes.TERMINAL)});\n    }\n  }\n\n  private switchPerspective(message: IntentMessage<void>): Promise<boolean> {\n    const perspectiveId = message.capability.metadata!.id;\n    this._logger.debug(() => `Switching to perspective ${perspectiveId}.`, LoggerNames.MICROFRONTEND);\n    return this._workbenchService.switchPerspective(perspectiveId);\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 {inject, Injectable, Injector, NgZone, OnDestroy} from '@angular/core';\nimport {CapabilityInterceptor, HostManifestInterceptor, IntentInterceptor, MicrofrontendPlatform, MicrofrontendPlatformConfig, MicrofrontendPlatformHost, ObservableDecorator} from '@scion/microfrontend-platform';\nimport {Beans} from '@scion/toolkit/bean-manager';\nimport {Logger, LoggerNames} from '../../logging';\nimport {NgZoneObservableDecorator} from './ng-zone-observable-decorator';\nimport {MICROFRONTEND_PLATFORM_POST_STARTUP, MICROFRONTEND_PLATFORM_PRE_STARTUP} from '../microfrontend-platform-initializer.provider';\nimport {runWorkbenchInitializers} from '../../startup/workbench-initializer';\nimport {MicrofrontendPlatformConfigLoader} from '../microfrontend-platform-config-loader';\nimport {MicrofrontendViewIntentHandler} from '../microfrontend-view/microfrontend-view-intent-handler.interceptor';\nimport {WorkbenchHostManifestInterceptor} from './workbench-host-manifest-interceptor.service';\nimport {MicrofrontendPopupIntentHandler} from '../microfrontend-popup/microfrontend-popup-intent-handler.interceptor';\nimport {MicrofrontendPopupCapabilityValidator} from '../microfrontend-popup/microfrontend-popup-capability-validator.interceptor';\nimport {WorkbenchDialogService, WorkbenchMessageBoxService, WorkbenchNotificationService, WorkbenchPopupService, WorkbenchRouter, ɵWorkbenchDialogService, ɵWorkbenchMessageBoxService} from '@scion/workbench-client';\nimport {MicrofrontendMessageBoxIntentHandler} from '../microfrontend-message-box/microfrontend-message-box-intent-handler.interceptor';\nimport {MicrofrontendDialogIntentHandler} from '../microfrontend-dialog/microfrontend-dialog-intent-handler.interceptor';\nimport {MicrofrontendDialogCapabilityValidator} from '../microfrontend-dialog/microfrontend-dialog-capability-validator.interceptor';\nimport {MicrofrontendViewCapabilityValidator} from '../microfrontend-view/microfrontend-view-capability-validator.interceptor';\nimport {StableCapabilityIdAssigner} from '../stable-capability-id-assigner.interceptor';\nimport {MicrofrontendMessageBoxCapabilityValidator} from '../microfrontend-message-box/microfrontend-message-box-capability-validator.interceptor';\nimport {MicrofrontendPerspectiveCapabilityValidator} from '../microfrontend-perspective/microfrontend-perspective-capability-validator.interceptor';\nimport {MicrofrontendPerspectiveIntentHandler} from '../microfrontend-perspective/microfrontend-perspective-intent-handler.interceptor';\n\n/**\n * Initializes and starts the SCION Microfrontend Platform in host mode.\n */\n@Injectable(/* DO NOT provide via 'providedIn' metadata as only registered if microfrontend support is enabled. */)\nexport class MicrofrontendPlatformInitializer implements OnDestroy {\n\n  private readonly _microfrontendPlatformConfigLoader = inject(MicrofrontendPlatformConfigLoader);\n  private readonly _hostManifestInterceptor = inject(WorkbenchHostManifestInterceptor);\n  private readonly _ngZoneObservableDecorator = inject(NgZoneObservableDecorator);\n  private readonly _perspectiveIntentHandler = inject(MicrofrontendPerspectiveIntentHandler);\n  private readonly _viewIntentHandler = inject(MicrofrontendViewIntentHandler);\n  private readonly _popupIntentHandler = inject(MicrofrontendPopupIntentHandler);\n  private readonly _dialogIntentHandler = inject(MicrofrontendDialogIntentHandler);\n  private readonly _messageBoxIntentHandler = inject(MicrofrontendMessageBoxIntentHandler);\n  private readonly _viewCapabilityValidator = inject(MicrofrontendViewCapabilityValidator);\n  private readonly _perspectiveCapabilityValidator = inject(MicrofrontendPerspectiveCapabilityValidator);\n  private readonly _popupCapabilityValidator = inject(MicrofrontendPopupCapabilityValidator);\n  private readonly _dialogCapabilityValidator = inject(MicrofrontendDialogCapabilityValidator);\n  private readonly _messageBoxCapabilityValidator = inject(MicrofrontendMessageBoxCapabilityValidator);\n  private readonly _stableCapabilityIdAssigner = inject(StableCapabilityIdAssigner);\n  private readonly _injector = inject(Injector);\n  private readonly _zone = inject(NgZone);\n  private readonly _logger = inject(Logger);\n\n  public config: MicrofrontendPlatformConfig | undefined;\n\n  public async init(): Promise<void> {\n    this._logger.debug('Starting SCION Microfrontend Platform...', LoggerNames.LIFECYCLE);\n\n    // Load the microfrontend platform config.\n    const microfrontendPlatformConfig: Mutable<MicrofrontendPlatformConfig> = this.config = await this._microfrontendPlatformConfigLoader.load();\n\n    // Disable scope check to read private capabilities, e.g., required for microfrontend view routing.\n    microfrontendPlatformConfig.host = {\n      ...microfrontendPlatformConfig.host, // eslint-disable-line @typescript-eslint/no-misused-spread\n      scopeCheckDisabled: true,\n    };\n\n    // Inject services registered under {MICROFRONTEND_PLATFORM_PRE_STARTUP} DI token.\n    await runWorkbenchInitializers(MICROFRONTEND_PLATFORM_PRE_STARTUP, this._injector);\n\n    // Register beans of @scion/workbench-client.\n    Beans.register(WorkbenchRouter);\n    Beans.register(WorkbenchPopupService);\n    Beans.register(WorkbenchMessageBoxService, {useClass: ɵWorkbenchMessageBoxService});\n    Beans.register(WorkbenchDialogService, {useClass: ɵWorkbenchDialogService});\n    Beans.register(WorkbenchNotificationService);\n\n    // Register host manifest interceptor for the workbench to register workbench-specific intentions and capabilities.\n    Beans.register(HostManifestInterceptor, {useValue: this._hostManifestInterceptor, multi: true});\n\n    // Synchronize emissions of Observables exposed by the SCION Microfrontend Platform with the Angular zone.\n    Beans.register(ObservableDecorator, {useValue: this._ngZoneObservableDecorator});\n\n    // Register perspective interceptor to switch perspective.\n    Beans.register(IntentInterceptor, {useValue: this._perspectiveIntentHandler, multi: true});\n\n    // Register view intent interceptor to open the corresponding view.\n    Beans.register(IntentInterceptor, {useValue: this._viewIntentHandler, multi: true});\n\n    // Register popup intent interceptor to open the corresponding popup.\n    Beans.register(IntentInterceptor, {useValue: this._popupIntentHandler, multi: true});\n\n    // Register dialog intent interceptor to open the corresponding dialog.\n    Beans.register(IntentInterceptor, {useValue: this._dialogIntentHandler, multi: true});\n\n    // Register message box intent interceptor to open the corresponding message box.\n    Beans.register(IntentInterceptor, {useValue: this._messageBoxIntentHandler, multi: true});\n\n    // Register perspective capability interceptor to assert required perspective capability properties.\n    Beans.register(CapabilityInterceptor, {useValue: this._perspectiveCapabilityValidator, multi: true});\n\n    // Register view capability interceptor to assert required view capability properties.\n    Beans.register(CapabilityInterceptor, {useValue: this._viewCapabilityValidator, multi: true});\n\n    // Register popup capability interceptor to assert required popup capability properties.\n    Beans.register(CapabilityInterceptor, {useValue: this._popupCapabilityValidator, multi: true});\n\n    // Register dialog capability interceptor to assert required dialog capability properties.\n    Beans.register(CapabilityInterceptor, {useValue: this._dialogCapabilityValidator, multi: true});\n\n    // Register message box capability interceptor to assert required capability properties.\n    Beans.register(CapabilityInterceptor, {useValue: this._messageBoxCapabilityValidator, multi: true});\n\n    // Register capability interceptor to assign perspective and view capabilities a stable identifier.\n    Beans.register(CapabilityInterceptor, {useValue: this._stableCapabilityIdAssigner, multi: true});\n\n    // Inject services registered under {MICROFRONTEND_PLATFORM_POST_STARTUP} DI token;\n    // must be done in runlevel 2, i.e., before activator microfrontends are installed.\n    Beans.registerInitializer({\n      useFunction: () => this._zone.run(() => runWorkbenchInitializers(MICROFRONTEND_PLATFORM_POST_STARTUP, this._injector)),\n      runlevel: 2,\n    });\n\n    // Start the SCION Microfrontend Platform.\n    // We start the platform outside the Angular zone in order to avoid excessive change detection cycles\n    // of platform-internal subscriptions to global DOM events.\n    await this._zone.runOutsideAngular(() => MicrofrontendPlatformHost.start(microfrontendPlatformConfig));\n\n    this._logger.debug('SCION Microfrontend Platform started.', LoggerNames.LIFECYCLE, microfrontendPlatformConfig);\n  }\n\n  public ngOnDestroy(): void {\n    void MicrofrontendPlatform.destroy();\n  }\n}\n\n/**\n * Make all properties in T mutable.\n */\ntype Mutable<T> = {\n  -readonly [P in keyof T]: T[P];\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 {EnvironmentProviders, inject, Injectable, makeEnvironmentProviders, OnDestroy} from '@angular/core';\nimport {Message, MessageClient, MessageHeaders} from '@scion/microfrontend-platform';\nimport {Logger} from '../../logging';\nimport {ViewId, WorkbenchView} from '../../view/workbench-view.model';\nimport {WORKBENCH_VIEW_REGISTRY} from '../../view/workbench-view.registry';\nimport {ɵWorkbenchCommands} from '@scion/workbench-client';\nimport {Subscription} from 'rxjs';\nimport {MicrofrontendWorkbenchView} from './microfrontend-workbench-view.model';\nimport {provideMicrofrontendPlatformInitializer} from '../microfrontend-platform-initializer.provider';\n\n@Injectable(/* DO NOT provide via 'providedIn' metadata as only registered if microfrontend support is enabled. */)\nclass MicrofrontendViewCommandHandler implements OnDestroy {\n\n  private readonly _messageClient = inject(MessageClient);\n  private readonly _viewRegistry = inject(WORKBENCH_VIEW_REGISTRY);\n  private readonly _logger = inject(Logger);\n  private readonly _subscriptions = new Set<Subscription>();\n\n  constructor() {\n    this._subscriptions.add(this.installViewTitleCommandHandler());\n    this._subscriptions.add(this.installViewHeadingCommandHandler());\n    this._subscriptions.add(this.installViewDirtyCommandHandler());\n    this._subscriptions.add(this.installViewClosableCommandHandler());\n    this._subscriptions.add(this.installViewCloseCommandHandler());\n  }\n\n  /**\n   * Handles commands to update the title of a view.\n   */\n  private installViewTitleCommandHandler(): Subscription {\n    return this._messageClient.onMessage<string>(ɵWorkbenchCommands.viewTitleTopic(':viewId'), message => {\n      const viewId = message.params!.get('viewId') as ViewId;\n      this.runIfPrivileged(viewId, message, view => {\n        view.title = message.body!;\n      });\n    });\n  }\n\n  /**\n   * Handles commands to update the heading of a view.\n   */\n  private installViewHeadingCommandHandler(): Subscription {\n    return this._messageClient.onMessage<string>(ɵWorkbenchCommands.viewHeadingTopic(':viewId'), message => {\n      const viewId = message.params!.get('viewId') as ViewId;\n      this.runIfPrivileged(viewId, message, view => {\n        view.heading = message.body!;\n      });\n    });\n  }\n\n  /**\n   * Handles commands to update the dirty state of a view.\n   */\n  private installViewDirtyCommandHandler(): Subscription {\n    return this._messageClient.onMessage<boolean>(ɵWorkbenchCommands.viewDirtyTopic(':viewId'), message => {\n      const viewId = message.params!.get('viewId') as ViewId;\n      this.runIfPrivileged(viewId, message, view => {\n        view.dirty = message.body!;\n      });\n    });\n  }\n\n  /**\n   * Handles commands to update the closable property of a view.\n   */\n  private installViewClosableCommandHandler(): Subscription {\n    return this._messageClient.onMessage<boolean>(ɵWorkbenchCommands.viewClosableTopic(':viewId'), message => {\n      const viewId = message.params!.get('viewId') as ViewId;\n      this.runIfPrivileged(viewId, message, view => {\n        view.closable = message.body!;\n      });\n    });\n  }\n\n  /**\n   * Handles commands to close a view.\n   */\n  private installViewCloseCommandHandler(): Subscription {\n    return this._messageClient.onMessage(ɵWorkbenchCommands.viewCloseTopic(':viewId'), message => {\n      const viewId = message.params!.get('viewId') as ViewId;\n      this.runIfPrivileged(viewId, message, view => {\n        void view.close();\n      });\n    });\n  }\n\n  /**\n   * Runs the given runnable only if the microfrontend displayed in the view is actually provided by the sender,\n   * thus preventing other apps from updating other apps' views.\n   */\n  private runIfPrivileged(viewId: ViewId, message: Message, runnable: (view: WorkbenchView) => void): void {\n    const view = this._viewRegistry.get(viewId);\n    const sender = message.headers.get(MessageHeaders.AppSymbolicName) as string;\n    if (view.adapt(MicrofrontendWorkbenchView)?.capability.metadata!.appSymbolicName === sender) {\n      runnable(view);\n    }\n    else {\n      this._logger.warn('[NotPrivilegedError] Microfrontend not allowed to update views of other apps.');\n    }\n  }\n\n  public ngOnDestroy(): void {\n    this._subscriptions.forEach(subscription => subscription.unsubscribe());\n  }\n}\n\n/**\n * Provides a set of DI providers registering message handlers for view microfrontends to interact with a workbench view.\n */\nexport function provideViewCommandHandlers(): EnvironmentProviders {\n  return makeEnvironmentProviders([\n    MicrofrontendViewCommandHandler,\n    provideMicrofrontendPlatformInitializer(() => void inject(MicrofrontendViewCommandHandler)),\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 {Observable} from 'rxjs';\nimport {Translatable} from '../text/workbench-text-provider.model';\n\n/**\n * Represents a handle that a notification component can inject to interact with the notification, for example,\n * to read input data or to configure the notification.\n *\n * A notification is a closable message that appears in the upper-right corner and disappears automatically after a few seconds.\n * It informs the user of a system event, e.g., that a task has been completed or an error has occurred.\n */\nexport abstract class Notification<T = any> {\n\n  /**\n   * Input data as passed by the notification opener, or `undefined` if not passed.\n   */\n  public readonly input: T | undefined;\n\n  /**\n   * Sets the title of the notification; can be a string literal or an Observable.\n   */\n  public abstract setTitle(title: Translatable | undefined | Observable<string | undefined>): void;\n\n  /**\n   * Sets the severity of the notification.\n   */\n  public abstract setSeverity(severity: 'info' | 'warn' | 'error'): void;\n\n  /**\n   * Sets the timeout upon which to close the notification automatically.\n   * Can be either a duration alias, or a number in seconds.\n   */\n  public abstract setDuration(duration: 'short' | 'medium' | 'long' | 'infinite' | number): void;\n\n  /**\n   * Specifies CSS class(es) to add to the notification, e.g., to locate the notification in tests.\n   */\n  public abstract setCssClass(cssClass: string | string[]): void;\n}\n","import {ChangeDetectionStrategy, Component, inject} from '@angular/core';\nimport {Notification} from './notification';\nimport {TextPipe} from '../text/text.pipe';\nimport {Translatable} from '../text/workbench-text-provider.model';\n\n/**\n * Component for displaying a plain text notification.\n */\n@Component({\n  selector: 'wb-text-notification',\n  template: `{{(text | wbText)()}}`,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  imports: [\n    TextPipe,\n  ],\n})\nexport class TextNotificationComponent {\n\n  public text = inject(Notification).input as Translatable | undefined;\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 {Type} from '@angular/core';\nimport {BehaviorSubject, Observable} from 'rxjs';\nimport {Arrays} from '@scion/toolkit/util';\nimport {Notification} from './notification';\nimport {NotificationConfig} from './notification.config';\nimport {TextNotificationComponent} from './text-notification.component';\nimport {Translatable} from '../text/workbench-text-provider.model';\n\nexport class ɵNotification implements Notification {\n\n  public readonly input: unknown;\n  public readonly title$: BehaviorSubject<Translatable | undefined | Observable<string>>;\n  public readonly severity$: BehaviorSubject<'info' | 'warn' | 'error'>;\n  public readonly duration$: BehaviorSubject<'short' | 'medium' | 'long' | 'infinite' | number>;\n  public readonly cssClass$: BehaviorSubject<string[]>;\n  public readonly component: Type<any>;\n\n  constructor(public config: NotificationConfig) {\n    this.title$ = new BehaviorSubject(this.config.title);\n    this.severity$ = new BehaviorSubject(this.config.severity ?? 'info');\n    this.duration$ = new BehaviorSubject(this.config.duration ?? 'medium');\n    this.cssClass$ = new BehaviorSubject(Arrays.coerce(this.config.cssClass));\n    if (typeof this.config.content === 'string') {\n      this.component = TextNotificationComponent;\n      this.input = this.config.content;\n    }\n    else {\n      this.component = this.config.content;\n      this.input = this.config.componentInput;\n    }\n  }\n\n  public setTitle(title: Translatable | undefined | Observable<string>): void {\n    this.title$.next(title);\n  }\n\n  public setSeverity(severity: 'info' | 'warn' | 'error'): void {\n    this.severity$.next(severity);\n  }\n\n  public setDuration(duration: 'short' | 'medium' | 'long' | 'infinite' | number): void {\n    this.duration$.next(duration);\n  }\n\n  public setCssClass(cssClass: string | string[]): void {\n    this.cssClass$.next(Arrays.coerce(this.config.cssClass).concat(Arrays.coerce(cssClass)));\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 {assertNotInReactiveContext, DOCUMENT, inject, Injectable, NgZone} from '@angular/core';\nimport {BehaviorSubject, fromEvent, Observable} from 'rxjs';\nimport {ɵNotification} from './ɵnotification';\nimport {NotificationConfig} from './notification.config';\nimport {filter, map} from 'rxjs/operators';\nimport {observeIn, subscribeIn} from '@scion/toolkit/operators';\nimport {Arrays} from '@scion/toolkit/util';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {Translatable} from '../text/workbench-text-provider.model';\n\n/**\n * Allows displaying a notification to the user.\n *\n * A notification is a closable message that appears in the upper-right corner and disappears automatically after a few seconds.\n * It informs the user of a system event, e.g., that a task has been completed or an error has occurred.\n *\n * Multiple notifications are stacked vertically. Notifications can be grouped. For each group, only the last notification is\n * displayed.\n *\n * To display structured content, consider passing a component to {@link NotificationConfig#content} instead of plain text.\n */\n@Injectable({providedIn: 'root'})\nexport class NotificationService {\n\n  private readonly _zone = inject(NgZone);\n  private readonly _document = inject(DOCUMENT);\n  private readonly _notifications$ = new BehaviorSubject<ɵNotification[]>([]);\n\n  constructor() {\n    this.installEscapeHandler();\n  }\n\n  /**\n   * Presents the user with a notification that is displayed in the upper-right corner based on the given config.\n   *\n   * To display structured content, consider passing a component to {@link NotificationConfig#content}.\n   *\n   * ### Usage:\n   * ```typescript\n   * notificationService.notify({\n   *   content: 'Task scheduled for execution.',\n   *   severity: 'info',\n   *   duration: 'short',\n   * });\n   * ```\n   *\n   * @param  notification - Configures the content and appearance of the notification.\n   */\n  public notify(notification: Translatable | NotificationConfig): void {\n    assertNotInReactiveContext(this.notify, 'Call NotificationService.notify() in a non-reactive (non-tracking) context, such as within the untracked() function.');\n\n    // Ensure to run in Angular zone to display the notification even when called from outside the Angular zone, e.g. from an error handler.\n    if (!NgZone.isInAngularZone()) {\n      this._zone.run(() => this.notify(notification));\n      return;\n    }\n\n    const config: NotificationConfig = typeof notification === 'string' ? {content: notification} : notification;\n    this.addNotification(config);\n  }\n\n  private addNotification(config: NotificationConfig): void {\n    const notifications = [...this.notifications];\n    const {index, notification} = this.constructNotification(config, notifications);\n    notifications.splice(index, 1, notification);\n    this._notifications$.next(notifications);\n  }\n\n  /**\n   * Constructs the notification based on the given config and computes its insertion index.\n   */\n  private constructNotification(config: NotificationConfig, notifications: ɵNotification[]): {notification: ɵNotification; index: number} {\n    config = {...config};\n\n    // Check whether the notification belongs to a group. If so, replace any present notification of that group.\n    const group = config.group;\n    if (!group) {\n      return {\n        notification: new ɵNotification(config),\n        index: notifications.length,\n      };\n    }\n\n    // Check whether there is a notification of the same group present.\n    const index = notifications.findIndex(it => it.config.group === group);\n    if (index === -1) {\n      return {\n        notification: new ɵNotification(config),\n        index: notifications.length,\n      };\n    }\n\n    // Reduce the notification's input, if specified a reducer.\n    if (config.groupInputReduceFn) {\n      config.componentInput = config.groupInputReduceFn(notifications[index]!.input, config.componentInput);\n    }\n\n    return {\n      notification: new ɵNotification(config),\n      index: index,\n    };\n  }\n\n  private get notifications(): ɵNotification[] {\n    return this._notifications$.value;\n  }\n\n  /**\n   * @internal\n   */\n  public closeNotification(notification: ɵNotification): void {\n    this._notifications$.next(this.notifications.filter(it => it !== notification));\n  }\n\n  /**\n   * @internal\n   */\n  public get notifications$(): Observable<ɵNotification[]> {\n    return this._notifications$;\n  }\n\n  /**\n   * Installs a keystroke listener to close the last notification when the user presses the escape keystroke.\n   */\n  private installEscapeHandler(): void {\n    fromEvent<KeyboardEvent>(this._document, 'keydown')\n      .pipe(\n        subscribeIn(fn => this._zone.runOutsideAngular(fn)),\n        filter((event: KeyboardEvent) => event.key === 'Escape'),\n        map(() => Arrays.last(this.notifications)),\n        filter((notification): notification is ɵNotification => !!notification),\n        observeIn(fn => this._zone.run(fn)),\n        takeUntilDestroyed(),\n      )\n      .subscribe(lastNotification => {\n        this.closeNotification(lastNotification);\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 {EnvironmentProviders, inject, makeEnvironmentProviders} from '@angular/core';\nimport {IntentClient} from '@scion/microfrontend-platform';\nimport {WorkbenchCapabilities, WorkbenchNotificationConfig} from '@scion/workbench-client';\nimport {Logger, LoggerNames} from '../../logging';\nimport {NotificationService} from '../../notification/notification.service';\nimport {provideMicrofrontendPlatformInitializer} from '../microfrontend-platform-initializer.provider';\n\n/**\n * Installs an intent handler to show text notifications.\n */\nfunction installNotificationIntentHandler(): void {\n  const intentClient = inject(IntentClient);\n  const notificationService = inject(NotificationService);\n  const logger = inject(Logger);\n\n  intentClient.onIntent<WorkbenchNotificationConfig, void>({type: WorkbenchCapabilities.Notification, qualifier: {}}, ({body: config}) => {\n    logger.debug(() => 'Showing notification', LoggerNames.MICROFRONTEND, config);\n    notificationService.notify({\n      title: config?.title,\n      content: config?.content ? config.content as string : '',\n      severity: config?.severity,\n      duration: config?.duration,\n      group: config?.group,\n      cssClass: config?.cssClass,\n    });\n  });\n}\n\n/**\n * Provides a set of DI providers installing an intent handler to show text notifications.\n *\n * The notification capability is registered in {@link WorkbenchHostManifestInterceptor}.\n */\nexport function provideNotificationIntentHandler(): EnvironmentProviders {\n  return makeEnvironmentProviders([\n    provideMicrofrontendPlatformInitializer(() => installNotificationIntentHandler()),\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 {Component, computed, effect, ElementRef, inject, input, signal, Signal, TemplateRef, untracked, viewChild, ViewContainerRef} from '@angular/core';\nimport {setStyle} from '../common/dom.util';\nimport {boundingClientRect} from '@scion/components/dimension';\nimport {rootEffect} from '../common/root-effect';\n\n/**\n * Projects `ng-content` to a top-level DOM element and aligns it with this component's bounding box.\n *\n * When this component is moved in the DOM, projected content is not moved in the DOM; only its position and size are changed.\n * For example, an iframe would reload when moved in the DOM.\n *\n * Style `ng-content` outside the `:host` CSS pseudo-class as not a direct child of this component.\n *\n * ---\n * Usage:\n * ```html\n * <wb-content-as-overlay [config]=\"...\">\n *   <iframe [src]=\"...\"></iframe>\n * </wb-content-as-overlay>\n * ```\n *\n * ```scss\n * iframe {\n *   background-color: gray;\n * }\n * ```\n */\n@Component({\n  selector: 'wb-content-as-overlay',\n  templateUrl: './content-as-overlay.component.html',\n})\nexport class ContentAsOverlayComponent {\n\n  /**\n   * Configures content projection of `ng-content`.\n   *\n   * A config input is used instead of separate input properties to support updating the config if detached from the Angular change detector.\n   */\n  public readonly config = input.required<ContentAsOverlayConfig>();\n\n  private readonly _template = viewChild.required(TemplateRef);\n  private readonly _visible = computed(() => this.config().visible());\n  private readonly _location = computed(() => this.config().location());\n  private readonly _overlay = signal<HTMLElement | undefined>(undefined);\n\n  constructor() {\n    this.createOverlay();\n    this.alignOverlayToHostBounds();\n  }\n\n  /**\n   * Creates the overlay for rendering projected content.\n   */\n  private createOverlay(): void {\n    effect(onCleanup => {\n      const location = this._location();\n      if (!location) {\n        return;\n      }\n\n      const template = this._template();\n\n      untracked(() => {\n        // Create an embedded view from the content template.\n        const overlayViewRef = location.createEmbeddedView(template, null);\n        overlayViewRef.detectChanges();\n        if (overlayViewRef.rootNodes.length !== 1) {\n          throw Error(`[ContentAsOverlayError] Expected single root node for content projection, but received ${overlayViewRef.rootNodes.length} root nodes.`);\n        }\n        const [overlayElement] = overlayViewRef.rootNodes as [HTMLElement];\n\n        // Position projected content out of the document flow relative to the page viewport.\n        setStyle(overlayElement, {position: 'fixed'});\n\n        this._overlay.set(overlayElement);\n\n        // Destroy overlay when the location or template changes.\n        onCleanup(() => untracked(() => {\n          overlayViewRef.destroy();\n          this._overlay.set(undefined);\n        }));\n      });\n    }); // Do not run as root effect for component inputs to be available in the effect.\n  }\n\n  /**\n   * Aligns the overlay to the bounding box of this component.\n   */\n  private alignOverlayToHostBounds(): void {\n    const hostBounds = boundingClientRect(inject(ElementRef<HTMLElement>));\n\n    // Run as root effect to run even if the parent component is detached from change detection (e.g., if the view is not visible).\n    rootEffect(() => {\n      const overlay = this._overlay();\n      if (!overlay) {\n        return;\n      }\n\n      // Maintain position and size when hidden to prevent flickering when visible again and to support for virtual scrolling in projected content.\n      const visible = this._visible();\n      if (!visible) {\n        setStyle(overlay, {visibility: 'hidden'}); // Hide via `visibility` instead of `display` property to retain the size.\n        return;\n      }\n\n      // IMPORTANT: Track host bounds only if visible to prevent flickering.\n      const {top, left, width, height} = hostBounds();\n      setStyle(overlay, {\n        top: `${top}px`,\n        left: `${left}px`,\n        width: `${width}px`,\n        height: `${height}px`,\n        visibility: null,\n      });\n    });\n  }\n}\n\n/**\n * Configures content projection.\n */\nexport interface ContentAsOverlayConfig {\n  /**\n   * Specifies the location where to attach projected content in the DOM.\n   */\n  location: Signal<ViewContainerRef | undefined>;\n  /**\n   * Controls the visibility of the projected content.\n   */\n  visible: Signal<boolean>;\n}\n","<ng-template>\n  <ng-content/>\n</ng-template>\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 {ChangeDetectorRef, Component, computed, CUSTOM_ELEMENTS_SCHEMA, DestroyRef, ElementRef, inject, Injector, Provider, Signal, untracked, viewChild} from '@angular/core';\nimport {ActivatedRoute, Params} from '@angular/router';\nimport {firstValueFrom, Observable, Subject, switchMap} from 'rxjs';\nimport {first, map, takeUntil} from 'rxjs/operators';\nimport {ManifestService, mapToBody, MessageClient, MessageHeaders, MicrofrontendPlatformConfig, OutletRouter, ResponseStatusCodes, SciRouterOutletElement, TopicMessage} from '@scion/microfrontend-platform';\nimport {ManifestObjectCache} from '../manifest-object-cache.service';\nimport {WorkbenchViewCapability, ɵMicrofrontendRouteParams, ɵVIEW_ID_CONTEXT_KEY, ɵViewParamsUpdateCommand, ɵWorkbenchCommands} from '@scion/workbench-client';\nimport {Arrays, Dictionaries, Maps} from '@scion/toolkit/util';\nimport {Logger, LoggerNames} from '../../logging';\nimport {CanCloseRef} from '../../workbench.model';\nimport {IFRAME_OVERLAY_HOST} from '../../workbench-element-references';\nimport {serializeExecution} from '../../common/operators';\nimport {ɵWorkbenchView} from '../../view/ɵworkbench-view.model';\nimport {ViewMenuService} from '../../part/view-context-menu/view-menu.service';\nimport {WorkbenchRouter} from '../../routing/workbench-router.service';\nimport {stringifyError} from '../../common/stringify-error.util';\nimport {MicrofrontendViewRoutes} from './microfrontend-view-routes';\nimport {NgClass, NgComponentOutlet} from '@angular/common';\nimport {ContentAsOverlayComponent, ContentAsOverlayConfig} from '../../content-projection/content-as-overlay.component';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {WorkbenchLayoutService} from '../../layout/workbench-layout.service';\nimport {MicrofrontendSplashComponent} from '../microfrontend-splash/microfrontend-splash.component';\nimport {GLASS_PANE_BLOCKABLE, GLASS_PANE_OPTIONS, GlassPaneDirective, GlassPaneOptions} from '../../glass-pane/glass-pane.directive';\nimport {MicrofrontendWorkbenchView} from './microfrontend-workbench-view.model';\nimport {Microfrontends} from '../common/microfrontend.util';\nimport {Objects} from '../../common/objects.util';\nimport {WorkbenchView} from '../../view/workbench-view.model';\nimport {rootEffect} from '../../common/root-effect';\n\n/**\n * Embeds the microfrontend of a view capability.\n */\n@Component({\n  selector: 'wb-microfrontend-view',\n  styleUrls: ['./microfrontend-view.component.scss'],\n  templateUrl: './microfrontend-view.component.html',\n  imports: [\n    NgClass,\n    ContentAsOverlayComponent,\n    NgComponentOutlet,\n    GlassPaneDirective,\n  ],\n  viewProviders: [\n    configureMicrofrontendGlassPane(),\n  ],\n  schemas: [CUSTOM_ELEMENTS_SCHEMA], // required because <sci-router-outlet> is a custom element\n})\nexport class MicrofrontendViewComponent {\n\n  private readonly _host = inject(ElementRef).nativeElement as HTMLElement;\n  private readonly _route = inject(ActivatedRoute);\n  private readonly _outletRouter = inject(OutletRouter);\n  private readonly _manifestService = inject(ManifestService);\n  private readonly _manifestObjectCache = inject(ManifestObjectCache);\n  private readonly _messageClient = inject(MessageClient);\n  private readonly _logger = inject(Logger);\n  private readonly _workbenchRouter = inject(WorkbenchRouter);\n  private readonly _injector = inject(Injector);\n  private readonly _changeDetectorRef = inject(ChangeDetectorRef);\n  private readonly _destroyRef = inject(DestroyRef);\n\n  private readonly _routerOutletElement = viewChild.required<ElementRef<SciRouterOutletElement>>('router_outlet');\n  private readonly _unsubscribeParamsUpdater$ = new Subject<void>();\n  private readonly _universalKeystrokes = [\n    ['escape'], // keystroke to close notifications\n    ['ctrl', 'shift', 'F12'], // keystroke to minimize activities\n  ];\n\n  protected readonly view = inject(ɵWorkbenchView);\n  protected readonly workbenchLayoutService = inject(WorkbenchLayoutService);\n  /** Splash to display until the microfrontend signals readiness. */\n  protected readonly splash = inject(MicrofrontendPlatformConfig).splash ?? MicrofrontendSplashComponent;\n  /** Keystrokes which to bubble across iframe boundaries from embedded content. */\n  protected readonly keystrokesToBubble: Signal<string[]>;\n  /** Configures iframe projection. */\n  protected readonly overlayConfig: ContentAsOverlayConfig = {\n    location: inject(IFRAME_OVERLAY_HOST),\n    visible: this.view.portal.attached,\n  };\n\n  protected capability: WorkbenchViewCapability | null = null;\n\n  constructor() {\n    this._logger.debug(() => `Constructing MicrofrontendViewComponent. [viewId=${this.view.id}]`, LoggerNames.MICROFRONTEND_ROUTING);\n    this.keystrokesToBubble = this.computeKeyStrokesToBubble();\n    this.installViewActivePublisher();\n    this.installPartIdPublisher();\n    this.installCanCloseGuard();\n    this.installMenuAccelerators();\n    this.propagateWorkbenchTheme();\n    this.propagateViewContext();\n    this.installNavigator();\n\n    inject(DestroyRef).onDestroy(() => this.unload());\n  }\n\n  private installNavigator(): void {\n    this._route.params\n      .pipe(\n        switchMap(params => this.fetchCapability$(params[ɵMicrofrontendRouteParams.ɵVIEW_CAPABILITY_ID] as string).pipe(map(capability => ({capability, params})))),\n        serializeExecution(({capability, params}) => this.onNavigate(this.capability, capability, params)),\n        takeUntilDestroyed(),\n      )\n      .subscribe();\n  }\n\n  /**\n   * Provides the view context to embedded content.\n   */\n  private propagateViewContext(): void {\n    // Run as root effect to run even if the parent component is detached from change detection (e.g., if the view is not visible).\n    rootEffect(() => {\n      const routerOutletElement = this._routerOutletElement().nativeElement;\n      untracked(() => routerOutletElement.setContextValue(ɵVIEW_ID_CONTEXT_KEY, this.view.id));\n    });\n  }\n\n  private async onNavigate(prevCapability: WorkbenchViewCapability | null, capability: WorkbenchViewCapability | null, params: Params): Promise<void> {\n    if (!capability) {\n      this._logger.warn(() => `[NullCapabilityError] No application found to provide a view capability of id '${params[ɵMicrofrontendRouteParams.ɵVIEW_CAPABILITY_ID]}'. Maybe, the requested view is not public API or the providing application not available.`, LoggerNames.MICROFRONTEND_ROUTING);\n      this.unload();\n      return;\n    }\n\n    this.capability = capability;\n    this.view.registerAdapter(MicrofrontendWorkbenchView, new MicrofrontendWorkbenchView(capability, params));\n\n    // Check if navigating to a new microfrontend.\n    if (!prevCapability || prevCapability.metadata!.id !== capability.metadata!.id) {\n      this.setViewProperties(capability, params);\n      this.installParamsUpdater(capability);\n    }\n\n    // Signal the currently loaded application to unload.\n    if (prevCapability && prevCapability.metadata!.appSymbolicName !== capability.metadata!.appSymbolicName) {\n      await this._messageClient.publish(ɵWorkbenchCommands.viewUnloadingTopic(this.view.id));\n    }\n\n    // Pass parameters to the microfrontend.\n    await this._messageClient.publish(ɵWorkbenchCommands.viewParamsTopic(this.view.id), Maps.coerce(params), {retain: true});\n\n    // When navigating to another view capability of the same app, wait until transported the params to the microfrontend before loading the\n    // new microfrontend into the iframe, allowing the currently loaded microfrontend to clean up subscriptions.\n    if (prevCapability &&\n      prevCapability.metadata!.appSymbolicName === capability.metadata!.appSymbolicName &&\n      prevCapability.metadata!.id !== capability.metadata!.id) {\n      await this.waitForCapabilityParam(capability.metadata!.id);\n    }\n\n    // Wait for the context to be set on the router outlet, as @scion/workbench-client expects it to be available on startup.\n    if (!prevCapability) {\n      await Microfrontends.waitForContext(this._routerOutletElement, ɵVIEW_ID_CONTEXT_KEY, {injector: this._injector});\n    }\n\n    // Navigate to the microfrontend.\n    const application = this._manifestService.getApplication(capability.metadata!.appSymbolicName);\n    this._logger.debug(() => `Loading microfrontend into workbench view [viewId=${this.view.id}, app=${capability.metadata!.appSymbolicName}, baseUrl=${application.baseUrl}, path=${(capability.properties.path)}].`, LoggerNames.MICROFRONTEND_ROUTING, params, capability);\n    await this._outletRouter.navigate(capability.properties.path, {\n      outlet: this.view.id,\n      relativeTo: application.baseUrl,\n      params: params,\n      pushStateToSessionHistoryStack: false,\n      showSplash: capability.properties.showSplash,\n      ɵcapabilityId: capability.metadata!.id,\n    });\n\n    // Inactive views are not checked for changes since detached from the Angular component tree.\n    // So, we manually trigger change detection to update attributes on the `sci-router-outlet`.\n    if (!this.view.active()) {\n      this._changeDetectorRef.detectChanges();\n    }\n  }\n\n  private fetchCapability$(capabilityId: string): Observable<WorkbenchViewCapability | null> {\n    return this._manifestObjectCache.observeCapability$(capabilityId);\n  }\n\n  private installMenuAccelerators(): void {\n    // Since the iframe is added at a top-level location in the DOM, that is, not as a child element of this component,\n    // the workbench view misses keyboard events from embedded content. As a result, menu item accelerators of the context\n    // menu of this view do not work, so we install the accelerators on the router outlet as well.\n    inject(ViewMenuService).installMenuAccelerators(this._routerOutletElement, this.view);\n  }\n\n  /**\n   * Subscribes to requests from the currently loaded microfrontend to update its parameters.\n   */\n  private installParamsUpdater(viewCapability: WorkbenchViewCapability): void {\n    this._unsubscribeParamsUpdater$.next();\n    const subscription = this._messageClient.observe$<ɵViewParamsUpdateCommand>(ɵWorkbenchCommands.viewParamsUpdateTopic(this.view.id, viewCapability.metadata!.id))\n      .pipe(takeUntilDestroyed(this._destroyRef), takeUntil(this._unsubscribeParamsUpdater$))\n      .subscribe((request: TopicMessage<ɵViewParamsUpdateCommand>) => {\n        const replyTo = request.headers.get(MessageHeaders.ReplyTo) as string;\n\n        void this._workbenchRouter.navigate(layout => {\n          // Cancel navigation if the subscription was closed in the meantime, e.g., because closed the view or navigated to another capability.\n          if (subscription.closed) {\n            return null;\n          }\n\n          const paramsHandling = request.body!.paramsHandling;\n          const currentParams = this._route.snapshot.params;\n          const newParams = Dictionaries.coerce(request.body!.params); // coerce params for backward compatibility\n          const mergedParams = Objects.withoutUndefinedEntries(paramsHandling === 'merge' ? {...currentParams, ...newParams} : newParams);\n          const {urlParams, transientParams} = MicrofrontendViewRoutes.splitParams(mergedParams, viewCapability);\n\n          return layout.navigateView(this.view.id, [urlParams], {\n            relativeTo: this._route,\n            state: Objects.withoutUndefinedEntries({\n              [MicrofrontendViewRoutes.STATE_TRANSIENT_PARAMS]: transientParams,\n            }),\n          });\n        })\n          .then(success => this._messageClient.publish(replyTo, success, {headers: new Map().set(MessageHeaders.Status, ResponseStatusCodes.TERMINAL)}))\n          .catch((error: unknown) => this._messageClient.publish(replyTo, stringifyError(error), {headers: new Map().set(MessageHeaders.Status, ResponseStatusCodes.ERROR)}));\n      });\n  }\n\n  /**\n   * Updates the properties of this view, such as the view title, as defined by the capability.\n   */\n  private setViewProperties(viewCapability: WorkbenchViewCapability, params: Params): void {\n    this.view.title = Microfrontends.substituteNamedParameters(viewCapability.properties.title, Maps.coerce(params)) ?? null;\n    this.view.heading = Microfrontends.substituteNamedParameters(viewCapability.properties.heading, Maps.coerce(params)) ?? null;\n    this.view.classList.application = viewCapability.properties.cssClass;\n    this.view.closable = viewCapability.properties.closable ?? true;\n    this.view.dirty = false;\n  }\n\n  private installViewActivePublisher(): void {\n    // Run as root effect to run even if the parent component is detached from change detection (e.g., if the view is not visible).\n    rootEffect(() => {\n      const active = this.view.active();\n      untracked(() => {\n        const commandTopic = ɵWorkbenchCommands.viewActiveTopic(this.view.id);\n        void this._messageClient.publish(commandTopic, active, {retain: true});\n      });\n    });\n  }\n\n  private installPartIdPublisher(): void {\n    // Run as root effect to run even if the parent component is detached from change detection (e.g., if the view is not visible).\n    rootEffect(() => {\n      const part = this.view.part();\n      untracked(() => {\n        const commandTopic = ɵWorkbenchCommands.viewPartIdTopic(this.view.id);\n        void this._messageClient.publish(commandTopic, part.id, {retain: true});\n      });\n    });\n  }\n\n  /**\n   * Promise that resolves once params contain the given capability id.\n   */\n  private async waitForCapabilityParam(viewCapabilityId: string): Promise<void> {\n    const viewParams$ = this._messageClient.observe$<Map<string, string>>(ɵWorkbenchCommands.viewParamsTopic(this.view.id))\n      .pipe(\n        mapToBody(),\n        first(params => params.get(ɵMicrofrontendRouteParams.ɵVIEW_CAPABILITY_ID) === viewCapabilityId),\n      );\n    await firstValueFrom(viewParams$);\n  }\n\n  private installCanCloseGuard(): void {\n    const canCloseTopic = ɵWorkbenchCommands.canCloseTopic(this.view.id);\n    let canCloseRef: CanCloseRef | undefined;\n    this._messageClient.subscriberCount$(canCloseTopic)\n      .pipe(\n        map(count => count > 0),\n        takeUntilDestroyed(),\n      )\n      .subscribe(confirmClosing => {\n        if (confirmClosing) {\n          canCloseRef = this.view.canClose(() => this._messageClient.request$<boolean>(canCloseTopic).pipe(mapToBody()));\n        }\n        else {\n          canCloseRef?.dispose();\n        }\n      });\n  }\n\n  protected onFocusWithin(event: Event): void {\n    const {detail: focusWithin} = event as CustomEvent<boolean>;\n    if (focusWithin) {\n      this._host.dispatchEvent(new CustomEvent('sci-microfrontend-focusin', {bubbles: true}));\n    }\n  }\n\n  /**\n   * Computes keystrokes to bubble through the iframe boundary.\n   */\n  private computeKeyStrokesToBubble(): Signal<string[]> {\n    return computed(() => {\n      const accelerators = [\n        ...this._universalKeystrokes,\n        ...this.view.menuItems().map(menuItem => menuItem.accelerator ?? []),\n      ];\n\n      return accelerators\n        .filter(accelerator => accelerator.length)\n        .map(accelerator => accelerator.map(segment => {\n          // Normalize keystrokes according to `SciRouterOutletElement#keystrokes`\n          switch (segment) {\n            case 'ctrl':\n              return 'control';\n            case '.':\n              return 'dot';\n            case ' ':\n              return 'space';\n            default:\n              return segment;\n          }\n        }))\n        .map(accelerator => `keydown.${accelerator.join('.')}{preventDefault=true}`);\n    }, {equal: (a, b) => Arrays.isEqual(a, b, {exactOrder: false})});\n  }\n\n  private propagateWorkbenchTheme(): void {\n    Microfrontends.propagateTheme(this._routerOutletElement);\n  }\n\n  private unload(): void {\n    // Delete retained messages to free resources.\n    void this._messageClient.publish(ɵWorkbenchCommands.viewActiveTopic(this.view.id), undefined, {retain: true});\n    void this._messageClient.publish(ɵWorkbenchCommands.viewParamsTopic(this.view.id), undefined, {retain: true});\n    void this._messageClient.publish(ɵWorkbenchCommands.viewPartIdTopic(this.view.id), undefined, {retain: true});\n    void this._outletRouter.navigate(null, {outlet: this.view.id});\n    this.view.unregisterAdapter(MicrofrontendWorkbenchView);\n  }\n}\n\n/**\n * Blocks the microfrontend outlet when dialog(s) overlay this view.\n */\nfunction configureMicrofrontendGlassPane(): Provider[] {\n  return [\n    {\n      provide: GLASS_PANE_BLOCKABLE,\n      useFactory: () => inject(ɵWorkbenchView),\n    },\n    {\n      provide: GLASS_PANE_OPTIONS,\n      useFactory: () => ({attributes: {'data-viewid': inject(WorkbenchView).id}}) satisfies GlassPaneOptions,\n    },\n  ];\n}\n","<wb-content-as-overlay [config]=\"overlayConfig\">\n  <div class=\"microfrontend-view\"\n       [class.workbench-drag]=\"workbenchLayoutService.dragging()\"\n       [attr.data-viewid]=\"view.id\"\n       wbGlassPane>\n    <sci-router-outlet #router_outlet\n                       [name]=\"view.id\"\n                       [attr.data-capabilityid]=\"capability?.metadata!.id\"\n                       [attr.data-app]=\"capability?.metadata!.appSymbolicName\"\n                       [ngClass]=\"view.classList.asList()\"\n                       (focuswithin)=\"onFocusWithin($event)\"\n                       [keystrokes]=\"keystrokesToBubble()\">\n      <ng-container *ngComponentOutlet=\"splash\"/>\n    </sci-router-outlet>\n  </div>\n</wb-content-as-overlay>\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 * Keys for associating workbench-specific data with a perspective.\n */\nexport const WorkbenchPerspectiveData = {\n\n  /**\n   * Property to get the capability providing the perspective.\n   */\n  capability: 'ɵcapability',\n} as const;\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 {EnvironmentProviders, inject, Injectable, IterableDiffers, makeEnvironmentProviders} from '@angular/core';\nimport {ManifestService, Qualifier} from '@scion/microfrontend-platform';\nimport {WorkbenchCapabilities, WorkbenchPerspectiveCapability, WorkbenchViewCapability} from '@scion/workbench-client';\nimport {WorkbenchService} from '../../workbench.service';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {WorkbenchLayout, WorkbenchLayoutFn} from '../../layout/workbench-layout';\nimport {firstValueFrom} from 'rxjs';\nimport {WorkbenchLayoutFactory} from '../../layout/workbench-layout.factory';\nimport {MicrofrontendViewRoutes} from '../microfrontend-view/microfrontend-view-routes';\nimport {Logger, LoggerNames} from '../../logging';\nimport {filterArray} from '@scion/toolkit/operators';\nimport {Objects} from '../../common/objects.util';\nimport {WorkbenchPerspectiveData} from './workbench-perspective-data';\nimport {provideMicrofrontendPlatformInitializer} from '../microfrontend-platform-initializer.provider';\n\n@Injectable(/* DO NOT provide via 'providedIn' metadata as only registered if microfrontend support is enabled. */)\nclass MicrofrontendPerspectiveInstaller {\n\n  private readonly _manifestService = inject(ManifestService);\n  private readonly _workbenchService = inject(WorkbenchService);\n  private readonly _logger = inject(Logger);\n\n  constructor() {\n    const differ = inject(IterableDiffers).find([]).create<WorkbenchPerspectiveCapability>((_index, perspectiveCapability) => perspectiveCapability.metadata!.id);\n    this._manifestService.lookupCapabilities$<WorkbenchPerspectiveCapability>({type: WorkbenchCapabilities.Perspective})\n      .pipe(takeUntilDestroyed())\n      .subscribe(perspectiveCapabilities => {\n        const changes = differ.diff(perspectiveCapabilities);\n        changes?.forEachAddedItem(({item: perspectiveCapability}) => void this.registerPerspective(perspectiveCapability));\n      });\n  }\n\n  private async registerPerspective(perspectiveCapability: WorkbenchPerspectiveCapability): Promise<void> {\n    return this._workbenchService.registerPerspective({\n      id: perspectiveCapability.metadata!.id,\n      layout: this.createLayout(perspectiveCapability),\n      data: {\n        ...perspectiveCapability.properties.data,\n        [WorkbenchPerspectiveData.capability]: perspectiveCapability,\n      },\n    });\n  }\n\n  private createLayout(perspectiveCapability: WorkbenchPerspectiveCapability): WorkbenchLayoutFn {\n    return async (factory: WorkbenchLayoutFactory): Promise<WorkbenchLayout> => {\n      const [initialPart, ...parts] = perspectiveCapability.properties.layout;\n\n      // Add parts to the layout.\n      let layout = factory.addPart(initialPart.id);\n      for (const part of parts) {\n        layout = layout.addPart(part.id, {\n          relativeTo: part.relativeTo,\n          align: part.align,\n          ratio: part.ratio,\n        });\n      }\n\n      // Add views to the layout.\n      for (const part of [initialPart, ...parts]) {\n        if (!part.views?.length) {\n          continue;\n        }\n\n        for (const [viewIndex, view] of part.views.entries()) {\n          const viewCapabilities = await this.lookupViewCapabilities(view.qualifier, {\n            perspectiveProvider: perspectiveCapability.metadata!.appSymbolicName,\n            perspectiveQualifier: perspectiveCapability.qualifier,\n          });\n\n          viewCapabilities\n            .map(viewCapability => viewCapability.metadata!.id)\n            .sort() // Ensure stable view order in case multiple capabilities match the qualifier.\n            .forEach(viewCapabilityId => {\n              const commands = MicrofrontendViewRoutes.createMicrofrontendNavigateCommands(viewCapabilityId, view.params ?? {});\n              const alternativeViewId = `${part.id}-${viewCapabilityId}-${viewIndex}`;\n              layout = layout\n                .addView(alternativeViewId, {partId: part.id, activateView: view.active})\n                .navigateView(alternativeViewId, commands, {cssClass: view.cssClass});\n            });\n\n          // Navigate to the \"~\" route if not finding a view capability, e.g., because the perspective provider references a private view capability\n          // or has not declared an intention. Since there is no route registered under /~ the \"Not Found\" page will be displayed.\n          if (!viewCapabilities.length) {\n            this._logger.warn(() => `[NullCapabilityError] The perspective '${Objects.toMatrixNotation(perspectiveCapability.qualifier)}' cannot find the view '${Objects.toMatrixNotation(view.qualifier)}'. Verify the application is available and the view exists.`, LoggerNames.MICROFRONTEND);\n            const alternativeViewId = `${part.id}-${viewIndex}`;\n            layout = layout\n              .addView(alternativeViewId, {partId: part.id, activateView: view.active})\n              .navigateView(alternativeViewId, ['~', view.qualifier], {cssClass: view.cssClass});\n          }\n        }\n      }\n\n      return layout;\n    };\n  }\n\n  /**\n   * Searches for views that match the specified qualifier and are accessible to the perspective provider,\n   * i.e., its own view capabilities or public view capabilities of other applications the perspective provider\n   * has an intention for.\n   */\n  private async lookupViewCapabilities(qualifier: Qualifier, perspective: {perspectiveProvider: string; perspectiveQualifier: Qualifier}): Promise<WorkbenchViewCapability[]> {\n    const viewCapabilities$ = this._manifestService.lookupCapabilities$<WorkbenchViewCapability>({type: WorkbenchCapabilities.View, qualifier})\n      .pipe(filterArray(async viewCapability => {\n        const allowed = await firstValueFrom(this._manifestService.isApplicationQualified$(perspective.perspectiveProvider, {capabilityId: viewCapability.metadata!.id}));\n        if (!allowed) {\n          this._logger.warn(`[NotQualifiedError] Application '${(perspective.perspectiveProvider)}' is not allowed to reference the view '${Objects.toMatrixNotation(viewCapability.qualifier)}' in the perspective '${Objects.toMatrixNotation(perspective.perspectiveQualifier)}'. Ensure you have specified an intention and that the view is public.`, LoggerNames.MICROFRONTEND);\n        }\n        return allowed;\n      }));\n    return firstValueFrom(viewCapabilities$);\n  }\n}\n\n/**\n * Provides a set of DI providers registering perspectives provided via workbench perspective capabilities.\n */\nexport function providePerspectiveInstaller(): EnvironmentProviders {\n  return makeEnvironmentProviders([\n    MicrofrontendPerspectiveInstaller,\n    provideMicrofrontendPlatformInitializer(() => void inject(MicrofrontendPerspectiveInstaller)),\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 './microfrontend-platform.config'; // DO NOT remove to augment `MicrofrontendPlatformConfig` with `splash` property.\nimport {EnvironmentProviders, inject, Injectable, makeEnvironmentProviders} from '@angular/core';\nimport {MicrofrontendPlatformInitializer} from './initialization/microfrontend-platform-initializer.service';\nimport {IntentClient, ManifestService, MessageClient, MicrofrontendPlatformConfig, OutletRouter, PlatformPropertyService} from '@scion/microfrontend-platform';\nimport {Beans} from '@scion/toolkit/bean-manager';\nimport {WorkbenchDialogService, WorkbenchMessageBoxService, WorkbenchNotificationService, WorkbenchPopupService, WorkbenchRouter} from '@scion/workbench-client';\nimport {NgZoneObservableDecorator} from './initialization/ng-zone-observable-decorator';\nimport {WorkbenchConfig} from '../workbench-config';\nimport {provideViewCommandHandlers} from './microfrontend-view/microfrontend-view-command-handler.service';\nimport {provideNotificationIntentHandler} from './microfrontend-notification/microfrontend-notification-intent-handler';\nimport {MicrofrontendViewIntentHandler} from './microfrontend-view/microfrontend-view-intent-handler.interceptor';\nimport {MicrofrontendPopupIntentHandler} from './microfrontend-popup/microfrontend-popup-intent-handler.interceptor';\nimport {WorkbenchHostManifestInterceptor} from './initialization/workbench-host-manifest-interceptor.service';\nimport {CanMatchFn, Route} from '@angular/router';\nimport {MicrofrontendViewComponent} from './microfrontend-view/microfrontend-view.component';\nimport {MicrofrontendViewRoutes} from './microfrontend-view/microfrontend-view-routes';\nimport {MicrofrontendViewCapabilityValidator} from './microfrontend-view/microfrontend-view-capability-validator.interceptor';\nimport {StableCapabilityIdAssigner} from './stable-capability-id-assigner.interceptor';\nimport {MicrofrontendPopupCapabilityValidator} from './microfrontend-popup/microfrontend-popup-capability-validator.interceptor';\nimport {MicrofrontendDialogIntentHandler} from './microfrontend-dialog/microfrontend-dialog-intent-handler.interceptor';\nimport {MicrofrontendDialogCapabilityValidator} from './microfrontend-dialog/microfrontend-dialog-capability-validator.interceptor';\nimport {MicrofrontendMessageBoxIntentHandler} from './microfrontend-message-box/microfrontend-message-box-intent-handler.interceptor';\nimport {MicrofrontendMessageBoxCapabilityValidator} from './microfrontend-message-box/microfrontend-message-box-capability-validator.interceptor';\nimport {canMatchWorkbenchView} from '../routing/workbench-route-guards';\nimport {WORKBENCH_OUTLET} from '../routing/workbench-auxiliary-route-installer.service';\nimport {Routing} from '../routing/routing.util';\nimport {TEXT_MESSAGE_BOX_CAPABILITY_ROUTE} from './microfrontend-host-message-box/text-message/text-message.component';\nimport {MicrofrontendPerspectiveCapabilityValidator} from './microfrontend-perspective/microfrontend-perspective-capability-validator.interceptor';\nimport {providePerspectiveInstaller} from './microfrontend-perspective/microfrontend-perspective-installer.service';\nimport {MicrofrontendPerspectiveIntentHandler} from './microfrontend-perspective/microfrontend-perspective-intent-handler.interceptor';\nimport {provideManifestObjectCache} from './manifest-object-cache.service';\nimport {MicrofrontendPlatformConfigLoader} from './microfrontend-platform-config-loader';\nimport {provideWorkbenchInitializer} from '../startup/workbench-initializer';\nimport {Defined} from '@scion/toolkit/util';\nimport {WORKBENCH_ROUTE} from '../workbench.constants';\n\n/**\n * Provides a set of DI providers to set up microfrontend support in the workbench.\n */\nexport function provideWorkbenchMicrofrontendSupport(workbenchConfig: WorkbenchConfig): EnvironmentProviders | [] {\n  if (!workbenchConfig.microfrontendPlatform) {\n    return [];\n  }\n\n  return makeEnvironmentProviders([\n    provideMicrofrontendPlatformHost(),\n    provideMicrofrontendPlatformConfig(workbenchConfig),\n    provideViewCommandHandlers(),\n    provideNotificationIntentHandler(),\n    providePerspectiveInstaller(),\n    provideManifestObjectCache(),\n    MicrofrontendPerspectiveIntentHandler,\n    MicrofrontendViewIntentHandler,\n    MicrofrontendPopupIntentHandler,\n    MicrofrontendDialogIntentHandler,\n    MicrofrontendMessageBoxIntentHandler,\n    MicrofrontendPerspectiveCapabilityValidator,\n    MicrofrontendViewCapabilityValidator,\n    MicrofrontendPopupCapabilityValidator,\n    MicrofrontendDialogCapabilityValidator,\n    MicrofrontendMessageBoxCapabilityValidator,\n    StableCapabilityIdAssigner,\n    NgZoneObservableDecorator,\n    WorkbenchHostManifestInterceptor,\n    provideBuiltInTextMessageBoxCapabilityRoute(),\n    provideMicrofrontendViewRoute(),\n    provideMicrofrontendPlatformBeans(),\n    provideWorkbenchClientBeans(),\n  ]);\n}\n\n/**\n * Provides a set of DI providers to configure and start the SCION Microfrontend Platform in host mode.\n */\nfunction provideMicrofrontendPlatformHost(): EnvironmentProviders {\n  return makeEnvironmentProviders([\n    provideWorkbenchInitializer(() => inject(MicrofrontendPlatformInitializer).init()),\n    MicrofrontendPlatformInitializer,\n  ]);\n}\n\n/**\n * Provides the {@link MicrofrontendPlatformConfig} for DI.\n */\nfunction provideMicrofrontendPlatformConfig(config: WorkbenchConfig): EnvironmentProviders {\n  return makeEnvironmentProviders([\n    {\n      provide: MicrofrontendPlatformConfigLoader,\n      useClass: typeof config.microfrontendPlatform === 'function' ? config.microfrontendPlatform : StaticMicrofrontendPlatformConfigLoader,\n    },\n    {\n      provide: MicrofrontendPlatformConfig,\n      useFactory: () => Defined.orElseThrow(inject(MicrofrontendPlatformInitializer).config, () => Error('[MicrofrontendPlatformError] Microfrontend platform configuration not found.')),\n    },\n  ]);\n}\n\n/**\n * Provides beans of @scion/microfrontend-platform for DI.\n */\nfunction provideMicrofrontendPlatformBeans(): EnvironmentProviders {\n  return makeEnvironmentProviders([\n    {provide: MessageClient, useFactory: () => Beans.get(MessageClient)},\n    {provide: IntentClient, useFactory: () => Beans.get(IntentClient)},\n    {provide: OutletRouter, useFactory: () => Beans.get(OutletRouter)},\n    {provide: ManifestService, useFactory: () => Beans.get(ManifestService)},\n    {provide: PlatformPropertyService, useFactory: () => Beans.get(PlatformPropertyService)},\n  ]);\n}\n\n/**\n * Provides beans of @scion/workbench-client for DI.\n */\nfunction provideWorkbenchClientBeans(): EnvironmentProviders {\n  return makeEnvironmentProviders([\n    {provide: WorkbenchRouter, useFactory: () => Beans.get(WorkbenchRouter)},\n    {provide: WorkbenchPopupService, useFactory: () => Beans.get(WorkbenchPopupService)},\n    {provide: WorkbenchDialogService, useFactory: () => Beans.get(WorkbenchDialogService)},\n    {provide: WorkbenchMessageBoxService, useFactory: () => Beans.get(WorkbenchMessageBoxService)},\n    {provide: WorkbenchNotificationService, useFactory: () => Beans.get(WorkbenchNotificationService)},\n  ]);\n}\n\n/**\n * Provides the route for integrating microfrontend views.\n */\nfunction provideMicrofrontendViewRoute(): EnvironmentProviders {\n  return makeEnvironmentProviders([\n    {\n      provide: WORKBENCH_ROUTE,\n      multi: true,\n      useFactory: (): Route => ({\n        matcher: MicrofrontendViewRoutes.provideMicrofrontendRouteMatcher(),\n        component: MicrofrontendViewComponent,\n        canMatch: [canMatchWorkbenchView(true), MicrofrontendViewRoutes.canMatchViewCapability],\n      }),\n    },\n  ]);\n}\n\n/**\n * Provides the route for the built-in {@link WorkbenchMessageBoxCapability}.\n */\nfunction provideBuiltInTextMessageBoxCapabilityRoute(): EnvironmentProviders {\n  return makeEnvironmentProviders([\n    {\n      provide: WORKBENCH_ROUTE,\n      multi: true,\n      useValue: {\n        path: TEXT_MESSAGE_BOX_CAPABILITY_ROUTE,\n        loadComponent: () => import('./microfrontend-host-message-box/text-message/text-message.component'),\n        canMatch: [canMatchWorkbenchMessageBox()],\n      } satisfies Route,\n    },\n  ]);\n}\n\n/**\n * Matches the route if target of a workbench message box.\n */\nfunction canMatchWorkbenchMessageBox(): CanMatchFn {\n  return () => {\n    const outlet = inject(WORKBENCH_OUTLET, {optional: true});\n    return Routing.isMessageBoxOutlet(outlet);\n  };\n}\n\n/**\n * Provides {@link WorkbenchConfig.microfrontendPlatform} config as passed to {@link provideWorkbench}.\n */\n@Injectable(/* DO NOT provide via 'providedIn' metadata as contributed conditionally. */)\nclass StaticMicrofrontendPlatformConfigLoader implements MicrofrontendPlatformConfigLoader {\n\n  private readonly _workbenchConfig = inject(WorkbenchConfig);\n\n  public async load(): Promise<MicrofrontendPlatformConfig> {\n    return this._workbenchConfig.microfrontendPlatform! as MicrofrontendPlatformConfig;\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 {EnvironmentProviders, inject, Injectable, makeEnvironmentProviders, provideAppInitializer} from '@angular/core';\nimport {ɵWorkbenchLauncher} from './ɵworkbench-launcher.service';\nimport {WorkbenchConfig} from '../workbench-config';\n\n/**\n * Provides the main entry point to start the SCION Workbench.\n *\n * The SCION Workbench starts automatically when the `<wb-workbench>` component is added to the DOM. Alternatively,\n * the workbench can be started manually using the `WorkbenchLauncher`, such as in an app initializer or a route guard.\n *\n * **Example of starting the workbench in an app initializer:**\n * ```ts\n * import {provideWorkbench, WorkbenchLauncher} from '@scion/workbench';\n * import {bootstrapApplication} from '@angular/platform-browser';\n * import {inject, provideAppInitializer} from '@angular/core';\n *\n * bootstrapApplication(AppComponent, {\n *   providers: [\n *     provideWorkbench(),\n *     provideAppInitializer(() => inject(WorkbenchLauncher).launch())\n *   ]\n * });\n * ```\n *\n * The application can hook into the startup process of the SCION Workbench by providing one or more initializers to {@link provideWorkbenchInitializer}.\n * Initializers execute at defined points during startup, enabling the application's controlled initialization. The workbench is fully started once\n * all initializers have completed.\n *\n * **Example of registering an initializer:**\n * ```ts\n * import {provideWorkbench, provideWorkbenchInitializer} from '@scion/workbench';\n * import {bootstrapApplication} from '@angular/platform-browser';\n * import {inject} from '@angular/core';\n *\n * bootstrapApplication(AppComponent, {\n *   providers: [\n *     provideWorkbench(),\n *     provideWorkbenchInitializer(() => inject(SomeService).init()),\n *   ],\n * });\n * ```\n *\n * The application can inject {@link WorkbenchStartup} to check if the workbench has completed startup.\n *\n * @see WorkbenchConfig.startup\n * @see provideWorkbench\n * @see provideWorkbenchInitializer\n */\n@Injectable({providedIn: 'root', useExisting: ɵWorkbenchLauncher})\nexport abstract class WorkbenchLauncher {\n\n  /**\n   * Starts the SCION Workbench.\n   *\n   * Calling this method has no effect if the workbench is already starting or has started.\n   *\n   * @return A Promise that resolves when the workbench has completed the startup or that rejects if the startup failed.\n   */\n  public abstract launch(): Promise<true>;\n}\n\n/**\n * Provides a set of DI providers for launching the workbench.\n */\nexport function provideWorkbenchLauncher(workbenchConfig: WorkbenchConfig): EnvironmentProviders | [] {\n  if (workbenchConfig.startup?.launcher !== 'APP_INITIALIZER') {\n    return [];\n  }\n\n  return makeEnvironmentProviders([\n    provideAppInitializer(() => inject(WorkbenchLauncher).launch()),\n  ]);\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 {Location, LocationStrategy} from '@angular/common';\nimport {ApplicationRef, EnvironmentProviders, inject, Injectable, makeEnvironmentProviders} from '@angular/core';\nimport {Router} from '@angular/router';\nimport {WorkbenchNavigationalStates} from './workbench-navigational-states';\n\n/**\n * Provides a set of DI providers to patch {@link Location} for the Angular router to always add workbench navigations\n * to the browsing history stack.\n *\n * @see ɵLocation\n */\nexport function provideLocationPatch(): EnvironmentProviders {\n  return makeEnvironmentProviders([\n    {\n      provide: Location,\n      useClass: ɵLocation,\n    },\n  ]);\n}\n\n/**\n * Patches {@link Location} for the Angular router to always add workbench navigations to the browsing history stack,\n * even if the URL does not change.\n *\n * Rationale:\n * If only the layout of the main grid is changed, the URL does not change because the layout is passed to the\n * navigation as state and not as a query parameter. By default, an unchanged URL does not create a new entry in the\n * browsing history stack, but replaces the current entry. See Angular router.ts#setBrowserUrl\n */\n@Injectable(/* DO NOT provide via 'providedIn' metadata as registered under `Location` DI token. */)\nclass ɵLocation extends Location {\n\n  private _appRef = inject(ApplicationRef);\n  private _router: Router | undefined;\n\n  constructor() {\n    super(inject(LocationStrategy));\n  }\n\n  public override isCurrentPathEqualTo(path: string, query?: string): boolean {\n    return super.isCurrentPathEqualTo(path, query) ? !this.isWorkbenchNavigation() : false;\n  }\n\n  /**\n   * Indicates whether the current navigation is a workbench navigation performed through the workbench router.\n   */\n  private isWorkbenchNavigation(): boolean {\n    const currentNavigation = this.router?.getCurrentNavigation() ?? null;\n    return currentNavigation !== null && WorkbenchNavigationalStates.fromNavigation(currentNavigation) !== null;\n  }\n\n  /**\n   * Reference to the Angular router.\n   */\n  private get router(): Router | undefined {\n    // Note that we cannot inject the `Router` in the constructor because the `Router` depends on `Location`,\n    // which would cause a circular dependency at construction time. Instead, we inject the router lazy.\n    // However, injecting the router will fail if the platform has already been destroyed, which happens\n    // in tests that tear down before the initial navigation has finished. To avoid this error, we inject\n    // the router only if the platform is still running.\n    return (this._router ??= !this._appRef.destroyed ? this._appRef.injector.get(Router) : undefined);\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 {MenuItemConfig, WorkbenchConfig} from '../workbench-config';\nimport {WorkbenchTextProviderFn} from './workbench-text-provider.model';\nimport {Signal} from '@angular/core';\n\n/**\n * Provides texts of menu items configured in {@link ViewMenuItemsConfig}.\n *\n * @deprecated since version 19.0.0-beta.3. Remove when dropping support for {@link MenuItemConfig.text}.\n */\nexport function workbenchViewMenuConfigTextProvider(config: WorkbenchConfig): WorkbenchTextProviderFn {\n  if (!config.viewMenuItems) {\n    return () => undefined;\n  }\n\n  const menuItemTexts = new Map<string, (() => string | Signal<string>) | string | undefined>()\n    .set('workbench.close_tab.action', getConfiguredText(config.viewMenuItems.close))\n    .set('workbench.close_other_tabs.action', getConfiguredText(config.viewMenuItems.closeOthers))\n    .set('workbench.close_all_tabs.action', getConfiguredText(config.viewMenuItems.closeAll))\n    .set('workbench.close_tabs_to_the_right.action', getConfiguredText(config.viewMenuItems.closeToTheRight))\n    .set('workbench.close_tabs_to_the_left.action', getConfiguredText(config.viewMenuItems.closeToTheLeft))\n    .set('workbench.move_tab_to_the_right.action', getConfiguredText(config.viewMenuItems.moveRight))\n    .set('workbench.move_tab_to_the_left.action', getConfiguredText(config.viewMenuItems.moveLeft))\n    .set('workbench.move_tab_up.action', getConfiguredText(config.viewMenuItems.moveUp))\n    .set('workbench.move_tab_down.action', getConfiguredText(config.viewMenuItems.moveDown))\n    .set('workbench.move_tab_to_new_window.action', getConfiguredText(config.viewMenuItems.moveToNewWindow));\n\n  return (key: string): Signal<string> | string | undefined => {\n    const menuItemText = menuItemTexts.get(key);\n    if (menuItemText) {\n      return typeof menuItemText === 'function' ? menuItemText() : menuItemText;\n    }\n    return undefined;\n  };\n}\n\nfunction getConfiguredText(menuItemConfig: MenuItemConfig | false | undefined): (() => string | Signal<string>) | string | undefined {\n  return menuItemConfig ? menuItemConfig.text : 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 {WorkbenchTextProviderFn} from './workbench-text-provider.model';\n\n/**\n * Texts used in the SCION Workbench.\n *\n * To express the usage of a translation, add a suffix to the key:\n *\n * ```md\n * | Suffix   | Usage                    | Conventions                                 | Examples           |\n * |----------|--------------------------|---------------------------------------------|--------------------|\n * | .title   | - view title             | - Starts with a capital letter.             | - Settings         |\n * |          | - dialog title           | - No punctuation.                           | - Page Not Found   |\n * |          | - popup title            | - Words in capital letter.                  | - Confirm Deletion |\n * |          | - tab name               | - Verbs in the imperative form.             |                    |\n * |          | - column header in table |                                             |                    |\n * |          |                          |                                             |                    |\n * | .label   | - field label            | - Starts with a capital letter.             |                    |\n * |          |                          | - No punctuation.                           |                    |\n * |          |                          |                                             |                    |\n * | .action  | - button                 | - Starts with a capital letter.             | - Cancel           |\n * |          | - menu item              | - No punctuation.                           | - Close            |\n * |          |                          | - Verbs in the imperative form.             | - Delete...        |\n * |          |                          | - Suffix the action with an ellipsis        |                    |\n * |          |                          |   if there are additional options to enter. |                    |\n * |          |                          |                                             |                    |\n * | .tooltip | - tooltip                | - Starts with a capital letter.             | - Show Open Tabs   |\n * |          |                          | - No punctuation.                           | - Close            |\n * |          |                          | - Words in capital letter, unless a full    |                    |\n * |          |                          |   sentence.                                 |                    |\n * |          |                          |                                             |                    |\n * | .value   | - table cell             | - No punctuation.                           |                    |\n * |          | - drop down proposal     |                                             |                    |\n * |          | - list content           |                                             |                    |\n * |          |                          |                                             |                    |\n * | .message | - message                | - Full sentences.                           |                    |\n * |          | - warning                | - Punctuation.                              |                    |\n * |          | - error                  |                                             |                    |\n * |          | - info                   |                                             |                    |\n * ```\n */\nconst workbenchTexts: Record<string, string> = {\n  'workbench.clear.tooltip': 'Clear',\n  'workbench.close.action': 'Close',\n  'workbench.close_all_tabs.action': 'Close All Tabs',\n  'workbench.close_other_tabs.action': 'Close Other Tabs',\n  'workbench.close_tab.action': 'Close',\n  'workbench.close_tab.tooltip': 'Close. {{close_others_modifier}}+Click to Close Others.',\n  'workbench.close_tabs_to_the_left.action': 'Close Tabs to the Left',\n  'workbench.close_tabs_to_the_right.action': 'Close Tabs to the Right',\n  'workbench.close.tooltip': 'Close',\n  'workbench.dev_mode_only_hint.tooltip': 'This hint is only displayed in dev mode.',\n  'workbench.minimize.tooltip': 'Minimize',\n  'workbench.move_tab_down.action': 'Move Down',\n  'workbench.move_tab_to_new_window.action': 'Move to New Window',\n  'workbench.move_tab_to_the_left.action': 'Move Left',\n  'workbench.move_tab_to_the_right.action': 'Move Right',\n  'workbench.move_tab_up.action': 'Move Up',\n  'workbench.null_content.message': 'Nothing to show.',\n  'workbench.null_view_developer_hint.message': 'This view has not been navigated.<br>Navigate the view \"{{view}}\" to display content.',\n  'workbench.ok.action': 'OK',\n  'workbench.page_not_found.message': 'The requested page <strong>{{path}}</strong> was not found.<br>The URL may have changed.',\n  'workbench.page_not_found.title': 'Page Not Found',\n  'workbench.page_not_found_developer_hint.message': 'You can create a custom \"Not Found\" page component and register it in the workbench configuration to personalize this page.',\n  'workbench.page_not_found_part.message': 'The requested page <strong>{{path}}</strong> was not found.<br>The URL may have changed. Try resetting the perspective.',\n  'workbench.page_not_found_view.message': 'The requested page <strong>{{path}}</strong> was not found.<br>The URL may have changed. Try opening the view again or resetting the perspective.',\n  'workbench.reset_perspective.action': 'Reset Perspective',\n  'workbench.show_open_tabs.tooltip': 'Show Open Tabs',\n};\n\n/**\n * Provides texts used in the SCION Workbench.\n *\n * Register this provider as the last text provider, enabling change or translation of built-in workbench texts.\n */\nexport const workbenchTextProvider: WorkbenchTextProviderFn = (key: string, params: Record<string, string>): string | undefined => {\n  // Get the text.\n  const text = workbenchTexts[key];\n  if (text === undefined) {\n    return undefined;\n  }\n\n  // Replace params, if any.\n  if (Object.keys(params).length) {\n    return text.replace(/{{(?<param>[^}]+)}}/g, (match: string, param: string) => params[param] ?? match);\n  }\n\n  return text;\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 {EnvironmentProviders, makeEnvironmentProviders} from '@angular/core';\nimport {WorkbenchConfig} from '../workbench-config';\nimport {WORKBENCH_TEXT_PROVIDER} from './workbench-text-provider.model';\nimport {workbenchViewMenuConfigTextProvider} from './workbench-view-menu-config-text-provider';\nimport {workbenchTextProvider} from './workbench-text-provider';\n\n/**\n * Provides a set of DI providers to register text providers.\n */\nexport function provideTextProviders(config: WorkbenchConfig): EnvironmentProviders {\n  return makeEnvironmentProviders([\n    // Provide app-specific texts.\n    {\n      provide: WORKBENCH_TEXT_PROVIDER,\n      useValue: config.textProvider ?? (() => undefined),\n      multi: true,\n    },\n    // Provide texts of menu items configured in `config.viewMenuItems`.\n    {\n      provide: WORKBENCH_TEXT_PROVIDER,\n      useValue: workbenchViewMenuConfigTextProvider(config),\n      multi: true,\n    },\n    // Provide built-in texts.\n    {\n      provide: WORKBENCH_TEXT_PROVIDER,\n      useValue: workbenchTextProvider,\n      multi: true,\n    },\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 {WorkbenchIconDescriptor, WorkbenchIconProviderFn} from './workbench-icon-provider.model';\nimport {Component, input} from '@angular/core';\n\n/**\n * Provides Material icons for non-workbench icons.\n */\nexport const materialIconProvider: WorkbenchIconProviderFn = (ligature: string): WorkbenchIconDescriptor | undefined => {\n  if (ligature.startsWith('workbench.')) {\n    return undefined; // use default workbench icon\n  }\n\n  return {component: MaterialIconComponent, inputs: {ligature}};\n};\n\n/**\n * Renders a Material icon based on its ligature.\n *\n * This component requires a Material icon font to be included in the HTML.\n *\n * Supported fonts:\n * - https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded\n * - https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined\n * - https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp\n * - https://fonts.googleapis.com/css?family=Material+Icons|Material+Icons+Outlined|Material+Icons+Round|Material+Icons+Sharp\n */\n@Component({\n  selector: 'wb-material-icon',\n  template: '{{ligature()}}',\n  host: {\n    '[class.material-icons]': 'true',\n    '[class.material-icons-outlined]': 'true',\n    '[class.material-icons-round]': 'true',\n    '[class.material-icons-sharp]': 'true',\n    '[class.material-symbols-sharp]': 'true',\n    '[class.material-symbols-outlined]': 'true',\n    '[class.material-symbols-rounded]': 'true',\n  },\n})\nexport class MaterialIconComponent {\n  /**\n   * Specifies the ligature of the Material icon.\n   */\n  public readonly ligature = input.required<string>();\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 {WorkbenchIconDescriptor, WorkbenchIconProviderFn} from './workbench-icon-provider.model';\nimport {Component, input} from '@angular/core';\n\n/**\n * Provides icons used by the SCION Workbench.\n *\n * Register this provider as the last icon provider, enabling replacement of built-in workbench icons.\n */\nexport const workbenchIconProvider: WorkbenchIconProviderFn = (icon: string): WorkbenchIconDescriptor | undefined => {\n  const ligature = workbenchIcons[icon];\n  if (ligature) {\n    return {component: WorkbenchIconComponent, inputs: {ligature}};\n  }\n  return undefined;\n};\n\n/**\n * Maps icons to ligatures of the SCION Workbench icon font.\n */\nconst workbenchIcons: {[icon: string]: string} = {\n  'workbench.clear': 'clear',\n  'workbench.close': 'close',\n  'workbench.dirty': 'dirty',\n  'workbench.menu_down': 'chevron_down',\n  'workbench.minimize': 'minimize',\n  'workbench.pin': 'pin',\n  'workbench.search': 'search',\n};\n\n/**\n * Renders a workbench icon based on its ligature.\n *\n * This component requires the workbench icon font 'scion-workbench-icons' to be included in the HTML.\n *\n * Supported ligatures:\n * - `chevron_down`: Menu button of drop down menus\n * - `clear`: Clear button in input fields\n * - `close`: Close button in views, dialogs and notifications\n * - `dirty`: Visual indicator for view with unsaved content\n * - `minimize`: Minimize button in docked parts\n * - `pin`: Visual indicator for a pinned view\n * - `search`: Visual indicator in search or filter fields\n */\n@Component({\n  selector: 'wb-workbench-icon',\n  template: '{{ligature()}}',\n  host: {\n    '[class.scion-workbench-icons]': 'true',\n  },\n})\nexport class WorkbenchIconComponent {\n\n  /**\n   * Specifies the ligature of the icon.\n   */\n  public readonly ligature = input.required<string>();\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 {EnvironmentProviders, makeEnvironmentProviders} from '@angular/core';\nimport {WORKBENCH_ICON_PROVIDER} from './workbench-icon-provider.model';\nimport {materialIconProvider} from './material-icon-provider';\nimport {workbenchIconProvider} from './workbench-icon-provider';\nimport {WorkbenchConfig} from '../workbench-config';\n\n/**\n * Provides a set of DI providers to register icon providers.\n */\nexport function provideIconProviders(config: WorkbenchConfig): EnvironmentProviders {\n  return makeEnvironmentProviders([\n    // Provide app-specific icons, or fall back to Material icons.\n    {\n      provide: WORKBENCH_ICON_PROVIDER,\n      useValue: config.iconProvider ?? materialIconProvider,\n      multi: true,\n    },\n    // Provide built-in icons.\n    {\n      provide: WORKBENCH_ICON_PROVIDER,\n      useValue: workbenchIconProvider,\n      multi: true,\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 {EnvironmentProviders, inject, makeEnvironmentProviders, provideEnvironmentInitializer} from '@angular/core';\nimport {WorkbenchService} from './workbench.service';\nimport {WorkbenchUrlObserver} from './routing/workbench-url-observer.service';\nimport {WorkbenchConfig} from './workbench-config';\nimport {ViewMenuService} from './part/view-context-menu/view-menu.service';\nimport {ViewMoveHandler} from './view/view-move-handler.service';\nimport {provideWorkbenchMicrofrontendSupport} from './microfrontend-platform/workbench-microfrontend-support';\nimport {provideWorkbenchLauncher} from './startup/workbench-launcher.service';\nimport {provideLogging} from './logging';\nimport {provideWorkbenchInitializer, WorkbenchStartupPhase} from './startup/workbench-initializer';\nimport {WorkbenchPerspectiveService} from './perspective/workbench-perspective.service';\nimport {DefaultWorkbenchStorage, WorkbenchStorage} from './storage/workbench-storage';\nimport {provideLocationPatch} from './routing/ɵlocation';\nimport {WorkbenchThemeSwitcher} from './theme/workbench-theme-switcher.service';\nimport {ViewTabDragImageRenderer} from './view-dnd/view-tab-drag-image-renderer.service';\nimport {provideTextProviders} from './text/text-providers';\nimport {provideIconProviders} from './icon/icon-providers';\n\n/**\n * Enables and configures the SCION Workbench, returning a set of dependency-injection providers to be registered in Angular.\n *\n * ### About\n * SCION Workbench enables the creation of Angular web applications that require a flexible layout to display content side-by-side\n * or stacked, all personalizable by the user via drag & drop. This type of layout is ideal for applications with non-linear workflows,\n * enabling users to work on content in parallel.\n *\n * An application can have multiple layouts, called perspectives. A perspective defines an arrangement of parts and views.\n * Parts can be docked to the side or positioned relative to each other. Views are stacked in parts and can be dragged to other parts.\n * 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 last layout of each perspective,\n * restoring it the next time it is activated.\n *\n * A perspective typically has a main area part and other parts docked to the side, providing navigation and context-sensitive assistance to support\n * the user's workflow. Initially empty or displaying a welcome page, the main area is where the workbench opens new views by default. Users can split\n * the main area (or any other part) by dragging views side-by-side, vertically and horizontally, even across windows.\n *\n * Unlike any other part, the main area is shared between perspectives, and its layout is not reset when resetting perspectives. Having a main area and\n * multiple perspectives is optional.\n *\n * ### Usage\n * ```ts\n * import {MAIN_AREA, provideWorkbench, WorkbenchLayoutFactory} from '@scion/workbench';\n * import {provideRouter} from '@angular/router';\n * import {provideAnimations} from '@angular/platform-browser/animations';\n * import {bootstrapApplication} from '@angular/platform-browser';\n *\n * bootstrapApplication(AppComponent, {\n *   providers: [\n *     provideWorkbench({\n *       layout: (factory: WorkbenchLayoutFactory) => factory\n *         .addPart(MAIN_AREA)\n *         .addPart('todos', {dockTo: 'left-top'}, {label: 'Todos', icon: 'checklist'})\n *         .navigatePart(MAIN_AREA, ['overview'])\n *         .navigatePart('todos', ['todos'])\n *         .activatePart('todos'),\n *     }),\n *     provideRouter([\n *       {path: 'overview', loadComponent: () => import('./overview/overview.component')},\n *       {path: 'todos', loadComponent: () => import('./todos/todos.component')},\n *     ]),\n *     provideAnimations(),\n *   ],\n * });\n * ```\n *\n * ### Startup\n * The SCION Workbench starts automatically when the `<wb-workbench>` component is added to the DOM. Alternatively, the workbench can be\n * started manually using the {@link WorkbenchLauncher}, such as in an app initializer or a route guard.\n *\n * Example of starting the workbench in an app initializer:\n *\n * ```ts\n * import {provideWorkbench, WorkbenchLauncher} from '@scion/workbench';\n * import {bootstrapApplication} from '@angular/platform-browser';\n * import {inject, provideAppInitializer} from '@angular/core';\n *\n * bootstrapApplication(AppComponent, {\n *   providers: [\n *     provideWorkbench(),\n *     provideAppInitializer(() => inject(WorkbenchLauncher).launch())\n *   ]\n * });\n * ```\n *\n * Starting the workbench in an app initializer will block Angular's app startup until the workbench is ready.\n *\n * ### Startup Hooks\n * The application can hook into the startup process of the SCION Workbench by providing one or more initializers to the `provideWorkbenchInitializer()` function.\n * Initializers execute at defined points during startup, enabling the application's controlled initialization.\n *\n * ```ts\n * import {provideWorkbench, provideWorkbenchInitializer} from '@scion/workbench';\n * import {bootstrapApplication} from '@angular/platform-browser';\n * import {inject} from '@angular/core';\n *\n * bootstrapApplication(AppComponent, {\n *   providers: [\n *     provideWorkbench(),\n *     provideWorkbenchInitializer(() => inject(SomeService).init()),\n *   ],\n * });\n * ```\n */\nexport function provideWorkbench(config?: WorkbenchConfig): EnvironmentProviders {\n  config ??= {};\n\n  return makeEnvironmentProviders([\n    {\n      provide: WorkbenchConfig,\n      useValue: config,\n    },\n    {\n      provide: WorkbenchStorage,\n      useClass: config.storage ?? DefaultWorkbenchStorage,\n    },\n    provideWorkbenchInitializer(() => void inject(WorkbenchThemeSwitcher), {phase: WorkbenchStartupPhase.PreStartup}),\n    provideWorkbenchInitializer(() => void inject(ViewMenuService)),\n    provideWorkbenchInitializer(() => void inject(ViewMoveHandler)),\n    provideWorkbenchInitializer(() => void inject(ViewTabDragImageRenderer)),\n    provideWorkbenchInitializer(() => inject(WorkbenchPerspectiveService).init(), {phase: WorkbenchStartupPhase.PostStartup}),\n    provideEnvironmentInitializer(() => inject(WorkbenchUrlObserver)),\n    provideEnvironmentInitializer(() => rejectIfNotRootEnvironment()),\n    provideWorkbenchLauncher(config),\n    provideTextProviders(config),\n    provideIconProviders(config),\n    provideLogging(config),\n    provideLocationPatch(),\n    provideWorkbenchMicrofrontendSupport(config),\n  ]);\n}\n\nfunction rejectIfNotRootEnvironment(): string {\n  if (inject(WorkbenchService, {optional: true, skipSelf: true})) {\n    throw Error('[ProvideWorkbenchError] SCION Workbench must be provided in root environment.');\n  }\n  return 'root';\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 {ChangeDetectionStrategy, Component} from '@angular/core';\nimport {SciThrobberComponent} from '@scion/components/throbber';\n\n/**\n * Default splash displayed while starting the workbench.\n */\n@Component({\n  selector: 'wb-splash',\n  templateUrl: './splash.component.html',\n  styleUrls: ['./splash.component.scss'],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  imports: [SciThrobberComponent],\n})\nexport class SplashComponent {\n}\n","<sci-throbber type=\"ellipsis\"/>\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 {Pipe, PipeTransform} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {Observables} from '@scion/toolkit/util';\n\n/**\n * Creates an `Observable` from the given value, or returns the value if already an `Observable`.\n * If given a `Promise`, it is converted into an `Observable`.\n */\n@Pipe({name: 'wbCoerceObservable$'})\nexport class CoerceObservablePipe implements PipeTransform {\n\n  public transform<T>(value: T | Observable<T>): Observable<T> {\n    return Observables.coerce(value);\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 {ChangeDetectionStrategy, ChangeDetectorRef, Component, effect, HostListener, inject, Injector, input, output, untracked} from '@angular/core';\nimport {EMPTY, OperatorFunction, timer} from 'rxjs';\nimport {switchMap} from 'rxjs/operators';\nimport {ɵNotification} from './ɵnotification';\nimport {CdkPortalOutlet, ComponentPortal} from '@angular/cdk/portal';\nimport {Notification} from './notification';\nimport {AsyncPipe} from '@angular/common';\nimport {CoerceObservablePipe} from '../common/coerce-observable.pipe';\nimport {TextPipe} from '../text/text.pipe';\nimport {IconComponent} from '../icon/icon.component';\n\n/**\n * A notification is a closable message that appears in the upper-right corner and disappears automatically after a few seconds.\n * It informs the user of a system event, e.g., that a task has been completed or an error has occurred.\n */\n@Component({\n  selector: 'wb-notification',\n  templateUrl: './notification.component.html',\n  styleUrls: ['./notification.component.scss'],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  imports: [\n    AsyncPipe,\n    CdkPortalOutlet,\n    CoerceObservablePipe,\n    TextPipe,\n    IconComponent,\n  ],\n})\nexport class NotificationComponent {\n\n  public readonly notification = input.required<ɵNotification>();\n  public readonly closeNotification = output<void>();\n\n  private readonly _injector = inject(Injector);\n  private readonly _cd = inject(ChangeDetectorRef);\n\n  protected portal: ComponentPortal<unknown> | undefined;\n\n  constructor() {\n    this.createPortal();\n    this.installAutoCloseTimer();\n  }\n\n  @HostListener('mousedown', ['$event'])\n  protected onMousedown(event: MouseEvent): void {\n    if (event.buttons === AUXILARY_MOUSE_BUTTON) {\n      this.closeNotification.emit();\n    }\n  }\n\n  protected onClose(): void {\n    this.closeNotification.emit();\n  }\n\n  /**\n   * Creates the portal displaying the notification.\n   */\n  private createPortal(): void {\n    effect(() => {\n      const notification = this.notification();\n\n      untracked(() => {\n        const componentConstructOptions = notification.config.componentConstructOptions;\n        this.portal = new ComponentPortal(notification.component, componentConstructOptions?.viewContainerRef ?? null, Injector.create({\n          parent: notification.config.componentConstructOptions?.injector ?? this._injector,\n          providers: [\n            {provide: Notification, useValue: notification},\n          ],\n        }));\n\n        // Mark for check to support setting notification properties (e.g., severity, title) in the constructor of the notification component.\n        this._cd.markForCheck();\n      });\n    });\n  }\n\n  /**\n   * Installs a timer to close the notification.\n   */\n  private installAutoCloseTimer(): void {\n    effect(onCleanup => {\n      const notification = this.notification();\n\n      untracked(() => {\n        const subscription = notification.duration$\n          .pipe(delayDuration())\n          .subscribe(() => this.closeNotification.emit());\n        onCleanup(() => subscription.unsubscribe());\n      });\n    });\n\n    function delayDuration(): OperatorFunction<string | number, unknown> {\n      return switchMap(duration => {\n        switch (duration) {\n          case 'short':\n            return timer(7000);\n          case 'medium':\n            return timer(15000);\n          case 'long':\n            return timer(30000);\n          case 'infinite':\n            return EMPTY;\n          default:\n            if (typeof duration === 'number') {\n              return timer(duration * 1000);\n            }\n            return EMPTY;\n        }\n      });\n    }\n  }\n}\n\n/**\n * Indicates that the auxilary mouse button is pressed (usually the mouse wheel button or middle button).\n */\nconst AUXILARY_MOUSE_BUTTON = 4;\n","<div class=\"outline\">\n  @if (notification().title$ | async | wbCoerceObservable$ | async; as title) {\n    <header class=\"e2e-title\">{{(title | wbText)()}}</header>\n  }\n  <ng-container *cdkPortalOutlet=\"portal\"/>\n</div>\n<button (click)=\"onClose()\"\n        [title]=\"('%workbench.close.tooltip' | wbText)()\"\n        class=\"close e2e-close\">\n  <wb-icon icon=\"workbench.close\"/>\n</button>\n","import {Pipe, PipeTransform} from '@angular/core';\nimport {combineLatest, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\nimport {ɵNotification} from './ɵnotification';\n\n/**\n * Collects CSS classes to be applied to the passed notification instance and returns them as\n * array in an Observable.\n */\n@Pipe({name: 'wbNotificationCssClasses$'})\nexport class NotificationCssClassesPipe implements PipeTransform {\n\n  public transform(notification: ɵNotification): Observable<string[]> {\n    return combineLatest([notification.severity$, notification.cssClass$])\n      .pipe(map(([severity, cssClasses]) => new Array<string>()\n        .concat(cssClasses)\n        .concat(severity)\n        .concat(`e2e-severity-${severity}`),\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 {animate, AnimationMetadata, style, transition, trigger} from '@angular/animations';\nimport {ChangeDetectionStrategy, Component, inject} from '@angular/core';\nimport {NotificationService} from './notification.service';\nimport {ɵNotification} from './ɵnotification';\nimport {NotificationComponent} from './notification.component';\nimport {AsyncPipe, NgClass} from '@angular/common';\nimport {NotificationCssClassesPipe} from './notification-css-classes.pipe';\n\n/**\n * Displays notifications on the right side.  Multiple notifications are stacked vertically.\n */\n@Component({\n  selector: 'wb-notification-list',\n  templateUrl: './notification-list.component.html',\n  styleUrls: ['./notification-list.component.scss'],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  imports: [\n    AsyncPipe,\n    NgClass,\n    NotificationComponent,\n    NotificationCssClassesPipe,\n  ],\n  animations: [trigger('notification-enter-or-leave', NotificationListComponent.provideAnimation())],\n})\nexport class NotificationListComponent {\n\n  private readonly _notificationService = inject(NotificationService);\n\n  protected readonly notifications$ = this._notificationService.notifications$;\n\n  protected onNotificationClose(notification: ɵNotification): void {\n    this._notificationService.closeNotification(notification);\n  }\n\n  /**\n   * Returns animation metadata to slide-in a new notification, and to fade-out upon dismiss.\n   */\n  private static provideAnimation(): AnimationMetadata[] {\n    return [\n      transition(':enter', [\n        style({opacity: 0, left: '100%'}),\n        animate('.3s ease-out', style({opacity: 1, left: 0})),\n      ]),\n    ];\n  }\n}\n","@for (notification of notifications$ | async; track notification.config.group || notification) {\n  <wb-notification [notification]=\"notification\"\n                   [ngClass]=\"notification | wbNotificationCssClasses$ | async\"\n                   (closeNotification)=\"onNotificationClose(notification)\"\n                   @notification-enter-or-leave/>\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 {Component, computed, ElementRef, inject, input} from '@angular/core';\nimport {MActivity} from '../../workbench-activity.model';\nimport {ɵWorkbenchRouter} from '../../../routing/ɵworkbench-router.service';\nimport {synchronizeCssClasses} from '../../../common/css-class.util';\nimport {Arrays} from '@scion/toolkit/util';\nimport {IconComponent} from '../../../icon/icon.component';\nimport {text} from '../../../text/text';\n\n/**\n * Renders a button to toggle the visibility of an activity.\n */\n@Component({\n  selector: 'wb-activity-item',\n  templateUrl: './activity-item.component.html',\n  styleUrls: ['./activity-item.component.scss'],\n  imports: [\n    IconComponent,\n  ],\n  host: {\n    '[class.active]': 'active()',\n    '[attr.data-activityid]': 'activity().id',\n    '[attr.title]': 'tooltip()',\n  },\n})\nexport class ActivityItemComponent {\n\n  public readonly activity = input.required<MActivity>();\n  public readonly active = input.required<boolean>();\n\n  protected readonly tooltip = text(computed(() => this.activity().tooltip ?? this.activity().label));\n\n  private readonly _workbenchRouter = inject(ɵWorkbenchRouter);\n\n  constructor() {\n    this.addHostCssClasses();\n  }\n\n  protected onToggle(): void {\n    void this._workbenchRouter.navigate(layout => layout.toggleActivity(this.activity().id));\n  }\n\n  private addHostCssClasses(): void {\n    const host = inject(ElementRef).nativeElement as HTMLElement;\n    synchronizeCssClasses(host, computed(() => Arrays.coerce(this.activity().cssClass)));\n  }\n}\n","<button (click)=\"onToggle()\" [class.active]=\"active()\">\n  <wb-icon [icon]=\"activity().icon\"/>\n</button>\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 {Component, input} from '@angular/core';\nimport {MActivityStack} from '../../workbench-activity.model';\nimport {ActivityItemComponent} from '../activity-item/activity-item.component';\n\n/**\n * Represents the stack of activities in a docking area.\n */\n@Component({\n  selector: 'wb-activity-stack',\n  templateUrl: './activity-stack.component.html',\n  styleUrls: ['./activity-stack.component.scss'],\n  imports: [\n    ActivityItemComponent,\n  ],\n})\nexport class ActivityStackComponent {\n\n  public readonly stack = input.required<MActivityStack>();\n}\n","@for (activity of stack().activities; track activity.id) {\n  <wb-activity-item [activity]=\"activity\" [active]=\"stack().activeActivityId === activity.id\"/>\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 {Component, inject, input} from '@angular/core';\nimport {ActivityStackComponent} from './activity-stack/activity-stack.component';\nimport {ɵWorkbenchService} from '../../ɵworkbench.service';\n\n/**\n * Renders the activity bar of a given workbench side.\n */\n@Component({\n  selector: 'wb-activity-bar',\n  templateUrl: './activity-bar.component.html',\n  styleUrls: ['./activity-bar.component.scss'],\n  imports: [\n    ActivityStackComponent,\n  ],\n  host: {\n    '[attr.data-align]': 'align()',\n  },\n})\nexport class ActivityBarComponent {\n\n  public readonly align = input.required<'left' | 'right'>();\n\n  protected readonly layout = inject(ɵWorkbenchService).layout;\n}\n","@let activityLayout = layout().activityLayout;\n\n@switch (align()) {\n  @case ('left') {\n    @if (activityLayout.toolbars.leftTop.activities.length) {\n      <wb-activity-stack [stack]=\"activityLayout.toolbars.leftTop\" data-docking-area=\"left-top\"/>\n    }\n\n    @if (activityLayout.toolbars.leftTop.activities.length && activityLayout.toolbars.leftBottom.activities.length) {\n      <hr/>\n    }\n\n    @if (activityLayout.toolbars.leftBottom.activities.length) {\n      <wb-activity-stack [stack]=\"activityLayout.toolbars.leftBottom\" data-docking-area=\"left-bottom\"/>\n    }\n    <div class=\"filler\"></div>\n    @if (activityLayout.toolbars.bottomLeft.activities.length) {\n      <wb-activity-stack [stack]=\"activityLayout.toolbars.bottomLeft\" data-docking-area=\"bottom-left\"/>\n    }\n  }\n  @case ('right') {\n    @if (activityLayout.toolbars.rightTop.activities.length) {\n      <wb-activity-stack [stack]=\"activityLayout.toolbars.rightTop\" data-docking-area=\"right-top\"/>\n    }\n\n    @if (activityLayout.toolbars.rightTop.activities.length && activityLayout.toolbars.rightBottom.activities.length) {\n      <hr>\n    }\n\n    @if (activityLayout.toolbars.rightBottom.activities.length) {\n      <wb-activity-stack [stack]=\"activityLayout.toolbars.rightBottom\" data-docking-area=\"right-bottom\"/>\n    }\n    <div class=\"filler\"></div>\n    @if (activityLayout.toolbars.bottomRight.activities.length) {\n      <wb-activity-stack [stack]=\"activityLayout.toolbars.bottomRight\" data-docking-area=\"bottom-right\"/>\n    }\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 {Component, computed, inject, input, Signal} from '@angular/core';\nimport {ɵWorkbenchRouter} from '../../routing/ɵworkbench-router.service';\nimport {GridComponent} from '../../layout/grid/grid.component';\nimport {WorkbenchLayoutService} from '../../layout/workbench-layout.service';\nimport {ActivityId} from '../workbench-activity.model';\nimport {NgTemplateOutlet} from '@angular/common';\nimport {SciSashboxComponent, SciSashDirective} from '@scion/components/sashbox';\nimport {Objects} from '@scion/toolkit/util';\n\n/**\n * Displays two activities, split vertically or horizontally based on the panel's alignment.\n */\n@Component({\n  selector: 'wb-activity-panel',\n  templateUrl: './activity-panel.component.html',\n  styleUrls: ['./activity-panel.component.scss'],\n  imports: [\n    NgTemplateOutlet,\n    SciSashboxComponent,\n    SciSashDirective,\n    GridComponent,\n  ],\n  host: {\n    '[attr.data-panel]': 'panel()',\n  },\n})\nexport class ActivityPanelComponent {\n\n  /**\n   * Specifies the location of the panel.\n   */\n  public readonly panel = input.required<'left' | 'right' | 'bottom'>();\n\n  /**\n   * Specifies the first activity to display in the panel.\n   */\n  public readonly activityId1 = input.required<ActivityId | undefined>();\n\n  /**\n   * Specifies the second activity to display in the panel.\n   */\n  public readonly activityId2 = input.required<ActivityId | undefined>();\n\n  private readonly _workbenchLayoutService = inject(WorkbenchLayoutService);\n  private readonly _workbenchRouter = inject(ɵWorkbenchRouter);\n\n  protected readonly layout = this._workbenchLayoutService.layout;\n  protected readonly direction = this.computeDirection();\n  protected readonly sashSizes = this.computeSashSizes();\n\n  protected onSashStart(): void {\n    this._workbenchLayoutService.signalResizing(true);\n  }\n\n  protected onSashEnd({sash1, sash2}: {[sashKey: string]: number}): void {\n    this._workbenchLayoutService.signalResizing(false);\n\n    const ratio = sash1! / (sash1! + sash2!);\n    void this._workbenchRouter.navigate(layout => layout.setActivityPanelSplitRatio(this.panel(), ratio));\n  }\n\n  /**\n   * Computes the direction of the sashbox.\n   */\n  private computeDirection(): Signal<'row' | 'column'> {\n    return computed(() => this.panel() === 'bottom' ? 'row' : 'column');\n  }\n\n  /**\n   * Calculates the size of two sashes based on the given ratio.\n   */\n  private computeSashSizes(): Signal<{sash1: string; sash2: string}> {\n    return computed(() => {\n      const ratio = this.layout().activityLayout.panels[this.panel()].ratio;\n      // Important: `SciSashboxComponent` requires proportions to be >= 1. For this reason we cannot simply calculate [ratio, 1 - ratio].\n      if (ratio === 0) {\n        return {sash1: '0px', sash2: '1'};\n      }\n      if (ratio === 1) {\n        return {sash1: '1', sash2: '0px'};\n      }\n\n      return {\n        sash1: `${1 / (1 - ratio)}`,\n        sash2: `${1 / ratio}`,\n      };\n    }, {equal: Objects.isEqual});\n  }\n}\n","@if (activityId1() && activityId2()) {\n  <sci-sashbox [direction]=\"direction()\" (sashStart)=\"onSashStart()\" (sashEnd)=\"onSashEnd($event)\">\n    <ng-template sciSash [size]=\"sashSizes().sash1\" key=\"sash1\">\n      <ng-container *ngTemplateOutlet=\"activity_template; context: {$implicit: activityId1()}\"/>\n    </ng-template>\n\n    <ng-template sciSash [size]=\"sashSizes().sash2\" key=\"sash2\">\n      <ng-container *ngTemplateOutlet=\"activity_template; context: {$implicit: activityId2()}\"/>\n    </ng-template>\n  </sci-sashbox>\n} @else if (activityId1()) {\n  <ng-container *ngTemplateOutlet=\"activity_template; context: {$implicit: activityId1()}\"/>\n} @else if (activityId2()) {\n  <ng-container *ngTemplateOutlet=\"activity_template; context: {$implicit: activityId2()}\"/>\n}\n\n<ng-template #activity_template let-activityId>\n  <wb-grid [grid]=\"layout().grids[activityId]!\"\n           [attr.data-grid]=\"activityId\"\n           [gridDropZone]=\"{\n             dropRegionSize: .15,\n             dropPlaceholderSize: .15,\n             dropZoneAttributes: {'data-grid': activityId},\n           }\"/>\n</ng-template>\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 {Component, computed, inject, input} from '@angular/core';\nimport {ActivityBarComponent} from '../activity/activity-bar/activity-bar.component';\nimport {WorkbenchLayoutService} from './workbench-layout.service';\nimport {SciSashboxComponent, SciSashDirective} from '@scion/components/sashbox';\nimport {ActivityPanelComponent} from '../activity/activity-panel/activity-panel.component';\nimport {GridComponent} from './grid/grid.component';\nimport {ɵWorkbenchRouter} from '../routing/ɵworkbench-router.service';\nimport {ɵWorkbenchLayout} from './ɵworkbench-layout';\nimport {NgTemplateOutlet} from '@angular/common';\nimport {WorkbenchService} from '../workbench.service';\nimport {GridIfVisiblePipe} from '../common/grid-if-visible.pipe';\nimport {RouterOutlet} from '@angular/router';\nimport {SciViewportComponent} from '@scion/components/viewport';\nimport {ViewDropZoneDirective, WbViewDropEvent} from '../view-dnd/view-drop-zone.directive';\nimport {GridDropTargets} from '../view-dnd/grid-drop-targets.util';\nimport {DESKTOP} from '../workbench-element-references';\nimport {ViewDragService} from '../view-dnd/view-drag.service';\nimport {Logger} from '../logging';\nimport {WORKBENCH_ID} from '../workbench-id';\nimport {WorkbenchPerspectiveService} from '../perspective/workbench-perspective.service';\nimport {MAIN_AREA} from './workbench-layout';\n\n@Component({\n  selector: 'wb-layout',\n  templateUrl: './layout.component.html',\n  styleUrls: ['./layout.component.scss'],\n  imports: [\n    ActivityBarComponent,\n    SciSashDirective,\n    SciSashboxComponent,\n    ActivityPanelComponent,\n    GridComponent,\n    NgTemplateOutlet,\n    GridIfVisiblePipe,\n    RouterOutlet,\n    SciViewportComponent,\n    ViewDropZoneDirective,\n  ],\n  host: {\n    '[@.disabled]': 'perspectiveService.switchingPerspective() || perspectiveService.resettingPerspective()',\n  },\n})\nexport class LayoutComponent {\n\n  public readonly layout = input.required<ɵWorkbenchLayout>();\n\n  private readonly _workbenchLayoutService = inject(WorkbenchLayoutService);\n  private readonly _workbenchRouter = inject(ɵWorkbenchRouter);\n  private readonly _workbenchId = inject(WORKBENCH_ID);\n  private readonly _viewDragService = inject(ViewDragService);\n  private readonly _logger = inject(Logger);\n  private readonly _panels = computed(() => this.layout().activityLayout.panels);\n\n  protected readonly desktop = inject(DESKTOP);\n  protected readonly toolbars = computed(() => this.layout().activityLayout.toolbars);\n\n  protected readonly leftActivityPanel = computed(() => this.toolbars().leftTop.activeActivityId || this.toolbars().leftBottom.activeActivityId ? this._panels().left : null);\n  protected readonly rightActivityPanel = computed(() => this.toolbars().rightTop.activeActivityId || this.toolbars().rightBottom.activeActivityId ? this._panels().right : null);\n  protected readonly bottomActivityPanel = computed(() => this.toolbars().bottomLeft.activeActivityId || this.toolbars().bottomRight.activeActivityId ? this._panels().bottom : null);\n\n  protected readonly leftActivityBarVisible = computed(() => this.toolbars().leftTop.activities.length || this.toolbars().leftBottom.activities.length || this.toolbars().bottomLeft.activities.length);\n  protected readonly rightActivityBarVisible = computed(() => this.toolbars().rightTop.activities.length || this.toolbars().rightBottom.activities.length || this.toolbars().bottomRight.activities.length);\n\n  protected readonly panelAlignment = inject(WorkbenchService).settings.panelAlignment;\n  protected readonly panelAnimation = inject(WorkbenchService).settings.panelAnimation;\n\n  protected readonly perspectiveService = inject(WorkbenchPerspectiveService);\n\n  /**\n   * Determines if a view can be dropped to the main grid.\n   */\n  protected readonly canDrop = inject(ViewDragService).canDrop(computed(() => this.layout().grids.main));\n\n  /**\n   * Determines if dropping at the boundaries of the main grid is enabled.\n   *\n   * Enabled for layouts without activities or layouts with activities but no main area.\n   */\n  protected readonly canDropInMainGrid = computed(() => {\n    return !this.layout().hasActivities() || this.layout().parts({grid: 'main'}).some(part => part.id !== MAIN_AREA);\n  });\n\n  protected onSashStart(): void {\n    this._workbenchLayoutService.signalResizing(true);\n  }\n\n  protected onHorizontalSashEnd({left, right}: {[sashKey: string]: number}): void {\n    this._workbenchLayoutService.signalResizing(false);\n    void this._workbenchRouter.navigate(layout => layout\n      .modify(layout => left !== undefined ? layout.setActivityPanelSize('left', left) : layout)\n      .modify(layout => right !== undefined ? layout.setActivityPanelSize('right', right) : layout),\n    );\n  }\n\n  protected onVerticalSashEnd({bottom}: {[sashKey: string]: number}): void {\n    this._workbenchLayoutService.signalResizing(false);\n    void this._workbenchRouter.navigate(layout => layout.setActivityPanelSize('bottom', bottom!));\n  }\n\n  protected onDesktopViewDrop(event: WbViewDropEvent): void {\n    this._viewDragService.dispatchViewMoveEvent({\n      source: {\n        workbenchId: event.dragData.workbenchId,\n        partId: event.dragData.partId,\n        viewId: event.dragData.viewId,\n        alternativeViewId: event.dragData.alternativeViewId,\n        navigation: event.dragData.navigation,\n        classList: event.dragData.classList,\n      },\n      target: GridDropTargets.resolve({\n        grid: this.layout().grids.main,\n        workbenchId: this._workbenchId,\n        dropRegion: event.dropRegion,\n      }),\n      dragData: event.dragData,\n    });\n  }\n\n  protected onLegacyStartPageActivate(): void {\n    this._logger.warn('[Deprecation] The configuration for displaying a start page in the workbench has changed. Provide a desktop using an `<ng-template>` with the `wbDesktop` directive. The template content is used as the desktop content. Previously, the component associated with the empty-path route was used as the start page. Legacy support will be removed in version 21.', `\n    \n    Example:\n    <wb-workbench>\n      <ng-template wbDesktop>\n        Welcome\n      </ng-template>\n    </wb-workbench>\n    `,\n    );\n  }\n}\n","<!-- Left Activity Bar -->\n@if (leftActivityBarVisible()) {\n  <wb-activity-bar [align]=\"'left'\"/>\n}\n\n<main>\n  @switch (panelAlignment()) {\n    @case ('left') {\n      <ng-container *ngTemplateOutlet=\"layout_align_left\"/>\n    }\n    @case ('right') {\n      <ng-container *ngTemplateOutlet=\"layout_align_right\"/>\n    }\n    @case ('center') {\n      <ng-container *ngTemplateOutlet=\"layout_center\"/>\n    }\n    @case ('justify') {\n      <ng-container *ngTemplateOutlet=\"layout_justify\"/>\n    }\n  }\n</main>\n\n<!-- Right Activity Bar -->\n@if (rightActivityBarVisible()) {\n  <wb-activity-bar [align]=\"'right'\"/>\n}\n\n<!-- Layout with bottom panel alignment left -->\n<ng-template #layout_align_left>\n  <!-- @formatter:off -->\n  <!-- +---+------------+---+ -->\n  <!-- | L |            | R | -->\n  <!-- | E |    MAIN    | I | -->\n  <!-- | F |    GRID    | G | -->\n  <!-- | T |            | H | -->\n  <!-- +---+------------+ T | -->\n  <!-- |       BOTTOM   |   | -->\n  <!-- +----------------+---+ -->\n  <!-- @formatter:on -->\n  <sci-sashbox [direction]=\"'row'\" (sashStart)=\"onSashStart()\" (sashEnd)=\"onHorizontalSashEnd($event)\">\n    <ng-template sciSash>\n      <sci-sashbox [direction]=\"'column'\" (sashStart)=\"onSashStart()\" (sashEnd)=\"onVerticalSashEnd($event)\">\n        <ng-template sciSash>\n          <sci-sashbox [direction]=\"'row'\" (sashStart)=\"onSashStart()\" (sashEnd)=\"onHorizontalSashEnd($event)\">\n            <!-- Left Activity Panel -->\n            @if (leftActivityPanel(); as panel) {\n              <ng-template sciSash [size]=\"`${panel.width}px`\" key=\"left\" [animate]=\"panelAnimation()\">\n                <wb-activity-panel [panel]=\"'left'\" [activityId1]=\"toolbars().leftTop.activeActivityId\" [activityId2]=\"toolbars().leftBottom.activeActivityId\"/>\n              </ng-template>\n            }\n            <!-- Main Grid -->\n            <ng-template sciSash>\n              <ng-container *ngTemplateOutlet=\"main_grid\"/>\n            </ng-template>\n          </sci-sashbox>\n        </ng-template>\n        <!-- Bottom Activity Panel -->\n        @if (bottomActivityPanel(); as panel) {\n          <ng-template sciSash [size]=\"`${panel.height}px`\" key=\"bottom\" [animate]=\"panelAnimation()\">\n            <wb-activity-panel [panel]=\"'bottom'\" [activityId1]=\"toolbars().bottomLeft.activeActivityId\" [activityId2]=\"toolbars().bottomRight.activeActivityId\"/>\n          </ng-template>\n        }\n      </sci-sashbox>\n    </ng-template>\n    <!-- Right Activity Panel -->\n    @if (rightActivityPanel(); as panel) {\n      <ng-template sciSash [size]=\"`${panel.width}px`\" key=\"right\" [animate]=\"panelAnimation()\">\n        <wb-activity-panel [panel]=\"'right'\" [activityId1]=\"toolbars().rightTop.activeActivityId\" [activityId2]=\"toolbars().rightBottom.activeActivityId\"/>\n      </ng-template>\n    }\n  </sci-sashbox>\n</ng-template>\n\n<!-- Layout with bottom panel alignment right -->\n<ng-template #layout_align_right>\n  <!-- @formatter:off -->\n  <!-- +---+------------+---+ -->\n  <!-- | L |            | R | -->\n  <!-- | E |    MAIN    | I | -->\n  <!-- | F |    GRID    | G | -->\n  <!-- | T |            | H | -->\n  <!-- |   |            | T | -->\n  <!-- |   +------------+---| -->\n  <!-- |   |    BOTTOM      | -->\n  <!-- +---+----------------+ -->\n  <!-- @formatter:on -->\n  <sci-sashbox [direction]=\"'row'\" (sashStart)=\"onSashStart()\" (sashEnd)=\"onHorizontalSashEnd($event)\">\n    <!-- Left Activity Panel -->\n    @if (leftActivityPanel(); as panel) {\n      <ng-template sciSash [size]=\"`${panel.width}px`\" key=\"left\" [animate]=\"panelAnimation()\">\n        <wb-activity-panel [panel]=\"'left'\" [activityId1]=\"toolbars().leftTop.activeActivityId\" [activityId2]=\"toolbars().leftBottom.activeActivityId\"/>\n      </ng-template>\n    }\n    <ng-template sciSash>\n      <sci-sashbox [direction]=\"'column'\" (sashStart)=\"onSashStart()\" (sashEnd)=\"onVerticalSashEnd($event)\">\n        <ng-template sciSash>\n          <sci-sashbox [direction]=\"'row'\" (sashStart)=\"onSashStart()\" (sashEnd)=\"onHorizontalSashEnd($event)\">\n            <!-- Main Grid -->\n            <ng-template sciSash>\n              <ng-container *ngTemplateOutlet=\"main_grid\"/>\n            </ng-template>\n            <!-- Right Activity Panel -->\n            @if (rightActivityPanel(); as panel) {\n              <ng-template sciSash [size]=\"`${panel.width}px`\" key=\"right\" [animate]=\"panelAnimation()\">\n                <wb-activity-panel [panel]=\"'right'\" [activityId1]=\"toolbars().rightTop.activeActivityId\" [activityId2]=\"toolbars().rightBottom.activeActivityId\"/>\n              </ng-template>\n            }\n          </sci-sashbox>\n        </ng-template>\n        <!-- Bottom Activity Panel -->\n        @if (bottomActivityPanel(); as panel) {\n          <ng-template sciSash [size]=\"`${panel.height}px`\" key=\"bottom\" [animate]=\"panelAnimation()\">\n            <wb-activity-panel [panel]=\"'bottom'\" [activityId1]=\"toolbars().bottomLeft.activeActivityId\" [activityId2]=\"toolbars().bottomRight.activeActivityId\"/>\n          </ng-template>\n        }\n      </sci-sashbox>\n    </ng-template>\n  </sci-sashbox>\n</ng-template>\n\n<!-- Layout with bottom panel alignment center -->\n<ng-template #layout_center>\n  <!-- @formatter:off -->\n  <!-- +---+------------+---+ -->\n  <!-- | L |    MAIN    | R | -->\n  <!-- | E |    GRID    | I | -->\n  <!-- | F |            | G | -->\n  <!-- | T +------------+ H | -->\n  <!-- |   |   BOTTOM   | T | -->\n  <!-- +---+------------+---+ -->\n  <!-- @formatter:on -->\n  <sci-sashbox [direction]=\"'row'\" (sashStart)=\"onSashStart()\" (sashEnd)=\"onHorizontalSashEnd($event)\">\n    <!-- Left Activity Panel -->\n    @if (leftActivityPanel(); as panel) {\n      <ng-template sciSash [size]=\"`${panel.width}px`\" key=\"left\" [animate]=\"panelAnimation()\">\n        <wb-activity-panel [panel]=\"'left'\" [activityId1]=\"toolbars().leftTop.activeActivityId\" [activityId2]=\"toolbars().leftBottom.activeActivityId\"/>\n      </ng-template>\n    }\n    <ng-template sciSash>\n      <sci-sashbox [direction]=\"'column'\" (sashStart)=\"onSashStart()\" (sashEnd)=\"onVerticalSashEnd($event)\">\n        <!-- Main Grid -->\n        <ng-template sciSash>\n          <ng-container *ngTemplateOutlet=\"main_grid\"/>\n        </ng-template>\n        <!-- Bottom Activity Panel -->\n        @if (bottomActivityPanel(); as panel) {\n          <ng-template sciSash [size]=\"`${panel.height}px`\" key=\"bottom\" [animate]=\"panelAnimation()\">\n            <wb-activity-panel [panel]=\"'bottom'\" [activityId1]=\"toolbars().bottomLeft.activeActivityId\" [activityId2]=\"toolbars().bottomRight.activeActivityId\"/>\n          </ng-template>\n        }\n      </sci-sashbox>\n    </ng-template>\n    <!-- Right Activity Panel -->\n    @if (rightActivityPanel(); as panel) {\n      <ng-template sciSash [size]=\"`${panel.width}px`\" key=\"right\" [animate]=\"panelAnimation()\">\n        <wb-activity-panel [panel]=\"'right'\" [activityId1]=\"toolbars().rightTop.activeActivityId\" [activityId2]=\"toolbars().rightBottom.activeActivityId\"/>\n      </ng-template>\n    }\n  </sci-sashbox>\n</ng-template>\n\n<!-- Layout with bottom panel alignment justify -->\n<ng-template #layout_justify>\n  <!-- @formatter:off -->\n  <!-- +---+------------+---+ -->\n  <!-- | L |            | R | -->\n  <!-- | E |    MAIN    | I | -->\n  <!-- | F |    GRID    | G | -->\n  <!-- | T |            | H | -->\n  <!-- |   |            | T | -->\n  <!-- +---+------------+---+ -->\n  <!-- |       BOTTOM       | -->\n  <!-- +--------------------+ -->\n  <!-- @formatter:on -->\n  <sci-sashbox [direction]=\"'column'\" (sashStart)=\"onSashStart()\" (sashEnd)=\"onVerticalSashEnd($event)\">\n    <ng-template sciSash>\n      <sci-sashbox [direction]=\"'row'\" (sashStart)=\"onSashStart()\" (sashEnd)=\"onHorizontalSashEnd($event)\">\n        <!-- Left Activity Panel -->\n        @if (leftActivityPanel(); as panel) {\n          <ng-template sciSash [size]=\"`${panel.width}px`\" key=\"left\" [animate]=\"panelAnimation()\">\n            <wb-activity-panel [panel]=\"'left'\" [activityId1]=\"toolbars().leftTop.activeActivityId\" [activityId2]=\"toolbars().leftBottom.activeActivityId\"/>\n          </ng-template>\n        }\n        <!-- Main Grid -->\n        <ng-template sciSash>\n          <ng-container *ngTemplateOutlet=\"main_grid\"/>\n        </ng-template>\n        <!-- Right Activity Panel -->\n        @if (rightActivityPanel(); as panel) {\n          <ng-template sciSash [size]=\"`${panel.width}px`\" key=\"right\" [animate]=\"panelAnimation()\">\n            <wb-activity-panel [panel]=\"'right'\" [activityId1]=\"toolbars().rightTop.activeActivityId\" [activityId2]=\"toolbars().rightBottom.activeActivityId\"/>\n          </ng-template>\n        }\n      </sci-sashbox>\n    </ng-template>\n    <!-- Bottom Activity Panel -->\n    @if (bottomActivityPanel(); as panel) {\n      <ng-template sciSash [size]=\"`${panel.height}px`\" key=\"bottom\" [animate]=\"panelAnimation()\">\n        <wb-activity-panel [panel]=\"'bottom'\" [activityId1]=\"toolbars().bottomLeft.activeActivityId\" [activityId2]=\"toolbars().bottomRight.activeActivityId\"/>\n      </ng-template>\n    }\n  </sci-sashbox>\n</ng-template>\n\n<!-- Main Grid -->\n<ng-template #main_grid>\n  @if (layout().grids.main | wbGridIfVisible; as grid) {\n    <wb-grid [grid]=\"grid\"\n             [gridDropZone]=\"canDropInMainGrid() && {\n               dropRegionSize: 50,\n               dropPlaceholderSize: 50,\n               dropZoneAttributes: {'data-grid': 'main'}\n             }\"\n             [attr.data-grid]=\"'main'\"/>\n  } @else {\n    <sci-viewport class=\"desktop e2e-desktop\"\n                  wbViewDropZone\n                  [wbViewDropZoneRegions]=\"canDrop() && {center: true, north: false, south: false, west: false, east: false}\"\n                  [wbViewDropZoneAttributes]=\"{'data-desktop': ''}\"\n                  (wbViewDropZoneDrop)=\"onDesktopViewDrop($event)\">\n      @if (desktop()) {\n        <ng-container *ngTemplateOutlet=\"desktop()!\"/>\n      } @else {\n        <router-outlet (activate)=\"onLegacyStartPageActivate()\"/>\n      }\n    </sci-viewport>\n  }\n</ng-template>\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 {ChangeDetectorRef, Component, DestroyRef, DOCUMENT, effect, ElementRef, inject, NgZone, Provider, viewChild, ViewContainerRef} from '@angular/core';\nimport {IFRAME_OVERLAY_HOST, VIEW_DROP_ZONE_OVERLAY_HOST, WORKBENCH_ELEMENT_REF} from './workbench-element-references';\nimport {WorkbenchLauncher} from './startup/workbench-launcher.service';\nimport {WorkbenchStartup} from './startup/workbench-startup.service';\nimport {WorkbenchConfig} from './workbench-config';\nimport {SplashComponent} from './startup/splash/splash.component';\nimport {Logger, LoggerNames} from './logging';\nimport {NgComponentOutlet} from '@angular/common';\nimport {NotificationListComponent} from './notification/notification-list.component';\nimport {GLASS_PANE_BLOCKABLE, GLASS_PANE_OPTIONS, GLASS_PANE_TARGET_ELEMENT, GlassPaneDirective, GlassPaneOptions} from './glass-pane/glass-pane.directive';\nimport {WorkbenchDialogRegistry} from './dialog/workbench-dialog.registry';\nimport {Blockable} from './glass-pane/blockable';\nimport {WORKBENCH_OUTLET} from './routing/workbench-auxiliary-route-installer.service';\nimport {NavigationCancel, NavigationEnd, NavigationError, NavigationStart, Router} from '@angular/router';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {LayoutComponent} from './layout/layout.component';\nimport {ɵWorkbenchService} from './ɵworkbench.service';\nimport {fromEvent} from 'rxjs';\nimport {ɵWorkbenchRouter} from './routing/ɵworkbench-router.service';\nimport {subscribeIn} from '@scion/toolkit/operators';\nimport {filter} from 'rxjs/operators';\n\n/**\n * Main entry point component of the SCION Workbench.\n */\n@Component({\n  selector: 'wb-workbench',\n  templateUrl: './workbench.component.html',\n  styleUrls: ['./workbench.component.scss'],\n  imports: [\n    NgComponentOutlet,\n    NotificationListComponent,\n    GlassPaneDirective,\n    LayoutComponent,\n  ],\n  viewProviders: [\n    configureWorkbenchGlassPane(),\n  ],\n})\nexport class WorkbenchComponent {\n\n  private _workbenchLauncher = inject(WorkbenchLauncher);\n  private _logger = inject(Logger);\n  private readonly _workbenchRouter = inject(ɵWorkbenchRouter);\n\n  private _iframeOverlayHost = viewChild('iframe_overlay_host', {read: ViewContainerRef});\n  private _viewDropZoneOverlayHost = viewChild('view_drop_zone_overlay_host', {read: ViewContainerRef});\n\n  /** Splash to display during workbench startup. */\n  protected splash = inject(WorkbenchConfig).splashComponent ?? inject(WorkbenchConfig).startup?.splash ?? SplashComponent;\n  protected workbenchStartup = inject(WorkbenchStartup);\n  protected workbenchService = inject(ɵWorkbenchService);\n\n  constructor() {\n    this._logger.debug(() => 'Constructing WorkbenchComponent.', LoggerNames.LIFECYCLE);\n    this.throwOnCircularLoad();\n    this.startWorkbench();\n    this.disableChangeDetectionDuringNavigation();\n    this.provideWorkbenchElementReferences();\n    this.installMaximizeShortcutListener();\n  }\n\n  /**\n   * Toggles layout maximization by pressing Ctrl+Shift+F12.\n   */\n  private installMaximizeShortcutListener(): void {\n    const zone = inject(NgZone);\n    fromEvent<KeyboardEvent>(window, 'keydown', {capture: true}) // capturing phase for a higher precedence\n      .pipe(\n        subscribeIn(fn => zone.runOutsideAngular(fn)),\n        filter(event => event.ctrlKey && event.shiftKey && event.key === 'F12'),\n        takeUntilDestroyed(),\n      )\n      .subscribe(event => {\n        event.preventDefault();\n        void this._workbenchRouter.navigate(layout => layout.toggleMaximized());\n      });\n  }\n\n  /**\n   * Starts the SCION Workbench. Has no effect if already started, e.g., in an app initializer or route guard.\n   */\n  private startWorkbench(): void {\n    if (!this.workbenchStartup.done()) {\n      this._workbenchLauncher.launch().catch((error: unknown) => this._logger.error('Failed to start SCION Workbench', error));\n    }\n  }\n\n  /**\n   * Disables change detection during navigation to avoid partial DOM updates of the workbench layout\n   * if the navigation is asynchronous (e.g., because of lazy loading, async guards, or resolvers).\n   */\n  private disableChangeDetectionDuringNavigation(): void {\n    const changeDetector = inject(ChangeDetectorRef);\n\n    inject(Router).events\n      .pipe(takeUntilDestroyed())\n      .subscribe(event => {\n        if (event instanceof NavigationStart) {\n          changeDetector.detach();\n        }\n        else if (event instanceof NavigationEnd || event instanceof NavigationError || event instanceof NavigationCancel) {\n          changeDetector.reattach();\n        }\n      });\n  }\n\n  /**\n   * Initializes tokens to inject references to workbench elements.\n   */\n  private provideWorkbenchElementReferences(): void {\n    // Provide reference to the workbench element.\n    const workbenchElementRef = inject(WORKBENCH_ELEMENT_REF);\n    workbenchElementRef.set(inject(ViewContainerRef));\n    inject(DestroyRef).onDestroy(() => workbenchElementRef.set(undefined));\n\n    // Provide reference to the iframe overlay host.\n    const iframeOverlayHost = inject(IFRAME_OVERLAY_HOST);\n    effect(() => iframeOverlayHost.set(this._iframeOverlayHost()));\n    inject(DestroyRef).onDestroy(() => iframeOverlayHost.set(undefined));\n\n    // Provide reference to the view drop zone overlay host.\n    const viewDropZoneOverlayHost = inject(VIEW_DROP_ZONE_OVERLAY_HOST);\n    effect(() => viewDropZoneOverlayHost.set(this._viewDropZoneOverlayHost()));\n    inject(DestroyRef).onDestroy(() => viewDropZoneOverlayHost.set(undefined));\n  }\n\n  /**\n   * Throws if loading the workbench recursively.\n   */\n  private throwOnCircularLoad(): void {\n    const outlet = inject(WORKBENCH_OUTLET, {optional: true});\n    if (!outlet) {\n      return;\n    }\n\n    throw Error(`[WorkbenchError] Circular loading of the workbench component detected in workbench outlet '${outlet}'. Did you forget to add the CanMatch guard 'canMatchWorkbenchOutlet(false)' to the application's empty-path default route?`);\n  }\n}\n\n/**\n * Blocks the workbench or the browser's viewport when opening an application-modal dialog.\n */\nfunction configureWorkbenchGlassPane(): Provider[] {\n  return [\n    {\n      provide: GLASS_PANE_BLOCKABLE,\n      useFactory: (): Blockable => ({\n        blockedBy$: inject(WorkbenchDialogRegistry).top$(),\n      }),\n    },\n    {\n      provide: GLASS_PANE_TARGET_ELEMENT,\n      useFactory: () => {\n        if (inject(WorkbenchConfig).dialog?.modalityScope === 'viewport') {\n          return inject(DOCUMENT).body;\n        }\n        else {\n          return inject(ElementRef);\n        }\n      },\n    },\n    {\n      provide: GLASS_PANE_OPTIONS,\n      useValue: {cssClass: 'e2e-workbench'} satisfies GlassPaneOptions,\n    },\n  ];\n}\n","@if (workbenchStartup.done()) {\n  <div class=\"stacking-context-barrier\" wbGlassPane>\n    <wb-layout [layout]=\"workbenchService.layout()\"/>\n\n    <!-- Achor to attach iframes of embedded microfrontends -->\n    <ng-container #iframe_overlay_host/>\n  </div>\n\n  <!-- Anchor to attach the visual placeholder when dragging a view over a valid drop zone -->\n  <div #view_drop_zone_overlay_host class=\"view-drop-zone-overlay-host\"></div>\n\n  <!-- Notifications -->\n  <wb-notification-list/>\n} @else {\n  <ng-container *ngComponentOutlet=\"splash\"/>\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 {Injectable} from '@angular/core';\nimport {ɵWorkbenchLayoutFactory} from './ɵworkbench-layout.factory';\nimport {MAIN_AREA, PartExtras, WorkbenchLayout} from './workbench-layout';\n\n/**\n * Factory for creating a {@link WorkbenchLayout}.\n */\n@Injectable({providedIn: 'root', useExisting: ɵWorkbenchLayoutFactory})\nexport abstract class WorkbenchLayoutFactory {\n\n  /**\n   * Creates a layout with given part.\n   *\n   * @param id - The id of the part. Use {@link MAIN_AREA} to add the main area.\n   * @param extras - Controls how to add the part to the layout.\n   * @param extras.activate - Controls whether to activate the part. If not set, defaults to `false`.\n   * @return layout with the part added.\n   */\n  public abstract addPart(id: string | MAIN_AREA, extras?: PartExtras): WorkbenchLayout;\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\nexport {type WorkbenchLayout, type ReferencePart, MAIN_AREA, type DockingArea, type PartExtras, type DockedPartExtras, type WorkbenchLayoutFn} from './workbench-layout';\nexport {MAIN_AREA_INITIAL_PART_ID} from './ɵworkbench-layout';\nexport {WorkbenchLayoutFactory} from './workbench-layout.factory';\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 {DestroyRef, Directive, inject, TemplateRef} from '@angular/core';\nimport {DESKTOP} from '../workbench-element-references';\n\n/**\n * Directive to add a desktop to the workbench.\n *\n * The desktop is displayed when no view is open and the layout does not contain a navigated part.\n *\n * A desktop can provide instructions for working with the application, display a welcome page, or provide links to open views.\n *\n * Usage:\n * Add this directive to an `<ng-template>` child of the `<wb-workbench>` component. The template content is used as desktop content.\n *\n * ```html\n * <wb-workbench>\n *   <ng-template wbDesktop>\n *     Welcome\n *   </ng-template>\n * </wb-workbench>\n * ```\n *\n * > Using `@if` allows displaying the desktop based on a condition, e.g. the active perspective.\n *\n * For layouts with a main area, it is recommended to navigate the main area part instead:\n * ```ts\n * import {MAIN_AREA, provideWorkbench} from '@scion/workbench';\n *\n * provideWorkbench({\n *   layout: factory => factory\n *     .addPart(MAIN_AREA)\n *     .navigatePart(MAIN_AREA, ['path/to/desktop'])\n * });\n * ```\n */\n@Directive({selector: 'ng-template[wbDesktop]'})\nexport class WorkbenchDesktopDirective {\n\n  constructor() {\n    const template = inject(TemplateRef) as TemplateRef<void>;\n    const desktop = inject(DESKTOP);\n\n    // Register the desktop.\n    desktop.set(template);\n\n    // Unregister the desktop when destroyed, but only if no other desktop has been registered in the meantime.\n    inject(DestroyRef).onDestroy(() => {\n      if (desktop() === template) {\n        desktop.set(undefined);\n      }\n    });\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 {WorkbenchDesktopDirective} from './desktop.directive';\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\nexport {type WorkbenchPerspective, type WorkbenchPerspectives, type WorkbenchPerspectiveDefinition, type WorkbenchPerspectiveSelectionFn} from './workbench-perspective.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 {DestroyRef, Directive, inject, input, output, TemplateRef} from '@angular/core';\nimport {WorkbenchService} from '../../workbench.service';\nimport {WorkbenchView} from '../../view/workbench-view.model';\n\n/**\n * Directive to add a menu item to the context menu of a view.\n *\n * Right-clicking on a view tab opens a context menu to interact with the view and its content.\n *\n * Usage:\n * Add this directive to an `<ng-template>`. The template content is used as the menu item content. The menu item shares the lifecycle of its embedding context.\n *\n * ```html\n * <ng-template wbViewMenuItem [accelerator]=\"['ctrl', 'alt', '1']\" (action)=\"...\">\n *   ...\n * </ng-template>\n * ```\n *\n * The {@link WorkbenchView} is available as the default template variable (`let-view`).\n *\n * ```html\n * <ng-template wbViewMenuItem let-view>\n *   ...\n * </ng-template>\n * ```\n *\n * Menu items are context-sensitive:\n * - Declaring the menu item in a view's template displays it only in the context menu of that view.\n * - Declaring the menu item outside a view context, such as within `<wb-workbench>`, displays it in the context menu of every view.\n *\n * A predicate can be used to match a specific context, such as a particular view or condition.\n *\n * ```html\n * <ng-template wbViewMenuItem [canMatch]=\"...\">\n *   ...\n * </ng-template>\n * ```\n *\n * Alternatively, menu items can be added using a factory function and registered via {@link WorkbenchService.registerViewMenuItem}.\n */\n@Directive({selector: 'ng-template[wbViewMenuItem]'})\nexport class WorkbenchViewMenuItemDirective {\n\n  /**\n   * Binds keyboard accelerator(s) to the menu item, e.g., ['ctrl', 'alt', 1].\n   *\n   * Supported modifiers are 'ctrl', 'shift', 'alt' and 'meta'.\n   */\n  public readonly accelerator = input<string[] | undefined>();\n\n  /**\n   * Enables grouping of menu items.\n   */\n  public readonly group = input<string | undefined>();\n\n  /**\n   * Controls if the menu item is disabled. Defaults to `false`.\n   */\n  public readonly disabled = input<boolean>();\n\n  /**\n   * Predicate to match a specific context, such as a particular view or condition. Defaults to any context.\n   *\n   * The function:\n   * - Can call `inject` to get any required dependencies.\n   * - Runs in a reactive context and is called again when tracked signals change.\n   *   Use Angular's `untracked` function to execute code outside this reactive context.\n   */\n  public readonly canMatch = input<(view: WorkbenchView) => boolean>();\n\n  /**\n   * Specifies CSS class(es) to add to the menu item, e.g., to locate the menu item in tests.\n   */\n  public readonly cssClass = input<string | string[] | undefined>();\n\n  /**\n   * Emits when the menu item is clicked.\n   */\n  public readonly action = output<WorkbenchView>();\n\n  constructor() {\n    this.registerMenuItem();\n  }\n\n  private registerMenuItem(): void {\n    const template = inject(TemplateRef) as TemplateRef<void>;\n    const workbenchService = inject(WorkbenchService);\n    const context = {\n      view: inject(WorkbenchView, {optional: true}),\n    };\n\n    const action = workbenchService.registerViewMenuItem((view: WorkbenchView) => {\n      if (context.view && context.view.id !== view.id) {\n        return null;\n      }\n      if (this.canMatch() && !this.canMatch()!(view)) {\n        return null;\n      }\n\n      return {\n        content: template,\n        accelerator: this.accelerator(),\n        group: this.group(),\n        cssClass: this.cssClass(),\n        disabled: this.disabled(),\n        onAction: () => this.action.emit(view),\n      };\n    });\n\n    inject(DestroyRef).onDestroy(() => action.dispose());\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 {DestroyRef, Directive, inject, input, TemplateRef} from '@angular/core';\nimport {WorkbenchService} from '../../workbench.service';\nimport {WorkbenchView} from '../../view/workbench-view.model';\nimport {WorkbenchPart} from '../workbench-part.model';\n\n/**\n * Directive to add an action to a part.\n *\n * Part actions are displayed in the part bar, enabling interaction with the part and its content. Actions can be aligned to the left or right.\n *\n * Usage:\n * Add this directive to an `<ng-template>`. The template content is used as the action content. The action shares the lifecycle of its embedding context.\n *\n * ```html\n * <ng-template wbPartAction>\n *   ...\n * </ng-template>\n * ```\n *\n * The {@link WorkbenchPart} is available as the default template variable (`let-part`).\n *\n * ```html\n * <ng-template wbPartAction let-part>\n *   ...\n * </ng-template>\n * ```\n *\n * Part actions are context-sensitive:\n * - Declaring the action in a part's template displays it only in that part.\n * - Declaring the action in a view's template displays it only when that view is active.\n * - Declaring the action outside a part and view context, such as within `<wb-workbench>`, displays it in every part.\n *\n * A predicate can be used to match a specific context, such as a particular part or condition.\n *\n * ```html\n * <ng-template wbPartAction [canMatch]=\"...\">\n *   ...\n * </ng-template>\n * ```\n *\n * Alternatively, actions can be added using a factory function and registered via {@link WorkbenchService.registerPartAction}.\n */\n@Directive({selector: 'ng-template[wbPartAction]'})\nexport class WorkbenchPartActionDirective {\n\n  /**\n   * Specifies where to place this action in the part bar. Defaults to `end`.\n   */\n  public readonly align = input<'start' | 'end' | undefined>();\n\n  /**\n   * Predicate to match a specific context, such as a particular part or condition. Defaults to any context.\n   *\n   * The function:\n   * - Can call `inject` to get any required dependencies.\n   * - Runs in a reactive context and is called again when tracked signals change.\n   *   Use Angular's `untracked` function to execute code outside this reactive context.\n   */\n  public readonly canMatch = input<(part: WorkbenchPart) => boolean>();\n\n  /**\n   * Specifies CSS class(es) to add to the action, e.g., to locate the action in tests.\n   */\n  public readonly cssClass = input<string | string[] | undefined>();\n\n  constructor() {\n    this.registerPartAction();\n  }\n\n  private registerPartAction(): void {\n    const template = inject(TemplateRef) as TemplateRef<void>;\n    const workbenchService = inject(WorkbenchService);\n    const context = {\n      view: inject(WorkbenchView, {optional: true}),\n      part: inject(WorkbenchPart, {optional: true}),\n    };\n\n    const action = workbenchService.registerPartAction((part: WorkbenchPart) => {\n      if (context.part && context.part.id !== part.id) {\n        return null;\n      }\n      if (context.view && context.view.id !== part.activeViewId()) {\n        return null;\n      }\n      if (this.canMatch() && !this.canMatch()!(part)) {\n        return null;\n      }\n\n      return {\n        content: template,\n        align: this.align(),\n        cssClass: this.cssClass(),\n      };\n    });\n\n    inject(DestroyRef).onDestroy(() => action.dispose());\n  }\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\nexport {WorkbenchViewMenuItemDirective} from './view-context-menu/view-menu-item.directive';\nexport {WorkbenchPartActionDirective} from './part-action-bar/part-action.directive';\nexport {WorkbenchPart, type WorkbenchPartNavigation, type PartId} from './workbench-part.model';\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\nexport {WorkbenchView, type WorkbenchViewNavigation, type ViewId} from './workbench-view.model';\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 {Directive, ElementRef, HostListener, inject, input, signal, Signal} from '@angular/core';\nimport {WorkbenchRouter} from './workbench-router.service';\nimport {LocationStrategy} from '@angular/common';\nimport {ActivatedRoute, NavigationEnd, Router} from '@angular/router';\nimport {WorkbenchView} from '../view/workbench-view.model';\nimport {combineLatestWith, filter, map, startWith, switchMap} from 'rxjs/operators';\nimport {Commands, WorkbenchNavigationExtras} from './routing.model';\nimport {Arrays, Defined} from '@scion/toolkit/util';\nimport {toObservable, toSignal} from '@angular/core/rxjs-interop';\nimport {createNavigationFromCommands, ɵWorkbenchRouter} from './ɵworkbench-router.service';\n\n/**\n * Like the Angular 'RouterLink' directive but with functionality to navigate a view.\n *\n * Use this directive to navigate the current view. If the user presses the CTRL key (Mac: ⌘, Windows: ⊞), this directive will open a new view.\n *\n * ```html\n * <a [wbRouterLink]=\"['../path/to/view']\">Link</a>\n * ```\n *\n * You can override the default behavior by setting an explicit navigation target in navigation extras.\n *\n * ```html\n * <a [wbRouterLink]=\"['../path/to/view']\" [wbRouterLinkExtras]=\"{target: 'blank'}\">Link</a>\n * ```\n *\n * By default, navigation is relative to the currently activated route, if any.\n *\n * Prepend the path with a forward slash '/' to navigate absolutely, or set `relativeTo` property in navigational extras to `null`.\n *\n * ```html\n * <a [wbRouterLink]=\"['/path/to/view']\">Link</a>\n * ```\n */\n@Directive({\n  selector: '[wbRouterLink]',\n  host: {\n    '[attr.href]': 'href()',\n  },\n})\nexport class WorkbenchRouterLinkDirective {\n\n  public readonly commands = input.required({alias: 'wbRouterLink', transform: (commands: Commands | string | undefined | null) => Arrays.coerce(commands)});\n  public readonly extras = input({}, {alias: 'wbRouterLinkExtras', transform: (extras: Omit<WorkbenchNavigationExtras, 'close'> | undefined) => extras ?? {}});\n\n  private readonly _workbenchRouter = inject(WorkbenchRouter);\n  private readonly _router = inject(Router);\n  private readonly _route = inject(ActivatedRoute);\n  private readonly _view = inject(WorkbenchView, {optional: true});\n\n  protected readonly href = this.computeHrefIfLink();\n\n  @HostListener('click', ['$event.button', '$event.ctrlKey', '$event.metaKey'])\n  protected onClick(button: number, ctrlKey: boolean, metaKey: boolean): boolean {\n    if (button !== 0) { // not primary mouse button pressed\n      return true;\n    }\n\n    const extras = this.computeNavigationExtras(ctrlKey, metaKey);\n    void this._workbenchRouter.navigate(this.commands(), extras);\n    return false;\n  }\n\n  /**\n   * Computes navigation extras based on the given extras and contextual route.\n   */\n  private computeNavigationExtras(ctrlKey: boolean = false, metaKey: boolean = false): WorkbenchNavigationExtras {\n    const controlPressed = ctrlKey || metaKey;\n    const extras = this.extras();\n\n    return {\n      ...extras,\n      relativeTo: Defined.orElse(extras.relativeTo, this._route), // `null` is a valid `relativeTo` for absolute navigation\n      target: controlPressed ? 'blank' : extras.target ?? this._view?.id,\n      activate: extras.activate ?? !controlPressed, // by default, the view is not activated if CTRL or META modifier key is pressed (same behavior as for browser links)\n      close: false, // do not support closing a view using this directive.\n    };\n  }\n\n  /**\n   * Computes the link's href based on given array of commands and navigation extras.\n   */\n  private computeHrefIfLink(): Signal<string | null> {\n    // Compute href only if the host is a link (anchor tag).\n    const host = inject(ElementRef).nativeElement as Element;\n    if (host.tagName !== 'A') {\n      return signal(null);\n    }\n\n    const workbenchRouter = inject(ɵWorkbenchRouter);\n    const locationStrategy = inject(LocationStrategy);\n\n    // Compute href when commands, extras or the application URL change.\n    const commands$ = toObservable(this.commands).pipe(filter(commands => !!commands.length));\n    const extras$ = toObservable(this.extras).pipe(map(() => this.computeNavigationExtras()));\n    const navigationEnd$ = this._router.events.pipe(filter(event => event instanceof NavigationEnd), startWith(undefined));\n\n    const href$ = commands$\n      .pipe(\n        combineLatestWith(extras$, navigationEnd$),\n        switchMap(([commands, extras]) => workbenchRouter.createUrlTree(createNavigationFromCommands(commands, extras), extras)),\n        map(urlTree => urlTree && locationStrategy.prepareExternalUrl(this._router.serializeUrl(urlTree))),\n      );\n    return toSignal(href$, {initialValue: null});\n  }\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\nexport {WorkbenchRouter} from './workbench-router.service';\nexport {WorkbenchRouterLinkDirective} from './workbench-router-link.directive';\nexport {WorkbenchRouteData} from './workbench-route-data';\nexport {type Commands, type NavigationData, type NavigationState, type WorkbenchNavigationExtras, type NavigateFn} from './routing.model';\nexport {canMatchWorkbenchView, canMatchWorkbenchPerspective, canMatchWorkbenchPart, canMatchWorkbenchOutlet} from './workbench-route-guards';\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\nexport {WorkbenchMessageBoxService} from './workbench-message-box.service';\nexport {type WorkbenchMessageBoxOptions} from './workbench-message-box.options';\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 {DestroyRef, Directive, inject, input, TemplateRef} from '@angular/core';\nimport {ɵWorkbenchDialog} from '../ɵworkbench-dialog';\nimport {Disposable} from '../../common/disposable';\nimport {asapScheduler} from 'rxjs';\n\n/**\n * Use this directive to contribute an action to the dialog footer (only applicable if not using a custom dialog footer).\n *\n * Actions are displayed in the order as modeled in the template and can be placed either on the left or right.\n *\n * The host element of this modeling directive must be a <ng-template>. The action shares the lifecycle of the host element.\n *\n * **Example:**\n * ```html\n * <ng-template wbDialogAction>\n *   <button (click)=\"dialog.close()\">Close</button>\n * </ng-template>\n * ```\n */\n@Directive({selector: 'ng-template[wbDialogAction]'})\nexport class WorkbenchDialogActionDirective {\n\n  /**\n   * Specifies where to place this action in the dialog footer. Defaults to `end`.\n   */\n  public readonly align = input<'start' | 'end'>('end');\n  public readonly template = inject(TemplateRef) as TemplateRef<void>;\n\n  private _action: Disposable | undefined;\n\n  constructor() {\n    const dialog = inject(ɵWorkbenchDialog);\n\n    // Defer registering action to avoid `ExpressionChangedAfterItHasBeenCheckedError`.\n    asapScheduler.schedule(() => this._action = dialog.registerAction(this));\n\n    // Defer disposing action to avoid `ExpressionChangedAfterItHasBeenCheckedError`.\n    inject(DestroyRef).onDestroy(() => asapScheduler.schedule(() => this._action?.dispose()));\n  }\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\nexport {WorkbenchDialog, type WorkbenchDialogSize} from './workbench-dialog';\nexport {type WorkbenchDialogOptions} from './workbench-dialog.options';\nexport {WorkbenchDialogService} from './workbench-dialog.service';\nexport {WorkbenchDialogActionDirective} from './dialog-footer/workbench-dialog-action.directive';\nexport {WorkbenchDialogFooterDirective} from './dialog-footer/workbench-dialog-footer.directive';\nexport {WorkbenchDialogHeaderDirective} from './dialog-header/workbench-dialog-header.directive';\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\nexport {Notification} from './notification';\nexport {type NotificationConfig} from './notification.config';\nexport {NotificationService} from './notification.service';\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\nexport {PopupService} from './popup.service';\nexport {Popup, PopupConfig, type CloseStrategy, type PopupSize} from './popup.config';\nexport {type Point, type TopLeftPoint, type TopRightPoint, type BottomLeftPoint, type BottomRightPoint, type PopupOrigin} from './popup.origin';\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\nexport {type Disposable} from './disposable';\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\nexport {MicrofrontendPlatformConfigLoader} from './microfrontend-platform-config-loader';\nexport {WorkbenchPerspectiveData} from './microfrontend-perspective/workbench-perspective-data';\nexport {provideMicrofrontendPlatformInitializer, type MicrofrontendPlatformInitializerOptions, MicrofrontendPlatformStartupPhase} from './microfrontend-platform-initializer.provider';\n// TODO [Angular 21] Remove from Public API.\nexport {MICROFRONTEND_PLATFORM_PRE_STARTUP, MICROFRONTEND_PLATFORM_POST_STARTUP} from './microfrontend-platform-initializer.provider';\nexport * from './microfrontend-platform.config';\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\nexport {WorkbenchLauncher} from './workbench-launcher.service';\nexport {WorkbenchStartup} from './workbench-startup.service';\nexport {type WorkbenchInitializer, type WorkbenchInitializerFn, provideWorkbenchInitializer, type WorkbenchInitializerOptions, WorkbenchStartupPhase} from './workbench-initializer';\n// TODO [Angular 21] Remove from Public API.\nexport {WORKBENCH_STARTUP, WORKBENCH_PRE_STARTUP, WORKBENCH_POST_STARTUP} from './workbench-initializer';\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\nexport {LogAppender, type LogEvent, LogLevel, LoggerName} from './logging.model';\nexport {Logger} from './logger';\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\nexport {WorkbenchStorage} from './workbench-storage';\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 ActivityId} from './workbench-activity.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 WorkbenchTextProviderFn, type Translatable} from './workbench-text-provider.model';\nexport {TextPipe} from './text.pipe';\nexport {text} from './text';\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 WorkbenchIconDescriptor, type WorkbenchIconProviderFn} from './workbench-icon-provider.model';\nexport {IconComponent} from './icon.component';\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\nexport {WorkbenchConfig, type MenuItemConfig, type ViewMenuItemsConfig} from './workbench-config';\nexport {provideWorkbench} from './workbench.provider';\nexport {WorkbenchService} from './workbench.service';\nexport {WORKBENCH_ID} from './workbench-id';\nexport {type WorkbenchPartAction, type WorkbenchPartActionFn, type WorkbenchMenuItem, type WorkbenchViewMenuItemFn, type WorkbenchTheme, type CanCloseFn, type CanCloseRef} from './workbench.model';\nexport {WorkbenchComponent} from './workbench.component';\nexport {VIEW_TAB_RENDERING_CONTEXT, type ViewTabRenderingContext} from './workbench.constants';\n\nexport * from './layout/public_api';\nexport * from './desktop/public_api';\nexport * from './perspective/public_api';\nexport * from './part/public_api';\nexport * from './view/public_api';\nexport * from './routing/public_api';\nexport * from './message-box/public_api';\nexport * from './dialog/public_api';\nexport * from './notification/public_api';\nexport * from './popup/public_api';\nexport * from './common/public_api';\nexport * from './microfrontend-platform/public_api';\nexport * from './startup/public_api';\nexport * from './logging/public_api';\nexport * from './storage/public_api';\nexport * from './activity/public_api';\nexport * from './text/public_api';\nexport * from './icon/public_api';\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\n/**\n * Entry point for all public APIs of this package.\n */\nexport * from './lib/public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["Objects","ToolkitObjects","isViewId","switchMap","mergeMap","map","transform","i1.GlassPaneDirective","AUXILARY_MOUSE_BUTTON","ɵMicrofrontendRouteParams","ɵTHEME_CONTEXT_KEY","ɵPOPUP_CONTEXT","ɵWorkbenchCommands","ɵWorkbenchPopupMessageHeaders","ɵMESSAGE_BOX_CONTEXT","ɵDIALOG_CONTEXT","ɵWorkbenchDialogMessageHeaders","WorkbenchClientDialog","WorkbenchRouter","WorkbenchMessageBoxService","ɵWorkbenchMessageBoxService","WorkbenchDialogService","ɵWorkbenchDialogService","ɵVIEW_ID_CONTEXT_KEY"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;AAQG;AAaH;;AAEG;MACmB,eAAe,CAAA;AA4NpC;;ACpPD;;;;;;;;AAQG;AAEH;;AAEG;AACG,SAAU,UAAU,CAAC,KAAa,EAAA;AACtC,IAAA,MAAM,KAAK,CAAC,KAAK,CAAC;AACpB;;ACfA;;;;;;;;AAQG;AAIH;;;;AAIG;AACa,SAAA,WAAW,CAAC,SAA0B,EAAE,OAA+B,EAAA;AACrF,IAAA,OAAO,IAAI,OAAO,CAAO,OAAO,IAAG;AACjC,QAAA,MAAM,SAAS,GAAG,MAAM,CAAC,MAAK;YAC5B,IAAI,SAAS,EAAE,EAAE;AACf,gBAAA,SAAS,CAAC,MAAM,OAAO,EAAE,CAAC;gBAC1B,SAAS,CAAC,OAAO,EA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