lofig.min.js 101 KB

1
  1. !function(a){function c(a){var b=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.src=D.p+""+a+"."+g+".hot-update.js",b.appendChild(c)}function d(a){if("undefined"==typeof XMLHttpRequest)return a(new Error("No browser support"));try{var b=new XMLHttpRequest,c=D.p+""+g+".hot-update.json";b.open("GET",c,!0),b.timeout=1e4,b.send(null)}catch(b){return a(b)}b.onreadystatechange=function(){if(4===b.readyState)if(0===b.status)a(new Error("Manifest request to "+c+" timed out."));else if(404===b.status)a();else if(200!==b.status&&304!==b.status)a(new Error("Manifest request to "+c+" failed."));else{try{var d=JSON.parse(b.responseText)}catch(b){return void a(b)}a(null,d)}}}function j(a){function f(a,b){"ready"===m&&n("prepare"),p++,D.e(a,function(){function d(){p--,"prepare"===m&&(q[a]||z(a),0===p&&0===o&&A())}try{b.call(null,c)}finally{d()}})}var b=C[a];if(!b)return D;var c=function(c){return b.hot.active?C[c]?(C[c].parents.indexOf(a)<0&&C[c].parents.push(a),b.children.indexOf(c)<0&&b.children.push(c)):i=[a]:(console.warn("[HMR] unexpected require("+c+") from disposed module "+a),i=[]),D(c)};for(var d in D)Object.prototype.hasOwnProperty.call(D,d)&&(e?Object.defineProperty(c,d,function(a){return{configurable:!0,enumerable:!0,get:function(){return D[a]},set:function(b){D[a]=b}}}(d)):c[d]=D[d]);return e?Object.defineProperty(c,"e",{enumerable:!0,value:f}):c.e=f,c}function k(a){var b={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_disposeHandlers:[],active:!0,accept:function(a,c){if(void 0===a)b._selfAccepted=!0;else if("function"==typeof a)b._selfAccepted=a;else if("object"==typeof a)for(var d=0;d<a.length;d++)b._acceptedDependencies[a[d]]=c;else b._acceptedDependencies[a]=c},decline:function(a){if(void 0===a)b._selfDeclined=!0;else if("number"==typeof a)b._declinedDependencies[a]=!0;else for(var c=0;c<a.length;c++)b._declinedDependencies[a[c]]=!0},dispose:function(a){b._disposeHandlers.push(a)},addDisposeHandler:function(a){b._disposeHandlers.push(a)},removeDisposeHandler:function(a){var c=b._disposeHandlers.indexOf(a);c>=0&&b._disposeHandlers.splice(c,1)},check:x,apply:B,status:function(a){if(!a)return m;l.push(a)},addStatusHandler:function(a){l.push(a)},removeStatusHandler:function(a){var b=l.indexOf(a);b>=0&&l.splice(b,1)},data:h[a]};return b}function n(a){m=a;for(var b=0;b<l.length;b++)l[b].call(null,a)}function w(a){return+a+""===a?+a:a}function x(a,b){if("idle"!==m)throw new Error("check() is only allowed in idle status");"function"==typeof a?(f=!1,b=a):(f=a,b=b||function(a){if(a)throw a}),n("check"),d(function(a,c){if(a)return b(a);if(!c)return n("idle"),void b(null,null);r={},s={},q={};for(var d=0;d<c.c.length;d++)s[c.c[d]]=!0;v=c.h,n("prepare"),t=b,u={},z(0),"prepare"===m&&0===p&&0===o&&A()})}function y(a,b){if(s[a]&&r[a]){r[a]=!1;for(var c in b)Object.prototype.hasOwnProperty.call(b,c)&&(u[c]=b[c]);0==--o&&0===p&&A()}}function z(a){s[a]?(r[a]=!0,o++,c(a)):q[a]=!0}function A(){n("ready");var a=t;if(t=null,a)if(f)B(f,a);else{var b=[];for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&b.push(w(c));a(null,b)}}function B(b,c){function d(a){for(var b=[a],c={},d=b.slice();d.length>0;){var f=d.pop(),a=C[f];if(a&&!a.hot._selfAccepted){if(a.hot._selfDeclined)return new Error("Aborted because of self decline: "+f);if(0===f)return;for(var g=0;g<a.parents.length;g++){var h=a.parents[g],i=C[h];if(i.hot._declinedDependencies[f])return new Error("Aborted because of declined dependency: "+f+" in "+h);b.indexOf(h)>=0||(i.hot._acceptedDependencies[f]?(c[h]||(c[h]=[]),e(c[h],[f])):(delete c[h],b.push(h),d.push(h)))}}}return[b,c]}function e(a,b){for(var c=0;c<b.length;c++){var d=b[c];a.indexOf(d)<0&&a.push(d)}}if("ready"!==m)throw new Error("apply() is only allowed in ready status");"function"==typeof b?(c=b,b={}):b&&"object"==typeof b?c=c||function(a){if(a)throw a}:(b={},c=c||function(a){if(a)throw a});var f={},j=[],k={};for(var l in u)if(Object.prototype.hasOwnProperty.call(u,l)){var o=w(l),p=d(o);if(!p){if(b.ignoreUnaccepted)continue;return n("abort"),c(new Error("Aborted because "+o+" is not accepted"))}if(p instanceof Error)return n("abort"),c(p);k[o]=u[o],e(j,p[0]);for(var o in p[1])Object.prototype.hasOwnProperty.call(p[1],o)&&(f[o]||(f[o]=[]),e(f[o],p[1][o]))}for(var q=[],r=0;r<j.length;r++){var o=j[r];C[o]&&C[o].hot._selfAccepted&&q.push({module:o,errorHandler:C[o].hot._selfAccepted})}n("dispose");for(var s=j.slice();s.length>0;){var o=s.pop(),t=C[o];if(t){for(var x={},y=t.hot._disposeHandlers,z=0;z<y.length;z++){var A=y[z];A(x)}h[o]=x,t.hot.active=!1,delete C[o];for(var z=0;z<t.children.length;z++){var B=C[t.children[z]];if(B){var E=B.parents.indexOf(o);E>=0&&B.parents.splice(E,1)}}}}for(var o in f)if(Object.prototype.hasOwnProperty.call(f,o))for(var t=C[o],F=f[o],z=0;z<F.length;z++){var G=F[z],E=t.children.indexOf(G);E>=0&&t.children.splice(E,1)}n("apply"),g=v;for(var o in k)Object.prototype.hasOwnProperty.call(k,o)&&(a[o]=k[o]);var H=null;for(var o in f)if(Object.prototype.hasOwnProperty.call(f,o)){for(var t=C[o],F=f[o],I=[],r=0;r<F.length;r++){var G=F[r],A=t.hot._acceptedDependencies[G];I.indexOf(A)>=0||I.push(A)}for(var r=0;r<I.length;r++){var A=I[r];try{A(f)}catch(a){H||(H=a)}}}for(var r=0;r<q.length;r++){var J=q[r],o=J.module;i=[o];try{D(o)}catch(a){if("function"==typeof J.errorHandler)try{J.errorHandler(a)}catch(a){H||(H=a)}else H||(H=a)}}if(H)return n("fail"),c(H);n("idle"),c(null,j)}function D(b){if(C[b])return C[b].exports;var c=C[b]={exports:{},id:b,loaded:!1,hot:k(b),parents:i,children:[]};return a[b].call(c.exports,c,c.exports,j(b)),c.loaded=!0,c.exports}var b=this.webpackHotUpdate;this.webpackHotUpdate=function(c,d){y(c,d),b&&b(c,d)};var e=!1;try{Object.defineProperty({},"x",{get:function(){}}),e=!0}catch(a){}var t,u,v,f=!0,g="de2d345adf580af29a40",h={},i=[],l=[],m="idle",o=0,p=0,q={},r={},s={},C={};D.m=a,D.c=C,D.p="",D.h=function(){return g},j(0)(0)}([function(a,b,c){a.exports=c(1)},function(a,b,c){(function(a,b){"use strict";c(3),c(7),window.lofig={folder:"config/default.json",get:function(d,e){a(lofig.folder).then(function(a){return a.json()}).then(function(a){return d=d.split("."),b.each(d,function(b){a=a[b]}).then(function(){e(a)})}).catch(function(a){console.log("parsing failed",a)})},has:function(d,e){a(lofig.folder).then(function(a){return a.json()}).then(function(a){return d=d.split("."),b.each(d,function(b){a=a[b]}).then(function(){e(a?!0:!1)})}).catch(function(a){console.log("parsing failed",a)})}}}).call(b,c(2),c(3))},function(a,b,c){(function(b,c){(function(){!function(a){"use strict";function g(a){if("string"!=typeof a&&(a=String(a)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(a))throw new TypeError("Invalid character in header field name");return a.toLowerCase()}function h(a){return"string"!=typeof a&&(a=String(a)),a}function i(a){var b={next:function(){var b=a.shift();return{done:void 0===b,value:b}}};return c.iterable&&(b[Symbol.iterator]=function(){return b}),b}function j(a){this.map={},a instanceof j?a.forEach(function(a,b){this.append(b,a)},this):a&&Object.getOwnPropertyNames(a).forEach(function(b){this.append(b,a[b])},this)}function k(a){if(a.bodyUsed)return b.reject(new TypeError("Already read"));a.bodyUsed=!0}function l(a){return new b(function(b,c){a.onload=function(){b(a.result)},a.onerror=function(){c(a.error)}})}function m(a){var b=new FileReader,c=l(b);return b.readAsArrayBuffer(a),c}function n(a){var b=new FileReader,c=l(b);return b.readAsText(a),c}function o(a){for(var b=new Uint8Array(a),c=new Array(b.length),d=0;d<b.length;d++)c[d]=String.fromCharCode(b[d]);return c.join("")}function p(a){if(a.slice)return a.slice(0);var b=new Uint8Array(a.byteLength);return b.set(new Uint8Array(a)),b.buffer}function q(){return this.bodyUsed=!1,this._initBody=function(a){if(this._bodyInit=a,a)if("string"==typeof a)this._bodyText=a;else if(c.blob&&Blob.prototype.isPrototypeOf(a))this._bodyBlob=a;else if(c.formData&&FormData.prototype.isPrototypeOf(a))this._bodyFormData=a;else if(c.searchParams&&URLSearchParams.prototype.isPrototypeOf(a))this._bodyText=a.toString();else if(c.arrayBuffer&&c.blob&&e(a))this._bodyArrayBuffer=p(a.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!c.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(a)&&!f(a))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=p(a)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof a?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):c.searchParams&&URLSearchParams.prototype.isPrototypeOf(a)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},c.blob&&(this.blob=function(){var a=k(this);if(a)return a;if(this._bodyBlob)return b.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return b.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return b.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?k(this)||b.resolve(this._bodyArrayBuffer):this.blob().then(m)}),this.text=function(){var a=k(this);if(a)return a;if(this._bodyBlob)return n(this._bodyBlob);if(this._bodyArrayBuffer)return b.resolve(o(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return b.resolve(this._bodyText)},c.formData&&(this.formData=function(){return this.text().then(u)}),this.json=function(){return this.text().then(JSON.parse)},this}function s(a){var b=a.toUpperCase();return r.indexOf(b)>-1?b:a}function t(a,b){b=b||{};var c=b.body;if("string"==typeof a)this.url=a;else{if(a.bodyUsed)throw new TypeError("Already read");this.url=a.url,this.credentials=a.credentials,b.headers||(this.headers=new j(a.headers)),this.method=a.method,this.mode=a.mode,c||null==a._bodyInit||(c=a._bodyInit,a.bodyUsed=!0)}if(this.credentials=b.credentials||this.credentials||"omit",!b.headers&&this.headers||(this.headers=new j(b.headers)),this.method=s(b.method||this.method||"GET"),this.mode=b.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&c)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(c)}function u(a){var b=new FormData;return a.trim().split("&").forEach(function(a){if(a){var c=a.split("="),d=c.shift().replace(/\+/g," "),e=c.join("=").replace(/\+/g," ");b.append(decodeURIComponent(d),decodeURIComponent(e))}}),b}function v(a){var b=new j;return a.split("\r\n").forEach(function(a){var c=a.split(":"),d=c.shift().trim();if(d){var e=c.join(":").trim();b.append(d,e)}}),b}function w(a,b){b||(b={}),this.type="default",this.status="status"in b?b.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in b?b.statusText:"OK",this.headers=new j(b.headers),this.url=b.url||"",this._initBody(a)}if(!a.fetch){var c={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch(a){return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};if(c.arrayBuffer)var d=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],e=function(a){return a&&DataView.prototype.isPrototypeOf(a)},f=ArrayBuffer.isView||function(a){return a&&d.indexOf(Object.prototype.toString.call(a))>-1};j.prototype.append=function(a,b){a=g(a),b=h(b);var c=this.map[a];this.map[a]=c?c+","+b:b},j.prototype.delete=function(a){delete this.map[g(a)]},j.prototype.get=function(a){return a=g(a),this.has(a)?this.map[a]:null},j.prototype.has=function(a){return this.map.hasOwnProperty(g(a))},j.prototype.set=function(a,b){this.map[g(a)]=h(b)},j.prototype.forEach=function(a,b){for(var c in this.map)this.map.hasOwnProperty(c)&&a.call(b,this.map[c],c,this)},j.prototype.keys=function(){var a=[];return this.forEach(function(b,c){a.push(c)}),i(a)},j.prototype.values=function(){var a=[];return this.forEach(function(b){a.push(b)}),i(a)},j.prototype.entries=function(){var a=[];return this.forEach(function(b,c){a.push([c,b])}),i(a)},c.iterable&&(j.prototype[Symbol.iterator]=j.prototype.entries);var r=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];t.prototype.clone=function(){return new t(this,{body:this._bodyInit})},q.call(t.prototype),q.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new j(this.headers),url:this.url})},w.error=function(){var a=new w(null,{status:0,statusText:""});return a.type="error",a};var x=[301,302,303,307,308];w.redirect=function(a,b){if(-1===x.indexOf(b))throw new RangeError("Invalid status code");return new w(null,{status:b,headers:{location:a}})},a.Headers=j,a.Request=t,a.Response=w,a.fetch=function(a,d){return new b(function(b,e){var f=new t(a,d),g=new XMLHttpRequest;g.onload=function(){var a={status:g.status,statusText:g.statusText,headers:v(g.getAllResponseHeaders()||"")};a.url="responseURL"in g?g.responseURL:a.headers.get("X-Request-URL");var c="response"in g?g.response:g.responseText;b(new w(c,a))},g.onerror=function(){e(new TypeError("Network request failed"))},g.ontimeout=function(){e(new TypeError("Network request failed"))},g.open(f.method,f.url,!0),"include"===f.credentials&&(g.withCredentials=!0),"responseType"in g&&c.blob&&(g.responseType="blob"),f.headers.forEach(function(a,b){g.setRequestHeader(b,a)}),g.send(void 0===f._bodyInit?null:f._bodyInit)})},a.fetch.polyfill=!0}}("undefined"!=typeof self?self:this),a.exports=c.fetch}).call(c)}).call(b,c(3),function(){return this}())},function(module,exports,__webpack_require__){(function(process,Promise,global,setImmediate){!function(a){module.exports=a()}(function(){var define,module,exports;return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof _dereq_&&_dereq_;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c||a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof _dereq_&&_dereq_,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";b.exports=function(a){function c(a){var c=new b(a),d=c.promise();return c.setHowMany(1),c.setUnwrap(),c.init(),d}var b=a._SomePromiseArray;a.any=function(a){return c(a)},a.prototype.any=function(){return c(this)}}},{}],2:[function(a,b,c){"use strict";function h(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new f(16),this._normalQueue=new f(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var a=this;this.drainQueues=function(){a._drainQueues()},this._schedule=e}function i(a,b,c){this._lateQueue.push(a,b,c),this._queueTick()}function j(a,b,c){this._normalQueue.push(a,b,c),this._queueTick()}function k(a){this._normalQueue._pushOne(a),this._queueTick()}var d;try{throw new Error}catch(a){d=a}var e=a("./schedule"),f=a("./queue"),g=a("./util");h.prototype.setScheduler=function(a){var b=this._schedule;return this._schedule=a,this._customScheduler=!0,b},h.prototype.hasCustomScheduler=function(){return this._customScheduler},h.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},h.prototype.disableTrampolineIfNecessary=function(){g.hasDevTools&&(this._trampolineEnabled=!1)},h.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},h.prototype.fatalError=function(a,b){b?(process.stderr.write("Fatal "+(a instanceof Error?a.stack:a)+"\n"),process.exit(2)):this.throwLater(a)},h.prototype.throwLater=function(a,b){if(1===arguments.length&&(b=a,a=function(){throw b}),"undefined"!=typeof setTimeout)setTimeout(function(){a(b)},0);else try{this._schedule(function(){a(b)})}catch(a){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},g.hasDevTools?(h.prototype.invokeLater=function(a,b,c){this._trampolineEnabled?i.call(this,a,b,c):this._schedule(function(){setTimeout(function(){a.call(b,c)},100)})},h.prototype.invoke=function(a,b,c){this._trampolineEnabled?j.call(this,a,b,c):this._schedule(function(){a.call(b,c)})},h.prototype.settlePromises=function(a){this._trampolineEnabled?k.call(this,a):this._schedule(function(){a._settlePromises()})}):(h.prototype.invokeLater=i,h.prototype.invoke=j,h.prototype.settlePromises=k),h.prototype.invokeFirst=function(a,b,c){this._normalQueue.unshift(a,b,c),this._queueTick()},h.prototype._drainQueue=function(a){for(;a.length()>0;){var b=a.shift();if("function"==typeof b){var c=a.shift(),d=a.shift();b.call(c,d)}else b._settlePromises()}},h.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},h.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},h.prototype._reset=function(){this._isTickUsed=!1},b.exports=h,b.exports.firstLineError=d},{"./queue":26,"./schedule":29,"./util":36}],3:[function(a,b,c){"use strict";b.exports=function(a,b,c,d){var e=!1,f=function(a,b){this._reject(b)},g=function(a,b){b.promiseRejectionQueued=!0,b.bindingPromise._then(f,f,null,this,a)},h=function(a,b){0==(50397184&this._bitField)&&this._resolveCallback(b.target)},i=function(a,b){b.promiseRejectionQueued||this._reject(a)};a.prototype.bind=function(f){e||(e=!0,a.prototype._propagateFrom=d.propagateFromFunction(),a.prototype._boundValue=d.boundValueFunction());var j=c(f),k=new a(b);k._propagateFrom(this,1);var l=this._target();if(k._setBoundTo(j),j instanceof a){var m={promiseRejectionQueued:!1,promise:k,target:l,bindingPromise:j};l._then(b,g,void 0,k,m),j._then(h,i,void 0,k,m),k._setOnCancel(j)}else k._resolveCallback(l);return k},a.prototype._setBoundTo=function(a){void 0!==a?(this._bitField=2097152|this._bitField,this._boundTo=a):this._bitField=-2097153&this._bitField},a.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},a.bind=function(b,c){return a.resolve(c).bind(b)}}},{}],4:[function(a,b,c){"use strict";function e(){try{Promise===f&&(Promise=d)}catch(a){}return f}var d;void 0!==Promise&&(d=Promise);var f=a("./promise")();f.noConflict=e,b.exports=f},{"./promise":22}],5:[function(a,b,c){"use strict";var d=Object.create;if(d){var e=d(null),f=d(null);e[" size"]=f[" size"]=0}b.exports=function(b){function m(a,d){var e;if(null!=a&&(e=a[d]),"function"!=typeof e){var f="Object "+c.classString(a)+" has no method '"+c.toString(d)+"'";throw new b.TypeError(f)}return e}function n(a){return m(a,this.pop()).apply(a,this)}function o(a){return a[this]}function p(a){var b=+this;return b<0&&(b=Math.max(0,b+a.length)),a[b]}var i,c=a("./util"),d=c.canEvaluate;c.isIdentifier;b.prototype.call=function(a){var b=[].slice.call(arguments,1);return b.push(a),this._then(n,void 0,void 0,b,void 0)},b.prototype.get=function(a){var c,b="number"==typeof a;if(b)c=p;else if(d){var e=i(a);c=null!==e?e:o}else c=o;return this._then(c,void 0,void 0,a,void 0)}}},{"./util":36}],6:[function(a,b,c){"use strict";b.exports=function(b,c,d,e){var f=a("./util"),g=f.tryCatch,h=f.errorObj,i=b._async;b.prototype.break=b.prototype.cancel=function(){if(!e.cancellation())return this._warn("cancellation is disabled");for(var a=this,b=a;a._isCancellable();){if(!a._cancelBy(b)){b._isFollowing()?b._followee().cancel():b._cancelBranched();break}var c=a._cancellationParent;if(null==c||!c._isCancellable()){a._isFollowing()?a._followee().cancel():a._cancelBranched();break}a._isFollowing()&&a._followee().cancel(),a._setWillBeCancelled(),b=a,a=c}},b.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},b.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},b.prototype._cancelBy=function(a){return a===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},b.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},b.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),i.invoke(this._cancelPromises,this,void 0))},b.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},b.prototype._unsetOnCancel=function(){this._onCancelField=void 0},b.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},b.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},b.prototype._doInvokeOnCancel=function(a,b){if(f.isArray(a))for(var c=0;c<a.length;++c)this._doInvokeOnCancel(a[c],b);else if(void 0!==a)if("function"==typeof a){if(!b){var d=g(a).call(this._boundValue());d===h&&(this._attachExtraTrace(d.e),i.throwLater(d.e))}}else a._resultCancelled(this)},b.prototype._invokeOnCancel=function(){var a=this._onCancel();this._unsetOnCancel(),i.invoke(this._doInvokeOnCancel,this,a)},b.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},b.prototype._resultCancelled=function(){this.cancel()}}},{"./util":36}],7:[function(a,b,c){"use strict";b.exports=function(b){function g(a,g,h){return function(i){var j=h._boundValue();a:for(var k=0;k<a.length;++k){var l=a[k];if(l===Error||null!=l&&l.prototype instanceof Error){if(i instanceof l)return e(g).call(j,i)}else if("function"==typeof l){var m=e(l).call(j,i);if(m===f)return m;if(m)return e(g).call(j,i)}else if(c.isObject(i)){for(var n=d(l),o=0;o<n.length;++o){var p=n[o];if(l[p]!=i[p])continue a}return e(g).call(j,i)}}return b}}var c=a("./util"),d=a("./es5").keys,e=c.tryCatch,f=c.errorObj;return g}},{"./es5":13,"./util":36}],8:[function(a,b,c){"use strict";b.exports=function(a){function d(){this._trace=new d.CapturedTrace(f())}function e(){if(b)return new d}function f(){var a=c.length-1;if(a>=0)return c[a]}var b=!1,c=[];return a.prototype._promiseCreated=function(){},a.prototype._pushContext=function(){},a.prototype._popContext=function(){return null},a._peekContext=a.prototype._peekContext=function(){},d.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,c.push(this._trace))},d.prototype._popContext=function(){if(void 0!==this._trace){var a=c.pop(),b=a._promiseCreated;return a._promiseCreated=null,b}return null},d.CapturedTrace=null,d.create=e,d.deactivateLongStackTraces=function(){},d.activateLongStackTraces=function(){var c=a.prototype._pushContext,e=a.prototype._popContext,g=a._peekContext,h=a.prototype._peekContext,i=a.prototype._promiseCreated;d.deactivateLongStackTraces=function(){a.prototype._pushContext=c,a.prototype._popContext=e,a._peekContext=g,a.prototype._peekContext=h,a.prototype._promiseCreated=i,b=!1},b=!0,a.prototype._pushContext=d.prototype._pushContext,a.prototype._popContext=d.prototype._popContext,a._peekContext=a.prototype._peekContext=f,a.prototype._promiseCreated=function(){var a=this._peekContext();a&&null==a._promiseCreated&&(a._promiseCreated=this)}},d}},{}],9:[function(a,b,c){"use strict";b.exports=function(b,c){function y(a,b){return{promise:b}}function B(){return!1}function C(a,b,c){var d=this;try{a(b,c,function(a){if("function"!=typeof a)throw new TypeError("onCancel must be a function, got: "+g.toString(a));d._attachCancellationCallback(a)})}catch(a){return a}}function D(a){if(!this._isCancellable())return this;var b=this._onCancel();void 0!==b?g.isArray(b)?b.push(a):this._setOnCancel([b,a]):this._setOnCancel(a)}function E(){return this._onCancelField}function F(a){this._onCancelField=a}function G(){this._cancellationParent=void 0,this._onCancelField=void 0}function H(a,b){if(0!=(1&b)){this._cancellationParent=a;var c=a._branchesRemainingToCancel;void 0===c&&(c=0),a._branchesRemainingToCancel=c+1}0!=(2&b)&&a._isBound()&&this._setBoundTo(a._boundTo)}function I(a,b){0!=(2&b)&&a._isBound()&&this._setBoundTo(a._boundTo)}function K(){var a=this._boundTo;return void 0!==a&&a instanceof b?a.isFulfilled()?a.value():void 0:a}function L(){this._trace=new da(this._peekContext())}function M(a,b){if(h(a)){var c=this._trace;if(void 0!==c&&b&&(c=c._parent),void 0!==c)c.attachExtraTrace(a);else if(!a.__stackCleaned__){var d=V(a);g.notEnumerableProp(a,"stack",d.message+"\n"+d.stack.join("\n")),g.notEnumerableProp(a,"__stackCleaned__",!0)}}}function N(a,b,c,d,e){if(void 0===a&&null!==b&&u){if(void 0!==e&&e._returnedNonUndefined())return;if(0==(65535&d._bitField))return;c&&(c+=" ");var f="",g="";if(b._trace){for(var h=b._trace.stack.split("\n"),i=T(h),j=i.length-1;j>=0;--j){var k=i[j];if(!l.test(k)){var n=k.match(m);n&&(f="at "+n[1]+":"+n[2]+":"+n[3]+" ");break}}if(i.length>0)for(var o=i[0],j=0;j<h.length;++j)if(h[j]===o){j>0&&(g="\n"+h[j-1]);break}}var p="a promise was created in a "+c+"handler "+f+"but was not returned from it, see http://goo.gl/rRqMUw"+g;d._warn(p,!0,b)}}function O(a,b){var c=a+" is deprecated and will be removed in a future version.";return b&&(c+=" Use "+b+" instead."),P(c)}function P(a,c,d){if(fa.warnings){var g,e=new f(a);if(c)d._attachExtraTrace(e);else if(fa.longStackTraces&&(g=b._peekContext()))g.attachExtraTrace(e);else{var h=V(e);e.stack=h.message+"\n"+h.stack.join("\n")}A("warning",e)||W(e,"",!0)}}function Q(a,b){for(var c=0;c<b.length-1;++c)b[c].push("From previous event:"),b[c]=b[c].join("\n");return c<b.length&&(b[c]=b[c].join("\n")),a+"\n"+b.join("\n")}function R(a){for(var b=0;b<a.length;++b)(0===a[b].length||b+1<a.length&&a[b][0]===a[b+1][0])&&(a.splice(b,1),b--)}function S(a){for(var b=a[0],c=1;c<a.length;++c){for(var d=a[c],e=b.length-1,f=b[e],g=-1,h=d.length-1;h>=0;--h)if(d[h]===f){g=h;break}for(var h=g;h>=0;--h){var i=d[h];if(b[e]!==i)break;b.pop(),e--}b=d}}function T(a){for(var b=[],c=0;c<a.length;++c){var d=a[c],e=" (No stack trace)"===d||n.test(d),f=e&&_(d);e&&!f&&(p&&" "!==d.charAt(0)&&(d=" "+d),b.push(d))}return b}function U(a){for(var b=a.stack.replace(/\s+$/g,"").split("\n"),c=0;c<b.length;++c){var d=b[c];if(" (No stack trace)"===d||n.test(d))break}return c>0&&(b=b.slice(c)),b}function V(a){var b=a.stack,c=a.toString();return b="string"==typeof b&&b.length>0?U(a):[" (No stack trace)"],{message:c,stack:T(b)}}function W(a,b,c){if("undefined"!=typeof console){var d;if(g.isObject(a)){var e=a.stack;d=b+o(e,a)}else d=b+String(a);"function"==typeof q?q(d,c):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(d)}}function X(a,b,c,d){var f=!1;try{"function"==typeof b&&(f=!0,"rejectionHandled"===a?b(d):b(c,d))}catch(a){e.throwLater(a)}"unhandledRejection"===a?A(a,c,d)||f||W(c,"Unhandled rejection "):A(a,d)}function Y(a){var b;if("function"==typeof a)b="[function "+(a.name||"anonymous")+"]";else{b=a&&"function"==typeof a.toString?a.toString():g.toString(a);if(/\[object [a-zA-Z0-9$_]+\]/.test(b))try{b=JSON.stringify(a)}catch(a){}0===b.length&&(b="(empty array)")}return"(<"+Z(b)+">, no stack trace)"}function Z(a){var b=41;return a.length<b?a:a.substr(0,b-3)+"..."}function $(){return"function"==typeof ea}function ba(a){var b=a.match(aa);if(b)return{fileName:b[1],line:parseInt(b[2],10)}}function ca(a,b){if($()){for(var g,h,c=a.stack.split("\n"),d=b.stack.split("\n"),e=-1,f=-1,i=0;i<c.length;++i){var j=ba(c[i]);if(j){g=j.fileName,e=j.line;break}}for(var i=0;i<d.length;++i){var j=ba(d[i]);if(j){h=j.fileName,f=j.line;break}}e<0||f<0||!g||!h||g!==h||e>=f||(_=function(a){if(k.test(a))return!0;var b=ba(a);return!!(b&&b.fileName===g&&e<=b.line&&b.line<=f)})}}function da(a){this._parent=a,this._promisesCreated=0;var b=this._length=1+(void 0===a?0:a._length);ea(this,da),b>32&&this.uncycle()}var i,j,q,d=b._getDomain,e=b._async,f=a("./errors").Warning,g=a("./util"),h=g.canAttachTrace,k=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,l=/\((?:timers\.js):\d+:\d+\)/,m=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,n=null,o=null,p=!1,r=!(0==g.env("BLUEBIRD_DEBUG")),s=!(0==g.env("BLUEBIRD_WARNINGS")||!r&&!g.env("BLUEBIRD_WARNINGS")),t=!(0==g.env("BLUEBIRD_LONG_STACK_TRACES")||!r&&!g.env("BLUEBIRD_LONG_STACK_TRACES")),u=0!=g.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(s||!!g.env("BLUEBIRD_W_FORGOTTEN_RETURN"));b.prototype.suppressUnhandledRejections=function(){var a=this._target();a._bitField=-1048577&a._bitField|524288},b.prototype._ensurePossibleRejectionHandled=function(){0==(524288&this._bitField)&&(this._setRejectionIsUnhandled(),e.invokeLater(this._notifyUnhandledRejection,this,void 0))},b.prototype._notifyUnhandledRejectionIsHandled=function(){X("rejectionHandled",i,void 0,this)},b.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},b.prototype._returnedNonUndefined=function(){return 0!=(268435456&this._bitField)},b.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var a=this._settledValue();this._setUnhandledRejectionIsNotified(),X("unhandledRejection",j,a,this)}},b.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},b.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},b.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},b.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},b.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},b.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},b.prototype._warn=function(a,b,c){return P(a,b,c||this)},b.onPossiblyUnhandledRejection=function(a){var b=d();j="function"==typeof a?null===b?a:g.domainBind(b,a):void 0},b.onUnhandledRejectionHandled=function(a){var b=d();i="function"==typeof a?null===b?a:g.domainBind(b,a):void 0};var v=function(){};b.longStackTraces=function(){if(e.haveItemsQueued()&&!fa.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!fa.longStackTraces&&$()){var a=b.prototype._captureStackTrace,d=b.prototype._attachExtraTrace;fa.longStackTraces=!0,v=function(){if(e.haveItemsQueued()&&!fa.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");b.prototype._captureStackTrace=a,b.prototype._attachExtraTrace=d,c.deactivateLongStackTraces(),e.enableTrampoline(),fa.longStackTraces=!1},b.prototype._captureStackTrace=L,b.prototype._attachExtraTrace=M,c.activateLongStackTraces(),e.disableTrampolineIfNecessary()}},b.hasLongStackTraces=function(){return fa.longStackTraces&&$()};var w=function(){try{if("function"==typeof CustomEvent){var a=new CustomEvent("CustomEvent");return g.global.dispatchEvent(a),function(a,b){var c=new CustomEvent(a.toLowerCase(),{detail:b,cancelable:!0});return!g.global.dispatchEvent(c)}}if("function"==typeof Event){var a=new Event("CustomEvent");return g.global.dispatchEvent(a),function(a,b){var c=new Event(a.toLowerCase(),{cancelable:!0});return c.detail=b,!g.global.dispatchEvent(c)}}var a=document.createEvent("CustomEvent");return a.initCustomEvent("testingtheevent",!1,!0,{}),g.global.dispatchEvent(a),function(a,b){var c=document.createEvent("CustomEvent");return c.initCustomEvent(a.toLowerCase(),!1,!0,b),!g.global.dispatchEvent(c)}}catch(a){}return function(){return!1}}(),x=function(){return g.isNode?function(){return process.emit.apply(process,arguments)}:g.global?function(a){var b="on"+a.toLowerCase(),c=g.global[b];return!!c&&(c.apply(g.global,[].slice.call(arguments,1)),!0)}:function(){return!1}}(),z={promiseCreated:y,promiseFulfilled:y,promiseRejected:y,promiseResolved:y,promiseCancelled:y,promiseChained:function(a,b,c){return{promise:b,child:c}},warning:function(a,b){return{warning:b}},unhandledRejection:function(a,b,c){return{reason:b,promise:c}},rejectionHandled:y},A=function(a){var b=!1;try{b=x.apply(null,arguments)}catch(a){e.throwLater(a),b=!0}var c=!1;try{c=w(a,z[a].apply(null,arguments))}catch(a){e.throwLater(a),c=!0}return c||b};b.config=function(a){if(a=Object(a),"longStackTraces"in a&&(a.longStackTraces?b.longStackTraces():!a.longStackTraces&&b.hasLongStackTraces()&&v()),"warnings"in a){var c=a.warnings;fa.warnings=!!c,u=fa.warnings,g.isObject(c)&&"wForgottenReturn"in c&&(u=!!c.wForgottenReturn)}if("cancellation"in a&&a.cancellation&&!fa.cancellation){if(e.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");b.prototype._clearCancellationData=G,b.prototype._propagateFrom=H,b.prototype._onCancel=E,b.prototype._setOnCancel=F,b.prototype._attachCancellationCallback=D,b.prototype._execute=C,J=H,fa.cancellation=!0}"monitoring"in a&&(a.monitoring&&!fa.monitoring?(fa.monitoring=!0,b.prototype._fireEvent=A):!a.monitoring&&fa.monitoring&&(fa.monitoring=!1,b.prototype._fireEvent=B))},b.prototype._fireEvent=B,b.prototype._execute=function(a,b,c){try{a(b,c)}catch(a){return a}},b.prototype._onCancel=function(){},b.prototype._setOnCancel=function(a){},b.prototype._attachCancellationCallback=function(a){},b.prototype._captureStackTrace=function(){},b.prototype._attachExtraTrace=function(){},b.prototype._clearCancellationData=function(){},b.prototype._propagateFrom=function(a,b){};var J=I,_=function(){return!1},aa=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;g.inherits(da,Error),c.CapturedTrace=da,da.prototype.uncycle=function(){var a=this._length;if(!(a<2)){for(var b=[],c={},d=0,e=this;void 0!==e;++d)b.push(e),e=e._parent;a=this._length=d;for(var d=a-1;d>=0;--d){var f=b[d].stack;void 0===c[f]&&(c[f]=d)}for(var d=0;d<a;++d){var g=b[d].stack,h=c[g];if(void 0!==h&&h!==d){h>0&&(b[h-1]._parent=void 0,b[h-1]._length=1),b[d]._parent=void 0,b[d]._length=1;var i=d>0?b[d-1]:this;h<a-1?(i._parent=b[h+1],i._parent.uncycle(),i._length=i._parent._length+1):(i._parent=void 0,i._length=1);for(var j=i._length+1,k=d-2;k>=0;--k)b[k]._length=j,j++;return}}}},da.prototype.attachExtraTrace=function(a){if(!a.__stackCleaned__){this.uncycle();for(var b=V(a),c=b.message,d=[b.stack],e=this;void 0!==e;)d.push(T(e.stack.split("\n"))),e=e._parent;S(d),R(d),g.notEnumerableProp(a,"stack",Q(c,d)),g.notEnumerableProp(a,"__stackCleaned__",!0)}};var ea=function(){var b=/^\s*at\s*/,c=function(a,b){return"string"==typeof a?a:void 0!==b.name&&void 0!==b.message?b.toString():Y(b)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,n=b,o=c;var d=Error.captureStackTrace;return _=function(a){return k.test(a)},function(a,b){Error.stackTraceLimit+=6,d(a,b),Error.stackTraceLimit-=6}}var e=new Error;if("string"==typeof e.stack&&e.stack.split("\n")[0].indexOf("stackDetection@")>=0)return n=/@/,o=c,p=!0,function(b){b.stack=(new Error).stack};var f;try{throw new Error}catch(a){f="stack"in a}return"stack"in e||!f||"number"!=typeof Error.stackTraceLimit?(o=function(a,b){return"string"==typeof a?a:"object"!=typeof b&&"function"!=typeof b||void 0===b.name||void 0===b.message?Y(b):b.toString()},null):(n=b,o=c,function(b){Error.stackTraceLimit+=6;try{throw new Error}catch(a){b.stack=a.stack}Error.stackTraceLimit-=6})}();"undefined"!=typeof console&&void 0!==console.warn&&(q=function(a){console.warn(a)},g.isNode&&process.stderr.isTTY?q=function(a,b){var c=b?"":"";console.warn(c+a+"\n")}:g.isNode||"string"!=typeof(new Error).stack||(q=function(a,b){console.warn("%c"+a,b?"color: darkorange":"color: red")}));var fa={warnings:s,longStackTraces:!1,cancellation:!1,monitoring:!1};return t&&b.longStackTraces(),{longStackTraces:function(){return fa.longStackTraces},warnings:function(){return fa.warnings},cancellation:function(){return fa.cancellation},monitoring:function(){return fa.monitoring},propagateFromFunction:function(){return J},boundValueFunction:function(){return K},checkForgottenReturns:N,setBounds:ca,warn:P,deprecated:O,CapturedTrace:da,fireDomEvent:w,fireGlobalEvent:x}}},{"./errors":12,"./util":36}],10:[function(a,b,c){"use strict";b.exports=function(a){function b(){return this.value}function c(){throw this.reason}a.prototype.return=a.prototype.thenReturn=function(c){return c instanceof a&&c.suppressUnhandledRejections(),this._then(b,void 0,void 0,{value:c},void 0)},a.prototype.throw=a.prototype.thenThrow=function(a){return this._then(c,void 0,void 0,{reason:a},void 0)},a.prototype.catchThrow=function(a){if(arguments.length<=1)return this._then(void 0,c,void 0,{reason:a},void 0);var b=arguments[1],d=function(){throw b};return this.caught(a,d)},a.prototype.catchReturn=function(c){if(arguments.length<=1)return c instanceof a&&c.suppressUnhandledRejections(),this._then(void 0,b,void 0,{value:c},void 0);var d=arguments[1];d instanceof a&&d.suppressUnhandledRejections();var e=function(){return d};return this.caught(c,e)}}},{}],11:[function(a,b,c){"use strict";b.exports=function(a,b){function e(){return d(this)}function f(a,d){return c(a,d,b,b)}var c=a.reduce,d=a.all;a.prototype.each=function(a){return c(this,a,b,0)._then(e,void 0,void 0,this,void 0)},a.prototype.mapSeries=function(a){return c(this,a,b,b)},a.each=function(a,d){return c(a,d,b,0)._then(e,void 0,void 0,a,void 0)},a.mapSeries=f}},{}],12:[function(a,b,c){"use strict";function i(a,b){function c(d){if(!(this instanceof c))return new c(d);h(this,"message","string"==typeof d?d:b),h(this,"name",a),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return g(c,Error),c}function s(a){if(!(this instanceof s))return new s(a);h(this,"name","OperationalError"),h(this,"message",a),this.cause=a,this.isOperational=!0,a instanceof Error?(h(this,"message",a.message),h(this,"stack",a.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}var j,k,d=a("./es5"),e=d.freeze,f=a("./util"),g=f.inherits,h=f.notEnumerableProp,l=i("Warning","warning"),m=i("CancellationError","cancellation error"),n=i("TimeoutError","timeout error"),o=i("AggregateError","aggregate error");try{j=TypeError,k=RangeError}catch(a){j=i("TypeError","type error"),k=i("RangeError","range error")}for(var p="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),q=0;q<p.length;++q)"function"==typeof Array.prototype[p[q]]&&(o.prototype[p[q]]=Array.prototype[p[q]]);d.defineProperty(o.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),o.prototype.isOperational=!0;var r=0;o.prototype.toString=function(){var a=Array(4*r+1).join(" "),b="\n"+a+"AggregateError of:\n";r++,a=Array(4*r+1).join(" ");for(var c=0;c<this.length;++c){for(var d=this[c]===this?"[Circular AggregateError]":this[c]+"",e=d.split("\n"),f=0;f<e.length;++f)e[f]=a+e[f];d=e.join("\n"),b+=d+"\n"}return r--,b},g(s,Error);var t=Error.__BluebirdErrorTypes__;t||(t=e({CancellationError:m,TimeoutError:n,OperationalError:s,RejectionError:s,AggregateError:o}),d.defineProperty(Error,"__BluebirdErrorTypes__",{value:t,writable:!1,enumerable:!1,configurable:!1})),b.exports={Error:Error,TypeError:j,RangeError:k,CancellationError:t.CancellationError,OperationalError:t.OperationalError,TimeoutError:t.TimeoutError,AggregateError:t.AggregateError,Warning:l}},{"./es5":13,"./util":36}],13:[function(a,b,c){var d=function(){"use strict";return void 0===this}();if(d)b.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:d,propertyIsWritable:function(a,b){var c=Object.getOwnPropertyDescriptor(a,b);return!(c&&!c.writable&&!c.set)}};else{var e={}.hasOwnProperty,f={}.toString,g={}.constructor.prototype,h=function(a){var b=[];for(var c in a)e.call(a,c)&&b.push(c);return b},i=function(a,b){return{value:a[b]}},j=function(a,b,c){return a[b]=c.value,a},k=function(a){return a},l=function(a){try{return Object(a).constructor.prototype}catch(a){return g}},m=function(a){try{return"[object Array]"===f.call(a)}catch(a){return!1}};b.exports={isArray:m,keys:h,names:h,defineProperty:j,getDescriptor:i,freeze:k,getPrototypeOf:l,isES5:d,propertyIsWritable:function(){return!0}}}},{}],14:[function(a,b,c){"use strict";b.exports=function(a,b){var c=a.map;a.prototype.filter=function(a,d){return c(this,a,d,b)},a.filter=function(a,d,e){return c(a,d,e,b)}}},{}],15:[function(a,b,c){"use strict";b.exports=function(b,c){function g(a,b,c){this.promise=a,this.type=b,this.handler=c,this.called=!1,this.cancelPromise=null}function h(a){this.finallyHandler=a}function i(a,b){return null!=a.cancelPromise&&(arguments.length>1?a.cancelPromise._reject(b):a.cancelPromise._cancel(),a.cancelPromise=null,!0)}function j(){return l.call(this,this.promise._target()._settledValue())}function k(a){if(!i(this,a))return f.e=a,f}function l(a){var d=this.promise,g=this.handler;if(!this.called){this.called=!0;var l=this.isFinallyHandler()?g.call(d._boundValue()):g.call(d._boundValue(),a);if(void 0!==l){d._setReturnedNonUndefined();var m=c(l,d);if(m instanceof b){if(null!=this.cancelPromise){if(m._isCancelled()){var n=new e("late cancellation observer");return d._attachExtraTrace(n),f.e=n,f}m.isPending()&&m._attachCancellationCallback(new h(this))}return m._then(j,k,void 0,this,void 0)}}}return d.isRejected()?(i(this),f.e=a,f):(i(this),a)}var d=a("./util"),e=b.CancellationError,f=d.errorObj;return g.prototype.isFinallyHandler=function(){return 0===this.type},h.prototype._resultCancelled=function(){i(this.finallyHandler)},b.prototype._passThrough=function(a,b,c,d){return"function"!=typeof a?this.then():this._then(c,d,void 0,new g(this,b,a),void 0)},b.prototype.lastly=b.prototype.finally=function(a){return this._passThrough(a,0,l,l)},b.prototype.tap=function(a){return this._passThrough(a,1,l)},g}},{"./util":36}],16:[function(a,b,c){"use strict";b.exports=function(b,c,d,e,f,g){function n(a,c,d){for(var f=0;f<c.length;++f){d._pushContext();var g=l(c[f])(a);if(d._popContext(),g===k){d._pushContext();var h=b.reject(k.e);return d._popContext(),h}var i=e(g,d);if(i instanceof b)return i}return null}function o(a,c,e,f){if(g.cancellation()){var h=new b(d),i=this._finallyPromise=new b(d);this._promise=h.lastly(function(){return i}),h._captureStackTrace(),h._setOnCancel(this)}else{(this._promise=new b(d))._captureStackTrace()}this._stack=f,this._generatorFunction=a,this._receiver=c,this._generator=void 0,this._yieldHandlers="function"==typeof e?[e].concat(m):m,this._yieldedPromise=null,this._cancellationPhase=!1}var h=a("./errors"),i=h.TypeError,j=a("./util"),k=j.errorObj,l=j.tryCatch,m=[];j.inherits(o,f),o.prototype._isResolved=function(){return null===this._promise},o.prototype._cleanup=function(){this._promise=this._generator=null,g.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},o.prototype._promiseCancelled=function(){if(!this._isResolved()){var c,a=void 0!==this._generator.return;if(a)this._promise._pushContext(),c=l(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var d=new b.CancellationError("generator .return() sentinel");b.coroutine.returnSentinel=d,this._promise._attachExtraTrace(d),this._promise._pushContext(),c=l(this._generator.throw).call(this._generator,d),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(c)}},o.prototype._promiseFulfilled=function(a){this._yieldedPromise=null,this._promise._pushContext();var b=l(this._generator.next).call(this._generator,a);this._promise._popContext(),this._continue(b)},o.prototype._promiseRejected=function(a){this._yieldedPromise=null,this._promise._attachExtraTrace(a),this._promise._pushContext();var b=l(this._generator.throw).call(this._generator,a);this._promise._popContext(),this._continue(b)},o.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof b){var a=this._yieldedPromise;this._yieldedPromise=null,a.cancel()}},o.prototype.promise=function(){return this._promise},o.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},o.prototype._continue=function(a){var c=this._promise;if(a===k)return this._cleanup(),this._cancellationPhase?c.cancel():c._rejectCallback(a.e,!1);var d=a.value;if(!0===a.done)return this._cleanup(),this._cancellationPhase?c.cancel():c._resolveCallback(d);var f=e(d,this._promise);if(!(f instanceof b)&&null===(f=n(f,this._yieldHandlers,this._promise)))return void this._promiseRejected(new i("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",d)+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")));f=f._target();var g=f._bitField;0==(50397184&g)?(this._yieldedPromise=f,f._proxy(this,null)):0!=(33554432&g)?b._async.invoke(this._promiseFulfilled,this,f._value()):0!=(16777216&g)?b._async.invoke(this._promiseRejected,this,f._reason()):this._promiseCancelled()},b.coroutine=function(a,b){if("function"!=typeof a)throw new i("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var c=Object(b).yieldHandler,d=o,e=(new Error).stack;return function(){var b=a.apply(this,arguments),f=new d(void 0,void 0,c,e),g=f.promise();return f._generator=b,f._promiseFulfilled(void 0),g}},b.coroutine.addYieldHandler=function(a){if("function"!=typeof a)throw new i("expecting a function but got "+j.classString(a));m.push(a)},b.spawn=function(a){if(g.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof a)return c("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var d=new o(a,this),e=d.promise();return d._run(b.spawn),e}}},{"./errors":12,"./util":36}],17:[function(a,b,c){"use strict";b.exports=function(b,c,d,e,f,g){var h=a("./util");h.canEvaluate,h.tryCatch,h.errorObj;b.join=function(){var f,a=arguments.length-1;if(a>0&&"function"==typeof arguments[a]){f=arguments[a];var j}var v=[].slice.call(arguments);f&&v.pop();var j=new c(v).promise();return void 0!==f?j.spread(f):j}}},{"./util":36}],18:[function(a,b,c){"use strict";b.exports=function(b,c,d,e,f,g){function m(a,b,c,d){this.constructor$(a),this._promise._captureStackTrace();var e=h();this._callback=null===e?b:i.domainBind(e,b),this._preservedValues=d===f?new Array(this.length()):null,this._limit=c,this._inFlight=0,this._queue=[],l.invoke(this._asyncInit,this,void 0)}function n(a,c,e,f){if("function"!=typeof c)return d("expecting a function but got "+i.classString(c));var g=0;if(void 0!==e){if("object"!=typeof e||null===e)return b.reject(new TypeError("options argument must be an object but it is "+i.classString(e)));if("number"!=typeof e.concurrency)return b.reject(new TypeError("'concurrency' must be a number but it is "+i.classString(e.concurrency)));g=e.concurrency}return g="number"==typeof g&&isFinite(g)&&g>=1?g:0,new m(a,c,g,f).promise()}var h=b._getDomain,i=a("./util"),j=i.tryCatch,k=i.errorObj,l=b._async;i.inherits(m,c),m.prototype._asyncInit=function(){this._init$(void 0,-2)},m.prototype._init=function(){},m.prototype._promiseFulfilled=function(a,c){var d=this._values,f=this.length(),h=this._preservedValues,i=this._limit;if(c<0){if(c=-1*c-1,d[c]=a,i>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(i>=1&&this._inFlight>=i)return d[c]=a,this._queue.push(c),!1;null!==h&&(h[c]=a);var l=this._promise,m=this._callback,n=l._boundValue();l._pushContext();var o=j(m).call(n,a,c,f),p=l._popContext();if(g.checkForgottenReturns(o,p,null!==h?"Promise.filter":"Promise.map",l),o===k)return this._reject(o.e),!0;var q=e(o,this._promise);if(q instanceof b){q=q._target();var r=q._bitField;if(0==(50397184&r))return i>=1&&this._inFlight++,d[c]=q,q._proxy(this,-1*(c+1)),!1;if(0==(33554432&r))return 0!=(16777216&r)?(this._reject(q._reason()),!0):(this._cancel(),!0);o=q._value()}d[c]=o}return++this._totalResolved>=f&&(null!==h?this._filter(d,h):this._resolve(d),!0)},m.prototype._drainQueue=function(){for(var a=this._queue,b=this._limit,c=this._values;a.length>0&&this._inFlight<b;){if(this._isResolved())return;var d=a.pop();this._promiseFulfilled(c[d],d)}},m.prototype._filter=function(a,b){for(var c=b.length,d=new Array(c),e=0,f=0;f<c;++f)a[f]&&(d[e++]=b[f]);d.length=e,this._resolve(d)},m.prototype.preservedValues=function(){return this._preservedValues},b.prototype.map=function(a,b){return n(this,a,b,null)},b.map=function(a,b,c,d){return n(a,b,c,d)}}},{"./util":36}],19:[function(a,b,c){"use strict";b.exports=function(b,c,d,e,f){var g=a("./util"),h=g.tryCatch;b.method=function(a){if("function"!=typeof a)throw new b.TypeError("expecting a function but got "+g.classString(a));return function(){var d=new b(c);d._captureStackTrace(),d._pushContext();var e=h(a).apply(this,arguments),g=d._popContext();return f.checkForgottenReturns(e,g,"Promise.method",d),d._resolveFromSyncValue(e),d}},b.attempt=b.try=function(a){if("function"!=typeof a)return e("expecting a function but got "+g.classString(a));var d=new b(c);d._captureStackTrace(),d._pushContext();var i;if(arguments.length>1){f.deprecated("calling Promise.try with more than 1 argument");var j=arguments[1],k=arguments[2];i=g.isArray(j)?h(a).apply(k,j):h(a).call(k,j)}else i=h(a)();var l=d._popContext();return f.checkForgottenReturns(i,l,"Promise.try",d),d._resolveFromSyncValue(i),d},b.prototype._resolveFromSyncValue=function(a){a===g.errorObj?this._rejectCallback(a.e,!1):this._resolveCallback(a,!0)}}},{"./util":36}],20:[function(a,b,c){"use strict";function i(a){return a instanceof Error&&h.getPrototypeOf(a)===Error.prototype}function k(a){var b;if(i(a)){b=new g(a),b.name=a.name,b.message=a.message,b.stack=a.stack;for(var c=h.keys(a),e=0;e<c.length;++e){var f=c[e];j.test(f)||(b[f]=a[f])}return b}return d.markAsOriginatingFromRejection(a),a}function l(a,b){return function(c,d){if(null!==a){if(c){var f=k(e(c));a._attachExtraTrace(f),a._reject(f)}else if(b){var g=[].slice.call(arguments,1);a._fulfill(g)}else a._fulfill(d);a=null}}}var d=a("./util"),e=d.maybeWrapAsError,f=a("./errors"),g=f.OperationalError,h=a("./es5"),j=/^(?:name|message|stack|cause)$/;b.exports=l},{"./errors":12,"./es5":13,"./util":36}],21:[function(a,b,c){"use strict";b.exports=function(b){function g(a,b){var g=this;if(!c.isArray(a))return h.call(g,a,b);var i=e(b).apply(g._boundValue(),[null].concat(a));i===f&&d.throwLater(i.e)}function h(a,b){var c=this,g=c._boundValue(),h=void 0===a?e(b).call(g,null):e(b).call(g,null,a);h===f&&d.throwLater(h.e)}function i(a,b){var c=this;if(!a){var g=new Error(a+"");g.cause=a,a=g}var h=e(b).call(c._boundValue(),a);h===f&&d.throwLater(h.e)}var c=a("./util"),d=b._async,e=c.tryCatch,f=c.errorObj;b.prototype.asCallback=b.prototype.nodeify=function(a,b){if("function"==typeof a){var c=h;void 0!==b&&Object(b).spread&&(c=g),this._then(c,i,void 0,this,a)}return this}}},{"./util":36}],22:[function(a,b,c){"use strict";b.exports=function(){function f(){}function D(a,b){if("function"!=typeof b)throw new n("expecting a function but got "+h.classString(b));if(a.constructor!==E)throw new n("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n")}function E(a){this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,a!==p&&(D(this,a),this._resolveFromExecutor(a)),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function F(a){this.promise._resolveCallback(a)}function G(a){this.promise._rejectCallback(a,!1)}function H(a){var b=new E(p);b._fulfillmentHandler0=a,b._rejectionHandler0=a,b._promise0=a,b._receiver0=a}var i,c=function(){return new n("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},d=function(){return new E.PromiseInspection(this._target())},e=function(a){return E.reject(new n(a))},g={},h=a("./util");i=h.isNode?function(){var a=process.domain;return void 0===a&&(a=null),a}:function(){return null},h.notEnumerableProp(E,"_getDomain",i);var j=a("./es5"),k=a("./async"),l=new k;j.defineProperty(E,"_async",{value:l});var m=a("./errors"),n=E.TypeError=m.TypeError;E.RangeError=m.RangeError;var o=E.CancellationError=m.CancellationError;E.TimeoutError=m.TimeoutError,E.OperationalError=m.OperationalError,E.RejectionError=m.OperationalError,E.AggregateError=m.AggregateError;var p=function(){},q={},r={},s=a("./thenables")(E,p),t=a("./promise_array")(E,p,s,e,f),u=a("./context")(E),v=u.create,w=a("./debuggability")(E,u),y=(w.CapturedTrace,a("./finally")(E,s)),z=a("./catch_filter")(r),A=a("./nodeback"),B=h.errorObj,C=h.tryCatch;return E.prototype.toString=function(){return"[object Promise]"},E.prototype.caught=E.prototype.catch=function(a){var b=arguments.length;if(b>1){var f,c=new Array(b-1),d=0;for(f=0;f<b-1;++f){var g=arguments[f];if(!h.isObject(g))return e("expecting an object but got A catch statement predicate "+h.classString(g));c[d++]=g}return c.length=d,a=arguments[f],this.then(void 0,z(c,a,this))}return this.then(void 0,a)},E.prototype.reflect=function(){return this._then(d,d,void 0,this,void 0)},E.prototype.then=function(a,b){if(w.warnings()&&arguments.length>0&&"function"!=typeof a&&"function"!=typeof b){var c=".then() only accepts functions but was passed: "+h.classString(a);arguments.length>1&&(c+=", "+h.classString(b)),this._warn(c)}return this._then(a,b,void 0,void 0,void 0)},E.prototype.done=function(a,b){this._then(a,b,void 0,void 0,void 0)._setIsFinal()},E.prototype.spread=function(a){return"function"!=typeof a?e("expecting a function but got "+h.classString(a)):this.all()._then(a,void 0,void 0,q,void 0)},E.prototype.toJSON=function(){var a={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(a.fulfillmentValue=this.value(),a.isFulfilled=!0):this.isRejected()&&(a.rejectionReason=this.reason(),a.isRejected=!0),a},E.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new t(this).promise()},E.prototype.error=function(a){return this.caught(h.originatesFromRejection,a)},E.getNewLibraryCopy=b.exports,E.is=function(a){return a instanceof E},E.fromNode=E.fromCallback=function(a){var b=new E(p);b._captureStackTrace();var c=arguments.length>1&&!!Object(arguments[1]).multiArgs,d=C(a)(A(b,c));return d===B&&b._rejectCallback(d.e,!0),b._isFateSealed()||b._setAsyncGuaranteed(),b},E.all=function(a){return new t(a).promise()},E.cast=function(a){var b=s(a);return b instanceof E||(b=new E(p),b._captureStackTrace(),b._setFulfilled(),b._rejectionHandler0=a),b},E.resolve=E.fulfilled=E.cast,E.reject=E.rejected=function(a){var b=new E(p);return b._captureStackTrace(),b._rejectCallback(a,!0),b},E.setScheduler=function(a){if("function"!=typeof a)throw new n("expecting a function but got "+h.classString(a));return l.setScheduler(a)},E.prototype._then=function(a,b,c,d,e){var f=void 0!==e,g=f?e:new E(p),j=this._target(),k=j._bitField;f||(g._propagateFrom(this,3),g._captureStackTrace(),void 0===d&&0!=(2097152&this._bitField)&&(d=0!=(50397184&k)?this._boundValue():j===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,g));var m=i();if(0!=(50397184&k)){var n,q,r=j._settlePromiseCtx;0!=(33554432&k)?(q=j._rejectionHandler0,n=a):0!=(16777216&k)?(q=j._fulfillmentHandler0,n=b,j._unsetRejectionIsUnhandled()):(r=j._settlePromiseLateCancellationObserver,q=new o("late cancellation observer"),j._attachExtraTrace(q),n=b),l.invoke(r,j,{handler:null===m?n:"function"==typeof n&&h.domainBind(m,n),promise:g,receiver:d,value:q})}else j._addCallbacks(a,b,g,d,m);return g},E.prototype._length=function(){return 65535&this._bitField},E.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},E.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},E.prototype._setLength=function(a){this._bitField=-65536&this._bitField|65535&a},E.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},E.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},E.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},E.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},E.prototype._isFinal=function(){return(4194304&this._bitField)>0},E.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},E.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},E.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},E.prototype._setAsyncGuaranteed=function(){l.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},E.prototype._receiverAt=function(a){var b=0===a?this._receiver0:this[4*a-4+3];if(b!==g)return void 0===b&&this._isBound()?this._boundValue():b},E.prototype._promiseAt=function(a){return this[4*a-4+2]},E.prototype._fulfillmentHandlerAt=function(a){return this[4*a-4+0]},E.prototype._rejectionHandlerAt=function(a){return this[4*a-4+1]},E.prototype._boundValue=function(){},E.prototype._migrateCallback0=function(a){var c=(a._bitField,a._fulfillmentHandler0),d=a._rejectionHandler0,e=a._promise0,f=a._receiverAt(0);void 0===f&&(f=g),this._addCallbacks(c,d,e,f,null)},E.prototype._migrateCallbackAt=function(a,b){var c=a._fulfillmentHandlerAt(b),d=a._rejectionHandlerAt(b),e=a._promiseAt(b),f=a._receiverAt(b);void 0===f&&(f=g),this._addCallbacks(c,d,e,f,null)},E.prototype._addCallbacks=function(a,b,c,d,e){var f=this._length();if(f>=65531&&(f=0,this._setLength(0)),0===f)this._promise0=c,this._receiver0=d,"function"==typeof a&&(this._fulfillmentHandler0=null===e?a:h.domainBind(e,a)),"function"==typeof b&&(this._rejectionHandler0=null===e?b:h.domainBind(e,b));else{var g=4*f-4;this[g+2]=c,this[g+3]=d,"function"==typeof a&&(this[g+0]=null===e?a:h.domainBind(e,a)),"function"==typeof b&&(this[g+1]=null===e?b:h.domainBind(e,b))}return this._setLength(f+1),f},E.prototype._proxy=function(a,b){this._addCallbacks(void 0,void 0,b,a,null)},E.prototype._resolveCallback=function(a,b){if(0==(117506048&this._bitField)){if(a===this)return this._rejectCallback(c(),!1);var d=s(a,this);if(!(d instanceof E))return this._fulfill(a);b&&this._propagateFrom(d,2);var e=d._target();if(e===this)return void this._reject(c());var f=e._bitField;if(0==(50397184&f)){var g=this._length();g>0&&e._migrateCallback0(this);for(var h=1;h<g;++h)e._migrateCallbackAt(this,h);this._setFollowing(),this._setLength(0),this._setFollowee(e)}else if(0!=(33554432&f))this._fulfill(e._value());else if(0!=(16777216&f))this._reject(e._reason());else{var i=new o("late cancellation observer");e._attachExtraTrace(i),this._reject(i)}}},E.prototype._rejectCallback=function(a,b,c){var d=h.ensureErrorObject(a),e=d===a;if(!e&&!c&&w.warnings()){var f="a promise was rejected with a non-error: "+h.classString(a);this._warn(f,!0)}this._attachExtraTrace(d,!!b&&e),this._reject(a)},E.prototype._resolveFromExecutor=function(a){var b=this;this._captureStackTrace(),this._pushContext();var c=!0,d=this._execute(a,function(a){b._resolveCallback(a)},function(a){b._rejectCallback(a,c)});c=!1,this._popContext(),void 0!==d&&b._rejectCallback(d,!0)},E.prototype._settlePromiseFromHandler=function(a,b,c,d){var e=d._bitField;if(0==(65536&e)){d._pushContext();var f;b===q?c&&"number"==typeof c.length?f=C(a).apply(this._boundValue(),c):(f=B,f.e=new n("cannot .spread() a non-array: "+h.classString(c))):f=C(a).call(b,c);var g=d._popContext();e=d._bitField,0==(65536&e)&&(f===r?d._reject(c):f===B?d._rejectCallback(f.e,!1):(w.checkForgottenReturns(f,g,"",d,this),d._resolveCallback(f)))}},E.prototype._target=function(){for(var a=this;a._isFollowing();)a=a._followee();return a},E.prototype._followee=function(){return this._rejectionHandler0},E.prototype._setFollowee=function(a){this._rejectionHandler0=a},E.prototype._settlePromise=function(a,b,c,e){var g=a instanceof E,h=this._bitField,i=0!=(134217728&h);0!=(65536&h)?(g&&a._invokeInternalOnCancel(),c instanceof y&&c.isFinallyHandler()?(c.cancelPromise=a,C(b).call(c,e)===B&&a._reject(B.e)):b===d?a._fulfill(d.call(c)):c instanceof f?c._promiseCancelled(a):g||a instanceof t?a._cancel():c.cancel()):"function"==typeof b?g?(i&&a._setAsyncGuaranteed(),this._settlePromiseFromHandler(b,c,e,a)):b.call(c,e,a):c instanceof f?c._isResolved()||(0!=(33554432&h)?c._promiseFulfilled(e,a):c._promiseRejected(e,a)):g&&(i&&a._setAsyncGuaranteed(),0!=(33554432&h)?a._fulfill(e):a._reject(e))},E.prototype._settlePromiseLateCancellationObserver=function(a){var b=a.handler,c=a.promise,d=a.receiver,e=a.value;"function"==typeof b?c instanceof E?this._settlePromiseFromHandler(b,d,e,c):b.call(d,e,c):c instanceof E&&c._reject(e)},E.prototype._settlePromiseCtx=function(a){this._settlePromise(a.promise,a.handler,a.receiver,a.value)},E.prototype._settlePromise0=function(a,b,c){var d=this._promise0,e=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(d,a,e,b)},E.prototype._clearCallbackDataAtIndex=function(a){var b=4*a-4;this[b+2]=this[b+3]=this[b+0]=this[b+1]=void 0},E.prototype._fulfill=function(a){var b=this._bitField;if(!((117506048&b)>>>16)){if(a===this){var d=c();return this._attachExtraTrace(d),this._reject(d)}this._setFulfilled(),this._rejectionHandler0=a,(65535&b)>0&&(0!=(134217728&b)?this._settlePromises():l.settlePromises(this))}},E.prototype._reject=function(a){var b=this._bitField;if(!((117506048&b)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=a,this._isFinal())return l.fatalError(a,h.isNode);(65535&b)>0?l.settlePromises(this):this._ensurePossibleRejectionHandled()}},E.prototype._fulfillPromises=function(a,b){for(var c=1;c<a;c++){var d=this._fulfillmentHandlerAt(c),e=this._promiseAt(c),f=this._receiverAt(c);this._clearCallbackDataAtIndex(c),this._settlePromise(e,d,f,b)}},E.prototype._rejectPromises=function(a,b){for(var c=1;c<a;c++){var d=this._rejectionHandlerAt(c),e=this._promiseAt(c),f=this._receiverAt(c);this._clearCallbackDataAtIndex(c),this._settlePromise(e,d,f,b)}},E.prototype._settlePromises=function(){var a=this._bitField,b=65535&a;if(b>0){if(0!=(16842752&a)){var c=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,c,a),this._rejectPromises(b,c)}else{var d=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,d,a),this._fulfillPromises(b,d)}this._setLength(0)}this._clearCancellationData()},E.prototype._settledValue=function(){var a=this._bitField;return 0!=(33554432&a)?this._rejectionHandler0:0!=(16777216&a)?this._fulfillmentHandler0:void 0},E.defer=E.pending=function(){return w.deprecated("Promise.defer","new Promise"),{promise:new E(p),resolve:F,reject:G}},h.notEnumerableProp(E,"_makeSelfResolutionError",c),a("./method")(E,p,s,e,w),a("./bind")(E,p,s,w),a("./cancel")(E,t,e,w),a("./direct_resolve")(E),a("./synchronous_inspection")(E),a("./join")(E,t,s,p,l,i),E.Promise=E,E.version="3.4.6",a("./map.js")(E,t,e,s,p,w),a("./call_get.js")(E),a("./using.js")(E,e,s,v,p,w),a("./timers.js")(E,p,w),a("./generators.js")(E,e,p,s,f,w),a("./nodeify.js")(E),a("./promisify.js")(E,p),a("./props.js")(E,t,s,e),a("./race.js")(E,p,s,e),a("./reduce.js")(E,t,e,s,p,w),a("./settle.js")(E,t,w),a("./some.js")(E,t,e),a("./filter.js")(E,p),a("./each.js")(E,p),a("./any.js")(E),h.toFastProperties(E),h.toFastProperties(E.prototype),H({a:1}),H({b:2}),H({c:3}),H(1),H(function(){}),H(void 0),H(!1),H(new E(p)),w.setBounds(k.firstLineError,h.lastLineError),E}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(a,b,c){"use strict";b.exports=function(b,c,d,e,f){function i(a){switch(a){case-2:return[];case-3:return{}}}function j(a){var d=this._promise=new b(c);a instanceof b&&d._propagateFrom(a,3),d._setOnCancel(this),this._values=a,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var g=a("./util");g.isArray;return g.inherits(j,f),j.prototype.length=function(){return this._length},j.prototype.promise=function(){return this._promise},j.prototype._init=function a(c,f){var h=d(this._values,this._promise);if(h instanceof b){h=h._target();var j=h._bitField;if(this._values=h,0==(50397184&j))return this._promise._setAsyncGuaranteed(),h._then(a,this._reject,void 0,this,f);if(0==(33554432&j))return 0!=(16777216&j)?this._reject(h._reason()):this._cancel();h=h._value()}if(null===(h=g.asArray(h))){var k=e("expecting an array or an iterable object but got "+g.classString(h)).reason();return void this._promise._rejectCallback(k,!1)}if(0===h.length)return void(-5===f?this._resolveEmptyArray():this._resolve(i(f)));this._iterate(h)},j.prototype._iterate=function(a){var c=this.getActualLength(a.length);this._length=c,this._values=this.shouldCopyValues()?new Array(c):this._values;for(var e=this._promise,f=!1,g=null,h=0;h<c;++h){var i=d(a[h],e);i instanceof b?(i=i._target(),g=i._bitField):g=null,f?null!==g&&i.suppressUnhandledRejections():null!==g?0==(50397184&g)?(i._proxy(this,h),this._values[h]=i):f=0!=(33554432&g)?this._promiseFulfilled(i._value(),h):0!=(16777216&g)?this._promiseRejected(i._reason(),h):this._promiseCancelled(h):f=this._promiseFulfilled(i,h)}f||e._setAsyncGuaranteed()},j.prototype._isResolved=function(){return null===this._values},j.prototype._resolve=function(a){this._values=null,this._promise._fulfill(a)},j.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},j.prototype._reject=function(a){this._values=null,this._promise._rejectCallback(a,!1)},j.prototype._promiseFulfilled=function(a,b){return this._values[b]=a,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},j.prototype._promiseCancelled=function(){return this._cancel(),!0},j.prototype._promiseRejected=function(a){return this._totalResolved++,this._reject(a),!0},j.prototype._resultCancelled=function(){if(!this._isResolved()){var a=this._values;if(this._cancel(),a instanceof b)a.cancel();else for(var c=0;c<a.length;++c)a[c]instanceof b&&a[c].cancel()}},j.prototype.shouldCopyValues=function(){return!0},j.prototype.getActualLength=function(a){return a},j}},{"./util":36}],24:[function(a,b,c){"use strict";b.exports=function(b,c){function p(a){return!n.test(a)}function q(a){try{return!0===a.__isPromisified__}catch(a){return!1}}function r(a,b,c){var d=e.getDataPropertyOrDefault(a,b+c,l);return!!d&&q(d)}function s(a,b,c){for(var d=0;d<a.length;d+=2){var e=a[d];if(c.test(e))for(var f=e.replace(c,""),g=0;g<a.length;g+=2)if(a[g]===f)throw new j("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",b))}}function t(a,b,c,d){for(var f=e.inheritedDataKeys(a),g=[],h=0;h<f.length;++h){var i=f[h],j=a[i],k=d===o||o(i,j,a);"function"!=typeof j||q(j)||r(a,i,b)||!d(i,j,a,k)||g.push(i,j)}return s(g,b,c),g}function A(a,i,j,k,l,m){function p(){var e=i;i===d&&(e=this);var j=new b(c);j._captureStackTrace();var k="string"==typeof o&&this!==n?this[o]:a,l=f(j,m);try{k.apply(e,g(arguments,l))}catch(a){j._rejectCallback(h(a),!0,!0)}return j._isFateSealed()||j._setAsyncGuaranteed(),j}var n=function(){return this}(),o=a;return"string"==typeof o&&(a=k),e.notEnumerableProp(p,"__isPromisified__",!0),p}function C(a,b,c,f,g){for(var h=new RegExp(u(b)+"$"),i=t(a,b,h,c),j=0,k=i.length;j<k;j+=2){var l=i[j],m=i[j+1],n=l+b;if(f===B)a[n]=B(l,d,l,m,b,g);else{var o=f(m,function(){return B(l,d,l,m,b,g)});e.notEnumerableProp(o,"__isPromisified__",!0),a[n]=o}}return e.toFastProperties(a),a}function D(a,b,c){return B(a,b,void 0,a,null,c)}var v,d={},e=a("./util"),f=a("./nodeback"),g=e.withAppended,h=e.maybeWrapAsError,i=e.canEvaluate,j=a("./errors").TypeError,k="Async",l={__isPromisified__:!0},m=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],n=new RegExp("^(?:"+m.join("|")+")$"),o=function(a){return e.isIdentifier(a)&&"_"!==a.charAt(0)&&"constructor"!==a},u=function(a){return a.replace(/([$])/,"\\$")},B=i?v:A;b.promisify=function(a,b){if("function"!=typeof a)throw new j("expecting a function but got "+e.classString(a));if(q(a))return a;b=Object(b);var c=void 0===b.context?d:b.context,f=!!b.multiArgs,g=D(a,c,f);return e.copyDescriptors(a,g,p),g},b.promisifyAll=function(a,b){if("function"!=typeof a&&"object"!=typeof a)throw new j("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");b=Object(b);var c=!!b.multiArgs,d=b.suffix;"string"!=typeof d&&(d=k);var f=b.filter;"function"!=typeof f&&(f=o);var g=b.promisifier;if("function"!=typeof g&&(g=B),!e.isIdentifier(d))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var h=e.inheritedDataKeys(a),i=0;i<h.length;++i){var l=a[h[i]];"constructor"!==h[i]&&e.isClass(l)&&(C(l.prototype,d,f,g,c),C(l,d,f,g,c))}return C(a,d,f,g,c)}}},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(a,b,c){"use strict";b.exports=function(b,c,d,e){function l(a){var c,b=!1;if(void 0!==i&&a instanceof i)c=j(a),b=!0;else{var d=h.keys(a),e=d.length;c=new Array(2*e);for(var f=0;f<e;++f){var g=d[f];c[f]=a[g],c[f+e]=g}}this.constructor$(c),this._isMap=b,this._init$(void 0,-3)}function m(a){var c,f=d(a);return g(f)?(c=f instanceof b?f._then(b.props,void 0,void 0,void 0,void 0):new l(f).promise(),f instanceof b&&c._propagateFrom(f,2),c):e("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}var i,f=a("./util"),g=f.isObject,h=a("./es5");"function"==typeof Map&&(i=Map);var j=function(){function c(c,d){this[a]=c,this[a+b]=d,a++}var a=0,b=0;return function(e){b=e.size,a=0;var f=new Array(2*e.size);return e.forEach(c,f),f}}(),k=function(a){for(var b=new i,c=a.length/2|0,d=0;d<c;++d){var e=a[c+d],f=a[d];b.set(e,f)}return b};f.inherits(l,c),l.prototype._init=function(){},l.prototype._promiseFulfilled=function(a,b){if(this._values[b]=a,++this._totalResolved>=this._length){var d;if(this._isMap)d=k(this._values);else{d={};for(var e=this.length(),f=0,g=this.length();f<g;++f)d[this._values[f+e]]=this._values[f]}return this._resolve(d),!0}return!1},l.prototype.shouldCopyValues=function(){return!1},l.prototype.getActualLength=function(a){return a>>1},b.prototype.props=function(){return m(this)},b.props=function(a){return m(a)}}},{"./es5":13,"./util":36}],26:[function(a,b,c){"use strict";function d(a,b,c,d,e){for(var f=0;f<e;++f)c[f+d]=a[f+b],a[f+b]=void 0}function e(a){this._capacity=a,this._length=0,this._front=0}e.prototype._willBeOverCapacity=function(a){return this._capacity<a},e.prototype._pushOne=function(a){var b=this.length();this._checkCapacity(b+1),this[this._front+b&this._capacity-1]=a,this._length=b+1},e.prototype._unshiftOne=function(a){var b=this._capacity;this._checkCapacity(this.length()+1);var c=this._front,d=(c-1&b-1^b)-b;this[d]=a,this._front=d,this._length=this.length()+1},e.prototype.unshift=function(a,b,c){this._unshiftOne(c),this._unshiftOne(b),this._unshiftOne(a)},e.prototype.push=function(a,b,c){var d=this.length()+3;if(this._willBeOverCapacity(d))return this._pushOne(a),this._pushOne(b),void this._pushOne(c);var e=this._front+d-3;this._checkCapacity(d);var f=this._capacity-1;this[e+0&f]=a,this[e+1&f]=b,this[e+2&f]=c,this._length=d},e.prototype.shift=function(){var a=this._front,b=this[a];return this[a]=void 0,this._front=a+1&this._capacity-1,this._length--,b},e.prototype.length=function(){return this._length},e.prototype._checkCapacity=function(a){this._capacity<a&&this._resizeTo(this._capacity<<1)},e.prototype._resizeTo=function(a){var b=this._capacity;this._capacity=a,d(this,0,this,b,this._front+this._length&b-1)},b.exports=e},{}],27:[function(a,b,c){"use strict";b.exports=function(b,c,d,e){function h(a,h){var i=d(a);if(i instanceof b)return g(i);if(null===(a=f.asArray(a)))return e("expecting an array or an iterable object but got "+f.classString(a));var j=new b(c);void 0!==h&&j._propagateFrom(h,3);for(var k=j._fulfill,l=j._reject,m=0,n=a.length;m<n;++m){var o=a[m];(void 0!==o||m in a)&&b.cast(o)._then(k,l,void 0,j,null)}return j}var f=a("./util"),g=function(a){return a.then(function(b){return h(b,a)})};b.race=function(a){return h(a,void 0)},b.prototype.race=function(){return h(this,void 0)}}},{"./util":36}],28:[function(a,b,c){"use strict";b.exports=function(b,c,d,e,f,g){function k(a,c,d,e){this.constructor$(a);var g=h();this._fn=null===g?c:i.domainBind(g,c),void 0!==d&&(d=b.resolve(d),d._attachCancellationCallback(this)),this._initialValue=d,this._currentCancellable=null,this._eachValues=e===f?Array(this._length):0===e?null:void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function l(a,b){this.isFulfilled()?b._resolve(a):b._reject(a)}function m(a,b,c,e){return"function"!=typeof b?d("expecting a function but got "+i.classString(b)):new k(a,b,c,e).promise()}function n(a){this.accum=a,this.array._gotAccum(a);var c=e(this.value,this.array._promise);return c instanceof b?(this.array._currentCancellable=c,c._then(o,void 0,void 0,this,void 0)):o.call(this,c)}function o(a){var c=this.array,d=c._promise,e=j(c._fn);d._pushContext();var f;(f=void 0!==c._eachValues?e.call(d._boundValue(),a,this.index,this.length):e.call(d._boundValue(),this.accum,a,this.index,this.length))instanceof b&&(c._currentCancellable=f);var h=d._popContext();return g.checkForgottenReturns(f,h,void 0!==c._eachValues?"Promise.each":"Promise.reduce",d),f}var h=b._getDomain,i=a("./util"),j=i.tryCatch;i.inherits(k,c),k.prototype._gotAccum=function(a){void 0!==this._eachValues&&null!==this._eachValues&&a!==f&&this._eachValues.push(a)},k.prototype._eachComplete=function(a){return null!==this._eachValues&&this._eachValues.push(a),this._eachValues},k.prototype._init=function(){},k.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},k.prototype.shouldCopyValues=function(){return!1},k.prototype._resolve=function(a){this._promise._resolveCallback(a),this._values=null},k.prototype._resultCancelled=function(a){if(a===this._initialValue)return this._cancel();this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof b&&this._currentCancellable.cancel(),this._initialValue instanceof b&&this._initialValue.cancel())},k.prototype._iterate=function(a){this._values=a;var c,d,e=a.length;if(void 0!==this._initialValue?(c=this._initialValue,d=0):(c=b.resolve(a[0]),d=1),this._currentCancellable=c,!c.isRejected())for(;d<e;++d){var f={accum:null,value:a[d],index:d,length:e,array:this};c=c._then(n,void 0,void 0,f,void 0)}void 0!==this._eachValues&&(c=c._then(this._eachComplete,void 0,void 0,this,void 0)),c._then(l,l,void 0,c,this)},b.prototype.reduce=function(a,b){return m(this,a,b,null)},b.reduce=function(a,b,c,d){return m(a,b,c,d)}}},{"./util":36}],29:[function(a,b,c){"use strict";var e,d=a("./util"),f=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},g=d.getNativePromise();if(d.isNode&&"undefined"==typeof MutationObserver){var h=global.setImmediate,i=process.nextTick;e=d.isRecentNode?function(a){h.call(global,a)}:function(a){i.call(process,a)}}else if("function"==typeof g&&"function"==typeof g.resolve){var j=g.resolve();e=function(a){j.then(a)}}else e="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)?void 0!==setImmediate?function(a){setImmediate(a)}:"undefined"!=typeof setTimeout?function(a){setTimeout(a,0)}:f:function(){var a=document.createElement("div"),b={attributes:!0},c=!1,d=document.createElement("div");new MutationObserver(function(){a.classList.toggle("foo"),c=!1}).observe(d,b);var f=function(){c||(c=!0,d.classList.toggle("foo"))};return function(d){var e=new MutationObserver(function(){e.disconnect(),d()});e.observe(a,b),f()}}();b.exports=e},{"./util":36}],30:[function(a,b,c){"use strict";b.exports=function(b,c,d){function g(a){this.constructor$(a)}var e=b.PromiseInspection;a("./util").inherits(g,c),g.prototype._promiseResolved=function(a,b){return this._values[a]=b,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},g.prototype._promiseFulfilled=function(a,b){var c=new e;return c._bitField=33554432,c._settledValueField=a,this._promiseResolved(b,c)},g.prototype._promiseRejected=function(a,b){var c=new e;return c._bitField=16777216,c._settledValueField=a,this._promiseResolved(b,c)},b.settle=function(a){return d.deprecated(".settle()",".reflect()"),new g(a).promise()},b.prototype.settle=function(){return b.settle(this)}}},{"./util":36}],31:[function(a,b,c){"use strict";b.exports=function(b,c,d){function j(a){this.constructor$(a),this._howMany=0,this._unwrap=!1,this._initialized=!1}function k(a,b){if((0|b)!==b||b<0)return d("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var c=new j(a),e=c.promise();return c.setHowMany(b),c.init(),e}var e=a("./util"),f=a("./errors").RangeError,g=a("./errors").AggregateError,h=e.isArray,i={};e.inherits(j,c),j.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var a=h(this._values);!this._isResolved()&&a&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},j.prototype.init=function(){this._initialized=!0,this._init()},j.prototype.setUnwrap=function(){this._unwrap=!0},j.prototype.howMany=function(){return this._howMany},j.prototype.setHowMany=function(a){this._howMany=a},j.prototype._promiseFulfilled=function(a){return this._addFulfilled(a),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},j.prototype._promiseRejected=function(a){return this._addRejected(a),this._checkOutcome()},j.prototype._promiseCancelled=function(){return this._values instanceof b||null==this._values?this._cancel():(this._addRejected(i),this._checkOutcome())},j.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var a=new g,b=this.length();b<this._values.length;++b)this._values[b]!==i&&a.push(this._values[b]);return a.length>0?this._reject(a):this._cancel(),!0}return!1},j.prototype._fulfilled=function(){return this._totalResolved},j.prototype._rejected=function(){return this._values.length-this.length()},j.prototype._addRejected=function(a){this._values.push(a)},j.prototype._addFulfilled=function(a){this._values[this._totalResolved++]=a},j.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},j.prototype._getRangeError=function(a){var b="Input array must contain at least "+this._howMany+" items but contains only "+a+" items";return new f(b)},j.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},b.some=function(a,b){return k(a,b)},b.prototype.some=function(a){return k(this,a)},b._SomePromiseArray=j}},{"./errors":12,"./util":36}],32:[function(a,b,c){"use strict";b.exports=function(a){function b(a){void 0!==a?(a=a._target(),this._bitField=a._bitField,this._settledValueField=a._isFateSealed()?a._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}b.prototype._settledValue=function(){return this._settledValueField};var c=b.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},d=b.prototype.error=b.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},e=b.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},f=b.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},g=b.prototype.isPending=function(){return 0==(50397184&this._bitField)},h=b.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};b.prototype.isCancelled=function(){return 0!=(8454144&this._bitField)},a.prototype.__isCancelled=function(){return 65536==(65536&this._bitField)},a.prototype._isCancelled=function(){return this._target().__isCancelled()},a.prototype.isCancelled=function(){return 0!=(8454144&this._target()._bitField)},a.prototype.isPending=function(){return g.call(this._target())},a.prototype.isRejected=function(){return f.call(this._target())},a.prototype.isFulfilled=function(){return e.call(this._target())},a.prototype.isResolved=function(){return h.call(this._target())},a.prototype.value=function(){return c.call(this._target())},a.prototype.reason=function(){var a=this._target();return a._unsetRejectionIsUnhandled(),d.call(a)},a.prototype._value=function(){return this._settledValue()},a.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},a.PromiseInspection=b}},{}],33:[function(a,b,c){"use strict";b.exports=function(b,c){function g(a,d){if(f(a)){if(a instanceof b)return a;var g=i(a);if(g===e){d&&d._pushContext();var h=b.reject(g.e);return d&&d._popContext(),h}if("function"==typeof g){if(k(a)){var h=new b(c);return a._then(h._fulfill,h._reject,void 0,h,null),h}return l(a,g,d)}}return a}function h(a){return a.then}function i(a){try{return h(a)}catch(a){return e.e=a,e}}function k(a){try{return j.call(a,"_promise0")}catch(a){return!1}}function l(a,f,g){function l(a){h&&(h._resolveCallback(a),h=null)}function m(a){h&&(h._rejectCallback(a,j,!0),h=null)}var h=new b(c),i=h;g&&g._pushContext(),h._captureStackTrace(),g&&g._popContext();var j=!0,k=d.tryCatch(f).call(a,l,m);return j=!1,h&&k===e&&(h._rejectCallback(k.e,!0,!0),h=null),i}var d=a("./util"),e=d.errorObj,f=d.isObject,j={}.hasOwnProperty;return g}},{"./util":36}],34:[function(a,b,c){"use strict";b.exports=function(b,c,d){function g(a){this.handle=a}function k(a){return clearTimeout(this.handle),a}function l(a){throw clearTimeout(this.handle),a}var e=a("./util"),f=b.TimeoutError;g.prototype._resultCancelled=function(){clearTimeout(this.handle)};var h=function(a){return i(+this).thenReturn(a)},i=b.delay=function(a,e){var f,i;return void 0!==e?(f=b.resolve(e)._then(h,null,null,a,void 0),d.cancellation()&&e instanceof b&&f._setOnCancel(e)):(f=new b(c),i=setTimeout(function(){f._fulfill()},+a),d.cancellation()&&f._setOnCancel(new g(i)),f._captureStackTrace()),f._setAsyncGuaranteed(),f};b.prototype.delay=function(a){return i(a,this)};var j=function(a,b,c){var d;d="string"!=typeof b?b instanceof Error?b:new f("operation timed out"):new f(b),e.markAsOriginatingFromRejection(d),a._attachExtraTrace(d),a._reject(d),null!=c&&c.cancel()};b.prototype.timeout=function(a,b){a=+a;var c,e,f=new g(setTimeout(function(){c.isPending()&&j(c,b,e)},a));return d.cancellation()?(e=this.then(),c=e._then(k,l,void 0,f,void 0),c._setOnCancel(f)):c=this._then(k,l,void 0,f,void 0),c}}},{"./util":36}],35:[function(a,b,c){"use strict";b.exports=function(b,c,d,e,f,g){function n(a){setTimeout(function(){throw a},0)}function o(a){var b=d(a);return b!==a&&"function"==typeof a._isDisposable&&"function"==typeof a._getDisposer&&a._isDisposable()&&b._setDisposable(a._getDisposer()),b}function p(a,c){function i(){if(e>=g)return h._fulfill();var f=o(a[e++]);if(f instanceof b&&f._isDisposable()){try{f=d(f._getDisposer().tryDispose(c),a.promise)}catch(a){return n(a)}if(f instanceof b)return f._then(i,n,null,null,null)}i()}var e=0,g=a.length,h=new b(f);return i(),h}function q(a,b,c){this._data=a,this._promise=b,this._context=c}function r(a,b,c){this.constructor$(a,b,c)}function s(a){return q.isDisposer(a)?(this.resources[this.index]._setDisposable(a),a.promise()):a}function t(a){this.length=a,this.promise=null,this[a-1]=null}var h=a("./util"),i=a("./errors").TypeError,j=a("./util").inherits,k=h.errorObj,l=h.tryCatch,m={};q.prototype.data=function(){return this._data},q.prototype.promise=function(){return this._promise},q.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():m},q.prototype.tryDispose=function(a){var b=this.resource(),c=this._context;void 0!==c&&c._pushContext();var d=b!==m?this.doDispose(b,a):null;return void 0!==c&&c._popContext(),this._promise._unsetDisposable(),this._data=null,d},q.isDisposer=function(a){return null!=a&&"function"==typeof a.resource&&"function"==typeof a.tryDispose},j(r,q),r.prototype.doDispose=function(a,b){return this.data().call(a,a,b)},t.prototype._resultCancelled=function(){for(var a=this.length,c=0;c<a;++c){var d=this[c];d instanceof b&&d.cancel()}},b.using=function(){var a=arguments.length;if(a<2)return c("you must pass at least 2 arguments to Promise.using");var e=arguments[a-1];if("function"!=typeof e)return c("expecting a function but got "+h.classString(e));var f,i=!0;2===a&&Array.isArray(arguments[0])?(f=arguments[0],a=f.length,i=!1):(f=arguments,a--);for(var j=new t(a),m=0;m<a;++m){var n=f[m];if(q.isDisposer(n)){var o=n;n=n.promise(),n._setDisposable(o)}else{var r=d(n);r instanceof b&&(n=r._then(s,null,null,{resources:j,index:m},void 0))}j[m]=n}for(var u=new Array(j.length),m=0;m<u.length;++m)u[m]=b.resolve(j[m]).reflect();var v=b.all(u).then(function(a){for(var b=0;b<a.length;++b){var c=a[b];if(c.isRejected())return k.e=c.error(),k;if(!c.isFulfilled())return void v.cancel();a[b]=c.value()}w._pushContext(),e=l(e);var d=i?e.apply(void 0,a):e(a),f=w._popContext();return g.checkForgottenReturns(d,f,"Promise.using",w),d}),w=v.lastly(function(){var a=new b.PromiseInspection(v);return p(j,a)});return j.promise=w,w._setOnCancel(j),w},b.prototype._setDisposable=function(a){this._bitField=131072|this._bitField,this._disposer=a},b.prototype._isDisposable=function(){return(131072&this._bitField)>0},b.prototype._getDisposer=function(){return this._disposer},b.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},b.prototype.disposer=function(a){if("function"==typeof a)return new r(a,this,e());throw new i}}},{"./errors":12,"./util":36}],36:[function(_dereq_,module,exports){"use strict";function tryCatcher(){try{var a=tryCatchTarget;return tryCatchTarget=null,a.apply(this,arguments)}catch(a){return errorObj.e=a,errorObj}}function tryCatch(a){return tryCatchTarget=a,tryCatcher}function isPrimitive(a){return null==a||!0===a||!1===a||"string"==typeof a||"number"==typeof a}function isObject(a){return"function"==typeof a||"object"==typeof a&&null!==a}function maybeWrapAsError(a){return isPrimitive(a)?new Error(safeToString(a)):a}function withAppended(a,b){var e,c=a.length,d=new Array(c+1);for(e=0;e<c;++e)d[e]=a[e];return d[e]=b,d}function getDataPropertyOrDefault(a,b,c){if(!es5.isES5)return{}.hasOwnProperty.call(a,b)?a[b]:void 0;var d=Object.getOwnPropertyDescriptor(a,b);return null!=d?null==d.get&&null==d.set?d.value:c:void 0}function notEnumerableProp(a,b,c){if(isPrimitive(a))return a;var d={value:c,configurable:!0,enumerable:!1,writable:!0};return es5.defineProperty(a,b,d),a}function thrower(a){throw a}function isClass(a){try{if("function"==typeof a){var b=es5.names(a.prototype),c=es5.isES5&&b.length>1,d=b.length>0&&!(1===b.length&&"constructor"===b[0]),e=thisAssignmentPattern.test(a+"")&&es5.names(a).length>0;if(c||d||e)return!0}return!1}catch(a){return!1}}function toFastProperties(obj){function FakeConstructor(){}FakeConstructor.prototype=obj;for(var l=8;l--;)new FakeConstructor;return obj}function isIdentifier(a){return rident.test(a)}function filledRange(a,b,c){for(var d=new Array(a),e=0;e<a;++e)d[e]=b+e+c;return d}function safeToString(a){try{return a+""}catch(a){return"[no string representation]"}}function isError(a){return null!==a&&"object"==typeof a&&"string"==typeof a.message&&"string"==typeof a.name}function markAsOriginatingFromRejection(a){try{notEnumerableProp(a,"isOperational",!0)}catch(a){}}function originatesFromRejection(a){return null!=a&&(a instanceof Error.__BluebirdErrorTypes__.OperationalError||!0===a.isOperational)}function canAttachTrace(a){return isError(a)&&es5.propertyIsWritable(a,"stack")}function classString(a){return{}.toString.call(a)}function copyDescriptors(a,b,c){for(var d=es5.names(a),e=0;e<d.length;++e){var f=d[e];if(c(f))try{es5.defineProperty(b,f,es5.getDescriptor(a,f))}catch(a){}}}function env(a,b){return isNode?process.env[a]:b}function getNativePromise(){if("function"==typeof Promise)try{var a=new Promise(function(){});if("[object Promise]"==={}.toString.call(a))return Promise}catch(a){}}function domainBind(a,b){return a.bind(b)}var es5=_dereq_("./es5"),canEvaluate="undefined"==typeof navigator,errorObj={e:{}},tryCatchTarget,globalObject="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==global?global:void 0!==this?this:null,inherits=function(a,b){function d(){this.constructor=a,this.constructor$=b;for(var d in b.prototype)c.call(b.prototype,d)&&"$"!==d.charAt(d.length-1)&&(this[d+"$"]=b.prototype[d])}var c={}.hasOwnProperty;return d.prototype=b.prototype,a.prototype=new d,a.prototype},inheritedDataKeys=function(){var a=[Array.prototype,Object.prototype,Function.prototype],b=function(b){for(var c=0;c<a.length;++c)if(a[c]===b)return!0;return!1};if(es5.isES5){var c=Object.getOwnPropertyNames;return function(a){for(var d=[],e=Object.create(null);null!=a&&!b(a);){var f;try{f=c(a)}catch(a){return d}for(var g=0;g<f.length;++g){var h=f[g];if(!e[h]){e[h]=!0;var i=Object.getOwnPropertyDescriptor(a,h);null!=i&&null==i.get&&null==i.set&&d.push(h)}}a=es5.getPrototypeOf(a)}return d}}var d={}.hasOwnProperty;return function(c){if(b(c))return[];var e=[];a:for(var f in c)if(d.call(c,f))e.push(f);else{for(var g=0;g<a.length;++g)if(d.call(a[g],f))continue a;e.push(f)}return e}}(),thisAssignmentPattern=/this\s*\.\s*\S+\s*=/,rident=/^[a-z$_][a-z$_0-9]*$/i,ensureErrorObject=function(){return"stack"in new Error?function(a){return canAttachTrace(a)?a:new Error(safeToString(a))}:function(a){if(canAttachTrace(a))return a;try{throw new Error(safeToString(a))}catch(a){return a}}}(),asArray=function(a){return es5.isArray(a)?a:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var ArrayFrom="function"==typeof Array.from?function(a){return Array.from(a)}:function(a){for(var d,b=[],c=a[Symbol.iterator]();!(d=c.next()).done;)b.push(d.value);return b};asArray=function(a){return es5.isArray(a)?a:null!=a&&"function"==typeof a[Symbol.iterator]?ArrayFrom(a):null}}var isNode=void 0!==process&&"[object process]"===classString(process).toLowerCase(),ret={isClass:isClass,isIdentifier:isIdentifier,inheritedDataKeys:inheritedDataKeys,getDataPropertyOrDefault:getDataPropertyOrDefault,thrower:thrower,isArray:es5.isArray,asArray:asArray,notEnumerableProp:notEnumerableProp,isPrimitive:isPrimitive,isObject:isObject,isError:isError,canEvaluate:canEvaluate,errorObj:errorObj,tryCatch:tryCatch,inherits:inherits,withAppended:withAppended,maybeWrapAsError:maybeWrapAsError,toFastProperties:toFastProperties,filledRange:filledRange,toString:safeToString,canAttachTrace:canAttachTrace,ensureErrorObject:ensureErrorObject,originatesFromRejection:originatesFromRejection,markAsOriginatingFromRejection:markAsOriginatingFromRejection,classString:classString,copyDescriptors:copyDescriptors,hasDevTools:"undefined"!=typeof chrome&&chrome&&"function"==typeof chrome.loadTimes,isNode:isNode,env:env,global:globalObject,getNativePromise:getNativePromise,domainBind:domainBind};ret.isRecentNode=ret.isNode&&function(){var a=process.versions.node.split(".").map(Number);return 0===a[0]&&a[1]>10||a[0]>0}(),ret.isNode&&ret.toFastProperties(process);try{throw new Error}catch(a){ret.lastLineError=a}module.exports=ret},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)}).call(exports,__webpack_require__(4),__webpack_require__(3),function(){return this}(),__webpack_require__(5).setImmediate)},function(a,b){function f(){throw new Error("setTimeout has not been defined")}function g(){throw new Error("clearTimeout has not been defined")}function h(a){if(d===setTimeout)return setTimeout(a,0);if((d===f||!d)&&setTimeout)return d=setTimeout,setTimeout(a,0);try{return d(a,0)}catch(b){try{return d.call(null,a,0)}catch(b){return d.call(this,a,0)}}}function i(a){if(e===clearTimeout)return clearTimeout(a);if((e===g||!e)&&clearTimeout)return e=clearTimeout,clearTimeout(a);try{return e(a)}catch(b){try{return e.call(null,a)}catch(b){return e.call(this,a)}}}function n(){k&&l&&(k=!1,l.length?j=l.concat(j):m=-1,j.length&&o())}function o(){if(!k){var a=h(n);k=!0;for(var b=j.length;b;){for(l=j,j=[];++m<b;)l&&l[m].run();m=-1,b=j.length}l=null,k=!1,i(a)}}function p(a,b){this.fun=a,this.array=b}function q(){}var d,e,c=a.exports={};!function(){try{d="function"==typeof setTimeout?setTimeout:f}catch(a){d=f}try{e="function"==typeof clearTimeout?clearTimeout:g}catch(a){e=g}}();var l,j=[],k=!1,m=-1;c.nextTick=function(a){var b=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)b[c-1]=arguments[c];j.push(new p(a,b)),1!==j.length||k||h(o)},p.prototype.run=function(){this.fun.apply(null,this.array)},c.title="browser",c.browser=!0,c.env={},c.argv=[],c.version="",c.versions={},c.on=q,c.addListener=q,c.once=q,c.off=q,c.removeListener=q,c.removeAllListeners=q,c.emit=q,c.binding=function(a){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(a){throw new Error("process.chdir is not supported")},c.umask=function(){return 0}},function(a,b,c){function e(a,b){this._id=a,this._clearFn=b}var d=Function.prototype.apply;b.setTimeout=function(){return new e(d.call(setTimeout,window,arguments),clearTimeout)},b.setInterval=function(){return new e(d.call(setInterval,window,arguments),clearInterval)},b.clearTimeout=b.clearInterval=function(a){a&&a.close()},e.prototype.unref=e.prototype.ref=function(){},e.prototype.close=function(){this._clearFn.call(window,this._id)},b.enroll=function(a,b){clearTimeout(a._idleTimeoutId),a._idleTimeout=b},b.unenroll=function(a){clearTimeout(a._idleTimeoutId),a._idleTimeout=-1},b._unrefActive=b.active=function(a){clearTimeout(a._idleTimeoutId);var b=a._idleTimeout;b>=0&&(a._idleTimeoutId=setTimeout(function(){a._onTimeout&&a._onTimeout()},b))},c(6),b.setImmediate=setImmediate,b.clearImmediate=clearImmediate},function(a,b,c){(function(a,b){!function(a,c){"use strict";function i(a){"function"!=typeof a&&(a=new Function(""+a));for(var b=new Array(arguments.length-1),c=0;c<b.length;c++)b[c]=arguments[c+1];var f={callback:a,args:b};return e[d]=f,h(d),d++}function j(a){delete e[a]}function k(a){var b=a.callback,d=a.args;switch(d.length){case 0:b();break;case 1:b(d[0]);break;case 2:b(d[0],d[1]);break;case 3:b(d[0],d[1],d[2]);break;default:b.apply(c,d)}}function l(a){if(f)setTimeout(l,0,a);else{var b=e[a];if(b){f=!0;try{k(b)}finally{j(a),f=!1}}}}function m(){h=function(a){b.nextTick(function(){l(a)})}}function n(){if(a.postMessage&&!a.importScripts){var b=!0,c=a.onmessage;return a.onmessage=function(){b=!1},a.postMessage("","*"),a.onmessage=c,b}}function o(){var b="setImmediate$"+Math.random()+"$",c=function(c){c.source===a&&"string"==typeof c.data&&0===c.data.indexOf(b)&&l(+c.data.slice(b.length))};a.addEventListener?a.addEventListener("message",c,!1):a.attachEvent("onmessage",c),h=function(c){a.postMessage(b+c,"*")}}function p(){var a=new MessageChannel;a.port1.onmessage=function(a){l(a.data)},h=function(b){a.port2.postMessage(b)}}function q(){var a=g.documentElement;h=function(b){var c=g.createElement("script");c.onreadystatechange=function(){l(b),c.onreadystatechange=null,a.removeChild(c),c=null},a.appendChild(c)}}function r(){h=function(a){setTimeout(l,0,a)}}if(!a.setImmediate){var h,d=1,e={},f=!1,g=a.document,s=Object.getPrototypeOf&&Object.getPrototypeOf(a);s=s&&s.setTimeout?s:a,"[object process]"==={}.toString.call(a.process)?m():n()?o():a.MessageChannel?p():g&&"onreadystatechange"in g.createElement("script")?q():r(),s.setImmediate=i,s.clearImmediate=j}}("undefined"==typeof self?void 0===a?this:a:self)}).call(b,function(){return this}(),c(4))},function(a,b,c){(function(a){!function(b){"use strict";function g(a){if("string"!=typeof a&&(a=String(a)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(a))throw new TypeError("Invalid character in header field name");return a.toLowerCase()}function h(a){return"string"!=typeof a&&(a=String(a)),a}function i(a){var b={next:function(){var b=a.shift();return{done:void 0===b,value:b}}};return c.iterable&&(b[Symbol.iterator]=function(){return b}),b}function j(a){this.map={},a instanceof j?a.forEach(function(a,b){this.append(b,a)},this):a&&Object.getOwnPropertyNames(a).forEach(function(b){this.append(b,a[b])},this)}function k(b){if(b.bodyUsed)return a.reject(new TypeError("Already read"));b.bodyUsed=!0}function l(b){return new a(function(a,c){b.onload=function(){a(b.result)},b.onerror=function(){c(b.error)}})}function m(a){var b=new FileReader,c=l(b);return b.readAsArrayBuffer(a),c}function n(a){var b=new FileReader,c=l(b);return b.readAsText(a),c}function o(a){for(var b=new Uint8Array(a),c=new Array(b.length),d=0;d<b.length;d++)c[d]=String.fromCharCode(b[d]);return c.join("")}function p(a){if(a.slice)return a.slice(0);var b=new Uint8Array(a.byteLength);return b.set(new Uint8Array(a)),b.buffer}function q(){return this.bodyUsed=!1,this._initBody=function(a){if(this._bodyInit=a,a)if("string"==typeof a)this._bodyText=a;else if(c.blob&&Blob.prototype.isPrototypeOf(a))this._bodyBlob=a;else if(c.formData&&FormData.prototype.isPrototypeOf(a))this._bodyFormData=a;else if(c.searchParams&&URLSearchParams.prototype.isPrototypeOf(a))this._bodyText=a.toString();else if(c.arrayBuffer&&c.blob&&e(a))this._bodyArrayBuffer=p(a.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!c.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(a)&&!f(a))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=p(a)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof a?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):c.searchParams&&URLSearchParams.prototype.isPrototypeOf(a)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},c.blob&&(this.blob=function(){var b=k(this);if(b)return b;if(this._bodyBlob)return a.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return a.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return a.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?k(this)||a.resolve(this._bodyArrayBuffer):this.blob().then(m)}),this.text=function(){var b=k(this);if(b)return b;if(this._bodyBlob)return n(this._bodyBlob);if(this._bodyArrayBuffer)return a.resolve(o(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return a.resolve(this._bodyText)},c.formData&&(this.formData=function(){return this.text().then(u)}),this.json=function(){return this.text().then(JSON.parse)},this}function s(a){var b=a.toUpperCase();return r.indexOf(b)>-1?b:a}function t(a,b){b=b||{};var c=b.body;if("string"==typeof a)this.url=a;else{if(a.bodyUsed)throw new TypeError("Already read");this.url=a.url,this.credentials=a.credentials,b.headers||(this.headers=new j(a.headers)),this.method=a.method,this.mode=a.mode,c||null==a._bodyInit||(c=a._bodyInit,a.bodyUsed=!0)}if(this.credentials=b.credentials||this.credentials||"omit",!b.headers&&this.headers||(this.headers=new j(b.headers)),this.method=s(b.method||this.method||"GET"),this.mode=b.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&c)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(c)}function u(a){var b=new FormData;return a.trim().split("&").forEach(function(a){if(a){var c=a.split("="),d=c.shift().replace(/\+/g," "),e=c.join("=").replace(/\+/g," ");b.append(decodeURIComponent(d),decodeURIComponent(e))}}),b}function v(a){var b=new j;return a.split("\r\n").forEach(function(a){var c=a.split(":"),d=c.shift().trim();if(d){var e=c.join(":").trim();b.append(d,e)}}),b}function w(a,b){b||(b={}),this.type="default",this.status="status"in b?b.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in b?b.statusText:"OK",this.headers=new j(b.headers),this.url=b.url||"",this._initBody(a)}if(!b.fetch){var c={searchParams:"URLSearchParams"in b,iterable:"Symbol"in b&&"iterator"in Symbol,blob:"FileReader"in b&&"Blob"in b&&function(){try{return new Blob,!0}catch(a){return!1}}(),formData:"FormData"in b,arrayBuffer:"ArrayBuffer"in b};if(c.arrayBuffer)var d=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],e=function(a){return a&&DataView.prototype.isPrototypeOf(a)},f=ArrayBuffer.isView||function(a){return a&&d.indexOf(Object.prototype.toString.call(a))>-1};j.prototype.append=function(a,b){a=g(a),b=h(b);var c=this.map[a];this.map[a]=c?c+","+b:b},j.prototype.delete=function(a){delete this.map[g(a)]},j.prototype.get=function(a){return a=g(a),this.has(a)?this.map[a]:null},j.prototype.has=function(a){return this.map.hasOwnProperty(g(a))},j.prototype.set=function(a,b){this.map[g(a)]=h(b)},j.prototype.forEach=function(a,b){for(var c in this.map)this.map.hasOwnProperty(c)&&a.call(b,this.map[c],c,this)},j.prototype.keys=function(){var a=[];return this.forEach(function(b,c){a.push(c)}),i(a)},j.prototype.values=function(){var a=[];return this.forEach(function(b){a.push(b)}),i(a)},j.prototype.entries=function(){var a=[];return this.forEach(function(b,c){a.push([c,b])}),i(a)},c.iterable&&(j.prototype[Symbol.iterator]=j.prototype.entries);var r=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];t.prototype.clone=function(){return new t(this,{body:this._bodyInit})},q.call(t.prototype),q.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new j(this.headers),url:this.url})},w.error=function(){var a=new w(null,{status:0,statusText:""});return a.type="error",a};var x=[301,302,303,307,308];w.redirect=function(a,b){if(-1===x.indexOf(b))throw new RangeError("Invalid status code");return new w(null,{status:b,headers:{location:a}})},b.Headers=j,b.Request=t,b.Response=w,b.fetch=function(b,d){return new a(function(a,e){var f=new t(b,d),g=new XMLHttpRequest;g.onload=function(){var b={status:g.status,statusText:g.statusText,headers:v(g.getAllResponseHeaders()||"")};b.url="responseURL"in g?g.responseURL:b.headers.get("X-Request-URL");var c="response"in g?g.response:g.responseText;a(new w(c,b))},g.onerror=function(){e(new TypeError("Network request failed"))},g.ontimeout=function(){e(new TypeError("Network request failed"))},g.open(f.method,f.url,!0),"include"===f.credentials&&(g.withCredentials=!0),"responseType"in g&&c.blob&&(g.responseType="blob"),f.headers.forEach(function(a,b){g.setRequestHeader(b,a)}),g.send(void 0===f._bodyInit?null:f._bodyInit)})},b.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)}).call(b,c(3))}]);