{"version":3,"file":"StickyToCenter.CZfKFSYd.mjs","names":["useRef","useState","__legacyOverrideHOC_DataObserverContext","_jsx"],"sources":["https:/framerusercontent.com/modules/4hmgzwfnyVQmH1YITQpb/N1yYe5WgIPtjvPSUhSCo/StickyToCenter.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useRef,useState,useEffect}from\"react\";export function StickyToCenter(){const ref=useRef(null);const[offset,setOffset]=useState(200);useEffect(()=>{if(ref.current){setOffset(ref.current.offsetHeight/2);}},[]);return{ref,style:{position:\"sticky\",top:`calc(50% - ${offset}px)`}};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withStickyToCenter(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...StickyToCenter(props)});};}withStickyToCenter.displayName=\"StickyToCenter\";\nexport const __FramerMetadata__ = {\"exports\":{\"withStickyToCenter\":{\"type\":\"reactHoc\",\"name\":\"withStickyToCenter\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"StickyToCenter\":{\"type\":\"override\",\"name\":\"StickyToCenter\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StickyToCenter.map"],"mappings":"+KAAwF,SAAgB,GAAgB,CAAC,IAAM,EAAIA,EAAO,KAAK,CAAM,CAAC,EAAO,GAAWC,EAAS,IAAI,CAA6E,OAA5E,MAAc,CAAI,EAAI,SAAS,EAAU,EAAI,QAAQ,aAAa,EAAE,EAAI,EAAE,CAAC,CAAO,CAAC,MAAI,MAAM,CAAC,SAAS,SAAS,IAAI,cAAc,EAAO,KAAK,CAAC,CAAqJ,SAAgB,EAAmB,EAAE,CAAC,MAAO,KAAQ,EAA+BC,EAAwC,CAAQC,EAAK,EAAE,CAAC,GAAG,EAAM,GAAG,EAAe,EAAM,CAAC,CAAC,mBAA9lB,IAA6C,IAAkY,CAAmL,EAAmB,YAAY"}