PageSourceSearch

https://horze.eu/cdn/shop/t/676/assets/menu-drawer-stq6d5ZR.js

js horze.eu collected 2026-09-24 11:35:58 UTC 1,914 bytes, 1 lines download raw bytes

1import{l as o,u as i}from"./scrollLock-DZjwVsls.js";const l='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';class a extends HTMLElement{constructor(){super(...arguments),this.toggle=null,this.onChange=()=>this.syncState(),this.onKeydown=e=>this.handleKeydown(e)}connectedCallback(){this.toggle=document.querySelector("#menu-drawer-toggle"),this.toggle&&(this.toggle.addEventListener("change",this.onChange),this.toggle.setAttribute("aria-expanded",String(this.isOpen)),this.isOpen&&o())}disconnectedCallback(){var e;(e=this.toggle)==null||e.removeEventListener("change",this.onChange),document.removeEventListener("keydown",this.onKeydown),i()}get isOpen(){var e;return((e=this.toggle)==null?void 0:e.checked)??!1}syncState(e=!1){if(this.isOpen){this.handleOpen();return}this.handleClose(e)}handleOpen(){var t;o(),(t=this.toggle)==null||t.setAttribute("aria-expanded","true"),document.addEventListener("keydown",this.onKeydown);const e=this.querySelector('[role="dialog"]');e==null||e.focus({preventScroll:!0})}handleClose(e){var t,n;i(),(t=this.toggle)==null||t.setAttribute("aria-expanded","false"),document.removeEventListener("keydown",this.onKeydown),this.resetSubmenus(),e&&((n=this.toggle)==null||n.focus({preventScroll:!0}))}resetSubmenus(){this.querySelectorAll("[data-submenu][data-open]").forEach(e=>e.removeAttribute("data-open"))}close(){this.toggle&&(this.toggle.checked=!1,this.syncState(!0))}handleKeydown(e){if(e.key==="Escape"){this.close();return}e.key==="Tab"&&this.trapFocus(e)}trapFocus(e){const t=Array.from(this.querySelectorAll(l)).filter(r=>r.offsetParent!==null);if(!t.length)return;const n=t[0],s=t[t.length-1];e.shiftKey&&document.activeElement===n?(e.preventDefault(),s.focus()):!e.shiftKey&&document.activeElement===s&&(e.preventDefault(),n.focus())}}customElements.define("menu-drawer",a);

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.