// github: https://github.com/stefanpenner/es6-promise// update: https://wzrd.in/standalone/es6-promise@latest!function(t){if("object"==typeofexports&&"undefined"!=typeofmodule)module.exports=t();elseif("function"==typeofdefine&&define.amd)define([],t);else{vare;e="undefined"!=typeofwindow?window:"undefined"!=typeofglobal?global:"undefined"!=typeofself?self:this,e.es6Promise=t()}}(function(){vart;returnfunctiont(e,n,r){functiono(u,s){if(!n[u]){if(!e[u]){varc="function"==typeofrequire&&require;if(!s&&c)returnc(u,!0);if(i)returni(u,!0);varf=newError("Cannot find module '"+u+"'");throwf.code="MODULE_NOT_FOUND",f}vara=n[u]={exports:{}};e[u][0].call(a.exports,function(t){varn=e[u][1][t];returno(n?n:t)},a,a.exports,t,e,n,r)}returnn[u].exports}for(vari="function"==typeofrequire&&require,u=0;u<r.length;u++)o(r[u]);returno}({1:[function(t,e,n){functionr(){thrownewError("setTimeout has not been defined")}functiono(){thrownewError("clearTimeout has not been defined")}functioni(t){if(l===setTimeout)returnsetTimeout(t,0);if((l===r||!l)&&setTimeout)returnl=setTimeout,setTimeout(t,0);try{returnl(t,0)}catch(e){try{returnl.call(null,t,0)}catch(e){returnl.call(this,t,0)}}}functionu(t){if(h===clearTimeout)returnclearTimeout(t);if((h===o||!h)&&clearTimeout)returnh=clearTimeout,clearTimeout(t);try{returnh(t)}catch(e){try{returnh.call(null,t)}catch(e){returnh.call(this,t)}}}functions(){y&&p&&(y=!1,p.length?v=p.concat(v):_=-1,v.length&&c())}functionc(){if(!y){vart=i(s);y=!0;for(vare=v.length;e;){for(p=v,v=[];++_<e;)p&&p[_].run();_=-1,e=v.length}p=null,y=!1,u(t)}}functionf(t,e){this.fun=t,this.array=e}functiona(){}varl,h,d=e.exports={};!function(){try{l="function"==typeofsetTimeout?setTimeout:r}catch(t){l=r}try{h="function"==typeofclearTimeout?clearTimeout:o}catch(t){h=o}}();varp,v=[],y=!1,_=-1;d.nextTick=function(t){vare=newArray(arguments.length-1);if(arguments.length>1)for(varn=1;n<arguments.length;n++)e[n-1]=arguments[n];v.push(newf(t,e)),1!==v.length||y||i(c)},f.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=a,d.addListener=a,d.once=a,d.off=a,d.removeListener=a,d.removeAllListeners=a,d.emit=a,d.binding=function(t){thrownewError("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(t){thrownewError("process.chdir is not supported")},d.umask=function(){return0}},{}],2:[function(e,n,r){(function(o,i){!function(e,o){"object"==typeofr&&"undefined"!=typeofn?n.exports=o():"function"==typeoft&&t.amd?t(o):e.ES6Promise=o()}(this,function(){"use strict";functiont(t){vare=typeoft;returnnull!==t&&("object"===e||"function"===e)}functionn(t){return"function"==typeoft}functionr(t){J=t}functionu(t){Q=t}functions(){returnfunction(){returno.nextTick(h)}}functionc(){return"undefined"!=typeofI?function(){I(h)}:l()}functionf(){vart=0,e=newX(h),n=document.createTextNode("");returne.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}functiona(){vart=newMessageChannel;returnt.port1.onmessage=h,function(){returnt.port2.postMessage(0)}}functionl(){vart=setTimeout;returnfunction(){returnt(h,1)}}functionh(){for(vart=0;t<H;t+=2){vare=tt[t],n=tt[t+1];e(n),tt[t]=void0,tt[t+1]=void0}H=0}functiond(){try{vart=e,n=t("vertx");returnI=n.runOnLoop||n.runOnContext,c()}catch(t){returnl()}}functionp(t,e){varn=this,r=newthis.constructor(y);void0===r[nt]&&D(r);varo=n._state;if(o){vari=arguments[o-1];Q(function(){returnk(o,r,i,n._result)})}elseM(n,r,t,e);returnr}functionv(t){vare=this;if(t&&"object"==typeoft&&t.constructor===e)returnt;varn=newe(y);returnE(n,t),n}functiony(){}function_(){returnnewTypeError("You cannot resolve a promise with itself")}functionm(){returnnewTypeError("A promises callback cannot return that same promise.")}functionw(t){try{returnt.then}catch(t){returnut.error=t,ut}}functionb(t,e,n,r){try{t.call(e,n,r)}catch(t){returnt}}functiong(t,e,n){Q(function(t){varr=!1,o=b(n,e,function(n){r||(r=!0,e!==n?E(t,n):j(t,n))},function(e){r||(r=!0,S(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,S(t,o))},t)}functionT(t,e){e._state===ot?j(t,e._result):e._state===it?S(t,e._result):M(e,void0,function(e){returnE(t,e)},function(e){returnS(t,e)})}functionA(t,e,r){e.constructor===t.constructor&&r===p&&e.constructor.resolve===v?T(t,e):r===ut?(S(t,ut.error),ut.error=null):void0===r?j(t,e):n(r)?g(t,e,r):j(t,e)}functionE(e,n){e===n?S(e,_()):t(n)?A(e,n,w(n)):j(e,n)}functionx(t){t._onerror&&t._onerror(t._result),O(t)}functionj(t,e){t._state===rt&&(t._result=e,t._state=ot,0!==t._subscribers.length&&Q(O,t))}functionS(t,e){t._state===rt&&(t._state=it,t._result=e,Q(x,t))}functionM(t,e,n,r){varo=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+ot]=n,o[i+it]=r,0===i&&t._state&&Q(O,t)}functionO(t){vare=t._subscribers,n=t._state;if(0!==e.length){for(varr=void0,o=void0,i=t._result,u=0;u<e.length;u+=3)r=e[u],o=e[u+n],r?k(n,r,o,i):o(i);t._subscribers.length=0}}functionP(){this.error=null}functionC(t,e){try{returnt(e)}catch(t){returnst.error=t,st}}functionk(t,e,r,o){vari=n(r),u=void0,s=void0,c=void0,f=void0;if(i){if(u=C(r,o),u===st?(f=!0,s=u.error,u.error=null):c=!0,e===u)returnvoidS(e,m())}elseu=o,c=!0;e._state!==rt||(i&&c?E(e,u):f?S(e,s):t===ot?j(e,u):t===it&&S(e,u))}functionL(t,e){try{e(function(e){E(t,e)},function(e){S(t,e)})}catch(e){S(t,e)}}functionq(){returnct++}functionD(t){t[nt]=ct++,t._state=void0,t._result=void0,t._subscribers=[]}functionF(){returnnewError("Array Methods must be provided an Array")}functionF(){returnnewError("Array Methods must be provided an Array")}functionN(t){returnnewft(this,t).promise}functionU(t){vare=this;returnnewe(G(t)?function(n,r){for(varo=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r)}:function(t,e){returne(newTypeError("You must pass an array to race."))})}functionY(t){vare=this,n=newe(y);returnS(n,t),n}functionK(){thrownewTypeError("You must pass a resolver function as the first argument to the promise constructor")}functionW(){thrownewTypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}functionz(){vart=void0;if("undefined"!=typeofi)t=i;elseif("undefined"!=typeofself)t=self;elsetry{t=Function("return this")()}catch(t){thrownewError("polyfill failed because global object is unavailable in this environment")}vare=t.Promise;if(e){varn=null;try{n=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===n&&!e.cast)return}t.Promise=at}varB=void0;B=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};varG=B,H=0,I=void0,J=void0,Q=function(t,e){tt[H]=t,tt[H+1]=e,H+=2,2===H&&(J?J(h):et())},R="undefined"!=typeofwindow?window:void0,V=R||{},X=V.MutationObserver||V.WebKitMutationObserver,Z="undefined"==typeofself&&"undefined"!=typeofo&&"[object process]"==={}.toString.call(o),$="undefined"!=typeofUint8ClampedArray&&"undefined"!=typeofimportScripts&&"undefined"!=typeofMessageChannel,tt=newArray(1e3),et=void0;et=Z?s():X?f():$?a():void0===R&&"function"==typeofe?d():l();varnt=Math.random().toString(36).substring(16),rt=void0,ot=1,it=2,ut=newP,st=newP,ct=0,ft=function(){functiont(t,e){this._instanceConstructor=t,this.promise=newt(y),this.promise[nt]||D(this.promise),G(e)?(this.length=e.length,this._remaining=e.length,this._result=newArray(this.length),0===this.length?j(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&j(this.promise,this._result))):S(this.promise,F())}returnt.prototype._enumerate=function(t){for(vare=0;this._state===rt&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){varn=this._instanceConstructor,r=n.resolve;if(r===v){varo=w(t);if(o===p&&t._state!==rt)this._settledAt(t._state,e,t._result);elseif("function"!=typeofo)this._remaining--,this._result[e]=t;elseif(n===at){vari=newn(y);A(i,t,o),this._willSettleAt(i,e)}elsethis._willSettleAt(newn(function(e){returne(t)}),e)}elsethis._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){varr=this.promise;r._state===rt&&(this._remaining--,t===it?S(r,n):this._result[e]=n),0===this._remaining&&j(r,this._result)},t.prototype._willSettleAt=function(t,e){varn=this;M(t,void0,function(t){returnn._settledAt(ot,e,t)},function(t){returnn._settledAt(it,e,t)})},t}(),at=function(){functiont(e){this[nt]=q(),this._result=this._state=void0,this._subscribers=[],y!==e&&("function"!=typeofe&&K(),thisinstanceoft?L(this,e):W())}returnt.prototype.catch=function(t){returnthis.then(null,t)},t.prototype.finally=function(t){vare=this,n=e.constructor;returne.then(function(e){returnn.resolve(t()).then(function(){returne})},function(e){returnn.resolve(t()).then(function(){throwe})})},t}();returnat.prototype.then=p,at.all=N,at.race=U,at.resolve=v,at.reject=Y,at._setScheduler=r,at._setAsap=u,at._asap=Q,at.polyfill=z,at.Promise=at,at})}).call(this,e("_process"),"undefined"!=typeofglobal?global:"undefined"!=typeofself?self:"undefined"!=typeofwindow?window:{})},{_process:1}]},{},[2])(2)});