text: !function(a,l){"object"==typeof exports&&"undefined"!=typeof module?l():"function"==typeof define&&define.amd?define(l):l()}(0,(function(){function e(a){var l=this.constructor;return this.then((function(s){return l.resolve(a()).then((function(){return s}))}),(function(s){return l.resolve(a()).then((function(){return l.reject(s)}))}))}function n(a){return!(!a||void 0===a.length)}function t(){}function o(a){if(!(this instanceof o))throw new TypeError("Promises must be constructed via new");if("function"!=typeof a)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],c(a,this)}function r(a,l){for(;3===a._state;)a=a._value;0!==a._state?(a._handled=!0,o._immediateFn((function(){var s=1===a._state?l.onFulfilled:l.onRejected;if(null!==s){var d;try{d=s(a._value)}catch(a){return void f(l.promise,a)}i(l.promise,d)}else(1===a._state?i:f)(l.promise,a._value)}))):a._deferreds.push(l)}function i(a,l){try{if(l===a)throw new TypeError("A promise cannot be resolved with itself.");if(l&&("object"==typeof l||"function"==typeof l)){var s=l.then;if(l instanceof o)return a._state=3,a._value=l,void u(a);if("function"==typeof s)return void c(function(a,l){return function(){a.apply(l,arguments)}}(s,l),a)}a._state=1,a._value=l,u(a)}catch(l){f(a,l)}}function f(a,l){a._state=2,a._value=l,u(a)}function u(a){2===a._state&&0===a._deferreds.length&&o._immediateFn((function(){a._handled||o._unhandledRejectionFn(a._value)}));for(var l=0,s=a._deferreds.length;s>l;l++)r(a,a._deferreds[l]);a._deferreds=null}function c(a,l){var s=!1;try{a((function(a){s||(s=!0,i(l,a))}),(function(a){s||(s=!0,f(l,a))}))}catch(a){if(s)return;s=!0,f(l,a)}}var a=setTimeout;o.prototype.catch=function(a){return this.then(null,a)},o.prototype.then=function(a,l){var s=new this.constructor(t);return r(this,new function(a,l,s){this.onFulfilled="function"==typeof a?a:null,this.onRejected="function"==typeof l?l:null,this.promise=s}(a,l,s)),s},o.prototype.finally=e,o.all=function(a){return new o((function(l,s){function r(a,p){try{if(p&&("object"==typeof p||"function"==typeof p)){var y=p.then;if("function"==typeof y)return void y.call(p,(function(l){r(a,l)}),s)}d[a]=p,0==--h&&l(d)}catch(a){s(a)}}if(!n(a))return s(new TypeError("Promise.all accepts an array"));var d=Array.prototype.slice.call(a);if(0===d.length)return l([]);for(var h=d.length,p=0;d.length>p;p++)r(p,d[p])}))},o.resolve=function(a){return a&&"object"==typeof a&&a.constructor===o?a:new o((function(l){l(a)}))},o.reject=function(a){return new o((function(l,s){s(a)}))},o.race=function(a){return new o((function(l,s){if(!n(a))return s(new TypeError("Promise.race accepts an array"));for(var d=0,h=a.length;h>d;d++)o.resolve(a[d]).then(l,s)}))},o._immediateFn="function"==typeof setImmediate&&function(a){setImmediate(a)}||function(l){a(l,0)},o._unhandledRejectionFn=function(a){void 0!==console&&console&&console.warn("Possible Unhandled Promise Rejection:",a)};var l=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw Error("unable to locate global object")}();"Promise"in l?l.Promise.prototype.finally||(l.Promise.prototype.finally=e):l.Promise=o}));