!function(){var t,c,a,o,e,n=document.getElementById("astra-mobile-cart-drawer"),d=document.getElementById("masthead");function r(){var e,t,a;document.addEventListener("keyup",function(e){27===e.keyCode&&(e.preventDefault(),n.classList.remove("active"),document.documentElement.classList.remove("ast-mobile-cart-active"),updateTrigger())}),document.addEventListener("click",function(e){e.target===document.querySelector(".ast-mobile-cart-active .astra-mobile-cart-overlay")&&(n.classList.remove("active"),document.documentElement.classList.remove("ast-mobile-cart-active"))}),void 0!==c&&""!==c&&null!==c&&(e="flyout"==astra_cart.desktop_layout?document.querySelectorAll(".ast-mobile-header-wrap .ast-header-woo-cart, #ast-desktop-header .ast-desktop-cart-flyout"):document.querySelectorAll(".ast-mobile-header-wrap .ast-header-woo-cart"),t=document.querySelector(".ast-mobile-header-wrap .ast-header-edd-cart"),a=document.querySelector(".astra-cart-drawer-close"),0{document.querySelector("#astra-mobile-cart-drawer").classList.add("active"),document.querySelector("html").classList.add("ast-mobile-cart-active"),e.preventDefault()}),o=window.innerWidth,window.addEventListener("resize",function(){var e,t=document.querySelector(".astra-cart-drawer-close");void 0!==t&&""!==t&&null!==t&&"INPUT"!==document.activeElement.tagName&&n.classList.contains("active")&&(e=window.innerWidth)!==o&&(o=e,t.click())}),window.addEventListener("load",function(){r()}),document.addEventListener("astLayoutWidthChanged",function(){r()}),document.addEventListener("astPartialContentRendered",function(){r()}),window.addEventListener("resize",function(){clearTimeout(e),e=setTimeout(function(){r(),document.dispatchEvent(new CustomEvent("astLayoutWidthChanged",{detail:{response:""}}))},50)}))}();