import { _ as _applyDecoratedDescriptor, a as _initializerDefineProperty, b as _defineProperty } from '../_rollupPluginBabelHelpers-9wjJaosZ.js';
import { setComponentTemplate } from '@ember/component';
import { precompileTemplate } from '@ember/template-compilation';
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { assert } from '@ember/debug';
import { concat, hash } from '@ember/helper';
import { action } from '@ember/object';
import didInsert from '@ember/render-modifiers/modifiers/did-insert';
import didUpdate from '@ember/render-modifiers/modifiers/did-update';
import { cancel, later, scheduleOnce } from '@ember/runloop';
import { htmlSafe } from '@ember/template';
import optional from 'ember-composable-helpers/helpers/optional';
import { focusTrap } from 'ember-focus-trap';
import onKey from 'ember-keyboard/modifiers/on-key';
import { or, not, and } from 'ember-truth-helpers';
import { tabbable } from 'tabbable';
import randomId from '../-private/random-id.js';
import { argOrDefaultDecorator } from '../helpers/arg-or-default.js';
import classNames from '../helpers/class-names.js';
import merge from '../helpers/merge.js';
import mutationObserver from '../modifiers/mutation-observer.js';
import OutsideClickDetector from '../modifiers/outside-click-detector.js';
import screenReaderOnly from '../modifiers/screen-reader-only.js';
import simpleStyle from '../modifiers/simple-style.js';
import { cascadingMenuKeys } from '../utils/accesibility/cascading-menu-keys.js';
import { anchorPositionMapping, displayMapping } from '../utils/css-mappings/eui-popover.js';
import { findPopoverPosition, getElementZIndex } from '../utils/popover/index.js';
import { getTransitionTimings, getWaitDuration, performOnFrame } from '../utils/transition.js';
import EuiPanel from './eui-panel.js';
import EuiPortal from './eui-portal.js';

