PageSourceSearch

https://weck.de/cdn/shop/t/572/assets/header.js?v=168695368804911629801776161423

js weck.de collected 2026-10-10 01:29:38 UTC 3,612 bytes, 2 lines download raw bytes

1(()=>{const navContainer=document.querySelector("[data-nav-container]"),menuItems=document.querySelectorAll("[data-menu-item]");if(!navContainer)return;let repositionTimeout;const debounceReposition=(fn,delay=10)=>{clearTimeout(repositionTimeout),repositionTimeout=setTimeout(()=>{requestAnimationFrame(fn)},delay)},positionCache=new Map,getViewportWidth=()=>document.documentElement.clientWidth,positionMegaMenus=(forceUpdate=!1)=>{const mainHeader2=document.getElementById("main-header"),megaMenuDropdowns=document.querySelectorAll("[data-mega-menu-dropdown]");if(!mainHeader2)return;const headerRect=mainHeader2.getBoundingClientRect(),viewportWidth=getViewportWidth()-80;megaMenuDropdowns.forEach(dropdown=>{const buttonId=dropdown.getAttribute("data-menu-button-id"),button=document.getElementById(buttonId);if(button){const buttonRect=button.getBoundingClientRect(),leftOffset=headerRect.left-buttonRect.left,cachedPosition=positionCache.get(buttonId),newLeft=`${leftOffset}px`;(forceUpdate||cachedPosition!==newLeft)&&(Object.assign(dropdown.style,{left:newLeft,width:`${viewportWidth}px`}),positionCache.set(buttonId,newLeft))}})};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",positionMegaMenus):requestAnimationFrame(positionMegaMenus);const observer=new MutationObserver(mutations=>{let shouldReposition=!1;mutations.forEach(mutation=>{if(mutation.type==="attributes"){const{target}=mutation;(target.hasAttribute("data-nav-container")||target.hasAttribute("data-menu-item")||target.hasAttribute("data-mega-menu-dropdown"))&&(shouldReposition=!0)}mutation.type==="childList"&&(shouldReposition=!0)}),shouldReposition&&debounceReposition(positionMegaMenus)}),mainHeader=document.getElementById("main-header");mainHeader&&observer.observe(mainHeader,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["class","style"]});const resizeObserver=new ResizeObserver(()=>{debounceReposition(positionMegaMenus)});mainHeader&&resizeObserver.observe(mainHeader);const visibilityObserver=new IntersectionObserver(entries=>{entries.forEach(entry=>{entry.isIntersecting&&requestAnimationFrame(positionMegaMenus)})},{root:null,rootMargin:"0px",threshold:.1});document.querySelectorAll("[data-desktop-menu-button]").forEach(button=>{visibilityObserver.observe(button)}),window.addEventListener("beforeunload",()=>{observer.disconnect(),resizeObserver.disconnect(),visibilityObserver.disconnect()});let positionCount=0;const maxPositions=5,intervalId=setInterval(()=>{positionMegaMenus(),positionCount+=1,positionCount>=maxPositions&&clearInterval(intervalId)},1e3),prefersReducedMotion=window.matchMedia("(prefers-reduced-motion: reduce)").matches;let isHeaderShown=!1;const showHeaderWithStagger=()=>{if(!isHeaderShown){if(isHeaderShown=!0,prefersReducedMotion){navContainer.classList.add("is-visible"),menuItems.forEach(item=>{item.classList.add("is-visible")});return}navContainer.classList.add("is-visible"),menuItems.forEach((item,index)=>{setTimeout(()=>{item.classList.add("is-visible")},600+index*80)})}};window.addEventListener("lottie-menu-show",showHeaderWithStagger),window.addEventListener("lottie-menu-show-mobile",showHeaderWithStagger);const initFallback=()=>{const hasDesktopLottie=document.getElementById("lottie-font-container"),hasMobileLottie=document.getElementById("lottie-font-container-mobile");!hasDesktopLottie&&!hasMobileLottie&&showHeaderWithStagger()};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",initFallback):initFallback()})();
2//# sourceMappingURL=/cdn/shop/t/572/assets/header.js.map?v=168695368804911629801776161423

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.