{"version":3,"file":"CustomCoursor.B2lvYBAU.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/jtgs4un0Z6B1RSCaDbxX/skx4EsSU1GZvqrqYueR7/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?.location.search;if(utms&&!props.link.includes(\"utm_\")){if(props.link.includes(\"?\")){utms=\"&\"+utms.substring(1);}const newLink=props.link+utms;return /*#__PURE__*/_jsx(Component,{...props,link:newLink});}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\":{\"dump\":{\"type\":\"reactHoc\",\"name\":\"dump\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCursorFollow\":{\"type\":\"reactHoc\",\"name\":\"withCursorFollow\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"addCookieToLink\":{\"type\":\"reactHoc\",\"name\":\"addCookieToLink\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CustomCoursor.map"],"mappings":"uIAAwF,SAAgB,EAAgB,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAS,GAAaA,EAAS,KAAK,CAAC,MAAc,CAAC,EAAY,EAAO,EAAG,EAAE,CAAC,CAAC,IAAI,EAAK,GAAU,SAAS,OAAO,GAAG,GAAM,CAAC,EAAM,KAAK,SAAS,OAAO,CAAC,CAAI,EAAM,KAAK,SAAS,IAAI,GAAE,EAAK,IAAI,EAAK,UAAU,EAAE,EAAE,IAAM,EAAQ,EAAM,KAAK,EAAK,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,KAAK,EAAQ,CAAC,CAAE,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,CAAC,uBAAvc,IAA6C"}