var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21;
const anchorPositionToPopoverPositionMap = {
  up: 'top',
  right: 'right',
  down: 'bottom',
  left: 'left'
};
function getPopoverPositionFromAnchorPosition(anchorPosition) {
  // maps the anchor position to the matching popover position
  // e.g. "upLeft" -> "top", "downRight" -> "bottom"

  // extract the first positional word from anchorPosition:
  // starts at the beginning (" ^ ") of anchorPosition and
  // captures all of the characters (" (.*?) ") until the
  // first capital letter (" [A-Z] ") is encountered
  const match = anchorPosition.match(/^(.*?)[A-Z]/);
  if (match?.length && match.length > 1) {
    return anchorPositionToPopoverPositionMap[match[1]];
  }
  return anchorPositionToPopoverPositionMap['up'];
}
function getPopoverAlignFromAnchorPosition(anchorPosition) {
  // maps the gravity to the matching popover position
  // e.g. "upLeft" -> "left", "rightDown" -> "bottom"

  // extract the second positional word from anchorPosition:
  // starts a capture group at the first capital letter
  // and includes everything after it
  const match = anchorPosition.match(/([A-Z].*)/);

  // this performs two tasks:
  // 1. normalizes the align position by lowercasing it
  // 2. `center` doesn't exist in the lookup map which converts it to `undefined` meaning no align
  if (match?.length && match.length > 1) {
    return anchorPositionToPopoverPositionMap[match[1]?.toLowerCase()];
  }
  return anchorPositionToPopoverPositionMap['left'];
}
const ANCHOR_POSITIONS = Object.keys(anchorPositionMapping);
const DISPLAY = Object.keys(displayMapping);
const DEFAULT_POPOVER_STYLES = {
  top: 50,
  left: 50
};
function getElementFromInitialFocus(initialFocus) {
  const initialFocusType = typeof initialFocus;
  if (initialFocusType === 'string') {
    return document.querySelector(initialFocus);
  }
  if (initialFocusType === 'function') {
    return initialFocus();
  }
  return initialFocus;
}
let EuiPopoverComponent = setComponentTemplate(precompileTemplate(`
    {{#let
      (randomId)
      (classNames
        (if this.isOpening "euiPopover-isOpen")
        position=this.anchorPosition
        display=this.display
        componentName="EuiPopover"
      )
      (classNames
        "euiPopover__panel"
        (concat "euiPopover__panel--" this.arrowPosition)
        (if this.isOpening "euiPopover__panel-isOpen")
        (if
          (or (not this.hasArrow) @attachToAnchor) "euiPopover__panel-noArrow"
        )
        (if @attachToAnchor "euiPopover__panel-isAttached")
        @panelClassName
      )
      as |descriptionId classes panelClasses|
    }}
      <div
        class={{classes}}
        {{onKey "_all" this.onKeyDown priority=1}}
        {{didInsert this.didInsertPopover}}
        {{didUpdate this.didUpdateIsOpen @isOpen}}
        {{didUpdate this.didUpdateRepositionOnScroll @repositionOnScroll}}
        {{didInsert (optional @popoverRef)}}
        ...attributes
      >

        {{! button }}
        {{#if (has-block "button")}}
          <div
            class="euiPopover__anchor {{@anchorClassName}}"
            {{didInsert this.registerButton}}
          >
            {{yield to="button"}}
          </div>
        {{/if}}
        
        {{! content }}
        {{#if
          (and
            (not this.suppressingPopover)
            (or this.isCurrentlyOpen this.isClosing)
          )
        }}
          <EuiPortal @insert={{this.insert}} @portalRef={{@portalRef}}>
            {{#let (randomId) as |panelId|}}
              <EuiPanel
                id={{panelId}}
                class={{panelClasses}}
                aria-live={{if this.ownFocus "off" "assertive"}}
                role="dialog"
                aria-label={{@ariaLabel}}
                aria-labelledby={{@ariaLabelledBy}}
                aria-modal="true"
                aria-describedby={{if this.ownFocus descriptionId}}
                tabindex={{this.tabindex}}
                @hasShadow={{false}}
                @paddingSize={{this.panelPaddingSize}}
                {{simpleStyle this._popoverStyles}}
                {{didInsert this.registerPanel}}
                {{outsideClickDetector onOutsideClick=this.onClickOutside}}
                {{onKey "Escape" this.onEscapeKey}}
                {{focusTrap
                  isActive=(not
                    (or
                      (not this.ownFocus) (not this.isOpenStable) this.isClosing
                    )
                  )
                  shouldSelfFocus=this.shouldSelfFocus
                  isPaused=this.isFocusTrapPaused
                  focusTrapOptions=(merge
                    (hash
                      returnFocusOnDeactivate=this.isOpenStable
                      initialFocus=(or @initialFocus this.panel)
                      onDeactivate=(optional @onTrapDeactivation)
                      preventScroll=true
                      clickOutsideDeactivates=true
                      fallbackFocus=(concat "#" panelId)
                    )
                    @focusTrapOptions
                  )
                }}
              >
                <div
                  class={{concat
                    "euiPopover__panelArrow euiPopover__panelArrow--"
                    this.arrowPosition
                  }}
                  style={{this._arrowStyles}}
                >
                  {{yield to="arrowChildren"}}
                </div>
                {{#if this.ownFocus}}
                  <p id={{descriptionId}} {{screenReaderOnly}}>
                    You are in a dialog. To close this dialog, hit escape.
                  </p>
                {{/if}}
                <div
                  {{mutationObserver
                    onMutation=this.onMutation
                    observerOptions=(merge
                      (hash
                        attributes=true
                        childList=true
                        characterData=true
                        subtree=true
                      )
                      @mutationObserverOptions
                    )
                  }}
                >
                  {{yield to="content"}}
                </div>
              </EuiPanel>
            {{/let}}
          </EuiPortal>
        {{/if}}

      </div>
    {{/let}}
  `, {
  strictMode: true,
  scope: () => ({
    randomId,
    classNames,
    concat,
    or,
    not,
    onKey,
    didInsert,
    didUpdate,
    optional,
    and,
    EuiPortal,
    EuiPanel,
    simpleStyle,
    outsideClickDetector: OutsideClickDetector,
    focusTrap,
    merge,
    hash,
    screenReaderOnly,
    mutationObserver
  })
}), (_dec = argOrDefaultDecorator(false), _dec2 = argOrDefaultDecorator(true), _dec3 = argOrDefaultDecorator('downCenter'), _dec4 = argOrDefaultDecorator('m'), _dec5 = argOrDefaultDecorator(true), _dec6 = argOrDefaultDecorator('inlineBlock'), _dec7 = argOrDefaultDecorator(true), _dec8 = argOrDefaultDecorator(false), (_class = class EuiPopoverComponent extends Component {
  constructor(owner, args) {
    super(owner, args);
    // Defaults
    _initializerDefineProperty(this, "isOpen", _descriptor, this);
    _initializerDefineProperty(this, "ownFocus", _descriptor2, this);
    _initializerDefineProperty(this, "anchorPosition", _descriptor3, this);
    _initializerDefineProperty(this, "panelPaddingSize", _descriptor4, this);
    _initializerDefineProperty(this, "hasArrow", _descriptor5, this);
    _initializerDefineProperty(this, "display", _descriptor6, this);
    _initializerDefineProperty(this, "shouldSelfFocus", _descriptor7, this);
    _initializerDefineProperty(this, "isFocusTrapPaused", _descriptor8, this);
    //State
    _initializerDefineProperty(this, "prevIsOpen", _descriptor9, this);
    _initializerDefineProperty(this, "suppressingPopover", _descriptor10, this);
    _initializerDefineProperty(this, "isClosing", _descriptor11, this);
    _initializerDefineProperty(this, "isOpening", _descriptor12, this);
    _initializerDefineProperty(this, "popoverStyles", _descriptor13, this);
    _initializerDefineProperty(this, "arrowStyles", _descriptor14, this);
    _initializerDefineProperty(this, "arrowPosition", _descriptor15, this);
    _initializerDefineProperty(this, "openPosition", _descriptor16, this);
    _initializerDefineProperty(this, "isOpenStable", _descriptor17, this);
    _initializerDefineProperty(this, "isCurrentlyOpen", _descriptor18, this);
    _initializerDefineProperty(this, "popoverHost", _descriptor19, this);
    ///
    _defineProperty(this, "respositionTimeout", null);
    _defineProperty(this, "closingTransitionTimeout", null);
    _defineProperty(this, "closingTransitionAnimationFrame", void 0);
    _defineProperty(this, "updateFocusAnimationFrame", void 0);
    _defineProperty(this, "hasSetInitialFocus", false);
    _initializerDefineProperty(this, "_button", _descriptor20, this);
    _initializerDefineProperty(this, "panel", _descriptor21, this);
    assert(`Must provide closePopover function`, this.args.closePopover);
    this.prevIsOpen = this.isOpen;
    this.suppressingPopover = this.isOpen;
    this.isCurrentlyOpen = this.isOpen;
  }
  get button() {
    if (this.args.button) {
      return this.args.button;
    }
    return this._button;
  }
  get insert() {
    if (this.args.insert) {
      return this.args.insert;
    }
    if (this.shouldAccountForOtherPopovers) {
      if (this.popoverHost) {
        return {
          sibling: this.popoverHost.children[0],
          position: 'after'
        };
      }
    }
    return undefined;
  }
  closePopover() {
    if (this.isOpen) {
      this.args.closePopover();
    }
  }
  onEscapeKey(event, ekEvent) {
    if (this.isOpen) {
      ekEvent?.stopPropagation();
      ekEvent?.stopImmediatePropagation();
      event.preventDefault();
      event.stopPropagation();
      this.closePopover();
    }
  }
  onKeyDown(event, ekEvent) {
    if (event.key === cascadingMenuKeys.ESCAPE) {
      this.onEscapeKey(event, ekEvent);
    }
  }
  onClickOutside(event) {
    if (this.args.focusTrapOptions?.onClickOutside) {
      this.args.focusTrapOptions.onClickOutside(event);
    } else {
      // only close the popover if the event source isn't the anchor button
      // otherwise, it is up to the anchor to toggle the popover's open status
      if (this.button && this.button.contains(event.target) === false) {
        this.closePopover();
      }
    }
  }
  updateFocus() {
    // Wait for the DOM to update.
    this.updateFocusAnimationFrame = window.requestAnimationFrame(() => {
      if (!this.ownFocus || !this.panel || this.args.initialFocus === false) {
        return;
      }

      // If we've already focused on something inside the panel, everything's fine.
      if (this.hasSetInitialFocus && this.panel.contains(document.activeElement)) {
        return;
      }

      // Otherwise let's focus the first tabbable item and expedite input from the user.
      let focusTarget;
      if (this.args.initialFocus != null) {
        focusTarget = getElementFromInitialFocus(this.args.initialFocus);
      } else {
        const tabbableItems = tabbable(this.panel);
        if (tabbableItems.length) {
          focusTarget = tabbableItems[0];
        }
      }

      // there's a race condition between the popover content becoming visible and this function call
      // if the element isn't visible yet (due to css styling) then it can't accept focus
      // so wait for another render and try again
      if (focusTarget == null) {
        // there isn't a focus target, one of two reasons:
        // #1 is the whole panel hidden? If so, schedule another check
        // #2 panel is visible but no tabbables exist, move focus to the panel
        const panelVisibility = window.getComputedStyle(this.panel).opacity;
        if (panelVisibility === '0') {
          // #1
          this.updateFocus();
        } else {
          // #2
          focusTarget = this.panel;
        }
      } else {
        // found an element to focus, but is it visible?
        const visibility = window.getComputedStyle(focusTarget).visibility;
        if (visibility === 'hidden') {
          // not visible, check again next render frame
          this.updateFocus();
        }
      }
      if (focusTarget != null) {
        this.hasSetInitialFocus = true;
        focusTarget.focus();
      }
    });
  }
  onOpenPopover() {
    cancel(this.closingTransitionTimeout);
    // We need to set this state a beat after the render takes place, so that the CSS
    // transition can take effect.
    this.closingTransitionAnimationFrame = window.requestAnimationFrame(() => {
      this.isOpening = true;
    });

    // for each child element of `this.panel`, find any transition duration we should wait for before stabilizing
    const {
      durationMatch,
      delayMatch
    } = Array.prototype.slice.call(this.panel ? this.panel.children : []).reduce(({
      durationMatch,
      delayMatch
    }, element) => {
      const transitionTimings = getTransitionTimings(element);
      return {
        durationMatch: Math.max(durationMatch, transitionTimings.durationMatch),
        delayMatch: Math.max(delayMatch, transitionTimings.delayMatch)
      };
    }, {
      durationMatch: 0,
      delayMatch: 0
    });
    this.respositionTimeout = later(this, () => {
      this.isOpenStable = true;
      const fn = () => {
        this.positionPopoverFixed();
        this.updateFocus();
      };
      scheduleOnce('afterRender', this, fn);
    }, durationMatch + delayMatch);
  }
  get shouldAccountForOtherPopovers() {
    return this.args.shouldAccountForOtherPopovers ?? true;
  }
  checkIfPopoverIsInsideAnotherPopover(ele) {
    const otherPopover = ele.closest('div.euiPopover__panel');
    this.popoverHost = otherPopover;
  }
  didInsertPopover(ele) {
    if (this.suppressingPopover) {
      // component was created with isOpen=true; now that it's inserted
      // stop suppressing and start opening
      this.suppressingPopover = false;
      this.isOpening = true;
      const fn = () => this.onOpenPopover();
      scheduleOnce('afterRender', this, fn);
    }
    if (this.args.repositionOnScroll) {
      window.addEventListener('scroll', this.positionPopoverFixed, true);
    }
    if (this.shouldAccountForOtherPopovers) {
      this.checkIfPopoverIsInsideAnotherPopover(ele);
    }
    this.updateFocus();
  }
  didUpdateRepositionOnScroll() {
    if (this.args.repositionOnScroll) {
      window.addEventListener('scroll', this.positionPopoverFixed, true);
    } else {
      window.removeEventListener('scroll', this.positionPopoverFixed, true);
    }
  }
  didUpdateIsOpen() {
    this.isCurrentlyOpen = this.isOpen;
    if (!this.prevIsOpen && this.args.isOpen) {
      this.onOpenPopover();
    }
    if (this.prevIsOpen && !this.args.isOpen) {
      // If the user has just closed the popover, queue up the removal of the content after the
      // transition is complete.
      this.isClosing = true;
      this.isOpening = false;
      this.closingTransitionTimeout = later(this, () => {
        this.isClosing = false;
      }, 250);
    }
    this.prevIsOpen = this.args.isOpen;
  }
  willDestroy() {
    super.willDestroy();
    window.removeEventListener('scroll', this.positionPopoverFixed, true);
    window.removeEventListener('resize', this.positionPopoverFluid);
    this.popoverHost = null;
    this._button = null;
    this.panel = null;
    cancel(this.respositionTimeout);
    cancel(this.closingTransitionTimeout);
    cancelAnimationFrame(this.closingTransitionAnimationFrame);
    cancelAnimationFrame(this.updateFocusAnimationFrame);
  }
  onMutation(records) {
    const waitDuration = getWaitDuration(records);
    this.positionPopoverFixed();
    performOnFrame(waitDuration, this.positionPopoverFixed);
  }
  positionPopover(allowEnforcePosition) {
    if (this.button == null || this.panel == null) return;
    let position = getPopoverPositionFromAnchorPosition(this.anchorPosition);
    let forcePosition = undefined;
    if (allowEnforcePosition && this.isOpenStable && this.openPosition != null) {
      position = this.openPosition;
      forcePosition = true;
    }
    const {
      top,
      left,
      position: foundPosition,
      arrow,
      anchorBoundingBox
    } = findPopoverPosition({
      container: this.args.container,
      host: this.shouldAccountForOtherPopovers ? this.popoverHost : null,
      position,
      forcePosition,
      align: getPopoverAlignFromAnchorPosition(this.anchorPosition),
      anchor: this.button,
      popover: this.panel,
      offset: !this.args.attachToAnchor && this.hasArrow ? 16 + (this.args.offset || 0) : 8 + (this.args.offset || 0),
      arrowConfig: {
        arrowWidth: 24,
        arrowBuffer: 10
      },
      returnBoundingBox: this.args.attachToAnchor,
      buffer: this.args.buffer
    });

    // the popover's z-index must inherit from the button
    // this keeps a button's popover under a flyout that would cover the button
    // but a popover triggered inside a flyout will appear over that flyout
    const {
      zIndex: zIndexProp
    } = this.args;
    const zIndex = zIndexProp == null ? getElementZIndex(this.button, this.panel) + 2000 : zIndexProp;
    const popoverStyles = {
      top,
      left: this.args.attachToAnchor && anchorBoundingBox ? anchorBoundingBox.left : left,
      zIndex
    };
    const willRenderArrow = !this.args.attachToAnchor && this.hasArrow;
    const arrowStyles = willRenderArrow ? arrow : undefined;
    const arrowPosition = foundPosition;
    this.popoverStyles = popoverStyles;
    this.arrowStyles = arrowStyles;
    this.arrowPosition = arrowPosition;
    this.openPosition = foundPosition;
  }
  get _arrowStyles() {
    const {
      arrowStyles
    } = this;
    return arrowStyles ? htmlSafe(`top: ${arrowStyles?.top}px; left: ${arrowStyles?.left}px;`) : undefined;
  }
  get _popoverStyles() {
    const {
      panelStyle
    } = this.args;
    const {
      popoverStyles
    } = this;
    return {
      ...panelStyle,
      top: `${popoverStyles.top}px`,
      left: `${popoverStyles.left}px`,
      zIndex: `${popoverStyles.zIndex}`
    };
  }
  get tabindex() {
    if (this.ownFocus) {
      return this.args.tabindex ?? '0';
    }
    return '-1';
  }
  positionPopoverFixed() {
    this.positionPopover(true);
  }
  positionPopoverFluid() {
    this.positionPopover(false);
  }
  registerButton(btn) {
    this._button = btn;
    this.args.buttonRef?.(btn);
  }
  registerPanel(panel) {
    this.panel = panel;
    this.args.panelRef?.(panel);
    if (panel === null) {
      // panel has unmounted, restore the state defaults
      this.popoverStyles = DEFAULT_POPOVER_STYLES;
      this.arrowStyles = {};
      this.arrowPosition = null;
      this.openPosition = null;
      this.isOpenStable = false;
      window.removeEventListener('resize', this.positionPopoverFluid);
    } else {
      // panel is coming into existence
      this.positionPopoverFluid();
      window.addEventListener('resize', this.positionPopoverFluid);
    }
  }
}, (_descriptor = _applyDecoratedDescriptor(_class.prototype, "isOpen", [_dec], {
  configurable: true,
  enumerable: true,
  writable: true,
  initializer: null
}), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, "ownFocus", [_dec2], {
  configurable: true,
  enumerable: true,
  writable: true,
  initializer: null
}), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, "anchorPosition", [_dec3], {
  configurable: true,
  enumerable: true,
  writable: true,
  initializer: null
}), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, "panelPaddingSize", [_dec4], {
  configurable: true,
  enumerable: true,
  writable: true,
  initializer: null
}), _descriptor5 = _applyDecoratedDescriptor(_class.prototype, "hasArrow", [_dec5], {
  configurable: true,
  enumerable: true,
  writable: true,
  initializer: null
}), _descriptor6 = _applyDecoratedDescriptor(_class.prototype, "display", [_dec6], {
  configurable: true,
  enumerable: true,
  writable: true,
  initializer: null
}), _descriptor7 = _applyDecoratedDescriptor(_class.prototype, "shouldSelfFocus", [_dec7], {
  configurable: true,
  enumerable: true,
  writable: true,
  initializer: null
}), _descriptor8 = _applyDecoratedDescriptor(_class.prototype, "isFocusTrapPaused", [_dec8], {
  configurable: true,
  enumerable: true,
  writable: true,
  initializer: null
}), _descriptor9 = _applyDecoratedDescriptor(_class.prototype, "prevIsOpen", [tracked], {
  configurable: true,
  enumerable: true,
  writable: true,
  initializer: null
}), _descriptor10 = _applyDecoratedDescriptor(_class.prototype, "suppressingPopover", [tracked], {
  configurable: true,
  enumerable: true,
  writable: true,
  initializer: null
}), _descriptor11 = _applyDecoratedDescriptor(_class.prototype, "isClosing", [tracked], {
  configurable: true,
  enumerable: true,
  writable: true,
  initializer: function () {
    return false;
  }
}), _descriptor12 = _applyDecoratedDescriptor(_class.prototype, "isOpening", [tracked], {
  configurable: true,
  enumerable: true,
  writable: true,
  initializer: function () {
    return false;
  }
}), _descriptor13 = _applyDecoratedDescriptor(_class.prototype, "popoverStyles", [tracked], {
  configurable: true,
  enumerable: true,
  writable: true,
  initializer: function () {
    return {};
  }
}), _descriptor14 = _applyDecoratedDescriptor(_class.prototype, "arrowStyles", [tracked], {
  configurable: true,
  enumerable: true,
  writable: true,
  initializer: function () {
    return {};
  }
}), _descriptor15 = _applyDecoratedDescriptor(_class.prototype, "arrowPosition", [tracked], {
  configurable: true,
  enumerable: true,
  writable: true,
  initializer: function () {
    return null;
  }
}), _descriptor16 = _applyDecoratedDescriptor(_class.prototype, "openPosition", [tracked], {
  configurable: true,
  enumerable: true,
  writable: true,
  initializer: function () {
    return null;
  }
}), _descriptor17 = _applyDecoratedDescriptor(_class.prototype, "isOpenStable", [tracked], {
  configurable: true,
  enumerable: true,
  writable: true,
  initializer: function () {
    return false;
  }
}), _descriptor18 = _applyDecoratedDescriptor(_class.prototype, "isCurrentlyOpen", [tracked], {
  configurable: true,
  enumerable: true,
  writable: true,
  initializer: null
}), _descriptor19 = _applyDecoratedDescriptor(_class.prototype, "popoverHost", [tracked], {
  configurable: true,
  enumerable: true,
  writable: true,
  initializer: function () {
    return null;
  }
}), _descriptor20 = _applyDecoratedDescriptor(_class.prototype, "_button", [tracked], {
  configurable: true,
  enumerable: true,
  writable: true,
  initializer: function () {
    return null;
  }
}), _descriptor21 = _applyDecoratedDescriptor(_class.prototype, "panel", [tracked], {
  configurable: true,
  enumerable: true,
  writable: true,
  initializer: function () {
    return null;
  }
}), _applyDecoratedDescriptor(_class.prototype, "closePopover", [action], Object.getOwnPropertyDescriptor(_class.prototype, "closePopover"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "onEscapeKey", [action], Object.getOwnPropertyDescriptor(_class.prototype, "onEscapeKey"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "onKeyDown", [action], Object.getOwnPropertyDescriptor(_class.prototype, "onKeyDown"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "onClickOutside", [action], Object.getOwnPropertyDescriptor(_class.prototype, "onClickOutside"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "onOpenPopover", [action], Object.getOwnPropertyDescriptor(_class.prototype, "onOpenPopover"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "didInsertPopover", [action], Object.getOwnPropertyDescriptor(_class.prototype, "didInsertPopover"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "didUpdateRepositionOnScroll", [action], Object.getOwnPropertyDescriptor(_class.prototype, "didUpdateRepositionOnScroll"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "didUpdateIsOpen", [action], Object.getOwnPropertyDescriptor(_class.prototype, "didUpdateIsOpen"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "onMutation", [action], Object.getOwnPropertyDescriptor(_class.prototype, "onMutation"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "positionPopover", [action], Object.getOwnPropertyDescriptor(_class.prototype, "positionPopover"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "positionPopoverFixed", [action], Object.getOwnPropertyDescriptor(_class.prototype, "positionPopoverFixed"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "positionPopoverFluid", [action], Object.getOwnPropertyDescriptor(_class.prototype, "positionPopoverFluid"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "registerButton", [action], Object.getOwnPropertyDescriptor(_class.prototype, "registerButton"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "registerPanel", [action], Object.getOwnPropertyDescriptor(_class.prototype, "registerPanel"), _class.prototype)), _class)));

export { ANCHOR_POSITIONS, DISPLAY, EuiPopoverComponent as default, getPopoverAlignFromAnchorPosition, getPopoverPositionFromAnchorPosition };
//# sourceMappingURL=eui-popover.js.map
