{"version":3,"file":"DynamicViewportHeight.BOTO3707.mjs","names":["useState","__esmMin","window","init_ssg_sandbox_shims","init_npm_react_18_3_1","_e","init_jsx_runtime","c","ce","withSmallViewportHeight","svh","setSvh","vh","Component","props","init_DynamicViewportHeight"],"sources":["https:/framerusercontent.com/modules/lt1r09CkQ6OAUJzfTnTx/vGavVV0Rjb2qeyorZTxh/DynamicViewportHeight.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";/**\n * @framerDisableUnlink\n */export function withDynamicViewportHeight(Component){return props=>{const[dvh,setDvh]=useState(\"100vh\");useEffect(()=>{const updateDvh=()=>{const vh=window.innerHeight*.01;document.documentElement.style.setProperty(\"--dvh\",`${vh}px`);setDvh(`${window.innerHeight}px`);};updateDvh();window.addEventListener(\"resize\",updateDvh);return()=>window.removeEventListener(\"resize\",updateDvh);},[]);return /*#__PURE__*/_jsx(Component,{...props,style:{...props.style,height:dvh}});};}export function withSmallViewportHeight(Component){return props=>{const[svh,setSvh]=useState(\"100vh\");useEffect(()=>{const setInitialSvh=()=>{const vh=window.innerHeight*.01;document.documentElement.style.setProperty(\"--svh\",`${vh}px`);setSvh(`${window.innerHeight}px`);};setInitialSvh();// We're not adding any resize listeners to keep it static\n},[]);return /*#__PURE__*/_jsx(Component,{...props,style:{...props.style,height:svh}});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withSmallViewportHeight\":{\"type\":\"reactHoc\",\"name\":\"withSmallViewportHeight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withDynamicViewportHeight\":{\"type\":\"reactHoc\",\"name\":\"withDynamicViewportHeight\",\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DynamicViewportHeight.map"],"mappings":"A,uIAE4d,SAAgBS,EAAwB,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAACC,EAAIC,GAAQX,EAAS,OAAO,EAC1jB,OAD4jBQ,MAAc,MAAyB,CAAC,IAAMI,EAAGV,EAAO,YAAY,IAAI,SAAS,gBAAgB,MAAM,YAAY,QAAQ,GAAGU,EAAG,GAAG,EAAED,EAAO,GAAGT,EAAO,YAAY,GAAG,CAAE,EAAE,CAAc,CAC1vB,EAAE,CAAC,CAAC,EAAsB,gBAAKW,EAAU,CAAC,GAAGC,EAAM,MAAM,CAAC,GAAGA,EAAM,MAAM,OAAOJ,CAAG,CAAC,CAAC,CAAE,CAAE,C"}