import{t as e}from"./chunk-mlkTr37E.js";var t=e(((e,t)=>{var n=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),r=()=>{let e=Error(`Delay aborted`);return e.name=`AbortError`,e},i=({clearTimeout:e,setTimeout:t,willResolve:n})=>(i,{value:a,signal:o}={})=>{if(o&&o.aborted)return Promise.reject(r());let s,c,l,u=e||clearTimeout,d=()=>{u(s),l(r())},f=()=>{o&&o.removeEventListener(`abort`,d)},p=new Promise((e,r)=>{c=()=>{f(),n?e(a):r(a)},l=r,s=(t||setTimeout)(c,i)});return o&&o.addEventListener(`abort`,d,{once:!0}),p.clear=()=>{u(s),s=null,c()},p},a=e=>{let t=i({...e,willResolve:!0});return t.reject=i({...e,willResolve:!1}),t.range=(e,r,i)=>t(n(e,r),i),t},o=a();o.createWithTimers=a,t.exports=o,t.exports.default=o}));export{t};