veza/apps/web/dist_verification/assets/AnimatedNumber-C7V3zEin.js
senke 670282989b chore(refactor/sumi-migration): commit pending changes — tests, stream server, dist_verification
- apps/web: test updates (Vitest/setup), playbackAnalyticsService, TrackGrid, serviceErrorHandler
- veza-common: logging, metrics, traits, validation, random
- veza-stream-server: audio pipeline, codecs, cache, monitoring, routes
- apps/web/dist_verification: refresh build assets (content-hashed filenames)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 19:39:18 +01:00

1 line
721 B
JavaScript

import{a as o,j as x}from"./vendor-react-C9dYU-TK.js";import{c as A}from"./index-BMBS6scK.js";function R({end:t,duration:r=1e3,enabled:n=!0,decimals:e=0}){const[s,u]=o.useState(0),c=o.useRef(),a=o.useRef();return o.useEffect(()=>{if(!n||t===0){u(t);return}const i=m=>{a.current||(a.current=m);const f=Math.min((m-a.current)/r,1),p=(1-Math.pow(1-f,3))*t;u(Number(p.toFixed(e))),f<1&&(c.current=requestAnimationFrame(i))};return c.current=requestAnimationFrame(i),()=>{c.current&&cancelAnimationFrame(c.current)}},[t,r,n,e]),s}function j({value:t,duration:r=1e3,className:n,format:e}){const s=R({end:t,duration:r}),u=e?e(s):s.toLocaleString();return x.jsx("span",{className:A("tabular-nums",n),children:u})}export{j as A};