{"version":3,"file":"CardFx.GIsKGVs9.mjs","names":["React.useRef","React.useCallback","__esmMin","init_ssg_sandbox_shims","ne","window","de","init_jsx_runtime","J","init_npm_react_18_3_1","ce","withCardFx","rest","props","local","setRef","el","ref","root","body","prev","spot","bar","paint","px","py","move","b","e","bb","svg","s","icon","enter","leave","Component","style","init_CardFx"],"sources":["https:/framerusercontent.com/modules/XotBaX9D1Bv1ms3a9WEL/0jQNZGLoF9IwWn84L1dd/CardFx.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{forwardRef}from\"react\";/** Card hover: a pink bloom that follows the pointer, a gradient bar that draws in along the bottom, a slight 3D tilt, and the icon lifting and turning white. */export function withCardFx(Component){return /*#__PURE__*/forwardRef(function CardFxOverride(props,ref){const{style,...rest}=props;const local=React.useRef(null);const setRef=React.useCallback(el=>{local.current=el;if(typeof ref===\"function\")ref(el);else if(ref)ref.current=el;},[ref]);React.useEffect(()=>{const root=local.current;if(!root||typeof window===\"undefined\"||!window.matchMedia)return;if(!window.matchMedia(\"(hover: hover) and (pointer: fine)\").matches)return;if(window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches)return;const body=root.querySelector('[data-framer-name=\"Body\"]')||root.lastElementChild;if(!body)return;const prev={overflow:body.style.overflow,isolation:body.style.isolation,transition:root.style.transition};body.style.overflow=\"hidden\";body.style.isolation=\"isolate\";const spot=document.createElement(\"div\");spot.setAttribute(\"aria-hidden\",\"true\");spot.style.cssText=\"position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1;pointer-events:none;opacity:0;transition:opacity .3s\";const bar=document.createElement(\"div\");bar.setAttribute(\"aria-hidden\",\"true\");bar.style.cssText=\"position:absolute;left:0;right:0;bottom:0;height:3px;z-index:1;pointer-events:none;background:linear-gradient(90deg,#b5a1ff,#ff00b1);transform:scaleX(0);transform-origin:left;transition:transform .5s cubic-bezier(.2,.7,.2,1)\";body.appendChild(spot);body.appendChild(bar);root.style.transition=\"transform .45s cubic-bezier(.2,.7,.2,1)\";const paint=(px,py)=>{spot.style.background=\"radial-gradient(260px circle at \"+(px*100).toFixed(1)+\"% \"+(py*100).toFixed(1)+\"%, rgba(255,0,177,.28), transparent 65%), rgba(181,161,255,.07)\";};const move=e=>{const b=root.getBoundingClientRect();const px=(e.clientX-b.left)/b.width;const py=(e.clientY-b.top)/b.height;root.style.transform=\"perspective(900px) rotateX(\"+((.5-py)*18).toFixed(2)+\"deg) rotateY(\"+((px-.5)*18).toFixed(2)+\"deg)\";const bb=body.getBoundingClientRect();paint((e.clientX-bb.left)/bb.width,(e.clientY-bb.top)/bb.height);};const svg=Array.from(body.querySelectorAll(\"svg\")).find(s=>!s.closest('[data-framer-name=\"Hatch\"]'))||null;const icon=svg?svg.parentElement&&svg.parentElement!==body?svg.parentElement:svg:null;if(icon)icon.style.transition=\"translate .45s cubic-bezier(.2,.7,.2,1), scale .45s cubic-bezier(.2,.7,.2,1), filter .3s\";body.style.transition=\"box-shadow .35s ease\";const enter=()=>{body.style.boxShadow=\"0 0 46px rgba(255,0,177,.38), 0 18px 50px -12px rgba(255,0,177,.45), inset 0 0 0 1px rgba(255,0,177,.55)\";spot.style.opacity=\"1\";bar.style.transform=\"scaleX(1)\";if(icon){icon.style.translate=\"0 -4px\";icon.style.scale=\"1.15\";icon.style.filter=\"brightness(0) invert(1)\";}};const leave=()=>{body.style.boxShadow=\"\";if(icon){icon.style.translate=\"\";icon.style.scale=\"\";icon.style.filter=\"\";}spot.style.opacity=\"0\";bar.style.transform=\"scaleX(0)\";root.style.transform=\"perspective(900px) rotateX(0deg) rotateY(0deg)\";};paint(.5,.5);root.addEventListener(\"pointermove\",move);root.addEventListener(\"pointerenter\",enter);root.addEventListener(\"pointerleave\",leave);return()=>{root.removeEventListener(\"pointermove\",move);root.removeEventListener(\"pointerenter\",enter);root.removeEventListener(\"pointerleave\",leave);if(spot.parentNode)spot.parentNode.removeChild(spot);if(bar.parentNode)bar.parentNode.removeChild(bar);body.style.boxShadow=\"\";body.style.overflow=prev.overflow;body.style.isolation=prev.isolation;root.style.transition=prev.transition;root.style.transform=\"\";};},[]);return /*#__PURE__*/_jsx(Component,{...rest,ref:setRef,style:{...style}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withCardFx\":{\"type\":\"reactHoc\",\"name\":\"withCardFx\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CardFx.map"],"mappings":"A,gJAAuQ,SAAgBW,EAAW,EAAU,CAAC,MAAoB,gBAAW,SAAwB,EAAM,EAAI,CAAC,GAAK,CAAC,QAAM,GAAGC,GAAMC,EAAYC,EAAMd,EAAa,IAAI,EAAQe,EAAOd,EAAkB,GAAI,CAAC,EAAM,QAAQe,EAAM,OAAOC,GAAM,WAAWA,EAAID,CAAE,EAAUC,IAAI,EAAI,QAAQD,EAAG,EAAE,CAACC,CAAG,CAAC,EAAknG,OAAhnGP,MAAoB,CAAC,IAAMQ,EAAKJ,EAAM,QAAoJ,GAAzI,CAACI,GAAab,IAAS,QAAa,CAACA,EAAO,YAAqB,CAACA,EAAO,WAAW,oCAAoC,CAAC,CAAC,SAAkBA,EAAO,WAAW,kCAAkC,CAAC,CAAC,QAAQ,OAAO,IAAMc,EAAKD,EAAK,cAAc,2BAA2B,GAAGA,EAAK,iBAAiB,GAAG,CAACC,EAAK,OAAO,IAAMC,EAAK,CAAC,SAASD,EAAK,MAAM,SAAS,UAAUA,EAAK,MAAM,UAAU,WAAWD,EAAK,MAAM,UAAU,EAAE,EAAK,MAAM,SAAS,SAAS,EAAK,MAAM,UAAU,UAAU,IAAMG,EAAK,SAAS,cAAc,KAAK,EAAEA,EAAK,aAAa,cAAc,MAAM,EAAE,EAAK,MAAM,QAAQ,kHAAkH,IAAMC,EAAI,SAAS,cAAc,KAAK,EAAEA,EAAI,aAAa,cAAc,MAAM,EAAE,EAAI,MAAM,QAAQ,mOAAmOH,EAAK,YAAYE,CAAI,EAAEF,EAAK,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