{"version":3,"file":"CustomCoursor.CvRq9Z5Z.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/spJ6SfdlEkthgdIdACES/VewnX2ywxkd8L1W9yio3/CustomCoursor.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useRef,useState,useEffect}from\"react\";export function addCookieToLink(Component){return props=>{const[myWindow,setMyWindow]=useState(null);useEffect(()=>{setMyWindow(window);},[]);let utms=myWindow===null||myWindow===void 0?void 0:myWindow.location.search;if(utms){if(props.link.includes(\"?\")){utms=\"&\"+utms.substring(1);}props.link=props.link+utms;}return /*#__PURE__*/_jsx(Component,{...props});};}export function dump(Component){return props=>{console.log(props);return /*#__PURE__*/_jsx(Component,{...props});};}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\":{\"addCookieToLink\":{\"type\":\"reactHoc\",\"name\":\"addCookieToLink\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"dump\":{\"type\":\"reactHoc\",\"name\":\"dump\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCursorFollow\":{\"type\":\"reactHoc\",\"name\":\"withCursorFollow\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CustomCoursor.map"],"mappings":"2MAAwF,SAAgB,EAAgB,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAS,GAAaA,EAAS,KAAK,CAAC,MAAc,CAAC,EAAY,EAAO,EAAG,EAAE,CAAC,CAAC,IAAI,EAAK,GAAmD,SAAS,OAAqG,OAA3F,IAAS,EAAM,KAAK,SAAS,IAAI,GAAE,EAAK,IAAI,EAAK,UAAU,EAAE,EAAE,EAAM,MAAgB,GAA0B,EAAK,EAAU,CAAC,GAAG,EAAM,CAAC,uBAAnZ,IAA6C"}