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