!function(n,t){function r(n){function t(){return e(n)}function r(t){var r;try{r=e(n.apply(this,arguments))}catch(o){r=u(o)}return r}return arguments.length>1?o(arguments):n instanceof Function?r:arguments.length?t:e}function e(n){return r.Promise.resolve(n)}function u(n){return r.Promise.reject(n)}function o(n){function t(t){return n.reduce(o.bind(this),e(t))}function u(n){return r(n)}function o(n,t){return n.then(t.bind(this))}return null===n?r(n):null==n?r():(n=Array.prototype.map.call(n,u),t)}function i(n){function t(n){return o([d(e),n,h(u)])}if(null==n)return r([]);var e=[],u=[];return n=Array.prototype.map.call(n,t),n=o(n),o([h(e),n,u])}function c(n){function t(t){var e=Array.prototype.map.call(n,u.bind(this,t));return r.Promise.all(e)}function e(n){return r(n)}function u(n,t){return t.call(this,n)}return null==n?r([]):(n=Array.prototype.map.call(n,e),t)}function l(n,t,e){function u(r){function u(n){return n?i():c()}var o=n.bind(this,r),i=t.bind(this,r),c=e.bind(this,r);return o().then(u)}return n=null!=n?r(n):r(),t=null!=t?r(t):r(),e=null!=e?r(e):r(),u}function a(n,t){function r(n){return u.call(this,n)}var e=Array.prototype.slice.call(arguments,1);e.push(r),t=o(e);var u=l(n,t);return u}function f(n,t){function e(n){return n=Array.prototype.map.call(n,u),i(n).call(this)}function u(n){function r(){return t.call(this,n)}return r}return null==n&&(n=r()),t=r(t),o([n,e])}function s(n,t){function e(n){return n=Array.prototype.map.call(n,u),c(n).call(this)}function u(n){function r(){return t.call(this,n)}return r}return null==n&&(n=r()),t=r(t),o([n,e])}function p(n){function t(){return n.length||Array.prototype.push.call(n,0),e(++n[n.length-1])}return t}function m(n){function t(){return n.length||Array.prototype.push.call(n,0),e(--n[n.length-1])}return t}function h(n){function t(t){return Array.prototype.push.call(n,t),e(t)}return t}function y(n){function t(){var t=Array.prototype.pop.call(n);return e(t)}return t}function d(n){function t(){var t=n[n.length-1];return e(t)}return t}function g(n){function t(t){return"undefined"!==console&&console.warn instanceof Function&&(n?console.warn(n,t):console.warn(t)),e(t)}return t}function v(n){function t(t){return"undefined"!==console&&console.log instanceof Function&&(n?console.log(n,t):console.log(t)),e(t)}return t}function w(n){function t(t){var e=this;return new r.Promise(function(r){setTimeout(function(){r.call(e,t)},n)})}return t}function A(n,t,e){function u(t){var u=this,a=arguments,f=r.Promise,s=++l;return new f(function(t,r){function l(){h&&clearTimeout(h),c[s]=!0,n.apply(u,a).then(p,m)}function f(){m(new Error("timeout: "+e+"ms"))}function p(n){delete c[s],setTimeout(o,0),t(n)}function m(n){delete c[s],setTimeout(o,0),r(n)}i.push(l);var h=e&&setTimeout(f,e);o()})}function o(){if(!(Object.keys(c).length>=t)){var n=i.pop();n&&n()}}t||(t=1),n=r(n);var i=u.queue=[],c=u.running={},l=0;return u}function P(n,t){function e(e){var u=this,o=arguments,i=r.Promise;return new i(function(r,e){function i(){var n=e;r=e=j,n(new Error("timeout: "+t+"ms"))}function c(n){clearTimeout(a),r(n)}function l(n){clearTimeout(a),e(n)}var a=setTimeout(i,t);n.apply(u,o).then(c,l)})}return n=r(n),e}function b(n){function t(t,r){t=Array.prototype.slice.call(arguments),r=t[t.length-1]instanceof Function&&t.pop(),r||(r=j);var e=r.bind(this,null),u=r.bind(this);n.apply(this,t).then(e,u)}return n=r(n),t}function T(n){function t(t){var e=this;return t=Array.prototype.slice.call(arguments),new r.Promise(function(r,u){function o(n,t){return n?u(n):r(t)}t.push(o),n.apply(e,t)})}return t}function F(n,t,r){function u(u){function l(r){function l(n){return n=i[r]=e(n),t&&(c[r]&&clearTimeout(c[r]),c[r]=setTimeout(a,t)),n}function a(){delete i[r],delete c[r]}return r in i?i[r]:o([n,l]).call(this,u)}return o([r,l]).call(this,u)}var i=u.memo={};t-=0;var c={};return r||(r=JSON.stringify.bind(JSON)),u}function j(){}n&&(n.exports=r),!n&&t&&(t.promisen=r);var q="undefined"==typeof Promise&&"undefined"!=typeof require;r.Promise=q?require("es6-promise").Promise:Promise,r.resolve=e,r.reject=u,r.waterfall=o,r.series=i,r.parallel=c,r.each=s,r.eachSeries=f,r.IF=r["if"]=l,r.WHILE=r["while"]=a,r.incr=p,r.decr=m,r.push=h,r.pop=y,r.top=d,r.log=v,r.warn=g,r.wait=w,r.throttle=A,r.timeout=P,r.nodeify=b,r.denodeify=T,r.memoize=F}("undefined"!=typeof module&&module,"undefined"!=typeof window&&window);