/*! * extend-promise v0.0.6 * Homepage https://github.com/cnwhy/extend-promise#readme * License BSD-2-Clause */ !function e(n,r,t){function o(u,f){if(!r[u]){if(!n[u]){var c="function"==typeof require&&require;if(!f&&c)return c(u,!0);if(i)return i(u,!0);throw new Error("Cannot find module '"+u+"'")}var s=r[u]={exports:{}};n[u][0].call(s.exports,function(e){var r=n[u][1][e];return o(r?r:e)},s,s.exports,e,n,r,t)}return r[u].exports}for(var i="function"==typeof require&&require,u=0;u0?+n:0),function(r){var t,o=d.defer(),f=0,s=function(i){var c=r[i];d.resolve(c).then(function(r){"undefined"!=typeof n?t.push(r):t[i]=r,(0==--f||!e&&n&&t.length>=n)&&o.resolve(t)},function(e){u(n)?o.reject(e):0==--f&&o.resolve(t)}),f++};if(i(r)){t=[],0==r.length&&o.resolve(t);for(var l=0;l=0?+n:0,o(!1,n)(e)}),t("map")&&(d.map=function(e,n,r){function t(){if(c0&&c