export const __webpack_esm_id__=953;export const __webpack_esm_ids__=[405,837,953,2050,4431,6812,9669];export const __webpack_esm_modules__={837(e,t,i){i(8371),i(1821),i(9773);var o,r=i(9609),s=i(878),n=i(4084),l=i(2927),h=i(8899),a=i(3842),d=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};!function(e){let t=class extends l.LitElement{constructor(){super(...arguments),this.monthFormat="MMMM yyyy",this.filterParams=void 0,this.handleMonthChange=void 0,this.onRetry=void 0,this.datePickerProps=void 0,this.errorMessages={},this.shortDay=!1,this.isDatePickerMonthLoading=!1,this.isDatePickerMonthError=!1,this.viewAnchorDate=(0,s.tB)(),this.localeMonth=void 0,this.setDate=(e,t)=>{this.viewAnchorDate=e,null==t||t()},this.increaseMonth=e=>{const{handleMonthChange:t}=this,{viewAnchorDate:i}=this;this.setDate((0,s.PS)(i,1),()=>t&&t(e,this.viewAnchorDate))},this.decreaseMonth=e=>{const{handleMonthChange:t}=this,{viewAnchorDate:i}=this;this.setDate((0,s.SL)(i,1),()=>t&&t(e,this.viewAnchorDate))},this.handleRetryClick=()=>{this.onRetry&&this.onRetry()},this.renderMonthName=()=>l.html` <div class="md-datepicker__navigation--current-month" aria-live="polite">${this.localeMonth}</div> `,this.renderPreviousMonthButton=()=>{var e,t;const i=(null===(e=this.filterParams)||void 0===e?void 0:e.minDate)&&(0,s.PD)(this.viewAnchorDate,null===(t=this.filterParams)||void 0===t?void 0:t.minDate);return l.html`
        <md-button
          variant="ghost"
          circle
          size="28"
          aria-controls="Datepicker-Calendar"
          aria-label=${"previous month"}
          title=${"previous month"}
          ?disabled=${i}
          @click=${!i&&this.decreaseMonth}
        >
          <md-icon name="arrow-left-bold" size="16" iconSet="momentumDesign" aria-hidden="true"></md-icon>
        </md-button>
      `},this.renderNextMonthButton=()=>{var e,t;const i=(null===(e=this.filterParams)||void 0===e?void 0:e.maxDate)&&(0,s.FO)(this.viewAnchorDate,null===(t=this.filterParams)||void 0===t?void 0:t.maxDate);return l.html`
        <md-button
          variant="ghost"
          circle
          size="28"
          aria-controls="Datepicker-Calendar"
          aria-label=${"next month"}
          title=${"next month"}
          ?disabled=${i}
          @click=${!i&&this.increaseMonth}
          ><md-icon name="arrow-right-bold" size="16" iconSet="momentumDesign" aria-hidden="true"></md-icon>
        </md-button>
      `},this.header=()=>{var e;const t=(0,s.mK)(this.viewAnchorDate,null===(e=this.datePickerProps)||void 0===e?void 0:e.weekStart);return[].concat([0,1,2,3,4,5,6].map(e=>{var i;const o=(0,s.fi)((0,s.WV)(t,(null===(i=this.datePickerProps)||void 0===i?void 0:i.locale)||"en"),e),r=(0,s.XN)(o),n=this.getWeekDayName(r,o);return l.html` <div class="md-datepicker__day--name">${n}</div> `}))}}connectedCallback(){var e,t,i;super.connectedCallback(),this.viewAnchorDate=(null===(e=this.datePickerProps)||void 0===e?void 0:e.focused)||(null===(t=this.datePickerProps)||void 0===t?void 0:t.selected)||(0,s.tB)(),this.localeMonth=(0,s.WV)(this.viewAnchorDate,(null===(i=this.datePickerProps)||void 0===i?void 0:i.locale)||"en").toFormat(this.monthFormat)}updated(e){var t,i,o,r,n,l;if(super.updated(e),e.has("datePickerProps")){const n=e.get("datePickerProps"),l=null===(t=this.datePickerProps)||void 0===t?void 0:t.selected,h=null===(i=this.datePickerProps)||void 0===i?void 0:i.focused;if(null===(null==l?void 0:l.invalidReason)&&(!(null==n?void 0:n.selected)||!(0,s.ro)(n.selected,l))&&(this.viewAnchorDate=l||(0,s.tB)()),null==h?void 0:h.isValid){const e=!(null==n?void 0:n.focused)||!(0,s.ro)(n.focused,h),t=h.month!==this.viewAnchorDate.month||h.year!==this.viewAnchorDate.year;e&&t&&(this.viewAnchorDate=h)}this.localeMonth=((null===(o=this.datePickerProps)||void 0===o?void 0:o.locale)?(0,s.WV)(this.viewAnchorDate,null===(r=this.datePickerProps)||void 0===r?void 0:r.locale):this.viewAnchorDate).toFormat(this.monthFormat)}e.has("viewAnchorDate")&&(this.localeMonth=((null===(n=this.datePickerProps)||void 0===n?void 0:n.locale)?(0,s.WV)(this.viewAnchorDate,null===(l=this.datePickerProps)||void 0===l?void 0:l.locale):this.viewAnchorDate).toFormat(this.monthFormat))}getWeekDayName(e,t){return this.shortDay?(0,s.XY)(e,t):(0,s.DY)(e,t)}renderLoader(){return l.html`
        <div class="md-datepicker__loading">
          <div class="md-datepicker__loading-text">${this.errorMessages.LOADING}</div>
          <md-spinner size="32"></md-spinner>
        </div>
      `}renderDateError(){return l.html`
        <div class="md-datepicker__error-container">
          <md-icon name="error-legacy-bold" size="24" iconSet="momentumDesign" class="md-datepicker__error-icon">
          </md-icon>
          <div class="md-datepicker__error-header">${this.errorMessages.HEADER}</div>
          <div class="md-datepicker__error-text">${this.errorMessages.TEXT}</div>
          <md-button variant="secondary" size="24" @click=${this.handleRetryClick}>
            <md-icon slot="icon" name="refresh-bold" size="14" iconSet="momentumDesign"></md-icon>
            <span slot="text">${this.errorMessages.RETRY}</span>
          </md-button>
        </div>
      `}renderMonthContent(){return this.isDatePickerMonthError?this.renderDateError():this.isDatePickerMonthLoading?this.renderLoader():l.html`
        <md-datepicker-month
          .day=${this.viewAnchorDate}
          .filterParams=${this.filterParams}
          .datePickerProps=${this.datePickerProps}
        >
        </md-datepicker-month>
      `}renderMonth(){return l.html`
        <div class="md-datepicker__month-container">
          <div class="md-datepicker__header">
            <div class="md-datepicker__navigation">
              ${this.renderMonthName()}
              <div class="md-datepicker__navigation--buttons">
                ${this.renderPreviousMonthButton()} ${this.renderNextMonthButton()}
              </div>
            </div>
            <div class="md-datepicker__day--names">${this.header()}</div>
          </div>
          ${this.renderMonthContent()}
        </div>
      `}static get styles(){return[n.A,a.A]}render(){return l.html`
        <div class="md-datepicker__calendar" id="Datepicker-Calendar">${this.viewAnchorDate&&this.renderMonth()}</div>
      `}};d([(0,h.property)({attribute:!1})],t.prototype,"monthFormat",void 0),d([(0,h.property)({attribute:!1})],t.prototype,"filterParams",void 0),d([(0,h.property)({attribute:!1})],t.prototype,"handleMonthChange",void 0),d([(0,h.property)({attribute:!1})],t.prototype,"onRetry",void 0),d([(0,h.property)({attribute:!1})],t.prototype,"datePickerProps",void 0),d([(0,h.property)({type:Object,attribute:!1})],t.prototype,"errorMessages",void 0),d([(0,h.property)({type:Boolean,reflect:!0,attribute:"short-day"})],t.prototype,"shortDay",void 0),d([(0,h.property)({type:Boolean,reflect:!0,attribute:"is-date-picker-month-loading"})],t.prototype,"isDatePickerMonthLoading",void 0),d([(0,h.property)({type:Boolean,reflect:!0,attribute:"is-date-picker-month-error"})],t.prototype,"isDatePickerMonthError",void 0),d([(0,h.state)()],t.prototype,"viewAnchorDate",void 0),d([(0,h.state)()],t.prototype,"localeMonth",void 0),t=d([(0,r.w)("md-datepicker-calendar")],t),e.ELEMENT=t}(o||(o={}))},405(e,t,i){i.d(t,{I:()=>g}),i(5983),i(1821);var o=i(9609),r=i(9938),s=i(2050),n=i(4098),l=i(2927),h=i(8899),a=i(1334),d=i(2450),c=i(8775),p=i(2962),u=i(5601),v=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n},m=function(e,t,i,o){return new(i||(i=Promise))(function(r,s){function n(e){try{h(o.next(e))}catch(e){s(e)}}function l(e){try{h(o.throw(e))}catch(e){s(e)}}function h(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(n,l)}h((o=o.apply(e,t||[])).next())})};class g{show(e){}hide(){}toggle(){}isVisible(){return!1}}let y=class extends((0,r.d)(l.LitElement)){set controller(e){e?(e.show=(e=!1)=>this.showPopover(e),e.hide=()=>this.hidePopover(),e.toggle=()=>this.togglePopoverVisible(),e.isVisible=()=>this.visible,this._controller=e):this._controller=null}get controller(){return this._controller}constructor(){super(),this.id="",this.triggerID="",this.trigger=a.zY.TRIGGER,this.placement=a.zY.PLACEMENT,this.strategy=a.zY.STRATEGY,this.color=a.zY.COLOR,this.visible=a.zY.VISIBLE,this.offset=a.zY.OFFSET,this.focusTrap=a.zY.FOCUS_TRAP,this.preventScroll=a.zY.PREVENT_SCROLL,this.showArrow=a.zY.ARROW,this.closeButton=a.zY.CLOSE_BUTTON,this.interactive=a.zY.INTERACTIVE,this.delay=a.zY.DELAY,this.hideOnEscape=a.zY.HIDE_ON_ESCAPE,this.hideOnBlur=a.zY.HIDE_ON_BLUR,this.hideOnWindowBlur=a.zY.HIDE_ON_WINDOW_BLUR,this.hideOnOutsideClick=a.zY.HIDE_ON_CLICK_OUTSIDE,this.hideOnOutsidePointerDown=a.zY.HIDE_ON_POINTER_DOWN_OUTSIDE,this.hideOnScroll=a.zY.HIDE_ON_SCROLL,this.hideOnWheel=a.zY.HIDE_ON_WHEEL,this.focusBackToTrigger=a.zY.FOCUS_BACK,this.backdrop=a.zY.BACKDROP,this.flip=a.zY.FLIP,this.size=a.zY.SIZE,this.zIndex=a.zY.Z_INDEX,this.appendTo="",this.closeButtonAriaLabel=null,this.role=a.zY.ROLE,this.ariaLabelledby=null,this.ariaDescribedby=null,this.disableAriaExpanded=a.zY.DISABLE_ARIA_EXPANDED,this.animationFrame=a.zY.ANIMATION_FRAME,this._controller=null,this.arrowElement=null,this.triggerElement=null,this.hoverTimer=null,this.isTriggerClicked=!1,this.openDelay=0,this.closeDelay=0,this.backdropElement=null,this.useLegacyFindFocusable=()=>!1,this.cleanupAutoUpdate=null,this.previousActiveElement=null,this.onOutsidePopoverClick=e=>{this.shouldIgnoreDismissEvent(e)||this.hideThisPopover()},this.onOutsidePopoverPointerDown=e=>{this.shouldIgnoreDismissEvent(e)||this.hideThisPopover()},this.onOutsidePopoverScrollOrWheel=e=>{this.shouldIgnoreDismissEvent(e)||this.hideThisPopover()},this.hideThisPopover=()=>{setTimeout(()=>{this.visible=!1,this.isTriggerClicked=!1,this.utils.handleAppendTo(!1)},this.closeDelay)},this.onEscapeKeydown=e=>{const t="Escape"===e.key||"Escape"===e.code;if(!this.visible||!t)return;const i=c.S.peek();i&&i!==this||(e.preventDefault(),e.stopImmediatePropagation(),this.hideThisPopover())},this.onPopoverFocusOut=e=>{const t=e.relatedTarget;!t||this.isElementInPopover(t)?t||setTimeout(()=>{const e=(0,s.dw)();this.isElementInPopover(e)||this.hidePopover()},0):this.hidePopover()},this.handleWindowBlurEvent=()=>{this.visible&&this.hidePopover()},this.startCloseDelay=()=>{if(this.interactive){if(this.isTriggerClicked)return;this.hoverTimer=window.setTimeout(()=>{this.visible=!1},this.closeDelay)}else this.hidePopover()},this.cancelCloseDelay=()=>{this.hoverTimer&&(clearTimeout(this.hoverTimer),this.hoverTimer=null)},this.showPopover=(e=!1)=>{this.cancelCloseDelay(),e&&this.openDelay>0?setTimeout(()=>{this.utils.handleAppendTo(!0),this.visible=!0},this.openDelay):(this.utils.handleAppendTo(!0),this.visible=!0)},this.hidePopover=()=>{c.S.peek()===this&&setTimeout(()=>{this.visible=!1,this.isTriggerClicked=!1,this.utils.handleAppendTo(!1)},this.closeDelay)},this.togglePopoverVisible=()=>{this.isTriggerClicked?this.hidePopover():(this.showPopover(),this.isTriggerClicked=!0)},this.onMouseEnterTrigger=()=>{this.trigger.includes("mouseenter")&&(this.visible||(this.previousActiveElement=(0,s.dw)()),this.showPopover(!0))},this.onFocusInTrigger=()=>{this.trigger.includes("focusin")&&this.showPopover(!1)},this.onTriggerClick=e=>{this.trigger.includes("mouseenter")&&this.isMouseOverTrigger(e)||this.togglePopoverVisible()},this.onTriggerKeydown=e=>{this.visible&&("Escape"!==e.key&&"Escape"!==e.code||!this.hideOnEscape?this.focusTrap&&this.activeFocusTrap&&this.appendTo&&"Tab"===e.key&&this.handleKeydownFocusTrap(e):this.onEscapeKeydown(e))},this.utils=new p.h(this),this.preventClickOutside=!0}firstUpdated(e){const t=Object.create(null,{firstUpdated:{get:()=>super.firstUpdated}});return m(this,void 0,void 0,function*(){t.firstUpdated.call(this,e),[this.openDelay,this.closeDelay]=this.utils.setupDelay(),this.utils.setupAccessibility(),this.style.zIndex=`${this.zIndex}`,d.T.onCreatedPopover(this),this.visible&&(this.utils.handleAppendTo(!0),this.positionPopover(),yield this.handleCreatePopoverFirstUpdate())})}disconnectedCallback(){const e=Object.create(null,{disconnectedCallback:{get:()=>super.disconnectedCallback}});return m(this,void 0,void 0,function*(){var t;e.disconnectedCallback.call(this),this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),document.removeEventListener("click",this.onOutsidePopoverClick),document.removeEventListener("pointerdown",this.onOutsidePopoverPointerDown,!0),window.removeEventListener("scroll",this.onOutsidePopoverScrollOrWheel,!0),window.removeEventListener("wheel",this.onOutsidePopoverScrollOrWheel,!0),window.removeEventListener("keydown",this.onEscapeKeydown,!0),null===(t=this.triggerElement)||void 0===t||t.removeEventListener("keydown",this.onTriggerKeydown),this._controller=null,this.previousActiveElement=null,this.removeEventListeners(),d.T.onDestroyedPopover(this),c.S.remove(this)})}setupTriggerListener(){if(!this.triggerID)return;const e=this.getRootNode();if(this.triggerElement=(0,s.qi)(`[id="${this.triggerID}"]`,e),!this.triggerElement){const t=null==e?void 0:e.host;if(t){const e=t.querySelector("[slot]");(null==e?void 0:e.id)===this.triggerID&&(this.triggerElement=e)}}if(this.triggerElement){if("mouseenter"===this.trigger&&(this.interactive?this.trigger="mouseenter click":this.trigger="mouseenter focusin"),this.trigger.includes("click")&&this.triggerElement.addEventListener("click",this.onTriggerClick),this.trigger.includes("mouseenter")){const e=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.addEventListener("mouseenter",this.onMouseEnterTrigger),this.triggerElement.addEventListener("mouseleave",this.startCloseDelay),this.addEventListener("mouseenter",this.cancelCloseDelay),this.addEventListener("mouseleave",this.startCloseDelay),null==e||e.addEventListener("mouseenter",this.cancelCloseDelay)}this.trigger.includes("focusin")&&(this.triggerElement.addEventListener("focusin",this.onFocusInTrigger),this.interactive||this.triggerElement.addEventListener("focusout",this.hidePopover)),this.addEventListener("focus-trap-exit",this.hidePopover)}}removeEventListeners(){if(!this.triggerElement)return;const e=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.removeEventListener("click",this.onTriggerClick),this.triggerElement.removeEventListener("mouseenter",this.onMouseEnterTrigger),this.triggerElement.removeEventListener("mouseleave",this.hidePopover),this.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("mouseleave",this.startCloseDelay),this.triggerElement.removeEventListener("focusin",this.onFocusInTrigger),this.triggerElement.removeEventListener("focusout",this.hidePopover),null==e||e.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("focus-trap-exit",this.hidePopover)}updated(e){const t=Object.create(null,{updated:{get:()=>super.updated}});return m(this,void 0,void 0,function*(){if(t.updated.call(this,e),e.has("visible")){const t=e.get("visible")||!1;yield this.isOpenUpdated(t,this.visible),this.utils.updateAriaExpandedAttribute()}if(e.has("placement")&&this.setAttribute("placement",Object.values(a.ME).includes(this.placement)?this.placement:a.zY.PLACEMENT),e.has("delay")&&([this.openDelay,this.closeDelay]=this.utils.setupDelay()),e.has("trigger")){const e=this.trigger.split(" ").filter(e=>Object.values(a.tr).includes(e));this.setAttribute("trigger",e.length>0?this.trigger:a.zY.TRIGGER),this.removeEventListeners(),this.setupTriggerListener()}e.has("triggerID")&&(this.removeEventListeners(),this.setupTriggerListener(),this.utils.setupAccessibility()),e.has("color")&&this.setAttribute("color",Object.values(a.o$).includes(this.color)?this.color:a.zY.COLOR),e.has("zIndex")&&this.setAttribute("z-index",`${this.zIndex}`),(e.has("interactive")||e.has("aria-label")||e.has("aria-labelledby"))&&this.utils.setupAccessibility(),e.has("disableAriaExpanded")&&this.utils.updateAriaExpandedAttribute(),e.has("interactive")&&this.utils.updateAriaHasPopupAttribute()})}shouldIgnoreDismissEvent(e){const t=e.composedPath();return!(!this.triggerElement||!t.includes(this.triggerElement))||!!t.includes(this)||!!c.S.shouldDeferToTopForOutsideClick(this)}isElementInPopover(e){return!!e&&(!!this.contains(e)||(0,s.QZ)("md-popover",e)===this)}isOpenUpdated(e,t){return m(this,void 0,void 0,function*(){var i,o,r,s;if(e!==t&&this.triggerElement)if(t)c.S.peek()!==this&&c.S.push(this),this.focusTrap&&(null===(i=this.activateFocusTrap)||void 0===i||i.call(this)),this.backdrop&&(this.utils.createBackdrop(),this.triggerElement.style.zIndex=`${this.zIndex}`),this.utils.handleAppendTo(!0),this.positionPopover(),yield this.handleCreatePopoverFirstUpdate(),this.hideOnBlur&&(this.addEventListener("focusout",this.onPopoverFocusOut),"click"===this.trigger&&(this.triggerElement.style.pointerEvents="none")),this.hideOnWindowBlur&&window.addEventListener("blur",this.handleWindowBlurEvent),this.hideOnOutsideClick&&document.addEventListener("click",this.onOutsidePopoverClick),this.hideOnOutsidePointerDown&&document.addEventListener("pointerdown",this.onOutsidePopoverPointerDown,!0),this.hideOnScroll&&window.addEventListener("scroll",this.onOutsidePopoverScrollOrWheel,!0),this.hideOnWheel&&window.addEventListener("wheel",this.onOutsidePopoverScrollOrWheel,!0),this.hideOnEscape&&window.addEventListener("keydown",this.onEscapeKeydown,!0),this.focusTrap&&this.triggerElement&&this.triggerElement.addEventListener("keydown",this.onTriggerKeydown),d.T.onShowPopover(this);else{if(this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),c.S.removeItem(this),this.utils.handleAppendTo(!1),this.backdropElement&&(null===(o=this.backdropElement)||void 0===o||o.remove(),this.backdropElement=null),this.hideOnBlur&&(this.removeEventListener("focusout",this.onPopoverFocusOut),"click"===this.trigger&&(this.triggerElement.style.pointerEvents="")),this.hideOnWindowBlur&&window.removeEventListener("blur",this.handleWindowBlurEvent),this.hideOnOutsideClick&&document.removeEventListener("click",this.onOutsidePopoverClick),this.hideOnOutsidePointerDown&&document.removeEventListener("pointerdown",this.onOutsidePopoverPointerDown,!0),this.hideOnScroll&&window.removeEventListener("scroll",this.onOutsidePopoverScrollOrWheel,!0),this.hideOnWheel&&window.removeEventListener("wheel",this.onOutsidePopoverScrollOrWheel,!0),this.hideOnEscape&&window.removeEventListener("keydown",this.onEscapeKeydown,!0),this.triggerElement&&this.triggerElement.removeEventListener("keydown",this.onTriggerKeydown),null===(r=this.deactivateFocusTrap)||void 0===r||r.call(this),this.disableAriaExpanded||this.triggerElement.removeAttribute("aria-expanded"),this.interactive){const e=this.triggerElement.getAttribute("aria-haspopup");"dialog"!==e&&"alertdialog"!==e||this.triggerElement.removeAttribute("aria-haspopup")}this.focusBackToTrigger&&(this.previousActiveElement instanceof HTMLElement?this.previousActiveElement.focus():null===(s=this.setFocusOnDeepestNestedElement)||void 0===s||s.call(this,this.triggerElement)),this.previousActiveElement=null,d.T.onHidePopover(this)}})}isRectOverTrigger(e,t){if(this.triggerElement&&"undefined"!=typeof window&&"undefined"!=typeof document){const i=this.triggerElement.getBoundingClientRect();return e>=i.left&&e<=i.right&&t>=i.top&&t<=i.bottom}return!1}isMouseOverTrigger(e){const{clientX:t,clientY:i}=e instanceof MouseEvent?e:{clientX:0,clientY:0};return this.isRectOverTrigger(t,i)}setFocusableElements(){var e;null===(e=super.setFocusableElements)||void 0===e||e.call(this);const t=this.triggerElement;this.appendTo&&this.activeFocusTrap&&t&&this.focusableElements&&(this.focusableElements.includes(t)||this.focusableElements.push(t))}handleCreatePopoverFirstUpdate(){return m(this,void 0,void 0,function*(){var e,t;this.visible&&this.interactive&&(null===(e=this.setFocusableElements)||void 0===e||e.call(this),yield this.updateComplete,null===(t=this.setInitialFocus)||void 0===t||t.call(this))})}positionPopover(){if(!this.triggerElement)return;this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null);const e=[(0,n.shift)()];let t=this.offset;if(this.flip&&e.push((0,n.flip)()),this.size){const t=this.renderRoot.querySelector('[part="popover-content"]');e.push((0,n.size)({apply({availableHeight:e}){t&&Object.assign(t.style,{maxHeight:`${e}px`,overflowY:"auto"})},padding:50}))}if(this.showArrow&&(this.arrowElement=this.renderRoot.querySelector(".popover-arrow"),this.arrowElement)){const i=this.arrowElement.offsetHeight;t=Math.sqrt(2*i**2)/2+this.offset,e.push((0,n.arrow)({element:this.arrowElement,padding:12}))}e.push((0,n.offset)(t)),this.cleanupAutoUpdate=(0,n.autoUpdate)(this.triggerElement,this,()=>m(this,void 0,void 0,function*(){if(!this.triggerElement)return;const{x:t,y:i,middlewareData:o,placement:r}=yield(0,n.computePosition)(this.triggerElement,this,{placement:this.placement,middleware:e,strategy:this.strategy});this.utils.updatePopoverStyle(t,i),o.arrow&&this.arrowElement&&this.utils.updateArrowStyle(o.arrow,r),this.trigger.includes("mouseenter")&&this.utils.setupHoverBridge(r)}),{animationFrame:this.animationFrame})}render(){return l.html`
      <div class="popover-hover-bridge"></div>
      ${this.closeButton?l.html` <md-button
            class="popover-close"
            hasRemoveStyle
            size="20"
            circle
            .ariaLabel=${this.closeButtonAriaLabel}
            @button-click=${this.hidePopover}
          >
            <md-icon name="cancel-bold" size="16" iconSet="momentumDesign"></md-icon>
          </md-button>`:l.nothing}
      ${this.showArrow?l.html`<div class="popover-arrow"></div>`:l.nothing}
      <div part="popover-content">
        <slot></slot>
      </div>
    `}static get styles(){return[u.A]}};v([(0,h.property)({type:String,reflect:!0})],y.prototype,"id",void 0),v([(0,h.property)({type:String,reflect:!0})],y.prototype,"triggerID",void 0),v([(0,h.property)({type:String,reflect:!0})],y.prototype,"trigger",void 0),v([(0,h.property)({type:String,reflect:!0})],y.prototype,"placement",void 0),v([(0,h.property)({type:String,reflect:!0})],y.prototype,"strategy",void 0),v([(0,h.property)({type:String,reflect:!0})],y.prototype,"color",void 0),v([(0,h.property)({type:Boolean,reflect:!0})],y.prototype,"visible",void 0),v([(0,h.property)({type:Number,reflect:!0})],y.prototype,"offset",void 0),v([(0,h.property)({type:Boolean,reflect:!0,attribute:"focus-trap"})],y.prototype,"focusTrap",void 0),v([(0,h.property)({type:Boolean,reflect:!0,attribute:"prevent-scroll"})],y.prototype,"preventScroll",void 0),v([(0,h.property)({type:Boolean,reflect:!0,attribute:"show-arrow"})],y.prototype,"showArrow",void 0),v([(0,h.property)({type:Boolean,reflect:!0,attribute:"close-button"})],y.prototype,"closeButton",void 0),v([(0,h.property)({type:Boolean,reflect:!0})],y.prototype,"interactive",void 0),v([(0,h.property)({type:String,reflect:!0})],y.prototype,"delay",void 0),v([(0,h.property)({type:Boolean,reflect:!0,attribute:"hide-on-escape"})],y.prototype,"hideOnEscape",void 0),v([(0,h.property)({type:Boolean,reflect:!0,attribute:"hide-on-blur"})],y.prototype,"hideOnBlur",void 0),v([(0,h.property)({type:Boolean,reflect:!0,attribute:"hide-on-window-blur"})],y.prototype,"hideOnWindowBlur",void 0),v([(0,h.property)({type:Boolean,reflect:!0,attribute:"hide-on-outside-click"})],y.prototype,"hideOnOutsideClick",void 0),v([(0,h.property)({type:Boolean,reflect:!0,attribute:"hide-on-outside-pointerdown"})],y.prototype,"hideOnOutsidePointerDown",void 0),v([(0,h.property)({type:Boolean,reflect:!0,attribute:"hide-on-scroll"})],y.prototype,"hideOnScroll",void 0),v([(0,h.property)({type:Boolean,reflect:!0,attribute:"hide-on-wheel"})],y.prototype,"hideOnWheel",void 0),v([(0,h.property)({type:Boolean,reflect:!0,attribute:"focus-back-to-trigger"})],y.prototype,"focusBackToTrigger",void 0),v([(0,h.property)({type:Boolean,reflect:!0})],y.prototype,"backdrop",void 0),v([(0,h.property)({type:Boolean,reflect:!0})],y.prototype,"flip",void 0),v([(0,h.property)({type:Boolean,reflect:!0})],y.prototype,"size",void 0),v([(0,h.property)({type:Number,reflect:!0,attribute:"z-index"})],y.prototype,"zIndex",void 0),v([(0,h.property)({type:String,reflect:!0,attribute:"append-to"})],y.prototype,"appendTo",void 0),v([(0,h.property)({type:String,attribute:"close-button-aria-label",reflect:!0})],y.prototype,"closeButtonAriaLabel",void 0),v([(0,h.property)({type:String,reflect:!0})],y.prototype,"role",void 0),v([(0,h.property)({type:String,reflect:!0,attribute:"aria-labelledby"})],y.prototype,"ariaLabelledby",void 0),v([(0,h.property)({type:String,reflect:!0,attribute:"aria-describedby"})],y.prototype,"ariaDescribedby",void 0),v([(0,h.property)({type:Boolean,reflect:!0,attribute:"disable-aria-expanded"})],y.prototype,"disableAriaExpanded",void 0),v([(0,h.property)({type:Boolean,reflect:!0,attribute:"animation-frame"})],y.prototype,"animationFrame",void 0),v([(0,h.property)({type:Object,attribute:!1})],y.prototype,"controller",null),y=v([(0,o.w)("md-popover")],y)},2050(e,t,i){function o(e,t,i){let o;return function(...r){const s=this,n=i&&!o;clearTimeout(o),o=setTimeout(function(){o=null,i||e.apply(s,r)},t),n&&e.apply(s,r)}}function r(e,t){return function t(i){if(!i||i===document||i===window)return null;const o=i.closest(e);return null!=o?o:t(i.getRootNode().host)}(t)}function s(e,t=document){var i;const o=t instanceof ShadowRoot||t instanceof Document?t.querySelector(e):null===(i=t.shadowRoot)||void 0===i?void 0:i.querySelector(e);if(o)return o;const r=Array.from(t.querySelectorAll("*")).map(e=>{var t;return null!==(t=e.shadowRoot)&&void 0!==t?t:null}).filter(e=>null!==e);for(const t of r){const i=s(e,t);if(i)return i}return null}function n(e,t=document){if(t instanceof ShadowRoot||t instanceof Document){const i=t.getElementById(e);if(i)return i}const i=Array.from(t.querySelectorAll("*")).map(e=>{var t;return null!==(t=e.shadowRoot)&&void 0!==t?t:null}).filter(e=>null!==e);for(const t of i){const i=n(e,t);if(i)return i}return null}function l(){var e;let t=document.activeElement;for(;null===(e=null==t?void 0:t.shadowRoot)||void 0===e?void 0:e.activeElement;)t=t.shadowRoot.activeElement;return t}i.d(t,{QZ:()=>r,XI:()=>n,dw:()=>l,qi:()=>s,sg:()=>o})}};