{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/XICXxbGLmNd6sGShY3pR/PLinN4rCoXK3R2UPI4Al/StopScroll.js"],
  "sourcesContent": ["import{jsx as _jsx,Fragment as _Fragment}from\"react/jsx-runtime\";import{useEffect,useLayoutEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerDisableUnlink\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function StopScroll(props){const duration=props.duration*1e3;const scrollToTop=()=>window.scrollTo(0,0);useLayoutEffect(()=>{scrollToTop();const enableScroll=()=>document.body.style.overflow=\"auto\";const disableScroll=()=>document.body.style.overflow=\"hidden\";disableScroll();setTimeout(enableScroll,duration);},[]);useEffect(()=>{window.addEventListener(\"beforeunload\",scrollToTop);return()=>{window.removeEventListener(\"beforeunload\",scrollToTop);};},[]);return /*#__PURE__*/_jsx(_Fragment,{});}StopScroll.displayName=\"Stop Scroll\";addPropertyControls(StopScroll,{duration:{title:\"Duration\",type:ControlType.Number,defaultValue:2,description:\"Duration in seconds\",displayStepper:true,min:0}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"StopScroll\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"*\",\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StopScroll.map"],
  "mappings": "mKAAAA,IAKkB,SAARC,EAA4BC,EAAM,CAAC,IAAMC,EAASD,EAAM,SAAS,IAAUE,EAAY,IAAI,OAAO,SAAS,EAAE,CAAC,EAAE,OAAAC,EAAgB,IAAI,CAACD,EAAY,EAAE,IAAME,EAAa,IAAI,SAAS,KAAK,MAAM,SAAS,QAA2B,IAAI,SAAS,KAAK,MAAM,SAAS,UAAuB,EAAE,WAAWA,EAAaH,CAAQ,CAAE,EAAE,CAAC,CAAC,EAAEI,EAAU,KAAK,OAAO,iBAAiB,eAAeH,CAAW,EAAQ,IAAI,CAAC,OAAO,oBAAoB,eAAeA,CAAW,CAAE,GAAI,CAAC,CAAC,EAAsBI,EAAKC,EAAU,CAAC,CAAC,CAAE,CAACR,EAAW,YAAY,cAAcS,EAAoBT,EAAW,CAAC,SAAS,CAAC,MAAM,WAAW,KAAKU,EAAY,OAAO,aAAa,EAAE,YAAY,sBAAsB,eAAe,GAAK,IAAI,CAAC,CAAC,CAAC",
  "names": ["init_shims", "StopScroll", "props", "duration", "scrollToTop", "fe", "enableScroll", "ue", "p", "l", "addPropertyControls", "ControlType"]
}
