PageSourceSearch

https://www.aimn.co.nz/cdn/shop/t/132/assets/drawer-menu.js?v=56266355491111410261790672546

js aimn.co.nz collected 2026-10-04 13:28:27 UTC 2,683 bytes, 2 lines download raw bytes

1(function(){if(window.drawerMenuInitialized)return;window.drawerMenuInitialized=!0;function initBannerCarousel(){var openNavButton=document.querySelector(".js-drawer-open-nav");if(openNavButton){var flickityInitialized=!1;openNavButton.addEventListener("click",function(){setTimeout(function(){var carousel=document.querySelector(".menu-drawer-banners");if(!(!carousel||flickityInitialized)){var items=carousel.querySelectorAll(".carousel-cell");items.length<2||(new Flickity(carousel,{cellAlign:"left",contain:!0,wrapAround:!0,groupCells:2,pageDots:!1,prevNextButtons:!1,draggable:!0}),flickityInitialized=!0,carousel.style.opacity="1")}},1e3)})}}function initTabSwitching(){var navDrawer=document.querySelector("#NavDrawer");if(!navDrawer)return;var tabItems=document.querySelectorAll(".menu-drawer-tabs-item"),tabContents=document.querySelectorAll(".menu-drawer-tabs-content .tab-element"),scrollable=navDrawer.querySelector(".drawer__scrollable");if(!tabItems.length||!tabContents.length)return;function hideAllTabContent(){tabContents.forEach(function(content){content.style.display="none"})}function showTabContent(blockValue){tabContents.forEach(function(content){content.getAttribute("data-block")===blockValue&&(content.style.display="flex")})}hideAllTabContent();var initialBlock=tabItems[0].getAttribute("data-block");showTabContent(initialBlock),tabItems[0].classList.add("active"),tabItems.forEach(function(item){item.addEventListener("click",function(){navDrawer.classList.remove("drawer--drilled"),document.querySelectorAll(".secondary-level__item.is-open").forEach(function(el){el.classList.remove("is-open")}),tabItems.forEach(function(tab){tab.classList.remove("active")}),item.classList.add("active");var blockValue=item.getAttribute("data-block");hideAllTabContent(),showTabContent(blockValue),scrollable&&(scrollable.scrollTop=0)})})}function initNewsletterPopup(){var newsletterButtons=document.querySelectorAll(".mailing-list-menu-drawer"),newsletterPopup=document.querySelector(".newsletter-header-popup"),closeNewsletterButton=document.querySelector(".close-header-newsletter");newsletterButtons.length&&newsletterPopup&&newsletterButtons.forEach(function(button){button.addEventListener("click",function(){newsletterPopup.classList.toggle("hide")})}),closeNewsletterButton&&newsletterPopup&&closeNewsletterButton.addEventListener("click",function(){newsletterPopup.classList.add("hide")})}function init(){initBannerCarousel(),initTabSwitching(),initNewsletterPopup()}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",init):init()})();
2//# sourceMappingURL=/cdn/shop/t/132/assets/drawer-menu.js.map?v=56266355491111410261790672546

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.