"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[1646],{451646(e,r,t){let n=t(951874);e.exports=e=>{if(!((Number.isInteger(e)||e===1/0)&&e>0))throw TypeError("Expected `concurrency` to be a number from 1 and up");let r=new n,t=0,u=async(e,n,...u)=>{t++;let a=(async()=>e(...u))();n(a);try{await a}catch{}t--,r.size>0&&r.dequeue()()},a=(n,...a)=>new Promise(i=>{((n,a,...i)=>{r.enqueue(u.bind(null,n,a,...i)),(async()=>{await Promise.resolve(),t<e&&r.size>0&&r.dequeue()()})()})(n,i,...a)});return Object.defineProperties(a,{activeCount:{get:()=>t},pendingCount:{get:()=>r.size},clearQueue:{value:()=>{r.clear()}}}),a}}}]);