1if(!customElements.get('quantity-popover')){customElements.define('quantity-popover',class QuantityPopover extends HTMLElement{constructor(){super();this.mql=window.matchMedia('(min-width: 990px)');this.mqlTablet=window.matchMedia('(min-width: 750px)');this.infoButtonDesktop=this.querySelector('.quantity-popover__info-button--icon-only');this.infoButtonMobile=this.querySelector('.quantity-popover__info-button--icon-with-label');this.popoverInfo=this.querySelector('.quantity-popover__info');this.closeButton=this.querySelector('.button-close');this.variantInfo=this.querySelector('.quantity-popover-container');this.eventMouseEnterHappened=!1;if(this.closeButton){this.closeButton.addEventListener('click',this.closePopover.bind(this))}if(this.popoverInfo&&this.infoButtonDesktop&&this.mql.matches){this.popoverInfo.addEventListener('mouseenter',this.closePopover.bind(this))}if(this.infoButtonDesktop){this.infoButtonDesktop.addEventListener('click',this.togglePopover.bind(this));this.infoButtonDesktop.addEventListener('focusout',this.closePopover.bind(this))}if(this.infoButtonMobile){this.infoButtonMobile.addEventListener('click',this.togglePopover.bind(this));this.infoButtonMobile.addEventListener('focusout',this.closePopover.bind(this))}if(this.infoButtonDesktop&&this.mqlTablet.matches){this.variantInfo.addEventListener('mouseenter',this.togglePopover.bind(this));this.variantInfo.addEventListener('mouseleave',this.closePopover.bind(this))}}togglePopover(event){event.preventDefault();if(event.type==='mouseenter'){this.eventMouseEnterHappened=!0}if(event.type==='click'&&this.eventMouseEnterHappened)return;const button=this.infoButtonDesktop&&this.mql.matches?this.infoButtonDesktop:this.infoButtonMobile;const isExpanded=button.getAttribute('aria-expanded')==='true';button.setAttribute('aria-expanded',!isExpanded);this.popoverInfo.toggleAttribute('hidden');const isOpen=button.getAttribute('aria-expanded')==='true';button.classList.toggle('quantity-popover__info-button--open');if(isOpen&&event.type!=='mouseenter'){button.focus()}}closePopover(event){event.preventDefault();const isChild=this.variantInfo.contains(event.relatedTarget);const button=this.infoButtonDesktop&&this.mql.matches?this.infoButtonDesktop:this.infoButtonMobile;if(!event.relatedTarget||!isChild){button.setAttribute('aria-expanded','false');button.classList.remove('quantity-popover__info-button--open');this.popoverInfo.setAttribute('hidden','')}this.eventMouseEnterHappened=!1}})}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.