import{h as o}from"./index-CXwCk-SR.js";const u=4,f=1e4;function c(){const r=o(!1),t=o(0);async function s(a){const n=()=>a.currentIds().some(e=>!a.idsBefore.has(e));if(n())return!0;r.value=!0;try{for(let e=1;e<=u;e++)if(t.value=e,await new Promise(l=>setTimeout(l,f)),await a.refresh(),n())return!0;return!1}finally{r.value=!1,t.value=0}}return{polling:r,pollRound:t,pollForNewTask:s}}export{c as u};
