1class Modal extends HTMLElement{constructor(){super(),this.button_open=null,this.button_close=null,this.modal=null,this.body=null,this._initialized=!1}connectedCallback(){this.button_open=this.querySelector("open-modal"),this.button_open&&this.button_open.addEventListener("click",()=>this.initAndOpen())}initAndOpen(){if(this._initialized)return this.open();const template=this.querySelector("template");template&&(this.appendChild(template.content.cloneNode(!0)),template.remove()),this.modal=this.querySelector("dialog"),this.modal&&(this.button_close=this.querySelector("close-modal"),this.body=document.body,this.button_close&&this.button_close.addEventListener("click",()=>this.close()),this.modal.addEventListener("click",event=>this.handleBackdropClick(event)),this._initialized=!0,this.open())}handleBackdropClick(event){if(event.target===this.modal){const rect=this.modal.getBoundingClientRect();rect.top<=event.clientY&&event.clientY<=rect.top+rect.height&&rect.left<=event.clientX&&event.clientX<=rect.left+rect.width||this.close()}}open(){this.modal&&typeof this.modal.showModal=="function"&&(this.modal.showModal(),this.body.style.overflow="hidden")}close(){this.modal&&typeof this.modal.close=="function"&&(this.modal.classList.add("closing"),setTimeout(()=>{this.modal.classList.remove("closing"),this.modal.close()},400),this.body.style.overflow="auto")}}customElements.define("modal-component",Modal); 2//# sourceMappingURL=/cdn/shop/t/7/assets/modal.js.map?v=110078231057918236781772643406
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.