import{Kr as e,Qn as t,Yr as n,t as r}from"./bEsZKPzd.js";var i=250;const a=t(`logs`,()=>{let t=r(),a=n([]),o=e(!1),s=1,c=[],l=null,u=()=>{l=null,c.length!==0&&(c.reverse(),a.value=[...c,...a.value].slice(0,t.logMaxRows),c=[])},d=()=>{l||=setTimeout(u,i)};return{logs:a,paused:o,addLog:e=>{o.value||(c.push({...e,seq:s}),s++,d())},clearLogs:()=>{l&&=(clearTimeout(l),null),c=[],a.value=[],s=1},togglePaused:()=>{o.value=!o.value}}});export{a as t};