{"version":3,"file":"ng-primitives-dialog.mjs","sources":["../../../../packages/ng-primitives/dialog/src/config/dialog-config.ts","../../../../packages/ng-primitives/dialog/src/dialog/dialog-ref.ts","../../../../packages/ng-primitives/dialog/src/dialog/dialog-state.ts","../../../../packages/ng-primitives/dialog/src/dialog-description/dialog-description-state.ts","../../../../packages/ng-primitives/dialog/src/dialog-description/dialog-description.ts","../../../../packages/ng-primitives/dialog/src/dialog-overlay/dialog-overlay-state.ts","../../../../packages/ng-primitives/dialog/src/dialog-overlay/dialog-overlay.ts","../../../../packages/ng-primitives/dialog/src/dialog-title/dialog-title-state.ts","../../../../packages/ng-primitives/dialog/src/dialog-title/dialog-title.ts","../../../../packages/ng-primitives/dialog/src/dialog/dialog.service.ts","../../../../packages/ng-primitives/dialog/src/dialog-trigger/dialog-trigger-state.ts","../../../../packages/ng-primitives/dialog/src/dialog-trigger/dialog-trigger.ts","../../../../packages/ng-primitives/dialog/src/dialog/dialog.ts","../../../../packages/ng-primitives/dialog/src/dialog-panel/dialog-panel-state.ts","../../../../packages/ng-primitives/dialog/src/ng-primitives-dialog.ts"],"sourcesContent":["import { InjectionToken, Injector, Provider, ViewContainerRef, inject } from '@angular/core';\nimport { NgpDismissGuard, ScrollStrategy } from 'ng-primitives/portal';\n\n/** Valid ARIA roles for a dialog. */\nexport type NgpDialogRole = 'dialog' | 'alertdialog';\n\nexport interface NgpDialogConfig<T = any> {\n  /** The view container to attach the dialog to. */\n  viewContainerRef?: ViewContainerRef;\n\n  /** The injector to use for the dialog. Defaults to the view container's injector.*/\n  injector?: Injector;\n\n  /**\n   * The element the dialog is opened from, used to resolve the parent overlay and restore\n   * focus. Defaults to whatever holds focus when `open()` is called.\n   */\n  triggerElement?: HTMLElement;\n\n  /** ID for the dialog. If omitted, a unique one will be generated. */\n  id?: string;\n\n  /** The role of the dialog. */\n  role?: NgpDialogRole;\n\n  /** Whether this is a modal dialog. Used to set the `aria-modal` attribute. */\n  modal?: boolean;\n\n  /**\n   * The container element or selector the dialog should be rendered into.\n   * @default 'body'\n   */\n  container?: HTMLElement | string | null;\n\n  /**\n   * Whether the dialog should close when the user navigates. This includes both browser history\n   * navigation (back/forward) and programmatic route changes (e.g. router.navigate()).\n   */\n  closeOnNavigation?: boolean;\n\n  /** Whether the dialog should close when the user presses the escape key, or a guard function. */\n  closeOnEscape?: NgpDismissGuard<KeyboardEvent>;\n\n  /**\n   * Whether the dialog should close when clicking outside (on the overlay), or a guard function.\n   */\n  closeOnOutsideClick?: NgpDismissGuard<Element>;\n\n  /**\n   * Whether the dialog should close when the user clicks the overlay.\n   * @deprecated Use `closeOnOutsideClick` instead.\n   */\n  closeOnClick?: boolean;\n\n  /** Scroll strategy to be used for the dialog. */\n  scrollStrategy?: ScrollStrategy;\n\n  data?: T;\n}\n\nexport const defaultDialogConfig: NgpDialogConfig = {\n  role: 'dialog',\n  modal: true,\n  container: 'body',\n  closeOnNavigation: true,\n  closeOnEscape: true,\n  closeOnClick: true,\n};\n\nexport const NgpDialogConfigToken = new InjectionToken<NgpDialogConfig>('NgpDialogConfigToken');\n\n/**\n * Provide the default Dialog configuration\n * @param config The Dialog configuration\n * @returns The provider\n */\nexport function provideDialogConfig(config: Partial<NgpDialogConfig>): Provider[] {\n  return [\n    {\n      provide: NgpDialogConfigToken,\n      useValue: { ...defaultDialogConfig, ...config },\n    },\n  ];\n}\n\n/**\n * Inject the Dialog configuration\n * @returns The global Dialog configuration\n */\nexport function injectDialogConfig(): NgpDialogConfig {\n  return inject(NgpDialogConfigToken, { optional: true }) ?? defaultDialogConfig;\n}\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport { inject, InjectOptions, Injector } from '@angular/core';\nimport { NgpExitAnimationManager } from 'ng-primitives/internal';\nimport { NgpDismissGuard, NgpOverlayRef, NgpPortalDetachOptions } from 'ng-primitives/portal';\nimport { defer, EMPTY, fromEvent, Observable, Subject } from 'rxjs';\nimport { filter, map, takeUntil } from 'rxjs/operators';\nimport { NgpDialogConfig } from '../config/dialog-config';\n\n/** Minimal portal interface needed by the dialog ref. */\nexport interface NgpDialogPortalRef {\n  getElements(): HTMLElement[];\n  detach(options?: NgpPortalDetachOptions): Promise<void>;\n}\n\n/**\n * Reference to a dialog opened via the Dialog service.\n */\nexport class NgpDialogRef<T = unknown, R = unknown> implements NgpOverlayRef {\n  /** Whether the user is allowed to close the dialog. */\n  disableClose: boolean | undefined;\n\n  /** Whether the escape key is allowed to close the dialog, or a guard function. */\n  closeOnEscape: NgpDismissGuard<KeyboardEvent> | undefined;\n\n  /** Whether clicking outside (on the overlay) is allowed to close the dialog, or a guard function. */\n  closeOnOutsideClick: NgpDismissGuard<Element> | undefined;\n\n  /** Emits when the dialog has been closed. */\n  readonly closed = new Subject<{ focusOrigin?: FocusOrigin; result?: R }>();\n\n  /** @internal */\n  readonly afterClosed$ = new Subject<{ focusOrigin?: FocusOrigin; result?: R }>();\n\n  /**\n   * Observable that emits the dialog result after exit animations have completed.\n   */\n  readonly afterClosed: Observable<R | undefined> = this.afterClosed$.pipe(\n    map(event => event.result),\n  );\n\n  /** Data passed from the dialog opener. */\n  readonly data: T;\n\n  /** Unique ID for the dialog. */\n  readonly id: string;\n\n  /** @internal Store the injector */\n  injector: Injector | undefined;\n\n  /** Whether the dialog is closing. */\n  private closing = false;\n\n  /** @internal Portal reference for element access and detach. */\n  portal: NgpDialogPortalRef | null = null;\n\n  /** Emits on keyboard events within the dialog. */\n  readonly keydownEvents: Observable<KeyboardEvent>;\n\n  /**\n   * Emits pointer events (click, auxclick, contextmenu) that happen outside of the dialog.\n   * Fed by the NgpOverlayRegistry with CDK-compatible stacking awareness.\n   * @internal\n   */\n  readonly outsidePointerEvents$ = new Subject<MouseEvent>();\n\n  /** Emits on pointer events that happen outside of the dialog. */\n  readonly outsidePointerEvents: Observable<MouseEvent> = this.outsidePointerEvents$.asObservable();\n\n  constructor(\n    readonly config: NgpDialogConfig<T>,\n    private readonly document: Document,\n  ) {\n    this.data = config.data as T;\n    this.id = config.id!; // By the time the dialog is created we are guaranteed to have an ID.\n    this.closeOnEscape = config.closeOnEscape ?? true;\n    this.closeOnOutsideClick = config.closeOnOutsideClick;\n\n    // Use defer() so the observable is created on subscribe — by then the portal will be set.\n    this.keydownEvents = defer(() => {\n      const elements = this.getElements();\n      if (!elements.length) return EMPTY;\n      return fromEvent<KeyboardEvent>(this.document, 'keydown').pipe(\n        filter(event => elements.some(el => el.contains(event.target as Node))),\n        takeUntil(this.closed),\n      );\n    });\n  }\n\n  /**\n   * Updates the position of the dialog. No-op since dialogs are CSS-centered.\n   */\n  updatePosition(): this {\n    return this;\n  }\n\n  /**\n   * NgpOverlayRef implementation — called by the registry for escape-key dismiss.\n   */\n  hide(options?: { immediate?: boolean; origin?: FocusOrigin }): void {\n    if (this.disableClose) {\n      return;\n    }\n    this.close(undefined, options?.origin);\n  }\n\n  /**\n   * NgpOverlayRef implementation — called by the registry for descendant cascade.\n   * Skips exit animations and tears down immediately.\n   */\n  async hideImmediate(): Promise<void> {\n    if (this.closing) {\n      return;\n    }\n\n    this.closing = true;\n\n    this.closed.next({});\n    this.closed.complete();\n\n    // Detach the portal immediately — no exit animation\n    if (this.portal) {\n      await this.portal.detach({ immediate: true });\n      this.portal = null;\n    }\n\n    this.afterClosed$.next({});\n    this.afterClosed$.complete();\n  }\n\n  /**\n   * Close the dialog.\n   * @param result Optional result to return to the dialog opener.\n   * @param focusOrigin The origin of the focus event that triggered the close.\n   */\n  async close(result?: R, focusOrigin?: FocusOrigin): Promise<void> {\n    // If the dialog is already closed, do nothing.\n    if (this.closing) {\n      return;\n    }\n\n    this.closing = true;\n\n    // Emit immediately so consumers can react before exit animations run.\n    this.closed.next({ focusOrigin, result });\n    this.closed.complete();\n\n    const exitAnimationManager = this.injector?.get(NgpExitAnimationManager, undefined, {\n      optional: true,\n    });\n    if (exitAnimationManager) {\n      await exitAnimationManager.exit();\n    }\n\n    // Detach the portal (immediate since exit animation already ran)\n    if (this.portal) {\n      await this.portal.detach({ immediate: true });\n      this.portal = null;\n    }\n\n    this.afterClosed$.next({ focusOrigin, result });\n    this.afterClosed$.complete();\n  }\n\n  /**\n   * @deprecated Access dialog methods directly instead (keydownEvents, outsidePointerEvents,\n   * updatePosition, close). This shim will be removed in the next major version.\n   */\n  get overlayRef(): {\n    keydownEvents: () => Observable<KeyboardEvent>;\n    outsidePointerEvents: () => Observable<MouseEvent>;\n    updatePosition: () => NgpDialogRef<T, R>;\n    dispose: () => Promise<void>;\n    detachments: () => Observable<{ focusOrigin?: FocusOrigin; result?: R }>;\n    overlayElement: HTMLElement | undefined;\n  } {\n    return {\n      keydownEvents: () => this.keydownEvents,\n      outsidePointerEvents: () => this.outsidePointerEvents,\n      updatePosition: () => this.updatePosition(),\n      dispose: () => this.close(),\n      detachments: () => this.closed.asObservable(),\n      overlayElement: this.getElements()[0] as HTMLElement | undefined,\n    };\n  }\n\n  /**\n   * Get the portal elements.\n   * @internal\n   */\n  getElements(): HTMLElement[] {\n    return this.portal?.getElements() ?? [];\n  }\n}\n\nexport function injectDialogRef<T = unknown, R = unknown>(\n  options?: InjectOptions & { optional?: false },\n): NgpDialogRef<T, R>;\nexport function injectDialogRef<T = unknown, R = unknown>(\n  options: InjectOptions & { optional: true },\n): NgpDialogRef<T, R> | null;\nexport function injectDialogRef<T = unknown, R = unknown>(\n  options?: InjectOptions,\n): NgpDialogRef<T, R> | null {\n  return inject<NgpDialogRef<T, R>>(NgpDialogRef, options ?? {});\n}\n","import { signal, Signal } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n  attrBinding,\n  createPrimitive,\n  onDestroy,\n  StateInjectionOptions,\n} from 'ng-primitives/state';\nimport { NgpDialogRole } from '../config/dialog-config';\nimport { injectDialogRef } from './dialog-ref';\n\nexport interface NgpDialogState<R> {\n  /** The id of the dialog */\n  readonly id?: Signal<string>;\n  /** The dialog role. */\n  readonly role?: Signal<NgpDialogRole | undefined>;\n  /** Whether the dialog is a modal. */\n  readonly modal?: Signal<boolean>;\n  /** Close the dialog. */\n  close: (result?: R) => void;\n  /** @internal register a labelledby id */\n  setLabelledBy: (id: string) => void;\n  /** @internal register a describedby id */\n  setDescribedBy: (id: string) => void;\n  /** @internal remove a labelledby id */\n  removeLabelledBy: (id: string) => void;\n  /** @internal remove a describedby id */\n  removeDescribedBy: (id: string) => void;\n}\n\nexport interface NgpDialogProps {\n  /** The id of the dialog */\n  readonly id?: Signal<string>;\n  /** The dialog role. */\n  readonly role?: Signal<NgpDialogRole | undefined>;\n  /** Whether the dialog is a modal. */\n  readonly modal?: Signal<boolean>;\n}\n\nexport const [NgpDialogStateToken, ngpDialog, _injectDialogState, provideDialogState] =\n  createPrimitive(\n    'NgpDialog',\n    <T, R>({\n      id = signal<string>(''),\n      role = signal<NgpDialogRole | undefined>(undefined),\n      modal = signal<boolean>(true),\n    }: NgpDialogProps) => {\n      const elementRef = injectElementRef();\n      const dialogRef = injectDialogRef<T, R>();\n\n      const labelledBy = signal<string[]>([]);\n      const describedBy = signal<string[]>([]);\n\n      // Host binding\n      attrBinding(elementRef, 'tabindex', '-1');\n      attrBinding(elementRef, 'id', id);\n      attrBinding(elementRef, 'role', role);\n      attrBinding(elementRef, 'aria-modal', modal);\n      attrBinding(elementRef, 'aria-labelledby', () => labelledBy().join(' ') || null);\n      attrBinding(elementRef, 'aria-describedby', () => describedBy().join(' ') || null);\n\n      // Close the dialog when the directive is destroyed.\n      onDestroy(() => close());\n\n      function close(result?: R): void {\n        dialogRef.close(result);\n      }\n\n      function setLabelledBy(id: string): void {\n        labelledBy.update(ids => [...ids, id]);\n      }\n\n      function setDescribedBy(id: string): void {\n        describedBy.update(ids => [...ids, id]);\n      }\n\n      function removeLabelledBy(id: string): void {\n        labelledBy.update(ids => ids.filter(i => i !== id));\n      }\n\n      function removeDescribedBy(id: string): void {\n        describedBy.update(ids => ids.filter(i => i !== id));\n      }\n\n      return {\n        id,\n        role,\n        modal,\n        close,\n        setLabelledBy,\n        setDescribedBy,\n        removeLabelledBy,\n        removeDescribedBy,\n      } satisfies NgpDialogState<R>;\n    },\n  );\n\nexport function injectDialogState<R>(options?: StateInjectionOptions): Signal<NgpDialogState<R>> {\n  return _injectDialogState(options) as Signal<NgpDialogState<R>>;\n}\n","import { signal, Signal } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { attrBinding, createPrimitive, onDestroy } from 'ng-primitives/state';\nimport { onChange } from 'ng-primitives/utils';\nimport { injectDialogState } from '../dialog/dialog-state';\n\nexport interface NgpDialogDescriptionState {\n  /** The id of the descriptions. */\n  readonly id: Signal<string>;\n}\n\nexport interface NgpDialogDescriptionProps {\n  /** The id of the descriptions. */\n  readonly id?: Signal<string>;\n}\n\nexport const [\n  NgpDialogDescriptionStateToken,\n  ngpDialogDescription,\n  injectDialogDescriptionState,\n  provideDialogDescriptionState,\n] = createPrimitive(\n  'NgpDialogDescription',\n  ({ id = signal<string>('') }: NgpDialogDescriptionProps) => {\n    const elementRef = injectElementRef();\n    const dialogState = injectDialogState();\n\n    // Host binding\n    attrBinding(elementRef, 'id', id);\n\n    // Effects\n    onChange(id, (id, prevId) => {\n      if (prevId) {\n        dialogState().removeDescribedBy(prevId);\n      }\n\n      if (id) {\n        dialogState().setDescribedBy(id);\n      }\n    });\n\n    onDestroy(() => dialogState().removeDescribedBy(id()));\n\n    return { id } satisfies NgpDialogDescriptionState;\n  },\n);\n","import { Directive, input } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { ngpDialogDescription } from './dialog-description-state';\n\n@Directive({\n  selector: '[ngpDialogDescription]',\n  exportAs: 'ngpDialogDescription',\n})\nexport class NgpDialogDescription {\n  /** The id of the descriptions. */\n  readonly id = input<string>(uniqueId('ngp-dialog-description'));\n\n  protected readonly state = ngpDialogDescription({\n    id: this.id,\n  });\n}\n","import { signal, Signal } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { NgpDismissGuard } from 'ng-primitives/portal';\nimport { createPrimitive, listener } from 'ng-primitives/state';\nimport { injectDialogRef } from '../dialog/dialog-ref';\n\nexport interface NgpDialogOverlayState {\n  /**\n   * Whether the dialog should close on backdrop click.\n   * @default `true`\n   */\n  readonly closeOnClick: Signal<NgpDismissGuard<Element> | undefined>;\n}\n\nexport interface NgpDialogOverlayProps {\n  /**\n   * Whether the dialog should close on backdrop click.\n   * @default `true`\n   */\n  readonly closeOnClick?: Signal<NgpDismissGuard<Element> | undefined>;\n}\n\nexport const [\n  NgpDialogOverlayStateToken,\n  ngpDialogOverlay,\n  injectDialogOverlayState,\n  provideDialogOverlayState,\n] = createPrimitive(\n  'NgpDialogOverlay',\n  ({\n    closeOnClick = signal<NgpDismissGuard<Element> | undefined>(true),\n  }: NgpDialogOverlayProps) => {\n    const elementRef = injectElementRef();\n    const dialogRef = injectDialogRef();\n\n    const startedPointerDownOnOverlay = signal(false);\n\n    // Listener\n    listener(elementRef, 'pointerdown', handleOnPointerDown);\n    listener(elementRef, 'pointercancel', handleOnPointerCancel);\n    listener(elementRef, 'click', handleOnClick);\n\n    function handleOnPointerDown(event: Event): void {\n      startedPointerDownOnOverlay.set(event.target === event.currentTarget);\n    }\n\n    function handleOnPointerCancel(): void {\n      startedPointerDownOnOverlay.set(false);\n    }\n\n    function handleOnClick(event: Event): void {\n      const isOverlayClick = startedPointerDownOnOverlay() && event.target === event.currentTarget;\n\n      handleOnPointerCancel();\n\n      if (!isOverlayClick || dialogRef.disableClose) {\n        return;\n      }\n\n      const guard: NgpDismissGuard<Element> =\n        dialogRef.closeOnOutsideClick ?? closeOnClick() ?? true;\n      evaluateGuard(guard, event.target as Element);\n    }\n\n    function evaluateGuard(guard: NgpDismissGuard<Element>, target: Element): void {\n      if (guard === true) {\n        dialogRef.close(undefined, 'mouse');\n        return;\n      }\n\n      if (guard === false) {\n        return;\n      }\n\n      // Function guard — evaluate sync or async\n      let result: boolean | Promise<boolean>;\n      try {\n        result = guard(target);\n      } catch (error) {\n        console.error('NgpDialogOverlay: dismiss guard threw', error);\n        return;\n      }\n\n      if (typeof result === 'boolean') {\n        if (result) {\n          dialogRef.close(undefined, 'mouse');\n        }\n      } else {\n        result\n          .then(shouldClose => {\n            if (shouldClose) {\n              dialogRef.close(undefined, 'mouse');\n            }\n          })\n          .catch(error => {\n            console.error('NgpDialogOverlay: dismiss guard rejected', error);\n          });\n      }\n    }\n\n    return {\n      closeOnClick,\n    } satisfies NgpDialogOverlayState;\n  },\n);\n","import { booleanAttribute, Directive, input } from '@angular/core';\nimport { NgpExitAnimation } from 'ng-primitives/internal';\nimport { injectDialogRef } from '../dialog/dialog-ref';\nimport { ngpDialogOverlay } from './dialog-overlay-state';\n\n@Directive({\n  selector: '[ngpDialogOverlay]',\n  exportAs: 'ngpDialogOverlay',\n  hostDirectives: [NgpExitAnimation],\n})\nexport class NgpDialogOverlay {\n  protected readonly dialogRef = injectDialogRef();\n\n  /**\n   * Whether the dialog should close on backdrop click.\n   * @default `true`\n   */\n  readonly closeOnClick = input(this.dialogRef.config.closeOnClick, {\n    alias: 'ngpDialogOverlayCloseOnClick',\n    transform: booleanAttribute,\n  });\n\n  protected readonly state = ngpDialogOverlay({\n    closeOnClick: this.closeOnClick,\n  });\n}\n","import { Signal, signal } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { attrBinding, createPrimitive, onDestroy } from 'ng-primitives/state';\nimport { onChange } from 'ng-primitives/utils';\nimport { injectDialogState } from '../dialog/dialog-state';\n\nexport interface NgpDialogTitleState {\n  /** The id of the title. */\n  readonly id: Signal<string>;\n}\n\nexport interface NgpDialogTitleProps {\n  /** The id of the title. */\n  readonly id?: Signal<string>;\n}\n\nexport const [\n  NgpDialogTitleStateToken,\n  ngpDialogTitle,\n  injectDialogTitleState,\n  provideDialogTitleState,\n] = createPrimitive('NgpDialogTitle', ({ id = signal<string>('') }: NgpDialogTitleProps) => {\n  const elementRef = injectElementRef();\n  const dialogState = injectDialogState();\n\n  // Host binding\n  attrBinding(elementRef, 'id', id);\n\n  // Effects\n  onChange(id, (id, prevId) => {\n    if (prevId) {\n      dialogState().removeLabelledBy(prevId);\n    }\n\n    if (id) {\n      dialogState().setLabelledBy(id);\n    }\n  });\n\n  onDestroy(() => dialogState().removeLabelledBy(id()));\n\n  return { id } satisfies NgpDialogTitleState;\n});\n","import { Directive, input } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { ngpDialogTitle } from './dialog-title-state';\n\n@Directive({\n  selector: '[ngpDialogTitle]',\n  exportAs: 'ngpDialogTitle',\n})\nexport class NgpDialogTitle {\n  /** The id of the title. */\n  readonly id = input<string>(uniqueId('ngp-dialog-title'));\n\n  protected readonly state = ngpDialogTitle({\n    id: this.id,\n  });\n}\n","import { FocusMonitor } from '@angular/cdk/a11y';\nimport { ViewportRuler } from '@angular/cdk/scrolling';\nimport { DOCUMENT } from '@angular/common';\nimport {\n  ApplicationRef,\n  Injectable,\n  Injector,\n  OnDestroy,\n  StaticProvider,\n  TemplateRef,\n  Type,\n  ViewContainerRef,\n  inject,\n  isDevMode,\n} from '@angular/core';\nimport { NavigationStart, Router } from '@angular/router';\nimport { NgpExitAnimationManager } from 'ng-primitives/internal';\nimport {\n  BlockScrollStrategy,\n  NgpOverlayRegistry,\n  ScrollStrategy,\n  createPortal,\n} from 'ng-primitives/portal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { Observable, Subject, Subscription, defer } from 'rxjs';\nimport { startWith } from 'rxjs/operators';\nimport { NgpDialogConfig, NgpDialogConfigToken, injectDialogConfig } from '../config/dialog-config';\nimport { NgpDialogRef } from './dialog-ref';\n\n/**\n * Originally based on Angular CDK Dialog service.\n * Re-implemented to use ng-primitives/portal instead of @angular/cdk/overlay.\n */\n\n@Injectable({\n  providedIn: 'root',\n})\nexport class NgpDialogManager implements OnDestroy {\n  private readonly applicationRef = inject(ApplicationRef);\n  private readonly injector = inject(Injector);\n  private readonly document = inject<Document>(DOCUMENT);\n  private readonly focusMonitor = inject(FocusMonitor);\n  private readonly viewportRuler = inject(ViewportRuler);\n  private readonly registry = inject(NgpOverlayRegistry);\n  private readonly defaultOptions = injectDialogConfig();\n  private readonly parentDialogManager = inject(NgpDialogManager, {\n    optional: true,\n    skipSelf: true,\n  });\n  private readonly router = inject(Router, { optional: true });\n\n  private openDialogsAtThisLevel: NgpDialogRef[] = [];\n  private readonly afterAllClosedAtThisLevel = new Subject<void>();\n  private readonly afterOpenedAtThisLevel = new Subject<NgpDialogRef>();\n  private ariaHiddenElements = new Map<Element, string | null>();\n  private readonly closingDialogsAtThisLevel = new Set<NgpDialogRef>();\n  private routerSubscription: Subscription | undefined;\n\n  /** Scroll blocking strategy — shared across all dialogs. */\n  private scrollStrategy: ScrollStrategy | null = null;\n\n  /** Keeps track of the currently-open dialogs. */\n  get openDialogs(): readonly NgpDialogRef[] {\n    return this.parentDialogManager\n      ? this.parentDialogManager.openDialogs\n      : this.openDialogsAtThisLevel;\n  }\n\n  /**\n   * The `aria-hidden` bookkeeping, shared with the parent so nested managers don't overwrite each\n   * other's saved values, they act on the same list of open dialogs.\n   */\n  private get hiddenElements(): Map<Element, string | null> {\n    return this.parentDialogManager\n      ? this.parentDialogManager.hiddenElements\n      : this.ariaHiddenElements;\n  }\n\n  /** Dialogs that have closed but are still in the DOM, running their exit animation. */\n  private get closingDialogs(): Set<NgpDialogRef> {\n    return this.parentDialogManager\n      ? this.parentDialogManager.closingDialogs\n      : this.closingDialogsAtThisLevel;\n  }\n\n  /** Stream that emits when a dialog has been opened. */\n  get afterOpened(): Subject<NgpDialogRef> {\n    return this.parentDialogManager\n      ? this.parentDialogManager.afterOpened\n      : 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 template or component.\n   */\n  open(\n    templateRefOrComponentType: TemplateRef<NgpDialogContext> | Type<unknown>,\n    config?: NgpDialogConfig,\n  ): NgpDialogRef;\n\n  /**\n   * Opens a modal dialog containing the given template or component with typed data.\n   */\n  open<T, R = unknown>(\n    templateRefOrComponentType: TemplateRef<NgpDialogContext<T, R>> | Type<unknown>,\n    config: NgpDialogConfig<T> & { data: T },\n  ): NgpDialogRef<T, R>;\n\n  /**\n   * Opens a modal dialog with typed result but no data (explicit void for data type).\n   */\n  open<T extends void, R>(\n    templateRefOrComponentType: TemplateRef<NgpDialogContext<T, R>> | Type<unknown>,\n    config?: NgpDialogConfig,\n  ): NgpDialogRef<T, R>;\n\n  open(\n    templateRefOrComponentType: TemplateRef<any> | Type<unknown>,\n    config?: NgpDialogConfig<any>,\n  ): NgpDialogRef<any, any> {\n    // store the current active element so we can focus it after the dialog is closed\n    const activeElement = this.document.activeElement;\n\n    // this is not ideal, but there is a case where a dialog trigger is within an overlay (e.g. menu),\n    // which may be removed before the dialog is closed. This is not desired, so we need to access a view container ref\n    // that is not within the overlay. To solve this we use the view container ref of the root component.\n    // Could this have any unintended side effects? For example, the dialog would not be closed during route changes?\n    const viewContainerRef =\n      this.applicationRef.components[0]?.injector.get(ViewContainerRef) ??\n      config?.viewContainerRef ??\n      config?.injector?.get(ViewContainerRef);\n\n    const defaults = this.defaultOptions;\n    config = { ...defaults, viewContainerRef, ...config };\n    config.id = config.id ?? uniqueId('ngp-dialog');\n\n    // A spread `undefined` would override the global container; `null` still means the body.\n    if (config.container === undefined) {\n      config.container = defaults.container;\n    }\n\n    if (config.id && this.getDialogById(config.id) && isDevMode()) {\n      throw Error(`Dialog with id \"${config.id}\" exists already. The dialog id must be unique.`);\n    }\n\n    const dialogRef = new NgpDialogRef(config, this.document);\n    const injector = this.createInjector(config, dialogRef);\n\n    // store the injector in the dialog ref - this is so we can access the exit animation manager\n    dialogRef.injector = injector;\n\n    const context: NgpDialogContext = {\n      $implicit: dialogRef,\n      close: dialogRef.close.bind(dialogRef),\n    };\n\n    // Create the portal using our portal system\n    const portal = createPortal(\n      templateRefOrComponentType,\n      config.viewContainerRef!,\n      injector,\n      context,\n    );\n\n    portal.attach(this.resolveContainer(config.container));\n\n    // Store the portal reference on the dialog ref for element access and cleanup\n    dialogRef.portal = portal;\n\n    // If this is the first dialog that we're opening, enable scroll blocking.\n    if (!this.openDialogs.length) {\n      this.enableScrollBlocking(config);\n    }\n\n    // A programmatic open() has no trigger and falls back to whatever held focus.\n    const originElement =\n      config.triggerElement ?? (activeElement instanceof HTMLElement ? activeElement : null);\n\n    // Register under the overlay the dialog was opened from, so clicks inside it don't read\n    // as an outside press on that parent. `cascadeClose: false` below stops the inverse: a\n    // menu that closes on select must not take the dialog with it.\n    const parentId = originElement ? this.registry.findContainingOverlay(originElement) : null;\n\n    // Register with the overlay registry for centralized escape-key routing.\n    // outsidePress is false because the NgpDialogOverlay directive handles its own backdrop clicks.\n    this.registry.register({\n      id: dialogRef.id,\n      parentId,\n      cascadeClose: false,\n      overlay: dialogRef,\n      getElements: () => dialogRef.getElements(),\n      triggerElement: originElement ?? this.document.body,\n      dismissPolicy: {\n        outsidePress: false,\n        escapeKey: config.closeOnEscape ?? true,\n      },\n      outsidePointerEvents$: dialogRef.outsidePointerEvents$,\n    });\n\n    (this.openDialogs as NgpDialogRef[]).push(dialogRef as NgpDialogRef<any, any>);\n    this.refreshAssistiveTechnologyHiding();\n    this.afterOpened.next(dialogRef as NgpDialogRef<any, any>);\n    this.subscribeToRouterEvents();\n\n    dialogRef.closed.subscribe(() => {\n      // Deregister from the overlay registry immediately so stacking order is updated.\n      this.registry.deregister(dialogRef.id);\n      this.closingDialogs.add(dialogRef);\n      this.removeOpenDialog(dialogRef as NgpDialogRef<any, any>, true);\n    });\n\n    dialogRef.afterClosed$.subscribe(({ focusOrigin }) => {\n      // Recompute only now: until its exit animation ends the closing dialog is still in the DOM\n      // and holds focus, and hiding it would put focus inside an `aria-hidden` subtree.\n      this.closingDialogs.delete(dialogRef);\n      this.refreshAssistiveTechnologyHiding();\n\n      // Focus the trigger element after exit animations complete.\n      if (originElement && this.document.body.contains(originElement)) {\n        // Its not great that we are relying on an internal API here, but we need to in order to\n        // try and best determine the focus origin when it is programmatically closed by the user.\n        this.focusMonitor.focusVia(\n          originElement,\n          focusOrigin ?? (this.focusMonitor as any)._lastFocusOrigin,\n        );\n      }\n    });\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): NgpDialogRef | undefined {\n    return this.openDialogs.find(dialog => dialog.id === id);\n  }\n\n  /**\n   * Subscribe to router navigation events so that dialogs with `closeOnNavigation`\n   * are closed when the user navigates. This handles both browser popstate events\n   * and programmatic route changes (e.g. router.navigate()).\n   */\n  private subscribeToRouterEvents(): void {\n    if (this.routerSubscription || !this.router) {\n      return;\n    }\n\n    this.routerSubscription = this.router.events.subscribe(event => {\n      if (event instanceof NavigationStart && this.openDialogs.length) {\n        // Close dialogs that have closeOnNavigation enabled (iterate in reverse as closing modifies the array)\n        let i = this.openDialogs.length;\n        while (i--) {\n          const dialog = this.openDialogs[i];\n          if (dialog.config.closeOnNavigation !== false) {\n            dialog.close();\n          }\n        }\n      }\n    });\n  }\n\n  ngOnDestroy(): void {\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      this.removeOpenDialog(dialog, false);\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    this.routerSubscription?.unsubscribe();\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   */\n  private createInjector<T, R>(\n    config: NgpDialogConfig<T>,\n    dialogRef: NgpDialogRef<T, R>,\n  ): Injector {\n    const userInjector = config.injector || config.viewContainerRef?.injector;\n    const providers: StaticProvider[] = [\n      { provide: NgpDialogRef, useValue: dialogRef },\n      // expose the merged per-dialog config so NgpDialog honours role/modal/closeOn*\n      // passed to open(), not just the global config\n      { provide: NgpDialogConfigToken, useValue: config },\n      { provide: NgpExitAnimationManager, useClass: NgpExitAnimationManager },\n    ];\n\n    // Fall back to the service's own injector (root injector) to ensure\n    // ApplicationRef and other platform providers are available.\n    return Injector.create({ parent: userInjector || this.injector, providers });\n  }\n\n  /**\n   * Removes a dialog from the array of open dialogs.\n   */\n  private removeOpenDialog(dialogRef: NgpDialogRef, emitEvent: boolean) {\n    const index = this.openDialogs.indexOf(dialogRef);\n\n    if (index > -1) {\n      (this.openDialogs as NgpDialogRef[]).splice(index, 1);\n\n      // If all the dialogs were closed, restore the `aria-hidden` of the siblings, release the\n      // scroll block and emit to the `afterAllClosed` stream. Otherwise the hidden set is\n      // recomputed once the dialog has left the DOM.\n      if (!this.openDialogs.length) {\n        this.restoreAssistiveTechnologyHiding();\n        this.disableScrollBlocking();\n\n        if (emitEvent) {\n          this.getAfterAllClosed().next();\n        }\n      }\n    }\n  }\n\n  /**\n   * Enable scroll blocking when the first dialog opens.\n   */\n  private enableScrollBlocking(config?: NgpDialogConfig): void {\n    if (!this.scrollStrategy) {\n      this.scrollStrategy =\n        config?.scrollStrategy ?? new BlockScrollStrategy(this.viewportRuler, this.document);\n    }\n    this.scrollStrategy.enable();\n  }\n\n  /**\n   * Disable scroll blocking when the last dialog closes.\n   */\n  private disableScrollBlocking(): void {\n    this.scrollStrategy?.disable();\n    this.scrollStrategy = null;\n  }\n\n  /**\n   * Resolve the container element the dialog should be rendered into.\n   */\n  private resolveContainer(container: NgpDialogConfig['container']): HTMLElement {\n    if (!container) {\n      return this.document.body;\n    }\n\n    if (typeof container === 'string') {\n      const element = this.document.querySelector<HTMLElement>(container);\n\n      if (!element) {\n        console.warn(\n          `NgPrimitives: Container element with selector \"${container}\" not found. Falling back to document.body.`,\n        );\n        return this.document.body;\n      }\n\n      return element;\n    }\n\n    return container;\n  }\n\n  /**\n   * Recompute what is hidden from assistive technology for the currently open dialogs.\n   *\n   * Runs on every open and close rather than for the first dialog only: dialogs can render into\n   * different containers, so a container hidden on behalf of one dialog may be the very container\n   * the next one opens into.\n   */\n  private refreshAssistiveTechnologyHiding(): void {\n    this.restoreAssistiveTechnologyHiding();\n\n    if (!this.openDialogs.length) {\n      return;\n    }\n\n    // A closing dialog keeps focus until it detaches, so it stays exposed alongside the open ones.\n    const portalElements = [...this.openDialogs, ...this.closingDialogs].flatMap(dialog =>\n      dialog.getElements(),\n    );\n\n    // Overlays opened from inside a dialog (a popover, a select) render outside it but are part of\n    // it. Entries are in open order, so a submenu's parent is collected before the submenu.\n    for (const entry of this.registry.getEntries()) {\n      if (portalElements.some(element => element.contains(entry.triggerElement))) {\n        portalElements.push(...entry.getElements());\n      }\n    }\n\n    this.hideNonDialogContentFromAssistiveTechnology(portalElements);\n  }\n\n  /**\n   * Restore the `aria-hidden` values this manager overwrote.\n   */\n  private restoreAssistiveTechnologyHiding(): void {\n    const hiddenElements = this.hiddenElements;\n\n    hiddenElements.forEach((previousValue, element) => {\n      if (previousValue) {\n        element.setAttribute('aria-hidden', previousValue);\n      } else {\n        element.removeAttribute('aria-hidden');\n      }\n    });\n\n    hiddenElements.clear();\n  }\n\n  /**\n   * Hides all of the content that isn't a dialog portal from assistive technology.\n   */\n  private hideNonDialogContentFromAssistiveTechnology(portalElements: HTMLElement[]) {\n    const body = this.document.body;\n\n    // Collect every element on a path from the body down to a portal element. Hiding only the body\n    // children would hide the dialog itself when it renders into a nested container, and the paths\n    // must all be known up front — with two dialogs in different containers, one dialog's ancestors\n    // are the other's siblings.\n    const dialogPaths = new Set<Element>();\n\n    for (const portalElement of portalElements) {\n      // A portal's root nodes can include comments (an `<ng-container>` root), so anchor the walk\n      // on the nearest element.\n      let current: Element | null =\n        portalElement instanceof Element ? portalElement : (portalElement as Node).parentElement;\n\n      while (current && current !== body) {\n        dialogPaths.add(current);\n        current = current.parentElement;\n      }\n    }\n\n    // Hide everything sitting beside those paths.\n    for (const element of dialogPaths) {\n      const parent = element.parentElement;\n\n      if (!parent) {\n        continue;\n      }\n\n      for (const sibling of Array.from(parent.children)) {\n        if (!dialogPaths.has(sibling)) {\n          this.hideFromAssistiveTechnology(sibling);\n        }\n      }\n    }\n  }\n\n  /**\n   * Hide a single element from assistive technology, remembering its previous value.\n   */\n  private hideFromAssistiveTechnology(element: Element): void {\n    if (\n      this.hiddenElements.has(element) ||\n      element.nodeName === 'SCRIPT' ||\n      element.nodeName === 'STYLE' ||\n      element.hasAttribute('aria-live')\n    ) {\n      return;\n    }\n\n    this.hiddenElements.set(element, element.getAttribute('aria-hidden'));\n    element.setAttribute('aria-hidden', 'true');\n  }\n\n  private getAfterAllClosed(): Subject<void> {\n    const parent = this.parentDialogManager;\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\nexport interface NgpDialogContext<T = unknown, R = unknown> {\n  $implicit: NgpDialogRef<T, R>;\n  close: (result?: R) => void;\n}\n\nexport function injectDialogManager(): NgpDialogManager {\n  return inject(NgpDialogManager);\n}\n","import { DestroyRef, Injector, Signal, TemplateRef, inject, signal } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { NgpDismissGuard } from 'ng-primitives/portal';\nimport { createPrimitive, emitter, listener, StateInjectionOptions } from 'ng-primitives/state';\nimport { safeTakeUntilDestroyed } from 'ng-primitives/utils';\nimport { Observable } from 'rxjs';\nimport { injectDialogConfig } from '../config/dialog-config';\nimport { NgpDialogContext, NgpDialogManager } from '../dialog/dialog.service';\n\nexport interface NgpDialogTriggerState<T> {\n  /** The template to launch. */\n  readonly template?: Signal<TemplateRef<NgpDialogContext>>;\n  /**\n   * Whether the dialog should close on escape, or a guard function.\n   * @default `true`\n   */\n  readonly closeOnEscape?: Signal<NgpDismissGuard<KeyboardEvent>>;\n  /**\n   * Whether the dialog should close on outside click, or a guard function.\n   * @default `true`\n   */\n  readonly closeOnOutsideClick?: Signal<NgpDismissGuard<Element>>;\n  /**\n   * The container element or selector the dialog should be rendered into. `undefined` uses the\n   * dialog configuration, `null` renders into the body.\n   */\n  readonly container?: Signal<HTMLElement | string | null | undefined>;\n  /** The event that is fired when the closed state changes. */\n  readonly closedChange: Observable<T>;\n}\n\nexport interface NgpDialogTriggerProps<T> {\n  /** The template to launch. */\n  readonly template: Signal<TemplateRef<NgpDialogContext>>;\n  /**\n   * Whether the dialog should close on escape, or a guard function.\n   * @default `true`\n   */\n  readonly closeOnEscape?: Signal<NgpDismissGuard<KeyboardEvent>>;\n  /**\n   * Whether the dialog should close on outside click, or a guard function.\n   * @default `true`\n   */\n  readonly closeOnOutsideClick?: Signal<NgpDismissGuard<Element>>;\n  /**\n   * The container element or selector the dialog should be rendered into. `undefined` uses the\n   * dialog configuration, `null` renders into the body.\n   */\n  readonly container?: Signal<HTMLElement | string | null | undefined>;\n  readonly onClosedChange?: (value: T) => void;\n}\n\nexport const [\n  NgpDialogTriggerStateToken,\n  ngpDialogTrigger,\n  _injectDialogTriggerState,\n  provideDialogTriggerState,\n] = createPrimitive(\n  'NgpDialogTrigger',\n  <T>({\n    template,\n    closeOnEscape = signal<NgpDismissGuard<KeyboardEvent>>(true),\n    closeOnOutsideClick = signal<NgpDismissGuard<Element>>(true),\n    container = signal<HTMLElement | string | null | undefined>(undefined),\n    onClosedChange,\n  }: NgpDialogTriggerProps<T>) => {\n    const config = injectDialogConfig();\n    const elementRef = injectElementRef();\n    const dialogManager = inject(NgpDialogManager);\n    const destroyRef = inject(DestroyRef);\n    // Pass the trigger's injector so dialog content resolves DI from the component\n    // subtree, not the root injector. See #823.\n    const injector = inject(Injector);\n\n    const closed = emitter<T>();\n\n    // Listener\n    listener(elementRef, 'click', handleClick);\n\n    function handleClick(): void {\n      const dialogRef = dialogManager.open(template(), {\n        injector,\n        triggerElement: elementRef.nativeElement,\n        closeOnEscape: closeOnEscape(),\n        closeOnOutsideClick: closeOnOutsideClick(),\n        // resolve `undefined` here, the manager only sees the root configuration\n        container: container() === undefined ? config.container : container(),\n      });\n\n      dialogRef.closed.pipe(safeTakeUntilDestroyed(destroyRef)).subscribe(({ result }) => {\n        onClosedChange?.(result as T);\n        closed.emit(result as T);\n      });\n    }\n\n    return {\n      template,\n      closeOnEscape,\n      closeOnOutsideClick,\n      container,\n      closedChange: closed.asObservable(),\n    } satisfies NgpDialogTriggerState<T>;\n  },\n);\n\nexport function injectDialogTriggerState<T>(\n  options?: StateInjectionOptions,\n): Signal<NgpDialogTriggerState<T>> {\n  return _injectDialogTriggerState(options) as Signal<NgpDialogTriggerState<T>>;\n}\n","import { Directive, input, output, TemplateRef } from '@angular/core';\nimport { dismissGuardAttribute, NgpDismissGuard, NgpDismissGuardInput } from 'ng-primitives/portal';\nimport { injectDialogConfig } from '../config/dialog-config';\nimport { NgpDialogContext } from '../dialog/dialog.service';\nimport { ngpDialogTrigger } from './dialog-trigger-state';\n\n@Directive({\n  selector: '[ngpDialogTrigger]',\n  exportAs: 'ngpDialogTrigger',\n})\nexport class NgpDialogTrigger<T = unknown> {\n  /** Access the global configuration */\n  private readonly config = injectDialogConfig();\n\n  /** The template to launch. */\n  readonly template = input.required<TemplateRef<NgpDialogContext>>({\n    alias: 'ngpDialogTrigger',\n  });\n\n  /**\n   * Whether the dialog should close on escape, or a guard function.\n   * @default `true`\n   */\n  readonly closeOnEscape = input<\n    NgpDismissGuard<KeyboardEvent>,\n    NgpDismissGuardInput<KeyboardEvent>\n  >(this.config.closeOnEscape ?? true, {\n    alias: 'ngpDialogTriggerCloseOnEscape',\n    transform: dismissGuardAttribute,\n  });\n\n  /**\n   * Whether the dialog should close on outside click, or a guard function.\n   * @default `true`\n   */\n  readonly closeOnOutsideClick = input<NgpDismissGuard<Element>, NgpDismissGuardInput<Element>>(\n    this.config.closeOnOutsideClick ?? true,\n    {\n      alias: 'ngpDialogTriggerCloseOnOutsideClick',\n      transform: dismissGuardAttribute,\n    },\n  );\n\n  /**\n   * The container element or selector the dialog should be rendered into. `undefined` uses the\n   * dialog configuration, `null` renders into the body.\n   * @default 'body'\n   */\n  readonly container = input<HTMLElement | string | null | undefined>(\n    this.config.container ?? 'body',\n    {\n      alias: 'ngpDialogTriggerContainer',\n    },\n  );\n\n  /** Emits whenever the dialog is closed with the given result. */\n  readonly closed = output<T>({ alias: 'ngpDialogTriggerClosed' });\n\n  protected readonly state = ngpDialogTrigger({\n    template: this.template,\n    closeOnEscape: this.closeOnEscape,\n    closeOnOutsideClick: this.closeOnOutsideClick,\n    container: this.container,\n    onClosedChange: (value: T) => this.closed.emit(value),\n  });\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input } from '@angular/core';\nimport { NgpFocusTrap } from 'ng-primitives/focus-trap';\nimport { NgpExitAnimation } from 'ng-primitives/internal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectDialogConfig } from '../config/dialog-config';\nimport { ngpDialog, provideDialogState } from './dialog-state';\n\n@Directive({\n  selector: '[ngpDialog]',\n  exportAs: 'ngpDialog',\n  providers: [provideDialogState()],\n  hostDirectives: [NgpFocusTrap, NgpExitAnimation],\n})\nexport class NgpDialog<T = unknown, R = unknown> {\n  private readonly config = injectDialogConfig();\n\n  /** The id of the dialog */\n  readonly id = input<string>(uniqueId('ngp-dialog'));\n\n  /** The dialog role. */\n  readonly role = input(this.config.role, {\n    alias: 'ngpDialogRole',\n  });\n\n  /** Whether the dialog is a modal. */\n  readonly modal = input<boolean, BooleanInput>(this.config.modal ?? false, {\n    alias: 'ngpDialogModal',\n    transform: booleanAttribute,\n  });\n\n  /** The dialog state */\n  protected readonly state = ngpDialog<T, R>({\n    id: this.id,\n    role: this.role,\n    modal: this.modal,\n  });\n\n  /** Close the dialog. */\n  close(result?: R): void {\n    return this.state.close(result);\n  }\n\n  /** @internal register a labelledby id */\n  setLabelledBy(id: string): void {\n    return this.state.setLabelledBy(id);\n  }\n\n  /** @internal register a describedby id */\n  setDescribedBy(id: string): void {\n    return this.state.setDescribedBy(id);\n  }\n\n  /** @internal remove a labelledby id */\n  removeLabelledBy(id: string): void {\n    return this.state.removeLabelledBy(id);\n  }\n\n  /** @internal remove a describedby id */\n  removeDescribedBy(id: string): void {\n    return this.state.removeDescribedBy(id);\n  }\n}\n","import { createPrimitive } from 'ng-primitives/state';\n\nexport interface NgpDialogPanelState {}\n\nexport interface NgpDialogPanelProps {}\n\nexport const [\n  NgpDialogPanelStateToken,\n  ngpDialogPanel,\n  injectDialogPanelState,\n  provideDialogPanelState,\n] = createPrimitive('NgpDialogPanel', ({}: NgpDialogPanelProps) => {\n  return {} satisfies NgpDialogPanelState;\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;;;;;;AA4DO,MAAM,mBAAmB,GAAoB;AAClD,IAAA,IAAI,EAAE,QAAQ;AACd,IAAA,KAAK,EAAE,IAAI;AACX,IAAA,SAAS,EAAE,MAAM;AACjB,IAAA,iBAAiB,EAAE,IAAI;AACvB,IAAA,aAAa,EAAE,IAAI;AACnB,IAAA,YAAY,EAAE,IAAI;CACnB;AAEM,MAAM,oBAAoB,GAAG,IAAI,cAAc,CAAkB,sBAAsB,CAAC;AAE/F;;;;AAIG;AACG,SA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