{"version":3,"file":"TopTransition.BUTELaGD.mjs","names":[],"sources":["https:/framerusercontent.com/modules/WLcZTZnb0q9aATs6A5nM/utr0tFx0CFtvrEbr8FhP/TopTransition.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect}from\"react\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n * @framerIntrinsicWidth 1\n * @framerIntrinsicHeight 1\n */export default function ScrollToTopOnVariant({duration=500,delay=0}){useEffect(()=>{// Custom smooth scroll with duration\nconst scrollToTop=()=>{const startPosition=window.pageYOffset;const startTime=performance.now();const animateScroll=currentTime=>{const elapsed=currentTime-startTime;const progress=Math.min(elapsed/duration,1);// Easing function for smooth animation\nconst easeInOutQuad=progress<.5?2*progress*progress:1-Math.pow(-2*progress+2,2)/2;window.scrollTo(0,startPosition*(1-easeInOutQuad));if(progress<1){requestAnimationFrame(animateScroll);}};requestAnimationFrame(animateScroll);};// Trigger on mount and any re-render with delay\nif(delay>0){const timeoutId=setTimeout(scrollToTop,delay);return()=>clearTimeout(timeoutId);}else{scrollToTop();}},[duration,delay]);// Return minimal div to ensure Framer recognizes the component\nreturn /*#__PURE__*/_jsx(\"div\",{style:{width:1,height:1,opacity:0,pointerEvents:\"none\"}});}ScrollToTopOnVariant.displayName=\"Scroll To Top On Variant\";addPropertyControls(ScrollToTopOnVariant,{duration:{type:ControlType.Number,title:\"Duration (ms)\",defaultValue:500,min:0,max:2e3,step:100,description:\"How long the scroll animation takes in milliseconds\"},delay:{type:ControlType.Number,title:\"Delay (ms)\",defaultValue:0,min:0,max:1e4,step:100,description:\"Delay before triggering the scroll (useful for preloaders)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ScrollToTopOnVariant\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerIntrinsicWidth\":\"1\",\"framerIntrinsicHeight\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TopTransition.map"],"mappings":"wLAKG,SAAwB,EAAqB,CAAC,WAAS,IAAI,QAAM,GAAG,CAIvE,OAJwE,MAAc,CACtF,IAAM,MAAgB,CAAC,IAAM,EAAc,EAAO,YAAkB,EAAU,YAAY,KAAK,CAAO,EAAc,GAAa,CAAC,IAAM,EAAQ,EAAY,EAAgB,EAAS,KAAK,IAAI,EAAQ,EAAS,EAAE,CAC3M,EAAc,EAAS,GAAG,EAAE,EAAS,EAAS,GAAW,GAAG,EAAS,IAAE,EAAG,EAAE,EAAO,SAAS,EAAE,GAAe,EAAE,GAAe,CAAI,EAAS,GAAG,sBAAsB,EAAc,EAAI,sBAAsB,EAAc,EAChO,GAAG,EAAM,EAAE,CAAC,IAAM,EAAU,WAAW,EAAY,EAAM,CAAC,UAAU,aAAa,EAAU,MAAO,GAAa,EAAI,CAAC,EAAS,EAAM,CAAC,CAChH,EAAK,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,cAAc,OAAO,CAAC,CAAC,sBAT9C,IAAoD,IAA6B,CASjC,EAAqB,YAAY,2BAA2B,EAAoB,EAAqB,CAAC,SAAS,CAAC,KAAK,EAAY,OAAO,MAAM,gBAAgB,aAAa,IAAI,IAAI,EAAE,IAAI,IAAI,KAAK,IAAI,YAAY,sDAAsD,CAAC,MAAM,CAAC,KAAK,EAAY,OAAO,MAAM,aAAa,aAAa,EAAE,IAAI,EAAE,IAAI,IAAI,KAAK,IAAI,YAAY,6DAA6D,CAAC,CAAC"}