!function(){const t=document.getElementById("site-navigation");if(t){const a=t.getElementsByTagName("button")[0];if(void 0!==a){const i=t.getElementsByTagName("ul")[0];if(void 0!==i){i.classList.contains("nav-menu")||i.classList.add("nav-menu"),a.addEventListener("click",function(){t.classList.toggle("toggled"),"true"===a.getAttribute("aria-expanded")?a.setAttribute("aria-expanded","false"):a.setAttribute("aria-expanded","true")}),document.addEventListener("click",function(e){t.contains(e.target)||(t.classList.remove("toggled"),a.setAttribute("aria-expanded","false"))});var e=i.getElementsByTagName("a"),n=i.querySelectorAll(".menu-item-has-children > a, .page_item_has_children > a");for(const o of e)o.addEventListener("focus",s,!0),o.addEventListener("blur",s,!0);for(const c of n)c.addEventListener("touchstart",s,!1)}else a.style.display="none";function s(){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")}}}}}();