Drupal.behaviors.themekitSearch={attach:function(e){var t=document.body,r=e.classList&&e.classList.contains("region-header")?e:e.querySelector(".region-header");if(r){var a=r.querySelector(".search-wrapper");if(a){var s=once("search-popup-toggle",r.querySelectorAll(".search-popup-toggle"),e);s.length&&s.forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault(),a.classList.toggle("is-search-open"),r.querySelector(".navigation-wrapper.is-active")||t.classList.toggle("is-overflow"),a.classList.contains("is-search-open")?e.target.setAttribute("aria-expanded","true"):e.target.setAttribute("aria-expanded","false")}))}));var i=r.querySelectorAll(".close-popup");i.length&&i.forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault(),a.classList.remove("is-search-open"),r.querySelector(".navigation-wrapper.is-active")||t.classList.remove("is-overflow"),a.querySelector(".search-popup-toggle").setAttribute("aria-expanded","false")}))}))}}}};