{"version":3,"file":"Border.CkcPRHd0.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/obrPA9mc5OG2gmbzSiMW/BaWZ1Q68lN8iDxMmnBJo/Border.js"],"sourcesContent":["/**\n * GradientBorderCard — Framer Code Override\n *\n * REST  : nothing\n * HOVER : #007DBA comet loops CW from top-left, no dot at the tip\n */import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";const BORDER_RADIUS=28;const LINE_WIDTH=4;const SPEED=.01;function perim(w,h,r){return 2*(w-2*r)+2*(h-2*r)+2*Math.PI*r;}function buildPath(ctx,w,h,r,lw){const hf=lw/2;ctx.beginPath();ctx.moveTo(hf,r+hf);ctx.arcTo(hf,hf,r+hf,hf,r);ctx.lineTo(w-r-hf,hf);ctx.arcTo(w-hf,hf,w-hf,r+hf,r);ctx.lineTo(w-hf,h-r-hf);ctx.arcTo(w-hf,h-hf,w-r-hf,h-hf,r);ctx.lineTo(r+hf,h-hf);ctx.arcTo(hf,h-hf,hf,h-r-hf,r);ctx.lineTo(hf,r+hf);}export function withGradientBorder(Component){return function GradientBorderWrapper(props){const canvasRef=useRef(null);const wrapRef=useRef(null);const rafRef=useRef(0);const hoverRef=useRef(false);const headRef=useRef(0);const fadeRef=useRef(0);useEffect(()=>{const canvas=canvasRef.current;const wrap=wrapRef.current;if(!canvas||!wrap)return;const resize=()=>{canvas.width=wrap.offsetWidth;canvas.height=wrap.offsetHeight;};resize();const ro=new ResizeObserver(resize);ro.observe(wrap);const draw=()=>{const ctx=canvas.getContext(\"2d\");if(!ctx)return;const w=canvas.width,h=canvas.height;const r=BORDER_RADIUS,lw=LINE_WIDTH;const P=perim(w,h,r);ctx.clearRect(0,0,w,h);if(hoverRef.current)fadeRef.current=Math.min(1,fadeRef.current+.06);else fadeRef.current=Math.max(0,fadeRef.current-.04);const alpha=fadeRef.current;if(alpha>.01){if(hoverRef.current)headRef.current=(headRef.current+SPEED*P)%P;const tailLen=P*.22;// comet body — lineCap 'butt' removes the rounded dot at the tip\nbuildPath(ctx,w,h,r,lw);ctx.setLineDash([tailLen,P]);ctx.lineDashOffset=-(headRef.current-tailLen);const g=ctx.createLinearGradient(0,0,w,h);g.addColorStop(0,`rgba(0,125,186,${alpha})`);g.addColorStop(.4,`rgba(0,160,220,${alpha*.8})`);g.addColorStop(.75,`rgba(0,100,160,${alpha*.4})`);g.addColorStop(1,`rgba(0,80,140,0)`);ctx.strokeStyle=g;ctx.lineWidth=lw*1.5;ctx.lineCap=\"butt\"// no rounded cap = no dot\n;ctx.shadowColor=`rgba(0,125,186,${alpha*.8})`;ctx.shadowBlur=16;ctx.stroke();// faint full-border ghost\nbuildPath(ctx,w,h,r,lw);ctx.setLineDash([]);ctx.strokeStyle=`rgba(0,125,186,${alpha*.12})`;ctx.lineWidth=lw;ctx.shadowBlur=0;ctx.stroke();}rafRef.current=requestAnimationFrame(draw);};rafRef.current=requestAnimationFrame(draw);return()=>{cancelAnimationFrame(rafRef.current);ro.disconnect();};},[]);return /*#__PURE__*/_jsxs(\"div\",{ref:wrapRef,style:{position:\"relative\",display:\"inline-block\",borderRadius:BORDER_RADIUS,...props.style},onMouseEnter:()=>{hoverRef.current=true;},onMouseLeave:()=>{hoverRef.current=false;},children:[/*#__PURE__*/_jsx(\"canvas\",{ref:canvasRef,style:{position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",borderRadius:BORDER_RADIUS,pointerEvents:\"none\",zIndex:10}}),/*#__PURE__*/_jsx(Component,{...props,style:{...props.style,boxShadow:\"none\"}})]});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withGradientBorder\":{\"type\":\"reactHoc\",\"name\":\"withGradientBorder\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Border.map"],"mappings":"gIAK0J,SAAS,EAAM,EAAE,EAAE,EAAE,CAAC,MAAO,IAAG,EAAE,EAAE,GAAG,GAAG,EAAE,EAAE,GAAG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