!function(){const e=document.getElementById("site-navigation");if(!e)return;const t=e.getElementsByTagName("button")[0];if(void 0===t)return;const n=e.getElementsByTagName("ul")[0];if(void 0===n)return void(t.style.display="none");n.classList.contains("nav-menu")||n.classList.add("nav-menu"),t.addEventListener("click",(function(){e.classList.toggle("toggled"),"true"===t.getAttribute("aria-expanded")?t.setAttribute("aria-expanded","false"):t.setAttribute("aria-expanded","true")})),document.addEventListener("click",(function(n){e.contains(n.target)||(e.classList.remove("toggled"),t.setAttribute("aria-expanded","false"))}));const s=n.getElementsByTagName("a"),a=n.querySelectorAll(".menu-item-has-children > a, .page_item_has_children > a");for(const e of s)e.addEventListener("focus",i,!0),e.addEventListener("blur",i,!0);for(const e of a)e.addEventListener("touchstart",i,!1);function i(){if("focus"===event.type||"blur"===event.type){let e=this;for(;!e.classList.contains("nav-menu");)"li"===e.tagName.toLowerCase()&&e.classList.toggle("focus"),e=e.parentNode}if("touchstart"===event.type){const e=this.parentNode;event.preventDefault();for(const t of e.parentNode.children)e!==t&&t.classList.remove("focus");e.classList.toggle("focus")}}}();