var OrbitDB=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var o=n(1),i=r(o),u=n(5),c=r(u),a=n(37),s=r(a),f=n(61),p=r(f),h=n(62),l=r(h),y=n(63).EventEmitter,d=n(64).create("orbit-db.Client"),v=n(91),g=n(150),S=function(){function e(t,n){(0,p["default"])(this,e),this._ipfs=t,this._pubsub=null,this.user=null,this.network=null,this.events=new y,this.options=n||{},this.db=new g(this._ipfs,this.options)}return(0,l["default"])(e,[{key:"channel",value:function(e,t,n){var r=this;void 0===t&&(t=""),void 0===n&&(n=!0);var o={iterator:function(n){return r._iterator(e,t,n)},"delete":function(){return r.db.deleteChannel(e,t)},del:function(n){return r.db.del(e,t,n)},add:function(n){return r.db.add(e,t,n)},put:function(n,o){return r.db.put(e,t,n,o)},get:function(n){var o=r._iterator(e,t,{key:n}).collect();return o[0]?o[0]:null},close:function(){return r._pubsub.unsubscribe(e)}};return new s["default"](function(i,u){r.db.use(e,r.user).then(function(){r.db.events[e].on("write",r._onWrite.bind(r)),r.db.events[e].on("sync",r._onSync.bind(r)),r.db.events[e].on("load",r._onLoad.bind(r)),r.db.events[e].on("loaded",r._onLoaded.bind(r)),n&&r._pubsub.subscribe(e,t,r._onMessage.bind(r)),i(o)})["catch"](u)})}},{key:"disconnect",value:function(){this._pubsub.disconnect(),this._store={},this.user=null,this.network=null}},{key:"_onMessage",value:function(e,t){this.db.sync(e,t)}},{key:"_onWrite",value:function(e,t){this._pubsub.publish(e,t),this.events.emit("data",e,t)}},{key:"_onSync",value:function(e,t){this.events.emit("data",e,t)}},{key:"_onLoad",value:function(e,t){this.events.emit("load",e,t)}},{key:"_onLoaded",value:function(e,t){this.events.emit("loaded",e,t)}},{key:"_iterator",value:function(e,t,n){var r,o=this.db.query(e,t,n),u=0,a=(r={},(0,i["default"])(r,c["default"],function(){return this}),(0,i["default"])(r,"next",function(){var e={value:null,done:!0};return u=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){var r=n(9),o=n(10);e.exports=function(e){return function(t,n){var i,u,c=String(o(t)),a=r(n),s=c.length;return 0>a||a>=s?e?"":void 0:(i=c.charCodeAt(a),55296>i||i>56319||a+1===s||(u=c.charCodeAt(a+1))<56320||u>57343?e?c.charAt(a):i:e?c.slice(a,a+2):(i-55296<<10)+(u-56320)+65536)}}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){"use strict";var r=n(12),o=n(13),i=n(18),u=n(19),c=n(23),a=n(24),s=n(25),f=n(26),p=n(4).getProto,h=n(27)("iterator"),l=!([].keys&&"next"in[].keys()),y="@@iterator",d="keys",v="values",g=function(){return this};e.exports=function(e,t,n,S,m,_,w){s(n,t,S);var b,q,k=function(e){if(!l&&e in I)return I[e];switch(e){case d:return function(){return new n(this,e)};case v:return function(){return new n(this,e)}}return function(){return new n(this,e)}},x=t+" Iterator",A=m==v,E=!1,I=e.prototype,L=I[h]||I[y]||m&&I[m],O=L||k(m);if(L){var C=p(O.call(new e));f(C,x,!0),!r&&c(I,y)&&u(C,h,g),A&&L.name!==v&&(E=!0,O=function(){return L.call(this)})}if(r&&!w||!l&&!E&&I[h]||u(I,h,O),a[t]=O,a[x]=g,m)if(b={values:A?O:k(v),keys:_?O:k(d),entries:A?k("entries"):O},w)for(q in b)q in I||i(I,q,b[q]);else o(o.P+o.F*(l||E),t,b);return b}},function(e,t){e.exports=!0},function(e,t,n){var r=n(14),o=n(15),i=n(16),u="prototype",c=function(e,t,n){var a,s,f,p=e&c.F,h=e&c.G,l=e&c.S,y=e&c.P,d=e&c.B,v=e&c.W,g=h?o:o[t]||(o[t]={}),S=h?r:l?r[t]:(r[t]||{})[u];h&&(n=t);for(a in n)s=!p&&S&&a in S,s&&a in g||(f=s?S[a]:n[a],g[a]=h&&"function"!=typeof S[a]?n[a]:d&&s?i(f,r):v&&S[a]==f?function(e){var t=function(t){return this instanceof e?new e(t):e(t)};return t[u]=e[u],t}(f):y&&"function"==typeof f?i(Function.call,f):f,y&&((g[u]||(g[u]={}))[a]=f))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,e.exports=c},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){var n=e.exports={version:"1.2.6"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(17);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){e.exports=n(19)},function(e,t,n){var r=n(4),o=n(20);e.exports=n(21)?function(e,t,n){return r.setDesc(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){e.exports=!n(22)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t){e.exports={}},function(e,t,n){"use strict";var r=n(4),o=n(20),i=n(26),u={};n(19)(u,n(27)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r.create(u,{next:o(1,n)}),i(e,t+" Iterator")}},function(e,t,n){var r=n(4).setDesc,o=n(23),i=n(27)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t,n){var r=n(28)("wks"),o=n(29),i=n(14).Symbol;e.exports=function(e){return r[e]||(r[e]=i&&i[e]||(i||o)("Symbol."+e))}},function(e,t,n){var r=n(14),o="__core-js_shared__",i=r[o]||(r[o]={});e.exports=function(e){return i[e]||(i[e]={})}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){n(31);var r=n(24);r.NodeList=r.HTMLCollection=r.Array},function(e,t,n){"use strict";var r=n(32),o=n(33),i=n(24),u=n(34);e.exports=n(11)(Array,"Array",function(e,t){this._t=u(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):"keys"==t?o(0,n):"values"==t?o(0,e[n]):o(0,[n,e[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var r=n(35),o=n(10);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(36);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){e.exports={"default":n(38),__esModule:!0}},function(e,t,n){n(39),n(7),n(30),n(40),e.exports=n(15).Promise},function(e,t){},function(e,t,n){"use strict";var r,o=n(4),i=n(12),u=n(14),c=n(16),a=n(41),s=n(13),f=n(42),p=n(43),h=n(17),l=n(44),y=n(45),d=n(50).set,v=n(51),g=n(27)("species"),S=n(52),m=n(53),_="Promise",w=u.process,b="process"==a(w),q=u[_],k=function(e){var t=new q(function(){});return e&&(t.constructor=Object),q.resolve(t)===t},x=function(){function e(t){var n=new q(t);return d(n,e.prototype),n}var t=!1;try{if(t=q&&q.resolve&&k(),d(e,q),e.prototype=o.create(q.prototype,{constructor:{value:e}}),e.resolve(5).then(function(){})instanceof e||(t=!1),t&&n(21)){var r=!1;q.resolve(o.setDesc({},"then",{get:function(){r=!0}})),t=r}}catch(i){t=!1}return t}(),A=function(e,t){return i&&e===q&&t===r?!0:v(e,t)},E=function(e){var t=p(e)[g];return void 0!=t?t:e},I=function(e){var t;return f(e)&&"function"==typeof(t=e.then)?t:!1},L=function(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r}),this.resolve=h(t),this.reject=h(n)},O=function(e){try{e()}catch(t){return{error:t}}},C=function(e,t){if(!e.n){e.n=!0;var n=e.c;m(function(){for(var r=e.v,o=1==e.s,i=0,c=function(t){var n,i,u=o?t.ok:t.fail,c=t.resolve,a=t.reject;try{u?(o||(e.h=!0),n=u===!0?r:u(r),n===t.promise?a(TypeError("Promise-chain cycle")):(i=I(n))?i.call(n,c,a):c(n)):a(r)}catch(s){a(s)}};n.length>i;)c(n[i++]);n.length=0,e.n=!1,t&&setTimeout(function(){var t,n,o=e.p;j(o)&&(b?w.emit("unhandledRejection",r,o):(t=u.onunhandledrejection)?t({promise:o,reason:r}):(n=u.console)&&n.error&&n.error("Unhandled promise rejection",r)),e.a=void 0},1)})}},j=function(e){var t,n=e._d,r=n.a||n.c,o=0;if(n.h)return!1;for(;r.length>o;)if(t=r[o++],t.fail||!j(t.promise))return!1;return!0},R=function(e){var t=this;t.d||(t.d=!0,t=t.r||t,t.v=e,t.s=2,t.a=t.c.slice(),C(t,!0))},T=function(e){var t,n=this;if(!n.d){n.d=!0,n=n.r||n;try{if(n.p===e)throw TypeError("Promise can't be resolved itself");(t=I(e))?m(function(){var r={r:n,d:!1};try{t.call(e,c(T,r,1),c(R,r,1))}catch(o){R.call(r,o)}}):(n.v=e,n.s=1,C(n,!1))}catch(r){R.call({r:n,d:!1},r)}}};x||(q=function(e){h(e);var t=this._d={p:l(this,q,_),c:[],a:void 0,s:0,d:!1,v:void 0,h:!1,n:!1};try{e(c(T,t,1),c(R,t,1))}catch(n){R.call(t,n)}},n(58)(q.prototype,{then:function(e,t){var n=new L(S(this,q)),r=n.promise,o=this._d;return n.ok="function"==typeof e?e:!0,n.fail="function"==typeof t&&t,o.c.push(n),o.a&&o.a.push(n),o.s&&C(o,!1),r},"catch":function(e){return this.then(void 0,e)}})),s(s.G+s.W+s.F*!x,{Promise:q}),n(26)(q,_),n(59)(_),r=n(15)[_],s(s.S+s.F*!x,_,{reject:function(e){var t=new L(this),n=t.reject;return n(e),t.promise}}),s(s.S+s.F*(!x||k(!0)),_,{resolve:function(e){if(e instanceof q&&A(e.constructor,this))return e;var t=new L(this),n=t.resolve;return n(e),t.promise}}),s(s.S+s.F*!(x&&n(60)(function(e){q.all(e)["catch"](function(){})})),_,{all:function(e){var t=E(this),n=new L(t),r=n.resolve,i=n.reject,u=[],c=O(function(){y(e,!1,u.push,u);var n=u.length,c=Array(n);n?o.each.call(u,function(e,o){var u=!1;t.resolve(e).then(function(e){u||(u=!0,c[o]=e,--n||r(c))},i)}):r(c)});return c&&i(c.error),n.promise},race:function(e){var t=E(this),n=new L(t),r=n.reject,o=O(function(){y(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return o&&r(o.error),n.promise}})},function(e,t,n){var r=n(36),o=n(27)("toStringTag"),i="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,u;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=(t=Object(e))[o])?n:i?r(t):"Object"==(u=r(t))&&"function"==typeof t.callee?"Arguments":u}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(42);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError(n+": use the 'new' operator!");return e}},function(e,t,n){var r=n(16),o=n(46),i=n(47),u=n(43),c=n(48),a=n(49);e.exports=function(e,t,n,s){var f,p,h,l=a(e),y=r(n,s,t?2:1),d=0;if("function"!=typeof l)throw TypeError(e+" is not iterable!");if(i(l))for(f=c(e.length);f>d;d++)t?y(u(p=e[d])[0],p[1]):y(e[d]);else for(h=l.call(e);!(p=h.next()).done;)o(h,y,p.value,t)}},function(e,t,n){var r=n(43);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(i){var u=e["return"];throw void 0!==u&&r(u.call(e)),i}}},function(e,t,n){var r=n(24),o=n(27)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||i[o]===e)}},function(e,t,n){var r=n(9),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){var r=n(41),o=n(27)("iterator"),i=n(24);e.exports=n(15).getIteratorMethod=function(e){return void 0!=e?e[o]||e["@@iterator"]||i[r(e)]:void 0}},function(e,t,n){var r=n(4).getDesc,o=n(42),i=n(43),u=function(e,t){if(i(e),!o(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,o){try{o=n(16)(Function.call,r(Object.prototype,"__proto__").set,2),o(e,[]),t=!(e instanceof Array)}catch(i){t=!0}return function(e,n){return u(e,n),t?e.__proto__=n:o(e,n),e}}({},!1):void 0),check:u}},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},function(e,t,n){var r=n(43),o=n(17),i=n(27)("species");e.exports=function(e,t){var n,u=r(e).constructor;return void 0===u||void 0==(n=r(u)[i])?t:o(n)}},function(e,t,n){var r,o,i,u=n(14),c=n(54).set,a=u.MutationObserver||u.WebKitMutationObserver,s=u.process,f=u.Promise,p="process"==n(36)(s),h=function(){var e,t,n;for(p&&(e=s.domain)&&(s.domain=null,e.exit());r;)t=r.domain,n=r.fn,t&&t.enter(),n(),t&&t.exit(),r=r.next;o=void 0,e&&e.enter()};if(p)i=function(){s.nextTick(h)};else if(a){var l=1,y=document.createTextNode("");new a(h).observe(y,{characterData:!0}),i=function(){y.data=l=-l}}else i=f&&f.resolve?function(){f.resolve().then(h)}:function(){c.call(u,h)};e.exports=function(e){var t={fn:e,next:void 0,domain:p&&s.domain};o&&(o.next=t),r||(r=t,i()),o=t}},function(e,t,n){var r,o,i,u=n(16),c=n(55),a=n(56),s=n(57),f=n(14),p=f.process,h=f.setImmediate,l=f.clearImmediate,y=f.MessageChannel,d=0,v={},g="onreadystatechange",S=function(){var e=+this;if(v.hasOwnProperty(e)){var t=v[e];delete v[e],t()}},m=function(e){S.call(e.data)};h&&l||(h=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return v[++d]=function(){c("function"==typeof e?e:Function(e),t)},r(d),d},l=function(e){delete v[e]},"process"==n(36)(p)?r=function(e){p.nextTick(u(S,e,1))}:y?(o=new y,i=o.port2,o.port1.onmessage=m,r=u(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(e){f.postMessage(e+"","*")},f.addEventListener("message",m,!1)):r=g in s("script")?function(e){a.appendChild(s("script"))[g]=function(){a.removeChild(this),S.call(e)}}:function(e){setTimeout(u(S,e,1),0)}),e.exports={set:h,clear:l}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){e.exports=n(14).document&&document.documentElement},function(e,t,n){var r=n(42),o=n(14).document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t,n){var r=n(18);e.exports=function(e,t){for(var n in t)r(e,n,t[n]);return e}},function(e,t,n){"use strict";var r=n(15),o=n(4),i=n(21),u=n(27)("species");e.exports=function(e){var t=r[e];i&&t&&!t[u]&&o.setDesc(t,u,{configurable:!0,get:function(){return this}})}},function(e,t,n){var r=n(27)("iterator"),o=!1;try{var i=[7][r]();i["return"]=function(){o=!0},Array.from(i,function(){throw 2})}catch(u){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i=[7],u=i[r]();u.next=function(){n=!0},i[r]=function(){return u},e(i)}catch(c){}return n}},function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(2),i=r(o);t["default"]=function(){function e(e,t){for(var n=0;ne||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,o,c,a,s;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[e],u(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:c=Array.prototype.slice.call(arguments,1),n.apply(this,c)}else if(i(n))for(c=Array.prototype.slice.call(arguments,1),s=n.slice(),o=s.length,a=0;o>a;a++)s[a].apply(this,c);return!0},n.prototype.addListener=function(e,t){var o;if(!r(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,r(t.listener)?t.listener:t),this._events[e]?i(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,i(this._events[e])&&!this._events[e].warned&&(o=u(this._maxListeners)?n.defaultMaxListeners:this._maxListeners,o&&o>0&&this._events[e].length>o&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),o||(o=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var o=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,o,u,c;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],u=n.length,o=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(n)){for(c=u;c-- >0;)if(n[c]===t||n[c].listener&&n[c].listener===t){o=c;break}if(0>o)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(o,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var o=n(67),i=r(o),u=n(79),c=r(u),a=n(86),s=r(a),f=n(87),p=r(f),h=n(90),l=!!t.version,y={DEBUG:"DEBUG",INFO:"INFO",WARN:"WARN",ERROR:"ERROR",NONE:"NONE"},d=y.DEBUG,v={Black:0,Red:1,Green:2,Yellow:3,Blue:4,Magenta:5,Cyan:6,Grey:7,White:9,Default:9};l||(v={Black:"Black",Red:"IndianRed",Green:"LimeGreen",Yellow:"Orange",Blue:"RoyalBlue",Magenta:"Orchid",Cyan:"SkyBlue",Grey:"DimGrey",White:"White",Default:"Black"});var g=[v.Cyan,v.Green,v.Yellow,v.Red,v.Default],S={useColors:!0,color:v.Default,showTimestamp:!0,showLevel:!0,filename:null,appendFile:!0},m=function(){function e(t,n){(0,s["default"])(this,e),this.category=t;var r={};if((0,c["default"])(r,S),(0,c["default"])(r,n),this.options=r,this.options.filename){var o=this.options.appendFile?"a":"w";this.fileWriter=h.createWriteStream(this.options.filename,{flags:o})}}return(0,p["default"])(e,[{key:"debug",value:function(e){this._write(y.DEBUG,e)}},{key:"log",value:function(e){this.debug(e)}},{key:"info",value:function(e){this._write(y.INFO,e)}},{key:"warn",value:function(e){this._write(y.WARN,e)}},{key:"error",value:function(e){this._write(y.ERROR,e)}},{key:"_write",value:function(e,t){if(this._shouldLog(e)){var n=this._format(e,t),r=this._createLogMessage(e,t),o=this._createLogMessage(e,t,n.timestamp,n.level,n.category,n.text);this.fileWriter&&this.fileWriter.write(r+"\n"),l?console.log(o):e===y.ERROR?this.options.showTimestamp&&this.options.showLevel?console.error(o,n.timestamp,n.level,n.category,n.text):this.options.showTimestamp&&!this.options.showLevel?console.error(o,n.timestamp,n.category,n.text):!this.options.showTimestamp&&this.options.showLevel?console.error(o,n.level,n.category,n.text):console.error(o,n.category,n.text):this.options.showTimestamp&&this.options.showLevel?console.log(o,n.timestamp,n.level,n.category,n.text):this.options.showTimestamp&&!this.options.showLevel?console.log(o,n.timestamp,n.category,n.text):!this.options.showTimestamp&&this.options.showLevel?console.log(o,n.level,n.category,n.text):console.log(o,n.category,n.text)}}},{key:"_format",value:function(e,t){var n="",r="",o="",u=": ";if(this.options.useColors){var c=(0,i["default"])(y).map(function(e){return y[e]}).indexOf(e),a=this.options.color;l?(this.options.showTimestamp&&(n="[3"+v.Grey+"m"),this.options.showLevel&&(r="[3"+g[c]+";22m"),o="[3"+a+";1m",u=": "):(this.options.showTimestamp&&(n="color:"+v.Grey),this.options.showLevel&&(r="color:"+g[c]),o="color:"+a+"; font-weight: bold")}return{timestamp:n,level:r,category:o,text:u}}},{key:"_createLogMessage",value:function(e,t,n,r,o,i){n=n||"",r=r||"",o=o||"",i=i||": ",l||(this.options.showTimestamp&&(n="%c"),this.options.showLevel&&(r="%c"),o="%c",i=": %c");var u="";return this.options.showTimestamp&&(u+=""+(new Date).toISOString()+" "),u=n+u,this.options.showLevel&&(u+=r+"["+e+"]"+(e===y.INFO||e===y.WARN?" ":"")+" "),u+=o+this.category,u+=i+t}},{key:"_shouldLog",value:function(e){var t=(0,i["default"])(y).map(function(e){return y[e]}),n=t.indexOf(e),r=t.indexOf(d);return n>=r}}]),e}();e.exports={Colors:v,LogLevel:y,setLogLevel:function(e){d=e},create:function(e,t){return new m(e,t)}}}).call(t,n(65))},function(e,t,n){t.nextTick=function(e){setTimeout(e,0)},t.platform=t.arch=t.execPath=t.title="browser",t.pid=1,t.browser=!0,t.env={},t.argv=[],t.binding=function(e){throw new Error("No such module. (Possibly not yet loaded)")},function(){var e,r="/";t.cwd=function(){return r},t.chdir=function(t){e||(e=n(66)),r=e.resolve(t,r)}}(),t.exit=t.kill=t.umask=t.dlopen=t.uptime=t.memoryUsage=t.uvCounters=function(){},t.features={}},function(e,t,n){(function(e){function n(e,t){for(var n=0,r=e.length-1;r>=0;r--){var o=e[r];"."===o?e.splice(r,1):".."===o?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r=-1&&!o;i--){var u=i>=0?arguments[i]:e.cwd();if("string"!=typeof u)throw new TypeError("Arguments to path.resolve must be strings");u&&(t=u+"/"+t,o="/"===u.charAt(0))}return t=n(r(t.split("/"),function(e){return!!e}),!o).join("/"),(o?"/":"")+t||"."},t.normalize=function(e){var o=t.isAbsolute(e),i="/"===u(e,-1);return e=n(r(e.split("/"),function(e){return!!e}),!o).join("/"),e||o||(e="."),e&&i&&(e+="/"),(o?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},t.relative=function(e,n){function r(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var o=r(e.split("/")),i=r(n.split("/")),u=Math.min(o.length,i.length),c=u,a=0;u>a;a++)if(o[a]!==i[a]){c=a;break}for(var s=[],a=c;at&&(t=e.length+t),e.substr(t,n)}}).call(t,n(65))},function(e,t,n){e.exports={"default":n(68),__esModule:!0}},function(e,t,n){n(69),e.exports=n(75).Object.keys},function(e,t,n){var r=n(70);n(72)("keys",function(e){return function(t){return e(r(t))}})},function(e,t,n){var r=n(71);e.exports=function(e){return Object(r(e))}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(73),o=n(75),i=n(78);e.exports=function(e,t){var n=(o.Object||{})[e]||Object[e],u={};u[e]=t(n),r(r.S+r.F*i(function(){n(1)}),"Object",u)}},function(e,t,n){var r=n(74),o=n(75),i=n(76),u="prototype",c=function(e,t,n){var a,s,f,p=e&c.F,h=e&c.G,l=e&c.S,y=e&c.P,d=e&c.B,v=e&c.W,g=h?o:o[t]||(o[t]={}),S=h?r:l?r[t]:(r[t]||{})[u];h&&(n=t);for(a in n)s=!p&&S&&a in S,s&&a in g||(f=s?S[a]:n[a],g[a]=h&&"function"!=typeof S[a]?n[a]:d&&s?i(f,r):v&&S[a]==f?function(e){var t=function(t){return this instanceof e?new e(t):e(t)};return t[u]=e[u],t}(f):y&&"function"==typeof f?i(Function.call,f):f,y&&((g[u]||(g[u]={}))[a]=f))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,e.exports=c},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){var n=e.exports={version:"1.2.6"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(77);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,n){e.exports={"default":n(80),__esModule:!0}},function(e,t,n){n(81),e.exports=n(75).Object.assign},function(e,t,n){var r=n(73);r(r.S+r.F,"Object",{assign:n(82)})},function(e,t,n){var r=n(83),o=n(70),i=n(84);e.exports=n(78)(function(){var e=Object.assign,t={},n={},r=Symbol(),o="abcdefghijklmnopqrst";return t[r]=7,o.split("").forEach(function(e){n[e]=e}),7!=e({},t)[r]||Object.keys(e({},n)).join("")!=o})?function(e,t){for(var n=o(e),u=arguments,c=u.length,a=1,s=r.getKeys,f=r.getSymbols,p=r.isEnum;c>a;)for(var h,l=i(u[a++]),y=f?s(l).concat(f(l)):s(l),d=y.length,v=0;d>v;)p.call(l,h=y[v++])&&(n[h]=l[h]);return n}:Object.assign},function(e,t){var n=Object;e.exports={create:n.create,getProto:n.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:n.getOwnPropertyDescriptor,setDesc:n.defineProperty,setDescs:n.defineProperties,getKeys:n.keys,getNames:n.getOwnPropertyNames,getSymbols:n.getOwnPropertySymbols,each:[].forEach}},function(e,t,n){var r=n(85);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(88),i=r(o);t["default"]=function(){function e(e,t){for(var n=0;n=31}function o(){var e=arguments,n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return e;var r="color: "+this.color;e=[e[0],r,"color: inherit"].concat(Array.prototype.slice.call(e,1));var o=0,i=0;return e[0].replace(/%[a-z%]/g,function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))}),e.splice(i,0,r),e}function i(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function u(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(n){}}function c(){var e;try{e=t.storage.debug}catch(n){}return e}function a(){try{return window.localStorage}catch(e){}}t=e.exports=n(98),t.log=i,t.formatArgs=o,t.save=u,t.load=c,t.useColors=r,t.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:a(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){return JSON.stringify(e)},t.enable(c())},function(e,t,n){function r(){return t.colors[f++%t.colors.length]}function o(e){function n(){}function o(){var e=o,n=+new Date,i=n-(s||n);e.diff=i,e.prev=s,e.curr=n,s=n,null==e.useColors&&(e.useColors=t.useColors()),null==e.color&&e.useColors&&(e.color=r());var u=Array.prototype.slice.call(arguments);u[0]=t.coerce(u[0]),"string"!=typeof u[0]&&(u=["%o"].concat(u));var c=0;u[0]=u[0].replace(/%([a-z%])/g,function(n,r){if("%%"===n)return n;c++;var o=t.formatters[r];if("function"==typeof o){var i=u[c];n=o.call(e,i),u.splice(c,1),c--}return n}),"function"==typeof t.formatArgs&&(u=t.formatArgs.apply(e,u));var a=o.log||t.log||console.log.bind(console);a.apply(e,u)}n.enabled=!1,o.enabled=!0;var i=t.enabled(e)?o:n;return i.namespace=e,i}function i(e){t.save(e);for(var n=(e||"").split(/[\s,]+/),r=n.length,o=0;r>o;o++)n[o]&&(e=n[o].replace(/\*/g,".*?"),"-"===e[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))}function u(){t.enable("")}function c(e){var n,r;for(n=0,r=t.skips.length;r>n;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;r>n;n++)if(t.names[n].test(e))return!0;return!1}function a(e){return e instanceof Error?e.stack||e.message:e}t=e.exports=o,t.coerce=a,t.disable=u,t.enable=i,t.enabled=c,t.humanize=n(99),t.names=[],t.skips=[],t.formatters={};var s,f=0},function(e,t){function n(e){if(e=""+e,!(e.length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),r=(t[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*f;case"days":case"day":case"d":return n*s;case"hours":case"hour":case"hrs":case"hr":case"h":return n*a;case"minutes":case"minute":case"mins":case"min":case"m":return n*c;case"seconds":case"second":case"secs":case"sec":case"s":return n*u;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n}}}}function r(e){return e>=s?Math.round(e/s)+"d":e>=a?Math.round(e/a)+"h":e>=c?Math.round(e/c)+"m":e>=u?Math.round(e/u)+"s":e+"ms"}function o(e){return i(e,s,"day")||i(e,a,"hour")||i(e,c,"minute")||i(e,u,"second")||e+" ms"}function i(e,t,n){return t>e?void 0:1.5*t>e?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}var u=1e3,c=60*u,a=60*c,s=24*a,f=365.25*s;e.exports=function(e,t){return t=t||{},"string"==typeof e?n(e):t["long"]?o(e):r(e)}},function(e,t,n){function r(){}function o(e){var n="",r=!1;return n+=e.type,t.BINARY_EVENT!=e.type&&t.BINARY_ACK!=e.type||(n+=e.attachments,n+="-"),e.nsp&&"/"!=e.nsp&&(r=!0,n+=e.nsp),null!=e.id&&(r&&(n+=",",r=!1),n+=e.id),null!=e.data&&(r&&(n+=","),n+=p.stringify(e.data)),f("encoded %j as %s",e,n),n}function i(e,t){function n(e){var n=l.deconstructPacket(e),r=o(n.packet),i=n.buffers;i.unshift(r),t(i)}l.removeBlobs(e,n)}function u(){this.reconstructor=null}function c(e){var n={},r=0;if(n.type=Number(e.charAt(0)),null==t.types[n.type])return s();if(t.BINARY_EVENT==n.type||t.BINARY_ACK==n.type){for(var o="";"-"!=e.charAt(++r)&&(o+=e.charAt(r),r!=e.length););if(o!=Number(o)||"-"!=e.charAt(r))throw new Error("Illegal attachments");n.attachments=Number(o)}if("/"==e.charAt(r+1))for(n.nsp="";++r;){var i=e.charAt(r);if(","==i)break;if(n.nsp+=i,r==e.length)break}else n.nsp="/";var u=e.charAt(r+1);if(""!==u&&Number(u)==u){for(n.id="";++r;){var i=e.charAt(r);if(null==i||Number(i)!=i){--r;break}if(n.id+=e.charAt(r),r==e.length)break}n.id=Number(n.id)}if(e.charAt(++r))try{n.data=p.parse(e.substr(r))}catch(c){return s()}return f("decoded %s as %j",e,n),n}function a(e){this.reconPack=e,this.buffers=[]}function s(e){return{type:t.ERROR,data:"parser error"}}var f=n(101)("socket.io-parser"),p=n(104),h=(n(107),n(108)),l=n(109),y=n(110);t.protocol=4,t.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],t.CONNECT=0,t.DISCONNECT=1,t.EVENT=2,t.ACK=3,t.ERROR=4,t.BINARY_EVENT=5,t.BINARY_ACK=6,t.Encoder=r,t.Decoder=u,r.prototype.encode=function(e,n){if(f("encoding packet %j",e),t.BINARY_EVENT==e.type||t.BINARY_ACK==e.type)i(e,n);else{var r=o(e);n([r])}},h(u.prototype),u.prototype.add=function(e){var n;if("string"==typeof e)n=c(e),t.BINARY_EVENT==n.type||t.BINARY_ACK==n.type?(this.reconstructor=new a(n),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",n)):this.emit("decoded",n);else{if(!y(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");n=this.reconstructor.takeBinaryData(e),n&&(this.reconstructor=null,this.emit("decoded",n))}},u.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},a.prototype.takeBinaryData=function(e){if(this.buffers.push(e),this.buffers.length==this.reconPack.attachments){var t=l.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null},a.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},function(e,t,n){function r(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function o(){var e=arguments,n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return e;var r="color: "+this.color;e=[e[0],r,"color: inherit"].concat(Array.prototype.slice.call(e,1));var o=0,i=0;return e[0].replace(/%[a-z%]/g,function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))}),e.splice(i,0,r),e}function i(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function u(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(n){}}function c(){var e;try{e=t.storage.debug}catch(n){}return e}function a(){try{return window.localStorage}catch(e){}}t=e.exports=n(102),t.log=i,t.formatArgs=o,t.save=u,t.load=c,t.useColors=r,t.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:a(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){return JSON.stringify(e)},t.enable(c())},function(e,t,n){function r(){return t.colors[f++%t.colors.length]}function o(e){function n(){}function o(){var e=o,n=+new Date,i=n-(s||n);e.diff=i,e.prev=s,e.curr=n,s=n,null==e.useColors&&(e.useColors=t.useColors()),null==e.color&&e.useColors&&(e.color=r());var u=Array.prototype.slice.call(arguments);u[0]=t.coerce(u[0]),"string"!=typeof u[0]&&(u=["%o"].concat(u));var c=0;u[0]=u[0].replace(/%([a-z%])/g,function(n,r){if("%%"===n)return n;c++;var o=t.formatters[r];if("function"==typeof o){var i=u[c];n=o.call(e,i),u.splice(c,1),c--}return n}),"function"==typeof t.formatArgs&&(u=t.formatArgs.apply(e,u));var a=o.log||t.log||console.log.bind(console);a.apply(e,u)}n.enabled=!1,o.enabled=!0;var i=t.enabled(e)?o:n;return i.namespace=e,i}function i(e){t.save(e);for(var n=(e||"").split(/[\s,]+/),r=n.length,o=0;r>o;o++)n[o]&&(e=n[o].replace(/\*/g,".*?"),"-"===e[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))}function u(){t.enable("")}function c(e){var n,r;for(n=0,r=t.skips.length;r>n;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;r>n;n++)if(t.names[n].test(e))return!0;return!1}function a(e){return e instanceof Error?e.stack||e.message:e}t=e.exports=o,t.coerce=a,t.disable=u,t.enable=i,t.enabled=c,t.humanize=n(103),t.names=[],t.skips=[],t.formatters={};var s,f=0},function(e,t){function n(e){if(e=""+e,!(e.length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),r=(t[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*f;case"days":case"day":case"d":return n*s;case"hours":case"hour":case"hrs":case"hr":case"h":return n*a;case"minutes":case"minute":case"mins":case"min":case"m":return n*c;case"seconds":case"second":case"secs":case"sec":case"s":return n*u;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n}}}}function r(e){return e>=s?Math.round(e/s)+"d":e>=a?Math.round(e/a)+"h":e>=c?Math.round(e/c)+"m":e>=u?Math.round(e/u)+"s":e+"ms"}function o(e){return i(e,s,"day")||i(e,a,"hour")||i(e,c,"minute")||i(e,u,"second")||e+" ms"}function i(e,t,n){return t>e?void 0:1.5*t>e?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}var u=1e3,c=60*u,a=60*c,s=24*a,f=365.25*s;e.exports=function(e,t){return t=t||{},"string"==typeof e?n(e):t["long"]?o(e):r(e)}},function(e,t,n){var r;(function(e,o){(function(){function i(e,t){function n(e){if(n[e]!==v)return n[e];var i;if("bug-string-char-index"==e)i="a"!="a"[0];else if("json"==e)i=n("json-stringify")&&n("json-parse");else{var u,c='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==e){var s=t.stringify,f="function"==typeof s&&m;if(f){(u=function(){return 1}).toJSON=u;try{f="0"===s(0)&&"0"===s(new r)&&'""'==s(new o)&&s(S)===v&&s(v)===v&&s()===v&&"1"===s(u)&&"[1]"==s([u])&&"[null]"==s([v])&&"null"==s(null)&&"[null,null,null]"==s([v,S,null])&&s({a:[u,!0,!1,null,"\x00\b\n\f\r "]})==c&&"1"===s(null,u)&&"[\n 1,\n 2\n]"==s([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==s(new a(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==s(new a(864e13))&&'"-000001-01-01T00:00:00.000Z"'==s(new a(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==s(new a(-1))}catch(p){f=!1}}i=f}if("json-parse"==e){var h=t.parse;if("function"==typeof h)try{if(0===h("0")&&!h(!1)){u=h(c);var l=5==u.a.length&&1===u.a[0];if(l){try{l=!h('" "')}catch(p){}if(l)try{l=1!==h("01")}catch(p){}if(l)try{l=1!==h("1.")}catch(p){}}}}catch(p){l=!1}i=l}}return n[e]=!!i}e||(e=s.Object()),t||(t=s.Object());var r=e.Number||s.Number,o=e.String||s.String,u=e.Object||s.Object,a=e.Date||s.Date,f=e.SyntaxError||s.SyntaxError,p=e.TypeError||s.TypeError,h=e.Math||s.Math,l=e.JSON||s.JSON;"object"==typeof l&&l&&(t.stringify=l.stringify,t.parse=l.parse);var y,d,v,g=u.prototype,S=g.toString,m=new a(-0xc782b5b800cec);try{m=-109252==m.getUTCFullYear()&&0===m.getUTCMonth()&&1===m.getUTCDate()&&10==m.getUTCHours()&&37==m.getUTCMinutes()&&6==m.getUTCSeconds()&&708==m.getUTCMilliseconds()}catch(_){}if(!n("json")){var w="[object Function]",b="[object Date]",q="[object Number]",k="[object String]",x="[object Array]",A="[object Boolean]",E=n("bug-string-char-index");if(!m)var I=h.floor,L=[0,31,59,90,120,151,181,212,243,273,304,334],O=function(e,t){return L[t]+365*(e-1970)+I((e-1969+(t=+(t>1)))/4)-I((e-1901+t)/100)+I((e-1601+t)/400)};if((y=g.hasOwnProperty)||(y=function(e){var t,n={};return(n.__proto__=null,n.__proto__={toString:1},n).toString!=S?y=function(e){var t=this.__proto__,n=e in(this.__proto__=null,this);return this.__proto__=t,n}:(t=n.constructor,y=function(e){var n=(this.constructor||t).prototype;return e in this&&!(e in n&&this[e]===n[e])}),n=null,y.call(this,e)}),d=function(e,t){var n,r,o,i=0;(n=function(){this.valueOf=0}).prototype.valueOf=0,r=new n;for(o in r)y.call(r,o)&&i++;return n=r=null,i?d=2==i?function(e,t){var n,r={},o=S.call(e)==w;for(n in e)o&&"prototype"==n||y.call(r,n)||!(r[n]=1)||!y.call(e,n)||t(n)}:function(e,t){var n,r,o=S.call(e)==w;for(n in e)o&&"prototype"==n||!y.call(e,n)||(r="constructor"===n)||t(n);(r||y.call(e,n="constructor"))&&t(n)}:(r=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],d=function(e,t){var n,o,i=S.call(e)==w,u=!i&&"function"!=typeof e.constructor&&c[typeof e.hasOwnProperty]&&e.hasOwnProperty||y;for(n in e)i&&"prototype"==n||!u.call(e,n)||t(n);for(o=r.length;n=r[--o];u.call(e,n)&&t(n));}),d(e,t)},!n("json-stringify")){var C={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},j="000000",R=function(e,t){return(j+(t||0)).slice(-e)},T="\\u00",P=function(e){for(var t='"',n=0,r=e.length,o=!E||r>10,i=o&&(E?e.split(""):e);r>n;n++){var u=e.charCodeAt(n);switch(u){case 8:case 9:case 10:case 12:case 13:case 34:case 92:t+=C[u];break;default:if(32>u){t+=T+R(2,u.toString(16));break}t+=o?i[n]:e.charAt(n)}}return t+'"'},M=function(e,t,n,r,o,i,u){var c,a,s,f,h,l,g,m,_,w,E,L,C,j,T,B;try{c=t[e]}catch(D){}if("object"==typeof c&&c)if(a=S.call(c),a!=b||y.call(c,"toJSON"))"function"==typeof c.toJSON&&(a!=q&&a!=k&&a!=x||y.call(c,"toJSON"))&&(c=c.toJSON(e));else if(c>-1/0&&1/0>c){if(O){for(h=I(c/864e5),s=I(h/365.2425)+1970-1;O(s+1,0)<=h;s++);for(f=I((h-O(s,0))/30.42);O(s,f+1)<=h;f++);h=1+h-O(s,f),l=(c%864e5+864e5)%864e5,g=I(l/36e5)%24,m=I(l/6e4)%60,_=I(l/1e3)%60,w=l%1e3}else s=c.getUTCFullYear(),f=c.getUTCMonth(),h=c.getUTCDate(),g=c.getUTCHours(),m=c.getUTCMinutes(),_=c.getUTCSeconds(),w=c.getUTCMilliseconds();c=(0>=s||s>=1e4?(0>s?"-":"+")+R(6,0>s?-s:s):R(4,s))+"-"+R(2,f+1)+"-"+R(2,h)+"T"+R(2,g)+":"+R(2,m)+":"+R(2,_)+"."+R(3,w)+"Z"}else c=null;if(n&&(c=n.call(t,e,c)),null===c)return"null";if(a=S.call(c),a==A)return""+c;if(a==q)return c>-1/0&&1/0>c?""+c:"null";if(a==k)return P(""+c);if("object"==typeof c){for(j=u.length;j--;)if(u[j]===c)throw p();if(u.push(c),E=[],T=i,i+=o,a==x){for(C=0,j=c.length;j>C;C++)L=M(C,c,n,r,o,i,u),E.push(L===v?"null":L);B=E.length?o?"[\n"+i+E.join(",\n"+i)+"\n"+T+"]":"["+E.join(",")+"]":"[]"}else d(r||c,function(e){var t=M(e,c,n,r,o,i,u);t!==v&&E.push(P(e)+":"+(o?" ":"")+t)}),B=E.length?o?"{\n"+i+E.join(",\n"+i)+"\n"+T+"}":"{"+E.join(",")+"}":"{}";return u.pop(),B}};t.stringify=function(e,t,n){var r,o,i,u;if(c[typeof t]&&t)if((u=S.call(t))==w)o=t;else if(u==x){i={};for(var a,s=0,f=t.length;f>s;a=t[s++],u=S.call(a),(u==k||u==q)&&(i[a]=1));}if(n)if((u=S.call(n))==q){if((n-=n%1)>0)for(r="",n>10&&(n=10);r.lengthB;)switch(o=i.charCodeAt(B)){case 9:case 10:case 13:case 32:B++;break;case 123:case 125:case 91:case 93:case 58:case 44:return e=E?i.charAt(B):i[B],B++,e;case 34:for(e="@",B++;u>B;)if(o=i.charCodeAt(B),32>o)U();else if(92==o)switch(o=i.charCodeAt(++B)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:e+=N[o],B++;break;case 117:for(t=++B,n=B+4;n>B;B++)o=i.charCodeAt(B),o>=48&&57>=o||o>=97&&102>=o||o>=65&&70>=o||U();e+=F("0x"+i.slice(t,B));break;default:U()}else{if(34==o)break;for(o=i.charCodeAt(B),t=B;o>=32&&92!=o&&34!=o;)o=i.charCodeAt(++B);e+=i.slice(t,B)}if(34==i.charCodeAt(B))return B++,e;U();default:if(t=B,45==o&&(r=!0,o=i.charCodeAt(++B)),o>=48&&57>=o){for(48==o&&(o=i.charCodeAt(B+1),o>=48&&57>=o)&&U(),r=!1;u>B&&(o=i.charCodeAt(B),o>=48&&57>=o);B++);if(46==i.charCodeAt(B)){for(n=++B;u>n&&(o=i.charCodeAt(n),o>=48&&57>=o);n++);n==B&&U(),B=n}if(o=i.charCodeAt(B),101==o||69==o){for(o=i.charCodeAt(++B),43!=o&&45!=o||B++,n=B;u>n&&(o=i.charCodeAt(n),o>=48&&57>=o);n++);n==B&&U(),B=n}return+i.slice(t,B)}if(r&&U(),"true"==i.slice(B,B+4))return B+=4,!0;if("false"==i.slice(B,B+5))return B+=5,!1;if("null"==i.slice(B,B+4))return B+=4,null;U()}return"$"},z=function(e){var t,n;if("$"==e&&U(),"string"==typeof e){if("@"==(E?e.charAt(0):e[0]))return e.slice(1);if("["==e){for(t=[];e=W(),"]"!=e;n||(n=!0))n&&(","==e?(e=W(),"]"==e&&U()):U()),","==e&&U(),t.push(z(e));return t}if("{"==e){for(t={};e=W(),"}"!=e;n||(n=!0))n&&(","==e?(e=W(),"}"==e&&U()):U()),","!=e&&"string"==typeof e&&"@"==(E?e.charAt(0):e[0])&&":"==W()||U(),t[e.slice(1)]=z(W());return t}U()}return e},Y=function(e,t,n){var r=H(e,t,n);r===v?delete e[t]:e[t]=r},H=function(e,t,n){var r,o=e[t];if("object"==typeof o&&o)if(S.call(o)==x)for(r=o.length;r--;)Y(o,r,n);else d(o,function(e){Y(o,e,n)});return n.call(e,t,o)};t.parse=function(e,t){var n,r;return B=0,D=""+e,n=z(W()),"$"!=W()&&U(),B=D=null,t&&S.call(t)==w?H((r={},r[""]=n,r),"",t):n}}}return t.runInContext=i,t}var u=n(106),c={"function":!0,object:!0},a=c[typeof t]&&t&&!t.nodeType&&t,s=c[typeof window]&&window||this,f=a&&c[typeof e]&&e&&!e.nodeType&&"object"==typeof o&&o;if(!f||f.global!==f&&f.window!==f&&f.self!==f||(s=f),a&&!u)i(s,a);else{var p=s.JSON,h=s.JSON3,l=!1,y=i(s,s.JSON3={noConflict:function(){return l||(l=!0,s.JSON=p,s.JSON3=h,p=h=null),y}});s.JSON={parse:y.parse,stringify:y.stringify}}u&&(r=function(){return y}.call(t,n,t,e),!(void 0!==r&&(e.exports=r)))}).call(this)}).call(t,n(105)(e),function(){return this}())},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t){(function(t){e.exports=t}).call(t,{})},function(e,t){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},function(e,t){function n(e){return e?r(e):void 0}function r(e){for(var t in n.prototype)e[t]=n.prototype[t];return e}e.exports=n,n.prototype.on=n.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[e]=this._callbacks[e]||[]).push(t),this},n.prototype.once=function(e,t){function n(){r.off(e,n),t.apply(this,arguments)}var r=this;return this._callbacks=this._callbacks||{},n.fn=t,this.on(e,n),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks[e];if(!n)return this;if(1==arguments.length)return delete this._callbacks[e],this;for(var r,o=0;or;++r)n[r].apply(this,t)}return this},n.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[e]||[]},n.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t,n){(function(e){var r=n(107),o=n(110);t.deconstructPacket=function(e){function t(e){if(!e)return e;if(o(e)){var i={_placeholder:!0,num:n.length};return n.push(e),i}if(r(e)){for(var u=new Array(e.length),c=0;c0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}},r.prototype.cleanup=function(){f("cleanup");for(var e;e=this.subs.shift();)e.destroy();this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},r.prototype.close=r.prototype.disconnect=function(){f("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"==this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},r.prototype.onclose=function(e){f("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",e),this._reconnection&&!this.skipReconnect&&this.reconnect()},r.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var e=this;if(this.backoff.attempts>=this._reconnectionAttempts)f("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var t=this.backoff.duration();f("will wait %dms before reconnect attempt",t),this.reconnecting=!0;var n=setTimeout(function(){e.skipReconnect||(f("attempting reconnect"),e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),e.skipReconnect||e.open(function(t){t?(f("reconnect attempt error"),e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",t.data)):(f("reconnect success"),e.onreconnect())}))},t);this.subs.push({destroy:function(){clearTimeout(n)}})}},r.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)}},function(e,t,n){e.exports=n(113)},function(e,t,n){e.exports=n(114),e.exports.parser=n(121)},function(e,t,n){(function(t){function r(e,n){if(!(this instanceof r))return new r(e,n);n=n||{},e&&"object"==typeof e&&(n=e,e=null),e?(e=f(e),n.hostname=e.host,n.secure="https"==e.protocol||"wss"==e.protocol,n.port=e.port,e.query&&(n.query=e.query)):n.host&&(n.hostname=f(n.host).host),this.secure=null!=n.secure?n.secure:t.location&&"https:"==location.protocol,n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.agent=n.agent||!1,this.hostname=n.hostname||(t.location?location.hostname:"localhost"),this.port=n.port||(t.location&&location.port?location.port:this.secure?443:80),this.query=n.query||{},"string"==typeof this.query&&(this.query=h.decode(this.query)),this.upgrade=!1!==n.upgrade,this.path=(n.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!n.forceJSONP,this.jsonp=!1!==n.jsonp,this.forceBase64=!!n.forceBase64,this.enablesXDR=!!n.enablesXDR,this.timestampParam=n.timestampParam||"t",this.timestampRequests=n.timestampRequests,this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.policyPort=n.policyPort||843,this.rememberUpgrade=n.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=n.onlyBinaryUpgrades,this.perMessageDeflate=!1!==n.perMessageDeflate?n.perMessageDeflate||{}:!1,!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=n.pfx||null,this.key=n.key||null,this.passphrase=n.passphrase||null,this.cert=n.cert||null,this.ca=n.ca||null,this.ciphers=n.ciphers||null,this.rejectUnauthorized=void 0===n.rejectUnauthorized?null:n.rejectUnauthorized;var o="object"==typeof t&&t;o.global===o&&n.extraHeaders&&Object.keys(n.extraHeaders).length>0&&(this.extraHeaders=n.extraHeaders),this.open()}function o(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var i=n(115),u=n(130),c=n(134)("engine.io-client:socket"),a=n(140),s=n(121),f=n(96),p=n(141),h=n(131);e.exports=r,r.priorWebsocketSuccess=!1,u(r.prototype),r.protocol=s.protocol,r.Socket=r,r.Transport=n(120),r.transports=n(115),r.parser=n(121),r.prototype.createTransport=function(e){c('creating transport "%s"',e);var t=o(this.query);t.EIO=s.protocol,t.transport=e,this.id&&(t.sid=this.id);var n=new i[e]({agent:this.agent,hostname:this.hostname,port:this.port,secure:this.secure,path:this.path,query:t,forceJSONP:this.forceJSONP,jsonp:this.jsonp,forceBase64:this.forceBase64,enablesXDR:this.enablesXDR,timestampRequests:this.timestampRequests,timestampParam:this.timestampParam,policyPort:this.policyPort,socket:this,pfx:this.pfx,key:this.key,passphrase:this.passphrase,cert:this.cert,ca:this.ca,ciphers:this.ciphers,rejectUnauthorized:this.rejectUnauthorized,perMessageDeflate:this.perMessageDeflate,extraHeaders:this.extraHeaders});return n},r.prototype.open=function(){var e;if(this.rememberUpgrade&&r.priorWebsocketSuccess&&-1!=this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length){var t=this;return void setTimeout(function(){t.emit("error","No transports available")},0)}e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e); }catch(n){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},r.prototype.setTransport=function(e){c("setting transport %s",e.name);var t=this;this.transport&&(c("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",function(){t.onDrain()}).on("packet",function(e){t.onPacket(e)}).on("error",function(e){t.onError(e)}).on("close",function(){t.onClose("transport close")})},r.prototype.probe=function(e){function t(){if(h.onlyBinaryUpgrades){var t=!this.supportsBinary&&h.transport.supportsBinary;p=p||t}p||(c('probe transport "%s" opened',e),f.send([{type:"ping",data:"probe"}]),f.once("packet",function(t){if(!p)if("pong"==t.type&&"probe"==t.data){if(c('probe transport "%s" pong',e),h.upgrading=!0,h.emit("upgrading",f),!f)return;r.priorWebsocketSuccess="websocket"==f.name,c('pausing current transport "%s"',h.transport.name),h.transport.pause(function(){p||"closed"!=h.readyState&&(c("changing transport and sending upgrade packet"),s(),h.setTransport(f),f.send([{type:"upgrade"}]),h.emit("upgrade",f),f=null,h.upgrading=!1,h.flush())})}else{c('probe transport "%s" failed',e);var n=new Error("probe error");n.transport=f.name,h.emit("upgradeError",n)}}))}function n(){p||(p=!0,s(),f.close(),f=null)}function o(t){var r=new Error("probe error: "+t);r.transport=f.name,n(),c('probe transport "%s" failed because of error: %s',e,t),h.emit("upgradeError",r)}function i(){o("transport closed")}function u(){o("socket closed")}function a(e){f&&e.name!=f.name&&(c('"%s" works - aborting "%s"',e.name,f.name),n())}function s(){f.removeListener("open",t),f.removeListener("error",o),f.removeListener("close",i),h.removeListener("close",u),h.removeListener("upgrading",a)}c('probing transport "%s"',e);var f=this.createTransport(e,{probe:1}),p=!1,h=this;r.priorWebsocketSuccess=!1,f.once("open",t),f.once("error",o),f.once("close",i),this.once("close",u),this.once("upgrading",a),f.open()},r.prototype.onOpen=function(){if(c("socket open"),this.readyState="open",r.priorWebsocketSuccess="websocket"==this.transport.name,this.emit("open"),this.flush(),"open"==this.readyState&&this.upgrade&&this.transport.pause){c("starting upgrade probes");for(var e=0,t=this.upgrades.length;t>e;e++)this.probe(this.upgrades[e])}},r.prototype.onPacket=function(e){if("opening"==this.readyState||"open"==this.readyState)switch(c('socket receive: type "%s", data "%s"',e.type,e.data),this.emit("packet",e),this.emit("heartbeat"),e.type){case"open":this.onHandshake(p(e.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emit("data",e.data),this.emit("message",e.data)}else c('packet received with socket readyState "%s"',this.readyState)},r.prototype.onHandshake=function(e){this.emit("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.onOpen(),"closed"!=this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},r.prototype.onHeartbeat=function(e){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout(function(){"closed"!=t.readyState&&t.onClose("ping timeout")},e||t.pingInterval+t.pingTimeout)},r.prototype.setPing=function(){var e=this;clearTimeout(e.pingIntervalTimer),e.pingIntervalTimer=setTimeout(function(){c("writing ping packet - expecting pong within %sms",e.pingTimeout),e.ping(),e.onHeartbeat(e.pingTimeout)},e.pingInterval)},r.prototype.ping=function(){var e=this;this.sendPacket("ping",function(){e.emit("ping")})},r.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},r.prototype.flush=function(){"closed"!=this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(c("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},r.prototype.write=r.prototype.send=function(e,t,n){return this.sendPacket("message",e,t,n),this},r.prototype.sendPacket=function(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n=null),"closing"!=this.readyState&&"closed"!=this.readyState){n=n||{},n.compress=!1!==n.compress;var o={type:e,data:t,options:n};this.emit("packetCreate",o),this.writeBuffer.push(o),r&&this.once("flush",r),this.flush()}},r.prototype.close=function(){function e(){r.onClose("forced close"),c("socket closing - telling transport to close"),r.transport.close()}function t(){r.removeListener("upgrade",t),r.removeListener("upgradeError",t),e()}function n(){r.once("upgrade",t),r.once("upgradeError",t)}if("opening"==this.readyState||"open"==this.readyState){this.readyState="closing";var r=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?n():e()}):this.upgrading?n():e()}return this},r.prototype.onError=function(e){c("socket error %j",e),r.priorWebsocketSuccess=!1,this.emit("error",e),this.onClose("transport error",e)},r.prototype.onClose=function(e,t){if("opening"==this.readyState||"open"==this.readyState||"closing"==this.readyState){c('socket close with reason: "%s"',e);var n=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",e,t),n.writeBuffer=[],n.prevBufferLen=0}},r.prototype.filterUpgrades=function(e){for(var t=[],n=0,r=e.length;r>n;n++)~a(this.transports,e[n])&&t.push(e[n]);return t}}).call(t,function(){return this}())},function(e,t,n){(function(e){function r(t){var n,r=!1,c=!1,a=!1!==t.jsonp;if(e.location){var s="https:"==location.protocol,f=location.port;f||(f=s?443:80),r=t.hostname!=location.hostname||f!=t.port,c=t.secure!=s}if(t.xdomain=r,t.xscheme=c,n=new o(t),"open"in n&&!t.forceJSONP)return new i(t);if(!a)throw new Error("JSONP disabled");return new u(t)}var o=n(116),i=n(118),u=n(137),c=n(138);t.polling=r,t.websocket=c}).call(t,function(){return this}())},function(e,t,n){var r=n(117);e.exports=function(e){var t=e.xdomain,n=e.xscheme,o=e.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!t||r))return new XMLHttpRequest}catch(i){}try{if("undefined"!=typeof XDomainRequest&&!n&&o)return new XDomainRequest}catch(i){}if(!t)try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(i){}}},function(e,t){try{e.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(n){e.exports=!1}},function(e,t,n){(function(t){function r(){}function o(e){if(a.call(this,e),t.location){var n="https:"==location.protocol,r=location.port;r||(r=n?443:80),this.xd=e.hostname!=t.location.hostname||r!=e.port,this.xs=e.secure!=n}else this.extraHeaders=e.extraHeaders}function i(e){this.method=e.method||"GET",this.uri=e.uri,this.xd=!!e.xd,this.xs=!!e.xs,this.async=!1!==e.async,this.data=void 0!=e.data?e.data:null,this.agent=e.agent,this.isBinary=e.isBinary,this.supportsBinary=e.supportsBinary,this.enablesXDR=e.enablesXDR,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.extraHeaders=e.extraHeaders,this.create()}function u(){for(var e in i.requests)i.requests.hasOwnProperty(e)&&i.requests[e].abort()}var c=n(116),a=n(119),s=n(130),f=n(132),p=n(134)("engine.io-client:polling-xhr");e.exports=o,e.exports.Request=i,f(o,a),o.prototype.supportsBinary=!0,o.prototype.request=function(e){return e=e||{},e.uri=this.uri(),e.xd=this.xd,e.xs=this.xs,e.agent=this.agent||!1,e.supportsBinary=this.supportsBinary,e.enablesXDR=this.enablesXDR,e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized,e.extraHeaders=this.extraHeaders,new i(e)},o.prototype.doWrite=function(e,t){var n="string"!=typeof e&&void 0!==e,r=this.request({method:"POST",data:e,isBinary:n}),o=this;r.on("success",t),r.on("error",function(e){o.onError("xhr post error",e)}),this.sendXhr=r},o.prototype.doPoll=function(){p("xhr poll");var e=this.request(),t=this;e.on("data",function(e){t.onData(e)}),e.on("error",function(e){t.onError("xhr poll error",e)}),this.pollXhr=e},s(i.prototype),i.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var n=this.xhr=new c(e),r=this;try{p("xhr open %s: %s",this.method,this.uri),n.open(this.method,this.uri,this.async);try{if(this.extraHeaders){n.setDisableHeaderCheck(!0);for(var o in this.extraHeaders)this.extraHeaders.hasOwnProperty(o)&&n.setRequestHeader(o,this.extraHeaders[o])}}catch(u){}if(this.supportsBinary&&(n.responseType="arraybuffer"),"POST"==this.method)try{this.isBinary?n.setRequestHeader("Content-type","application/octet-stream"):n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(u){}"withCredentials"in n&&(n.withCredentials=!0),this.hasXDR()?(n.onload=function(){r.onLoad()},n.onerror=function(){r.onError(n.responseText)}):n.onreadystatechange=function(){4==n.readyState&&(200==n.status||1223==n.status?r.onLoad():setTimeout(function(){r.onError(n.status)},0))},p("xhr data %s",this.data),n.send(this.data)}catch(u){return void setTimeout(function(){r.onError(u)},0)}t.document&&(this.index=i.requestsCount++,i.requests[this.index]=this)},i.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},i.prototype.onData=function(e){this.emit("data",e),this.onSuccess()},i.prototype.onError=function(e){this.emit("error",e),this.cleanup(!0)},i.prototype.cleanup=function(e){if("undefined"!=typeof this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=r:this.xhr.onreadystatechange=r,e)try{this.xhr.abort()}catch(n){}t.document&&delete i.requests[this.index],this.xhr=null}},i.prototype.onLoad=function(){var e;try{var t;try{t=this.xhr.getResponseHeader("Content-Type").split(";")[0]}catch(n){}if("application/octet-stream"===t)e=this.xhr.response;else if(this.supportsBinary)try{e=String.fromCharCode.apply(null,new Uint8Array(this.xhr.response))}catch(n){for(var r=new Uint8Array(this.xhr.response),o=[],i=0,u=r.length;u>i;i++)o.push(r[i]);e=String.fromCharCode.apply(null,o)}else e=this.xhr.responseText}catch(n){this.onError(n)}null!=e&&this.onData(e)},i.prototype.hasXDR=function(){return"undefined"!=typeof t.XDomainRequest&&!this.xs&&this.enablesXDR},i.prototype.abort=function(){this.cleanup()},t.document&&(i.requestsCount=0,i.requests={},t.attachEvent?t.attachEvent("onunload",u):t.addEventListener&&t.addEventListener("beforeunload",u,!1))}).call(t,function(){return this}())},function(e,t,n){function r(e){var t=e&&e.forceBase64;f&&!t||(this.supportsBinary=!1),o.call(this,e)}var o=n(120),i=n(131),u=n(121),c=n(132),a=n(133),s=n(134)("engine.io-client:polling");e.exports=r;var f=function(){var e=n(116),t=new e({xdomain:!1});return null!=t.responseType}();c(r,o),r.prototype.name="polling",r.prototype.doOpen=function(){this.poll()},r.prototype.pause=function(e){function t(){s("paused"),n.readyState="paused",e()}var n=this;if(this.readyState="pausing",this.polling||!this.writable){var r=0;this.polling&&(s("we are currently polling - waiting to pause"),r++,this.once("pollComplete",function(){s("pre-pause polling complete"),--r||t()})),this.writable||(s("we are currently writing - waiting to pause"),r++,this.once("drain",function(){s("pre-pause writing complete"),--r||t()}))}else t()},r.prototype.poll=function(){s("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},r.prototype.onData=function(e){var t=this;s("polling got data %s",e);var n=function(e,n,r){return"opening"==t.readyState&&t.onOpen(),"close"==e.type?(t.onClose(),!1):void t.onPacket(e)};u.decodePayload(e,this.socket.binaryType,n),"closed"!=this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"==this.readyState?this.poll():s('ignoring poll - transport state "%s"',this.readyState))},r.prototype.doClose=function(){function e(){s("writing close packet"),t.write([{type:"close"}])}var t=this;"open"==this.readyState?(s("transport open - closing"),e()):(s("transport not open - deferring close"),this.once("open",e))},r.prototype.write=function(e){var t=this;this.writable=!1;var n=function(){t.writable=!0,t.emit("drain")},t=this;u.encodePayload(e,this.supportsBinary,function(e){t.doWrite(e,n)})},r.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",n="";!1!==this.timestampRequests&&(e[this.timestampParam]=a()),this.supportsBinary||e.sid||(e.b64=1),e=i.encode(e),this.port&&("https"==t&&443!=this.port||"http"==t&&80!=this.port)&&(n=":"+this.port),e.length&&(e="?"+e);var r=-1!==this.hostname.indexOf(":");return t+"://"+(r?"["+this.hostname+"]":this.hostname)+n+this.path+e}},function(e,t,n){function r(e){this.path=e.path,this.hostname=e.hostname,this.port=e.port,this.secure=e.secure,this.query=e.query,this.timestampParam=e.timestampParam,this.timestampRequests=e.timestampRequests,this.readyState="",this.agent=e.agent||!1,this.socket=e.socket,this.enablesXDR=e.enablesXDR,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.extraHeaders=e.extraHeaders}var o=n(121),i=n(130);e.exports=r,i(r.prototype),r.prototype.onError=function(e,t){var n=new Error(e);return n.type="TransportError",n.description=t,this.emit("error",n),this},r.prototype.open=function(){return"closed"!=this.readyState&&""!=this.readyState||(this.readyState="opening",this.doOpen()),this},r.prototype.close=function(){return"opening"!=this.readyState&&"open"!=this.readyState||(this.doClose(),this.onClose()),this},r.prototype.send=function(e){if("open"!=this.readyState)throw new Error("Transport not open");this.write(e)},r.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},r.prototype.onData=function(e){var t=o.decodePacket(e,this.socket.binaryType);this.onPacket(t)},r.prototype.onPacket=function(e){this.emit("packet",e)},r.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},function(e,t,n){(function(e){function r(e,n){var r="b"+t.packets[e.type]+e.data.data;return n(r)}function o(e,n,r){if(!n)return t.encodeBase64Packet(e,r);var o=e.data,i=new Uint8Array(o),u=new Uint8Array(1+o.byteLength);u[0]=g[e.type];for(var c=0;c1?{type:S[i],data:e.substring(1)}:{type:S[i]}:m}var u=new Uint8Array(e),i=u[0],c=f(e,1);return _&&"blob"===n&&(c=new _([c])),{type:S[i],data:c}},t.decodeBase64Packet=function(t,n){var r=S[t.charAt(0)];if(!e.ArrayBuffer)return{type:r,data:{base64:!0,data:t.substr(1)}};var o=p.decode(t.substr(1));return"blob"===n&&_&&(o=new _([o])),{type:r,data:o}},t.encodePayload=function(e,n,r){function o(e){return e.length+":"+e}function i(e,r){t.encodePacket(e,u?n:!1,!0,function(e){r(null,o(e))})}"function"==typeof n&&(r=n,n=null);var u=s(e);return n&&u?_&&!v?t.encodePayloadAsBlob(e,r):t.encodePayloadAsArrayBuffer(e,r):e.length?void c(e,i,function(e,t){return r(t.join(""))}):r("0:")},t.decodePayload=function(e,n,r){if("string"!=typeof e)return t.decodePayloadAsBinary(e,n,r);"function"==typeof n&&(r=n,n=null);var o;if(""==e)return r(m,0,1);for(var i,u,c="",a=0,s=e.length;s>a;a++){var f=e.charAt(a);if(":"!=f)c+=f;else{if(""==c||c!=(i=Number(c)))return r(m,0,1);if(u=e.substr(a+1,i),c!=u.length)return r(m,0,1);if(u.length){if(o=t.decodePacket(u,n,!0),m.type==o.type&&m.data==o.data)return r(m,0,1);var p=r(o,a+i,s);if(!1===p)return}a+=i,c=""}}return""!=c?r(m,0,1):void 0},t.encodePayloadAsArrayBuffer=function(e,n){function r(e,n){t.encodePacket(e,!0,!0,function(e){return n(null,e)})}return e.length?void c(e,r,function(e,t){var r=t.reduce(function(e,t){var n;return n="string"==typeof t?t.length:t.byteLength,e+n.toString().length+n+2},0),o=new Uint8Array(r),i=0;return t.forEach(function(e){var t="string"==typeof e,n=e;if(t){for(var r=new Uint8Array(e.length),u=0;u0;){for(var c=new Uint8Array(o),a=0===c[0],s="",p=1;255!=c[p];p++){if(s.length>310){u=!0;break}s+=c[p]}if(u)return r(m,0,1);o=f(o,2+s.length),s=parseInt(s);var h=f(o,0,s);if(a)try{h=String.fromCharCode.apply(null,new Uint8Array(h))}catch(l){var y=new Uint8Array(h);h="";for(var p=0;pt&&(t+=r),0>n&&(n+=r),n>r&&(n=r),t>=r||t>=n||0===r)return new ArrayBuffer(0);for(var o=new Uint8Array(e),i=new Uint8Array(n-t),u=t,c=0;n>u;u++,c++)i[c]=o[u];return i.buffer}},function(e,t){!function(e){"use strict";t.encode=function(t){var n,r=new Uint8Array(t),o=r.length,i="";for(n=0;o>n;n+=3)i+=e[r[n]>>2],i+=e[(3&r[n])<<4|r[n+1]>>4],i+=e[(15&r[n+1])<<2|r[n+2]>>6],i+=e[63&r[n+2]];return o%3===2?i=i.substring(0,i.length-1)+"=":o%3===1&&(i=i.substring(0,i.length-2)+"=="),i},t.decode=function(t){var n,r,o,i,u,c=.75*t.length,a=t.length,s=0;"="===t[t.length-1]&&(c--,"="===t[t.length-2]&&c--);var f=new ArrayBuffer(c),p=new Uint8Array(f);for(n=0;a>n;n+=4)r=e.indexOf(t[n]),o=e.indexOf(t[n+1]),i=e.indexOf(t[n+2]),u=e.indexOf(t[n+3]),p[s++]=r<<2|o>>4,p[s++]=(15&o)<<4|i>>2,p[s++]=(3&i)<<6|63&u;return f}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},function(e,t){function n(e,t,n){function o(e,r){if(o.count<=0)throw new Error("after called too many times");--o.count,e?(i=!0,t(e),t=n):0!==o.count||i||t(null,r)}var i=!1;return n=n||r,o.count=e,0===e?t():o}function r(){}e.exports=n},function(e,t,n){var r;(function(e,o){!function(i){function u(e){for(var t,n,r=[],o=0,i=e.length;i>o;)t=e.charCodeAt(o++),t>=55296&&56319>=t&&i>o?(n=e.charCodeAt(o++),56320==(64512&n)?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--)):r.push(t);return r}function c(e){for(var t,n=e.length,r=-1,o="";++r65535&&(t-=65536,o+=_(t>>>10&1023|55296),t=56320|1023&t),o+=_(t);return o}function a(e){if(e>=55296&&57343>=e)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}function s(e,t){return _(e>>t&63|128)}function f(e){if(0==(4294967168&e))return _(e);var t="";return 0==(4294965248&e)?t=_(e>>6&31|192):0==(4294901760&e)?(a(e),t=_(e>>12&15|224),t+=s(e,6)):0==(4292870144&e)&&(t=_(e>>18&7|240),t+=s(e,12),t+=s(e,6)),t+=_(63&e|128)}function p(e){for(var t,n=u(e),r=n.length,o=-1,i="";++o=S)throw Error("Invalid byte index");var e=255&g[m];if(m++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function l(){var e,t,n,r,o;if(m>S)throw Error("Invalid byte index");if(m==S)return!1;if(e=255&g[m],m++,0==(128&e))return e;if(192==(224&e)){var t=h();if(o=(31&e)<<6|t,o>=128)return o;throw Error("Invalid continuation byte")}if(224==(240&e)){if(t=h(),n=h(),o=(15&e)<<12|t<<6|n,o>=2048)return a(o),o;throw Error("Invalid continuation byte")}if(240==(248&e)&&(t=h(),n=h(),r=h(),o=(15&e)<<18|t<<12|n<<6|r,o>=65536&&1114111>=o))return o;throw Error("Invalid UTF-8 detected")}function y(e){g=u(e),S=g.length,m=0;for(var t,n=[];(t=l())!==!1;)n.push(t);return c(n)}var d="object"==typeof t&&t,v=("object"==typeof e&&e&&e.exports==d&&e,"object"==typeof o&&o);v.global!==v&&v.window!==v||(i=v);var g,S,m,_=String.fromCharCode,w={version:"2.0.0",encode:p,decode:y};r=function(){return w}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))}(this)}).call(t,n(105)(e),function(){return this}())},function(e,t){(function(t){function n(e){for(var t=0;tr;++r)n[r].apply(this,t)}return this},n.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[e]||[]},n.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t){t.encode=function(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t},t.decode=function(e){for(var t={},n=e.split("&"),r=0,o=n.length;o>r;r++){var i=n[r].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}},function(e,t){e.exports=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){"use strict";function n(e){var t="";do t=u[e%c]+t,e=Math.floor(e/c);while(e>0);return t}function r(e){var t=0;for(f=0;ff;f++)a[u[f]]=f;o.encode=n,o.decode=r,e.exports=o},function(e,t,n){function r(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function o(){var e=arguments,n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return e;var r="color: "+this.color;e=[e[0],r,"color: inherit"].concat(Array.prototype.slice.call(e,1));var o=0,i=0;return e[0].replace(/%[a-z%]/g,function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))}),e.splice(i,0,r),e}function i(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function u(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(n){}}function c(){var e;try{e=t.storage.debug}catch(n){}return e}function a(){try{return window.localStorage}catch(e){}}t=e.exports=n(135),t.log=i,t.formatArgs=o,t.save=u,t.load=c,t.useColors=r,t.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:a(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){return JSON.stringify(e)},t.enable(c())},function(e,t,n){function r(){return t.colors[f++%t.colors.length]}function o(e){function n(){}function o(){var e=o,n=+new Date,i=n-(s||n);e.diff=i,e.prev=s,e.curr=n,s=n,null==e.useColors&&(e.useColors=t.useColors()),null==e.color&&e.useColors&&(e.color=r());var u=Array.prototype.slice.call(arguments);u[0]=t.coerce(u[0]),"string"!=typeof u[0]&&(u=["%o"].concat(u));var c=0;u[0]=u[0].replace(/%([a-z%])/g,function(n,r){if("%%"===n)return n;c++;var o=t.formatters[r];if("function"==typeof o){var i=u[c];n=o.call(e,i),u.splice(c,1),c--}return n}),"function"==typeof t.formatArgs&&(u=t.formatArgs.apply(e,u));var a=o.log||t.log||console.log.bind(console);a.apply(e,u)}n.enabled=!1,o.enabled=!0;var i=t.enabled(e)?o:n;return i.namespace=e,i}function i(e){t.save(e);for(var n=(e||"").split(/[\s,]+/),r=n.length,o=0;r>o;o++)n[o]&&(e=n[o].replace(/\*/g,".*?"),"-"===e[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))}function u(){t.enable("")}function c(e){var n,r;for(n=0,r=t.skips.length;r>n;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;r>n;n++)if(t.names[n].test(e))return!0;return!1}function a(e){return e instanceof Error?e.stack||e.message:e}t=e.exports=o,t.coerce=a,t.disable=u,t.enable=i,t.enabled=c,t.humanize=n(136),t.names=[],t.skips=[],t.formatters={};var s,f=0},function(e,t){function n(e){if(e=""+e,!(e.length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),r=(t[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*f;case"days":case"day":case"d":return n*s;case"hours":case"hour":case"hrs":case"hr":case"h":return n*a;case"minutes":case"minute":case"mins":case"min":case"m":return n*c;case"seconds":case"second":case"secs":case"sec":case"s":return n*u;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n}}}}function r(e){return e>=s?Math.round(e/s)+"d":e>=a?Math.round(e/a)+"h":e>=c?Math.round(e/c)+"m":e>=u?Math.round(e/u)+"s":e+"ms"}function o(e){return i(e,s,"day")||i(e,a,"hour")||i(e,c,"minute")||i(e,u,"second")||e+" ms"}function i(e,t,n){return t>e?void 0:1.5*t>e?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}var u=1e3,c=60*u,a=60*c,s=24*a,f=365.25*s;e.exports=function(e,t){return t=t||{},"string"==typeof e?n(e):t["long"]?o(e):r(e)}},function(e,t,n){(function(t){function r(){}function o(e){i.call(this,e),this.query=this.query||{},c||(t.___eio||(t.___eio=[]),c=t.___eio),this.index=c.length;var n=this;c.push(function(e){n.onData(e)}),this.query.j=this.index,t.document&&t.addEventListener&&t.addEventListener("beforeunload",function(){n.script&&(n.script.onerror=r)},!1)}var i=n(119),u=n(132);e.exports=o;var c,a=/\n/g,s=/\\n/g;u(o,i),o.prototype.supportsBinary=!1,o.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),i.prototype.doClose.call(this)},o.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(t){e.onError("jsonp poll error",t)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(t,n):(document.head||document.body).appendChild(t),this.script=t;var r="undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent);r&&setTimeout(function(){var e=document.createElement("iframe");document.body.appendChild(e),document.body.removeChild(e)},100)},o.prototype.doWrite=function(e,t){function n(){r(),t()}function r(){if(o.iframe)try{o.form.removeChild(o.iframe)}catch(e){o.onError("jsonp polling iframe removal error",e)}try{var t='