"use strict";(function(){functiona(a){return"function"==typeofa||"object"==typeofa&&null!==a}functionb(a){return"function"==typeofa}functionc(a){return"object"==typeofa&&null!==a}functiond(){}functione(a,b){for(varc=0,d=a.length;d>c;c++)if(a[c]===b)returnc;return-1}functionf(a){varb=a._promiseCallbacks;returnb||(b=a._promiseCallbacks={}),b}functiong(a,b){return"onerror"===a?voidvb.on("error",b):2!==arguments.length?vb[a]:void(vb[a]=b)}functionh(){setTimeout(function(){for(vara,b=0;b<wb.length;b++){a=wb[b];varc=a.payload;c.guid=c.key+c.id,c.childGuid=c.key+c.childId,c.error&&(c.stack=c.error.stack),vb.trigger(a.name,a.payload)}wb.length=0},50)}functioni(a,b,c){1===wb.push({name:a,payload:{key:b._guidKey,id:b._id,eventName:a,detail:b._result,childId:c&&c._id,label:b._label,timeStamp:sb(),error:vb["instrument-with-stack"]?newError(b._label):null}})&&h()}functionj(){returnnewTypeError("A promises callback cannot return that same promise.")}functionk(){}functionl(a){try{returna.then}catch(b){returnBb.error=b,Bb}}functionm(a,b,c,d){try{a.call(b,c,d)}catch(e){returne}}functionn(a,b,c){vb.async(function(a){vard=!1,e=m(c,b,function(c){d||(d=!0,b!==c?q(a,c):s(a,c))},function(b){d||(d=!0,t(a,b))},"Settle: "+(a._label||" unknown promise"));!d&&e&&(d=!0,t(a,e))},a)}functiono(a,b){b._state===zb?s(a,b._result):b._state===Ab?(b._onError=null,t(a,b._result)):u(b,void0,function(c){b!==c?q(a,c):s(a,c)},function(b){t(a,b)})}functionp(a,c){if(c.constructor===a.constructor)o(a,c);else{vard=l(c);d===Bb?t(a,Bb.error):void0===d?s(a,c):b(d)?n(a,c,d):s(a,c)}}functionq(b,c){b===c?s(b,c):a(c)?p(b,c):s(b,c)}functionr(a){a._onError&&a._onError(a._result),v(a)}functions(a,b){a._state===yb&&(a._result=b,a._state=zb,0===a._subscribers.length?vb.instrument&&xb("fulfilled",a):vb.async(v,a))}functiont(a,b){a._state===yb&&(a._state=Ab,a._result=b,vb.async(r,a))}functionu(a,b,c,d){vare=a._subscribers,f=e.length;a._onError=null,e[f]=b,e[f+zb]=c,e[f+Ab]=d,0===f&&a._state&&vb.async(v,a)}functionv(a){varb=a._subscribers,c=a._state;if(vb.instrument&&xb(c===zb?"fulfilled":"rejected",a),0!==b.length){for(vard,e,f=a._result,g=0;g<b.length;g+=3)d=b[g],e=b[g+c],d?y(c,d,e,f):e(f);a._subscribers.length=0}}functionw(){this.error=null}functionx(a,b){try{returna(b)}catch(c){returnCb.error=c,Cb}}functiony(a,c,d,e){varf,g,h,i,k=b(d);if(k){if(f=x(d,e),f===Cb?(i=!0,g=f.error,f=null):h=!0,c===f)returnvoidt(c,j())}elsef=e,h=!0;c._state!==yb||(k&&h?q(c,f):i?t(c,g):a===zb?s(c,f):a===Ab&&t(c,f))}functionz(a,b){varc=!1;try{b(function(b){c||(c=!0,q(a,b))},function(b){c||(c=!0,t(a,b))})}catch(d){t(a,d)}}functionA(a,b,c){returna===zb?{state:"fulfilled",value:c}:{state:"rejected",reason:c}}functionB(a,b,c,d){vare=this;e._instanceConstructor=a,e.promise=newa(k,d),e._abortOnReject=c,e._validateInput(b)?(e._input=b,e.length=b.length,e._remaining=b.length,e._init(),0===e.length?s(e.promise,e._result):(e.length=e.length||0,e._enumerate(),0===e._remaining&&s(e.promise,e._result))):t(e.promise,e._validationError())}functionC(a,b){returnnewDb(this,a,!0,b).promise}functionD(a,b){functionc(a){q(f,a)}functiond(a){t(f,a)}vare=this,f=newe(k,b);if(!rb(a))returnt(f,newTypeError("You must pass an array to race.")),f;for(varg=a.length,h=0;f._state===yb&&g>h;h++)u(e.resolve(a[h]),void0,c,d);returnf}functionE(a,b){varc=this;if(a&&"object"==typeofa&&a.constructor===c)returna;vard=newc(k,b);returnq(d,a),d}functionF(a,b){varc=this,d=newc(k,b);returnt(d,a),d}functionG(){thrownewTypeError("You must pass a resolver function as the first argument to the promise constructor")}functionH(){thrownewTypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}functionI(a,c){vard=this;d._id=Jb++,d._label=c,d._state=void0,d._result=void0,d._subscribers=[],vb.instrument&&xb("created",d),k!==a&&(b(a)||G(),dinstanceofI||H(),z(d,a))}functionJ(a,b,c){this._superConstructor(a,b,!1,c)}functionK(a,b){returnnewJ(Kb,a,b).promise}functionL(a,b){returnKb.all(a