{"version":3,"file":"SmoothScroll.DFDNEb-R.mjs","names":[],"sources":["https:/framerusercontent.com/modules/7JV00hrqczFE7yyDFSrL/xBAaKAeUOJvq1NlEZME1/SmoothScroll.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Smooth Scroll\n * Wraps Lenis smooth scroll and exposes the instance as window.lenis.\n * Add this component to every page, replacing the Framer University smooth scroll component.\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n * @framerIntrinsicWidth 1\n * @framerIntrinsicHeight 1\n */export default function SmoothScroll({intensity=10}){useEffect(()=>{if(typeof window===\"undefined\")return;let lenis=null;let rafId;const lerp=Math.max(.001,Math.min(1,intensity/100));const script=document.createElement(\"script\");script.src=\"https://cdn.jsdelivr.net/npm/lenis@1.1.14/dist/lenis.min.js\";script.async=true;script.onload=()=>{const LenisClass=window.Lenis;if(!LenisClass)return;lenis=new LenisClass({lerp,smoothWheel:true,syncTouch:false});window.lenis=lenis;function raf(time){lenis.raf(time);rafId=requestAnimationFrame(raf);}rafId=requestAnimationFrame(raf);};document.head.appendChild(script);return()=>{cancelAnimationFrame(rafId);lenis?.destroy();window.lenis=null;script.remove();};},[intensity]);return /*#__PURE__*/_jsx(\"div\",{style:{width:1,height:1,position:\"absolute\",pointerEvents:\"none\"}});}addPropertyControls(SmoothScroll,{intensity:{type:ControlType.Number,title:\"Intensity\",defaultValue:10,min:1,max:100,step:1,displayStepper:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SmoothScroll\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerIntrinsicHeight\":\"1\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SmoothScroll.map"],"mappings":"mLASG,SAAwB,EAAa,CAAC,YAAU,IAAI,CAAypB,OAAxpB,MAAc,CAAC,GAAU,IAAS,OAAY,OAAO,IAAI,EAAM,KAAS,EAAY,EAAK,KAAK,IAAI,KAAK,KAAK,IAAI,EAAE,EAAU,GAAG,CAAC,EAAQ,EAAO,SAAS,cAAc,QAAQ,EAA+X,MAA7X,GAAO,IAAI,8DAA8D,EAAO,MAAM,GAAK,EAAO,WAAW,CAAC,IAAM,EAAW,EAAO,MAAM,GAAG,CAAC,EAAW,OAAO,EAAM,IAAI,EAAW,CAAC,OAAK,YAAY,GAAK,UAAU,EAAK,CAAC,EAAE,EAAO,MAAM,EAAM,SAAS,EAAI,EAAK,CAAC,EAAM,IAAI,CAAI,EAAE,EAAM,sBAAsB,CAAG,CAAE,CAAC,EAAM,sBAAsB,CAAG,CAAE,EAAE,SAAS,KAAK,YAAY,CAAM,MAAY,CAAC,qBAAqB,CAAK,EAAE,GAAO,QAAQ,EAAE,EAAO,MAAM,KAAK,EAAO,OAAO,CAAE,CAAE,EAAE,CAAC,CAAS,CAAC,EAAsB,EAAK,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,WAAW,cAAc,MAAM,CAAC,CAAC,CAAE,qBAT1wB,IAA6B,IAAoD,EAS0rB,EAAoB,EAAa,CAAC,UAAU,CAAC,KAAK,EAAY,OAAO,MAAM,YAAY,aAAa,GAAG,IAAI,EAAE,IAAI,IAAI,KAAK,EAAE,eAAe,EAAI,CAAC,CAAC"}