function useCountUp(target, dur = 1400, start) { const [v, setV] = React.useState(0); React.useEffect(() => { if (!start) return; const reduce = window.matchMedia('(prefers-reduced-motion: reduce)').matches; if (reduce) { setV(target); return; } const t0 = performance.now(); let raf; const tick = (now) => { const p = Math.min(1, (now - t0) / dur); const e = 1 - Math.pow(1 - p, 3); setV(target * e); if (p < 1) raf = requestAnimationFrame(tick); }; raf = requestAnimationFrame(tick); return () => cancelAnimationFrame(raf); }, [start, target, dur]); return v; } function StatsBand() { return null; } window.StatsBand = StatsBand;