{"version":3,"file":"Examples.7S0-wlTL.mjs","names":["React.useState","React.useRef","React.useCallback","React.useMemo","__esmMin","init_npm_react_18_3_1","init_ssg_sandbox_shims","te","pe","window","ce","init_jsx_runtime","ne","J","c","_e","init_framer_B1b760uK","ControlType","withShowAfterHeroScroll","rest","props","isVisible","setIsVisible","prefersReducedMotion","updateVisibility","shouldShow","threshold","previous","mergedStyle","style","visibleOffsetY","hiddenOffsetY","duration","Component","ResponsiveVideoAspect","init_Examples"],"sources":["https:/framerusercontent.com/modules/syZKMEaBvrjoidfdPzJQ/MRXjBRRZ22rEcHVesHFR/Examples.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{ControlType}from\"framer\";// Learn more: https://www.framer.com/docs/guides/overrides/\nfunction createStore(initial){let store=initial;const listeners=new Set;return function useStore(){const[snapshot,setSnapshot]=React.useState(store);React.useEffect(()=>{listeners.add(setSnapshot);return()=>{listeners.delete(setSnapshot);};},[]);const setStore=patch=>{store={...store,...patch};listeners.forEach(listener=>listener(store));};return[snapshot,setStore];};}function randomColor(){return`hsl(${Math.floor(Math.random()*360)}, 80%, 58%)`;}const useStore=createStore({background:\"#0099FF\"});export function withRotate(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,animate:{rotate:90},transition:{duration:2}});};}export function withHover(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,whileHover:{scale:1.05}});};}export function withRandomColor(Component){return props=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{...props,animate:{background:store.background},onClick:()=>{setStore({background:randomColor()});}});};}export function withVimeoIframeCover(Component){return /*#__PURE__*/React.forwardRef(function WithVimeoIframeCover(props,ref){const{scaleX=1.08,scaleY=1.08,style,...rest}=props;const wrapperRef=React.useRef(null);const setRefs=React.useCallback(node=>{wrapperRef.current=node;if(typeof ref===\"function\")ref(node);else if(ref&&typeof ref===\"object\"){ref.current=node;}},[ref]);React.useEffect(()=>{if(typeof window===\"undefined\")return;const root=wrapperRef.current;if(!root)return;const targets=root.querySelectorAll(\"iframe, video, embed\");targets.forEach(element=>{const htmlElement=element;htmlElement.style.position=\"absolute\";htmlElement.style.left=\"50%\";htmlElement.style.top=\"50%\";htmlElement.style.width=\"100%\";htmlElement.style.height=\"100%\";htmlElement.style.transform=`translate(-50%, -50%) scale(${scaleX}, ${scaleY})`;htmlElement.style.transformOrigin=\"center center\";htmlElement.style.pointerEvents=\"auto\";});},[scaleX,scaleY]);const mergedStyle=React.useMemo(()=>({...style,position:style?.position??\"relative\",overflow:\"hidden\",pointerEvents:style?.pointerEvents??\"auto\"}),[style]);return /*#__PURE__*/_jsx(Component,{ref:setRefs,...rest,style:mergedStyle});});}withVimeoIframeCover.propertyControls={scaleX:{type:ControlType.Number,title:\"Scale X\",defaultValue:1.08,min:1,max:1.5,step:.01},scaleY:{type:ControlType.Number,title:\"Scale Y\",defaultValue:1.08,min:1,max:1.5,step:.01}};export function withShowAfterHeroScroll(Component){return /*#__PURE__*/React.forwardRef(function WithShowAfterHeroScroll(props,ref){const{threshold=650,visibleOffsetY=0,hiddenOffsetY=18,duration=.3,style,...rest}=props;const[isVisible,setIsVisible]=React.useState(false);const prefersReducedMotion=React.useMemo(()=>{if(typeof window===\"undefined\")return false;return window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;},[]);const updateVisibility=React.useCallback(()=>{if(typeof window===\"undefined\")return;const shouldShow=window.scrollY>threshold;React.startTransition(()=>{setIsVisible(previous=>previous===shouldShow?previous:shouldShow);});},[threshold]);React.useEffect(()=>{if(typeof window===\"undefined\")return;updateVisibility();window.addEventListener(\"scroll\",updateVisibility,{passive:true});window.addEventListener(\"resize\",updateVisibility);return()=>{window.removeEventListener(\"scroll\",updateVisibility);window.removeEventListener(\"resize\",updateVisibility);};},[updateVisibility]);const mergedStyle=React.useMemo(()=>({...style,opacity:isVisible?1:0,transform:`${style?.transform?`${style.transform} `:\"\"}translateY(${isVisible?visibleOffsetY:hiddenOffsetY}px)`,pointerEvents:isVisible?style?.pointerEvents:\"none\",transition:prefersReducedMotion?undefined:`opacity ${duration}s ease, transform ${duration}s ease`,willChange:\"opacity, transform\"}),[style,isVisible,visibleOffsetY,hiddenOffsetY,duration,prefersReducedMotion]);return /*#__PURE__*/_jsx(Component,{ref:ref,...rest,style:mergedStyle});});}withShowAfterHeroScroll.propertyControls={threshold:{type:ControlType.Number,title:\"Threshold\",defaultValue:650,min:0,max:3e3,step:10,unit:\"px\"},visibleOffsetY:{type:ControlType.Number,title:\"Visible Y\",defaultValue:0,min:-300,max:300,step:1,unit:\"px\"},hiddenOffsetY:{type:ControlType.Number,title:\"Hidden Y\",defaultValue:18,min:-300,max:300,step:1,unit:\"px\"},duration:{type:ControlType.Number,title:\"Duration\",defaultValue:.3,min:0,max:2,step:.05,unit:\"s\"}};export function ResponsiveVideoAspect(Component){return /*#__PURE__*/React.forwardRef(function ResponsiveVideoAspectOverride(props,ref){const mergedStyle=React.useMemo(()=>({...props.style,position:props.style?.position??\"relative\",width:\"100%\",maxWidth:\"100%\",height:\"auto\",minHeight:0,aspectRatio:\"16 / 9\",overflow:\"visible\"}),[props.style]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,style:mergedStyle});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withVimeoIframeCover\":{\"type\":\"reactHoc\",\"name\":\"withVimeoIframeCover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRotate\":{\"type\":\"reactHoc\",\"name\":\"withRotate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ResponsiveVideoAspect\":{\"type\":\"reactHoc\",\"name\":\"ResponsiveVideoAspect\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withShowAfterHeroScroll\":{\"type\":\"reactHoc\",\"name\":\"withShowAfterHeroScroll\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRandomColor\":{\"type\":\"reactHoc\",\"name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