{"version":3,"file":"InteractiveHeaderGradient.DDkVdzkE.mjs","names":["useRef","useState"],"sources":["https:/framerusercontent.com/modules/EEVXHm57wchfySdYoNo7/7OtmSATwJYtqEvAZ0hDE/InteractiveHeaderGradient.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,startTransition,useEffect,useRef,useState}from\"react\";// Create a code override export named InteractiveHeaderGradient for existing canvas RichText layers.\n// Preserve link behavior, sizing, editable text, and accessibility.\n// On hover/focus, show a subtle dark-blue animated gradient that follows pointer position.\n// Keep default text unchanged/readable and respect reduced-motion preferences.\nexport function InteractiveHeaderGradient(Component){return /*#__PURE__*/forwardRef(function InteractiveHeaderGradientOverride(props,ref){const localRef=useRef(null);const[isActive,setIsActive]=useState(false);const[reducedMotion,setReducedMotion]=useState(false);const[pointer,setPointer]=useState({x:50,y:50});useEffect(()=>{if(typeof window===\"undefined\")return;const mediaQuery=window.matchMedia(\"(prefers-reduced-motion: reduce)\");const update=()=>{startTransition(()=>{setReducedMotion(mediaQuery.matches);});};update();if(typeof mediaQuery.addEventListener===\"function\"){mediaQuery.addEventListener(\"change\",update);}else{mediaQuery.addListener(update);}return()=>{if(typeof mediaQuery.removeEventListener===\"function\"){mediaQuery.removeEventListener(\"change\",update);}else{mediaQuery.removeListener(update);}};},[]);const gradientStyle=isActive&&!reducedMotion?{backgroundImage:`radial-gradient(140px 90px at ${pointer.x}% ${pointer.y}%, #4F6EA8 0%, #27436F 36%, #0E1B33 74%, #081121 100%)`,backgroundSize:\"160% 160%\",backgroundPosition:`${pointer.x}% ${pointer.y}%`,WebkitBackgroundClip:\"text\",backgroundClip:\"text\",WebkitTextFillColor:\"transparent\",color:\"transparent\",transition:\"background-position 140ms linear\"}:isActive&&reducedMotion?{color:\"#0E2C56\",transition:\"none\"}:null;return /*#__PURE__*/_jsx(Component,{...props,ref:node=>{localRef.current=node;if(typeof ref===\"function\")ref(node);else if(ref&&typeof ref===\"object\")ref.current=node;},onPointerEnter:event=>{props.onPointerEnter?.(event);startTransition(()=>setIsActive(true));},onPointerLeave:event=>{props.onPointerLeave?.(event);startTransition(()=>setIsActive(false));},onFocus:event=>{props.onFocus?.(event);startTransition(()=>setIsActive(true));},onBlur:event=>{props.onBlur?.(event);startTransition(()=>setIsActive(false));},onPointerMove:event=>{props.onPointerMove?.(event);if(reducedMotion||!isActive||!localRef.current)return;const rect=localRef.current.getBoundingClientRect();if(rect.width<=0||rect.height<=0)return;const x=(event.clientX-rect.left)/rect.width*100;const y=(event.clientY-rect.top)/rect.height*100;startTransition(()=>{setPointer({x:Math.max(0,Math.min(100,x)),y:Math.max(0,Math.min(100,y))});});},style:{...props.style,...gradientStyle??{}}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"InteractiveHeaderGradient\":{\"type\":\"reactHoc\",\"name\":\"InteractiveHeaderGradient\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./InteractiveHeaderGradient.map"],"mappings":"uJAIA,SAAgB,EAA0B,EAAU,CAAC,OAAoB,EAAW,SAA2C,EAAM,EAAI,CAAC,IAAM,EAASA,EAAO,IAAI,EAAO,CAAC,EAAS,GAAaC,EAAS,EAAK,EAAO,CAAC,EAAc,GAAkBA,EAAS,EAAK,EAAO,CAAC,EAAQ,GAAYA,EAAS,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,EAAE,MAAc,CAAC,GAAU,IAAS,OAAY,OAAO,IAAM,EAAW,EAAO,WAAW,kCAAkC,EAAQ,MAAW,CAAC,MAAoB,CAAC,EAAiB,EAAW,OAAO,CAAE,CAAC,CAAE,EAAkJ,OAAhJ,EAAO,EAAK,OAAO,EAAW,kBAAmB,WAAY,EAAW,iBAAiB,SAAS,CAAM,EAAQ,EAAW,YAAY,CAAM,MAAa,CAAI,OAAO,EAAW,qBAAsB,WAAY,EAAW,oBAAoB,SAAS,CAAM,EAAQ,EAAW,eAAe,CAAM,CAAG,CAAE,EAAE,CA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