{"version":3,"file":"Compact_navbar.BEnf7Nnj.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/QOZqnGiGdkBvSD8Mqntj/XfH9csPlyVPTbXrqga8l/Compact_navbar.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";export function withShrinkNavOnScroll(Component){return props=>{const ref=useRef(null);useEffect(()=>{const hero=Array.from(document.querySelectorAll('[data-framer-name=\"Hero\"]')).find(el=>el.offsetParent!==null);const onScroll=()=>{const el=ref.current;if(!el)return;const isPastHero=hero?hero.getBoundingClientRect().top<=0:window.scrollY>100;el.style.width=isPastHero?\"85%\":\"100%\";el.style.transition=\"width 0.3s ease-in-out\";el.style.marginLeft=\"auto\";el.style.marginRight=\"auto\";};// Set initial margin without affecting width\nif(ref.current){ref.current.style.marginLeft=\"auto\";ref.current.style.marginRight=\"auto\";ref.current.style.transition=\"width 0.3s ease-in-out\";}onScroll();window.addEventListener(\"scroll\",onScroll,{passive:true});return()=>window.removeEventListener(\"scroll\",onScroll);},[]);return /*#__PURE__*/_jsx(Component,{...props,ref:ref});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withShrinkNavOnScroll\":{\"type\":\"reactHoc\",\"name\":\"withShrinkNavOnScroll\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Compact_navbar.map"],"mappings":"uIAA+E,SAAgB,EAAsB,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAIA,EAAO,KAAK,CAC8G,OAD7G,MAAc,CAAC,IAAM,EAAK,MAAM,KAAK,SAAS,iBAAiB,4BAA4B,CAAC,CAAC,KAAK,GAAI,EAAG,eAAe,KAAK,CAAO,MAAa,CAAC,IAAM,EAAG,EAAI,QAAQ,GAAG,CAAC,EAAG,OAAO,IAAM,EAAW,EAAK,EAAK,uBAAuB,CAAC,KAAK,EAAE,EAAO,QAAQ,IAAI,EAAG,MAAM,MAAM,EAAW,MAAM,OAAO,EAAG,MAAM,WAAW,yBAAyB,EAAG,MAAM,WAAW,OAAO,EAAG,MAAM,YAAY,QACvV,OAAlN,EAAI,UAAS,EAAI,QAAQ,MAAM,WAAW,OAAO,EAAI,QAAQ,MAAM,YAAY,OAAO,EAAI,QAAQ,MAAM,WAAW,0BAA0B,GAAU,CAAC,EAAO,iBAAiB,SAAS,EAAS,CAAC,QAAQ,GAAK,CAAC,KAAW,EAAO,oBAAoB,SAAS,EAAS,EAAG,EAAE,CAAC,CAAqB,EAAK,EAAU,CAAC,GAAG,EAAU,MAAI,CAAC,uBAD9R,IAAoC"}