!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1877)}({111:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},112:function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},113:function(t,e,n){n(363);for(var r=n(34),o=n(60),i=n(77),a=n(38)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),c=0;cdocument.F=Object<\/script>"),t.close(),c=t.F;r--;)delete c.prototype[i[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[a]=t):n=c(),void 0===e?n:o(n,e)}},118:function(t,e,n){var r=n(111),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},119:function(t,e,n){var r=n(120)("keys"),o=n(96);t.exports=function(t){return r[t]||(r[t]=o(t))}},120:function(t,e,n){var r=n(34),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});t.exports=function(t){return o[t]||(o[t]={})}},121:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},122:function(t,e,n){var r=n(46).f,o=n(61),i=n(38)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},124:function(t,e){e.f={}.propertyIsEnumerable},135:function(t,e){t.exports=!0},136:function(t,e,n){var r=n(35),o=n(34).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},137:function(t,e,n){var r=n(96)("meta"),o=n(35),i=n(61),a=n(46).f,s=0,c=Object.isExtensible||function(){return!0},u=!n(58)(function(){return c(Object.preventExtensions({}))}),l=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},f=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!c(t))return"F";if(!e)return"E";l(t)}return t[r].i},getWeak:function(t,e){if(!i(t,r)){if(!c(t))return!0;if(!e)return!1;l(t)}return t[r].w},onFreeze:function(t){return u&&f.NEED&&c(t)&&!i(t,r)&&l(t),t}}},14:function(t,e,n){t.exports={default:n(219),__esModule:!0}},149:function(t,e,n){"use strict";e.__esModule=!0;var r=i(n(393)),o=i(n(20));function i(t){return t&&t.__esModule?t:{default:t}}e.default=function(){return function(t,e){if(Array.isArray(t))return t;if((0,r.default)(Object(t)))return function(t,e){var n=[],r=!0,i=!1,a=void 0;try{for(var s,c=(0,o.default)(t);!(r=(s=c.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,a=t}finally{try{!r&&c.return&&c.return()}finally{if(i)throw a}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},15:function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},161:function(t,e,n){t.exports=!n(44)&&!n(58)(function(){return 7!=Object.defineProperty(n(136)("div"),"a",{get:function(){return 7}}).a})},162:function(t,e,n){var r=n(61),o=n(59),i=n(213)(!1),a=n(119)("IE_PROTO");t.exports=function(t,e){var n,s=o(t),c=0,u=[];for(n in s)n!=a&&r(s,n)&&u.push(n);for(;e.length>c;)r(s,n=e[c++])&&(~i(u,n)||u.push(n));return u}},163:function(t,e,n){var r=n(95);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},164:function(t,e,n){var r=n(95),o=n(38)("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:i?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},166:function(t,e,n){e.f=n(38)},167:function(t,e,n){var r=n(34),o=n(18),i=n(135),a=n(166),s=n(46).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},18:function(t,e){var n=t.exports={version:"2.5.1"};"number"==typeof __e&&(__e=n)},185:function(t,e,n){"use strict";var r=n(135),o=n(26),i=n(212),a=n(60),s=n(61),c=n(77),u=n(354),l=n(122),f=n(215),p=n(38)("iterator"),h=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(t,e,n,_,v,y,m){u(n,e,_);var g,b,w,x=function(t){if(!h&&t in C)return C[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},j=e+" Iterator",k="values"==v,E=!1,C=t.prototype,O=C[p]||C["@@iterator"]||v&&C[v],S=O||x(v),T=v?k?x("entries"):S:void 0,F="Array"==e&&C.entries||O;if(F&&(w=f(F.call(new t)))!==Object.prototype&&w.next&&(l(w,j,!0),r||s(w,p)||a(w,p,d)),k&&O&&"values"!==O.name&&(E=!0,S=function(){return O.call(this)}),r&&!m||!h&&!E&&C[p]||a(C,p,S),c[e]=S,c[j]=d,v)if(g={values:k?S:x("values"),keys:y?S:x("keys"),entries:T},m)for(b in g)b in C||i(C,b,g[b]);else o(o.P+o.F*(h||E),e,g);return g}},186:function(t,e,n){var r=n(164),o=n(38)("iterator"),i=n(77);t.exports=n(18).getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},187:function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(218),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(15))},1877:function(t,e,n){"use strict";var r=new(n(1878).IndexedDBStoreWorker)(postMessage);onmessage=r.onMessage},1878:function(t,e,n){"use strict";t.exports.IndexedDBStoreWorker=n(1879)},1879:function(t,e,n){"use strict";var r=c(n(51)),o=c(n(4)),i=c(n(5)),a=c(n(9)),s=c(n(396));function c(t){return t&&t.__esModule?t:{default:t}}var u=function(){function t(e){(0,o.default)(this,t),this.backend=null,this.postMessage=e,this.onMessage=this.onMessage.bind(this)}return(0,i.default)(t,[{key:"onMessage",value:function(t){var e,n,o=this,i=t.data,c=void 0;switch(i.command){case"_setupWorker":this.backend=new s.default(indexedDB,i.args[0]),c=a.default.resolve();break;case"connect":c=this.backend.connect();break;case"isNewlyCreated":c=this.backend.isNewlyCreated();break;case"clearDatabase":c=this.backend.clearDatabase().then(function(t){return{}});break;case"getSavedSync":c=this.backend.getSavedSync(!1);break;case"setSyncData":c=(e=this.backend).setSyncData.apply(e,(0,r.default)(i.args));break;case"syncToDatabase":c=(n=this.backend).syncToDatabase.apply(n,(0,r.default)(i.args)).then(function(){return{}});break;case"getUserPresenceEvents":c=this.backend.getUserPresenceEvents();break;case"getNextBatchToken":c=this.backend.getNextBatchToken();break;case"getOutOfBandMembers":c=this.backend.getOutOfBandMembers(i.args[0]);break;case"clearOutOfBandMembers":c=this.backend.clearOutOfBandMembers(i.args[0]);break;case"setOutOfBandMembers":c=this.backend.setOutOfBandMembers(i.args[0],i.args[1]);break;case"getClientOptions":c=this.backend.getClientOptions();break;case"storeClientOptions":c=this.backend.storeClientOptions(i.args[0])}void 0!==c?c.done(function(t){o.postMessage.call(null,{command:"cmd_success",seq:i.seq,result:t})},function(t){console.error("Error running command: "+i.command),console.error(t),o.postMessage.call(null,{command:"cmd_fail",seq:i.seq,error:{message:t.message,name:t.name}})}):this.postMessage({command:"cmd_fail",seq:i.seq,error:"Unrecognised command"})}}]),t}();t.exports=u},189:function(t,e){e.f=Object.getOwnPropertySymbols},19:function(t,e,n){t.exports=n(216)},190:function(t,e){},20:function(t,e,n){t.exports={default:n(391),__esModule:!0}},211:function(t,e,n){t.exports={default:n(352),__esModule:!0}},212:function(t,e,n){t.exports=n(60)},213:function(t,e,n){var r=n(59),o=n(118),i=n(214);t.exports=function(t){return function(e,n,a){var s,c=r(e),u=o(c.length),l=i(a,u);if(t&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}}},214:function(t,e,n){var r=n(111),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},215:function(t,e,n){var r=n(61),o=n(87),i=n(119)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},216:function(t,e,n){var r=function(){return this}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,i=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=n(217),o)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},217:function(t,e){!function(e){"use strict";var n,r=Object.prototype,o=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag",u="object"==typeof t,l=e.regeneratorRuntime;if(l)u&&(t.exports=l);else{(l=e.regeneratorRuntime=u?t.exports:{}).wrap=b;var f="suspendedStart",p="suspendedYield",h="executing",d="completed",_={},v={};v[a]=function(){return this};var y=Object.getPrototypeOf,m=y&&y(y(P([])));m&&m!==r&&o.call(m,a)&&(v=m);var g=k.prototype=x.prototype=Object.create(v);j.prototype=g.constructor=k,k.constructor=j,k[c]=j.displayName="GeneratorFunction",l.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===j||"GeneratorFunction"===(e.displayName||e.name))},l.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,k):(t.__proto__=k,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(g),t},l.awrap=function(t){return{__await:t}},E(C.prototype),C.prototype[s]=function(){return this},l.AsyncIterator=C,l.async=function(t,e,n,r){var o=new C(b(t,e,n,r));return l.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},E(g),g[c]="Generator",g[a]=function(){return this},g.toString=function(){return"[object Generator]"},l.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},l.values=P,F.prototype={constructor:F,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,o){return s.type="throw",s.arg=t,e.next=r,o&&(e.method="next",e.arg=n),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),_}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),_}}}function b(t,e,n,r){var o=e&&e.prototype instanceof x?e:x,i=Object.create(o.prototype),a=new F(r||[]);return i._invoke=function(t,e,n){var r=f;return function(o,i){if(r===h)throw new Error("Generator is already running");if(r===d){if("throw"===o)throw i;return R()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=O(a,n);if(s){if(s===_)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var c=w(t,e,n);if("normal"===c.type){if(r=n.done?d:p,c.arg===_)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=d,n.method="throw",n.arg=c.arg)}}}(t,n,a),i}function w(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function x(){}function j(){}function k(){}function E(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function C(t){var e;this._invoke=function(n,r){function i(){return new Promise(function(e,i){!function e(n,r,i,a){var s=w(t[n],t,r);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&o.call(u,"__await")?Promise.resolve(u.__await).then(function(t){e("next",t,i,a)},function(t){e("throw",t,i,a)}):Promise.resolve(u).then(function(t){c.value=t,i(c)},a)}a(s.arg)}(n,r,e,i)})}return e=e?e.then(i,i):i()}}function O(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,O(t,e),"throw"===e.method))return _;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return _}var o=w(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,_;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,_):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,_)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function P(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++rc;)r.f(t,n=a[c++],e[n]);return t}},272:function(t,e,n){var r=n(34).document;t.exports=r&&r.documentElement},273:function(t,e,n){var r=n(52);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&r(i.call(t)),e}}},274:function(t,e,n){var r=n(77),o=n(38)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},275:function(t,e,n){var r=n(38)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},t(i)}catch(t){}return n}},276:function(t,e,n){var r=n(59),o=n(225).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(t){return a.slice()}}(t):o(r(t))}},277:function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},278:function(t,e,n){var r=n(95);t.exports=Array.isArray||function(t){return"Array"==r(t)}},285:function(t,e,n){"use strict";var r=c(n(67)),o=c(n(14)),i=c(n(4)),a=c(n(5)),s=c(n(29));function c(t){return t&&t.__esModule?t:{default:t}}var u=function(){function t(e){(0,i.default)(this,t),(e=e||{}).maxTimelineEntries=e.maxTimelineEntries||50,this.opts=e,this.accountData={},this.inviteRooms={},this.joinRooms={},this.nextBatch=null,this.groups={invite:{},join:{},leave:{}}}return(0,a.default)(t,[{key:"accumulate",value:function(t){this._accumulateRooms(t),this._accumulateGroups(t),this._accumulateAccountData(t),this.nextBatch=t.next_batch}},{key:"_accumulateAccountData",value:function(t){var e=this;t.account_data&&t.account_data.events&&t.account_data.events.forEach(function(t){e.accountData[t.type]=t})}},{key:"_accumulateRooms",value:function(t){var e=this;t.rooms&&(t.rooms.invite&&(0,o.default)(t.rooms.invite).forEach(function(n){e._accumulateRoom(n,"invite",t.rooms.invite[n])}),t.rooms.join&&(0,o.default)(t.rooms.join).forEach(function(n){e._accumulateRoom(n,"join",t.rooms.join[n])}),t.rooms.leave&&(0,o.default)(t.rooms.leave).forEach(function(n){e._accumulateRoom(n,"leave",t.rooms.leave[n])}))}},{key:"_accumulateRoom",value:function(t,e,n){switch(e){case"invite":this._accumulateInviteState(t,n);break;case"join":this.inviteRooms[t]&&delete this.inviteRooms[t],this._accumulateJoinState(t,n);break;case"leave":this.inviteRooms[t]?delete this.inviteRooms[t]:delete this.joinRooms[t];break;default:console.error("Unknown cateogory: ",e)}}},{key:"_accumulateInviteState",value:function(t,e){if(e.invite_state&&e.invite_state.events)if(this.inviteRooms[t]){var n=this.inviteRooms[t];e.invite_state.events.forEach(function(t){for(var e=!1,r=0;rthis.opts.maxTimelineEntries)for(var s=n._timeline.length-this.opts.maxTimelineEntries;s0&&a.ephemeral.events.push(c),i._timeline.forEach(function(t){if(!a.timeline.prev_batch){if(!t.token)return;a.timeline.prev_batch=t.token}a.timeline.events.push(t.event)});for(var u=(0,r.default)(null),f=a.timeline.events.length-1;f>=0;f--){var p=a.timeline.events[f];if(null!==p.state_key&&void 0!==p.state_key){var h=s.default.deepCopy(p);h.unsigned&&(h.unsigned.prev_content&&(h.content=h.unsigned.prev_content),h.unsigned.prev_sender&&(h.sender=h.unsigned.prev_sender)),l(u,h)}}(0,o.default)(i._currentState).forEach(function(t){(0,o.default)(i._currentState[t]).forEach(function(e){var n=i._currentState[t][e];u[t]&&u[t][e]&&(n=u[t][e]),a.state.events.push(n)})}),e.join[n]=a});var n=[];return(0,o.default)(this.accountData).forEach(function(e){n.push(t.accountData[e])}),{nextBatch:this.nextBatch,roomsData:e,groupsData:this.groups,accountData:n}}},{key:"getNextBatchToken",value:function(){return this.nextBatch}}]),t}();function l(t,e){null!==e.state_key&&void 0!==e.state_key&&e.type&&(t[e.type]||(t[e.type]=(0,r.default)(null)),t[e.type][e.state_key]=e)}t.exports=u},29:function(t,e,n){"use strict";var r=a(n(67)),o=a(n(64)),i=a(n(31));function a(t){return t&&t.__esModule?t:{default:t}}t.exports.encodeParams=function(t){var e="";for(var n in t)t.hasOwnProperty(n)&&(e+="&"+encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e.substring(1)},t.exports.encodeUri=function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t=t.replace(n,encodeURIComponent(e[n])));return t},t.exports.map=function(t,e){for(var n=new Array(t.length),r=0;r=0;r--)if(e(t[r],r,t))return t[r]}else for(r=0;r=0;r--)if(e(t[r],r,t))return o=t[r],t.splice(r,1),o}else for(r=0;r>>0;if("function"!=typeof t)throw new TypeError;for(var r=[],o=arguments.length>=2?arguments[1]:void 0,i=0;i>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");arguments.length>1&&(n=e);var a=new Array(i);for(r=0;r>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(arguments.length>1&&(n=e),r=0;r1){var i=Object(arguments[1]);for(var a in i)e.call(i,a)&&(r[a]=i[a])}return r}}()),t.super_=e,t.prototype=(0,r.default)(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})},t.exports.isNumber=function(t){return"number"==typeof t&&isFinite(t)},t.exports.removeHiddenChars=function(t){return t.normalize("NFD").replace(c,"")};var c=/[\u200B-\u200D\u0300-\u036f\uFEFF\s]/g},31:function(t,e,n){t.exports={default:n(390),__esModule:!0}},34:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},35:function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},352:function(t,e,n){n(86),n(355),t.exports=n(18).Array.from},353:function(t,e,n){var r=n(111),o=n(112);t.exports=function(t){return function(e,n){var i,a,s=String(o(e)),c=r(n),u=s.length;return c<0||c>=u?t?"":void 0:(i=s.charCodeAt(c))<55296||i>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?t?s.charAt(c):i:t?s.slice(c,c+2):a-56320+(i-55296<<10)+65536}}},354:function(t,e,n){"use strict";var r=n(117),o=n(76),i=n(122),a={};n(60)(a,n(38)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},355:function(t,e,n){"use strict";var r=n(66),o=n(26),i=n(87),a=n(273),s=n(274),c=n(118),u=n(356),l=n(186);o(o.S+o.F*!n(275)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,o,f,p=i(t),h="function"==typeof this?this:Array,d=arguments.length,_=d>1?arguments[1]:void 0,v=void 0!==_,y=0,m=l(p);if(v&&(_=r(_,d>2?arguments[2]:void 0,2)),void 0==m||h==Array&&s(m))for(n=new h(e=c(p.length));e>y;y++)u(n,y,v?_(p[y],y):p[y]);else for(f=m.call(p),n=new h;!(o=f.next()).done;y++)u(n,y,v?a(f,_,[o.value,y],!0):o.value);return n.length=y,n}})},356:function(t,e,n){"use strict";var r=n(46),o=n(76);t.exports=function(t,e,n){e in t?r.f(t,e,o(0,n)):t[e]=n}},357:function(t,e,n){n(358);var r=n(18).Object;t.exports=function(t,e){return r.create(t,e)}},358:function(t,e,n){var r=n(26);r(r.S,"Object",{create:n(117)})},359:function(t,e,n){n(360);var r=n(18).Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},360:function(t,e,n){var r=n(26);r(r.S+r.F*!n(44),"Object",{defineProperty:n(46).f})},361:function(t,e,n){t.exports={default:n(362),__esModule:!0}},362:function(t,e,n){n(86),n(113),t.exports=n(166).f("iterator")},363:function(t,e,n){"use strict";var r=n(364),o=n(277),i=n(77),a=n(59);t.exports=n(185)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},364:function(t,e){t.exports=function(){}},365:function(t,e,n){t.exports={default:n(366),__esModule:!0}},366:function(t,e,n){n(367),n(190),n(369),n(370),t.exports=n(18).Symbol},367:function(t,e,n){"use strict";var r=n(34),o=n(61),i=n(44),a=n(26),s=n(212),c=n(137).KEY,u=n(58),l=n(120),f=n(122),p=n(96),h=n(38),d=n(166),_=n(167),v=n(368),y=n(278),m=n(52),g=n(59),b=n(116),w=n(76),x=n(117),j=n(276),k=n(224),E=n(46),C=n(78),O=k.f,S=E.f,T=j.f,F=r.Symbol,P=r.JSON,R=P&&P.stringify,A=h("_hidden"),D=h("toPrimitive"),L={}.propertyIsEnumerable,I=l("symbol-registry"),M=l("symbols"),N=l("op-symbols"),B=Object.prototype,V="function"==typeof F,U=r.QObject,H=!U||!U.prototype||!U.prototype.findChild,G=i&&u(function(){return 7!=x(S({},"a",{get:function(){return S(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=O(B,e);r&&delete B[e],S(t,e,n),r&&t!==B&&S(B,e,r)}:S,q=function(t){var e=M[t]=x(F.prototype);return e._k=t,e},$=V&&"symbol"==typeof F.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof F},Q=function(t,e,n){return t===B&&Q(N,e,n),m(t),e=b(e,!0),m(n),o(M,e)?(n.enumerable?(o(t,A)&&t[A][e]&&(t[A][e]=!1),n=x(n,{enumerable:w(0,!1)})):(o(t,A)||S(t,A,w(1,{})),t[A][e]=!0),G(t,e,n)):S(t,e,n)},W=function(t,e){m(t);for(var n,r=v(e=g(e)),o=0,i=r.length;i>o;)Q(t,n=r[o++],e[n]);return t},z=function(t){var e=L.call(this,t=b(t,!0));return!(this===B&&o(M,t)&&!o(N,t))&&(!(e||!o(this,t)||!o(M,t)||o(this,A)&&this[A][t])||e)},K=function(t,e){if(t=g(t),e=b(e,!0),t!==B||!o(M,e)||o(N,e)){var n=O(t,e);return!n||!o(M,e)||o(t,A)&&t[A][e]||(n.enumerable=!0),n}},X=function(t){for(var e,n=T(g(t)),r=[],i=0;n.length>i;)o(M,e=n[i++])||e==A||e==c||r.push(e);return r},J=function(t){for(var e,n=t===B,r=T(n?N:g(t)),i=[],a=0;r.length>a;)!o(M,e=r[a++])||n&&!o(B,e)||i.push(M[e]);return i};V||(s((F=function(){if(this instanceof F)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===B&&e.call(N,n),o(this,A)&&o(this[A],t)&&(this[A][t]=!1),G(this,t,w(1,n))};return i&&H&&G(B,t,{configurable:!0,set:e}),q(t)}).prototype,"toString",function(){return this._k}),k.f=K,E.f=Q,n(225).f=j.f=X,n(124).f=z,n(189).f=J,i&&!n(135)&&s(B,"propertyIsEnumerable",z,!0),d.f=function(t){return q(h(t))}),a(a.G+a.W+a.F*!V,{Symbol:F});for(var Y="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Z=0;Y.length>Z;)h(Y[Z++]);for(var tt=C(h.store),et=0;tt.length>et;)_(tt[et++]);a(a.S+a.F*!V,"Symbol",{for:function(t){return o(I,t+="")?I[t]:I[t]=F(t)},keyFor:function(t){if(!$(t))throw TypeError(t+" is not a symbol!");for(var e in I)if(I[e]===t)return e},useSetter:function(){H=!0},useSimple:function(){H=!1}}),a(a.S+a.F*!V,"Object",{create:function(t,e){return void 0===e?x(t):W(x(t),e)},defineProperty:Q,defineProperties:W,getOwnPropertyDescriptor:K,getOwnPropertyNames:X,getOwnPropertySymbols:J}),P&&a(a.S+a.F*(!V||u(function(){var t=F();return"[null]"!=R([t])||"{}"!=R({a:t})||"{}"!=R(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!$(t)){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);return"function"==typeof(e=r[1])&&(n=e),!n&&y(e)||(e=function(t,e){if(n&&(e=n.call(this,t,e)),!$(e))return e}),r[1]=e,R.apply(P,r)}}}),F.prototype[D]||n(60)(F.prototype,D,F.prototype.valueOf),f(F,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},368:function(t,e,n){var r=n(78),o=n(189),i=n(124);t.exports=function(t){var e=r(t),n=o.f;if(n)for(var a,s=n(t),c=i.f,u=0;s.length>u;)c.call(t,a=s[u++])&&e.push(a);return e}},369:function(t,e,n){n(167)("asyncIterator")},370:function(t,e,n){n(167)("observable")},38:function(t,e,n){var r=n(120)("wks"),o=n(96),i=n(34).Symbol,a="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))}).store=r},390:function(t,e,n){var r=n(18),o=r.JSON||(r.JSON={stringify:JSON.stringify});t.exports=function(t){return o.stringify.apply(o,arguments)}},391:function(t,e,n){n(113),n(86),t.exports=n(392)},392:function(t,e,n){var r=n(52),o=n(186);t.exports=n(18).getIterator=function(t){var e=o(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return r(e.call(t))}},393:function(t,e,n){t.exports={default:n(394),__esModule:!0}},394:function(t,e,n){n(113),n(86),t.exports=n(395)},395:function(t,e,n){var r=n(164),o=n(38)("iterator"),i=n(77);t.exports=n(18).isIterable=function(t){var e=Object(t);return void 0!==e[o]||"@@iterator"in e||i.hasOwnProperty(r(e))}},396:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=l(n(20)),o=l(n(19)),i=n(9),a=l(i),s=l(n(149)),c=l(n(285)),u=l(n(29));function l(t){return t&&t.__esModule?t:{default:t}}function f(t,e,n){var r=t.openCursor(e);return new a.default(function(t,e){var o=[];r.onerror=function(t){e(new Error("Query failed: "+t.target.errorCode))},r.onsuccess=function(e){var r=e.target.result;r?(o.push(n(r)),r.continue()):t(o)}})}function p(t){return new a.default(function(e,n){t.oncomplete=function(t){e(t)},t.onerror=function(t){n(t.target.error)}})}function h(t){return new a.default(function(e,n){t.onsuccess=function(t){e(t)},t.onerror=function(t){n(t.target.error)}})}function d(t){return new a.default(function(e,n){t.onsuccess=function(){return e(t)},t.onerror=function(t){return n(t)}})}function _(t){return h(t).then(function(t){return t.target.result})}var v=function(t,e){this.indexedDB=t,this._dbName="matrix-js-sdk:"+(e||"default"),this.db=null,this._disconnected=!0,this._syncAccumulator=new c.default,this._isNewlyCreated=!1};v.prototype={connect:function(){var t=this;if(!this._disconnected)return console.log("LocalIndexedDBStoreBackend.connect: already connected or connecting"),a.default.resolve();this._disconnected=!1,console.log("LocalIndexedDBStoreBackend.connect: connecting...");var e=this.indexedDB.open(this._dbName,3);return e.onupgradeneeded=function(e){var n=e.target.result,r=e.oldVersion;console.log("LocalIndexedDBStoreBackend.connect: upgrading from "+r),r<1&&(t._isNewlyCreated=!0,function(t){t.createObjectStore("users",{keyPath:["userId"]}),t.createObjectStore("accountData",{keyPath:["type"]}),t.createObjectStore("sync",{keyPath:["clobber"]})}(n)),r<2&&function(t){t.createObjectStore("oob_membership_events",{keyPath:["room_id","state_key"]}).createIndex("room","room_id")}(n),r<3&&function(t){t.createObjectStore("client_options",{keyPath:["clobber"]})}(n)},e.onblocked=function(){console.log("can't yet open LocalIndexedDBStoreBackend because it is open elsewhere")},console.log("LocalIndexedDBStoreBackend.connect: awaiting connection..."),h(e).then(function(e){return console.log("LocalIndexedDBStoreBackend.connect: connected"),t.db=e.target.result,t.db.onversionchange=function(){t.db.close()},t._init()})},isNewlyCreated:function(){return a.default.resolve(this._isNewlyCreated)},_init:function(){var t=this;return a.default.all([this._loadAccountData(),this._loadSyncData()]).then(function(e){var n=(0,s.default)(e,2),r=n[0],o=n[1];console.log("LocalIndexedDBStoreBackend: loaded initial data"),t._syncAccumulator.accumulate({next_batch:o.nextBatch,rooms:o.roomsData,groups:o.groupsData,account_data:{events:r}})})},getOutOfBandMembers:function(t){var e=this;return new a.default(function(n,r){var o=e.db.transaction(["oob_membership_events"],"readonly").objectStore("oob_membership_events").index("room"),i=IDBKeyRange.only(t),a=o.openCursor(i),s=[],c=!1;a.onsuccess=function(t){var e=t.target.result;if(!e)return s.length||c?n(s):n(null);var r=e.value;r.oob_written?c=!0:s.push(r),e.continue()},a.onerror=function(t){r(t)}}).then(function(e){return console.log("LL: got "+(e&&e.length)+" membershipEvents from storage for room "+t+" ..."),e})},setOutOfBandMembers:function(){var t=(0,i.coroutine)(o.default.mark(function t(e,n){var r,a,s;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return console.log("LL: backend about to store "+n.length+" members for "+e),r=this.db.transaction(["oob_membership_events"],"readwrite"),a=r.objectStore("oob_membership_events"),n.forEach(function(t){a.put(t)}),s={room_id:e,oob_written:!0,state_key:0},a.put(s),t.next=8,(0,i.resolve)(p(r));case 8:console.log("LL: backend done storing for "+e+"!");case 9:case"end":return t.stop()}},t,this)}));return function(e,n){return t.apply(this,arguments)}}(),clearOutOfBandMembers:function(){var t=(0,i.coroutine)(o.default.mark(function t(e){var n,r,c,u,l,f,p,h,v,y,m,g,b;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.db.transaction(["oob_membership_events"],"readonly"),r=n.objectStore("oob_membership_events"),c=r.index("room"),u=IDBKeyRange.only(e),l=_(c.openKeyCursor(u,"next")).then(function(t){return t&&t.primaryKey[1]}),f=_(c.openKeyCursor(u,"prev")).then(function(t){return t&&t.primaryKey[1]}),t.next=8,(0,i.resolve)(a.default.all([l,f]));case 8:return p=t.sent,h=(0,s.default)(p,2),v=h[0],y=h[1],m=this.db.transaction(["oob_membership_events"],"readwrite"),g=m.objectStore("oob_membership_events"),b=IDBKeyRange.bound([e,v],[e,y]),console.log("LL: Deleting all users + marker in storage for room "+e+", with key range:",[e,v],[e,y]),t.next=18,(0,i.resolve)(d(g.delete(b)));case 18:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),clearDatabase:function(){var t=this;return new a.default(function(e,n){console.log("Removing indexeddb instance: "+t._dbName);var r=t.indexedDB.deleteDatabase(t._dbName);r.onblocked=function(){console.log("can't yet delete indexeddb "+t._dbName+" because it is open elsewhere")},r.onerror=function(t){console.warn("unable to delete js-sdk store indexeddb: "+t.target.error),e()},r.onsuccess=function(){console.log("Removed indexeddb instance: "+t._dbName),e()}})},getSavedSync:function(t){void 0===t&&(t=!0);var e=this._syncAccumulator.getJSON();return e.nextBatch?t?a.default.resolve(u.default.deepCopy(e)):a.default.resolve(e):a.default.resolve(null)},getNextBatchToken:function(){return a.default.resolve(this._syncAccumulator.getNextBatchToken())},setSyncData:function(t){var e=this;return a.default.resolve().then(function(){e._syncAccumulator.accumulate(t)})},syncToDatabase:function(t){var e=this._syncAccumulator.getJSON();return a.default.all([this._persistUserPresenceEvents(t),this._persistAccountData(e.accountData),this._persistSyncData(e.nextBatch,e.roomsData,e.groupsData)])},_persistSyncData:function(t,e,n){var r=this;return console.log("Persisting sync data up to ",t),a.default.try(function(){var o=r.db.transaction(["sync"],"readwrite");return o.objectStore("sync").put({clobber:"-",nextBatch:t,roomsData:e,groupsData:n}),p(o)})},_persistAccountData:function(t){var e=this;return a.default.try(function(){for(var n=e.db.transaction(["accountData"],"readwrite"),r=n.objectStore("accountData"),o=0;o1&&console.warn("loadSyncData: More than 1 sync row found."),t.length>0?t[0]:{}})})},getClientOptions:function(){var t=this;return a.default.resolve().then(function(){return f(t.db.transaction(["client_options"],"readonly").objectStore("client_options"),void 0,function(t){if(t.value&&t.value&&t.value.options)return t.value.options}).then(function(t){return t[0]})})},storeClientOptions:function(){var t=(0,i.coroutine)(o.default.mark(function t(e){var n;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.db.transaction(["client_options"],"readwrite"),n.objectStore("client_options").put({clobber:"-",options:e}),t.next=5,(0,i.resolve)(p(n));case 5:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},e.default=v},4:function(t,e,n){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},44:function(t,e,n){t.exports=!n(58)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},46:function(t,e,n){var r=n(52),o=n(161),i=n(116),a=Object.defineProperty;e.f=n(44)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},5:function(t,e,n){"use strict";e.__esModule=!0;var r=function(t){return t&&t.__esModule?t:{default:t}}(n(223));e.default=function(){function t(t,e){for(var n=0;n1)for(var n=1;n=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},87:function(t,e,n){var r=n(112);t.exports=function(t){return Object(r(t))}},9:function(t,e,n){(function(e,n,r){t.exports=function(){var t,o,i;return function t(e,n,r){function o(a,s){if(!n[a]){if(!e[a]){var c="function"==typeof _dereq_&&_dereq_;if(!s&&c)return c(a,!0);if(i)return i(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[a]={exports:{}};e[a][0].call(l.exports,function(t){var n=e[a][1][t];return o(n||t)},l,l.exports,t,e,n,r)}return n[a].exports}for(var i="function"==typeof _dereq_&&_dereq_,a=0;a0;)h(t)}function h(t){var e=t.shift();if("function"!=typeof e)e._settlePromises();else{var n=t.shift(),r=t.shift();e.call(n,r)}}c.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},c.prototype.hasCustomScheduler=function(){return this._customScheduler},c.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},c.prototype.disableTrampolineIfNecessary=function(){s.hasDevTools&&(this._trampolineEnabled=!1)},c.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},c.prototype.fatalError=function(t,n){n?(e.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),e.exit(2)):this.throwLater(t)},c.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(t){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},s.hasDevTools?(c.prototype.invokeLater=function(t,e,n){this._trampolineEnabled?u.call(this,t,e,n):this._schedule(function(){setTimeout(function(){t.call(e,n)},100)})},c.prototype.invoke=function(t,e,n){this._trampolineEnabled?l.call(this,t,e,n):this._schedule(function(){t.call(e,n)})},c.prototype.settlePromises=function(t){this._trampolineEnabled?f.call(this,t):this._schedule(function(){t._settlePromises()})}):(c.prototype.invokeLater=u,c.prototype.invoke=l,c.prototype.settlePromises=f),c.prototype._drainQueues=function(){p(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,p(this._lateQueue)},c.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},c.prototype._reset=function(){this._isTickUsed=!1},n.exports=c,n.exports.firstLineError=o},{"./queue":26,"./schedule":29,"./util":36}],3:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){var o=!1,i=function(t,e){this._reject(e)},a=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(i,i,null,this,t)},s=function(t,e){0==(50397184&this._bitField)&&this._resolveCallback(e.target)},c=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(i){o||(o=!0,t.prototype._propagateFrom=r.propagateFromFunction(),t.prototype._boundValue=r.boundValueFunction());var u=n(i),l=new t(e);l._propagateFrom(this,1);var f=this._target();if(l._setBoundTo(u),u instanceof t){var p={promiseRejectionQueued:!1,promise:l,target:f,bindingPromise:u};f._then(e,a,void 0,l,p),u._then(s,c,void 0,l,p),l._setOnCancel(u)}else l._resolveCallback(f);return l},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},{}],4:[function(t,e,n){"use strict";var r;"undefined"!=typeof Promise&&(r=Promise);var o=t("./promise")();o.noConflict=function(){try{Promise===o&&(Promise=r)}catch(t){}return o},e.exports=o},{"./promise":22}],5:[function(t,e,n){"use strict";var r=Object.create;if(r){var o=r(null),i=r(null);o[" size"]=i[" size"]=0}e.exports=function(e){var n=t("./util"),r=n.canEvaluate;function o(t){var r=this.pop(),o=function(t,r){var o;if(null!=t&&(o=t[r]),"function"!=typeof o){var i="Object "+n.classString(t)+" has no method '"+n.toString(r)+"'";throw new e.TypeError(i)}return o}(t,r);return o.apply(t,this)}function i(t){return t[this]}function a(t){var e=+this;return e<0&&(e=Math.max(0,e+t.length)),t[e]}n.isIdentifier,e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(o,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e,n="number"==typeof t;if(n)e=a;else if(r){var o=(void 0)(t);e=null!==o?o:i}else e=i;return this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(t,e,n){"use strict";e.exports=function(e,n,r,o){var i=t("./util"),a=i.tryCatch,s=i.errorObj,c=e._async;e.prototype.break=e.prototype.cancel=function(){if(!o.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var n=t._cancellationParent;if(null==n||!n._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=n}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(i.isArray(t))for(var n=0;n=0)return n[t]}return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},r.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,n.push(this._trace))},r.prototype._popContext=function(){if(void 0!==this._trace){var t=n.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},r.CapturedTrace=null,r.create=function(){if(e)return new r},r.deactivateLongStackTraces=function(){},r.activateLongStackTraces=function(){var n=t.prototype._pushContext,i=t.prototype._popContext,a=t._peekContext,s=t.prototype._peekContext,c=t.prototype._promiseCreated;r.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=i,t._peekContext=a,t.prototype._peekContext=s,t.prototype._promiseCreated=c,e=!1},e=!0,t.prototype._pushContext=r.prototype._pushContext,t.prototype._popContext=r.prototype._popContext,t._peekContext=t.prototype._peekContext=o,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},r}},{}],9:[function(t,n,r){"use strict";n.exports=function(n,r){var o,i,a,s=n._getDomain,c=n._async,u=t("./errors").Warning,l=t("./util"),f=t("./es5"),p=l.canAttachTrace,h=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,d=/\((?:timers\.js):\d+:\d+\)/,_=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,v=null,y=null,m=!1,g=!(0==l.env("BLUEBIRD_DEBUG")),b=!(0==l.env("BLUEBIRD_WARNINGS")||!g&&!l.env("BLUEBIRD_WARNINGS")),w=!(0==l.env("BLUEBIRD_LONG_STACK_TRACES")||!g&&!l.env("BLUEBIRD_LONG_STACK_TRACES")),x=0!=l.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(b||!!l.env("BLUEBIRD_W_FORGOTTEN_RETURN"));n.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},n.prototype._ensurePossibleRejectionHandled=function(){if(0==(524288&this._bitField)){this._setRejectionIsUnhandled();var t=this;setTimeout(function(){t._notifyUnhandledRejection()},1)}},n.prototype._notifyUnhandledRejectionIsHandled=function(){$("rejectionHandled",o,void 0,this)},n.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},n.prototype._returnedNonUndefined=function(){return 0!=(268435456&this._bitField)},n.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),$("unhandledRejection",i,t,this)}},n.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},n.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},n.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},n.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},n.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},n.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},n.prototype._warn=function(t,e,n){return U(t,e,n||this)},n.onPossiblyUnhandledRejection=function(t){var e=s();i="function"==typeof t?null===e?t:l.domainBind(e,t):void 0},n.onUnhandledRejectionHandled=function(t){var e=s();o="function"==typeof t?null===e?t:l.domainBind(e,t):void 0};var j=function(){};n.longStackTraces=function(){if(c.haveItemsQueued()&&!Z.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!Z.longStackTraces&&W()){var t=n.prototype._captureStackTrace,e=n.prototype._attachExtraTrace,o=n.prototype._dereferenceTrace;Z.longStackTraces=!0,j=function(){if(c.haveItemsQueued()&&!Z.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");n.prototype._captureStackTrace=t,n.prototype._attachExtraTrace=e,n.prototype._dereferenceTrace=o,r.deactivateLongStackTraces(),c.enableTrampoline(),Z.longStackTraces=!1},n.prototype._captureStackTrace=N,n.prototype._attachExtraTrace=B,n.prototype._dereferenceTrace=V,r.activateLongStackTraces(),c.disableTrampolineIfNecessary()}},n.hasLongStackTraces=function(){return Z.longStackTraces&&W()};var k=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return l.global.dispatchEvent(t),function(t,e){var n={detail:e,cancelable:!0};f.defineProperty(n,"promise",{value:e.promise}),f.defineProperty(n,"reason",{value:e.reason});var r=new CustomEvent(t.toLowerCase(),n);return!l.global.dispatchEvent(r)}}if("function"==typeof Event){var t=new Event("CustomEvent");return l.global.dispatchEvent(t),function(t,e){var n=new Event(t.toLowerCase(),{cancelable:!0});return n.detail=e,f.defineProperty(n,"promise",{value:e.promise}),f.defineProperty(n,"reason",{value:e.reason}),!l.global.dispatchEvent(n)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),l.global.dispatchEvent(t),function(t,e){var n=document.createEvent("CustomEvent");return n.initCustomEvent(t.toLowerCase(),!1,!0,e),!l.global.dispatchEvent(n)}}catch(t){}return function(){return!1}}(),E=l.isNode?function(){return e.emit.apply(e,arguments)}:l.global?function(t){var e="on"+t.toLowerCase(),n=l.global[e];return!!n&&(n.apply(l.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function C(t,e){return{promise:e}}var O={promiseCreated:C,promiseFulfilled:C,promiseRejected:C,promiseResolved:C,promiseCancelled:C,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:C},S=function(t){var e=!1;try{e=E.apply(null,arguments)}catch(t){c.throwLater(t),e=!0}var n=!1;try{n=k(t,O[t].apply(null,arguments))}catch(t){c.throwLater(t),n=!0}return n||e};function T(){return!1}function F(t,e,n){var r=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+l.toString(t));r._attachCancellationCallback(t)})}catch(t){return t}}function P(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?l.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function R(){return this._onCancelField}function A(t){this._onCancelField=t}function D(){this._cancellationParent=void 0,this._onCancelField=void 0}function L(t,e){if(0!=(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}n.config=function(t){if("longStackTraces"in(t=Object(t))&&(t.longStackTraces?n.longStackTraces():!t.longStackTraces&&n.hasLongStackTraces()&&j()),"warnings"in t){var e=t.warnings;Z.warnings=!!e,x=Z.warnings,l.isObject(e)&&"wForgottenReturn"in e&&(x=!!e.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!Z.cancellation){if(c.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");n.prototype._clearCancellationData=D,n.prototype._propagateFrom=L,n.prototype._onCancel=R,n.prototype._setOnCancel=A,n.prototype._attachCancellationCallback=P,n.prototype._execute=F,I=L,Z.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!Z.monitoring?(Z.monitoring=!0,n.prototype._fireEvent=S):!t.monitoring&&Z.monitoring&&(Z.monitoring=!1,n.prototype._fireEvent=T)),n},n.prototype._fireEvent=T,n.prototype._execute=function(t,e,n){try{t(e,n)}catch(t){return t}},n.prototype._onCancel=function(){},n.prototype._setOnCancel=function(t){},n.prototype._attachCancellationCallback=function(t){},n.prototype._captureStackTrace=function(){},n.prototype._attachExtraTrace=function(){},n.prototype._dereferenceTrace=function(){},n.prototype._clearCancellationData=function(){},n.prototype._propagateFrom=function(t,e){};var I=function(t,e){0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)};function M(){var t=this._boundTo;return void 0!==t&&t instanceof n?t.isFulfilled()?t.value():void 0:t}function N(){this._trace=new J(this._peekContext())}function B(t,e){if(p(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var r=G(t);l.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),l.notEnumerableProp(t,"__stackCleaned__",!0)}}}function V(){this._trace=void 0}function U(t,e,r){if(Z.warnings){var o,i=new u(t);if(e)r._attachExtraTrace(i);else if(Z.longStackTraces&&(o=n._peekContext()))o.attachExtraTrace(i);else{var a=G(i);i.stack=a.message+"\n"+a.stack.join("\n")}S("warning",i)||q(i,"",!0)}}function H(t){for(var e=[],n=0;n0?function(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),n=0;n0&&"SyntaxError"!=t.name&&(e=e.slice(n)),e}(t):[" (No stack trace)"],{message:n,stack:"SyntaxError"==t.name?e:H(e)}}function q(t,e,n){if("undefined"!=typeof console){var r;if(l.isObject(t)){var o=t.stack;r=e+y(o,t)}else r=e+String(t);"function"==typeof a?a(r,n):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(r)}}function $(t,e,n,r){var o=!1;try{"function"==typeof e&&(o=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(t){c.throwLater(t)}"unhandledRejection"===t?S(t,n,r)||o||q(n,"Unhandled rejection "):S(t,r)}function Q(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{if(e=t&&"function"==typeof t.toString?t.toString():l.toString(t),/\[object [a-zA-Z0-9$_]+\]/.test(e))try{var n=JSON.stringify(t);e=n}catch(t){}0===e.length&&(e="(empty array)")}return"(<"+function(t){return t.length<41?t:t.substr(0,38)+"..."}(e)+">, no stack trace)"}function W(){return"function"==typeof Y}var z=function(){return!1},K=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function X(t){var e=t.match(K);if(e)return{fileName:e[1],line:parseInt(e[2],10)}}function J(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);Y(this,J),e>32&&this.uncycle()}l.inherits(J,Error),r.CapturedTrace=J,J.prototype.uncycle=function(){var t=this._length;if(!(t<2)){for(var e=[],n={},r=0,o=this;void 0!==o;++r)e.push(o),o=o._parent;for(var r=(t=this._length=r)-1;r>=0;--r){var i=e[r].stack;void 0===n[i]&&(n[i]=r)}for(var r=0;r0&&(e[s-1]._parent=void 0,e[s-1]._length=1),e[r]._parent=void 0,e[r]._length=1;var c=r>0?e[r-1]:this;s=0;--l)e[l]._length=u,u++;return}}}},J.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=G(t),n=e.message,r=[e.stack],o=this;void 0!==o;)r.push(H(o.stack.split("\n"))),o=o._parent;!function(t){for(var e=t[0],n=1;n=0;--s)if(r[s]===i){a=s;break}for(var s=a;s>=0;--s){var c=r[s];if(e[o]!==c)break;e.pop(),o--}e=r}}(r),function(t){for(var e=0;e=0)return v=/@/,y=e,m=!0,function(t){t.stack=(new Error).stack};try{throw new Error}catch(t){r="stack"in t}return"stack"in o||!r||"number"!=typeof Error.stackTraceLimit?(y=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?Q(e):e.toString()},null):(v=t,y=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}();"undefined"!=typeof console&&void 0!==console.warn&&(a=function(t){console.warn(t)},l.isNode&&e.stderr.isTTY?a=function(t,e){var n=e?"":"";console.warn(n+t+"\n")}:l.isNode||"string"!=typeof(new Error).stack||(a=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var Z={warnings:b,longStackTraces:!1,cancellation:!1,monitoring:!1};return w&&n.longStackTraces(),{longStackTraces:function(){return Z.longStackTraces},warnings:function(){return Z.warnings},cancellation:function(){return Z.cancellation},monitoring:function(){return Z.monitoring},propagateFromFunction:function(){return I},boundValueFunction:function(){return M},checkForgottenReturns:function(t,e,n,r,o){if(void 0===t&&null!==e&&x){if(void 0!==o&&o._returnedNonUndefined())return;if(0==(65535&r._bitField))return;n&&(n+=" ");var i="",a="";if(e._trace){for(var s=e._trace.stack.split("\n"),c=H(s),u=c.length-1;u>=0;--u){var l=c[u];if(!d.test(l)){var f=l.match(_);f&&(i="at "+f[1]+":"+f[2]+":"+f[3]+" ");break}}if(c.length>0)for(var p=c[0],u=0;u0&&(a="\n"+s[u-1]);break}}var h="a promise was created in a "+n+"handler "+i+"but was not returned from it, see http://goo.gl/rRqMUw"+a;r._warn(h,!0,e)}},setBounds:function(t,e){if(W()){for(var n,r,o=t.stack.split("\n"),i=e.stack.split("\n"),a=-1,s=-1,c=0;c=s||(z=function(t){if(h.test(t))return!0;var e=X(t);return!!(e&&e.fileName===n&&a<=e.line&&e.line<=s)})}},warn:U,deprecated:function(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),U(n)},CapturedTrace:J,fireDomEvent:k,fireGlobalEvent:E}}},{"./errors":12,"./es5":13,"./util":36}],10:[function(t,e,n){"use strict";e.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype.return=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype.throw=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1];return this.caught(t,function(){throw e})},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];return r instanceof t&&r.suppressUnhandledRejections(),this.caught(n,function(){return r})}}},{}],11:[function(t,e,n){"use strict";e.exports=function(t,e){var n=t.reduce,r=t.all;function o(){return r(this)}t.prototype.each=function(t){return n(this,t,e,0)._then(o,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return n(this,t,e,e)},t.each=function(t,r){return n(t,r,e,0)._then(o,void 0,void 0,t,void 0)},t.mapSeries=function(t,r){return n(t,r,e,e)}}},{}],12:[function(t,e,n){"use strict";var r,o,i=t("./es5"),a=i.freeze,s=t("./util"),c=s.inherits,u=s.notEnumerableProp;function l(t,e){function n(r){if(!(this instanceof n))return new n(r);u(this,"message","string"==typeof r?r:e),u(this,"name",t),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return c(n,Error),n}var f=l("Warning","warning"),p=l("CancellationError","cancellation error"),h=l("TimeoutError","timeout error"),d=l("AggregateError","aggregate error");try{r=TypeError,o=RangeError}catch(t){r=l("TypeError","type error"),o=l("RangeError","range error")}for(var _="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),v=0;v<_.length;++v)"function"==typeof Array.prototype[_[v]]&&(d.prototype[_[v]]=Array.prototype[_[v]]);i.defineProperty(d.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),d.prototype.isOperational=!0;var y=0;function m(t){if(!(this instanceof m))return new m(t);u(this,"name","OperationalError"),u(this,"message",t),this.cause=t,this.isOperational=!0,t instanceof Error?(u(this,"message",t.message),u(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}d.prototype.toString=function(){var t=Array(4*y+1).join(" "),e="\n"+t+"AggregateError of:\n";y++,t=Array(4*y+1).join(" ");for(var n=0;n1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0)}function f(){return h.call(this,this.promise._target()._settledValue())}function p(t){if(!l(this,t))return a.e=t,a}function h(t){var o=this.promise,s=this.handler;if(!this.called){this.called=!0;var c=this.isFinallyHandler()?s.call(o._boundValue()):s.call(o._boundValue(),t);if(c===r)return c;if(void 0!==c){o._setReturnedNonUndefined();var h=n(c,o);if(h instanceof e){if(null!=this.cancelPromise){if(h._isCancelled()){var d=new i("late cancellation observer");return o._attachExtraTrace(d),a.e=d,a}h.isPending()&&h._attachCancellationCallback(new u(this))}return h._then(f,p,void 0,this,void 0)}}}return o.isRejected()?(l(this),a.e=t,a):(l(this),t)}return c.prototype.isFinallyHandler=function(){return 0===this.type},u.prototype._resultCancelled=function(){l(this.finallyHandler)},e.prototype._passThrough=function(t,e,n,r){return"function"!=typeof t?this.then():this._then(n,r,void 0,new c(this,e,t),void 0)},e.prototype.lastly=e.prototype.finally=function(t){return this._passThrough(t,0,h,h)},e.prototype.tap=function(t){return this._passThrough(t,1,h)},e.prototype.tapCatch=function(t){var n=arguments.length;if(1===n)return this._passThrough(t,1,void 0,h);var r,i=new Array(n-1),a=0;for(r=0;r0&&"function"==typeof arguments[e]&&(t=arguments[e]);var r=[].slice.call(arguments);t&&r.pop();var o=new n(r).promise();return void 0!==t?o.spread(t):o}}},{"./util":36}],18:[function(t,e,n){"use strict";e.exports=function(e,n,r,o,i,a){var s=e._getDomain,c=t("./util"),u=c.tryCatch,l=c.errorObj,f=e._async;function p(t,e,n,r){this.constructor$(t),this._promise._captureStackTrace();var o=s();this._callback=null===o?e:c.domainBind(o,e),this._preservedValues=r===i?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],f.invoke(this._asyncInit,this,void 0)}function h(t,n,o,i){if("function"!=typeof n)return r("expecting a function but got "+c.classString(n));var a=0;if(void 0!==o){if("object"!=typeof o||null===o)return e.reject(new TypeError("options argument must be an object but it is "+c.classString(o)));if("number"!=typeof o.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+c.classString(o.concurrency)));a=o.concurrency}return a="number"==typeof a&&isFinite(a)&&a>=1?a:0,new p(t,n,a,i).promise()}c.inherits(p,n),p.prototype._asyncInit=function(){this._init$(void 0,-2)},p.prototype._init=function(){},p.prototype._promiseFulfilled=function(t,n){var r=this._values,i=this.length(),s=this._preservedValues,c=this._limit;if(n<0){if(r[n=-1*n-1]=t,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return r[n]=t,this._queue.push(n),!1;null!==s&&(s[n]=t);var f=this._promise,p=this._callback,h=f._boundValue();f._pushContext();var d=u(p).call(h,t,n,i),_=f._popContext();if(a.checkForgottenReturns(d,_,null!==s?"Promise.filter":"Promise.map",f),d===l)return this._reject(d.e),!0;var v=o(d,this._promise);if(v instanceof e){var y=(v=v._target())._bitField;if(0==(50397184&y))return c>=1&&this._inFlight++,r[n]=v,v._proxy(this,-1*(n+1)),!1;if(0==(33554432&y))return 0!=(16777216&y)?(this._reject(v._reason()),!0):(this._cancel(),!0);d=v._value()}r[n]=d}var m=++this._totalResolved;return m>=i&&(null!==s?this._filter(r,s):this._resolve(r),!0)},p.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,n=this._values;t.length>0&&this._inFlight1){i.deprecated("calling Promise.try with more than 1 argument");var u=arguments[1],l=arguments[2];r=a.isArray(u)?s(t).apply(l,u):s(t).call(l,u)}else r=s(t)();var f=c._popContext();return i.checkForgottenReturns(r,f,"Promise.try",c),c._resolveFromSyncValue(r),c},e.prototype._resolveFromSyncValue=function(t){t===a.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e,n){"use strict";var r=t("./util"),o=r.maybeWrapAsError,i=t("./errors"),a=i.OperationalError,s=t("./es5"),c=/^(?:name|message|stack|cause)$/;function u(t){var e;if(function(t){return t instanceof Error&&s.getPrototypeOf(t)===Error.prototype}(t)){(e=new a(t)).name=t.name,e.message=t.message,e.stack=t.stack;for(var n=s.keys(t),o=0;o1){var n,r=new Array(e-1),o=0;for(n=0;n0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+u.classString(t);arguments.length>1&&(n+=", "+u.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},T.prototype.done=function(t,e){var n=this._then(t,e,void 0,void 0,void 0);n._setIsFinal()},T.prototype.spread=function(t){return"function"!=typeof t?i("expecting a function but got "+u.classString(t)):this.all()._then(t,void 0,void 0,y,void 0)},T.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},T.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new b(this).promise()},T.prototype.error=function(t){return this.caught(u.originatesFromRejection,t)},T.getNewLibraryCopy=n.exports,T.is=function(t){return t instanceof T},T.fromNode=T.fromCallback=function(t){var e=new T(v);e._captureStackTrace();var n=arguments.length>1&&!!Object(arguments[1]).multiArgs,r=S(t)(C(e,n));return r===O&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},T.all=function(t){return new b(t).promise()},T.cast=function(t){var e=g(t);return e instanceof T||((e=new T(v))._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},T.resolve=T.fulfilled=T.cast,T.reject=T.rejected=function(t){var e=new T(v);return e._captureStackTrace(),e._rejectCallback(t,!0),e},T.setScheduler=function(t){if("function"!=typeof t)throw new d("expecting a function but got "+u.classString(t));return p.setScheduler(t)},T.prototype._then=function(t,e,n,r,o){var i=void 0!==o,a=i?o:new T(v),c=this._target(),l=c._bitField;i||(a._propagateFrom(this,3),a._captureStackTrace(),void 0===r&&0!=(2097152&this._bitField)&&(r=0!=(50397184&l)?this._boundValue():c===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,a));var f=s();if(0!=(50397184&l)){var h,d,y=c._settlePromiseCtx;0!=(33554432&l)?(d=c._rejectionHandler0,h=t):0!=(16777216&l)?(d=c._fulfillmentHandler0,h=e,c._unsetRejectionIsUnhandled()):(y=c._settlePromiseLateCancellationObserver,d=new _("late cancellation observer"),c._attachExtraTrace(d),h=e),p.invoke(y,c,{handler:null===f?h:"function"==typeof h&&u.domainBind(f,h),promise:a,receiver:r,value:d})}else c._addCallbacks(t,e,a,r,f);return a},T.prototype._length=function(){return 65535&this._bitField},T.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},T.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},T.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},T.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},T.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},T.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},T.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},T.prototype._isFinal=function(){return(4194304&this._bitField)>0},T.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},T.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},T.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},T.prototype._setAsyncGuaranteed=function(){p.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},T.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];if(e!==c)return void 0===e&&this._isBound()?this._boundValue():e},T.prototype._promiseAt=function(t){return this[4*t-4+2]},T.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},T.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},T.prototype._boundValue=function(){},T.prototype._migrateCallback0=function(t){t._bitField;var e=t._fulfillmentHandler0,n=t._rejectionHandler0,r=t._promise0,o=t._receiverAt(0);void 0===o&&(o=c),this._addCallbacks(e,n,r,o,null)},T.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),r=t._rejectionHandlerAt(e),o=t._promiseAt(e),i=t._receiverAt(e);void 0===i&&(i=c),this._addCallbacks(n,r,o,i,null)},T.prototype._addCallbacks=function(t,e,n,r,o){var i=this._length();if(i>=65531&&(i=0,this._setLength(0)),0===i)this._promise0=n,this._receiver0=r,"function"==typeof t&&(this._fulfillmentHandler0=null===o?t:u.domainBind(o,t)),"function"==typeof e&&(this._rejectionHandler0=null===o?e:u.domainBind(o,e));else{var a=4*i-4;this[a+2]=n,this[a+3]=r,"function"==typeof t&&(this[a+0]=null===o?t:u.domainBind(o,t)),"function"==typeof e&&(this[a+1]=null===o?e:u.domainBind(o,e))}return this._setLength(i+1),i},T.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},T.prototype._resolveCallback=function(t,e){if(0==(117506048&this._bitField)){if(t===this)return this._rejectCallback(r(),!1);var n=g(t,this);if(!(n instanceof T))return this._fulfill(t);e&&this._propagateFrom(n,2);var o=n._target();if(o!==this){var i=o._bitField;if(0==(50397184&i)){var a=this._length();a>0&&o._migrateCallback0(this);for(var s=1;s>>16)){if(t===this){var n=r();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!=(134217728&e)?this._settlePromises():p.settlePromises(this),this._dereferenceTrace())}},T.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=t,this._isFinal())return p.fatalError(t,u.isNode);(65535&e)>0?p.settlePromises(this):this._ensurePossibleRejectionHandled()}},T.prototype._fulfillPromises=function(t,e){for(var n=1;n0){if(0!=(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,t),this._fulfillPromises(e,r)}this._setLength(0)}this._clearCancellationData()},T.prototype._settledValue=function(){var t=this._bitField;return 0!=(33554432&t)?this._rejectionHandler0:0!=(16777216&t)?this._fulfillmentHandler0:void 0},T.defer=T.pending=function(){j.deprecated("Promise.defer","new Promise");var t=new T(v);return{promise:t,resolve:F,reject:P}},u.notEnumerableProp(T,"_makeSelfResolutionError",r),t("./method")(T,v,g,i,j),t("./bind")(T,v,g,j),t("./cancel")(T,b,i,j),t("./direct_resolve")(T),t("./synchronous_inspection")(T),t("./join")(T,b,g,v,p,s),T.Promise=T,T.version="3.5.2",t("./map.js")(T,b,i,g,v,j),t("./call_get.js")(T),t("./using.js")(T,i,g,x,v,j),t("./timers.js")(T,v,j),t("./generators.js")(T,i,v,g,a,j),t("./nodeify.js")(T),t("./promisify.js")(T,v),t("./props.js")(T,b,g,i),t("./race.js")(T,v,g,i),t("./reduce.js")(T,b,i,g,v,j),t("./settle.js")(T,b,j),t("./some.js")(T,b,i),t("./filter.js")(T,v),t("./each.js")(T,v),t("./any.js")(T),u.toFastProperties(T),u.toFastProperties(T.prototype),R({a:1}),R({b:2}),R({c:3}),R(1),R(function(){}),R(void 0),R(!1),R(new T(v)),j.setBounds(f.firstLineError,u.lastLineError),T}},{"./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(t,e,n){"use strict";e.exports=function(e,n,r,o,i){var a=t("./util");function s(t){var r=this._promise=new e(n);t instanceof e&&r._propagateFrom(t,3),r._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return a.isArray,a.inherits(s,i),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function t(n,i){var s=r(this._values,this._promise);if(s instanceof e){var c=(s=s._target())._bitField;if(this._values=s,0==(50397184&c))return this._promise._setAsyncGuaranteed(),s._then(t,this._reject,void 0,this,i);if(0==(33554432&c))return 0!=(16777216&c)?this._reject(s._reason()):this._cancel();s=s._value()}if(null!==(s=a.asArray(s)))0!==s.length?this._iterate(s):-5===i?this._resolveEmptyArray():this._resolve(function(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}(i));else{var u=o("expecting an array or an iterable object but got "+a.classString(s)).reason();this._promise._rejectCallback(u,!1)}},s.prototype._iterate=function(t){var n=this.getActualLength(t.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var o=this._promise,i=!1,a=null,s=0;s=this._length&&(this._resolve(this._values),!0)},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var n=0;n=this._length){var r;if(this._isMap)r=function(t){for(var e=new i,n=t.length/2|0,r=0;r>1},e.prototype.props=function(){return f(this)},e.props=function(t){return f(t)}}},{"./es5":13,"./util":36}],26:[function(t,e,n){"use strict";function r(t){this._capacity=t,this._length=0,this._front=0}r.prototype._willBeOverCapacity=function(t){return this._capacity=this._length&&(this._resolve(this._values),!0)},a.prototype._promiseFulfilled=function(t,e){var n=new o;return n._bitField=33554432,n._settledValueField=t,this._promiseResolved(e,n)},a.prototype._promiseRejected=function(t,e){var n=new o;return n._bitField=16777216,n._settledValueField=t,this._promiseResolved(e,n)},e.settle=function(t){return r.deprecated(".settle()",".reflect()"),new a(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{"./util":36}],31:[function(t,e,n){"use strict";e.exports=function(e,n,r){var o=t("./util"),i=t("./errors").RangeError,a=t("./errors").AggregateError,s=o.isArray,c={};function u(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function l(t,e){if((0|e)!==e||e<0)return r("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var n=new u(t),o=n.promise();return n.setHowMany(e),n.init(),o}o.inherits(u,n),u.prototype._init=function(){if(this._initialized)if(0!==this._howMany){this._init$(void 0,-5);var t=s(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},u.prototype.init=function(){this._initialized=!0,this._init()},u.prototype.setUnwrap=function(){this._unwrap=!0},u.prototype.howMany=function(){return this._howMany},u.prototype.setHowMany=function(t){this._howMany=t},u.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},u.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},u.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(c),this._checkOutcome())},u.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new a,e=this.length();e0?this._reject(t):this._cancel(),!0}return!1},u.prototype._fulfilled=function(){return this._totalResolved},u.prototype._rejected=function(){return this._values.length-this.length()},u.prototype._addRejected=function(t){this._values.push(t)},u.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},u.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},u.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new i(e)},u.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return l(t,e)},e.prototype.some=function(t){return l(this,t)},e._SomePromiseArray=u}},{"./errors":12,"./util":36}],32:[function(t,e,n){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var n=e.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()},r=e.prototype.error=e.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()},o=e.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},i=e.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},a=e.prototype.isPending=function(){return 0==(50397184&this._bitField)},s=e.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!=(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536==(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!=(8454144&this._target()._bitField)},t.prototype.isPending=function(){return a.call(this._target())},t.prototype.isRejected=function(){return i.call(this._target())},t.prototype.isFulfilled=function(){return o.call(this._target())},t.prototype.isResolved=function(){return s.call(this._target())},t.prototype.value=function(){return n.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),r.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],33:[function(t,e,n){"use strict";e.exports=function(e,n){var r=t("./util"),o=r.errorObj,i=r.isObject,a={}.hasOwnProperty;return function(t,s){if(i(t)){if(t instanceof e)return t;var c=function(t){try{return function(t){return t.then}(t)}catch(t){return o.e=t,o}}(t);if(c===o){s&&s._pushContext();var u=e.reject(c.e);return s&&s._popContext(),u}if("function"==typeof c){if(function(t){try{return a.call(t,"_promise0")}catch(t){return!1}}(t)){var u=new e(n);return t._then(u._fulfill,u._reject,void 0,u,null),u}return function(t,i,a){var s=new e(n),c=s;a&&a._pushContext(),s._captureStackTrace(),a&&a._popContext();var u=!0,l=r.tryCatch(i).call(t,function(t){s&&(s._resolveCallback(t),s=null)},function(t){s&&(s._rejectCallback(t,u,!0),s=null)});return u=!1,s&&l===o&&(s._rejectCallback(l.e,!0,!0),s=null),c}(t,c,s)}}return t}}},{"./util":36}],34:[function(t,e,n){"use strict";e.exports=function(e,n,r){var o=t("./util"),i=e.TimeoutError;function a(t){this.handle=t}a.prototype._resultCancelled=function(){clearTimeout(this.handle)};var s=function(t){return c(+this).thenReturn(t)},c=e.delay=function(t,o){var i,c;return void 0!==o?(i=e.resolve(o)._then(s,null,null,t,void 0),r.cancellation()&&o instanceof e&&i._setOnCancel(o)):(i=new e(n),c=setTimeout(function(){i._fulfill()},+t),r.cancellation()&&i._setOnCancel(new a(c)),i._captureStackTrace()),i._setAsyncGuaranteed(),i};function u(t){return clearTimeout(this.handle),t}function l(t){throw clearTimeout(this.handle),t}e.prototype.delay=function(t){return c(t,this)},e.prototype.timeout=function(t,e){var n,s;t=+t;var c=new a(setTimeout(function(){n.isPending()&&function(t,e,n){var r;r="string"!=typeof e?e instanceof Error?e:new i("operation timed out"):new i(e),o.markAsOriginatingFromRejection(r),t._attachExtraTrace(r),t._reject(r),null!=n&&n.cancel()}(n,e,s)},t));return r.cancellation()?(s=this.then(),(n=s._then(u,l,void 0,c,void 0))._setOnCancel(c)):n=this._then(u,l,void 0,c,void 0),n}}},{"./util":36}],35:[function(t,e,n){"use strict";e.exports=function(e,n,r,o,i,a){var s=t("./util"),c=t("./errors").TypeError,u=t("./util").inherits,l=s.errorObj,f=s.tryCatch,p={};function h(t){setTimeout(function(){throw t},0)}function d(t,n){var o=0,a=t.length,s=new e(i);return function i(){if(o>=a)return s._fulfill();var c=function(t){var e=r(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}(t[o++]);if(c instanceof e&&c._isDisposable()){try{c=r(c._getDisposer().tryDispose(n),t.promise)}catch(t){return h(t)}if(c instanceof e)return c._then(i,h,null,null,null)}i()}(),s}function _(t,e,n){this._data=t,this._promise=e,this._context=n}function v(t,e,n){this.constructor$(t,e,n)}function y(t){return _.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function m(t){this.length=t,this.promise=null,this[t-1]=null}_.prototype.data=function(){return this._data},_.prototype.promise=function(){return this._promise},_.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():p},_.prototype.tryDispose=function(t){var e=this.resource(),n=this._context;void 0!==n&&n._pushContext();var r=e!==p?this.doDispose(e,t):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,r},_.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},u(v,_),v.prototype.doDispose=function(t,e){var n=this.data();return n.call(t,t,e)},m.prototype._resultCancelled=function(){for(var t=this.length,n=0;n0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new v(t,this,o());throw new c}}},{"./errors":12,"./util":36}],36:[function(t,r,o){"use strict";var i=t("./es5"),a="undefined"==typeof navigator,s={e:{}},c,u="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n?n:void 0!==this?this:null;function l(){try{var t=c;return c=null,t.apply(this,arguments)}catch(t){return s.e=t,s}}function f(t){return c=t,l}var p=function(t,e){var n={}.hasOwnProperty;function r(){for(var r in this.constructor=t,this.constructor$=e,e.prototype)n.call(e.prototype,r)&&"$"!==r.charAt(r.length-1)&&(this[r+"$"]=e.prototype[r])}return r.prototype=e.prototype,t.prototype=new r,t.prototype};function h(t){return null==t||!0===t||!1===t||"string"==typeof t||"number"==typeof t}function d(t){return"function"==typeof t||"object"==typeof t&&null!==t}function _(t){return h(t)?new Error(O(t)):t}function v(t,e){var n,r=t.length,o=new Array(r+1);for(n=0;n1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),o=w.test(t+"")&&i.names(t).length>0;if(n||r||o)return!0}return!1}catch(t){return!1}}function j(t){function e(){}e.prototype=t;var n=new e;function r(){return typeof n.foo}return r(),r(),t}var k=/^[a-z$_][a-z$_0-9]*$/i;function E(t){return k.test(t)}function C(t,e,n){for(var r=new Array(t),o=0;o10||t[0]>0}(),H.isNode&&H.toFastProperties(e);try{throw new Error}catch(t){H.lastLineError=t}r.exports=H},{"./es5":13}]},{},[4])(4)}(),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)}).call(this,n(54),n(15),n(187).setImmediate)},94:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},95:function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},96:function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}}}); //# sourceMappingURL=indexeddb-worker.js.map