(function(e,t){"object"==typeofexports&&"undefined"!=typeofmodule?t(exports):"function"==typeofdefine&&define.amd?define(["exports"],t):(e="undefined"==typeofglobalThis?e||self:globalThis,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){returnd(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&&(einstanceofError||e.message)?e:newError(e))})}functionl(e,t,n){try{e(t,n)}catch(e){_e(t=>{throwt},e)}}functiond(e){return"AsyncFunction"===e[Symbol.toStringTag]}functionu(e){return"AsyncGenerator"===e[Symbol.toStringTag]}functionp(e){return"function"==typeofe[Symbol.asyncIterator]}functionc(e){if("function"!=typeofe)thrownewError("expected a function");returnd(e)?r(e):e}functiono(e,t){functionn(...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)})}if(t||(t=e.length),!t)thrownewError("arity is undefined");returnn}functionh(e){returnfunctiona(t,...n){consti=o(function(a){vari=this;returne(t,(e,t)=>{c(e).apply(i,n.concat(t))},a)});returni}}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;returnfunctiona(){return++t<n?{value:e[t],key:t}:null}}functionv(e){vart=-1;returnfunctionn(){vara=e.next();returna.done?null:(t++,{value:a.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||u||l||(u=!0,e.next().then(({value:e,done:t})=>{if(!(d||l))returnu=!1,t?(l=!0,void(0>=p&&a(null))):void(p++,n(e,c,r),c++,i())}).catch(s))}functionr(e,t){returnp-=1,d?void0:e?s(e):!1===e?(l=!0,void(d=!0)):t===be||l&&0>=p?(l=!0,a(null)):voidi()}functions(e){d||(u=!1,l=!0,a(e))}letl=!1,d=!1,u=!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){k.push(()=>l(e,t))}functioni(){if(!f){if(0===k.length&&0===h)returnn(null,o);for(;k.length&&h<t;){vare=k.shift();e()}}}functionr(e,t){varn=g[e];n||(n=g[e]=[]),n.push(t)}functions(e){vart=g[e]||[];t.forEach(e=>e()),i()}functionl(e,t){if(!y){vara=L((t,...a)=>{if(h--,!1===t)returnvoid(f=!0);if(2>a.length&&([a]=a),t){vari={};if(Object.keys(o).forEach(e=>{i[e]=o[e]}),i[e]=a,y=!0,g=Object.create(null),f)return;n(t,i)}elseo[e]=a,s(e)});h++;vari=c(t[t.length-1]);1<t.length?i(o,a):i(a)}}functiond(){for(vare,t=0;v.length;)e=v.pop(),t++,u(e).forEach(e=>{0==--S[e]&&v.push(e)});if(t!==p)thrownewError("async.auto cannot execute tasks due to a recursive dependency")}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());varp=Object.keys(e).length;if(!p)returnn(null);t||(t=p);varo={},h=0,f=!1,y=!1,g=Object.create(null),k=[],v=[],S={};returnObject.keys(e).forEach(t=>{varn=e[t];if(!Ar