{"version":3,"file":"TransitionAnimation.VCobhzQ2.mjs","names":["Children","React.useRef","React.useState","p"],"sources":["https:/framerusercontent.com/modules/dHqXlnNfxGxcbcwakD1h/zRo8dmVlhu7zMdlZnaHd/Stagger.js","https:/framerusercontent.com/modules/gV7rRO0s9TeE6vUNdMnx/6vreABIb3acseSB4AggE/TransitionAnimation.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{Children,cloneElement}from\"react\";// Learn more: https://www.framer.com/docs/guides/overrides/\nexport function StaggerBottomRotate(Component){return props=>{const{children}=props;const clonedChildren=Children.map(children,(child,index)=>/*#__PURE__*/cloneElement(child,{...child.props,initial:{opacity:1,y:620,rotate:Math.random()*40-20},whileInView:{opacity:1,y:0,rotate:0,transition:{delay:.5*index,duration:1.5,ease:[.65,0,.35,1]}}}));return /*#__PURE__*/_jsx(Component,{...props,children:clonedChildren});};}export function StaggerBottom(Component){return props=>{const{children}=props;const clonedChildren=Children.map(children,(child,index)=>/*#__PURE__*/cloneElement(child,{...child.props,initial:{opacity:0,y:150},whileInView:{opacity:1,y:0,transition:{delay:.1*index,duration:1,ease:[.65,0,.35,1]}}}));return /*#__PURE__*/_jsx(Component,{...props,children:clonedChildren});};}export function StaggerTop(Component){return props=>{const{children}=props;const clonedChildren=Children.map(children,(child,index)=>/*#__PURE__*/cloneElement(child,{...child.props,initial:{opacity:0,y:-150},whileInView:{opacity:1,y:0,transition:{delay:.1*index,duration:1,ease:[.65,0,.35,1]}}}));return /*#__PURE__*/_jsx(Component,{...props,children:clonedChildren});};}export function StaggerRight(Component){return props=>{const{children}=props;const clonedChildren=Children.map(children,(child,index)=>/*#__PURE__*/cloneElement(child,{...child.props,initial:{opacity:0,x:150},whileInView:{opacity:1,x:0,transition:{delay:.1*index,duration:1,ease:[.65,0,.35,1]}}}));return /*#__PURE__*/_jsx(Component,{...props,children:clonedChildren});};}export function StaggerLeft(Component){return props=>{const{children}=props;const clonedChildren=Children.map(children,(child,index)=>/*#__PURE__*/cloneElement(child,{...child.props,initial:{opacity:0,x:-150},whileInView:{opacity:1,x:0,transition:{delay:.1*index,duration:1,ease:[.65,0,.35,1]}}}));return /*#__PURE__*/_jsx(Component,{...props,children:clonedChildren});};}export function StaggerScale(Component){return props=>{const{children}=props;const clonedChildren=Children.map(children,(child,index)=>/*#__PURE__*/cloneElement(child,{...child.props,initial:{opacity:0,scale:.5},whileInView:{opacity:1,scale:1,transition:{delay:.2*index,duration:1,ease:[.65,0,.35,1]}}}));return /*#__PURE__*/_jsx(Component,{...props,children:clonedChildren});};}\nexport const __FramerMetadata__ = {\"exports\":{\"StaggerLeft\":{\"type\":\"reactHoc\",\"name\":\"StaggerLeft\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"StaggerScale\":{\"type\":\"reactHoc\",\"name\":\"StaggerScale\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"StaggerTop\":{\"type\":\"reactHoc\",\"name\":\"StaggerTop\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"StaggerBottomRotate\":{\"type\":\"reactHoc\",\"name\":\"StaggerBottomRotate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"StaggerRight\":{\"type\":\"reactHoc\",\"name\":\"StaggerRight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"StaggerBottom\":{\"type\":\"reactHoc\",\"name\":\"StaggerBottom\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Stagger.map","import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{useScroll,motion}from\"framer\";import{AnimatePresence}from\"framer-motion\";/**\n * withStackTransition override that uses AnimatePresence for exit animations.\n *\n * This override wraps your component in a scroll container. It tracks scroll progress;\n * when that progress exceeds 0.8 (meaning the section is nearly offscreen), it removes the element,\n * triggering AnimatePresence to run the exit animation.\n *\n * The animation:\n * - initial: starts scaled down and rotated with zero opacity.\n * - animate: scales up to full size, corrects rotation, and fades in.\n * - exit: scales down and fades out.\n */export const withStackTransition=Component=>{return props=>{// Create a scroll container for this section.\nconst containerRef=React.useRef(null);const{scrollYProgress}=useScroll({target:containerRef,// With this offset, progress goes from 0 (section’s top at viewport top)\n// to 1 (section’s bottom at viewport top).\noffset:[\"start start\",\"end start\"]});// Local state to control rendering.\nconst[show,setShow]=React.useState(true);// Toggle the rendered element based on scroll progress.\nReact.useEffect(()=>{const unsubscribe=scrollYProgress.onChange(p=>{if(p>.8){setShow(false);}else{setShow(true);}});return()=>unsubscribe();},[scrollYProgress]);return /*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:{width:\"100vw\",height:\"100vh\",position:\"relative\"},children:/*#__PURE__*/_jsx(AnimatePresence,{children:show&&/*#__PURE__*/_jsx(motion.div,{initial:{scale:.9,rotate:-10,opacity:0},animate:{scale:1,rotate:0,opacity:1},exit:{scale:.8,rotate:0,y:400,opacity:0},transition:{duration:.5},style:{width:\"100%\",height:\"100vh\",position:\"absolute\",top:0,left:0},children:/*#__PURE__*/_jsx(Component,{...props})},\"section\")})});};};\nexport const __FramerMetadata__ = {\"exports\":{\"withStackTransition\":{\"type\":\"reactHoc\",\"name\":\"withStackTransition\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TransitionAnimation.map"],"mappings":"0WACia,SAAgB,EAAc,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,YAAU,EAAY,EAAeA,EAAS,IAAI,GAAU,EAAM,IAAqB,EAAa,EAAM,CAAC,GAAG,EAAM,MAAM,QAAQ,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,EAAE,EAAE,WAAW,CAAC,MAAM,GAAG,EAAM,SAAS,EAAE,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,SAAS,EAAe,CAAC,mBAD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