{"version":3,"file":"CustomCursor.DN7MlScb.mjs","names":["useRef","useState"],"sources":["https:/framerusercontent.com/modules/qnYMX9gUTNulIVy8sIDU/RRfzi7CLYtT71xKKN0IP/CustomCursor.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useRef,useState,useEffect}from\"react\";export function withCursorFollow(Component){return props=>{const ref=useRef(null);const[isHovering,setIsHovering]=useState(false);const[position,setPosition]=useState({left:0,top:0});useEffect(()=>{const handleMouseMove=e=>{if(!ref.current)return;const isHovered=e.target instanceof Element&&(e.target===ref.current.parentElement||ref.current.parentElement.contains(e.target)||e.target===ref.current||ref.current.contains(e.target));setIsHovering(isHovered);if(isHovered){const parentRect=ref.current.parentElement.getBoundingClientRect();const elementRect=ref.current.getBoundingClientRect();setPosition({left:e.clientX-parentRect.left-elementRect.width/2,top:e.clientY-parentRect.top-elementRect.height/2});}else{setIsHovering(false);}};window.addEventListener(\"mousemove\",handleMouseMove);return()=>{window.removeEventListener(\"mousemove\",handleMouseMove);};},[]);return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{position:\"fixed\",left:`calc(${position.left}px - 0.1%)`,top:`calc(${position.top}px - 0.1%)`,pointerEvents:\"none\",transform:\"translate(-0.1%, -0.1%)\"},children:isHovering&&/*#__PURE__*/_jsx(Component,{...props})});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withCursorFollow\":{\"type\":\"reactHoc\",\"name\":\"withCursorFollow\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CustomCursor.map"],"mappings":"8IAAwF,SAAgB,EAAiB,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAIA,EAAO,KAAK,CAAM,CAAC,EAAW,GAAeC,EAAS,GAAM,CAAM,CAAC,EAAS,GAAaA,EAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAA6qB,OAA5qB,MAAc,CAAC,IAAM,EAAgB,GAAG,CAAC,GAAG,CAAC,EAAI,QAAQ,OAAO,IAAM,EAAU,EAAE,kBAAkB,UAAU,EAAE,SAAS,EAAI,QAAQ,eAAe,EAAI,QAAQ,cAAc,SAAS,EAAE,OAAO,EAAE,EAAE,SAAS,EAAI,SAAS,EAAI,QAAQ,SAAS,EAAE,OAAO,EAA2B,GAAzB,EAAc,EAAU,CAAI,EAAU,CAAC,IAAM,EAAW,EAAI,QAAQ,cAAc,uBAAuB,CAAO,EAAY,EAAI,QAAQ,uBAAuB,CAAC,EAAY,CAAC,KAAK,EAAE,QAAQ,EAAW,KAAK,EAAY,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAW,IAAI,EAAY,OAAO,EAAE,CAAC,MAAO,EAAc,GAAM,EAAyD,OAArD,EAAO,iBAAiB,YAAY,EAAgB,KAAW,CAAC,EAAO,oBAAoB,YAAY,EAAgB,GAAK,EAAE,CAAC,CAAqB,EAAK,MAAM,CAAK,MAAI,MAAM,CAAC,SAAS,QAAQ,KAAK,QAAQ,EAAS,KAAK,YAAY,IAAI,QAAQ,EAAS,IAAI,YAAY,cAAc,OAAO,UAAU,0BAA0B,CAAC,SAAS,GAAyB,EAAK,EAAU,CAAC,GAAG,EAAM,CAAC,CAAC,CAAC,uBAAppC,IAA6C"}