{"version":3,"file":"UseViewportHeight.SOybcfOF.mjs","names":["__legacyOverrideHOC_DataObserverContext","_jsx"],"sources":["https:/framerusercontent.com/modules/AiMW9qHOqqhcxwUD8mkF/ZyXnGxhgMzfHF02nDpWf/UseViewportHeight.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";export function useViewportHeight(){useEffect(()=>{let lastScale=window.visualViewport?.scale||1;const setVH=()=>{const vh=window.innerHeight;document.documentElement.style.setProperty(\"--app-height\",`${vh}px`);};setVH();// keep your original\nwindow.addEventListener(\"orientationchange\",setVH);// ✅ ONLY react to actual zoom changes\nif(window.visualViewport){const handleViewport=()=>{const currentScale=window.visualViewport.scale;// 👉 ONLY update if zoom level changed\nif(currentScale!==lastScale){lastScale=currentScale;setVH();}};window.visualViewport.addEventListener(\"resize\",handleViewport);return()=>{window.removeEventListener(\"orientationchange\",setVH);window.visualViewport?.removeEventListener(\"resize\",handleViewport);};}return()=>{window.removeEventListener(\"orientationchange\",setVH);};},[]);return{style:{height:\"var(--app-height)\",minHeight:\"100svh\"}};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withuseViewportHeight(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...useViewportHeight(props)});};}withuseViewportHeight.displayName=\"useViewportHeight\";\nexport const __FramerMetadata__ = {\"exports\":{\"withuseViewportHeight\":{\"type\":\"reactHoc\",\"name\":\"withuseViewportHeight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useViewportHeight\":{\"type\":\"override\",\"name\":\"useViewportHeight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./UseViewportHeight.map"],"mappings":"wLAAwE,SAAgB,GAAmB,CAGqO,OAHpO,MAAc,CAAC,IAAI,EAAU,EAAO,gBAAgB,OAAO,EAAQ,MAAU,CAAC,IAAM,EAAG,EAAO,YAAY,SAAS,gBAAgB,MAAM,YAAY,eAAe,GAAG,EAAG,IAAI,EAE1R,GAF6R,GAAO,CACpS,EAAO,iBAAiB,oBAAoB,EAAM,CAC/C,EAAO,eAAe,CAAC,IAAM,MAAmB,CAAC,IAAM,EAAa,EAAO,eAAe,MAC1F,IAAe,IAAW,EAAU,EAAa,GAAO,GAAoE,OAAhE,EAAO,eAAe,iBAAiB,SAAS,EAAe,KAAW,CAAC,EAAO,oBAAoB,oBAAoB,EAAM,CAAC,EAAO,gBAAgB,oBAAoB,SAAS,EAAe,EAAI,UAAU,CAAC,EAAO,oBAAoB,oBAAoB,EAAM,GAAK,EAAE,CAAC,CAAO,CAAC,MAAM,CAAC,OAAO,oBAAoB,UAAU,SAAS,CAAC,CAAqJ,SAAgB,EAAsB,EAAE,CAAC,MAAO,KAAQ,EAA+BA,EAAwC,CAAQC,EAAK,EAAE,CAAC,GAAG,EAAM,GAAG,EAAkB,EAAM,CAAC,CAAC,uBAH5qB,IAA6B,IAG0d,CAAyL,EAAsB,YAAY"}