{"version":3,"file":"EdgeGlow.DF50eG3V.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/SkkrdsZIfg2TPyvCngdY/aULpsEVxLqhet4KLd628/EdgeGlow.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useEffect,useRef}from\"react\";// Soft light that gathers on a card's hairline where the cursor is closest.\n// One shared pointer listener drives every glowing card on the page.\nconst LIGHT_RADIUS=200// px, size of the light pool on the border\n;const REACH=80// px, how far outside a card the cursor still lights its edge\n;const STRENGTH=.42// peak white alpha on the hairline\n;const cards=new Set;let pointerX=-9999;let pointerY=-9999;let frame=0;let listening=false;function paint(){frame=0;cards.forEach(card=>{const glow=card.querySelector(\":scope > [data-edge-glow]\");if(!glow)return;const r=card.getBoundingClientRect();const dx=Math.max(r.left-pointerX,0,pointerX-r.right);const dy=Math.max(r.top-pointerY,0,pointerY-r.bottom);const outside=Math.hypot(dx,dy);glow.style.opacity=outside>REACH?\"0\":String(1-outside/REACH);glow.style.setProperty(\"--gx\",`${pointerX-r.left}px`);glow.style.setProperty(\"--gy\",`${pointerY-r.top}px`);});}function schedule(){if(!frame)frame=requestAnimationFrame(paint);}function onPointerMove(event){if(event.pointerType!==\"mouse\")return;pointerX=event.clientX;pointerY=event.clientY;schedule();}function onPointerLeave(){pointerX=-9999;pointerY=-9999;schedule();}function listen(){if(listening)return;listening=true;window.addEventListener(\"pointermove\",onPointerMove,{passive:true});window.addEventListener(\"scroll\",schedule,{passive:true});document.documentElement.addEventListener(\"pointerleave\",onPointerLeave);}function makeGlow(){const glow=document.createElement(\"div\");glow.setAttribute(\"data-edge-glow\",\"\");glow.setAttribute(\"aria-hidden\",\"true\");glow.style.cssText=[\"position:absolute\",\"inset:0\",\"border-radius:inherit\",\"padding:var(--border-top-width, 1px)\",\"pointer-events:none\",\"z-index:2\",\"opacity:0\",\"transition:opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1)\",`background:radial-gradient(${LIGHT_RADIUS}px circle at var(--gx, -999px) var(--gy, -999px), rgba(255, 255, 255, ${STRENGTH}), rgba(255, 255, 255, 0) 70%)`,\"-webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)\",\"-webkit-mask-composite:xor\",\"mask:linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0)\"].join(\";\");return glow;}// Image cards: the photo inside eases in a touch on hover (mouse only).\n// Video tiles zoom their LoopVideo canvas copy, never the <video> itself:\n// Chrome snaps scaled video frames, so they jitter\nconst ZOOM_CSS=`\n@media (hover: hover) and (prefers-reduced-motion: no-preference) {\n[data-glipp-zoom] > [data-framer-background-image-wrapper] > img, [data-glipp-zoom] .glipp-loop canvas { transition: transform 1.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease; }\n[data-glipp-zoom]:hover > [data-framer-background-image-wrapper] > img, [data-glipp-zoom]:hover .glipp-loop canvas { transform: scale(1.035); }\n}`;function addZoomStyles(){if(document.getElementById(\"glipp-zoom-css\"))return;const style=document.createElement(\"style\");style.id=\"glipp-zoom-css\";style.textContent=ZOOM_CSS;document.head.appendChild(style);}export function withEdgeGlow(Component){return glowing(Component,false);}export function withEdgeGlowZoom(Component){return glowing(Component,true);}function glowing(Component,zoom){return /*#__PURE__*/forwardRef((props,forwardedRef)=>{const ref=useRef(null);useEffect(()=>{const card=ref.current;if(!card||typeof window===\"undefined\")return;if(zoom){addZoomStyles();card.setAttribute(\"data-glipp-zoom\",\"\");}if(window.matchMedia(\"(hover: none)\").matches)return;const glow=makeGlow();card.appendChild(glow);cards.add(card);listen();return()=>{cards.delete(card);glow.remove();};},[]);const setRef=node=>{ref.current=node;if(typeof forwardedRef===\"function\")forwardedRef(node);else if(forwardedRef)forwardedRef.current=node;};return /*#__PURE__*/_jsx(Component,{...props,ref:setRef});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withEdgeGlowZoom\":{\"type\":\"reactHoc\",\"name\":\"withEdgeGlowZoom\",\"annotations\":{\"framerContractVersion\":\"1\"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