!function(){var e=document.querySelector(".search--flyout");if(null!==e){e.setAttribute("aria-hidden",!0);var t=e.querySelectorAll("input");t.forEach((function(e){return e.setAttribute("tabindex",-1)}));var n=e.querySelector("input[name=query]"),r=function(){n.blur(),e.setAttribute("aria-hidden",!0),t.forEach((function(e){return e.setAttribute("tabindex",-1)})),document.body.classList.remove("search-is-active")};Drupal.toggleFlyoutSearch=function(u){u?(n.focus(),e.setAttribute("aria-hidden",!1),t.forEach((function(e){return e.removeAttribute("tabindex")})),document.body.classList.add("search-is-active")):r()};var u=document.createElement("button");u.setAttribute("type","button"),u.classList.add("visually-hidden","close","btn","button","focusable"),u.appendChild(document.createTextNode("Close")),u.addEventListener("click",r),u.addEventListener("blur",r),e.querySelector(".form-actions").appendChild(u),document.addEventListener("keydown",(function(e){27===e.keyCode&&r()}))}}(Drupal);