{"version":3,"file":"_overlay-module-chunk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/overlay/scroll/block-scroll-strategy.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/overlay/scroll/scroll-strategy.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/overlay/scroll/close-scroll-strategy.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/overlay/scroll/noop-scroll-strategy.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/overlay/position/scroll-clip.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/overlay/scroll/reposition-scroll-strategy.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/overlay/scroll/scroll-strategy-options.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/overlay/overlay-config.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/overlay/position/connected-position.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/overlay/dispatchers/base-overlay-dispatcher.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/overlay/dispatchers/overlay-keyboard-dispatcher.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/overlay/dispatchers/overlay-outside-click-dispatcher.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/overlay/overlay-container.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/overlay/backdrop-ref.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/overlay/overlay-ref.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/overlay/position/flexible-connected-position-strategy.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/overlay/position/global-position-strategy.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/overlay/position/overlay-position-builder.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/overlay/overlay.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/overlay/overlay-directives.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/overlay/overlay-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 {DOCUMENT, Injector} from '@angular/core';\nimport {ScrollStrategy} from './scroll-strategy';\nimport {ViewportRuler} from '../../scrolling';\nimport {coerceCssPixelValue} from '../../coercion';\nimport {supportsScrollBehavior} from '../../platform';\n\nconst scrollBehaviorSupported = supportsScrollBehavior();\n\n/**\n * Creates a scroll strategy that prevents the user from scrolling while the overlay is open.\n * @param injector Injector used to resolve dependencies of the scroll strategy.\n * @param config Configuration options for the scroll strategy.\n */\nexport function createBlockScrollStrategy(injector: Injector): BlockScrollStrategy {\n  return new BlockScrollStrategy(injector.get(ViewportRuler), injector.get(DOCUMENT));\n}\n\n/**\n * Strategy that will prevent the user from scrolling while the overlay is visible.\n */\nexport class BlockScrollStrategy implements ScrollStrategy {\n  private _previousHTMLStyles = {top: '', left: ''};\n  private _previousScrollPosition: {top: number; left: number} | undefined;\n  private _isEnabled = false;\n  private _document: Document;\n\n  constructor(\n    private _viewportRuler: ViewportRuler,\n    document: any,\n  ) {\n    this._document = document;\n  }\n\n  /** Attaches this scroll strategy to an overlay. */\n  attach() {}\n\n  /** Blocks page-level scroll while the attached overlay is open. */\n  enable() {\n    if (this._canBeEnabled()) {\n      const root = this._document.documentElement!;\n\n      this._previousScrollPosition = this._viewportRuler.getViewportScrollPosition();\n\n      // Cache the previous inline styles in case the user had set them.\n      this._previousHTMLStyles.left = root.style.left || '';\n      this._previousHTMLStyles.top = root.style.top || '';\n\n      // Note: we're using the `html` node, instead of the `body`, because the `body` may\n      // have the user agent margin, whereas the `html` is guaranteed not to have one.\n      root.style.left = coerceCssPixelValue(-this._previousScrollPosition.left);\n      root.style.top = coerceCssPixelValue(-this._previousScrollPosition.top);\n      root.classList.add('cdk-global-scrollblock');\n      this._isEnabled = true;\n    }\n  }\n\n  /** Unblocks page-level scroll while the attached overlay is open. */\n  disable() {\n    if (this._isEnabled) {\n      const html = this._document.documentElement!;\n      const body = this._document.body!;\n      const htmlStyle = html.style;\n      const bodyStyle = body.style;\n      const previousHtmlScrollBehavior = htmlStyle.scrollBehavior || '';\n      const previousBodyScrollBehavior = bodyStyle.scrollBehavior || '';\n\n      this._isEnabled = false;\n\n      htmlStyle.left = this._previousHTMLStyles.left;\n      htmlStyle.top = this._previousHTMLStyles.top;\n      html.classList.remove('cdk-global-scrollblock');\n\n      // Disable user-defined smooth scrolling temporarily while we restore the scroll position.\n      // See https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior\n      // Note that we don't mutate the property if the browser doesn't support `scroll-behavior`,\n      // because it can throw off feature detections in `supportsScrollBehavior` which\n      // checks for `'scrollBehavior' in documentElement.style`.\n      if (scrollBehaviorSupported) {\n        htmlStyle.scrollBehavior = bodyStyle.scrollBehavior = 'auto';\n      }\n\n      window.scroll(this._previousScrollPosition!.left, this._previousScrollPosition!.top);\n\n      if (scrollBehaviorSupported) {\n        htmlStyle.scrollBehavior = previousHtmlScrollBehavior;\n        bodyStyle.scrollBehavior = previousBodyScrollBehavior;\n      }\n    }\n  }\n\n  private _canBeEnabled(): boolean {\n    // Since the scroll strategies can't be singletons, we have to use a global CSS class\n    // (`cdk-global-scrollblock`) to make sure that we don't try to disable global\n    // scrolling multiple times.\n    const html = this._document.documentElement!;\n\n    if (html.classList.contains('cdk-global-scrollblock') || this._isEnabled) {\n      return false;\n    }\n\n    const rootElement = this._document.documentElement;\n    const viewport = this._viewportRuler.getViewportSize();\n    return rootElement.scrollHeight > viewport.height || rootElement.scrollWidth > viewport.width;\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 type {OverlayRef} from '../overlay-ref';\n\n/**\n * Describes a strategy that will be used by an overlay to handle scroll events while it is open.\n */\nexport interface ScrollStrategy {\n  /** Enable this scroll strategy (called when the attached overlay is attached to a portal). */\n  enable: () => void;\n\n  /** Disable this scroll strategy (called when the attached overlay is detached from a portal). */\n  disable: () => void;\n\n  /** Attaches this `ScrollStrategy` to an overlay. */\n  attach: (overlayRef: OverlayRef) => void;\n\n  /** Detaches the scroll strategy from the current overlay. */\n  detach?: () => void;\n}\n\n/**\n * Returns an error to be thrown when attempting to attach an already-attached scroll strategy.\n */\nexport function getMatScrollStrategyAlreadyAttachedError(): Error {\n  return Error(`Scroll strategy has already been attached.`);\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 */\nimport {Injector, NgZone} from '@angular/core';\nimport {ScrollStrategy, getMatScrollStrategyAlreadyAttachedError} from './scroll-strategy';\nimport {Subscription} from 'rxjs';\nimport {ScrollDispatcher, ViewportRuler} from '../../scrolling';\nimport {filter} from 'rxjs/operators';\nimport type {OverlayRef} from '../overlay-ref';\n\n/**\n * Config options for the CloseScrollStrategy.\n */\nexport interface CloseScrollStrategyConfig {\n  /** Amount of pixels the user has to scroll before the overlay is closed. */\n  threshold?: number;\n}\n\n/**\n * Creates a scroll strategy that closes the overlay when the user starts to scroll.\n * @param injector Injector used to resolve dependencies of the scroll strategy.\n * @param config Configuration options for the scroll strategy.\n */\nexport function createCloseScrollStrategy(\n  injector: Injector,\n  config?: CloseScrollStrategyConfig,\n): CloseScrollStrategy {\n  return new CloseScrollStrategy(\n    injector.get(ScrollDispatcher),\n    injector.get(NgZone),\n    injector.get(ViewportRuler),\n    config,\n  );\n}\n\n/**\n * Strategy that will close the overlay as soon as the user starts scrolling.\n */\nexport class CloseScrollStrategy implements ScrollStrategy {\n  private _scrollSubscription: Subscription | null = null;\n  private _overlayRef!: OverlayRef;\n  private _initialScrollPosition!: number;\n\n  constructor(\n    private _scrollDispatcher: ScrollDispatcher,\n    private _ngZone: NgZone,\n    private _viewportRuler: ViewportRuler,\n    private _config?: CloseScrollStrategyConfig,\n  ) {}\n\n  /** Attaches this scroll strategy to an overlay. */\n  attach(overlayRef: OverlayRef) {\n    if (this._overlayRef && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n      throw getMatScrollStrategyAlreadyAttachedError();\n    }\n\n    this._overlayRef = overlayRef;\n  }\n\n  /** Enables the closing of the attached overlay on scroll. */\n  enable() {\n    if (this._scrollSubscription) {\n      return;\n    }\n\n    const stream = this._scrollDispatcher.scrolled(0).pipe(\n      filter(scrollable => {\n        return (\n          !scrollable ||\n          !this._overlayRef.overlayElement.contains(scrollable.getElementRef().nativeElement)\n        );\n      }),\n    );\n\n    if (this._config && this._config.threshold && this._config.threshold > 1) {\n      this._initialScrollPosition = this._viewportRuler.getViewportScrollPosition().top;\n\n      this._scrollSubscription = stream.subscribe(() => {\n        const scrollPosition = this._viewportRuler.getViewportScrollPosition().top;\n\n        if (Math.abs(scrollPosition - this._initialScrollPosition) > this._config!.threshold!) {\n          this._detach();\n        } else {\n          this._overlayRef.updatePosition();\n        }\n      });\n    } else {\n      this._scrollSubscription = stream.subscribe(this._detach);\n    }\n  }\n\n  /** Disables the closing the attached overlay on scroll. */\n  disable() {\n    if (this._scrollSubscription) {\n      this._scrollSubscription.unsubscribe();\n      this._scrollSubscription = null;\n    }\n  }\n\n  detach() {\n    this.disable();\n    this._overlayRef = null!;\n  }\n\n  /** Detaches the overlay ref and disables the scroll strategy. */\n  private _detach = () => {\n    this.disable();\n\n    if (this._overlayRef.hasAttached()) {\n      this._ngZone.run(() => this._overlayRef.detach());\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 {ScrollStrategy} from './scroll-strategy';\n\n/** Creates a scroll strategy that does nothing. */\nexport function createNoopScrollStrategy(): NoopScrollStrategy {\n  return new NoopScrollStrategy();\n}\n\n/** Scroll strategy that doesn't do anything. */\nexport class NoopScrollStrategy implements ScrollStrategy {\n  /** Does nothing, as this scroll strategy is a no-op. */\n  enable() {}\n  /** Does nothing, as this scroll strategy is a no-op. */\n  disable() {}\n  /** Does nothing, as this scroll strategy is a no-op. */\n  attach() {}\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\n// TODO(jelbourn): move this to live with the rest of the scrolling code\n// TODO(jelbourn): someday replace this with IntersectionObservers\n\n/** Equivalent of `DOMRect` without some of the properties we don't care about. */\ntype Dimensions = Omit<DOMRect, 'x' | 'y' | 'toJSON'>;\n\n/**\n * Gets whether an element is scrolled outside of view by any of its parent scrolling containers.\n * @param element Dimensions of the element (from getBoundingClientRect)\n * @param scrollContainers Dimensions of element's scrolling containers (from getBoundingClientRect)\n * @returns Whether the element is scrolled out of view\n * @docs-private\n */\nexport function isElementScrolledOutsideView(element: Dimensions, scrollContainers: Dimensions[]) {\n  return scrollContainers.some(containerBounds => {\n    const outsideAbove = element.bottom < containerBounds.top;\n    const outsideBelow = element.top > containerBounds.bottom;\n    const outsideLeft = element.right < containerBounds.left;\n    const outsideRight = element.left > containerBounds.right;\n\n    return outsideAbove || outsideBelow || outsideLeft || outsideRight;\n  });\n}\n\n/**\n * Gets whether an element is clipped by any of its scrolling containers.\n * @param element Dimensions of the element (from getBoundingClientRect)\n * @param scrollContainers Dimensions of element's scrolling containers (from getBoundingClientRect)\n * @returns Whether the element is clipped\n * @docs-private\n */\nexport function isElementClippedByScrolling(element: Dimensions, scrollContainers: Dimensions[]) {\n  return scrollContainers.some(scrollContainerRect => {\n    const clippedAbove = element.top < scrollContainerRect.top;\n    const clippedBelow = element.bottom > scrollContainerRect.bottom;\n    const clippedLeft = element.left < scrollContainerRect.left;\n    const clippedRight = element.right > scrollContainerRect.right;\n\n    return clippedAbove || clippedBelow || clippedLeft || clippedRight;\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 {Injector, NgZone} from '@angular/core';\nimport {Subscription} from 'rxjs';\nimport {ScrollStrategy, getMatScrollStrategyAlreadyAttachedError} from './scroll-strategy';\nimport {ScrollDispatcher, ViewportRuler} from '../../scrolling';\nimport {isElementScrolledOutsideView} from '../position/scroll-clip';\nimport type {OverlayRef} from '../overlay-ref';\n\n/**\n * Config options for the RepositionScrollStrategy.\n */\nexport interface RepositionScrollStrategyConfig {\n  /** Time in milliseconds to throttle the scroll events. */\n  scrollThrottle?: number;\n\n  /** Whether to close the overlay once the user has scrolled away completely. */\n  autoClose?: boolean;\n}\n\n/**\n * Creates a scroll strategy that updates the overlay's position when the user scrolls.\n * @param injector Injector used to resolve dependencies of the scroll strategy.\n * @param config Configuration options for the scroll strategy.\n */\nexport function createRepositionScrollStrategy(\n  injector: Injector,\n  config?: RepositionScrollStrategyConfig,\n): RepositionScrollStrategy {\n  return new RepositionScrollStrategy(\n    injector.get(ScrollDispatcher),\n    injector.get(ViewportRuler),\n    injector.get(NgZone),\n    config,\n  );\n}\n\n/**\n * Strategy that will update the element position as the user is scrolling.\n */\nexport class RepositionScrollStrategy implements ScrollStrategy {\n  private _scrollSubscription: Subscription | null = null;\n  private _overlayRef!: OverlayRef;\n\n  constructor(\n    private _scrollDispatcher: ScrollDispatcher,\n    private _viewportRuler: ViewportRuler,\n    private _ngZone: NgZone,\n    private _config?: RepositionScrollStrategyConfig,\n  ) {}\n\n  /** Attaches this scroll strategy to an overlay. */\n  attach(overlayRef: OverlayRef) {\n    if (this._overlayRef && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n      throw getMatScrollStrategyAlreadyAttachedError();\n    }\n\n    this._overlayRef = overlayRef;\n  }\n\n  /** Enables repositioning of the attached overlay on scroll. */\n  enable() {\n    if (!this._scrollSubscription) {\n      const throttle = this._config ? this._config.scrollThrottle : 0;\n\n      this._scrollSubscription = this._scrollDispatcher.scrolled(throttle).subscribe(() => {\n        this._overlayRef.updatePosition();\n\n        // TODO(crisbeto): make `close` on by default once all components can handle it.\n        if (this._config && this._config.autoClose) {\n          const overlayRect = this._overlayRef.overlayElement.getBoundingClientRect();\n          const {width, height} = this._viewportRuler.getViewportSize();\n\n          // TODO(crisbeto): include all ancestor scroll containers here once\n          // we have a way of exposing the trigger element to the scroll strategy.\n          const parentRects = [{width, height, bottom: height, right: width, top: 0, left: 0}];\n\n          if (isElementScrolledOutsideView(overlayRect, parentRects)) {\n            this.disable();\n            this._ngZone.run(() => this._overlayRef.detach());\n          }\n        }\n      });\n    }\n  }\n\n  /** Disables repositioning of the attached overlay on scroll. */\n  disable() {\n    if (this._scrollSubscription) {\n      this._scrollSubscription.unsubscribe();\n      this._scrollSubscription = null;\n    }\n  }\n\n  detach() {\n    this.disable();\n    this._overlayRef = null!;\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 {Injectable, Injector, inject} from '@angular/core';\nimport {createBlockScrollStrategy} from './block-scroll-strategy';\nimport {CloseScrollStrategyConfig, createCloseScrollStrategy} from './close-scroll-strategy';\nimport {NoopScrollStrategy} from './noop-scroll-strategy';\nimport {\n  createRepositionScrollStrategy,\n  RepositionScrollStrategyConfig,\n} from './reposition-scroll-strategy';\n\n/**\n * Options for how an overlay will handle scrolling.\n *\n * Users can provide a custom value for `ScrollStrategyOptions` to replace the default\n * behaviors. This class primarily acts as a factory for ScrollStrategy instances.\n */\n@Injectable({providedIn: 'root'})\nexport class ScrollStrategyOptions {\n  private _injector = inject(Injector);\n\n  constructor(...args: unknown[]);\n  constructor() {}\n\n  /** Do nothing on scroll. */\n  noop = () => new NoopScrollStrategy();\n\n  /**\n   * Close the overlay as soon as the user scrolls.\n   * @param config Configuration to be used inside the scroll strategy.\n   */\n  close = (config?: CloseScrollStrategyConfig) => createCloseScrollStrategy(this._injector, config);\n\n  /** Block scrolling. */\n  block = () => createBlockScrollStrategy(this._injector);\n\n  /**\n   * Update the overlay's position on scroll.\n   * @param config Configuration to be used inside the scroll strategy.\n   * Allows debouncing the reposition calls.\n   */\n  reposition = (config?: RepositionScrollStrategyConfig) =>\n    createRepositionScrollStrategy(this._injector, config);\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 {PositionStrategy} from './position/position-strategy';\nimport {Direction, Directionality} from '../bidi';\nimport {ScrollStrategy, NoopScrollStrategy} from './scroll/index';\n\n/** Initial configuration used when creating an overlay. */\nexport class OverlayConfig {\n  /** Strategy with which to position the overlay. */\n  positionStrategy?: PositionStrategy;\n\n  /** Strategy to be used when handling scroll events while the overlay is open. */\n  scrollStrategy?: ScrollStrategy = new NoopScrollStrategy();\n\n  /** Custom class to add to the overlay pane. */\n  panelClass?: string | string[] = '';\n\n  /** Whether the overlay has a backdrop. */\n  hasBackdrop?: boolean = false;\n\n  /** Custom class to add to the backdrop */\n  backdropClass?: string | string[] = 'cdk-overlay-dark-backdrop';\n\n  /** Whether to disable any built-in animations. */\n  disableAnimations?: boolean;\n\n  /** The width of the overlay panel. If a number is provided, pixel units are assumed. */\n  width?: number | string;\n\n  /** The height of the overlay panel. If a number is provided, pixel units are assumed. */\n  height?: number | string;\n\n  /** The min-width of the overlay panel. If a number is provided, pixel units are assumed. */\n  minWidth?: number | string;\n\n  /** The min-height of the overlay panel. If a number is provided, pixel units are assumed. */\n  minHeight?: number | string;\n\n  /** The max-width of the overlay panel. If a number is provided, pixel units are assumed. */\n  maxWidth?: number | string;\n\n  /** The max-height of the overlay panel. If a number is provided, pixel units are assumed. */\n  maxHeight?: number | string;\n\n  /**\n   * Direction of the text in the overlay panel. If a `Directionality` instance\n   * is passed in, the overlay will handle changes to its value automatically.\n   */\n  direction?: Direction | Directionality;\n\n  /**\n   * Whether the overlay should be disposed of when the user goes backwards/forwards in history.\n   * Note that this usually doesn't include clicking on links (unless the user is using\n   * the `HashLocationStrategy`).\n   */\n  disposeOnNavigation?: boolean = false;\n\n  /**\n   * Whether the overlay should be rendered as a native popover element,\n   * rather than placing it inside of the overlay container.\n   */\n  usePopover?: boolean;\n\n  /**\n   * Function that determines if the overlay should receive a specific\n   * event or if the event should go to the next overlay in the stack.\n   */\n  eventPredicate?: (event: Event) => boolean;\n\n  constructor(config?: OverlayConfig) {\n    if (config) {\n      // Use `Iterable` instead of `Array` because TypeScript, as of 3.6.3,\n      // loses the array generic type in the `for of`. But we *also* have to use `Array` because\n      // typescript won't iterate over an `Iterable` unless you compile with `--downlevelIteration`\n      const configKeys = Object.keys(config) as Iterable<keyof OverlayConfig> &\n        (keyof OverlayConfig)[];\n      for (const key of configKeys) {\n        if (config[key] !== undefined) {\n          // TypeScript, as of version 3.5, sees the left-hand-side of this expression\n          // as \"I don't know *which* key this is, so the only valid value is the intersection\n          // of all the possible values.\" In this case, that happens to be `undefined`. TypeScript\n          // is not smart enough to see that the right-hand-side is actually an access of the same\n          // exact type with the same exact key, meaning that the value type must be identical.\n          // So we use `any` to work around this.\n          this[key] = config[key] as any;\n        }\n      }\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/** Horizontal dimension of a connection point on the perimeter of the origin or overlay element. */\nexport type HorizontalConnectionPos = 'start' | 'center' | 'end';\n\n/** Vertical dimension of a connection point on the perimeter of the origin or overlay element. */\nexport type VerticalConnectionPos = 'top' | 'center' | 'bottom';\n\n/** The distance between the overlay element and the viewport. */\nexport type ViewportMargin = number | {top?: number; bottom?: number; start?: number; end?: number};\n\n/** A connection point on the origin element. */\nexport interface OriginConnectionPosition {\n  originX: HorizontalConnectionPos;\n  originY: VerticalConnectionPos;\n}\n\n/** A connection point on the overlay element. */\nexport interface OverlayConnectionPosition {\n  overlayX: HorizontalConnectionPos;\n  overlayY: VerticalConnectionPos;\n}\n\n/** The points of the origin element and the overlay element to connect. */\nexport class ConnectionPositionPair {\n  /** X-axis attachment point for connected overlay origin. Can be 'start', 'end', or 'center'. */\n  originX: HorizontalConnectionPos;\n  /** Y-axis attachment point for connected overlay origin. Can be 'top', 'bottom', or 'center'. */\n  originY: VerticalConnectionPos;\n  /** X-axis attachment point for connected overlay. Can be 'start', 'end', or 'center'. */\n  overlayX: HorizontalConnectionPos;\n  /** Y-axis attachment point for connected overlay. Can be 'top', 'bottom', or 'center'. */\n  overlayY: VerticalConnectionPos;\n\n  constructor(\n    origin: OriginConnectionPosition,\n    overlay: OverlayConnectionPosition,\n    /** Offset along the X axis. */\n    public offsetX?: number,\n    /** Offset along the Y axis. */\n    public offsetY?: number,\n    /** Class(es) to be applied to the panel while this position is active. */\n    public panelClass?: string | string[],\n  ) {\n    this.originX = origin.originX;\n    this.originY = origin.originY;\n    this.overlayX = overlay.overlayX;\n    this.overlayY = overlay.overlayY;\n  }\n}\n\n/**\n * Set of properties regarding the position of the origin and overlay relative to the viewport\n * with respect to the containing Scrollable elements.\n *\n * The overlay and origin are clipped if any part of their bounding client rectangle exceeds the\n * bounds of any one of the strategy's Scrollable's bounding client rectangle.\n *\n * The overlay and origin are outside view if there is no overlap between their bounding client\n * rectangle and any one of the strategy's Scrollable's bounding client rectangle.\n *\n *       -----------                    -----------\n *       | outside |                    | clipped |\n *       |  view   |              --------------------------\n *       |         |              |     |         |        |\n *       ----------               |     -----------        |\n *  --------------------------    |                        |\n *  |                        |    |      Scrollable        |\n *  |                        |    |                        |\n *  |                        |     --------------------------\n *  |      Scrollable        |\n *  |                        |\n *  --------------------------\n *\n *  @docs-private\n */\nexport class ScrollingVisibility {\n  isOriginClipped: boolean = false;\n  isOriginOutsideView: boolean = false;\n  isOverlayClipped: boolean = false;\n  isOverlayOutsideView: boolean = false;\n}\n\n/** The change event emitted by the strategy when a fallback position is used. */\nexport class ConnectedOverlayPositionChange {\n  constructor(\n    /** The position used as a result of this change. */\n    public connectionPair: ConnectionPositionPair,\n    /** @docs-private */\n    public scrollableViewProperties: ScrollingVisibility,\n  ) {}\n}\n\n/**\n * Validates whether a vertical position property matches the expected values.\n * @param property Name of the property being validated.\n * @param value Value of the property being validated.\n * @docs-private\n */\nexport function validateVerticalPosition(property: string, value: VerticalConnectionPos) {\n  if (value !== 'top' && value !== 'bottom' && value !== 'center') {\n    throw Error(\n      `ConnectedPosition: Invalid ${property} \"${value}\". ` +\n        `Expected \"top\", \"bottom\" or \"center\".`,\n    );\n  }\n}\n\n/**\n * Validates whether a horizontal position property matches the expected values.\n * @param property Name of the property being validated.\n * @param value Value of the property being validated.\n * @docs-private\n */\nexport function validateHorizontalPosition(property: string, value: HorizontalConnectionPos) {\n  if (value !== 'start' && value !== 'end' && value !== 'center') {\n    throw Error(\n      `ConnectedPosition: Invalid ${property} \"${value}\". ` +\n        `Expected \"start\", \"end\" or \"center\".`,\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 {Injectable, OnDestroy, inject, DOCUMENT} from '@angular/core';\nimport type {OverlayRef} from '../overlay-ref';\nimport {Subject} from 'rxjs';\n\n/**\n * Service for dispatching events that land on the body to appropriate overlay ref,\n * if any. It maintains a list of attached overlays to determine best suited overlay based\n * on event target and order of overlay opens.\n */\n@Injectable({providedIn: 'root'})\nexport abstract class BaseOverlayDispatcher implements OnDestroy {\n  /** Currently attached overlays in the order they were attached. */\n  _attachedOverlays: OverlayRef[] = [];\n\n  protected _document = inject(DOCUMENT);\n  protected _isAttached = false;\n\n  constructor(...args: unknown[]);\n\n  constructor() {}\n\n  ngOnDestroy(): void {\n    this.detach();\n  }\n\n  /** Add a new overlay to the list of attached overlay refs. */\n  add(overlayRef: OverlayRef): void {\n    // Ensure that we don't get the same overlay multiple times.\n    this.remove(overlayRef);\n    this._attachedOverlays.push(overlayRef);\n  }\n\n  /** Remove an overlay from the list of attached overlay refs. */\n  remove(overlayRef: OverlayRef): void {\n    const index = this._attachedOverlays.indexOf(overlayRef);\n\n    if (index > -1) {\n      this._attachedOverlays.splice(index, 1);\n    }\n\n    // Remove the global listener once there are no more overlays.\n    if (this._attachedOverlays.length === 0) {\n      this.detach();\n    }\n  }\n\n  /** Detaches the global event listener. */\n  protected abstract detach(): void;\n\n  /** Determines whether an overlay is allowed to receive an event. */\n  protected canReceiveEvent<T>(overlayRef: OverlayRef, event: Event, stream: Subject<T>): boolean {\n    if (stream.observers.length < 1) {\n      return false;\n    }\n\n    if (overlayRef.eventPredicate) {\n      return overlayRef.eventPredicate(event);\n    }\n\n    return true;\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 {Injectable, NgZone, RendererFactory2, inject} from '@angular/core';\nimport {BaseOverlayDispatcher} from './base-overlay-dispatcher';\nimport type {OverlayRef} from '../overlay-ref';\n\n/**\n * Service for dispatching keyboard events that land on the body to appropriate overlay ref,\n * if any. It maintains a list of attached overlays to determine best suited overlay based\n * on event target and order of overlay opens.\n */\n@Injectable({providedIn: 'root'})\nexport class OverlayKeyboardDispatcher extends BaseOverlayDispatcher {\n  private _ngZone = inject(NgZone);\n  private _renderer = inject(RendererFactory2).createRenderer(null, null);\n  private _cleanupKeydown: (() => void) | undefined;\n\n  /** Add a new overlay to the list of attached overlay refs. */\n  override add(overlayRef: OverlayRef): void {\n    super.add(overlayRef);\n\n    // Lazily start dispatcher once first overlay is added\n    if (!this._isAttached) {\n      this._ngZone.runOutsideAngular(() => {\n        this._cleanupKeydown = this._renderer.listen('body', 'keydown', this._keydownListener);\n      });\n\n      this._isAttached = true;\n    }\n  }\n\n  /** Detaches the global keyboard event listener. */\n  protected detach() {\n    if (this._isAttached) {\n      this._cleanupKeydown?.();\n      this._isAttached = false;\n    }\n  }\n\n  /** Keyboard event listener that will be attached to the body. */\n  private _keydownListener = (event: KeyboardEvent) => {\n    const overlays = this._attachedOverlays;\n\n    for (let i = overlays.length - 1; i > -1; i--) {\n      // Dispatch the keydown event to the top overlay which has subscribers to its keydown events.\n      // We want to target the most recent overlay, rather than trying to match where the event came\n      // from, because some components might open an overlay, but keep focus on a trigger element\n      // (e.g. for select and autocomplete). We skip overlays without keydown event subscriptions,\n      // because we don't want overlays that don't handle keyboard events to block the ones below\n      // them that do.\n      const overlayRef = overlays[i];\n      if (this.canReceiveEvent(overlayRef, event, overlayRef._keydownEvents)) {\n        this._ngZone.run(() => overlayRef._keydownEvents.next(event));\n        break;\n      }\n    }\n  };\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Injectable, NgZone, RendererFactory2, inject} from '@angular/core';\nimport {Platform, _getEventTarget} from '../../platform';\nimport {BaseOverlayDispatcher} from './base-overlay-dispatcher';\nimport type {OverlayRef} from '../overlay-ref';\n\n/**\n * Service for dispatching mouse click events that land on the body to appropriate overlay ref,\n * if any. It maintains a list of attached overlays to determine best suited overlay based\n * on event target and order of overlay opens.\n */\n@Injectable({providedIn: 'root'})\nexport class OverlayOutsideClickDispatcher extends BaseOverlayDispatcher {\n  private _platform = inject(Platform);\n  private _ngZone = inject(NgZone);\n  private _renderer = inject(RendererFactory2).createRenderer(null, null);\n\n  private _cursorOriginalValue!: string;\n  private _cursorStyleIsSet = false;\n  private _pointerDownEventTarget: HTMLElement | null = null;\n  private _cleanups: (() => void)[] | undefined;\n\n  /** Add a new overlay to the list of attached overlay refs. */\n  override add(overlayRef: OverlayRef): void {\n    super.add(overlayRef);\n\n    // Safari on iOS does not generate click events for non-interactive\n    // elements. However, we want to receive a click for any element outside\n    // the overlay. We can force a \"clickable\" state by setting\n    // `cursor: pointer` on the document body. See:\n    // https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event#Safari_Mobile\n    // https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html\n    if (!this._isAttached) {\n      const body = this._document.body;\n      const eventOptions = {capture: true};\n      const renderer = this._renderer;\n\n      this._cleanups = this._ngZone.runOutsideAngular(() => [\n        renderer.listen(body, 'pointerdown', this._pointerDownListener, eventOptions),\n        renderer.listen(body, 'click', this._clickListener, eventOptions),\n        renderer.listen(body, 'auxclick', this._clickListener, eventOptions),\n        renderer.listen(body, 'contextmenu', this._clickListener, eventOptions),\n      ]);\n\n      // click event is not fired on iOS. To make element \"clickable\" we are\n      // setting the cursor to pointer\n      if (this._platform.IOS && !this._cursorStyleIsSet) {\n        this._cursorOriginalValue = body.style.cursor;\n        body.style.cursor = 'pointer';\n        this._cursorStyleIsSet = true;\n      }\n\n      this._isAttached = true;\n    }\n  }\n\n  /** Detaches the global keyboard event listener. */\n  protected detach() {\n    if (this._isAttached) {\n      this._cleanups?.forEach(cleanup => cleanup());\n      this._cleanups = undefined;\n      if (this._platform.IOS && this._cursorStyleIsSet) {\n        this._document.body.style.cursor = this._cursorOriginalValue;\n        this._cursorStyleIsSet = false;\n      }\n      this._isAttached = false;\n    }\n  }\n\n  /** Store pointerdown event target to track origin of click. */\n  private _pointerDownListener = (event: PointerEvent) => {\n    this._pointerDownEventTarget = _getEventTarget<HTMLElement>(event);\n  };\n\n  /** Click event listener that will be attached to the body propagate phase. */\n  private _clickListener = (event: MouseEvent) => {\n    const target = _getEventTarget<HTMLElement>(event);\n    // In case of a click event, we want to check the origin of the click\n    // (e.g. in case where a user starts a click inside the overlay and\n    // releases the click outside of it).\n    // This is done by using the event target of the preceding pointerdown event.\n    // Every click event caused by a pointer device has a preceding pointerdown\n    // event, unless the click was programmatically triggered (e.g. in a unit test).\n    const origin =\n      event.type === 'click' && this._pointerDownEventTarget\n        ? this._pointerDownEventTarget\n        : target;\n    // Reset the stored pointerdown event target, to avoid having it interfere\n    // in subsequent events.\n    this._pointerDownEventTarget = null;\n\n    // We copy the array because the original may be modified asynchronously if the\n    // outsidePointerEvents listener decides to detach overlays resulting in index errors inside\n    // the for loop.\n    const overlays = this._attachedOverlays.slice();\n\n    // Dispatch the mouse event to the top overlay which has subscribers to its mouse events.\n    // We want to target all overlays for which the click could be considered as outside click.\n    // As soon as we reach an overlay for which the click is not outside click we break off\n    // the loop.\n    for (let i = overlays.length - 1; i > -1; i--) {\n      const overlayRef = overlays[i];\n      const outsidePointerEvents = overlayRef._outsidePointerEvents;\n\n      if (\n        // TODO(crisbeto): this should move into `canReceiveEvent` but may be breaking.\n        !overlayRef.hasAttached() ||\n        !this.canReceiveEvent(overlayRef, event, outsidePointerEvents)\n      ) {\n        continue;\n      }\n\n      // If it's a click inside the overlay, just break - we should do nothing\n      // If it's an outside click (both origin and target of the click) dispatch the mouse event,\n      // and proceed with the next overlay\n      if (\n        containsPierceShadowDom(overlayRef.overlayElement, target) ||\n        containsPierceShadowDom(overlayRef.overlayElement, origin)\n      ) {\n        break;\n      }\n\n      /** @breaking-change 14.0.0 _ngZone will be required. */\n      if (this._ngZone) {\n        this._ngZone.run(() => outsidePointerEvents.next(event));\n      } else {\n        outsidePointerEvents.next(event);\n      }\n    }\n  };\n}\n\n/** Version of `Element.contains` that transcends shadow DOM boundaries. */\nfunction containsPierceShadowDom(parent: HTMLElement, child: HTMLElement | null): boolean {\n  const supportsShadowRoot = typeof ShadowRoot !== 'undefined' && ShadowRoot;\n  let current: Node | null = child;\n\n  while (current) {\n    if (current === parent) {\n      return true;\n    }\n\n    current =\n      supportsShadowRoot && current instanceof ShadowRoot ? current.host : current.parentNode;\n  }\n\n  return false;\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  Injectable,\n  OnDestroy,\n  Component,\n  ChangeDetectionStrategy,\n  ViewEncapsulation,\n  inject,\n  DOCUMENT,\n} from '@angular/core';\nimport {_CdkPrivateStyleLoader} from '../private';\nimport {Platform, _isTestEnvironment} from '../platform';\n\n@Component({\n  template: '',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  encapsulation: ViewEncapsulation.None,\n  styleUrl: 'overlay-structure.css',\n  host: {'cdk-overlay-style-loader': ''},\n})\nexport class _CdkOverlayStyleLoader {}\n\n/** Container inside which all overlays will render. */\n@Injectable({providedIn: 'root'})\nexport class OverlayContainer implements OnDestroy {\n  protected _platform = inject(Platform);\n\n  protected _containerElement: HTMLElement | undefined;\n  protected _document = inject(DOCUMENT);\n  protected _styleLoader = inject(_CdkPrivateStyleLoader);\n\n  constructor(...args: unknown[]);\n  constructor() {}\n\n  ngOnDestroy() {\n    this._containerElement?.remove();\n  }\n\n  /**\n   * This method returns the overlay container element. It will lazily\n   * create the element the first time it is called to facilitate using\n   * the container in non-browser environments.\n   * @returns the container element\n   */\n  getContainerElement(): HTMLElement {\n    this._loadStyles();\n\n    if (!this._containerElement) {\n      this._createContainer();\n    }\n\n    return this._containerElement!;\n  }\n\n  /**\n   * Create the overlay container element, which is simply a div\n   * with the 'cdk-overlay-container' class on the document body.\n   */\n  protected _createContainer(): void {\n    const containerClass = 'cdk-overlay-container';\n\n    // TODO(crisbeto): remove the testing check once we have an overlay testing\n    // module or Angular starts tearing down the testing `NgModule`. See:\n    // https://github.com/angular/angular/issues/18831\n    if (this._platform.isBrowser || _isTestEnvironment()) {\n      const oppositePlatformContainers = this._document.querySelectorAll(\n        `.${containerClass}[platform=\"server\"], ` + `.${containerClass}[platform=\"test\"]`,\n      );\n\n      // Remove any old containers from the opposite platform.\n      // This can happen when transitioning from the server to the client.\n      for (let i = 0; i < oppositePlatformContainers.length; i++) {\n        oppositePlatformContainers[i].remove();\n      }\n    }\n\n    const container = this._document.createElement('div');\n    container.classList.add(containerClass);\n\n    // A long time ago we kept adding new overlay containers whenever a new app was instantiated,\n    // but at some point we added logic which clears the duplicate ones in order to avoid leaks.\n    // The new logic was a little too aggressive since it was breaking some legitimate use cases.\n    // To mitigate the problem we made it so that only containers from a different platform are\n    // cleared, but the side-effect was that people started depending on the overly-aggressive\n    // logic to clean up their tests for them. Until we can introduce an overlay-specific testing\n    // module which does the cleanup, we try to detect that we're in a test environment and we\n    // always clear the container. See #17006.\n    // TODO(crisbeto): remove the test environment check once we have an overlay testing module.\n    if (_isTestEnvironment()) {\n      container.setAttribute('platform', 'test');\n    } else if (!this._platform.isBrowser) {\n      container.setAttribute('platform', 'server');\n    }\n\n    this._document.body.appendChild(container);\n    this._containerElement = container;\n  }\n\n  /** Loads the structural styles necessary for the overlay to work. */\n  protected _loadStyles(): void {\n    this._styleLoader.load(_CdkOverlayStyleLoader);\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 {NgZone, Renderer2} from '@angular/core';\n\n/** Encapsulates the logic for attaching and detaching a backdrop. */\nexport class BackdropRef {\n  readonly element: HTMLElement;\n  private _cleanupClick: (() => void) | undefined;\n  private _cleanupTransitionEnd: (() => void) | undefined;\n  private _fallbackTimeout: ReturnType<typeof setTimeout> | undefined;\n\n  constructor(\n    document: Document,\n    private _renderer: Renderer2,\n    private _ngZone: NgZone,\n    onClick: (event: MouseEvent) => void,\n  ) {\n    this.element = document.createElement('div');\n    this.element.classList.add('cdk-overlay-backdrop');\n    this._cleanupClick = _renderer.listen(this.element, 'click', onClick);\n  }\n\n  detach() {\n    this._ngZone.runOutsideAngular(() => {\n      const element = this.element;\n      clearTimeout(this._fallbackTimeout);\n      this._cleanupTransitionEnd?.();\n      this._cleanupTransitionEnd = this._renderer.listen(element, 'transitionend', this.dispose);\n      this._fallbackTimeout = setTimeout(this.dispose, 500);\n\n      // If the backdrop doesn't have a transition, the `transitionend` event won't fire.\n      // In this case we make it unclickable and we try to remove it after a delay.\n      element.style.pointerEvents = 'none';\n      element.classList.remove('cdk-overlay-backdrop-showing');\n    });\n  }\n\n  dispose = () => {\n    clearTimeout(this._fallbackTimeout);\n    this._cleanupClick?.();\n    this._cleanupTransitionEnd?.();\n    this._cleanupClick = this._cleanupTransitionEnd = this._fallbackTimeout = undefined;\n    this.element.remove();\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 {Location} from '@angular/common';\nimport {\n  AfterRenderRef,\n  ComponentRef,\n  EmbeddedViewRef,\n  EnvironmentInjector,\n  NgZone,\n  Renderer2,\n  afterNextRender,\n} from '@angular/core';\nimport {Observable, Subject, Subscription, SubscriptionLike} from 'rxjs';\nimport {Direction, Directionality} from '../bidi';\nimport {coerceArray, coerceCssPixelValue} from '../coercion';\nimport {ComponentPortal, Portal, PortalOutlet, TemplatePortal} from '../portal';\nimport {BackdropRef} from './backdrop-ref';\nimport {OverlayKeyboardDispatcher} from './dispatchers/overlay-keyboard-dispatcher';\nimport {OverlayOutsideClickDispatcher} from './dispatchers/overlay-outside-click-dispatcher';\nimport {OverlayConfig} from './overlay-config';\nimport {PositionStrategy} from './position/position-strategy';\nimport {ScrollStrategy} from './scroll';\n\n/** An object where all of its properties cannot be written. */\nexport type ImmutableObject<T> = {\n  readonly [P in keyof T]: T[P];\n};\n\n/** Checks if a value is an element. */\nexport function isElement(value: any): value is Element {\n  return value && (value as Element).nodeType === 1;\n}\n\n/**\n * Reference to an overlay that has been created with the Overlay service.\n * Used to manipulate or dispose of said overlay.\n */\nexport class OverlayRef implements PortalOutlet {\n  private readonly _backdropClick = new Subject<MouseEvent>();\n  private readonly _attachments = new Subject<void>();\n  private readonly _detachments = new Subject<void>();\n  private _positionStrategy: PositionStrategy | undefined;\n  private _scrollStrategy: ScrollStrategy | undefined;\n  private _locationChanges: SubscriptionLike = Subscription.EMPTY;\n  private _backdropRef: BackdropRef | null = null;\n  private _detachContentMutationObserver: MutationObserver | undefined;\n  private _detachContentAfterRenderRef: AfterRenderRef | undefined;\n  private _disposed = false;\n\n  /**\n   * Reference to the parent of the `_host` at the time it was detached. Used to restore\n   * the `_host` to its original position in the DOM when it gets re-attached.\n   */\n  private _previousHostParent!: HTMLElement;\n\n  /** Stream of keydown events dispatched to this overlay. */\n  readonly _keydownEvents = new Subject<KeyboardEvent>();\n\n  /** Stream of mouse outside events dispatched to this overlay. */\n  readonly _outsidePointerEvents = new Subject<MouseEvent>();\n\n  /** Reference to the currently-running `afterNextRender` call. */\n  private _afterNextRenderRef: AfterRenderRef | undefined;\n\n  constructor(\n    private _portalOutlet: PortalOutlet,\n    private _host: HTMLElement,\n    private _pane: HTMLElement,\n    private _config: ImmutableObject<OverlayConfig>,\n    private _ngZone: NgZone,\n    private _keyboardDispatcher: OverlayKeyboardDispatcher,\n    private _document: Document,\n    private _location: Location,\n    private _outsideClickDispatcher: OverlayOutsideClickDispatcher,\n    private _animationsDisabled = false,\n    private _injector: EnvironmentInjector,\n    private _renderer: Renderer2,\n  ) {\n    if (_config.scrollStrategy) {\n      this._scrollStrategy = _config.scrollStrategy;\n      this._scrollStrategy.attach(this);\n    }\n\n    this._positionStrategy = _config.positionStrategy;\n  }\n\n  /** The overlay's HTML element */\n  get overlayElement(): HTMLElement {\n    return this._pane;\n  }\n\n  /** The overlay's backdrop HTML element. */\n  get backdropElement(): HTMLElement | null {\n    return this._backdropRef?.element || null;\n  }\n\n  /**\n   * Wrapper around the panel element. Can be used for advanced\n   * positioning where a wrapper with specific styling is\n   * required around the overlay pane.\n   */\n  get hostElement(): HTMLElement {\n    return this._host;\n  }\n\n  /**\n   * Function that determines if this overlay should receive a specific event.\n   */\n  get eventPredicate(): ((event: Event) => boolean) | null {\n    // Note: the safe read here is redundant, but some internal tests mock out the overlay ref.\n    return this._config?.eventPredicate || null;\n  }\n\n  attach<T>(portal: ComponentPortal<T>): ComponentRef<T>;\n  attach<T>(portal: TemplatePortal<T>): EmbeddedViewRef<T>;\n  attach(portal: any): any;\n\n  /**\n   * Attaches content, given via a Portal, to the overlay.\n   * If the overlay is configured to have a backdrop, it will be created.\n   *\n   * @param portal Portal instance to which to attach the overlay.\n   * @returns The portal attachment result.\n   */\n  attach(portal: Portal<any>): any {\n    if (this._disposed) {\n      return null;\n    }\n\n    // Insert the host into the DOM before attaching the portal, otherwise\n    // the animations module will skip animations on repeat attachments.\n    this._attachHost();\n\n    const attachResult = this._portalOutlet.attach(portal);\n    this._positionStrategy?.attach(this);\n    this._updateStackingOrder();\n    this._updateElementSize();\n    this._updateElementDirection();\n\n    if (this._scrollStrategy) {\n      this._scrollStrategy.enable();\n    }\n\n    // We need to clean this up ourselves, because we're passing in an\n    // `EnvironmentInjector` below which won't ever be destroyed.\n    // Otherwise it causes some callbacks to be retained (see #29696).\n    this._afterNextRenderRef?.destroy();\n\n    // Update the position once the overlay is fully rendered before attempting to position it,\n    // as the position may depend on the size of the rendered content.\n    this._afterNextRenderRef = afterNextRender(\n      () => {\n        // The overlay could've been detached before the callback executed.\n        if (this.hasAttached()) {\n          this.updatePosition();\n        }\n      },\n      {injector: this._injector},\n    );\n\n    // Enable pointer events for the overlay pane element.\n    this._togglePointerEvents(true);\n\n    if (this._config.hasBackdrop) {\n      this._attachBackdrop();\n    }\n\n    if (this._config.panelClass) {\n      this._toggleClasses(this._pane, this._config.panelClass, true);\n    }\n\n    // Only emit the `attachments` event once all other setup is done.\n    this._attachments.next();\n    this._completeDetachContent();\n\n    // Track this overlay by the keyboard dispatcher\n    this._keyboardDispatcher.add(this);\n\n    if (this._config.disposeOnNavigation) {\n      this._locationChanges = this._location.subscribe(() => this.dispose());\n    }\n\n    this._outsideClickDispatcher.add(this);\n\n    // TODO(crisbeto): the null check is here, because the portal outlet returns `any`.\n    // We should be guaranteed for the result to be `ComponentRef | EmbeddedViewRef`, but\n    // `instanceof EmbeddedViewRef` doesn't appear to work at the moment.\n    if (typeof attachResult?.onDestroy === 'function') {\n      // In most cases we control the portal and we know when it is being detached so that\n      // we can finish the disposal process. The exception is if the user passes in a custom\n      // `ViewContainerRef` that isn't destroyed through the overlay API. Note that we use\n      // `detach` here instead of `dispose`, because we don't know if the user intends to\n      // reattach the overlay at a later point. It also has the advantage of waiting for animations.\n      attachResult.onDestroy(() => {\n        if (this.hasAttached()) {\n          // We have to delay the `detach` call, because detaching immediately prevents\n          // other destroy hooks from running. This is likely a framework bug similar to\n          // https://github.com/angular/angular/issues/46119\n          this._ngZone.runOutsideAngular(() => Promise.resolve().then(() => this.detach()));\n        }\n      });\n    }\n\n    return attachResult;\n  }\n\n  /**\n   * Detaches an overlay from a portal.\n   * @returns The portal detachment result.\n   */\n  detach(): any {\n    if (!this.hasAttached()) {\n      return;\n    }\n\n    this.detachBackdrop();\n\n    // When the overlay is detached, the pane element should disable pointer events.\n    // This is necessary because otherwise the pane element will cover the page and disable\n    // pointer events therefore. Depends on the position strategy and the applied pane boundaries.\n    this._togglePointerEvents(false);\n\n    if (this._positionStrategy && this._positionStrategy.detach) {\n      this._positionStrategy.detach();\n    }\n\n    if (this._scrollStrategy) {\n      this._scrollStrategy.disable();\n    }\n\n    const detachmentResult = this._portalOutlet.detach();\n\n    // Only emit after everything is detached.\n    this._detachments.next();\n    this._completeDetachContent();\n\n    // Remove this overlay from keyboard dispatcher tracking.\n    this._keyboardDispatcher.remove(this);\n\n    // Keeping the host element in the DOM can cause scroll jank, because it still gets\n    // rendered, even though it's transparent and unclickable which is why we remove it.\n    this._detachContentWhenEmpty();\n    this._locationChanges.unsubscribe();\n    this._outsideClickDispatcher.remove(this);\n    return detachmentResult;\n  }\n\n  /** Cleans up the overlay from the DOM. */\n  dispose(): void {\n    if (this._disposed) {\n      return;\n    }\n\n    const isAttached = this.hasAttached();\n\n    if (this._positionStrategy) {\n      this._positionStrategy.dispose();\n    }\n\n    this._disposeScrollStrategy();\n    this._backdropRef?.dispose();\n    this._locationChanges.unsubscribe();\n    this._keyboardDispatcher.remove(this);\n    this._portalOutlet.dispose();\n    this._attachments.complete();\n    this._backdropClick.complete();\n    this._keydownEvents.complete();\n    this._outsidePointerEvents.complete();\n    this._outsideClickDispatcher.remove(this);\n    this._host?.remove();\n    this._afterNextRenderRef?.destroy();\n    this._previousHostParent = this._pane = this._host = this._backdropRef = null!;\n\n    if (isAttached) {\n      this._detachments.next();\n    }\n\n    this._detachments.complete();\n    this._completeDetachContent();\n    this._disposed = true;\n  }\n\n  /** Whether the overlay has attached content. */\n  hasAttached(): boolean {\n    return this._portalOutlet.hasAttached();\n  }\n\n  /** Gets an observable that emits when the backdrop has been clicked. */\n  backdropClick(): Observable<MouseEvent> {\n    return this._backdropClick;\n  }\n\n  /** Gets an observable that emits when the overlay has been attached. */\n  attachments(): Observable<void> {\n    return this._attachments;\n  }\n\n  /** Gets an observable that emits when the overlay has been detached. */\n  detachments(): Observable<void> {\n    return this._detachments;\n  }\n\n  /** Gets an observable of keydown events targeted to this overlay. */\n  keydownEvents(): Observable<KeyboardEvent> {\n    return this._keydownEvents;\n  }\n\n  /** Gets an observable of pointer events targeted outside this overlay. */\n  outsidePointerEvents(): Observable<MouseEvent> {\n    return this._outsidePointerEvents;\n  }\n\n  /** Gets the current overlay configuration, which is immutable. */\n  getConfig(): OverlayConfig {\n    return this._config;\n  }\n\n  /** Updates the position of the overlay based on the position strategy. */\n  updatePosition(): void {\n    if (this._positionStrategy) {\n      this._positionStrategy.apply();\n    }\n  }\n\n  /** Switches to a new position strategy and updates the overlay position. */\n  updatePositionStrategy(strategy: PositionStrategy): void {\n    if (strategy === this._positionStrategy) {\n      return;\n    }\n\n    if (this._positionStrategy) {\n      this._positionStrategy.dispose();\n    }\n\n    this._positionStrategy = strategy;\n\n    if (this.hasAttached()) {\n      strategy.attach(this);\n      this.updatePosition();\n    }\n  }\n\n  /** Update the size properties of the overlay. */\n  updateSize(sizeConfig: OverlaySizeConfig): void {\n    this._config = {...this._config, ...sizeConfig};\n    this._updateElementSize();\n  }\n\n  /** Sets the LTR/RTL direction for the overlay. */\n  setDirection(dir: Direction | Directionality): void {\n    this._config = {...this._config, direction: dir};\n    this._updateElementDirection();\n  }\n\n  /** Add a CSS class or an array of classes to the overlay pane. */\n  addPanelClass(classes: string | string[]): void {\n    if (this._pane) {\n      this._toggleClasses(this._pane, classes, true);\n    }\n  }\n\n  /** Remove a CSS class or an array of classes from the overlay pane. */\n  removePanelClass(classes: string | string[]): void {\n    if (this._pane) {\n      this._toggleClasses(this._pane, classes, false);\n    }\n  }\n\n  /**\n   * Returns the layout direction of the overlay panel.\n   */\n  getDirection(): Direction {\n    const direction = this._config.direction;\n\n    if (!direction) {\n      return 'ltr';\n    }\n\n    return typeof direction === 'string' ? direction : direction.value;\n  }\n\n  /** Switches to a new scroll strategy. */\n  updateScrollStrategy(strategy: ScrollStrategy): void {\n    if (strategy === this._scrollStrategy) {\n      return;\n    }\n\n    this._disposeScrollStrategy();\n    this._scrollStrategy = strategy;\n\n    if (this.hasAttached()) {\n      strategy.attach(this);\n      strategy.enable();\n    }\n  }\n\n  /** Updates the text direction of the overlay panel. */\n  private _updateElementDirection() {\n    this._host.setAttribute('dir', this.getDirection());\n  }\n\n  /** Updates the size of the overlay element based on the overlay config. */\n  private _updateElementSize() {\n    if (!this._pane) {\n      return;\n    }\n\n    const style = this._pane.style;\n\n    style.width = coerceCssPixelValue(this._config.width);\n    style.height = coerceCssPixelValue(this._config.height);\n    style.minWidth = coerceCssPixelValue(this._config.minWidth);\n    style.minHeight = coerceCssPixelValue(this._config.minHeight);\n    style.maxWidth = coerceCssPixelValue(this._config.maxWidth);\n    style.maxHeight = coerceCssPixelValue(this._config.maxHeight);\n  }\n\n  /** Toggles the pointer events for the overlay pane element. */\n  private _togglePointerEvents(enablePointer: boolean) {\n    this._pane.style.pointerEvents = enablePointer ? '' : 'none';\n  }\n\n  private _attachHost() {\n    if (!this._host.parentElement) {\n      const customInsertionPoint = this._config.usePopover\n        ? this._positionStrategy?.getPopoverInsertionPoint?.()\n        : null;\n\n      if (isElement(customInsertionPoint)) {\n        customInsertionPoint.after(this._host);\n      } else if (customInsertionPoint?.type === 'parent') {\n        customInsertionPoint.element.appendChild(this._host);\n      } else {\n        this._previousHostParent?.appendChild(this._host);\n      }\n    }\n\n    if (this._config.usePopover) {\n      // We need the try/catch because the browser will throw if the\n      // host or any of the parents are outside the DOM. Also note\n      // the string access which is there for compatibility with Closure.\n      try {\n        this._host['showPopover']();\n      } catch {}\n    }\n  }\n\n  /** Attaches a backdrop for this overlay. */\n  private _attachBackdrop() {\n    const showingClass = 'cdk-overlay-backdrop-showing';\n\n    this._backdropRef?.dispose();\n    this._backdropRef = new BackdropRef(this._document, this._renderer, this._ngZone, event => {\n      this._backdropClick.next(event);\n    });\n\n    if (this._animationsDisabled) {\n      this._backdropRef.element.classList.add('cdk-overlay-backdrop-noop-animation');\n    }\n\n    if (this._config.backdropClass) {\n      this._toggleClasses(this._backdropRef.element, this._config.backdropClass, true);\n    }\n\n    if (this._config.usePopover) {\n      // When using popovers, the backdrop needs to be inside the popover.\n      this._host.prepend(this._backdropRef.element);\n    } else {\n      // Insert the backdrop before the pane in the DOM order,\n      // in order to handle stacked overlays properly.\n      this._host.parentElement!.insertBefore(this._backdropRef.element, this._host);\n    }\n\n    // Add class to fade-in the backdrop after one frame.\n    if (!this._animationsDisabled && typeof requestAnimationFrame !== 'undefined') {\n      this._ngZone.runOutsideAngular(() => {\n        requestAnimationFrame(() => this._backdropRef?.element.classList.add(showingClass));\n      });\n    } else {\n      this._backdropRef.element.classList.add(showingClass);\n    }\n  }\n\n  /**\n   * Updates the stacking order of the element, moving it to the top if necessary.\n   * This is required in cases where one overlay was detached, while another one,\n   * that should be behind it, was destroyed. The next time both of them are opened,\n   * the stacking will be wrong, because the detached element's pane will still be\n   * in its original DOM position.\n   */\n  private _updateStackingOrder() {\n    if (!this._config.usePopover && this._host.nextSibling) {\n      this._host.parentNode!.appendChild(this._host);\n    }\n  }\n\n  /** Detaches the backdrop (if any) associated with the overlay. */\n  detachBackdrop(): void {\n    if (this._animationsDisabled) {\n      this._backdropRef?.dispose();\n      this._backdropRef = null;\n    } else {\n      this._backdropRef?.detach();\n    }\n  }\n\n  /** Toggles a single CSS class or an array of classes on an element. */\n  private _toggleClasses(element: HTMLElement, cssClasses: string | string[], isAdd: boolean) {\n    const classes = coerceArray(cssClasses || []).filter(c => !!c);\n\n    if (classes.length) {\n      isAdd ? element.classList.add(...classes) : element.classList.remove(...classes);\n    }\n  }\n\n  /** Detaches the overlay once the content finishes animating and is removed from the DOM. */\n  private _detachContentWhenEmpty() {\n    let rethrow = false;\n    // Attempt to detach on the next render.\n    try {\n      this._detachContentAfterRenderRef = afterNextRender(\n        () => {\n          // Rethrow if we encounter an actual error detaching.\n          rethrow = true;\n          this._detachContent();\n        },\n        {\n          injector: this._injector,\n        },\n      );\n    } catch (e) {\n      if (rethrow) {\n        throw e;\n      }\n      // afterNextRender throws if the EnvironmentInjector is has already been destroyed.\n      // This may happen in tests that don't properly flush all async work.\n      // In order to avoid breaking those tests, we just detach immediately in this case.\n      this._detachContent();\n    }\n    // Otherwise wait until the content finishes animating out and detach.\n    if (globalThis.MutationObserver && this._pane) {\n      this._detachContentMutationObserver ||= new globalThis.MutationObserver(() => {\n        this._detachContent();\n      });\n      this._detachContentMutationObserver.observe(this._pane, {childList: true});\n    }\n  }\n\n  private _detachContent() {\n    // Needs a couple of checks for the pane and host, because\n    // they may have been removed by the time the zone stabilizes.\n    if (!this._pane || !this._host || this._pane.children.length === 0) {\n      if (this._pane && this._config.panelClass) {\n        this._toggleClasses(this._pane, this._config.panelClass, false);\n      }\n\n      if (this._host && this._host.parentElement) {\n        this._previousHostParent = this._host.parentElement;\n        this._host.remove();\n      }\n\n      this._completeDetachContent();\n    }\n  }\n\n  private _completeDetachContent() {\n    this._detachContentAfterRenderRef?.destroy();\n    this._detachContentAfterRenderRef = undefined;\n    this._detachContentMutationObserver?.disconnect();\n  }\n\n  /** Disposes of a scroll strategy. */\n  private _disposeScrollStrategy() {\n    const scrollStrategy = this._scrollStrategy;\n    scrollStrategy?.disable();\n    scrollStrategy?.detach?.();\n  }\n}\n\n/** Size properties for an overlay. */\nexport interface OverlaySizeConfig {\n  width?: number | string;\n  height?: number | string;\n  minWidth?: number | string;\n  minHeight?: number | string;\n  maxWidth?: number | string;\n  maxHeight?: number | string;\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 {PositionStrategy} from './position-strategy';\nimport {DOCUMENT, ElementRef, Injector} from '@angular/core';\nimport {ViewportRuler, CdkScrollable, ViewportScrollPosition} from '../../scrolling';\nimport {\n  ConnectedOverlayPositionChange,\n  ConnectionPositionPair,\n  ScrollingVisibility,\n  validateHorizontalPosition,\n  validateVerticalPosition,\n  ViewportMargin,\n} from './connected-position';\nimport {Observable, Subscription, Subject} from 'rxjs';\nimport {isElementScrolledOutsideView, isElementClippedByScrolling} from './scroll-clip';\nimport {coerceCssPixelValue, coerceArray} from '../../coercion';\nimport {Platform} from '../../platform';\nimport {OverlayContainer} from '../overlay-container';\nimport {isElement, OverlayRef} from '../overlay-ref';\n\n// TODO: refactor clipping detection into a separate thing (part of scrolling module)\n// TODO: doesn't handle both flexible width and height when it has to scroll along both axis.\n\n/** Class to be added to the overlay bounding box. */\nconst boundingBoxClass = 'cdk-overlay-connected-position-bounding-box';\n\n/** Regex used to split a string on its CSS units. */\nconst cssUnitPattern = /([A-Za-z%]+)$/;\n\n/** Possible values that can be set as the origin of a FlexibleConnectedPositionStrategy. */\nexport type FlexibleConnectedPositionStrategyOrigin =\n  | ElementRef\n  | Element\n  | (Point & {\n      width?: number;\n      height?: number;\n    });\n\n/** Equivalent of `DOMRect` without some of the properties we don't care about. */\ntype Dimensions = Omit<DOMRect, 'x' | 'y' | 'toJSON'>;\n\n/**\n * Creates a flexible position strategy.\n * @param injector Injector used to resolve dependnecies for the position strategy.\n * @param origin Origin relative to which to position the overlay.\n */\nexport function createFlexibleConnectedPositionStrategy(\n  injector: Injector,\n  origin: FlexibleConnectedPositionStrategyOrigin,\n): FlexibleConnectedPositionStrategy {\n  return new FlexibleConnectedPositionStrategy(\n    origin,\n    injector.get(ViewportRuler),\n    injector.get(DOCUMENT),\n    injector.get(Platform),\n    injector.get(OverlayContainer),\n  );\n}\n\n/** Supported locations in the DOM for connected overlays. */\nexport type FlexibleOverlayPopoverLocation =\n  | 'global'\n  | 'inline'\n  | {type: 'parent'; element: Element};\n\n/**\n * A strategy for positioning overlays. Using this strategy, an overlay is given an\n * implicit position relative some origin element. The relative position is defined in terms of\n * a point on the origin element that is connected to a point on the overlay element. For example,\n * a basic dropdown is connecting the bottom-left corner of the origin to the top-left corner\n * of the overlay.\n */\nexport class FlexibleConnectedPositionStrategy implements PositionStrategy {\n  /** The overlay to which this strategy is attached. */\n  private _overlayRef!: OverlayRef;\n\n  /** Whether we're performing the very first positioning of the overlay. */\n  private _isInitialRender = false;\n\n  /** Last size used for the bounding box. Used to avoid resizing the overlay after open. */\n  private _lastBoundingBoxSize = {width: 0, height: 0};\n\n  /** Whether the overlay was pushed in a previous positioning. */\n  private _isPushed = false;\n\n  /** Whether the overlay can be pushed on-screen on the initial open. */\n  private _canPush = true;\n\n  /** Whether the overlay can grow via flexible width/height after the initial open. */\n  private _growAfterOpen = false;\n\n  /** Whether the overlay's width and height can be constrained to fit within the viewport. */\n  private _hasFlexibleDimensions = true;\n\n  /** Whether the overlay position is locked. */\n  private _positionLocked = false;\n\n  /** Cached origin dimensions */\n  private _originRect!: Dimensions;\n\n  /** Cached overlay dimensions */\n  private _overlayRect!: Dimensions;\n\n  /** Cached viewport dimensions */\n  private _viewportRect!: Dimensions;\n\n  /** Cached container dimensions */\n  private _containerRect!: Dimensions;\n\n  /** Amount of space that must be maintained between the overlay and the right edge of the viewport. */\n  private _viewportMargin: ViewportMargin = 0;\n\n  /** The Scrollable containers used to check scrollable view properties on position change. */\n  private _scrollables: CdkScrollable[] = [];\n\n  /** Ordered list of preferred positions, from most to least desirable. */\n  _preferredPositions: ConnectionPositionPair[] = [];\n\n  /** The origin element against which the overlay will be positioned. */\n  _origin!: FlexibleConnectedPositionStrategyOrigin;\n\n  /** The overlay pane element. */\n  private _pane!: HTMLElement;\n\n  /** Whether the strategy has been disposed of already. */\n  private _isDisposed = false;\n\n  /**\n   * Parent element for the overlay panel used to constrain the overlay panel's size to fit\n   * within the viewport.\n   */\n  private _boundingBox: HTMLElement | null = null;\n\n  /** The last position to have been calculated as the best fit position. */\n  private _lastPosition: ConnectedPosition | null = null;\n\n  /** The last calculated scroll visibility. Only tracked  */\n  private _lastScrollVisibility: ScrollingVisibility | null = null;\n\n  /** Subject that emits whenever the position changes. */\n  private readonly _positionChanges = new Subject<ConnectedOverlayPositionChange>();\n\n  /** Subscription to viewport size changes. */\n  private _resizeSubscription = Subscription.EMPTY;\n\n  /** Default offset for the overlay along the x axis. */\n  private _offsetX = 0;\n\n  /** Default offset for the overlay along the y axis. */\n  private _offsetY = 0;\n\n  /** Selector to be used when finding the elements on which to set the transform origin. */\n  private _transformOriginSelector!: string;\n\n  /** Keeps track of the CSS classes that the position strategy has applied on the overlay panel. */\n  private _appliedPanelClasses: string[] = [];\n\n  /** Amount by which the overlay was pushed in each axis during the last time it was positioned. */\n  private _previousPushAmount: {x: number; y: number} | null = null;\n\n  /** Configures where in the DOM to insert the overlay when popovers are enabled. */\n  private _popoverLocation: FlexibleOverlayPopoverLocation = 'global';\n\n  /** Observable sequence of position changes. */\n  positionChanges: Observable<ConnectedOverlayPositionChange> = this._positionChanges;\n\n  /** Ordered list of preferred positions, from most to least desirable. */\n  get positions(): ConnectionPositionPair[] {\n    return this._preferredPositions;\n  }\n\n  constructor(\n    connectedTo: FlexibleConnectedPositionStrategyOrigin,\n    private _viewportRuler: ViewportRuler,\n    private _document: Document,\n    private _platform: Platform,\n    private _overlayContainer: OverlayContainer,\n  ) {\n    this.setOrigin(connectedTo);\n  }\n\n  /** Attaches this position strategy to an overlay. */\n  attach(overlayRef: OverlayRef): void {\n    if (\n      this._overlayRef &&\n      overlayRef !== this._overlayRef &&\n      (typeof ngDevMode === 'undefined' || ngDevMode)\n    ) {\n      throw Error('This position strategy is already attached to an overlay');\n    }\n\n    this._validatePositions();\n\n    overlayRef.hostElement.classList.add(boundingBoxClass);\n\n    this._overlayRef = overlayRef;\n    this._boundingBox = overlayRef.hostElement;\n    this._pane = overlayRef.overlayElement;\n    this._isDisposed = false;\n    this._isInitialRender = true;\n    this._lastPosition = null;\n    this._resizeSubscription.unsubscribe();\n    this._resizeSubscription = this._viewportRuler.change().subscribe(() => {\n      // When the window is resized, we want to trigger the next reposition as if it\n      // was an initial render, in order for the strategy to pick a new optimal position,\n      // otherwise position locking will cause it to stay at the old one.\n      this._isInitialRender = true;\n      this.apply();\n    });\n  }\n\n  /**\n   * Updates the position of the overlay element, using whichever preferred position relative\n   * to the origin best fits on-screen.\n   *\n   * The selection of a position goes as follows:\n   *  - If any positions fit completely within the viewport as-is,\n   *      choose the first position that does so.\n   *  - If flexible dimensions are enabled and at least one satisfies the given minimum width/height,\n   *      choose the position with the greatest available size modified by the positions' weight.\n   *  - If pushing is enabled, take the position that went off-screen the least and push it\n   *      on-screen.\n   *  - If none of the previous criteria were met, use the position that goes off-screen the least.\n   * @docs-private\n   */\n  apply(): void {\n    // We shouldn't do anything if the strategy was disposed or we're on the server.\n    if (this._isDisposed || !this._platform.isBrowser) {\n      return;\n    }\n\n    // If the position has been applied already (e.g. when the overlay was opened) and the\n    // consumer opted into locking in the position, re-use the old position, in order to\n    // prevent the overlay from jumping around.\n    if (!this._isInitialRender && this._positionLocked && this._lastPosition) {\n      this.reapplyLastPosition();\n      return;\n    }\n\n    this._clearPanelClasses();\n    this._resetOverlayElementStyles();\n    this._resetBoundingBoxStyles();\n\n    // We need the bounding rects for the origin, the overlay and the container to determine how to position\n    // the overlay relative to the origin.\n    // We use the viewport rect to determine whether a position would go off-screen.\n    this._viewportRect = this._getNarrowedViewportRect();\n    this._originRect = this._getOriginRect();\n    this._overlayRect = this._pane.getBoundingClientRect();\n    this._containerRect = this._getContainerRect();\n\n    const originRect = this._originRect;\n    const overlayRect = this._overlayRect;\n    const viewportRect = this._viewportRect;\n    const containerRect = this._containerRect;\n\n    // Positions where the overlay will fit with flexible dimensions.\n    const flexibleFits: FlexibleFit[] = [];\n\n    // Fallback if none of the preferred positions fit within the viewport.\n    let fallback: FallbackPosition | undefined;\n\n    // Go through each of the preferred positions looking for a good fit.\n    // If a good fit is found, it will be applied immediately.\n    for (let pos of this._preferredPositions) {\n      // Get the exact (x, y) coordinate for the point-of-origin on the origin element.\n      let originPoint = this._getOriginPoint(originRect, containerRect, pos);\n\n      // From that point-of-origin, get the exact (x, y) coordinate for the top-left corner of the\n      // overlay in this position. We use the top-left corner for calculations and later translate\n      // this into an appropriate (top, left, bottom, right) style.\n      let overlayPoint = this._getOverlayPoint(originPoint, overlayRect, pos);\n\n      // Calculate how well the overlay would fit into the viewport with this point.\n      let overlayFit = this._getOverlayFit(overlayPoint, overlayRect, viewportRect, pos);\n\n      // If the overlay, without any further work, fits into the viewport, use this position.\n      if (overlayFit.isCompletelyWithinViewport) {\n        this._isPushed = false;\n        this._applyPosition(pos, originPoint);\n        return;\n      }\n\n      // If the overlay has flexible dimensions, we can use this position\n      // so long as there's enough space for the minimum dimensions.\n      if (this._canFitWithFlexibleDimensions(overlayFit, overlayPoint, viewportRect)) {\n        // Save positions where the overlay will fit with flexible dimensions. We will use these\n        // if none of the positions fit *without* flexible dimensions.\n        flexibleFits.push({\n          position: pos,\n          origin: originPoint,\n          overlayRect,\n          boundingBoxRect: this._calculateBoundingBoxRect(originPoint, pos),\n        });\n\n        continue;\n      }\n\n      // If the current preferred position does not fit on the screen, remember the position\n      // if it has more visible area on-screen than we've seen and move onto the next preferred\n      // position.\n      if (!fallback || fallback.overlayFit.visibleArea < overlayFit.visibleArea) {\n        fallback = {overlayFit, overlayPoint, originPoint, position: pos, overlayRect};\n      }\n    }\n\n    // If there are any positions where the overlay would fit with flexible dimensions, choose the\n    // one that has the greatest area available modified by the position's weight\n    if (flexibleFits.length) {\n      let bestFit: FlexibleFit | null = null;\n      let bestScore = -1;\n      for (const fit of flexibleFits) {\n        const score =\n          fit.boundingBoxRect.width * fit.boundingBoxRect.height * (fit.position.weight || 1);\n        if (score > bestScore) {\n          bestScore = score;\n          bestFit = fit;\n        }\n      }\n\n      this._isPushed = false;\n      this._applyPosition(bestFit!.position, bestFit!.origin);\n      return;\n    }\n\n    // When none of the preferred positions fit within the viewport, take the position\n    // that went off-screen the least and attempt to push it on-screen.\n    if (this._canPush) {\n      // TODO(jelbourn): after pushing, the opening \"direction\" of the overlay might not make sense.\n      this._isPushed = true;\n      this._applyPosition(fallback!.position, fallback!.originPoint);\n      return;\n    }\n\n    // All options for getting the overlay within the viewport have been exhausted, so go with the\n    // position that went off-screen the least.\n    this._applyPosition(fallback!.position, fallback!.originPoint);\n  }\n\n  detach(): void {\n    this._clearPanelClasses();\n    this._lastPosition = null;\n    this._previousPushAmount = null;\n    this._resizeSubscription.unsubscribe();\n  }\n\n  /** Cleanup after the element gets destroyed. */\n  dispose(): void {\n    if (this._isDisposed) {\n      return;\n    }\n\n    // We can't use `_resetBoundingBoxStyles` here, because it resets\n    // some properties to zero, rather than removing them.\n    if (this._boundingBox) {\n      extendStyles(this._boundingBox.style, {\n        top: '',\n        left: '',\n        right: '',\n        bottom: '',\n        height: '',\n        width: '',\n        alignItems: '',\n        justifyContent: '',\n      } as CSSStyleDeclaration);\n    }\n\n    if (this._pane) {\n      this._resetOverlayElementStyles();\n    }\n\n    if (this._overlayRef) {\n      this._overlayRef.hostElement.classList.remove(boundingBoxClass);\n    }\n\n    this.detach();\n    this._positionChanges.complete();\n    this._overlayRef = this._boundingBox = null!;\n    this._isDisposed = true;\n  }\n\n  /**\n   * This re-aligns the overlay element with the trigger in its last calculated position,\n   * even if a position higher in the \"preferred positions\" list would now fit. This\n   * allows one to re-align the panel without changing the orientation of the panel.\n   */\n  reapplyLastPosition(): void {\n    if (this._isDisposed || !this._platform.isBrowser) {\n      return;\n    }\n\n    const lastPosition = this._lastPosition;\n\n    if (lastPosition) {\n      this._originRect = this._getOriginRect();\n      this._overlayRect = this._pane.getBoundingClientRect();\n      this._viewportRect = this._getNarrowedViewportRect();\n      this._containerRect = this._getContainerRect();\n      this._applyPosition(\n        lastPosition,\n        this._getOriginPoint(this._originRect, this._containerRect, lastPosition),\n      );\n    } else {\n      this.apply();\n    }\n  }\n\n  /**\n   * Sets the list of Scrollable containers that host the origin element so that\n   * on reposition we can evaluate if it or the overlay has been clipped or outside view. Every\n   * Scrollable must be an ancestor element of the strategy's origin element.\n   */\n  withScrollableContainers(scrollables: CdkScrollable[]): this {\n    this._scrollables = scrollables;\n    return this;\n  }\n\n  /**\n   * Adds new preferred positions.\n   * @param positions List of positions options for this overlay.\n   */\n  withPositions(positions: ConnectedPosition[]): this {\n    this._preferredPositions = positions;\n\n    // If the last calculated position object isn't part of the positions anymore, clear\n    // it in order to avoid it being picked up if the consumer tries to re-apply.\n    if (positions.indexOf(this._lastPosition!) === -1) {\n      this._lastPosition = null;\n    }\n\n    this._validatePositions();\n\n    return this;\n  }\n\n  /**\n   * Sets a minimum distance the overlay may be positioned from the bottom edge of the viewport.\n   * @param margin Required margin between the overlay and the viewport.\n   * It can be a number to be applied to all directions, or an object to supply different values for each direction.\n   */\n  withViewportMargin(margin: ViewportMargin): this {\n    this._viewportMargin = margin;\n    return this;\n  }\n\n  /** Sets whether the overlay's width and height can be constrained to fit within the viewport. */\n  withFlexibleDimensions(flexibleDimensions = true): this {\n    this._hasFlexibleDimensions = flexibleDimensions;\n    return this;\n  }\n\n  /** Sets whether the overlay can grow after the initial open via flexible width/height. */\n  withGrowAfterOpen(growAfterOpen = true): this {\n    this._growAfterOpen = growAfterOpen;\n    return this;\n  }\n\n  /** Sets whether the overlay can be pushed on-screen if none of the provided positions fit. */\n  withPush(canPush = true): this {\n    this._canPush = canPush;\n    return this;\n  }\n\n  /**\n   * Sets whether the overlay's position should be locked in after it is positioned\n   * initially. When an overlay is locked in, it won't attempt to reposition itself\n   * when the position is re-applied (e.g. when the user scrolls away).\n   * @param isLocked Whether the overlay should locked in.\n   */\n  withLockedPosition(isLocked = true): this {\n    this._positionLocked = isLocked;\n    return this;\n  }\n\n  /**\n   * Sets the origin, relative to which to position the overlay.\n   * Using an element origin is useful for building components that need to be positioned\n   * relatively to a trigger (e.g. dropdown menus or tooltips), whereas using a point can be\n   * used for cases like contextual menus which open relative to the user's pointer.\n   * @param origin Reference to the new origin.\n   */\n  setOrigin(origin: FlexibleConnectedPositionStrategyOrigin): this {\n    this._origin = origin;\n    return this;\n  }\n\n  /**\n   * Sets the default offset for the overlay's connection point on the x-axis.\n   * @param offset New offset in the X axis.\n   */\n  withDefaultOffsetX(offset: number): this {\n    this._offsetX = offset;\n    return this;\n  }\n\n  /**\n   * Sets the default offset for the overlay's connection point on the y-axis.\n   * @param offset New offset in the Y axis.\n   */\n  withDefaultOffsetY(offset: number): this {\n    this._offsetY = offset;\n    return this;\n  }\n\n  /**\n   * Configures that the position strategy should set a `transform-origin` on some elements\n   * inside the overlay, depending on the current position that is being applied. This is\n   * useful for the cases where the origin of an animation can change depending on the\n   * alignment of the overlay.\n   * @param selector CSS selector that will be used to find the target\n   *    elements onto which to set the transform origin.\n   */\n  withTransformOriginOn(selector: string): this {\n    this._transformOriginSelector = selector;\n    return this;\n  }\n\n  /**\n   * Determines where in the DOM the overlay will be rendered when popover mode is enabled.\n   * @param location Configures the location in the DOM. Supports the following values:\n   *  - `global` - The default which inserts the overlay inside the overlay container.\n   *  - `inline` - Inserts the overlay next to the trigger.\n   *  - {type: 'parent', element: element} - Inserts the overlay to a child of a custom parent\n   *  element.\n   */\n  withPopoverLocation(location: FlexibleOverlayPopoverLocation): this {\n    this._popoverLocation = location;\n    return this;\n  }\n\n  /** @docs-private */\n  getPopoverInsertionPoint(): Element | null | {type: 'parent'; element: Element} {\n    if (this._popoverLocation === 'global') {\n      return null;\n    } else if (this._popoverLocation !== 'inline') {\n      return this._popoverLocation;\n    }\n\n    if (this._origin instanceof ElementRef) {\n      return this._origin.nativeElement;\n    } else if (isElement(this._origin)) {\n      return this._origin;\n    } else {\n      return null;\n    }\n  }\n\n  /**\n   * Gets the (x, y) coordinate of a connection point on the origin based on a relative position.\n   */\n  private _getOriginPoint(\n    originRect: Dimensions,\n    containerRect: Dimensions,\n    pos: ConnectedPosition,\n  ): Point {\n    let x: number;\n    if (pos.originX == 'center') {\n      // Note: when centering we should always use the `left`\n      // offset, otherwise the position will be wrong in RTL.\n      x = originRect.left + originRect.width / 2;\n    } else {\n      const startX = this._isRtl() ? originRect.right : originRect.left;\n      const endX = this._isRtl() ? originRect.left : originRect.right;\n      x = pos.originX == 'start' ? startX : endX;\n    }\n\n    // When zooming in Safari the container rectangle contains negative values for the position\n    // and we need to re-add them to the calculated coordinates.\n    if (containerRect.left < 0) {\n      x -= containerRect.left;\n    }\n\n    let y: number;\n    if (pos.originY == 'center') {\n      y = originRect.top + originRect.height / 2;\n    } else {\n      y = pos.originY == 'top' ? originRect.top : originRect.bottom;\n    }\n\n    // Normally the containerRect's top value would be zero, however when the overlay is attached to an input\n    // (e.g. in an autocomplete), mobile browsers will shift everything in order to put the input in the middle\n    // of the screen and to make space for the virtual keyboard. We need to account for this offset,\n    // otherwise our positioning will be thrown off.\n    // Additionally, when zooming in Safari this fixes the vertical position.\n    if (containerRect.top < 0) {\n      y -= containerRect.top;\n    }\n\n    return {x, y};\n  }\n\n  /**\n   * Gets the (x, y) coordinate of the top-left corner of the overlay given a given position and\n   * origin point to which the overlay should be connected.\n   */\n  private _getOverlayPoint(\n    originPoint: Point,\n    overlayRect: Dimensions,\n    pos: ConnectedPosition,\n  ): Point {\n    // Calculate the (overlayStartX, overlayStartY), the start of the\n    // potential overlay position relative to the origin point.\n    let overlayStartX: number;\n    if (pos.overlayX == 'center') {\n      overlayStartX = -overlayRect.width / 2;\n    } else if (pos.overlayX === 'start') {\n      overlayStartX = this._isRtl() ? -overlayRect.width : 0;\n    } else {\n      overlayStartX = this._isRtl() ? 0 : -overlayRect.width;\n    }\n\n    let overlayStartY: number;\n    if (pos.overlayY == 'center') {\n      overlayStartY = -overlayRect.height / 2;\n    } else {\n      overlayStartY = pos.overlayY == 'top' ? 0 : -overlayRect.height;\n    }\n\n    // The (x, y) coordinates of the overlay.\n    return {\n      x: originPoint.x + overlayStartX,\n      y: originPoint.y + overlayStartY,\n    };\n  }\n\n  /** Gets how well an overlay at the given point will fit within the viewport. */\n  private _getOverlayFit(\n    point: Point,\n    rawOverlayRect: Dimensions,\n    viewport: Dimensions,\n    position: ConnectedPosition,\n  ): OverlayFit {\n    // Round the overlay rect when comparing against the\n    // viewport, because the viewport is always rounded.\n    const overlay = getRoundedBoundingClientRect(rawOverlayRect);\n    let {x, y} = point;\n    let offsetX = this._getOffset(position, 'x');\n    let offsetY = this._getOffset(position, 'y');\n\n    // Account for the offsets since they could push the overlay out of the viewport.\n    if (offsetX) {\n      x += offsetX;\n    }\n\n    if (offsetY) {\n      y += offsetY;\n    }\n\n    // How much the overlay would overflow at this position, on each side.\n    let leftOverflow = 0 - x;\n    let rightOverflow = x + overlay.width - viewport.width;\n    let topOverflow = 0 - y;\n    let bottomOverflow = y + overlay.height - viewport.height;\n\n    // Visible parts of the element on each axis.\n    let visibleWidth = this._subtractOverflows(overlay.width, leftOverflow, rightOverflow);\n    let visibleHeight = this._subtractOverflows(overlay.height, topOverflow, bottomOverflow);\n    let visibleArea = visibleWidth * visibleHeight;\n\n    return {\n      visibleArea,\n      isCompletelyWithinViewport: overlay.width * overlay.height === visibleArea,\n      fitsInViewportVertically: visibleHeight === overlay.height,\n      fitsInViewportHorizontally: visibleWidth == overlay.width,\n    };\n  }\n\n  /**\n   * Whether the overlay can fit within the viewport when it may resize either its width or height.\n   * @param fit How well the overlay fits in the viewport at some position.\n   * @param point The (x, y) coordinates of the overlay at some position.\n   * @param viewport The geometry of the viewport.\n   */\n  private _canFitWithFlexibleDimensions(fit: OverlayFit, point: Point, viewport: Dimensions) {\n    if (this._hasFlexibleDimensions) {\n      const availableHeight = viewport.bottom - point.y;\n      const availableWidth = viewport.right - point.x;\n      const minHeight = getPixelValue(this._overlayRef.getConfig().minHeight);\n      const minWidth = getPixelValue(this._overlayRef.getConfig().minWidth);\n\n      const verticalFit =\n        fit.fitsInViewportVertically || (minHeight != null && minHeight <= availableHeight);\n      const horizontalFit =\n        fit.fitsInViewportHorizontally || (minWidth != null && minWidth <= availableWidth);\n\n      return verticalFit && horizontalFit;\n    }\n    return false;\n  }\n\n  /**\n   * Gets the point at which the overlay can be \"pushed\" on-screen. If the overlay is larger than\n   * the viewport, the top-left corner will be pushed on-screen (with overflow occurring on the\n   * right and bottom).\n   *\n   * @param start Starting point from which the overlay is pushed.\n   * @param rawOverlayRect Dimensions of the overlay.\n   * @param scrollPosition Current viewport scroll position.\n   * @returns The point at which to position the overlay after pushing. This is effectively a new\n   *     originPoint.\n   */\n  private _pushOverlayOnScreen(\n    start: Point,\n    rawOverlayRect: Dimensions,\n    scrollPosition: ViewportScrollPosition,\n  ): Point {\n    // If the position is locked and we've pushed the overlay already, reuse the previous push\n    // amount, rather than pushing it again. If we were to continue pushing, the element would\n    // remain in the viewport, which goes against the expectations when position locking is enabled.\n    if (this._previousPushAmount && this._positionLocked) {\n      return {\n        x: start.x + this._previousPushAmount.x,\n        y: start.y + this._previousPushAmount.y,\n      };\n    }\n\n    // Round the overlay rect when comparing against the\n    // viewport, because the viewport is always rounded.\n    const overlay = getRoundedBoundingClientRect(rawOverlayRect);\n    const viewport = this._viewportRect;\n\n    // Determine how much the overlay goes outside the viewport on each\n    // side, which we'll use to decide which direction to push it.\n    const overflowRight = Math.max(start.x + overlay.width - viewport.width, 0);\n    const overflowBottom = Math.max(start.y + overlay.height - viewport.height, 0);\n    const overflowTop = Math.max(viewport.top - scrollPosition.top - start.y, 0);\n    const overflowLeft = Math.max(viewport.left - scrollPosition.left - start.x, 0);\n\n    // Amount by which to push the overlay in each axis such that it remains on-screen.\n    let pushX = 0;\n    let pushY = 0;\n\n    // If the overlay fits completely within the bounds of the viewport, push it from whichever\n    // direction is goes off-screen. Otherwise, push the top-left corner such that its in the\n    // viewport and allow for the trailing end of the overlay to go out of bounds.\n    if (overlay.width <= viewport.width) {\n      pushX = overflowLeft || -overflowRight;\n    } else {\n      pushX =\n        start.x < this._getViewportMarginStart()\n          ? viewport.left - scrollPosition.left - start.x\n          : 0;\n    }\n\n    if (overlay.height <= viewport.height) {\n      pushY = overflowTop || -overflowBottom;\n    } else {\n      pushY =\n        start.y < this._getViewportMarginTop() ? viewport.top - scrollPosition.top - start.y : 0;\n    }\n\n    this._previousPushAmount = {x: pushX, y: pushY};\n\n    return {\n      x: start.x + pushX,\n      y: start.y + pushY,\n    };\n  }\n\n  /**\n   * Applies a computed position to the overlay and emits a position change.\n   * @param position The position preference\n   * @param originPoint The point on the origin element where the overlay is connected.\n   */\n  private _applyPosition(position: ConnectedPosition, originPoint: Point) {\n    this._setTransformOrigin(position);\n    this._setOverlayElementStyles(originPoint, position);\n    this._setBoundingBoxStyles(originPoint, position);\n\n    if (position.panelClass) {\n      this._addPanelClasses(position.panelClass);\n    }\n\n    // Notify that the position has been changed along with its change properties.\n    // We only emit if we've got any subscriptions, because the scroll visibility\n    // calculations can be somewhat expensive.\n    if (this._positionChanges.observers.length) {\n      const scrollVisibility = this._getScrollVisibility();\n\n      // We're recalculating on scroll, but we only want to emit if anything\n      // changed since downstream code might be hitting the `NgZone`.\n      if (\n        position !== this._lastPosition ||\n        !this._lastScrollVisibility ||\n        !compareScrollVisibility(this._lastScrollVisibility, scrollVisibility)\n      ) {\n        const changeEvent = new ConnectedOverlayPositionChange(position, scrollVisibility);\n        this._positionChanges.next(changeEvent);\n      }\n\n      this._lastScrollVisibility = scrollVisibility;\n    }\n\n    // Save the last connected position in case the position needs to be re-calculated.\n    this._lastPosition = position;\n    this._isInitialRender = false;\n  }\n\n  /** Sets the transform origin based on the configured selector and the passed-in position.  */\n  private _setTransformOrigin(position: ConnectedPosition) {\n    if (!this._transformOriginSelector) {\n      return;\n    }\n\n    const elements: NodeListOf<HTMLElement> = this._boundingBox!.querySelectorAll(\n      this._transformOriginSelector,\n    );\n    let xOrigin: 'left' | 'right' | 'center';\n    let yOrigin: 'top' | 'bottom' | 'center' = position.overlayY;\n\n    if (position.overlayX === 'center') {\n      xOrigin = 'center';\n    } else if (this._isRtl()) {\n      xOrigin = position.overlayX === 'start' ? 'right' : 'left';\n    } else {\n      xOrigin = position.overlayX === 'start' ? 'left' : 'right';\n    }\n\n    for (let i = 0; i < elements.length; i++) {\n      elements[i].style.transformOrigin = `${xOrigin} ${yOrigin}`;\n    }\n  }\n\n  /**\n   * Gets the position and size of the overlay's sizing container.\n   *\n   * This method does no measuring and applies no styles so that we can cheaply compute the\n   * bounds for all positions and choose the best fit based on these results.\n   */\n  private _calculateBoundingBoxRect(origin: Point, position: ConnectedPosition): BoundingBoxRect {\n    const viewport = this._viewportRect;\n    const isRtl = this._isRtl();\n    let height: number, top: number, bottom: number;\n\n    if (position.overlayY === 'top') {\n      // Overlay is opening \"downward\" and thus is bound by the bottom viewport edge.\n      top = origin.y;\n      height = viewport.height - top + this._getViewportMarginBottom();\n    } else if (position.overlayY === 'bottom') {\n      // Overlay is opening \"upward\" and thus is bound by the top viewport edge. We need to add\n      // the viewport margin back in, because the viewport rect is narrowed down to remove the\n      // margin, whereas the `origin` position is calculated based on its `DOMRect`.\n      bottom =\n        viewport.height - origin.y + this._getViewportMarginTop() + this._getViewportMarginBottom();\n      height = viewport.height - bottom + this._getViewportMarginTop();\n    } else {\n      // If neither top nor bottom, it means that the overlay is vertically centered on the\n      // origin point. Note that we want the position relative to the viewport, rather than\n      // the page, which is why we don't use something like `viewport.bottom - origin.y` and\n      // `origin.y - viewport.top`.\n      const smallestDistanceToViewportEdge = Math.min(\n        viewport.bottom - origin.y + viewport.top,\n        origin.y,\n      );\n\n      const previousHeight = this._lastBoundingBoxSize.height;\n\n      height = smallestDistanceToViewportEdge * 2;\n      top = origin.y - smallestDistanceToViewportEdge;\n\n      if (height > previousHeight && !this._isInitialRender && !this._growAfterOpen) {\n        top = origin.y - previousHeight / 2;\n      }\n    }\n\n    // The overlay is opening 'right-ward' (the content flows to the right).\n    const isBoundedByRightViewportEdge =\n      (position.overlayX === 'start' && !isRtl) || (position.overlayX === 'end' && isRtl);\n\n    // The overlay is opening 'left-ward' (the content flows to the left).\n    const isBoundedByLeftViewportEdge =\n      (position.overlayX === 'end' && !isRtl) || (position.overlayX === 'start' && isRtl);\n\n    let width: number, left: number, right: number;\n\n    if (isBoundedByLeftViewportEdge) {\n      right =\n        viewport.width - origin.x + this._getViewportMarginStart() + this._getViewportMarginEnd();\n      width = origin.x - this._getViewportMarginStart();\n    } else if (isBoundedByRightViewportEdge) {\n      left = origin.x;\n      width = viewport.right - origin.x - this._getViewportMarginEnd();\n    } else {\n      // If neither start nor end, it means that the overlay is horizontally centered on the\n      // origin point. Note that we want the position relative to the viewport, rather than\n      // the page, which is why we don't use something like `viewport.right - origin.x` and\n      // `origin.x - viewport.left`.\n      const smallestDistanceToViewportEdge = Math.min(\n        viewport.right - origin.x + viewport.left,\n        origin.x,\n      );\n      const previousWidth = this._lastBoundingBoxSize.width;\n\n      width = smallestDistanceToViewportEdge * 2;\n      left = origin.x - smallestDistanceToViewportEdge;\n\n      if (width > previousWidth && !this._isInitialRender && !this._growAfterOpen) {\n        left = origin.x - previousWidth / 2;\n      }\n    }\n\n    return {top: top!, left: left!, bottom: bottom!, right: right!, width, height};\n  }\n\n  /**\n   * Sets the position and size of the overlay's sizing wrapper. The wrapper is positioned on the\n   * origin's connection point and stretches to the bounds of the viewport.\n   *\n   * @param origin The point on the origin element where the overlay is connected.\n   * @param position The position preference\n   */\n  private _setBoundingBoxStyles(origin: Point, position: ConnectedPosition): void {\n    const boundingBoxRect = this._calculateBoundingBoxRect(origin, position);\n\n    // It's weird if the overlay *grows* while scrolling, so we take the last size into account\n    // when applying a new size.\n    if (!this._isInitialRender && !this._growAfterOpen) {\n      boundingBoxRect.height = Math.min(boundingBoxRect.height, this._lastBoundingBoxSize.height);\n      boundingBoxRect.width = Math.min(boundingBoxRect.width, this._lastBoundingBoxSize.width);\n    }\n\n    const styles = {} as CSSStyleDeclaration;\n\n    if (this._hasExactPosition()) {\n      styles.top = styles.left = '0';\n      styles.bottom = styles.right = 'auto';\n      styles.maxHeight = styles.maxWidth = '';\n      styles.width = styles.height = '100%';\n    } else {\n      const maxHeight = this._overlayRef.getConfig().maxHeight;\n      const maxWidth = this._overlayRef.getConfig().maxWidth;\n\n      styles.width = coerceCssPixelValue(boundingBoxRect.width);\n      styles.height = coerceCssPixelValue(boundingBoxRect.height);\n      styles.top = coerceCssPixelValue(boundingBoxRect.top) || 'auto';\n      styles.bottom = coerceCssPixelValue(boundingBoxRect.bottom) || 'auto';\n      styles.left = coerceCssPixelValue(boundingBoxRect.left) || 'auto';\n      styles.right = coerceCssPixelValue(boundingBoxRect.right) || 'auto';\n\n      // Push the pane content towards the proper direction.\n      if (position.overlayX === 'center') {\n        styles.alignItems = 'center';\n      } else {\n        styles.alignItems = position.overlayX === 'end' ? 'flex-end' : 'flex-start';\n      }\n\n      if (position.overlayY === 'center') {\n        styles.justifyContent = 'center';\n      } else {\n        styles.justifyContent = position.overlayY === 'bottom' ? 'flex-end' : 'flex-start';\n      }\n\n      if (maxHeight) {\n        styles.maxHeight = coerceCssPixelValue(maxHeight);\n      }\n\n      if (maxWidth) {\n        styles.maxWidth = coerceCssPixelValue(maxWidth);\n      }\n    }\n\n    this._lastBoundingBoxSize = boundingBoxRect;\n\n    extendStyles(this._boundingBox!.style, styles);\n  }\n\n  /** Resets the styles for the bounding box so that a new positioning can be computed. */\n  private _resetBoundingBoxStyles() {\n    extendStyles(this._boundingBox!.style, {\n      top: '0',\n      left: '0',\n      right: '0',\n      bottom: '0',\n      height: '',\n      width: '',\n      alignItems: '',\n      justifyContent: '',\n    } as CSSStyleDeclaration);\n  }\n\n  /** Resets the styles for the overlay pane so that a new positioning can be computed. */\n  private _resetOverlayElementStyles() {\n    extendStyles(this._pane.style, {\n      top: '',\n      left: '',\n      bottom: '',\n      right: '',\n      position: '',\n      transform: '',\n    } as CSSStyleDeclaration);\n  }\n\n  /** Sets positioning styles to the overlay element. */\n  private _setOverlayElementStyles(originPoint: Point, position: ConnectedPosition): void {\n    const styles = {} as CSSStyleDeclaration;\n    const hasExactPosition = this._hasExactPosition();\n    const hasFlexibleDimensions = this._hasFlexibleDimensions;\n    const config = this._overlayRef.getConfig();\n\n    if (hasExactPosition) {\n      const scrollPosition = this._viewportRuler.getViewportScrollPosition();\n      extendStyles(styles, this._getExactOverlayY(position, originPoint, scrollPosition));\n      extendStyles(styles, this._getExactOverlayX(position, originPoint, scrollPosition));\n    } else {\n      styles.position = 'static';\n    }\n\n    // Use a transform to apply the offsets. We do this because the `center` positions rely on\n    // being in the normal flex flow and setting a `top` / `left` at all will completely throw\n    // off the position. We also can't use margins, because they won't have an effect in some\n    // cases where the element doesn't have anything to \"push off of\". Finally, this works\n    // better both with flexible and non-flexible positioning.\n    let transformString = '';\n    let offsetX = this._getOffset(position, 'x');\n    let offsetY = this._getOffset(position, 'y');\n\n    if (offsetX) {\n      transformString += `translateX(${offsetX}px) `;\n    }\n\n    if (offsetY) {\n      transformString += `translateY(${offsetY}px)`;\n    }\n\n    styles.transform = transformString.trim();\n\n    // If a maxWidth or maxHeight is specified on the overlay, we remove them. We do this because\n    // we need these values to both be set to \"100%\" for the automatic flexible sizing to work.\n    // The maxHeight and maxWidth are set on the boundingBox in order to enforce the constraint.\n    // Note that this doesn't apply when we have an exact position, in which case we do want to\n    // apply them because they'll be cleared from the bounding box.\n    if (config.maxHeight) {\n      if (hasExactPosition) {\n        styles.maxHeight = coerceCssPixelValue(config.maxHeight);\n      } else if (hasFlexibleDimensions) {\n        styles.maxHeight = '';\n      }\n    }\n\n    if (config.maxWidth) {\n      if (hasExactPosition) {\n        styles.maxWidth = coerceCssPixelValue(config.maxWidth);\n      } else if (hasFlexibleDimensions) {\n        styles.maxWidth = '';\n      }\n    }\n\n    extendStyles(this._pane.style, styles);\n  }\n\n  /** Gets the exact top/bottom for the overlay when not using flexible sizing or when pushing. */\n  private _getExactOverlayY(\n    position: ConnectedPosition,\n    originPoint: Point,\n    scrollPosition: ViewportScrollPosition,\n  ) {\n    // Reset any existing styles. This is necessary in case the\n    // preferred position has changed since the last `apply`.\n    let styles = {top: '', bottom: ''} as CSSStyleDeclaration;\n    let overlayPoint = this._getOverlayPoint(originPoint, this._overlayRect, position);\n\n    if (this._isPushed) {\n      overlayPoint = this._pushOverlayOnScreen(overlayPoint, this._overlayRect, scrollPosition);\n    }\n\n    // We want to set either `top` or `bottom` based on whether the overlay wants to appear\n    // above or below the origin and the direction in which the element will expand.\n    if (position.overlayY === 'bottom') {\n      // When using `bottom`, we adjust the y position such that it is the distance\n      // from the bottom of the viewport rather than the top.\n      const documentHeight = this._document.documentElement!.clientHeight;\n      styles.bottom = `${documentHeight - (overlayPoint.y + this._overlayRect.height)}px`;\n    } else {\n      styles.top = coerceCssPixelValue(overlayPoint.y);\n    }\n\n    return styles;\n  }\n\n  /** Gets the exact left/right for the overlay when not using flexible sizing or when pushing. */\n  private _getExactOverlayX(\n    position: ConnectedPosition,\n    originPoint: Point,\n    scrollPosition: ViewportScrollPosition,\n  ) {\n    // Reset any existing styles. This is necessary in case the preferred position has\n    // changed since the last `apply`.\n    let styles = {left: '', right: ''} as CSSStyleDeclaration;\n    let overlayPoint = this._getOverlayPoint(originPoint, this._overlayRect, position);\n\n    if (this._isPushed) {\n      overlayPoint = this._pushOverlayOnScreen(overlayPoint, this._overlayRect, scrollPosition);\n    }\n\n    // We want to set either `left` or `right` based on whether the overlay wants to appear \"before\"\n    // or \"after\" the origin, which determines the direction in which the element will expand.\n    // For the horizontal axis, the meaning of \"before\" and \"after\" change based on whether the\n    // page is in RTL or LTR.\n    let horizontalStyleProperty: 'left' | 'right';\n\n    if (this._isRtl()) {\n      horizontalStyleProperty = position.overlayX === 'end' ? 'left' : 'right';\n    } else {\n      horizontalStyleProperty = position.overlayX === 'end' ? 'right' : 'left';\n    }\n\n    // When we're setting `right`, we adjust the x position such that it is the distance\n    // from the right edge of the viewport rather than the left edge.\n    if (horizontalStyleProperty === 'right') {\n      const documentWidth = this._document.documentElement!.clientWidth;\n      styles.right = `${documentWidth - (overlayPoint.x + this._overlayRect.width)}px`;\n    } else {\n      styles.left = coerceCssPixelValue(overlayPoint.x);\n    }\n\n    return styles;\n  }\n\n  /**\n   * Gets the view properties of the trigger and overlay, including whether they are clipped\n   * or completely outside the view of any of the strategy's scrollables.\n   */\n  private _getScrollVisibility(): ScrollingVisibility {\n    // Note: needs fresh rects since the position could've changed.\n    const originBounds = this._getOriginRect();\n    const overlayBounds = this._pane.getBoundingClientRect();\n\n    // TODO(jelbourn): instead of needing all of the client rects for these scrolling containers\n    // every time, we should be able to use the scrollTop of the containers if the size of those\n    // containers hasn't changed.\n    const scrollContainerBounds = this._scrollables.map(scrollable => {\n      return scrollable.getElementRef().nativeElement.getBoundingClientRect();\n    });\n\n    return {\n      isOriginClipped: isElementClippedByScrolling(originBounds, scrollContainerBounds),\n      isOriginOutsideView: isElementScrolledOutsideView(originBounds, scrollContainerBounds),\n      isOverlayClipped: isElementClippedByScrolling(overlayBounds, scrollContainerBounds),\n      isOverlayOutsideView: isElementScrolledOutsideView(overlayBounds, scrollContainerBounds),\n    };\n  }\n\n  /** Subtracts the amount that an element is overflowing on an axis from its length. */\n  private _subtractOverflows(length: number, ...overflows: number[]): number {\n    return overflows.reduce((currentValue: number, currentOverflow: number) => {\n      return currentValue - Math.max(currentOverflow, 0);\n    }, length);\n  }\n\n  /** Narrows the given viewport rect by the current _viewportMargin. */\n  private _getNarrowedViewportRect(): Dimensions {\n    // We recalculate the viewport rect here ourselves, rather than using the ViewportRuler,\n    // because we want to use the `clientWidth` and `clientHeight` as the base. The difference\n    // being that the client properties don't include the scrollbar, as opposed to `innerWidth`\n    // and `innerHeight` that do. This is necessary, because the overlay container uses\n    // 100% `width` and `height` which don't include the scrollbar either.\n    const width = this._document.documentElement!.clientWidth;\n    const height = this._document.documentElement!.clientHeight;\n    const scrollPosition = this._viewportRuler.getViewportScrollPosition();\n\n    return {\n      top: scrollPosition.top + this._getViewportMarginTop(),\n      left: scrollPosition.left + this._getViewportMarginStart(),\n      right: scrollPosition.left + width - this._getViewportMarginEnd(),\n      bottom: scrollPosition.top + height - this._getViewportMarginBottom(),\n      width: width - this._getViewportMarginStart() - this._getViewportMarginEnd(),\n      height: height - this._getViewportMarginTop() - this._getViewportMarginBottom(),\n    };\n  }\n\n  /** Whether the we're dealing with an RTL context */\n  private _isRtl() {\n    return this._overlayRef.getDirection() === 'rtl';\n  }\n\n  /** Determines whether the overlay uses exact or flexible positioning. */\n  private _hasExactPosition() {\n    return !this._hasFlexibleDimensions || this._isPushed;\n  }\n\n  /** Retrieves the offset of a position along the x or y axis. */\n  private _getOffset(position: ConnectedPosition, axis: 'x' | 'y') {\n    if (axis === 'x') {\n      // We don't do something like `position['offset' + axis]` in\n      // order to avoid breaking minifiers that rename properties.\n      return position.offsetX == null ? this._offsetX : position.offsetX;\n    }\n\n    return position.offsetY == null ? this._offsetY : position.offsetY;\n  }\n\n  /** Validates that the current position match the expected values. */\n  private _validatePositions(): void {\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n      if (!this._preferredPositions.length) {\n        throw Error('FlexibleConnectedPositionStrategy: At least one position is required.');\n      }\n\n      // TODO(crisbeto): remove these once Angular's template type\n      // checking is advanced enough to catch these cases.\n      this._preferredPositions.forEach(pair => {\n        validateHorizontalPosition('originX', pair.originX);\n        validateVerticalPosition('originY', pair.originY);\n        validateHorizontalPosition('overlayX', pair.overlayX);\n        validateVerticalPosition('overlayY', pair.overlayY);\n      });\n    }\n  }\n\n  /** Adds a single CSS class or an array of classes on the overlay panel. */\n  private _addPanelClasses(cssClasses: string | string[]) {\n    if (this._pane) {\n      coerceArray(cssClasses).forEach(cssClass => {\n        if (cssClass !== '' && this._appliedPanelClasses.indexOf(cssClass) === -1) {\n          this._appliedPanelClasses.push(cssClass);\n          this._pane.classList.add(cssClass);\n        }\n      });\n    }\n  }\n\n  /** Clears the classes that the position strategy has applied from the overlay panel. */\n  private _clearPanelClasses() {\n    if (this._pane) {\n      this._appliedPanelClasses.forEach(cssClass => {\n        this._pane.classList.remove(cssClass);\n      });\n      this._appliedPanelClasses = [];\n    }\n  }\n\n  /**\n   * Returns either the _viewportMargin directly (if it is a number) or its 'start' value.\n   * @private\n   */\n  private _getViewportMarginStart(): number {\n    if (typeof this._viewportMargin === 'number') return this._viewportMargin;\n    return this._viewportMargin?.start ?? 0;\n  }\n\n  /**\n   * Returns either the _viewportMargin directly (if it is a number) or its 'end' value.\n   * @private\n   */\n  private _getViewportMarginEnd(): number {\n    if (typeof this._viewportMargin === 'number') return this._viewportMargin;\n    return this._viewportMargin?.end ?? 0;\n  }\n\n  /**\n   * Returns either the _viewportMargin directly (if it is a number) or its 'top' value.\n   * @private\n   */\n  private _getViewportMarginTop(): number {\n    if (typeof this._viewportMargin === 'number') return this._viewportMargin;\n    return this._viewportMargin?.top ?? 0;\n  }\n\n  /**\n   * Returns either the _viewportMargin directly (if it is a number) or its 'bottom' value.\n   * @private\n   */\n  private _getViewportMarginBottom(): number {\n    if (typeof this._viewportMargin === 'number') return this._viewportMargin;\n    return this._viewportMargin?.bottom ?? 0;\n  }\n\n  /** Returns the DOMRect of the current origin. */\n  private _getOriginRect(): Dimensions {\n    const origin = this._origin;\n\n    if (origin instanceof ElementRef) {\n      return origin.nativeElement.getBoundingClientRect();\n    }\n\n    // Check for Element so SVG elements are also supported.\n    if (origin instanceof Element) {\n      return origin.getBoundingClientRect();\n    }\n\n    const width = origin.width || 0;\n    const height = origin.height || 0;\n\n    // If the origin is a point, return a client rect as if it was a 0x0 element at the point.\n    return {\n      top: origin.y,\n      bottom: origin.y + height,\n      left: origin.x,\n      right: origin.x + width,\n      height,\n      width,\n    };\n  }\n\n  /** Gets the dimensions of the overlay container. */\n  private _getContainerRect(): Dimensions {\n    // We have some CSS that hides the overlay container when it's empty. This can happen\n    // when a popover-based overlay is open and it hasn't been inserted into the overlay\n    // container. If that's the case, make the container temporarily visible so that we\n    // can measure it. This information is used to work around some issues in Safari.\n    const isInlinePopover =\n      this._overlayRef.getConfig().usePopover && this._popoverLocation !== 'global';\n    const element = this._overlayContainer.getContainerElement();\n\n    if (isInlinePopover) {\n      element.style.display = 'block';\n    }\n\n    const dimensions = element.getBoundingClientRect();\n\n    if (isInlinePopover) {\n      element.style.display = '';\n    }\n\n    return dimensions;\n  }\n}\n\n/** A simple (x, y) coordinate. */\ninterface Point {\n  x: number;\n  y: number;\n}\n\n/** Record of measurements for how an overlay (at a given position) fits into the viewport. */\ninterface OverlayFit {\n  /** Whether the overlay fits completely in the viewport. */\n  isCompletelyWithinViewport: boolean;\n\n  /** Whether the overlay fits in the viewport on the y-axis. */\n  fitsInViewportVertically: boolean;\n\n  /** Whether the overlay fits in the viewport on the x-axis. */\n  fitsInViewportHorizontally: boolean;\n\n  /** The total visible area (in px^2) of the overlay inside the viewport. */\n  visibleArea: number;\n}\n\n/** Record of the measurements determining whether an overlay will fit in a specific position. */\ninterface FallbackPosition {\n  position: ConnectedPosition;\n  originPoint: Point;\n  overlayPoint: Point;\n  overlayFit: OverlayFit;\n  overlayRect: Dimensions;\n}\n\n/** Position and size of the overlay sizing wrapper for a specific position. */\ninterface BoundingBoxRect {\n  top: number;\n  left: number;\n  bottom: number;\n  right: number;\n  height: number;\n  width: number;\n}\n\n/** Record of measures determining how well a given position will fit with flexible dimensions. */\ninterface FlexibleFit {\n  position: ConnectedPosition;\n  origin: Point;\n  overlayRect: Dimensions;\n  boundingBoxRect: BoundingBoxRect;\n}\n\n/** A connected position as specified by the user. */\nexport interface ConnectedPosition {\n  originX: 'start' | 'center' | 'end';\n  originY: 'top' | 'center' | 'bottom';\n\n  overlayX: 'start' | 'center' | 'end';\n  overlayY: 'top' | 'center' | 'bottom';\n\n  weight?: number;\n  offsetX?: number;\n  offsetY?: number;\n  panelClass?: string | string[];\n}\n\n/** Shallow-extends a stylesheet object with another stylesheet object. */\nfunction extendStyles(\n  destination: CSSStyleDeclaration,\n  source: CSSStyleDeclaration,\n): CSSStyleDeclaration {\n  for (let key in source) {\n    if (source.hasOwnProperty(key)) {\n      destination[key] = source[key];\n    }\n  }\n\n  return destination;\n}\n\n/**\n * Extracts the pixel value as a number from a value, if it's a number\n * or a CSS pixel string (e.g. `1337px`). Otherwise returns null.\n */\nfunction getPixelValue(input: number | string | null | undefined): number | null {\n  if (typeof input !== 'number' && input != null) {\n    const [value, units] = input.split(cssUnitPattern);\n    return !units || units === 'px' ? parseFloat(value) : null;\n  }\n\n  return input || null;\n}\n\n/**\n * Gets a version of an element's bounding `DOMRect` where all the values are rounded down to\n * the nearest pixel. This allows us to account for the cases where there may be sub-pixel\n * deviations in the `DOMRect` returned by the browser (e.g. when zoomed in with a percentage\n * size, see #21350).\n */\nfunction getRoundedBoundingClientRect(clientRect: Dimensions): Dimensions {\n  return {\n    top: Math.floor(clientRect.top),\n    right: Math.floor(clientRect.right),\n    bottom: Math.floor(clientRect.bottom),\n    left: Math.floor(clientRect.left),\n    width: Math.floor(clientRect.width),\n    height: Math.floor(clientRect.height),\n  };\n}\n\n/** Returns whether two `ScrollingVisibility` objects are identical. */\nfunction compareScrollVisibility(a: ScrollingVisibility, b: ScrollingVisibility): boolean {\n  if (a === b) {\n    return true;\n  }\n\n  return (\n    a.isOriginClipped === b.isOriginClipped &&\n    a.isOriginOutsideView === b.isOriginOutsideView &&\n    a.isOverlayClipped === b.isOverlayClipped &&\n    a.isOverlayOutsideView === b.isOverlayOutsideView\n  );\n}\n\nexport const STANDARD_DROPDOWN_BELOW_POSITIONS: ConnectedPosition[] = [\n  {originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top'},\n  {originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom'},\n  {originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top'},\n  {originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom'},\n];\n\nexport const STANDARD_DROPDOWN_ADJACENT_POSITIONS: ConnectedPosition[] = [\n  {originX: 'end', originY: 'top', overlayX: 'start', overlayY: 'top'},\n  {originX: 'end', originY: 'bottom', overlayX: 'start', overlayY: 'bottom'},\n  {originX: 'start', originY: 'top', overlayX: 'end', overlayY: 'top'},\n  {originX: 'start', originY: 'bottom', overlayX: 'end', overlayY: 'bottom'},\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 {Injector} from '@angular/core';\nimport {OverlayRef} from '../overlay-ref';\nimport {PositionStrategy} from './position-strategy';\n\n/** Class to be added to the overlay pane wrapper. */\nconst wrapperClass = 'cdk-global-overlay-wrapper';\n\n/**\n * Creates a global position strategy.\n * @param injector Injector used to resolve dependencies for the strategy.\n */\nexport function createGlobalPositionStrategy(_injector: Injector): GlobalPositionStrategy {\n  return new GlobalPositionStrategy();\n}\n\n/**\n * A strategy for positioning overlays. Using this strategy, an overlay is given an\n * explicit position relative to the browser's viewport. We use flexbox, instead of\n * transforms, in order to avoid issues with subpixel rendering which can cause the\n * element to become blurry.\n */\nexport class GlobalPositionStrategy implements PositionStrategy {\n  /** The overlay to which this strategy is attached. */\n  private _overlayRef!: OverlayRef;\n  private _cssPosition = 'static';\n  private _topOffset = '';\n  private _bottomOffset = '';\n  private _alignItems = '';\n  private _xPosition = '';\n  private _xOffset = '';\n  private _width = '';\n  private _height = '';\n  private _isDisposed = false;\n\n  attach(overlayRef: OverlayRef): void {\n    const config = overlayRef.getConfig();\n\n    this._overlayRef = overlayRef;\n\n    if (this._width && !config.width) {\n      overlayRef.updateSize({width: this._width});\n    }\n\n    if (this._height && !config.height) {\n      overlayRef.updateSize({height: this._height});\n    }\n\n    overlayRef.hostElement.classList.add(wrapperClass);\n    this._isDisposed = false;\n  }\n\n  /**\n   * Sets the top position of the overlay. Clears any previously set vertical position.\n   * @param value New top offset.\n   */\n  top(value: string = ''): this {\n    this._bottomOffset = '';\n    this._topOffset = value;\n    this._alignItems = 'flex-start';\n    return this;\n  }\n\n  /**\n   * Sets the left position of the overlay. Clears any previously set horizontal position.\n   * @param value New left offset.\n   */\n  left(value: string = ''): this {\n    this._xOffset = value;\n    this._xPosition = 'left';\n    return this;\n  }\n\n  /**\n   * Sets the bottom position of the overlay. Clears any previously set vertical position.\n   * @param value New bottom offset.\n   */\n  bottom(value: string = ''): this {\n    this._topOffset = '';\n    this._bottomOffset = value;\n    this._alignItems = 'flex-end';\n    return this;\n  }\n\n  /**\n   * Sets the right position of the overlay. Clears any previously set horizontal position.\n   * @param value New right offset.\n   */\n  right(value: string = ''): this {\n    this._xOffset = value;\n    this._xPosition = 'right';\n    return this;\n  }\n\n  /**\n   * Sets the overlay to the start of the viewport, depending on the overlay direction.\n   * This will be to the left in LTR layouts and to the right in RTL.\n   * @param offset Offset from the edge of the screen.\n   */\n  start(value: string = ''): this {\n    this._xOffset = value;\n    this._xPosition = 'start';\n    return this;\n  }\n\n  /**\n   * Sets the overlay to the end of the viewport, depending on the overlay direction.\n   * This will be to the right in LTR layouts and to the left in RTL.\n   * @param offset Offset from the edge of the screen.\n   */\n  end(value: string = ''): this {\n    this._xOffset = value;\n    this._xPosition = 'end';\n    return this;\n  }\n\n  /**\n   * Sets the overlay width and clears any previously set width.\n   * @param value New width for the overlay\n   * @deprecated Pass the `width` through the `OverlayConfig`.\n   * @breaking-change 8.0.0\n   */\n  width(value: string = ''): this {\n    if (this._overlayRef) {\n      this._overlayRef.updateSize({width: value});\n    } else {\n      this._width = value;\n    }\n\n    return this;\n  }\n\n  /**\n   * Sets the overlay height and clears any previously set height.\n   * @param value New height for the overlay\n   * @deprecated Pass the `height` through the `OverlayConfig`.\n   * @breaking-change 8.0.0\n   */\n  height(value: string = ''): this {\n    if (this._overlayRef) {\n      this._overlayRef.updateSize({height: value});\n    } else {\n      this._height = value;\n    }\n\n    return this;\n  }\n\n  /**\n   * Centers the overlay horizontally with an optional offset.\n   * Clears any previously set horizontal position.\n   *\n   * @param offset Overlay offset from the horizontal center.\n   */\n  centerHorizontally(offset: string = ''): this {\n    this.left(offset);\n    this._xPosition = 'center';\n    return this;\n  }\n\n  /**\n   * Centers the overlay vertically with an optional offset.\n   * Clears any previously set vertical position.\n   *\n   * @param offset Overlay offset from the vertical center.\n   */\n  centerVertically(offset: string = ''): this {\n    this.top(offset);\n    this._alignItems = 'center';\n    return this;\n  }\n\n  /**\n   * Apply the position to the element.\n   * @docs-private\n   */\n  apply(): void {\n    // Since the overlay ref applies the strategy asynchronously, it could\n    // have been disposed before it ends up being applied. If that is the\n    // case, we shouldn't do anything.\n    if (!this._overlayRef || !this._overlayRef.hasAttached()) {\n      return;\n    }\n\n    const styles = this._overlayRef.overlayElement.style;\n    const parentStyles = this._overlayRef.hostElement.style;\n    const config = this._overlayRef.getConfig();\n    const {width, height, maxWidth, maxHeight} = config;\n    const shouldBeFlushHorizontally =\n      (width === '100%' || width === '100vw') &&\n      (!maxWidth || maxWidth === '100%' || maxWidth === '100vw');\n    const shouldBeFlushVertically =\n      (height === '100%' || height === '100vh') &&\n      (!maxHeight || maxHeight === '100%' || maxHeight === '100vh');\n    const xPosition = this._xPosition;\n    const xOffset = this._xOffset;\n    const isRtl = this._overlayRef.getConfig().direction === 'rtl';\n    let marginLeft = '';\n    let marginRight = '';\n    let justifyContent = '';\n\n    if (shouldBeFlushHorizontally) {\n      justifyContent = 'flex-start';\n    } else if (xPosition === 'center') {\n      justifyContent = 'center';\n\n      if (isRtl) {\n        marginRight = xOffset;\n      } else {\n        marginLeft = xOffset;\n      }\n    } else if (isRtl) {\n      if (xPosition === 'left' || xPosition === 'end') {\n        justifyContent = 'flex-end';\n        marginLeft = xOffset;\n      } else if (xPosition === 'right' || xPosition === 'start') {\n        justifyContent = 'flex-start';\n        marginRight = xOffset;\n      }\n    } else if (xPosition === 'left' || xPosition === 'start') {\n      justifyContent = 'flex-start';\n      marginLeft = xOffset;\n    } else if (xPosition === 'right' || xPosition === 'end') {\n      justifyContent = 'flex-end';\n      marginRight = xOffset;\n    }\n\n    styles.position = this._cssPosition;\n    styles.marginLeft = shouldBeFlushHorizontally ? '0' : marginLeft;\n    styles.marginTop = shouldBeFlushVertically ? '0' : this._topOffset;\n    styles.marginBottom = this._bottomOffset;\n    styles.marginRight = shouldBeFlushHorizontally ? '0' : marginRight;\n    parentStyles.justifyContent = justifyContent;\n    parentStyles.alignItems = shouldBeFlushVertically ? 'flex-start' : this._alignItems;\n  }\n\n  /**\n   * Cleans up the DOM changes from the position strategy.\n   * @docs-private\n   */\n  dispose(): void {\n    if (this._isDisposed || !this._overlayRef) {\n      return;\n    }\n\n    const styles = this._overlayRef.overlayElement.style;\n    const parent = this._overlayRef.hostElement;\n    const parentStyles = parent.style;\n\n    parent.classList.remove(wrapperClass);\n    parentStyles.justifyContent =\n      parentStyles.alignItems =\n      styles.marginTop =\n      styles.marginBottom =\n      styles.marginLeft =\n      styles.marginRight =\n      styles.position =\n        '';\n\n    this._overlayRef = null!;\n    this._isDisposed = true;\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 {Injectable, Injector, inject} from '@angular/core';\nimport {\n  createFlexibleConnectedPositionStrategy,\n  FlexibleConnectedPositionStrategy,\n  FlexibleConnectedPositionStrategyOrigin,\n} from './flexible-connected-position-strategy';\nimport {createGlobalPositionStrategy, GlobalPositionStrategy} from './global-position-strategy';\n\n/** Builder for overlay position strategy. */\n@Injectable({providedIn: 'root'})\nexport class OverlayPositionBuilder {\n  private _injector = inject(Injector);\n\n  constructor(...args: unknown[]);\n  constructor() {}\n\n  /**\n   * Creates a global position strategy.\n   */\n  global(): GlobalPositionStrategy {\n    return createGlobalPositionStrategy(this._injector);\n  }\n\n  /**\n   * Creates a flexible position strategy.\n   * @param origin Origin relative to which to position the overlay.\n   */\n  flexibleConnectedTo(\n    origin: FlexibleConnectedPositionStrategyOrigin,\n  ): FlexibleConnectedPositionStrategy {\n    return createFlexibleConnectedPositionStrategy(this._injector, origin);\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 {Directionality} from '../bidi';\nimport {DomPortalOutlet} from '../portal';\nimport {Location} from '@angular/common';\nimport {\n  ApplicationRef,\n  Injectable,\n  Injector,\n  NgZone,\n  ANIMATION_MODULE_TYPE,\n  EnvironmentInjector,\n  inject,\n  RendererFactory2,\n  DOCUMENT,\n  Renderer2,\n  InjectionToken,\n} from '@angular/core';\nimport {_IdGenerator} from '../a11y';\nimport {_CdkPrivateStyleLoader} from '../private';\nimport {OverlayKeyboardDispatcher} from './dispatchers/overlay-keyboard-dispatcher';\nimport {OverlayOutsideClickDispatcher} from './dispatchers/overlay-outside-click-dispatcher';\nimport {OverlayConfig} from './overlay-config';\nimport {_CdkOverlayStyleLoader, OverlayContainer} from './overlay-container';\nimport {isElement, OverlayRef} from './overlay-ref';\nimport {OverlayPositionBuilder} from './position/overlay-position-builder';\nimport {ScrollStrategyOptions} from './scroll/index';\n\n/** Object used to configure the default options for overlays. */\nexport interface OverlayDefaultConfig {\n  usePopover?: boolean;\n}\n\n/** Injection token used to configure the default options for CDK overlays. */\nexport const OVERLAY_DEFAULT_CONFIG = new InjectionToken<OverlayDefaultConfig>(\n  'OVERLAY_DEFAULT_CONFIG',\n);\n\n/**\n * Creates an overlay.\n * @param injector Injector to use when resolving the overlay's dependencies.\n * @param config Configuration applied to the overlay.\n * @returns Reference to the created overlay.\n */\nexport function createOverlayRef(injector: Injector, config?: OverlayConfig): OverlayRef {\n  // This is done in the overlay container as well, but we have it here\n  // since it's common to mock out the overlay container in tests.\n  injector.get(_CdkPrivateStyleLoader).load(_CdkOverlayStyleLoader);\n\n  const overlayContainer = injector.get(OverlayContainer);\n  const doc = injector.get(DOCUMENT);\n  const idGenerator = injector.get(_IdGenerator);\n  const appRef = injector.get(ApplicationRef);\n  const directionality = injector.get(Directionality);\n  const renderer =\n    injector.get(Renderer2, null, {optional: true}) ||\n    injector.get(RendererFactory2).createRenderer(null, null);\n\n  const overlayConfig = new OverlayConfig(config);\n  const defaultUsePopover =\n    injector.get(OVERLAY_DEFAULT_CONFIG, null, {optional: true})?.usePopover ?? true;\n\n  overlayConfig.direction = overlayConfig.direction || directionality.value;\n\n  if (!('showPopover' in doc.body)) {\n    overlayConfig.usePopover = false;\n  } else {\n    overlayConfig.usePopover = config?.usePopover ?? defaultUsePopover;\n  }\n\n  const pane = doc.createElement('div');\n  const host = doc.createElement('div');\n  pane.id = idGenerator.getId('cdk-overlay-');\n  pane.classList.add('cdk-overlay-pane');\n  host.appendChild(pane);\n\n  if (overlayConfig.usePopover) {\n    host.setAttribute('popover', 'manual');\n    host.classList.add('cdk-overlay-popover');\n  }\n\n  const customInsertionPoint = overlayConfig.usePopover\n    ? overlayConfig.positionStrategy?.getPopoverInsertionPoint?.()\n    : null;\n\n  if (isElement(customInsertionPoint)) {\n    customInsertionPoint.after(host);\n  } else if (customInsertionPoint?.type === 'parent') {\n    customInsertionPoint.element.appendChild(host);\n  } else {\n    overlayContainer.getContainerElement().appendChild(host);\n  }\n\n  return new OverlayRef(\n    new DomPortalOutlet(pane, appRef, injector),\n    host,\n    pane,\n    overlayConfig,\n    injector.get(NgZone),\n    injector.get(OverlayKeyboardDispatcher),\n    doc,\n    injector.get(Location),\n    injector.get(OverlayOutsideClickDispatcher),\n    config?.disableAnimations ??\n      injector.get(ANIMATION_MODULE_TYPE, null, {optional: true}) === 'NoopAnimations',\n    injector.get(EnvironmentInjector),\n    renderer,\n  );\n}\n\n/**\n * Service to create Overlays. Overlays are dynamically added pieces of floating UI, meant to be\n * used as a low-level building block for other components. Dialogs, tooltips, menus,\n * selects, etc. can all be built using overlays. The service should primarily be used by authors\n * of re-usable components rather than developers building end-user applications.\n *\n * An overlay *is* a PortalOutlet, so any kind of Portal can be loaded into one.\n */\n@Injectable({providedIn: 'root'})\nexport class Overlay {\n  scrollStrategies = inject(ScrollStrategyOptions);\n  private _positionBuilder = inject(OverlayPositionBuilder);\n  private _injector = inject(Injector);\n\n  constructor(...args: unknown[]);\n  constructor() {}\n\n  /**\n   * Creates an overlay.\n   * @param config Configuration applied to the overlay.\n   * @returns Reference to the created overlay.\n   */\n  create(config?: OverlayConfig): OverlayRef {\n    return createOverlayRef(this._injector, config);\n  }\n\n  /**\n   * Gets a position builder that can be used, via fluent API,\n   * to construct and configure a position strategy.\n   * @returns An overlay position builder.\n   */\n  position(): OverlayPositionBuilder {\n    return this._positionBuilder;\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 {Direction, Directionality} from '../bidi';\nimport {ESCAPE, hasModifierKey} from '../keycodes';\nimport {TemplatePortal} from '../portal';\nimport {\n  Directive,\n  ElementRef,\n  EventEmitter,\n  InjectionToken,\n  Injector,\n  Input,\n  NgZone,\n  OnChanges,\n  OnDestroy,\n  Output,\n  SimpleChanges,\n  TemplateRef,\n  ViewContainerRef,\n  booleanAttribute,\n  inject,\n} from '@angular/core';\nimport {_getEventTarget} from '../platform';\nimport {Subscription} from 'rxjs';\nimport {takeWhile} from 'rxjs/operators';\nimport {createOverlayRef, OVERLAY_DEFAULT_CONFIG} from './overlay';\nimport {OverlayConfig} from './overlay-config';\nimport {OverlayRef} from './overlay-ref';\nimport {ConnectedOverlayPositionChange, ViewportMargin} from './position/connected-position';\nimport {\n  ConnectedPosition,\n  createFlexibleConnectedPositionStrategy,\n  FlexibleConnectedPositionStrategy,\n  FlexibleConnectedPositionStrategyOrigin,\n  FlexibleOverlayPopoverLocation,\n} from './position/flexible-connected-position-strategy';\nimport {createRepositionScrollStrategy, ScrollStrategy} from './scroll/index';\n\n/** Default set of positions for the overlay. Follows the behavior of a dropdown. */\nconst defaultPositionList: ConnectedPosition[] = [\n  {\n    originX: 'start',\n    originY: 'bottom',\n    overlayX: 'start',\n    overlayY: 'top',\n  },\n  {\n    originX: 'start',\n    originY: 'top',\n    overlayX: 'start',\n    overlayY: 'bottom',\n  },\n  {\n    originX: 'end',\n    originY: 'top',\n    overlayX: 'end',\n    overlayY: 'bottom',\n  },\n  {\n    originX: 'end',\n    originY: 'bottom',\n    overlayX: 'end',\n    overlayY: 'top',\n  },\n];\n\n/** Injection token that determines the scroll handling while the connected overlay is open. */\nexport const CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrategy>(\n  'cdk-connected-overlay-scroll-strategy',\n  {\n    providedIn: 'root',\n    factory: () => {\n      const injector = inject(Injector);\n      return () => createRepositionScrollStrategy(injector);\n    },\n  },\n);\n\n/**\n * Directive applied to an element to make it usable as an origin for an Overlay using a\n * ConnectedPositionStrategy.\n */\n@Directive({\n  selector: '[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]',\n  exportAs: 'cdkOverlayOrigin',\n})\nexport class CdkOverlayOrigin {\n  elementRef = inject(ElementRef);\n\n  constructor(...args: unknown[]);\n  constructor() {}\n}\n\n/**\n * Injection token that can be used to configure the\n * default options for the `CdkConnectedOverlay` directive.\n */\nexport const CDK_CONNECTED_OVERLAY_DEFAULT_CONFIG = new InjectionToken<CdkConnectedOverlayConfig>(\n  'cdk-connected-overlay-default-config',\n);\n\n/** Object used to configure the `CdkConnectedOverlay` directive. */\nexport interface CdkConnectedOverlayConfig {\n  origin?: CdkOverlayOrigin | FlexibleConnectedPositionStrategyOrigin;\n  positions?: ConnectedPosition[];\n  positionStrategy?: FlexibleConnectedPositionStrategy;\n  offsetX?: number;\n  offsetY?: number;\n  width?: number | string;\n  height?: number | string;\n  minWidth?: number | string;\n  minHeight?: number | string;\n  backdropClass?: string | string[];\n  panelClass?: string | string[];\n  viewportMargin?: ViewportMargin;\n  scrollStrategy?: ScrollStrategy;\n  disableClose?: boolean;\n  transformOriginSelector?: string;\n  hasBackdrop?: boolean;\n  lockPosition?: boolean;\n  flexibleDimensions?: boolean;\n  growAfterOpen?: boolean;\n  push?: boolean;\n  disposeOnNavigation?: boolean;\n  usePopover?: FlexibleOverlayPopoverLocation | null;\n  matchWidth?: boolean;\n}\n\n/**\n * Directive to facilitate declarative creation of an\n * Overlay using a FlexibleConnectedPositionStrategy.\n */\n@Directive({\n  selector: '[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]',\n  exportAs: 'cdkConnectedOverlay',\n})\nexport class CdkConnectedOverlay implements OnDestroy, OnChanges {\n  private _dir = inject(Directionality, {optional: true});\n  private _injector = inject(Injector);\n\n  private _overlayRef: OverlayRef | undefined;\n  private _templatePortal: TemplatePortal;\n  private _backdropSubscription = Subscription.EMPTY;\n  private _attachSubscription = Subscription.EMPTY;\n  private _detachSubscription = Subscription.EMPTY;\n  private _positionSubscription = Subscription.EMPTY;\n  private _offsetX: number | undefined;\n  private _offsetY: number | undefined;\n  private _position: FlexibleConnectedPositionStrategy | undefined;\n  private _scrollStrategyFactory = inject(CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY);\n  private _ngZone = inject(NgZone);\n\n  /** Origin for the connected overlay. */\n  @Input('cdkConnectedOverlayOrigin')\n  origin!: CdkOverlayOrigin | FlexibleConnectedPositionStrategyOrigin;\n\n  /** Registered connected position pairs. */\n  @Input('cdkConnectedOverlayPositions') positions!: ConnectedPosition[];\n\n  /**\n   * This input overrides the positions input if specified. It lets users pass\n   * in arbitrary positioning strategies.\n   */\n  @Input('cdkConnectedOverlayPositionStrategy')\n  positionStrategy!: FlexibleConnectedPositionStrategy;\n\n  /** The offset in pixels for the overlay connection point on the x-axis */\n  @Input('cdkConnectedOverlayOffsetX')\n  get offsetX(): number {\n    return this._offsetX!;\n  }\n  set offsetX(offsetX: number) {\n    this._offsetX = offsetX;\n\n    if (this._position) {\n      this._updatePositionStrategy(this._position);\n    }\n  }\n\n  /** The offset in pixels for the overlay connection point on the y-axis */\n  @Input('cdkConnectedOverlayOffsetY')\n  get offsetY() {\n    return this._offsetY!;\n  }\n  set offsetY(offsetY: number) {\n    this._offsetY = offsetY;\n\n    if (this._position) {\n      this._updatePositionStrategy(this._position);\n    }\n  }\n\n  /** The width of the overlay panel. */\n  @Input('cdkConnectedOverlayWidth') width!: number | string;\n\n  /** The height of the overlay panel. */\n  @Input('cdkConnectedOverlayHeight') height!: number | string;\n\n  /** The min width of the overlay panel. */\n  @Input('cdkConnectedOverlayMinWidth') minWidth!: number | string;\n\n  /** The min height of the overlay panel. */\n  @Input('cdkConnectedOverlayMinHeight') minHeight!: number | string;\n\n  /** The custom class to be set on the backdrop element. */\n  @Input('cdkConnectedOverlayBackdropClass') backdropClass!: string | string[];\n\n  /** The custom class to add to the overlay pane element. */\n  @Input('cdkConnectedOverlayPanelClass') panelClass!: string | string[];\n\n  /** Margin between the overlay and the viewport edges. */\n  @Input('cdkConnectedOverlayViewportMargin') viewportMargin: ViewportMargin = 0;\n\n  /** Strategy to be used when handling scroll events while the overlay is open. */\n  @Input('cdkConnectedOverlayScrollStrategy') scrollStrategy: ScrollStrategy;\n\n  /** Whether the overlay is open. */\n  @Input('cdkConnectedOverlayOpen') open: boolean = false;\n\n  /** Whether the overlay can be closed by user interaction. */\n  @Input('cdkConnectedOverlayDisableClose') disableClose: boolean = false;\n\n  /** CSS selector which to set the transform origin. */\n  @Input('cdkConnectedOverlayTransformOriginOn') transformOriginSelector!: string;\n\n  /** Whether or not the overlay should attach a backdrop. */\n  @Input({alias: 'cdkConnectedOverlayHasBackdrop', transform: booleanAttribute})\n  hasBackdrop: boolean = false;\n\n  /** Whether or not the overlay should be locked when scrolling. */\n  @Input({alias: 'cdkConnectedOverlayLockPosition', transform: booleanAttribute})\n  lockPosition: boolean = false;\n\n  /** Whether the overlay's width and height can be constrained to fit within the viewport. */\n  @Input({alias: 'cdkConnectedOverlayFlexibleDimensions', transform: booleanAttribute})\n  flexibleDimensions: boolean = false;\n\n  /** Whether the overlay can grow after the initial open when flexible positioning is turned on. */\n  @Input({alias: 'cdkConnectedOverlayGrowAfterOpen', transform: booleanAttribute})\n  growAfterOpen: boolean = false;\n\n  /** Whether the overlay can be pushed on-screen if none of the provided positions fit. */\n  @Input({alias: 'cdkConnectedOverlayPush', transform: booleanAttribute}) push: boolean = false;\n\n  /** Whether the overlay should be disposed of when the user goes backwards/forwards in history. */\n  @Input({alias: 'cdkConnectedOverlayDisposeOnNavigation', transform: booleanAttribute})\n  disposeOnNavigation: boolean = false;\n\n  /** Whether the connected overlay should be rendered inside a popover element or the overlay container. */\n  @Input({alias: 'cdkConnectedOverlayUsePopover'})\n  usePopover: FlexibleOverlayPopoverLocation | null;\n\n  /** Whether the overlay should match the trigger's width. */\n  @Input({alias: 'cdkConnectedOverlayMatchWidth', transform: booleanAttribute})\n  matchWidth: boolean = false;\n\n  /** Shorthand for setting multiple overlay options at once. */\n  @Input('cdkConnectedOverlay')\n  set _config(value: string | CdkConnectedOverlayConfig) {\n    if (typeof value !== 'string') {\n      this._assignConfig(value);\n    }\n  }\n\n  /** Event emitted when the backdrop is clicked. */\n  @Output() readonly backdropClick = new EventEmitter<MouseEvent>();\n\n  /** Event emitted when the position has changed. */\n  @Output() readonly positionChange = new EventEmitter<ConnectedOverlayPositionChange>();\n\n  /** Event emitted when the overlay has been attached. */\n  @Output() readonly attach = new EventEmitter<void>();\n\n  /** Event emitted when the overlay has been detached. */\n  @Output() readonly detach = new EventEmitter<void>();\n\n  /** Emits when there are keyboard events that are targeted at the overlay. */\n  @Output() readonly overlayKeydown = new EventEmitter<KeyboardEvent>();\n\n  /** Emits when there are mouse outside click events that are targeted at the overlay. */\n  @Output() readonly overlayOutsideClick = new EventEmitter<MouseEvent>();\n\n  constructor(...args: unknown[]);\n\n  // TODO(jelbourn): inputs for size, scroll behavior, animation, etc.\n\n  constructor() {\n    const templateRef = inject<TemplateRef<any>>(TemplateRef);\n    const viewContainerRef = inject(ViewContainerRef);\n    const defaultConfig = inject(CDK_CONNECTED_OVERLAY_DEFAULT_CONFIG, {optional: true});\n    const globalConfig = inject(OVERLAY_DEFAULT_CONFIG, {optional: true});\n\n    this.usePopover = globalConfig?.usePopover === false ? null : 'global';\n    this._templatePortal = new TemplatePortal(templateRef, viewContainerRef);\n    this.scrollStrategy = this._scrollStrategyFactory();\n\n    if (defaultConfig) {\n      this._assignConfig(defaultConfig);\n    }\n  }\n\n  /** The associated overlay reference. */\n  get overlayRef(): OverlayRef {\n    return this._overlayRef!;\n  }\n\n  /** The element's layout direction. */\n  get dir(): Direction {\n    return this._dir ? this._dir.value : 'ltr';\n  }\n\n  ngOnDestroy() {\n    this._attachSubscription.unsubscribe();\n    this._detachSubscription.unsubscribe();\n    this._backdropSubscription.unsubscribe();\n    this._positionSubscription.unsubscribe();\n    this._overlayRef?.dispose();\n  }\n\n  ngOnChanges(changes: SimpleChanges) {\n    if (this._position) {\n      this._updatePositionStrategy(this._position);\n      this._overlayRef?.updateSize({\n        width: this._getWidth(),\n        minWidth: this.minWidth,\n        height: this.height,\n        minHeight: this.minHeight,\n      });\n\n      if (changes['origin'] && this.open) {\n        this._position.apply();\n      }\n    }\n\n    if (changes['open']) {\n      this.open ? this.attachOverlay() : this.detachOverlay();\n    }\n  }\n\n  /** Creates an overlay */\n  private _createOverlay() {\n    if (!this.positions || !this.positions.length) {\n      this.positions = defaultPositionList;\n    }\n\n    const overlayRef = (this._overlayRef = createOverlayRef(this._injector, this._buildConfig()));\n    this._attachSubscription = overlayRef.attachments().subscribe(() => this.attach.emit());\n    this._detachSubscription = overlayRef.detachments().subscribe(() => this.detach.emit());\n    overlayRef.keydownEvents().subscribe((event: KeyboardEvent) => {\n      this.overlayKeydown.next(event);\n\n      if (event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event)) {\n        event.preventDefault();\n        this.detachOverlay();\n      }\n    });\n\n    this._overlayRef.outsidePointerEvents().subscribe((event: MouseEvent) => {\n      const origin = this._getOriginElement();\n      const target = _getEventTarget(event) as Element | null;\n\n      if (!origin || (origin !== target && !origin.contains(target))) {\n        this.overlayOutsideClick.next(event);\n      }\n    });\n  }\n\n  /** Builds the overlay config based on the directive's inputs */\n  private _buildConfig(): OverlayConfig {\n    const positionStrategy = (this._position =\n      this.positionStrategy || this._createPositionStrategy());\n    const overlayConfig = new OverlayConfig({\n      direction: this._dir || 'ltr',\n      positionStrategy,\n      scrollStrategy: this.scrollStrategy,\n      hasBackdrop: this.hasBackdrop,\n      disposeOnNavigation: this.disposeOnNavigation,\n      usePopover: !!this.usePopover,\n    });\n\n    if (this.height || this.height === 0) {\n      overlayConfig.height = this.height;\n    }\n\n    if (this.minWidth || this.minWidth === 0) {\n      overlayConfig.minWidth = this.minWidth;\n    }\n\n    if (this.minHeight || this.minHeight === 0) {\n      overlayConfig.minHeight = this.minHeight;\n    }\n\n    if (this.backdropClass) {\n      overlayConfig.backdropClass = this.backdropClass;\n    }\n\n    if (this.panelClass) {\n      overlayConfig.panelClass = this.panelClass;\n    }\n\n    return overlayConfig;\n  }\n\n  /** Updates the state of a position strategy, based on the values of the directive inputs. */\n  private _updatePositionStrategy(positionStrategy: FlexibleConnectedPositionStrategy) {\n    const positions: ConnectedPosition[] = this.positions.map(currentPosition => ({\n      originX: currentPosition.originX,\n      originY: currentPosition.originY,\n      overlayX: currentPosition.overlayX,\n      overlayY: currentPosition.overlayY,\n      offsetX: currentPosition.offsetX || this.offsetX,\n      offsetY: currentPosition.offsetY || this.offsetY,\n      panelClass: currentPosition.panelClass || undefined,\n    }));\n\n    return positionStrategy\n      .setOrigin(this._getOrigin())\n      .withPositions(positions)\n      .withFlexibleDimensions(this.flexibleDimensions)\n      .withPush(this.push)\n      .withGrowAfterOpen(this.growAfterOpen)\n      .withViewportMargin(this.viewportMargin)\n      .withLockedPosition(this.lockPosition)\n      .withTransformOriginOn(this.transformOriginSelector)\n      .withPopoverLocation(this.usePopover === null ? 'global' : this.usePopover);\n  }\n\n  /** Returns the position strategy of the overlay to be set on the overlay config */\n  private _createPositionStrategy(): FlexibleConnectedPositionStrategy {\n    const strategy = createFlexibleConnectedPositionStrategy(this._injector, this._getOrigin());\n    this._updatePositionStrategy(strategy);\n    return strategy;\n  }\n\n  private _getOrigin(): FlexibleConnectedPositionStrategyOrigin {\n    if (this.origin instanceof CdkOverlayOrigin) {\n      return this.origin.elementRef;\n    } else {\n      return this.origin;\n    }\n  }\n\n  private _getOriginElement(): Element | null {\n    if (this.origin instanceof CdkOverlayOrigin) {\n      return this.origin.elementRef.nativeElement;\n    }\n\n    if (this.origin instanceof ElementRef) {\n      return this.origin.nativeElement;\n    }\n\n    if (typeof Element !== 'undefined' && this.origin instanceof Element) {\n      return this.origin;\n    }\n\n    return null;\n  }\n\n  private _getWidth() {\n    if (this.width) {\n      return this.width;\n    }\n\n    // Null check `getBoundingClientRect` in case this is called during SSR.\n    return this.matchWidth ? this._getOriginElement()?.getBoundingClientRect?.().width : undefined;\n  }\n\n  /** Attaches the overlay. */\n  attachOverlay() {\n    if (!this._overlayRef) {\n      this._createOverlay();\n    }\n\n    const ref = this._overlayRef!;\n\n    // Update the overlay size, in case the directive's inputs have changed\n    ref.getConfig().hasBackdrop = this.hasBackdrop;\n    ref.updateSize({width: this._getWidth()});\n\n    if (!ref.hasAttached()) {\n      ref.attach(this._templatePortal);\n    }\n\n    if (this.hasBackdrop) {\n      this._backdropSubscription = ref\n        .backdropClick()\n        .subscribe(event => this.backdropClick.emit(event));\n    } else {\n      this._backdropSubscription.unsubscribe();\n    }\n\n    this._positionSubscription.unsubscribe();\n\n    // Only subscribe to `positionChanges` if requested, because putting\n    // together all the information for it can be expensive.\n    if (this.positionChange.observers.length > 0) {\n      this._positionSubscription = this._position!.positionChanges.pipe(\n        takeWhile(() => this.positionChange.observers.length > 0),\n      ).subscribe(position => {\n        this._ngZone.run(() => this.positionChange.emit(position));\n\n        if (this.positionChange.observers.length === 0) {\n          this._positionSubscription.unsubscribe();\n        }\n      });\n    }\n\n    this.open = true;\n  }\n\n  /** Detaches the overlay. */\n  detachOverlay() {\n    this._overlayRef?.detach();\n    this._backdropSubscription.unsubscribe();\n    this._positionSubscription.unsubscribe();\n    this.open = false;\n  }\n\n  private _assignConfig(config: CdkConnectedOverlayConfig) {\n    this.origin = config.origin ?? this.origin;\n    this.positions = config.positions ?? this.positions;\n    this.positionStrategy = config.positionStrategy ?? this.positionStrategy;\n    this.offsetX = config.offsetX ?? this.offsetX;\n    this.offsetY = config.offsetY ?? this.offsetY;\n    this.width = config.width ?? this.width;\n    this.height = config.height ?? this.height;\n    this.minWidth = config.minWidth ?? this.minWidth;\n    this.minHeight = config.minHeight ?? this.minHeight;\n    this.backdropClass = config.backdropClass ?? this.backdropClass;\n    this.panelClass = config.panelClass ?? this.panelClass;\n    this.viewportMargin = config.viewportMargin ?? this.viewportMargin;\n    this.scrollStrategy = config.scrollStrategy ?? this.scrollStrategy;\n    this.disableClose = config.disableClose ?? this.disableClose;\n    this.transformOriginSelector = config.transformOriginSelector ?? this.transformOriginSelector;\n    this.hasBackdrop = config.hasBackdrop ?? this.hasBackdrop;\n    this.lockPosition = config.lockPosition ?? this.lockPosition;\n    this.flexibleDimensions = config.flexibleDimensions ?? this.flexibleDimensions;\n    this.growAfterOpen = config.growAfterOpen ?? this.growAfterOpen;\n    this.push = config.push ?? this.push;\n    this.disposeOnNavigation = config.disposeOnNavigation ?? this.disposeOnNavigation;\n    this.usePopover = config.usePopover ?? this.usePopover;\n    this.matchWidth = config.matchWidth ?? this.matchWidth;\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 {BidiModule} from '../bidi';\nimport {PortalModule} from '../portal';\nimport {ScrollingModule} from '../scrolling';\nimport {NgModule} from '@angular/core';\nimport {Overlay} from './overlay';\nimport {CdkConnectedOverlay, CdkOverlayOrigin} from './overlay-directives';\n\n@NgModule({\n  imports: [BidiModule, PortalModule, ScrollingModule, CdkConnectedOverlay, CdkOverlayOrigin],\n  exports: [CdkConnectedOverlay, CdkOverlayOrigin, ScrollingModule],\n  providers: [Overlay],\n})\nexport class OverlayModule {}\n\n// Re-export needed by the Angular compiler.\n// See: https://github.com/angular/components/issues/30663.\n// Note: These exports need to be stable and shouldn't be renamed unnecessarily because\n// consuming libraries might have references to them in their own partial compilation output.\nexport {\n  CdkScrollableModule as ɵɵCdkScrollableModule,\n  CdkFixedSizeVirtualScroll as ɵɵCdkFixedSizeVirtualScroll,\n  CdkVirtualForOf as ɵɵCdkVirtualForOf,\n  CdkVirtualScrollViewport as ɵɵCdkVirtualScrollViewport,\n  CdkVirtualScrollableWindow as ɵɵCdkVirtualScrollableWindow,\n  CdkVirtualScrollableElement as ɵɵCdkVirtualScrollableElement,\n} from '../scrolling';\nexport {Dir as ɵɵDir} from '../bidi';\n"],"names":["scrollBehaviorSupported","supportsScrollBehavior","createBlockScrollStrategy","injector","BlockScrollStrategy","get","ViewportRuler","DOCUMENT","_viewportRuler","_previousHTMLStyles","top","left","_previousScrollPosition","_isEnabled","_document","constructor","document","attach","enable","_canBeEnabled","root","documentElement","getViewportScrollPosition","style","coerceCssPixelValue","classList","add","disable","html","body","htmlStyle","bodyStyle","previousHtmlScrollBehavior","scrollBehavior","previousBodyScrollBehavior","remove","window","scroll","contains","rootElement","viewport","getViewportSize","scrollHeight","height","scrollWidth","width","getMatScrollStrategyAlreadyAttachedError","Error","createCloseScrollStrategy","config","CloseScrollStrategy","ScrollDispatcher","NgZone","_scrollDispatcher","_ngZone","_config","_scrollSubscription","_overlayRef","_initialScrollPosition","overlayRef","ngDevMode","stream","scrolled","pipe","filter","scrollable","overlayElement","getElementRef","nativeElement","threshold","subscribe","scrollPosition","Math","abs","_detach","updatePosition","unsubscribe","detach","hasAttached","run","createNoopScrollStrategy","NoopScrollStrategy","isElementScrolledOutsideView","element","scrollContainers","some","containerBounds","outsideAbove","bottom","outsideBelow","outsideLeft","right","outsideRight","isElementClippedByScrolling","scrollContainerRect","clippedAbove","clippedBelow","clippedLeft","clippedRight","createRepositionScrollStrategy","RepositionScrollStrategy","throttle","scrollThrottle","autoClose","overlayRect","getBoundingClientRect","parentRects","ScrollStrategyOptions","_injector","inject","Injector","noop","close","block","reposition","deps","target","i0","ɵɵFactoryTarget","Injectable","ɵprov","ɵɵngDeclareInjectable","minVersion","version","ngImport","type","decorators","providedIn","OverlayConfig","positionStrategy","scrollStrategy","panelClass","hasBackdrop","backdropClass","disableAnimations","minWidth","minHeight","maxWidth","maxHeight","direction","disposeOnNavigation","usePopover","eventPredicate","configKeys","Object","keys","key","undefined","ConnectionPositionPair","offsetX","offsetY","originX","originY","overlayX","overlayY","origin","overlay","ScrollingVisibility","isOriginClipped","isOriginOutsideView","isOverlayClipped","isOverlayOutsideView","ConnectedOverlayPositionChange","connectionPair","scrollableViewProperties","validateVerticalPosition","property","value","validateHorizontalPosition","BaseOverlayDispatcher","_attachedOverlays","_isAttached","ngOnDestroy","push","index","indexOf","splice","length","canReceiveEvent","event","observers","OverlayKeyboardDispatcher","_renderer","RendererFactory2","createRenderer","_cleanupKeydown","runOutsideAngular","listen","_keydownListener","overlays","i","_keydownEvents","next","OverlayOutsideClickDispatcher","_platform","Platform","_cursorOriginalValue","_cursorStyleIsSet","_pointerDownEventTarget","_cleanups","eventOptions","capture","renderer","_pointerDownListener","_clickListener","IOS","cursor","forEach","cleanup","_getEventTarget","slice","outsidePointerEvents","_outsidePointerEvents","containsPierceShadowDom","parent","child","supportsShadowRoot","ShadowRoot","current","host","parentNode","_CdkOverlayStyleLoader","Component","ɵcmp","ɵɵngDeclareComponent","isInline","styles","changeDetection","ChangeDetectionStrategy","OnPush","encapsulation","ViewEncapsulation","None","args","template","OverlayContainer","_containerElement","_styleLoader","_CdkPrivateStyleLoader","getContainerElement","_loadStyles","_createContainer","containerClass","isBrowser","_isTestEnvironment","oppositePlatformContainers","querySelectorAll","container","createElement","setAttribute","appendChild","load","BackdropRef","_cleanupClick","_cleanupTransitionEnd","_fallbackTimeout","onClick","clearTimeout","dispose","setTimeout","pointerEvents","isElement","nodeType","OverlayRef","_portalOutlet","_host","_pane","_keyboardDispatcher","_location","_outsideClickDispatcher","_animationsDisabled","_backdropClick","Subject","_attachments","_detachments","_positionStrategy","_scrollStrategy","_locationChanges","Subscription","EMPTY","_backdropRef","_detachContentMutationObserver","_detachContentAfterRenderRef","_disposed","_previousHostParent","_afterNextRenderRef","backdropElement","hostElement","portal","_attachHost","attachResult","_updateStackingOrder","_updateElementSize","_updateElementDirection","destroy","afterNextRender","_togglePointerEvents","_attachBackdrop","_toggleClasses","_completeDetachContent","onDestroy","Promise","resolve","then","detachBackdrop","detachmentResult","_detachContentWhenEmpty","isAttached","_disposeScrollStrategy","complete","backdropClick","attachments","detachments","keydownEvents","getConfig","apply","updatePositionStrategy","strategy","updateSize","sizeConfig","setDirection","dir","addPanelClass","classes","removePanelClass","getDirection","updateScrollStrategy","enablePointer","parentElement","customInsertionPoint","getPopoverInsertionPoint","after","showingClass","prepend","insertBefore","requestAnimationFrame","nextSibling","cssClasses","isAdd","coerceArray","c","rethrow","_detachContent","e","globalThis","MutationObserver","observe","childList","children","disconnect","boundingBoxClass","cssUnitPattern","createFlexibleConnectedPositionStrategy","FlexibleConnectedPositionStrategy","_overlayContainer","_isInitialRender","_lastBoundingBoxSize","_isPushed","_canPush","_growAfterOpen","_hasFlexibleDimensions","_positionLocked","_originRect","_overlayRect","_viewportRect","_containerRect","_viewportMargin","_scrollables","_preferredPositions","_origin","_isDisposed","_boundingBox","_lastPosition","_lastScrollVisibility","_positionChanges","_resizeSubscription","_offsetX","_offsetY","_transformOriginSelector","_appliedPanelClasses","_previousPushAmount","_popoverLocation","positionChanges","positions","connectedTo","setOrigin","_validatePositions","change","reapplyLastPosition","_clearPanelClasses","_resetOverlayElementStyles","_resetBoundingBoxStyles","_getNarrowedViewportRect","_getOriginRect","_getContainerRect","originRect","viewportRect","containerRect","flexibleFits","fallback","pos","originPoint","_getOriginPoint","overlayPoint","_getOverlayPoint","overlayFit","_getOverlayFit","isCompletelyWithinViewport","_applyPosition","_canFitWithFlexibleDimensions","position","boundingBoxRect","_calculateBoundingBoxRect","visibleArea","bestFit","bestScore","fit","score","weight","extendStyles","alignItems","justifyContent","lastPosition","withScrollableContainers","scrollables","withPositions","withViewportMargin","margin","withFlexibleDimensions","flexibleDimensions","withGrowAfterOpen","growAfterOpen","withPush","canPush","withLockedPosition","isLocked","withDefaultOffsetX","offset","withDefaultOffsetY","withTransformOriginOn","selector","withPopoverLocation","location","ElementRef","x","startX","_isRtl","endX","y","overlayStartX","overlayStartY","point","rawOverlayRect","getRoundedBoundingClientRect","_getOffset","leftOverflow","rightOverflow","topOverflow","bottomOverflow","visibleWidth","_subtractOverflows","visibleHeight","fitsInViewportVertically","fitsInViewportHorizontally","availableHeight","availableWidth","getPixelValue","verticalFit","horizontalFit","_pushOverlayOnScreen","start","overflowRight","max","overflowBottom","overflowTop","overflowLeft","pushX","pushY","_getViewportMarginStart","_getViewportMarginTop","_setTransformOrigin","_setOverlayElementStyles","_setBoundingBoxStyles","_addPanelClasses","scrollVisibility","_getScrollVisibility","compareScrollVisibility","changeEvent","elements","xOrigin","yOrigin","transformOrigin","isRtl","_getViewportMarginBottom","smallestDistanceToViewportEdge","min","previousHeight","isBoundedByRightViewportEdge","isBoundedByLeftViewportEdge","_getViewportMarginEnd","previousWidth","_hasExactPosition","transform","hasExactPosition","hasFlexibleDimensions","_getExactOverlayY","_getExactOverlayX","transformString","trim","documentHeight","clientHeight","horizontalStyleProperty","documentWidth","clientWidth","originBounds","overlayBounds","scrollContainerBounds","map","overflows","reduce","currentValue","currentOverflow","axis","pair","cssClass","end","Element","isInlinePopover","display","dimensions","destination","source","hasOwnProperty","input","units","split","parseFloat","clientRect","floor","a","b","STANDARD_DROPDOWN_BELOW_POSITIONS","STANDARD_DROPDOWN_ADJACENT_POSITIONS","wrapperClass","createGlobalPositionStrategy","GlobalPositionStrategy","_cssPosition","_topOffset","_bottomOffset","_alignItems","_xPosition","_xOffset","_width","_height","centerHorizontally","centerVertically","parentStyles","shouldBeFlushHorizontally","shouldBeFlushVertically","xPosition","xOffset","marginLeft","marginRight","marginTop","marginBottom","OverlayPositionBuilder","global","flexibleConnectedTo","OVERLAY_DEFAULT_CONFIG","InjectionToken","createOverlayRef","overlayContainer","doc","idGenerator","_IdGenerator","appRef","ApplicationRef","directionality","Directionality","Renderer2","optional","overlayConfig","defaultUsePopover","pane","id","getId","DomPortalOutlet","Location","ANIMATION_MODULE_TYPE","EnvironmentInjector","Overlay","scrollStrategies","_positionBuilder","create","defaultPositionList","CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY","factory","CdkOverlayOrigin","elementRef","Directive","isStandalone","exportAs","CDK_CONNECTED_OVERLAY_DEFAULT_CONFIG","CdkConnectedOverlay","_dir","_templatePortal","_backdropSubscription","_attachSubscription","_detachSubscription","_positionSubscription","_position","_scrollStrategyFactory","_updatePositionStrategy","viewportMargin","open","disableClose","transformOriginSelector","lockPosition","matchWidth","_assignConfig","EventEmitter","positionChange","overlayKeydown","overlayOutsideClick","templateRef","TemplateRef","viewContainerRef","ViewContainerRef","defaultConfig","globalConfig","TemplatePortal","ngOnChanges","changes","_getWidth","attachOverlay","detachOverlay","_createOverlay","_buildConfig","emit","keyCode","ESCAPE","hasModifierKey","preventDefault","_getOriginElement","_createPositionStrategy","currentPosition","_getOrigin","ref","takeWhile","ɵdir","ɵɵngDeclareDirective","inputs","booleanAttribute","outputs","usesOnChanges","Input","alias","Output","OverlayModule","NgModule","ɵmod","ɵɵngDeclareNgModule","imports","BidiModule","PortalModule","ScrollingModule","exports","providers"],"mappings":";;;;;;;;;;;;;;;;;;;;AAcA,MAAMA,uBAAuB,GAAGC,sBAAsB,EAAE;AAOlD,SAAUC,yBAAyBA,CAACC,QAAkB,EAAA;AAC1D,EAAA,OAAO,IAAIC,mBAAmB,CAACD,QAAQ,CAACE,GAAG,CAACC,aAAa,CAAC,EAAEH,QAAQ,CAACE,GAAG,CAACE,QAAQ,CAAC,CAAC;AACrF;MAKaH,mBAAmB,CAAA;EAOpBI,cAAA;AANFC,EAAAA,mBAAmB,GAAG;AAACC,IAAAA,GAAG,EAAE,EAAE;AAAEC,IAAAA,IAAI,EAAE;GAAG;EACzCC,uBAAuB;AACvBC,EAAAA,UAAU,GAAG,KAAK;EAClBC,SAAS;AAEjBC,EAAAA,WAAAA,CACUP,cAA6B,EACrCQ,QAAa,EAAA;IADL,IAAA,CAAAR,cAAc,GAAdA,cAAc;IAGtB,IAAI,CAACM,SAAS,GAAGE,QAAQ;AAC3B,EAAA;EAGAC,MAAMA,IAAI;AAGVC,EAAAA,MAAMA,GAAA;AACJ,IAAA,IAAI,IAAI,CAACC,aAAa,EAAE,EAAE;AACxB,MAAA,MAAMC,IAAI,GAAG,IAAI,CAACN,SAAS,CAACO,eAAgB;MAE5C,IAAI,CAACT,uBAAuB,GAAG,IAAI,CAACJ,cAAc,CAACc,yBAAyB,EAAE;MAG9E,IAAI,CAACb,mBAAmB,CAACE,IAAI,GAAGS,IAAI,CAACG,KAAK,CAACZ,IAAI,IAAI,EAAE;MACrD,IAAI,CAACF,mBAAmB,CAACC,GAAG,GAAGU,IAAI,CAACG,KAAK,CAACb,GAAG,IAAI,EAAE;AAInDU,MAAAA,IAAI,CAACG,KAAK,CAACZ,IAAI,GAAGa,mBAAmB,CAAC,CAAC,IAAI,CAACZ,uBAAuB,CAACD,IAAI,CAAC;AACzES,MAAAA,IAAI,CAACG,KAAK,CAACb,GA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