{"version":3,"file":"MouseFloat.D4Xmrrxa.mjs","names":["__esmMin","init_npm_react_18_3_1","init_ssg_sandbox_shims","window","c","J","init_jsx_runtime","ce","useMotionValue","useSpring","init_framer_motion_DhsWWWsN","useIsStaticRenderer","init_framer_CN96F41L","withMouseFloat","isStatic","xRaw","yRaw","rotateXRaw","rotateYRaw","scaleRaw","x","SPRING_CONFIG","y","rotateX","rotateY","scale","reducedMotion","handlePointerMove","innerWidth","innerHeight","normalizedX","event","normalizedY","MAX_TRANSLATE_PX","MAX_TILT_DEG","centerX","centerY","dx","dy","distance","maxDistance","proximity","resetMotion","Component","props","PERSPECTIVE_PX","init_MouseFloat"],"sources":["https:/framerusercontent.com/modules/sgk4UPpYu2gb9KWGku6B/WSDGy6Xs6nLbYJ08X5pE/MouseFloat.js"],"sourcesContent":["// User request: Create a code override named `withMouseFloat` that adds subtle mouse-follow float/parallax motion (translate, tilt, and slight scale), uses springy framer-motion values, respects prefers-reduced-motion, is SSR/static-render safe, and exports nothing else.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useEffect}from\"react\";import{useIsStaticRenderer}from\"framer\";import{useMotionValue,useSpring}from\"framer-motion\";// Maximum translation (in px) from center as the pointer moves across the viewport.\nconst MAX_TRANSLATE_PX=18;// Maximum tilt (in degrees) for rotateX/rotateY.\nconst MAX_TILT_DEG=6;// Maximum scale when pointer is near the center of the viewport.\nconst MAX_SCALE=1.02;// Perspective depth for subtle 3D effect.\nconst PERSPECTIVE_PX=900;// Spring tuning for smooth, non-jumpy motion.\nconst SPRING_CONFIG={stiffness:130,damping:24,mass:.7};export function withMouseFloat(Component){return /*#__PURE__*/forwardRef(function WithMouseFloat(props,ref){const isStatic=useIsStaticRenderer();const xRaw=useMotionValue(0);const yRaw=useMotionValue(0);const rotateXRaw=useMotionValue(0);const rotateYRaw=useMotionValue(0);const scaleRaw=useMotionValue(1);const x=useSpring(xRaw,SPRING_CONFIG);const y=useSpring(yRaw,SPRING_CONFIG);const rotateX=useSpring(rotateXRaw,SPRING_CONFIG);const rotateY=useSpring(rotateYRaw,SPRING_CONFIG);const scale=useSpring(scaleRaw,SPRING_CONFIG);useEffect(()=>{if(typeof window===\"undefined\")return;const mediaQuery=window.matchMedia(\"(prefers-reduced-motion: reduce)\");const reducedMotion=mediaQuery.matches;if(isStatic||reducedMotion){xRaw.set(0);yRaw.set(0);rotateXRaw.set(0);rotateYRaw.set(0);scaleRaw.set(1);return;}const handlePointerMove=event=>{const{innerWidth,innerHeight}=window;if(innerWidth<=0||innerHeight<=0)return;const normalizedX=event.clientX/innerWidth-.5;const normalizedY=event.clientY/innerHeight-.5;xRaw.set(normalizedX*2*MAX_TRANSLATE_PX);yRaw.set(normalizedY*2*MAX_TRANSLATE_PX);rotateYRaw.set(normalizedX*2*MAX_TILT_DEG);rotateXRaw.set(-normalizedY*2*MAX_TILT_DEG);const centerX=innerWidth/2;const centerY=innerHeight/2;const dx=event.clientX-centerX;const dy=event.clientY-centerY;const distance=Math.sqrt(dx*dx+dy*dy);const maxDistance=Math.sqrt(centerX*centerX+centerY*centerY);const proximity=1-Math.min(distance/maxDistance,1);scaleRaw.set(1+proximity*(MAX_SCALE-1));};const resetMotion=()=>{xRaw.set(0);yRaw.set(0);rotateXRaw.set(0);rotateYRaw.set(0);scaleRaw.set(1);};window.addEventListener(\"pointermove\",handlePointerMove);window.addEventListener(\"pointerleave\",resetMotion);window.addEventListener(\"blur\",resetMotion);return()=>{window.removeEventListener(\"pointermove\",handlePointerMove);window.removeEventListener(\"pointerleave\",resetMotion);window.removeEventListener(\"blur\",resetMotion);};},[isStatic,rotateXRaw,rotateYRaw,scaleRaw,xRaw,yRaw]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,style:{...props.style,x,y,rotateX,rotateY,scale,transformPerspective:PERSPECTIVE_PX,willChange:\"transform\"}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withMouseFloat\":{\"type\":\"reactHoc\",\"name\":\"withMouseFloat\",\"annotations\":{\"framerCont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