syriastreet.com/assets/js/lib/queue.js

1 line
687 B
JavaScript
Raw Permalink Normal View History

2023-10-06 21:29:45 +00:00
!function(){var s=[].slice;function n(e){var u,l,t,o=[],i=0,r=0,f=0,c=null,a=h;function p(){for(;l=i<o.length&&r<e;){var n=i++,u=o[n],t=s.call(u,1);t.push(function(t){return function(n,u){--r,null==c&&(null!=n?(c=n,i=f=NaN,d()):(o[t]=u,--f?l||p():d()))}}(n)),++r,u[0].apply(null,t)}}function d(){null!=c?a(c):t?a(c,o):a.apply(null,[c].concat(o))}return e=e||1/0,u={defer:function(){return c||(o.push(arguments),++f,p()),u},await:function(n){return a=n,t=!1,f||d(),u},awaitAll:function(n){return a=n,t=!0,f||d(),u}}}function h(){}n.version="1.0.7","function"==typeof define&&define.amd?define(function(){return n}):"object"==typeof module&&module.exports?module.exports=n:this.queue=n}();