{"version":3,"file":"dialog.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/dialog/dialog-config.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/dialog/dialog-container.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/dialog/dialog-container.html","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/dialog/dialog-ref.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/dialog/dialog-injectors.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/dialog/dialog.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/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, Binding} 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/**\n * Value that determines the focus restoration behavior for a dialog.\n * The values represent the following behaviors:\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 */\nexport type RestoreFocusValue = boolean | string | HTMLElement;\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<void>;\n  _closeInteractionType?: FocusOrigin;\n  _recaptureFocus?: () => void;\n};\n\n/** Configuration for opening a modal dialog. */\nexport class DialogConfig<D = unknown, R = unknown, C extends DialogContainer = BasePortalOutlet> {\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  /** Function used to determine whether the dialog is allowed to close. */\n  closePredicate?: <\n    Result = unknown,\n    Component = unknown,\n    Config extends DialogConfig = DialogConfig,\n  >(\n    result: Result | undefined,\n    config: Config,\n    componentInstance: Component | null,\n  ) => boolean;\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  /** Configures the focus restoration behavior. See `RestoreFocusValue` for more information. */\n  restoreFocus?: RestoreFocusValue = 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   * Whether the built-in overlay animations should be disabled.\n   */\n  disableAnimations?: boolean = false;\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<D, R, C>, 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<C>\n    | {\n        type: Type<C>;\n        providers: (config: DialogConfig<D, R, C>) => 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<string, any> | (() => Record<string, any>);\n\n  /**\n   * Bindings to apply to the component rendered inside the dialog.\n   * Does nothing for template-based dialogs.\n   */\n  bindings?: Binding[];\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 {Platform, _getFocusedElementPierceShadowDom} from '../platform';\nimport {\n  BasePortalOutlet,\n  CdkPortalOutlet,\n  ComponentPortal,\n  DomPortal,\n  TemplatePortal,\n} from '../portal';\n\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  DOCUMENT,\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.Eager,\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<C extends DialogConfig = DialogConfig>\n  extends BasePortalOutlet\n  implements DialogContainer, OnDestroy\n{\n  protected _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n  protected _focusTrapFactory = inject(FocusTrapFactory);\n  readonly _config: C;\n  private _interactivityChecker = inject(InteractivityChecker);\n  protected _ngZone = inject(NgZone);\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);\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<void> = new Subject<void>();\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() {\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._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<void>).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<T>(portal: ComponentPortal<T>): ComponentRef<T> {\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<T>(portal: TemplatePortal<T>): EmbeddedViewRef<T> {\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<void>).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    this._elementRef.nativeElement.focus?.(options);\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","<ng-template cdkPortalOutlet />\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<R = unknown, C = unknown> {\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 = 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<C> | null = 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<R | undefined> = new Subject<R | undefined>();\n\n  /** Emits when the backdrop of the dialog is clicked. */\n  readonly backdropClick: Observable<MouseEvent>;\n\n  /** Emits when on keyboard events within the dialog. */\n  readonly keydownEvents: Observable<KeyboardEvent>;\n\n  /** Emits on pointer events that happen outside of the dialog. */\n  readonly outsidePointerEvents: Observable<MouseEvent>;\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<any, DialogRef<R, C>, 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 && this._canClose()) {\n        this.close(undefined, {focusOrigin: 'mouse'});\n      } else {\n        // Clicking on the backdrop will move focus out of dialog.\n        // Recapture it if closing via the backdrop is disabled.\n        this.containerInstance._recaptureFocus?.();\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._canClose(result)) {\n      const closedSubject = this.closed as Subject<R | undefined>;\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  /** Whether the dialog is allowed to close. */\n  private _canClose(result?: R): boolean {\n    const config = this.config as DialogConfig<unknown, unknown, DialogContainer>;\n\n    return (\n      !!this.containerInstance &&\n      (!config.closePredicate || config.closePredicate(result, config, this.componentInstance))\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 {InjectionToken, Injector, inject} from '@angular/core';\nimport {createBlockScrollStrategy, 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 injector = inject(Injector);\n      return () => createBlockScrollStrategy(injector);\n    },\n  },\n);\n\n/** Injection token for the Dialog's Data. */\nexport const DIALOG_DATA = new InjectionToken<any>('DialogData');\n\n/** Injection token that can be used to provide default options for the dialog module. */\nexport const DEFAULT_DIALOG_CONFIG = new InjectionToken<DialogConfig>('DefaultDialogConfig');\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  ComponentRef,\n  EventEmitter,\n  Service,\n  Injector,\n  OnDestroy,\n  StaticProvider,\n  TemplateRef,\n  Type,\n  inject,\n  signal,\n} from '@angular/core';\nimport {Observable, Subject, defer} from 'rxjs';\nimport {startWith, take} from 'rxjs/operators';\nimport {_IdGenerator} from '../a11y';\nimport {Direction, Directionality} from '../bidi';\nimport {\n  ComponentType,\n  createGlobalPositionStrategy,\n  createOverlayRef,\n  OverlayConfig,\n  OverlayContainer,\n  OverlayRef,\n} from '../overlay';\nimport {ComponentPortal, TemplatePortal} from '../portal';\nimport {DialogConfig, DialogContainer} from './dialog-config';\nimport {DialogRef} from './dialog-ref';\n\nimport {CdkDialogContainer} from './dialog-container';\nimport {DEFAULT_DIALOG_CONFIG, DIALOG_DATA, DIALOG_SCROLL_STRATEGY} from './dialog-injectors';\n\nfunction getDirectionality(value: Direction): Directionality {\n  const valueSignal = signal(value);\n  const change = new EventEmitter<Direction>();\n  return {\n    valueSignal,\n    get value() {\n      return valueSignal();\n    },\n    change,\n    ngOnDestroy() {\n      change.complete();\n    },\n  };\n}\n\n@Service()\nexport class Dialog implements OnDestroy {\n  private _injector = inject(Injector);\n  private _defaultOptions = inject<DialogConfig>(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<any, any>[] = [];\n  private readonly _afterAllClosedAtThisLevel = new Subject<void>();\n  private readonly _afterOpenedAtThisLevel = new Subject<DialogRef>();\n  private _ariaHiddenElements = new Map<Element, string | null>();\n  private _scrollStrategy = inject(DIALOG_SCROLL_STRATEGY);\n\n  /** Keeps track of the currently-open dialogs. */\n  get openDialogs(): readonly DialogRef<any, any>[] {\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<DialogRef<any, any>> {\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<void> = defer(() =>\n    this.openDialogs.length\n      ? this._getAfterAllClosed()\n      : this._getAfterAllClosed().pipe(startWith(undefined)),\n  );\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<R = unknown, D = unknown, C = unknown>(\n    component: ComponentType<C>,\n    config?: DialogConfig<D, DialogRef<R, C>>,\n  ): DialogRef<R, C>;\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<R = unknown, D = unknown, C = unknown>(\n    template: TemplateRef<C>,\n    config?: DialogConfig<D, DialogRef<R, C>>,\n  ): DialogRef<R, C>;\n\n  open<R = unknown, D = unknown, C = unknown>(\n    componentOrTemplateRef: ComponentType<C> | TemplateRef<C>,\n    config?: DialogConfig<D, DialogRef<R, C>>,\n  ): DialogRef<R, C>;\n\n  open<R = unknown, D = unknown, C = unknown>(\n    componentOrTemplateRef: ComponentType<C> | TemplateRef<C>,\n    config?: DialogConfig<D, DialogRef<R, C>>,\n  ): DialogRef<R, C> {\n    const defaults = (this._defaultOptions || new DialogConfig()) as DialogConfig<\n      D,\n      DialogRef<R, C>\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 = createOverlayRef(this._injector, 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<R, C>[]).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<R, C>(id: string): DialogRef<R, C> | 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<D, R>(config: DialogConfig<D, R>): OverlayConfig {\n    const state = new OverlayConfig({\n      positionStrategy:\n        config.positionStrategy ||\n        createGlobalPositionStrategy(this._injector).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      disableAnimations: config.disableAnimations,\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<R, D, C>(\n    overlay: OverlayRef,\n    dialogRef: DialogRef<R, C>,\n    config: DialogConfig<D, DialogRef<R, C>>,\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<DialogContainer>;\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<R, D, C>(\n    componentOrTemplateRef: ComponentType<C> | TemplateRef<C>,\n    dialogRef: DialogRef<R, C>,\n    dialogContainer: DialogContainer,\n    config: DialogConfig<D, DialogRef<R, C>>,\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<C>(componentOrTemplateRef, null!, context, injector),\n      );\n    } else {\n      const injector = this._createInjector(config, dialogRef, dialogContainer, this._injector);\n      const contentRef = dialogContainer.attachComponentPortal<C>(\n        new ComponentPortal(\n          componentOrTemplateRef,\n          config.viewContainerRef,\n          injector,\n          null,\n          config.bindings,\n        ),\n      );\n      (dialogRef as {componentRef: ComponentRef<C>}).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<R, D, C>(\n    config: DialogConfig<D, DialogRef<R, C>>,\n    dialogRef: DialogRef<R, C>,\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>(Directionality, null, {optional: true}))\n    ) {\n      providers.push({\n        provide: Directionality,\n        useValue: getDirectionality(config.direction),\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<R, C>(dialogRef: DialogRef<R, C>, emitEvent: boolean) {\n    const index = this.openDialogs.indexOf(dialogRef);\n\n    if (index > -1) {\n      (this.openDialogs as DialogRef<R, C>[]).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          !sibling.hasAttribute('popover')\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<void> {\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<T>(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 {CdkPortal as ɵɵCdkPortal, CdkPortalOutlet as ɵɵCdkPortalOutlet} from '../portal';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAuCa,YAAY,CAAA;EAOvB,gBAAgB;EAMhB,QAAQ;EAGR,EAAE;AAGF,EAAA,IAAI,GAAgB,QAAQ;AAG5B,EAAA,UAAU,GAAuB,EAAE;AAGnC,EAAA,WAAW,GAAa,IAAI;AAG5B,EAAA,aAAa,GAAuB,EAAE;AAGtC,EAAA,YAAY,GAAa,KAAK;EAG9B,cAAc;AAWd,EAAA,KAAK,GAAY,EAAE;AAGnB,EAAA,MAAM,GAAY,EAAE;EAGpB,QAAQ;EAGR,SAAS;EAGT,QAAQ;EAGR,SAAS;EAGT,gBAAgB;AAGhB,EAAA,IAAI,GAAc,IAAI;EAGtB,SAAS;AAGT,EAAA,eAAe,GAAmB,IAAI;AAGtC,EAAA,cAAc,GAAmB,IAAI;AAGrC,EAAA,SAAS,GAAmB,IAAI;AAOhC,EAAA,SAAS,GAAa,KAAK;AAO3B,EAAA,SAAS,GAAwC,gBAAgB;AAGjE,EAAA,YAAY,GAAuB,IAAI;EAMvC,cAAc;AAOd,EAAA,iBAAiB,GAAa,IAAI;AAMlC,EAAA,cAAc,GAAa,IAAI;AAQ/B,EAAA,yBAAyB,GAAa,IAAI;AAK1C,EAAA,iBAAiB,GAAa,KAAK;EAMnC,SAAS;EAST,SAAS;EAWT,eAAe;EAMf,QAAQ;AACT;;SC3Je,sCAAsC,GAAA;EACpD,MAAM,KAAK,CAAC,uEAAuE,CAAC;AACtF;AA0BM,MAAO,kBACX,SAAQ,gBAAgB,CAAA;AAGd,EAAA,WAAW,GAAG,MAAM,CAA0B,UAAU,CAAC;AACzD,EAAA,iBAAiB,GAAG,MAAM,CAAC,gBAAgB,CAAC;EAC7C,OAAO;AACR,EAAA,qBAAqB,GAAG,MAAM,CAAC,oBAAoB,C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