{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/3haC7gYL96ITtaVhvFVj/mm3mCKStb476nNkihCPE/Spotlight.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useRef}from\"react\";import{motion}from\"framer-motion\";function getRelativeCoordinates(event,referenceElement){const position={x:event.pageX,y:event.pageY};const offset={left:referenceElement.offsetLeft,top:referenceElement.offsetTop};let reference=referenceElement.offsetParent;while(reference){offset.left+=reference.offsetLeft;offset.top+=reference.offsetTop;reference=reference.offsetParent;}return{x:position.x-offset.left,y:position.y-offset.top};}export function withSpotlight(Component){const style={position:\"absolute\",width:\"100%\",height:\"100%\",zIndex:1,boxSizing:\"border-box\",borderRadius:\"inherit\",WebkitMaskImage:`radial-gradient(circle at center, rgb(255, 255, 255) 0%, rgba(0, 0, 0, 0) 100%)`,opacity:0,// Change this gradient\nbackgroundImage:`linear-gradient(to right, rgb(71, 130, 38, 2%) , rgba(48, 52, 40) )`,// Optional border style\nborder:\"1px solid rgba(255, 255, 255, 0.2)\"};return props=>{const[mousePosition,setMousePosition]=useState({x:0,y:0});const boxRef=useRef();const handleMouseMove=e=>{setMousePosition(getRelativeCoordinates(e,boxRef.current));};console.log(mousePosition);return /*#__PURE__*/_jsxs(Component,{...props,ref:boxRef,onMouseMove:e=>handleMouseMove(e),children:[/*#__PURE__*/_jsx(motion.div,{style:{...style},whileHover:{opacity:1},animate:{WebkitMaskImage:`radial-gradient(circle at ${mousePosition.x}px ${mousePosition.y}px, rgb(255, 255, 255) 0%, rgba(0, 0, 0, 0) 100%)`},transition:{type:\"tween\",ease:\"backOut\",duration:.4,opacity:{duration:.3}}}),props.children]});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withSpotlight\":{\"type\":\"reactHoc\",\"name\":\"withSpotlight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Spotlight.map"],
  "mappings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", "style", "props", "mousePosition", "setMousePosition", "ye", "boxRef", "pe", "handleMouseMove", "e", "u", "p", "motion"]
}
