(function(e,t){"object"==typeofexports&&"undefined"!=typeofmodule?t(exports):"function"==typeofdefine&&define.amd?define(["exports"],t):t(e.async={})})(this,function(e){'use strict';functiont(e,...t){return(...n)=>e(...t,...n)}functionn(e){returnfunction(...t){varn=t.pop();returne.call(this,t,n)}}functiona(e){setTimeout(e,0)}functioni(e){return(t,...n)=>e(()=>t(...n))}functionr(e){returnu(e)?function(...t){constn=t.pop(),a=e.apply(this,t);returns(a,n)}:n(function(t,n){vara;try{a=e.apply(this,t)}catch(t){returnn(t)}returna&&"function"==typeofa.then?s(a,n):voidn(null,a)})}functions(e,t){returne.then(e=>{l(t,null,e)},e=>{l(t,e&&e.message?e:newError(e))})}functionl(e,t,n){try{e(t,n)}catch(e){_e(t=>{throwt},e)}}functionu(e){return"AsyncFunction"===e[Symbol.toStringTag]}functiond(e){return"AsyncGenerator"===e[Symbol.toStringTag]}functionp(e){return"function"==typeofe[Symbol.asyncIterator]}functionc(e){if("function"!=typeofe)thrownewError("expected a function");returnu(e)?r(e):e}functiono(e,t=e.length){if(!t)thrownewError("arity is undefined");returnfunction(...n){return"function"==typeofn[t-1]?e.apply(this,n):newPromise((a,i)=>{n[t-1]=(e,...t)=>e?i(e):voida(1<t.length?t:t[0]),e.apply(this,n)})}}functionh(e){returnfunction(t,...n){consta=o(function(a){vari=this;returne(t,(e,t)=>{c(e).apply(i,n.concat(t))},a)});returna}}functionf(e,t,n,a){t=t||[];vari=[],r=0,s=c(n);returne(t,(e,t,n)=>{vara=r++;s(e,(e,t)=>{i[a]=t,n(e)})},e=>{a(e,i)})}functiony(e){returne&&"number"==typeofe.length&&0<=e.length&&0==e.length%1}functionm(e){functiont(...t){if(null!==e){varn=e;e=null,n.apply(this,t)}}returnObject.assign(t,e),t}functiong(e){returne[Symbol.iterator]&&e[Symbol.iterator]()}functionk(e){vart=-1,n=e.length;returnfunction(){return++t<n?{value:e[t],key:t}:null}}functionv(e){vart=-1;returnfunction(){varn=e.next();returnn.done?null:(t++,{value:n.value,key:t})}}functionS(e){vart=e?Object.keys(e):[],n=-1,a=t.length;returnfunctioni(){varr=t[++n];return"__proto__"===r?i():n<a?{value:e[r],key:r}:null}}functionx(e){if(y(e))returnk(e);vart=g(e);returnt?v(t):S(e)}functionL(e){returnfunction(...t){if(null===e)thrownewError("Callback was already called.");varn=e;e=null,n.apply(this,t)}}functionE(e,t,n,a){functioni(){p>=t||d||l||(d=!0,e.next().then(({value:e,done:t})=>{if(!(u||l))returnd=!1,t?(l=!0,void(0>=p&&a(null))):void(p++,n(e,c,r),c++,i())}).catch(s))}functionr(e,t){returnp-=1,u?void0:e?s(e):!1===e?(l=!0,void(u=!0)):t===be||l&&0>=p?(l=!0,a(null)):voidi()}functions(e){u||(d=!1,l=!0,a(e))}letl=!1,u=!1,d=!1,p=0,c=0;i()}functionO(e,t,n){functiona(e,t){!1===e&&(l=!0);!0===l||(e?n(e):(++r===s||t===be)&&n(null))}n=m(n);vari=0,r=0,{length:s}=e,l=!1;for(0===s&&n(null);i<s;i++)t(e[i],i,L(a))}function_(e,t,n){returnIe(e,1/0,t,n)}functionb(){functione(e,...a){returne?n(e):voidt(1<a.length?a:a[0])}lett,n;returne[Ce]=newPromise((e,a)=>{t=e,n=a}),e}functionA(e,t,n){functiona(e,t){g.push(()=>l(e,t))}functioni(){if(!h){if(0===g.length&&0===o)returnn(null,p);for(;g.length&&o<t;){vare=g.shift();e()}}}functionr(e,t){varn=y[e];n||(n=y[e]=[]),n.push(t)}functions(e){vart=y[e]||[];t.forEach(e=>e()),i()}functionl(e,t){if(!f){vara=L((t,...a)=>{if(o--,!1===t)returnvoid(h=!0);if(2>a.length&&([a]=a),t){vari={};if(Object.keys(p).forEach(e=>{i[e]=p[e]}),i[e]=a,f=!0,y=Object.create(null),h)return;n(t,i)}elsep[e]=a,s(e)});o++;vari=c(t[t.length-1]);1<t.length?i(p,a):i(a)}}functionu(t){varn=[];returnObject.keys(e).forEach(a=>{consti=e[a];Array.isArray(i)&&0<=i.indexOf(t)&&n.push(a)}),n}"number"!=typeoft&&(n=t,t=null),n=m(n||b());vard=Object.keys(e).length;if(!d)returnn(null);t||(t=d);varp={},o=0,h=!1,f=!1,y=Object.create(null),g=[],k=[],v={};returnObject.keys(e).forEach(t=>{varn=e[t];if(!Array.isArray(n))returna(t,[n]),voidk.push(t);vari=n.slice(0,n.length-1),s=i.length;return0===s?(a(t,n),voidk.push(t)):void(v[t]=s,i.forEach(l=>{if(!e[l])thrownewError("async.auto task `"+t+"` has a non-existent dependency `"+l+"` in "+i.join(", "));r(l,()=>{s--,0===s&&a(t,n)})}))}),function(){for(vare,t=0;k.length;)e=k.pop(),t++,u(e).forEach(e=>{0==--v[e]&&k.push(e)});if(t!==d)thrownewError("async.auto cannot execute tasks due to a recursive dependency")}(),i(),n[Ce]}functionI(e){lett="",n=0,a=e.indexOf("*/");for(;n<e.length;)if("/"===e[n]&&"/"===e[n+1]){lett=e.indexOf("\n",n);n=-1===t?e.length:t}elseif(-1!==a&&"/"===e[n]&&"*"===e[n+1]){leti=e.indexOf("*/",n);-1===i?(t+=e[n],n++):(n=i+2,a=e.indexOf("*/",n))}elset+=e[n],n++;returnt}functionM(e){constt=I(e.toString());letn=t.match(Pe);if(n||(n=t.match(Re)),!n)thrownewError("could not parse args in autoInject\nSource:\n"+t);let[,a]=n;returna.replace(/\s/g,"").split(ze).map(e=>e.replace(Ne,"").trim())}functionj(e,t){varn={};returnObject.keys(e).forEach(t=>{functiona(e,t){varn=i.map(t=>e[t]);n.push(t),c(r)(...n)}vari,r=e[t],s=u(r),l=!s&&1===r.length||s&&0===r.length;if(Array.isArray(r))i=[...r],r=i.pop(),n[t]=i.concat(0<i.length?a:r);elseif(l)n[t]=r;else{if(i=M(r),0===r.length&&!s&&0===i.length)thrownewError("autoInject task functions require explicit parameters.");s||i.pop(),n[t]=i.concat(a)}}),A(n,t)}functionw(e,t){e.length=1,e.head=e.tail=t}functionB(e,t,n){functiona(e,t){f[e].push(t)}functioni(e,t){constn=(...a)=>{r(e,n),t(...a)};f[e].push(n)}functionr(e,t){returne?t?void(f[e]=f[e].filter(e=>e!==t)):f[e]=[]:Object.keys(f).forEach(e=>f[e]=[])}functions(e,...t){f[e].forEach(e=>e(...t))}functionl(e,t,n,a){functioni(e,...t){returne?n?s(e):r():1>=t.length?r(t[0]):voidr(t)}if(null!=a&&"function"!=typeofa)thrownewError("task callback must be a function");k.started=!0;varr,s,l=k._createTaskItem(e,n?i:a||i);if(t?k._tasks.unshift(l):k._tasks.push(l),y||(y=!0,_e(()=>{y=!1,k.process()})),n||!a)returnnewPromise((e,t)=>{r=e,s=t})}functionu(e){returnfunction(t,...n){o-=1;for(vara=0,r=e.length;a<r;a++){varl=e[a],u=h.indexOf(l);0===u?h.shift():0<u&&h.splice(u,1),l.callback(t,...n),null!=t&&s("error",t,l.data)}o<=k.concurrency-k.buffer&&s("unsaturated"),k.idle()&&s("drain"),k.process()}}functiond(e){return!!(0===e.length&&k.idle())&&(_e(()=>s("drain")),!0)}if(null==t)t=1;elseif(0===t)thrownewRangeError("Concurrency must not be zero");varp=c(e),o=0,h=[];constf={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};vary=!1;constm=e=>t=>t?void(r(e),a(e,t)):newPromise((t,n)=>{i(e,(e,a)=>e?n(e):voidt(a))});varg=!1,k={_tasks:newVe,_createTaskItem(e,t){return{data:e,callback:t}},*[Symbol.iterator](){yield*k._tasks[Symbol.iterator]()},concurrency:t,payload:n,buffer:t/4,started:!1,paused:!1,push(e,t){returnArray.isArray(e)?d(e)?void0:e.map(e=>l(e,!1,!1,t)):l(e,!1,!1,t)},pushAsync(e,t){returnArray.isArray(e)?d(e)?void0:e.map(e=>l(e,!1,!0,t)):l(e,!1,!0,t)},kill(){r(),k._tasks.empty()},unshift(e,t){returnArray.isArray(e)?d(e)?void0:e.map(e=>l(e,!0,!1,t)):l(e,!0,!1,t)},unshiftAsync(e,t){returnArray.isArray(e)?d(e)?void0:e.map(e=>l(e,!0,!0,t)):l(e,!0,!0,t)},remove(e){k._tasks.remove(e)},process(){vare=Math.min;if(!g){for(g=!0;!k.paused&&o<k.concurrency&&k._tasks.length;){vart=[],n=[],a=k._tasks.length;k.payload&&(a=e(a,k.payload));for(varr,d=0;d<a;d++)r=k._tasks.shift(),t.push(r),h.push(r),n.push(r.data);o+=1,0===k._tasks.length&&s("empty"),o===k.concurrency&&s("saturated");varc=L(u(t));p(n,c)}g=!1}},length(){returnk._tasks.length},running(){returno},workersList(){returnh},idle(){return0===k._tasks.length+o},pause(){k.paused=!0},resume(){!1===k.paused||(k.paused=!1,_e(k.process))}};returnObject.defineProperties(k,{saturated:{writable:!1,value:m("saturated")},unsaturated:{writable:!1,value:m("unsaturated")},empty:{writable:!1,value:m("empty")},drain:{writable:!1,value:m("drain")},error:{writable:!1,value:m("error")}}),k}functionT(e,t){returnB(e,1,t)}functionF(e,t,n){returnB(e,t,n)}functionC(...e){vart=e.map(c);returnfunction(...e){varn=this,a=e[e.length-1];return"function"==typeofa?e.pop():a=b(),qe(t,e,(e,t,a)=>{t.apply(n,e.concat((e,...t)=>{a(e,t)}))},(e,t)=>a(e,...t)),a[Ce]}}functionP(...e){returnC(...e.reverse())}functionR(...e){returnfunction(...t){varn=t.pop();returnn(null,...e)}}functionz(e,t){return(n,a,i,r)=>{vars,l=!1;constu=c(i);n(a,(n,a,i)=>{u(n,(a,r)=>a||!1===a?i(a):e(r)&&!s?(l=!0,s=t(!0,n),i(null,be)):voidi())},e=>e?r(e):voidr(null,l?s:t(!1)))}}functionN(e){return(t,...n)=>c(t)(...n,(t,...n)=>{"object"==typeofconsole&&(t?console.error&&console.error(t):console[e]&&n.forEach(t=>console[e](t)))})}functionV(e,t,n){consta=c(t);returnXe(e,(...e)=>{constt=e.pop();a(...e,(e,n)=>t(e,!n))},n)}functionY(e){return(t,n,a)=>e(t,a)}functionq(e){returnu(e)?e:function(...t){varn=t.pop(),a=!0;t.push((...e)=>{a?_e(()=>n(...e)):n(...e)}),e.apply(this,t),a=!1}}functionD(e,t,n,a){varr=Array(t.length);e(t,(e,t,a)=>{n(e,(e,n)=>{r[t]=!!n,a(e)})},e=>{if(e)returna(e);for(varn=[],s=0;s<t.length;s++)r[s]&&n.push(t[s]);a(null,n)})}functionQ(e,t,n,a){vari=[];e(t,(e,t,a)=>{n(e,(n,r)=>n?a(n):void(r&&i.push({index:t,value:e}),a(n)))},e=>e?a(e):voida(null,i.sort((e,t)=>e.index-t.index).map(e=>e.value)))}functionU(e,t,n,a){vari=y(t)?D:Q;returni(e,t,c(n),a)}functionG(e,t,n){returnut(e,1/0,t,n)}functionW(e,t,n){returnut(e,1,t,n)}functionH(e,t,n){returnpt(e,1/0,t,n)}functionJ(e,t,n){returnpt(e,1,t,n)}functionK(e,t=e=>e){vara=Object.create(null),r=Object.create(null),s=c(e),l=n((e,n)=>{varu=t(...e);uina?_e(()=>n(null,...a[u])):uinr?r[u].push(n):(r[u]=[n],s(...e,(e,...t)=>{e||(a[u]=t);varn=r[u];deleter[u];for(vars=0,d=n.length;s<d;s++)n[s](e,...t)}))});returnl.memo=a,l.unmemoized=e,l}functionX(e,t){returnot(Me,e,t)}functionZ(e,t,n){returnot(Ae(t),e,n)}function$(e,t){varn=c(e);returnB((e,t)=>{n(e[0],t)},t,1)}functionee(e){return(e<<1)+1}functionte(e){return(e+1>>1)-1}functionne(e,t){returne.priority===t.priority?e.pushCount<t.pushCount:e.priority<t.priority}functionae(e,t){functionn(e,t){returnArray.isArray(e)?e.map(e=>({data:e,priority:t})):{data:e,priority:t}}vara=$(e,t),{push:i,pushAsync:r}=a;returna._tasks=newht,a._createTaskItem=({data:e,priority:t},n)=>({data:e,priority:t,callback:n}),a.push=function(e,t=0,a){returni(n(e,t),a)},a.pushAsync=function(e,t=0,a){returnr(n(e,t),a)},deletea.unshift,deletea.unshiftAsync,a}functionie(e,t,n,a){vari=[...e].reverse();returnqe(i,t,n,a)}functionre(e){vart=c(e);returnn(function(e,n){returne.push((e,...t)=>{leta={};if(e&&(a.error=e),0<t.length){vari=t;1>=t.length&&([i]=t),a.value=i}n(null,a)}),t.apply(this,e)})}functionse(e){vart;returnArray.isArray(e)?t=e.map(re):(t={},Object.keys(e).forEach(n=>{t[n]=re.call(this,e[n])})),t}functionle(e,t,n,a){consti=c(n);returnU(e,t,(e,t)=>{i(e,(e,n)=>{t(e,!n)})},a)}functionue(e){returnfunction(){returne}}functionde(e,t,n){functiona(){r((e,...t)=>{!1===e||(e&&s++<i.times&&("function"!=typeofi.errorFilter||i.errorFilter(e))?setTimeout(a,i.intervalFunc(s-1)):n(e,...t))})}vari={times:kt,intervalFunc:ue(vt)};if(3>arguments.length&&"function"==typeofe?(n=t||b(),t=e):(pe(i,e),n=n||b()),"function"!=typeoft)thrownewError("Invalid arguments for async.retry");varr=c(t),s=1;returna(),n[Ce]}functionpe(e,n){if("object"==typeofn)e.times=+n.times||kt,e.intervalFunc="function"==typeofn.interval?n.interval:ue(+n.interval||vt),e.errorFilter=n.errorFilter;elseif("number"==typeofn||"string"==typeofn)e.times=+n||kt;elsethrownewError("Invalid arguments for async.retry")}functionce(e,t){t||(t=e,e=null);leta=e&&e.arity||t.length;u(t)&&(a+=1);vari=c(t);returnn((t,n)=>{functionr(e){i(...t,e)}return(t.length<a-1||null==n)&&(t.push(n),n=b()),e?de(e,r,n):de(r,n),n[Ce]})}functionoe(e,t){returnot(Be,e,t)}functionhe(e,t,a){vari=c(e);returnn((n,r)=>{vars,l=!1;n.push((...e)=>{l||(r(...e),clearTimeout(s))}),s=setTimeout(function(){vart=e.name||"anonymous",n=newError("Callback function \""+t+"\" timed out.");n.code="ETIMEDOUT",a&&(n.info=a),l=!0,r(n)},t),i(...n)})}functionfe(e){for(vart=Array(e);e--;)t[e]=e;returnt}functionye(e,t,n,a){vari=c(n);returnDe(fe(e),t,i,a)}functionme(e,t,n){returnye(e,1/0,t,n)}functionge(e,t,n){returnye(e,1,t,n)}functionke(e,t,n,a){3>=arguments.length&&"function"==typeoft&&(a=n,n=t,t=Array.isArray(e)?[]:{}),a=m(a||b());vari=c(n);returnMe(e,(e,n,a)=>{i(t,e,n,a)},e=>a(e,t)),a[Ce]}functionve(e){return(...t)=>(e.unmemoized||e)(...t)}functionSe(e,t,n){consta=c(e);return_t(e=>a((t,n)=>e(t,!n)),t,n)}varxe,Le="function"==typeofqueueMicrotask&&queueMicrotask,Ee="function"==typeofsetImmediate&&setImmediate,Oe="object"==typeofprocess&&"function"==typeofprocess.nextTick;xe=Le?queueMicrotask:Ee?setImmediate:Oe?process.nextTick:a;var_e=i(xe);constbe={};varAe=e=>(t,n,a)=>{functioni(e,t){if(!u)if(c-=1,e)l=!0,a(e);elseif(!1===e)l=!0,u=!0;else{if(t===be||l&&0>=c)returnl=!0,a(null);o||r()}}functionr(){for(o=!0;c<e&&!l;){vart=s();if(null===t)returnl=!0,void(0>=c&&a(null));c+=1,n(t.value,t.key,L(i))}o=!1}if(a=m(a),0>=e)thrownewRangeError("concurrency limit cannot be less than 1");if(!t)returna(null);if(d(t))returnE(t,e,n,a);if(p(t))returnE(t[Symbol.asyncIterator](),e,n,a);vars=x(t),l=!1,u=!1,c=0,o=!1;r()},Ie=o(function(e,t,n,a){returnAe(t)(e,c(n),a)},4),Me=o(function(e,t,n){vara=y(e)?O:_;returna(e,c(t),n)},3),je=o(function(e,t,n){returnf(Me,e,t,n)},3),we=h(je),Be=o(function(e,t,n){returnIe(e,1,t,n)},3),Te=o(function(e,t,n){returnf(Be,e,t,n)},3),Fe=h(Te);constCe=Symbol("promiseCallback");varPe=/^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/,Re=/^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/,ze=/,/,Ne=/(=.+)?(\s*)$/;classVe{constructor(){this.head=this.tail=null,this.length=0}removeLink(e){returne.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev,e.prev=e.next=null,this.length-=1,e}empty(){for(;this.head;)this.shift();returnthis}insertAfter(e,t){t.prev=e,t.next=e.next,e.next?e.next.prev=t:this.tail=t,e.next=t,this.length+=1}insertBefore(e,t){t.prev=e.prev,t.next=e,e.prev?e.prev.next=t:this.head=t,e.prev=t,this.length+=1}unshift(e){this.head?this.insertBefore(this.head,e):w(this,e)}push(e){this.tail?this.insertAfter(this.tail,e):w(this,e)}shift(){returnthis.head&&this.removeLink(this.head)}pop(){returnthis.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(vare=this.head;e;)yielde.data,e=e.next}remove(e){for(vart=this.head;t;){var{next:n}=t;e(t)&&this.removeLink(t),t=n}returnthis}}varYe,qe=o(function(e,t,n,a){a=m(a);varr=c(n);returnBe(e,(e,n,a)=>{r(t,e,(e,n)=>{t=n,a(e)})},e=>a(e,t))},4),De=o(function(e,t,n,a){returnf(Ae(t),e,n,a)},4),Qe=o(function(e,t,n,a){vari=c(n);returnDe(e,t,(e,t)=>{i(e,(e,...n)=>e?t(e):t(e,n))},(e,t)=>{for(varn=[],r=0;r<t.length;r++)t[r]&&(n=n.concat(...t[r]));returna(e,n)})},4),Ue=o(function(e,t,n){returnQe(e,1/0,t,n)},3),Ge=o(function(e,t,n){returnQe(e,1,t,n)},3),We=o(function(e,t,n){returnz(e=>e,(e,t)=>t)(Me,e,t,n)},3),He=o(function(e,t,n,a){returnz(e=>e,(e,t)=>t)(Ae(t),e,n,a)},4),Je=o(function(e,t,n){returnz(e=>e,(e,t)=>t)(Ae(1),e,t,n)},3),Ke=N("dir"),Xe=o(function(e,t,n){functiona(e,...t){returne?n(e):void(!1===e||(r=t,l(...t,i)))}functioni(e,t){returne?n(e):!1===e?void0:t?voids(a):n(null,...r)}n=L(n);varr,s=c(e),l=c(t);returni(null,!0)},3),Ze=o(function(e,t,n){returnMe(e,Y(c(t)),n)},3),$e=o(function(e,t,n,a){returnAe(t)(e,Y(c(n)),a)},4),et=o(function(e,t,n){return$e(e,1,t,n)},3),tt=o(function(e,t,n){returnz(e=>!e,e=>!e)(Me,e,t,n)},3),nt=o(function(e,t,n,a){returnz(e=>!e,e=>!e)(Ae(t),e,n,a)},4),at=o(function(e,t,n){returnz(e=>!e,e=>!e)(Be,e,t,n)},3),it=o(function(e,t,n){returnU(Me,e,t,n)},3),rt=o(function(e,t,n,a){returnU(Ae(t),e,n,a)},4),st=o(function(e,t,n){returnU(Be,e,t,n)},3),lt=o(function(e,t){functionn(e){returne?a(e):void(!1===e||i(n))}vara=L(t),i=c(q(e));returnn()},2),ut=o(function(e,t,n,a){vari=c(n);returnDe(e,t,(e,t)=>{i(e,(n,a)=>n?t(n):t(n,{key:a,val:e}))},(e,t)=>{for(varn={},{hasOwnProperty:r}=Object.prototype,s=0;s<t.length;s++)if(t[s]){var{key:l}=t[s],{val:u}=t[s];r.call(n,l)?n[l].push(u):n[l]=[u]}returna(e,n)})},4),dt=N("log"),pt=o(function(e,t,n,a){a=m(a);vari={},r=c(n);returnAe(t)(e,(e,t,n)=>{r(e,t,(e,a)=>e?n(e):void(i[t]=a,n(e)))},e=>a(e,i))},4);Ye=Oe?process.nextTick:Ee?setImmediate:a;varct=i(Ye),ot=o((e,t,n)=>{vara=y(t)?[]:{};e(t,(e,t,n)=>{c(e)((e,...i)=>{2>i.length&&([i]=i),a[t]=i,n(e)})},e=>n(e,a))},3);classht{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}getlength(){returnthis.heap.length}empty(){returnthis.heap=[],this}percUp(e){for(letn;0<e&&ne(this.heap[e],this.heap[n=te(e)]);){leta=this.heap[e];this.heap[e]=this.heap[n],this.heap[n]=a,e=n}}percDown(e){for(letn,a;(n=ee(e))<this.heap.length&&(n+1<this.heap.length&&ne(this.heap[n+1],this.heap[n])&&++n,!ne(this.heap[e],this.heap[n]));)a=this.heap[e],this.heap[e]=this.heap[n],this.heap[n]=a,e=n}push(e){e.pushCount=++this.pushCount,this.heap.push(e),this.percUp(this.heap.length-1)}unshift(e){returnthis.heap.push(e)}shift(){let[e]=this.heap;returnthis.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),e}toArray(){return[...this]}*[Symbol.iterator](){for(lete=0;e<this.heap.length;e++)yieldthis.heap[e].data}remove(e){lett=0;for(letn=0;n<this.heap.length;n++)e(this.heap[n])||(this.heap[t]=this.heap[n],t++);this.heap.splice(t);for(lett=te(this.heap.length-1);0<=t;t--)this.percDown(t);returnthis}}varft=o(function(e,t){if(t=m(t),!Array.isArray(e))returnt(newTypeError("First argument to race must be an array of functions"));if(!e.length)returnt();for(varn=0,a=e.length;n<a;n++)c(e[n])(t)},2),yt=o(function(e,t,n){returnle(Me,e,t,n)},3),mt=o(function(e,t,n,a){returnle(Ae(t),e,n,a)},4),gt=o(function(e,t,n){returnle(Be,e,t,n)},3);constkt=5,vt=0;varSt=o(function(e,t,n){returnz(Boolean,e=>e)(Me,e,t,n)},3),xt=o(function(e,t,n,a){returnz(Boolean,e=>e)(Ae(t),e,n,a)},4),Lt=o(function(e,t,n){returnz(Boolean,e=>e)(Be,e,t,n)},3),Et=o(function(e,t,n){functiona(e,t){varn=e.criteria,a=t.criteria;returnn<a?-1:n>a?1:0}vari=c(t);returnje(e,(e,t)=>{i(e,(n,a)=>n?t(n):voidt(n,{value:e,criteria:a}))},(e,t)=>e?n(e):voidn(null,t.sort(a).map(e=>e.value)))},3),Ot=o(function(e,t){varn,a=null;returnet(e,(e,t)=>{c(e)((e,...i)=>!1===e?t(e):void(2>i.length?[n]=i:n=i,a=e,t(e?null:{})))},()=>t(a,n))}),_t=o(function(e,t,n){functiona(e,...t){if(e)returnn(e);l=t;!1===e||s(i)}functioni(e,t){returne?n(e):!1===e?void0:t?voidr(a):n(null,...l)}n=L(n);varr=c(t),s=c(e),l=[];returns(i)},3),bt=o(function(e,t){functionn(t){varn=c(e[i++]);n(...t,L(a))}functiona(a,...r){return!1===a?void0:a||i===e.length?t(a,...r):voidn(r)}if(t=m(t),!Array.isArray(e))returnt(newError("First argument to waterfall must be an array of functions"));if(!e.length)returnt();vari=0;n([])});e.default={apply:t,applyEach:we,applyEachSeries:Fe,asyncify:r,auto:A,autoInject:j,cargo:T,cargoQueue:F,compose:P,concat:Ue,concatLimit:Qe,concatSeries:Ge,constant:R,detect:We,detectLimit:He,detectSeries:Je,dir:Ke,doUntil:V,doWhilst:Xe,each:Ze,eachLimit:$e,eachOf:Me,eachOfLimit:Ie,eachOfSeries:Be,eachSeries:et,ensureAsync:q,every:tt,everyLimit:nt,everySeries:at,filter:it,filterLimit:rt,filterSeries:st,forever:lt,groupBy:G,groupByLimit:ut,groupBySeries:W,log:dt,map:je,mapLimit:De,mapSeries:Te,mapValues:H,mapValuesLimit:pt,mapValuesSeries:J,memoize:K,nextTick:ct,parallel:X,parallelLimit:Z,priorityQueue:ae,queue:$,race:ft,reduce:qe,reduceRight:ie,reflect:re,reflectAll:se,reject:yt,rejectLimit:mt,rejectSeries:gt,retry:de,retryable:ce,seq:C,series:oe,setImmediate:_e,some:St,someLimit:xt,someSeries:Lt,sortBy:Et,timeout:he,times:me,timesLimit:ye,timesSeries:ge,transform:ke,tryEach:Ot,unmemoize:ve,until:Se,waterfall:bt,whilst:_t,all:tt,allLimit:nt,allSeries:at,any:St,anyLimit:xt,anySeries:Lt,find:We,findLimit:He,findSeries:Je,flatMap:Ue,flatMapLimit:Qe,flatMapSeries:Ge,forEach:Ze,forEachSeries:et,forEachLimit:$e,forEachOf:Me,forEachOfSeries:Be,forEachOfLimit:Ie,inject:qe,foldl:qe,foldr:ie,select:it,selectLimit:rt,selectSeries:st,wrapSync:r,during:_t,doDuring:Xe},e.apply=t,e.applyEach=we,e.applyEachSeries=Fe,e.asyncify=r,e.auto=A,e.autoInject=j,e.cargo=T,e.cargoQueue=F,e.compose=P,e.concat=Ue,e.concatLimit=Qe,e.concatSeries=Ge,e.constant=R,e.detect=We,e.detectLimit=He,e.detectSeries=Je,e.dir=Ke,e.doUntil=V,e.doWhilst=Xe,e.each=Ze,e.eachLimit=$e,e.eachOf=Me,e.eachOfLimit=Ie,e.eachOfSeries=Be,e.eachSeries=et,e.ensureAsync=q,e.every=tt,e.everyLimit=nt,e.everySeries=at,e.filter=it,e.filterLimit=rt,e.filterSeries=st,e.forever=lt,e.groupBy=G,e.groupByLimit=ut,e.groupBySeries=W,e.log=dt,e.map=je,e.mapLimit=De,e.mapSeries=Te,e.mapValues=H,e.mapValuesLimit=pt,e.mapValuesSeries=J,e.memoize=K,e.nextTick=ct,e.parallel=X,e.parallelLimit=Z,e.priorityQueue=ae,e.queue=$,e.race=ft,e.reduce=qe,e.reduceRight=ie,e.reflect=re,e.reflectAll=se,e.reject=yt,e.rejectLimit=mt,e.rejectSeries=gt,e.retry=de,e.retryable=ce,e.seq=C,e.series=oe,e.setImmediate=_e,e.some=St,e.someLimit=xt,e.someSeries=Lt,e.sortBy=Et,e.timeout=he,e.times=me,e.timesLimit=ye,e.timesSeries=ge,e.transform=ke,e.tryEach=Ot,e.unmemoize=ve,e.until=Se,e.waterfall=bt,e.whilst=_t,e.all=tt,e.allLimit=nt,e.allSeries=at,e.any=St,e.anyLimit=xt,e.anySeries=Lt,e.find=We,e.findLimit=He,e.findSeries=Je,e.flatMap=Ue,e.flatMapLimit=Qe,e.flatMapSeries=Ge,e.forEach=Ze,e.forEachSeries=et,e.forEachLimit=$e,e.forEachOf=Me,e.forEachOfSeries=Be,e.forEachOfLimit=Ie,e.inject=qe,e.foldl=qe,e.foldr=ie,e.select=it,e.selectLimit=rt,e.selectSeries=st,e.wrapSync=r,e.during=_t,e.doDuring=Xe,Object.defineProperty(e,"__esModule",{value:!0})});