{"version":3,"file":"dialog.mjs","sources":["../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk/dialog/dialog-config.ts","../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk/dialog/dialog-container.ts","../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk/dialog/dialog-container.html","../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk/dialog/dialog-ref.ts","../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk/dialog/dialog-injectors.ts","../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk/dialog/dialog.ts","../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk/dialog/dialog-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ViewContainerRef, Injector, StaticProvider, Type} from '@angular/core';\nimport {Direction} from '../bidi';\nimport {PositionStrategy, ScrollStrategy} from '../overlay';\nimport {Observable} from 'rxjs';\nimport {BasePortalOutlet} from '../portal';\nimport {FocusOrigin} from '../a11y';\n\n/** Options for where to set focus to automatically on dialog open */\nexport type AutoFocusTarget = 'dialog' | 'first-tabbable' | 'first-heading';\n\n/** Valid ARIA roles for a dialog. */\nexport type DialogRole = 'dialog' | 'alertdialog';\n\n/** Component that can be used as the container for the dialog. */\nexport type DialogContainer = BasePortalOutlet & {\n _focusTrapped?: Observable;\n _closeInteractionType?: FocusOrigin;\n _recaptureFocus?: () => void;\n};\n\n/** Configuration for opening a modal dialog. */\nexport class DialogConfig {\n /**\n * Where the attached component should live in Angular's *logical* component tree.\n * This affects what is available for injection and the change detection order for the\n * component instantiated inside of the dialog. This does not affect where the dialog\n * content will be rendered.\n */\n viewContainerRef?: ViewContainerRef;\n\n /**\n * Injector used for the instantiation of the component to be attached. If provided,\n * takes precedence over the injector indirectly provided by `ViewContainerRef`.\n */\n injector?: Injector;\n\n /** ID for the dialog. If omitted, a unique one will be generated. */\n id?: string;\n\n /** The ARIA role of the dialog element. */\n role?: DialogRole = 'dialog';\n\n /** Optional CSS class or classes applied to the overlay panel. */\n panelClass?: string | string[] = '';\n\n /** Whether the dialog has a backdrop. */\n hasBackdrop?: boolean = true;\n\n /** Optional CSS class or classes applied to the overlay backdrop. */\n backdropClass?: string | string[] = '';\n\n /** Whether the dialog closes with the escape key or pointer events outside the panel element. */\n disableClose?: boolean = false;\n\n /** Width of the dialog. */\n width?: string = '';\n\n /** Height of the dialog. */\n height?: string = '';\n\n /** Min-width of the dialog. If a number is provided, assumes pixel units. */\n minWidth?: number | string;\n\n /** Min-height of the dialog. If a number is provided, assumes pixel units. */\n minHeight?: number | string;\n\n /** Max-width of the dialog. If a number is provided, assumes pixel units. */\n maxWidth?: number | string;\n\n /** Max-height of the dialog. If a number is provided, assumes pixel units. */\n maxHeight?: number | string;\n\n /** Strategy to use when positioning the dialog. Defaults to centering it on the page. */\n positionStrategy?: PositionStrategy;\n\n /** Data being injected into the child component. */\n data?: D | null = null;\n\n /** Layout direction for the dialog's content. */\n direction?: Direction;\n\n /** ID of the element that describes the dialog. */\n ariaDescribedBy?: string | null = null;\n\n /** ID of the element that labels the dialog. */\n ariaLabelledBy?: string | null = null;\n\n /** Dialog label applied via `aria-label` */\n ariaLabel?: string | null = null;\n\n /**\n * Whether this is a modal dialog. Used to set the `aria-modal` attribute. Off by default,\n * because it can interfere with other overlay-based components (e.g. `mat-select`) and because\n * it is redundant since the dialog marks all outside content as `aria-hidden` anyway.\n */\n ariaModal?: boolean = false;\n\n /**\n * Where the dialog should focus on open.\n * @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or\n * AutoFocusTarget instead.\n */\n autoFocus?: AutoFocusTarget | string | boolean = 'first-tabbable';\n\n /**\n * Whether the dialog should restore focus to the previously-focused element upon closing.\n * Has the following behavior based on the type that is passed in:\n * - `boolean` - when true, will return focus to the element that was focused before the dialog\n * was opened, otherwise won't restore focus at all.\n * - `string` - focus will be restored to the first element that matches the CSS selector.\n * - `HTMLElement` - focus will be restored to the specific element.\n */\n restoreFocus?: boolean | string | HTMLElement = true;\n\n /**\n * Scroll strategy to be used for the dialog. This determines how\n * the dialog responds to scrolling underneath the panel element.\n */\n scrollStrategy?: ScrollStrategy;\n\n /**\n * Whether the dialog should close when the user navigates backwards or forwards through browser\n * history. This does not apply to navigation via anchor element unless using URL-hash based\n * routing (`HashLocationStrategy` in the Angular router).\n */\n closeOnNavigation?: boolean = true;\n\n /**\n * Whether the dialog should close when the dialog service is destroyed. This is useful if\n * another service is wrapping the dialog and is managing the destruction instead.\n */\n closeOnDestroy?: boolean = true;\n\n /**\n * Whether the dialog should close when the underlying overlay is detached. This is useful if\n * another service is wrapping the dialog and is managing the destruction instead. E.g. an\n * external detachment can happen as a result of a scroll strategy triggering it or when the\n * browser location changes.\n */\n closeOnOverlayDetachments?: boolean = true;\n\n /**\n * Alternate `ComponentFactoryResolver` to use when resolving the associated component.\n * @deprecated No longer used. Will be removed.\n * @breaking-change 20.0.0\n */\n componentFactoryResolver?: unknown;\n\n /**\n * Providers that will be exposed to the contents of the dialog. Can also\n * be provided as a function in order to generate the providers lazily.\n */\n providers?:\n | StaticProvider[]\n | ((dialogRef: R, config: DialogConfig, container: C) => StaticProvider[]);\n\n /**\n * Component into which the dialog content will be rendered. Defaults to `CdkDialogContainer`.\n * A configuration object can be passed in to customize the providers that will be exposed\n * to the dialog container.\n */\n container?:\n | Type\n | {\n type: Type;\n providers: (config: DialogConfig) => StaticProvider[];\n };\n\n /**\n * Context that will be passed to template-based dialogs.\n * A function can be passed in to resolve the context lazily.\n */\n templateContext?: Record | (() => Record);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n FocusMonitor,\n FocusOrigin,\n FocusTrap,\n FocusTrapFactory,\n InteractivityChecker,\n} from '../a11y';\nimport {OverlayRef} from '../overlay';\nimport {Platform, _getFocusedElementPierceShadowDom} from '../platform';\nimport {\n BasePortalOutlet,\n CdkPortalOutlet,\n ComponentPortal,\n DomPortal,\n TemplatePortal,\n} from '../portal';\nimport {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ComponentRef,\n ElementRef,\n EmbeddedViewRef,\n Injector,\n NgZone,\n OnDestroy,\n Renderer2,\n ViewChild,\n ViewEncapsulation,\n afterNextRender,\n inject,\n} from '@angular/core';\nimport {DialogConfig, DialogContainer} from './dialog-config';\nimport {Observable, Subject} from 'rxjs';\n\nexport function throwDialogContentAlreadyAttachedError() {\n throw Error('Attempting to attach dialog content after content is already attached');\n}\n\n/**\n * Internal component that wraps user-provided dialog content.\n * @docs-private\n */\n@Component({\n selector: 'cdk-dialog-container',\n templateUrl: './dialog-container.html',\n styleUrl: 'dialog-container.css',\n encapsulation: ViewEncapsulation.None,\n // Using OnPush for dialogs caused some G3 sync issues. Disabled until we can track them down.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n imports: [CdkPortalOutlet],\n host: {\n 'class': 'cdk-dialog-container',\n 'tabindex': '-1',\n '[attr.id]': '_config.id || null',\n '[attr.role]': '_config.role',\n '[attr.aria-modal]': '_config.ariaModal',\n '[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledByQueue[0]',\n '[attr.aria-label]': '_config.ariaLabel',\n '[attr.aria-describedby]': '_config.ariaDescribedBy || null',\n },\n})\nexport class CdkDialogContainer\n extends BasePortalOutlet\n implements DialogContainer, OnDestroy\n{\n protected _elementRef = inject>(ElementRef);\n protected _focusTrapFactory = inject(FocusTrapFactory);\n readonly _config: C;\n private _interactivityChecker = inject(InteractivityChecker);\n protected _ngZone = inject(NgZone);\n private _overlayRef = inject(OverlayRef);\n private _focusMonitor = inject(FocusMonitor);\n private _renderer = inject(Renderer2);\n protected readonly _changeDetectorRef = inject(ChangeDetectorRef);\n private _injector = inject(Injector);\n private _platform = inject(Platform);\n protected _document = inject(DOCUMENT, {optional: true})!;\n\n /** The portal outlet inside of this container into which the dialog content will be loaded. */\n @ViewChild(CdkPortalOutlet, {static: true}) _portalOutlet: CdkPortalOutlet;\n\n _focusTrapped: Observable = new Subject();\n\n /** The class that traps and manages focus within the dialog. */\n private _focusTrap: FocusTrap | null = null;\n\n /** Element that was focused before the dialog was opened. Save this to restore upon close. */\n private _elementFocusedBeforeDialogWasOpened: HTMLElement | null = null;\n\n /**\n * Type of interaction that led to the dialog being closed. This is used to determine\n * whether the focus style will be applied when returning focus to its original location\n * after the dialog is closed.\n */\n _closeInteractionType: FocusOrigin | null = null;\n\n /**\n * Queue of the IDs of the dialog's label element, based on their definition order. The first\n * ID will be used as the `aria-labelledby` value. We use a queue here to handle the case\n * where there are two or more titles in the DOM at a time and the first one is destroyed while\n * the rest are present.\n */\n _ariaLabelledByQueue: string[] = [];\n\n private _isDestroyed = false;\n\n constructor(...args: unknown[]);\n\n constructor() {\n super();\n\n // Callback is primarily for some internal tests\n // that were instantiating the dialog container manually.\n this._config = (inject(DialogConfig, {optional: true}) || new DialogConfig()) as C;\n\n if (this._config.ariaLabelledBy) {\n this._ariaLabelledByQueue.push(this._config.ariaLabelledBy);\n }\n }\n\n _addAriaLabelledBy(id: string) {\n this._ariaLabelledByQueue.push(id);\n this._changeDetectorRef.markForCheck();\n }\n\n _removeAriaLabelledBy(id: string) {\n const index = this._ariaLabelledByQueue.indexOf(id);\n\n if (index > -1) {\n this._ariaLabelledByQueue.splice(index, 1);\n this._changeDetectorRef.markForCheck();\n }\n }\n\n protected _contentAttached() {\n this._initializeFocusTrap();\n this._handleBackdropClicks();\n this._captureInitialFocus();\n }\n\n /**\n * Can be used by child classes to customize the initial focus\n * capturing behavior (e.g. if it's tied to an animation).\n */\n protected _captureInitialFocus() {\n this._trapFocus();\n }\n\n ngOnDestroy() {\n (this._focusTrapped as Subject).complete();\n this._isDestroyed = true;\n this._restoreFocus();\n }\n\n /**\n * Attach a ComponentPortal as content to this dialog container.\n * @param portal Portal to be attached as the dialog content.\n */\n attachComponentPortal(portal: ComponentPortal): ComponentRef {\n if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throwDialogContentAlreadyAttachedError();\n }\n\n const result = this._portalOutlet.attachComponentPortal(portal);\n this._contentAttached();\n return result;\n }\n\n /**\n * Attach a TemplatePortal as content to this dialog container.\n * @param portal Portal to be attached as the dialog content.\n */\n attachTemplatePortal(portal: TemplatePortal): EmbeddedViewRef {\n if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throwDialogContentAlreadyAttachedError();\n }\n\n const result = this._portalOutlet.attachTemplatePortal(portal);\n this._contentAttached();\n return result;\n }\n\n /**\n * Attaches a DOM portal to the dialog container.\n * @param portal Portal to be attached.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n override attachDomPortal = (portal: DomPortal) => {\n if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throwDialogContentAlreadyAttachedError();\n }\n\n const result = this._portalOutlet.attachDomPortal(portal);\n this._contentAttached();\n return result;\n };\n\n // TODO(crisbeto): this shouldn't be exposed, but there are internal references to it.\n /** Captures focus if it isn't already inside the dialog. */\n _recaptureFocus() {\n if (!this._containsFocus()) {\n this._trapFocus();\n }\n }\n\n /**\n * Focuses the provided element. If the element is not focusable, it will add a tabIndex\n * attribute to forcefully focus it. The attribute is removed after focus is moved.\n * @param element The element to focus.\n */\n private _forceFocus(element: HTMLElement, options?: FocusOptions) {\n if (!this._interactivityChecker.isFocusable(element)) {\n element.tabIndex = -1;\n // The tabindex attribute should be removed to avoid navigating to that element again\n this._ngZone.runOutsideAngular(() => {\n const callback = () => {\n deregisterBlur();\n deregisterMousedown();\n element.removeAttribute('tabindex');\n };\n\n const deregisterBlur = this._renderer.listen(element, 'blur', callback);\n const deregisterMousedown = this._renderer.listen(element, 'mousedown', callback);\n });\n }\n element.focus(options);\n }\n\n /**\n * Focuses the first element that matches the given selector within the focus trap.\n * @param selector The CSS selector for the element to set focus to.\n */\n private _focusByCssSelector(selector: string, options?: FocusOptions) {\n let elementToFocus = this._elementRef.nativeElement.querySelector(\n selector,\n ) as HTMLElement | null;\n if (elementToFocus) {\n this._forceFocus(elementToFocus, options);\n }\n }\n\n /**\n * Moves the focus inside the focus trap. When autoFocus is not set to 'dialog', if focus\n * cannot be moved then focus will go to the dialog container.\n */\n protected _trapFocus(options?: FocusOptions) {\n if (this._isDestroyed) {\n return;\n }\n\n // If were to attempt to focus immediately, then the content of the dialog would not yet be\n // ready in instances where change detection has to run first. To deal with this, we simply\n // wait until after the next render.\n afterNextRender(\n () => {\n const element = this._elementRef.nativeElement;\n switch (this._config.autoFocus) {\n case false:\n case 'dialog':\n // Ensure that focus is on the dialog container. It's possible that a different\n // component tried to move focus while the open animation was running. See:\n // https://github.com/angular/components/issues/16215. Note that we only want to do this\n // if the focus isn't inside the dialog already, because it's possible that the consumer\n // turned off `autoFocus` in order to move focus themselves.\n if (!this._containsFocus()) {\n element.focus(options);\n }\n break;\n case true:\n case 'first-tabbable':\n const focusedSuccessfully = this._focusTrap?.focusInitialElement(options);\n // If we weren't able to find a focusable element in the dialog, then focus the dialog\n // container instead.\n if (!focusedSuccessfully) {\n this._focusDialogContainer(options);\n }\n break;\n case 'first-heading':\n this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role=\"heading\"]', options);\n break;\n default:\n this._focusByCssSelector(this._config.autoFocus!, options);\n break;\n }\n (this._focusTrapped as Subject).next();\n },\n {injector: this._injector},\n );\n }\n\n /** Restores focus to the element that was focused before the dialog opened. */\n private _restoreFocus() {\n const focusConfig = this._config.restoreFocus;\n let focusTargetElement: HTMLElement | null = null;\n\n if (typeof focusConfig === 'string') {\n focusTargetElement = this._document.querySelector(focusConfig);\n } else if (typeof focusConfig === 'boolean') {\n focusTargetElement = focusConfig ? this._elementFocusedBeforeDialogWasOpened : null;\n } else if (focusConfig) {\n focusTargetElement = focusConfig;\n }\n\n // We need the extra check, because IE can set the `activeElement` to null in some cases.\n if (\n this._config.restoreFocus &&\n focusTargetElement &&\n typeof focusTargetElement.focus === 'function'\n ) {\n const activeElement = _getFocusedElementPierceShadowDom();\n const element = this._elementRef.nativeElement;\n\n // Make sure that focus is still inside the dialog or is on the body (usually because a\n // non-focusable element like the backdrop was clicked) before moving it. It's possible that\n // the consumer moved it themselves before the animation was done, in which case we shouldn't\n // do anything.\n if (\n !activeElement ||\n activeElement === this._document.body ||\n activeElement === element ||\n element.contains(activeElement)\n ) {\n if (this._focusMonitor) {\n this._focusMonitor.focusVia(focusTargetElement, this._closeInteractionType);\n this._closeInteractionType = null;\n } else {\n focusTargetElement.focus();\n }\n }\n }\n\n if (this._focusTrap) {\n this._focusTrap.destroy();\n }\n }\n\n /** Focuses the dialog container. */\n private _focusDialogContainer(options?: FocusOptions) {\n // Note that there is no focus method when rendering on the server.\n if (this._elementRef.nativeElement.focus) {\n this._elementRef.nativeElement.focus(options);\n }\n }\n\n /** Returns whether focus is inside the dialog. */\n private _containsFocus() {\n const element = this._elementRef.nativeElement;\n const activeElement = _getFocusedElementPierceShadowDom();\n return element === activeElement || element.contains(activeElement);\n }\n\n /** Sets up the focus trap. */\n private _initializeFocusTrap() {\n if (this._platform.isBrowser) {\n this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement);\n\n // Save the previously focused element. This element will be re-focused\n // when the dialog closes.\n if (this._document) {\n this._elementFocusedBeforeDialogWasOpened = _getFocusedElementPierceShadowDom();\n }\n }\n }\n\n /** Sets up the listener that handles clicks on the dialog backdrop. */\n private _handleBackdropClicks() {\n // Clicking on the backdrop will move focus out of dialog.\n // Recapture it if closing via the backdrop is disabled.\n this._overlayRef.backdropClick().subscribe(() => {\n if (this._config.disableClose) {\n this._recaptureFocus();\n }\n });\n }\n}\n","\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {OverlayRef} from '../overlay';\nimport {ESCAPE, hasModifierKey} from '../keycodes';\nimport {Observable, Subject, Subscription} from 'rxjs';\nimport {DialogConfig, DialogContainer} from './dialog-config';\nimport {FocusOrigin} from '../a11y';\nimport {ComponentRef} from '@angular/core';\n\n/** Additional options that can be passed in when closing a dialog. */\nexport interface DialogCloseOptions {\n /** Focus original to use when restoring focus. */\n focusOrigin?: FocusOrigin;\n}\n\n/**\n * Reference to a dialog opened via the Dialog service.\n */\nexport class DialogRef {\n /**\n * Instance of component opened into the dialog. Will be\n * null when the dialog is opened using a `TemplateRef`.\n */\n readonly componentInstance: C | null;\n\n /**\n * `ComponentRef` of the component opened into the dialog. Will be\n * null when the dialog is opened using a `TemplateRef`.\n */\n readonly componentRef: ComponentRef | null;\n\n /** Instance of the container that is rendering out the dialog content. */\n readonly containerInstance: DialogContainer;\n\n /** Whether the user is allowed to close the dialog. */\n disableClose: boolean | undefined;\n\n /** Emits when the dialog has been closed. */\n readonly closed: Observable = new Subject();\n\n /** Emits when the backdrop of the dialog is clicked. */\n readonly backdropClick: Observable;\n\n /** Emits when on keyboard events within the dialog. */\n readonly keydownEvents: Observable;\n\n /** Emits on pointer events that happen outside of the dialog. */\n readonly outsidePointerEvents: Observable;\n\n /** Unique ID for the dialog. */\n readonly id: string;\n\n /** Subscription to external detachments of the dialog. */\n private _detachSubscription: Subscription;\n\n constructor(\n readonly overlayRef: OverlayRef,\n readonly config: DialogConfig, DialogContainer>,\n ) {\n this.disableClose = config.disableClose;\n this.backdropClick = overlayRef.backdropClick();\n this.keydownEvents = overlayRef.keydownEvents();\n this.outsidePointerEvents = overlayRef.outsidePointerEvents();\n this.id = config.id!; // By the time the dialog is created we are guaranteed to have an ID.\n\n this.keydownEvents.subscribe(event => {\n if (event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event)) {\n event.preventDefault();\n this.close(undefined, {focusOrigin: 'keyboard'});\n }\n });\n\n this.backdropClick.subscribe(() => {\n if (!this.disableClose) {\n this.close(undefined, {focusOrigin: 'mouse'});\n }\n });\n\n this._detachSubscription = overlayRef.detachments().subscribe(() => {\n // Check specifically for `false`, because we want `undefined` to be treated like `true`.\n if (config.closeOnOverlayDetachments !== false) {\n this.close();\n }\n });\n }\n\n /**\n * Close the dialog.\n * @param result Optional result to return to the dialog opener.\n * @param options Additional options to customize the closing behavior.\n */\n close(result?: R, options?: DialogCloseOptions): void {\n if (this.containerInstance) {\n const closedSubject = this.closed as Subject;\n this.containerInstance._closeInteractionType = options?.focusOrigin || 'program';\n // Drop the detach subscription first since it can be triggered by the\n // `dispose` call and override the result of this closing sequence.\n this._detachSubscription.unsubscribe();\n this.overlayRef.dispose();\n closedSubject.next(result);\n closedSubject.complete();\n (this as {componentInstance: C}).componentInstance = (\n this as {containerInstance: DialogContainer}\n ).containerInstance = null!;\n }\n }\n\n /** Updates the position of the dialog based on the current position strategy. */\n updatePosition(): this {\n this.overlayRef.updatePosition();\n return this;\n }\n\n /**\n * Updates the dialog's width and height.\n * @param width New width of the dialog.\n * @param height New height of the dialog.\n */\n updateSize(width: string | number = '', height: string | number = ''): this {\n this.overlayRef.updateSize({width, height});\n return this;\n }\n\n /** Add a CSS class or an array of classes to the overlay pane. */\n addPanelClass(classes: string | string[]): this {\n this.overlayRef.addPanelClass(classes);\n return this;\n }\n\n /** Remove a CSS class or an array of classes from the overlay pane. */\n removePanelClass(classes: string | string[]): this {\n this.overlayRef.removePanelClass(classes);\n return this;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InjectionToken, inject} from '@angular/core';\nimport {Overlay, ScrollStrategy} from '../overlay';\nimport {DialogConfig} from './dialog-config';\n\n/** Injection token for the Dialog's ScrollStrategy. */\nexport const DIALOG_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrategy>(\n 'DialogScrollStrategy',\n {\n providedIn: 'root',\n factory: () => {\n const overlay = inject(Overlay);\n return () => overlay.scrollStrategies.block();\n },\n },\n);\n\n/** Injection token for the Dialog's Data. */\nexport const DIALOG_DATA = new InjectionToken('DialogData');\n\n/** Injection token that can be used to provide default options for the dialog module. */\nexport const DEFAULT_DIALOG_CONFIG = new InjectionToken('DefaultDialogConfig');\n\n/**\n * @docs-private\n * @deprecated No longer used. To be removed.\n * @breaking-change 19.0.0\n */\nexport function DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay: Overlay): () => ScrollStrategy {\n return () => overlay.scrollStrategies.block();\n}\n\n/**\n * @docs-private\n * @deprecated No longer used. To be removed.\n * @breaking-change 19.0.0\n */\nexport const DIALOG_SCROLL_STRATEGY_PROVIDER = {\n provide: DIALOG_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY,\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n TemplateRef,\n Injectable,\n Injector,\n OnDestroy,\n Type,\n StaticProvider,\n ComponentRef,\n inject,\n} from '@angular/core';\nimport {ComponentPortal, TemplatePortal} from '../portal';\nimport {of as observableOf, Observable, Subject, defer} from 'rxjs';\nimport {DialogRef} from './dialog-ref';\nimport {DialogConfig, DialogContainer} from './dialog-config';\nimport {Directionality} from '../bidi';\nimport {_IdGenerator} from '../a11y';\nimport {ComponentType, Overlay, OverlayRef, OverlayConfig, OverlayContainer} from '../overlay';\nimport {startWith, take} from 'rxjs/operators';\n\nimport {DEFAULT_DIALOG_CONFIG, DIALOG_DATA, DIALOG_SCROLL_STRATEGY} from './dialog-injectors';\nimport {CdkDialogContainer} from './dialog-container';\n\n@Injectable({providedIn: 'root'})\nexport class Dialog implements OnDestroy {\n private _overlay = inject(Overlay);\n private _injector = inject(Injector);\n private _defaultOptions = inject(DEFAULT_DIALOG_CONFIG, {optional: true});\n private _parentDialog = inject(Dialog, {optional: true, skipSelf: true});\n private _overlayContainer = inject(OverlayContainer);\n private _idGenerator = inject(_IdGenerator);\n\n private _openDialogsAtThisLevel: DialogRef[] = [];\n private readonly _afterAllClosedAtThisLevel = new Subject();\n private readonly _afterOpenedAtThisLevel = new Subject();\n private _ariaHiddenElements = new Map();\n private _scrollStrategy = inject(DIALOG_SCROLL_STRATEGY);\n\n /** Keeps track of the currently-open dialogs. */\n get openDialogs(): readonly DialogRef[] {\n return this._parentDialog ? this._parentDialog.openDialogs : this._openDialogsAtThisLevel;\n }\n\n /** Stream that emits when a dialog has been opened. */\n get afterOpened(): Subject> {\n return this._parentDialog ? this._parentDialog.afterOpened : this._afterOpenedAtThisLevel;\n }\n\n /**\n * Stream that emits when all open dialog have finished closing.\n * Will emit on subscribe if there are no open dialogs to begin with.\n */\n readonly afterAllClosed: Observable = defer(() =>\n this.openDialogs.length\n ? this._getAfterAllClosed()\n : this._getAfterAllClosed().pipe(startWith(undefined)),\n );\n\n constructor(...args: unknown[]);\n\n constructor() {}\n\n /**\n * Opens a modal dialog containing the given component.\n * @param component Type of the component to load into the dialog.\n * @param config Extra configuration options.\n * @returns Reference to the newly-opened dialog.\n */\n open(\n component: ComponentType,\n config?: DialogConfig>,\n ): DialogRef;\n\n /**\n * Opens a modal dialog containing the given template.\n * @param template TemplateRef to instantiate as the dialog content.\n * @param config Extra configuration options.\n * @returns Reference to the newly-opened dialog.\n */\n open(\n template: TemplateRef,\n config?: DialogConfig>,\n ): DialogRef;\n\n open(\n componentOrTemplateRef: ComponentType | TemplateRef,\n config?: DialogConfig>,\n ): DialogRef;\n\n open(\n componentOrTemplateRef: ComponentType | TemplateRef,\n config?: DialogConfig>,\n ): DialogRef {\n const defaults = (this._defaultOptions || new DialogConfig()) as DialogConfig<\n D,\n DialogRef\n >;\n config = {...defaults, ...config};\n config.id = config.id || this._idGenerator.getId('cdk-dialog-');\n\n if (\n config.id &&\n this.getDialogById(config.id) &&\n (typeof ngDevMode === 'undefined' || ngDevMode)\n ) {\n throw Error(`Dialog with id \"${config.id}\" exists already. The dialog id must be unique.`);\n }\n\n const overlayConfig = this._getOverlayConfig(config);\n const overlayRef = this._overlay.create(overlayConfig);\n const dialogRef = new DialogRef(overlayRef, config);\n const dialogContainer = this._attachContainer(overlayRef, dialogRef, config);\n\n (dialogRef as {containerInstance: DialogContainer}).containerInstance = dialogContainer;\n\n // If this is the first dialog that we're opening, hide all the non-overlay content.\n if (!this.openDialogs.length) {\n // Resolve this ahead of time, because some internal apps\n // mock it out and depend on it being synchronous.\n const overlayContainer = this._overlayContainer.getContainerElement();\n\n if (dialogContainer._focusTrapped) {\n dialogContainer._focusTrapped.pipe(take(1)).subscribe(() => {\n this._hideNonDialogContentFromAssistiveTechnology(overlayContainer);\n });\n } else {\n this._hideNonDialogContentFromAssistiveTechnology(overlayContainer);\n }\n }\n\n this._attachDialogContent(componentOrTemplateRef, dialogRef, dialogContainer, config);\n (this.openDialogs as DialogRef[]).push(dialogRef);\n dialogRef.closed.subscribe(() => this._removeOpenDialog(dialogRef, true));\n this.afterOpened.next(dialogRef);\n\n return dialogRef;\n }\n\n /**\n * Closes all of the currently-open dialogs.\n */\n closeAll(): void {\n reverseForEach(this.openDialogs, dialog => dialog.close());\n }\n\n /**\n * Finds an open dialog by its id.\n * @param id ID to use when looking up the dialog.\n */\n getDialogById(id: string): DialogRef | undefined {\n return this.openDialogs.find(dialog => dialog.id === id);\n }\n\n ngOnDestroy() {\n // Make one pass over all the dialogs that need to be untracked, but should not be closed. We\n // want to stop tracking the open dialog even if it hasn't been closed, because the tracking\n // determines when `aria-hidden` is removed from elements outside the dialog.\n reverseForEach(this._openDialogsAtThisLevel, dialog => {\n // Check for `false` specifically since we want `undefined` to be interpreted as `true`.\n if (dialog.config.closeOnDestroy === false) {\n this._removeOpenDialog(dialog, false);\n }\n });\n\n // Make a second pass and close the remaining dialogs. We do this second pass in order to\n // correctly dispatch the `afterAllClosed` event in case we have a mixed array of dialogs\n // that should be closed and dialogs that should not.\n reverseForEach(this._openDialogsAtThisLevel, dialog => dialog.close());\n\n this._afterAllClosedAtThisLevel.complete();\n this._afterOpenedAtThisLevel.complete();\n this._openDialogsAtThisLevel = [];\n }\n\n /**\n * Creates an overlay config from a dialog config.\n * @param config The dialog configuration.\n * @returns The overlay configuration.\n */\n private _getOverlayConfig(config: DialogConfig): OverlayConfig {\n const state = new OverlayConfig({\n positionStrategy:\n config.positionStrategy ||\n this._overlay.position().global().centerHorizontally().centerVertically(),\n scrollStrategy: config.scrollStrategy || this._scrollStrategy(),\n panelClass: config.panelClass,\n hasBackdrop: config.hasBackdrop,\n direction: config.direction,\n minWidth: config.minWidth,\n minHeight: config.minHeight,\n maxWidth: config.maxWidth,\n maxHeight: config.maxHeight,\n width: config.width,\n height: config.height,\n disposeOnNavigation: config.closeOnNavigation,\n });\n\n if (config.backdropClass) {\n state.backdropClass = config.backdropClass;\n }\n\n return state;\n }\n\n /**\n * Attaches a dialog container to a dialog's already-created overlay.\n * @param overlay Reference to the dialog's underlying overlay.\n * @param config The dialog configuration.\n * @returns A promise resolving to a ComponentRef for the attached container.\n */\n private _attachContainer(\n overlay: OverlayRef,\n dialogRef: DialogRef,\n config: DialogConfig>,\n ): DialogContainer {\n const userInjector = config.injector || config.viewContainerRef?.injector;\n const providers: StaticProvider[] = [\n {provide: DialogConfig, useValue: config},\n {provide: DialogRef, useValue: dialogRef},\n {provide: OverlayRef, useValue: overlay},\n ];\n let containerType: Type;\n\n if (config.container) {\n if (typeof config.container === 'function') {\n containerType = config.container;\n } else {\n containerType = config.container.type;\n providers.push(...config.container.providers(config));\n }\n } else {\n containerType = CdkDialogContainer;\n }\n\n const containerPortal = new ComponentPortal(\n containerType,\n config.viewContainerRef,\n Injector.create({parent: userInjector || this._injector, providers}),\n );\n const containerRef = overlay.attach(containerPortal);\n\n return containerRef.instance;\n }\n\n /**\n * Attaches the user-provided component to the already-created dialog container.\n * @param componentOrTemplateRef The type of component being loaded into the dialog,\n * or a TemplateRef to instantiate as the content.\n * @param dialogRef Reference to the dialog being opened.\n * @param dialogContainer Component that is going to wrap the dialog content.\n * @param config Configuration used to open the dialog.\n */\n private _attachDialogContent(\n componentOrTemplateRef: ComponentType | TemplateRef,\n dialogRef: DialogRef,\n dialogContainer: DialogContainer,\n config: DialogConfig>,\n ) {\n if (componentOrTemplateRef instanceof TemplateRef) {\n const injector = this._createInjector(config, dialogRef, dialogContainer, undefined);\n let context: any = {$implicit: config.data, dialogRef};\n\n if (config.templateContext) {\n context = {\n ...context,\n ...(typeof config.templateContext === 'function'\n ? config.templateContext()\n : config.templateContext),\n };\n }\n\n dialogContainer.attachTemplatePortal(\n new TemplatePortal(componentOrTemplateRef, null!, context, injector),\n );\n } else {\n const injector = this._createInjector(config, dialogRef, dialogContainer, this._injector);\n const contentRef = dialogContainer.attachComponentPortal(\n new ComponentPortal(componentOrTemplateRef, config.viewContainerRef, injector),\n );\n (dialogRef as {componentRef: ComponentRef}).componentRef = contentRef;\n (dialogRef as {componentInstance: C}).componentInstance = contentRef.instance;\n }\n }\n\n /**\n * Creates a custom injector to be used inside the dialog. This allows a component loaded inside\n * of a dialog to close itself and, optionally, to return a value.\n * @param config Config object that is used to construct the dialog.\n * @param dialogRef Reference to the dialog being opened.\n * @param dialogContainer Component that is going to wrap the dialog content.\n * @param fallbackInjector Injector to use as a fallback when a lookup fails in the custom\n * dialog injector, if the user didn't provide a custom one.\n * @returns The custom injector that can be used inside the dialog.\n */\n private _createInjector(\n config: DialogConfig>,\n dialogRef: DialogRef,\n dialogContainer: DialogContainer,\n fallbackInjector: Injector | undefined,\n ): Injector {\n const userInjector = config.injector || config.viewContainerRef?.injector;\n const providers: StaticProvider[] = [\n {provide: DIALOG_DATA, useValue: config.data},\n {provide: DialogRef, useValue: dialogRef},\n ];\n\n if (config.providers) {\n if (typeof config.providers === 'function') {\n providers.push(...config.providers(dialogRef, config, dialogContainer));\n } else {\n providers.push(...config.providers);\n }\n }\n\n if (\n config.direction &&\n (!userInjector ||\n !userInjector.get(Directionality, null, {optional: true}))\n ) {\n providers.push({\n provide: Directionality,\n useValue: {value: config.direction, change: observableOf()},\n });\n }\n\n return Injector.create({parent: userInjector || fallbackInjector, providers});\n }\n\n /**\n * Removes a dialog from the array of open dialogs.\n * @param dialogRef Dialog to be removed.\n * @param emitEvent Whether to emit an event if this is the last dialog.\n */\n private _removeOpenDialog(dialogRef: DialogRef, emitEvent: boolean) {\n const index = this.openDialogs.indexOf(dialogRef);\n\n if (index > -1) {\n (this.openDialogs as DialogRef[]).splice(index, 1);\n\n // If all the dialogs were closed, remove/restore the `aria-hidden`\n // to a the siblings and emit to the `afterAllClosed` stream.\n if (!this.openDialogs.length) {\n this._ariaHiddenElements.forEach((previousValue, element) => {\n if (previousValue) {\n element.setAttribute('aria-hidden', previousValue);\n } else {\n element.removeAttribute('aria-hidden');\n }\n });\n\n this._ariaHiddenElements.clear();\n\n if (emitEvent) {\n this._getAfterAllClosed().next();\n }\n }\n }\n }\n\n /** Hides all of the content that isn't an overlay from assistive technology. */\n private _hideNonDialogContentFromAssistiveTechnology(overlayContainer: HTMLElement) {\n // Ensure that the overlay container is attached to the DOM.\n if (overlayContainer.parentElement) {\n const siblings = overlayContainer.parentElement.children;\n\n for (let i = siblings.length - 1; i > -1; i--) {\n const sibling = siblings[i];\n\n if (\n sibling !== overlayContainer &&\n sibling.nodeName !== 'SCRIPT' &&\n sibling.nodeName !== 'STYLE' &&\n !sibling.hasAttribute('aria-live')\n ) {\n this._ariaHiddenElements.set(sibling, sibling.getAttribute('aria-hidden'));\n sibling.setAttribute('aria-hidden', 'true');\n }\n }\n }\n }\n\n private _getAfterAllClosed(): Subject {\n const parent = this._parentDialog;\n return parent ? parent._getAfterAllClosed() : this._afterAllClosedAtThisLevel;\n }\n}\n\n/**\n * Executes a callback against all elements in an array while iterating in reverse.\n * Useful if the array is being modified as it is being iterated.\n */\nfunction reverseForEach(items: T[] | readonly T[], callback: (current: T) => void) {\n let i = items.length;\n\n while (i--) {\n callback(items[i]);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {OverlayModule} from '../overlay';\nimport {PortalModule} from '../portal';\nimport {A11yModule} from '../a11y';\nimport {Dialog} from './dialog';\nimport {CdkDialogContainer} from './dialog-container';\n\n@NgModule({\n imports: [OverlayModule, PortalModule, A11yModule, CdkDialogContainer],\n exports: [\n // Re-export the PortalModule so that people extending the `CdkDialogContainer`\n // don't have to remember to import it or be faced with an unhelpful error.\n PortalModule,\n CdkDialogContainer,\n ],\n providers: [Dialog],\n})\nexport class DialogModule {}\n\n// Re-export needed by the Angular compiler.\n// See: https://github.com/angular/components/issues/30663.\n// Note: These exports need to be stable and shouldn't be renamed unnecessarily because\n// consuming libraries might have references to them in their own partial compilation output.\nexport {\n CdkPortal as ɵɵCdkPortal,\n CdkPortalOutlet as ɵɵCdkPortalOutlet,\n TemplatePortalDirective as ɵɵTemplatePortalDirective,\n PortalHostDirective as ɵɵPortalHostDirective,\n} from '../portal';\n"],"names":["observableOf"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA;MACa,YAAY,CAAA;AACvB;;;;;AAKG;AACH,IAAA,gBAAgB;AAEhB;;;AAGG;AACH,IAAA,QAAQ;;AAGR,IAAA,EAAE;;IAGF,IAAI,GAAgB,QAAQ;;IAG5B,UAAU,GAAuB,EAAE;;IAGnC,WAAW,GAAa,IAAI;;IAG5B,aAAa,GAAuB,EAAE;;IAGtC,YAAY,GAAa,KAAK;;IAG9B,KAAK,GAAY,EAAE;;IAGnB,MAAM,GAAY,EAAE;;AAGpB,IAAA,QAAQ;;AAGR,IAAA,SAAS;;AAGT,IAAA,QAAQ;;AAGR,IAAA,SAAS;;AAGT,IAAA,gBAAgB;;IAGhB,IAAI,GAAc,IAAI;;AAGtB,IAAA,SAAS;;IAGT,eA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