{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/A4nrWJlHDxOwLY8DGMnp/TsK6JeTJzKAVCDlnBB7A/ScrollToTopOnLoad.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";export function ScrollToTopOnLoad(){useEffect(()=>{const stopScrollAndScrollToTop=()=>{const mainElement=document.querySelector(\"#main\");// if (mainElement) {\n//     // Step 1: Calculate scrollbar width\n//     const scrollbarWidth =\n//         window.innerWidth - mainElement.clientWidth\n//     // Step 2: Add padding to body to compensate for the scrollbar width\n//     document.body.style.paddingRight = `${scrollbarWidth}px`\n// }\n// Temporarily disable scrolling to stop momentum\ndocument.body.style.overflow=\"hidden\";// Step 3: Scroll to the top of the page\ndocument.body.scrollTo({top:0,left:0,behavior:\"auto\"});// Step 4: Re-enable scrolling after the scroll is ensured to be at the top\nsetTimeout(()=>{document.body.style.overflow=\"\";// Remove the padding that was added\n// document.body.style.paddingRight = \"\"\n// Optionally restore smooth scrolling for future interactions\ndocument.documentElement.style.scrollBehavior=\"smooth\";},50)// Adding a delay to ensure scroll finishes before re-enabling scroll\n;};// Trigger the function when the component is mounted\nstopScrollAndScrollToTop();},[]);return{};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withScrollToTopOnLoad(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...ScrollToTopOnLoad(props)});};}withScrollToTopOnLoad.displayName=\"ScrollToTopOnLoad\";\nexport const __FramerMetadata__ = {\"exports\":{\"ScrollToTopOnLoad\":{\"type\":\"override\",\"name\":\"ScrollToTopOnLoad\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withScrollToTopOnLoad\":{\"type\":\"reactHoc\",\"name\":\"withScrollToTopOnLoad\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ScrollToTopOnLoad.map"],
  "mappings": "gGAA+E,SAASA,GAAmB,CAAC,OAAAC,EAAU,IAAI,EAAgC,IAAI,CAAC,IAAMC,EAAY,SAAS,cAAc,OAAO,EAQ/M,SAAS,KAAK,MAAM,SAAS,SAC7B,SAAS,KAAK,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,MAAM,CAAC,EACrD,WAAW,IAAI,CAAC,SAAS,KAAK,MAAM,SAAS,GAG7C,SAAS,gBAAgB,MAAM,eAAe,QAAS,EAAE,EAAE,CAC1D,GACwB,CAAE,EAAE,CAAC,CAAC,EAAQ,CAAC,CAAE,CAA2J,SAASC,EAAsBC,EAAE,CAAC,OAAOC,IAAQC,EAA+BC,CAAuC,EAASC,EAAKJ,EAAE,CAAC,GAAGC,EAAM,GAAGL,EAAkBK,CAAK,CAAC,CAAC,EAAI,CAACF,EAAsB,YAAY",
  "names": ["ScrollToTopOnLoad", "ue", "mainElement", "withScrollToTopOnLoad", "C", "props", "re", "DataObserverContext", "p"]
}
