From 3a2b8c6c8b43e97caf89a451825626119adc01d7 Mon Sep 17 00:00:00 2001 From: Endel Dreyer Date: Tue, 20 Oct 2020 15:32:27 -0300 Subject: [PATCH] update dist file --- plugin/colyseus.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/colyseus.js b/plugin/colyseus.js index 5c4bcd9..bbfbf3a 100644 --- a/plugin/colyseus.js +++ b/plugin/colyseus.js @@ -1,2 +1,2 @@ -/*! colyseus.js@0.14.0-alpha.19 */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Colyseus=t():e.Colyseus=t()}(self||this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=18)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OPERATION=t.TYPE_ID=t.SWITCH_TO_STRUCTURE=void 0,t.SWITCH_TO_STRUCTURE=255,t.TYPE_ID=213,function(e){e[e.ADD=128]="ADD",e[e.REPLACE=0]="REPLACE",e[e.DELETE=64]="DELETE",e[e.DELETE_AND_ADD=192]="DELETE_AND_ADD",e[e.TOUCH=1]="TOUCH",e[e.CLEAR=10]="CLEAR"}(t.OPERATION||(t.OPERATION={}))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s};Object.defineProperty(t,"__esModule",{value:!0}),t.Schema=void 0;var s=n(0),a=n(6),u=n(12),c=n(13),f=n(4),h=n(5),l=n(16),p=n(17),d=n(3),y=n(38),v=n(39),g=n(2),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(Error);function _(e,t,n,r){if(!(e instanceof t))throw new m("a '"+t.name+"' was expected, but '"+e.constructor.name+"' was provided in "+n.constructor.name+"#"+r)}function b(e,t,n,r,i){!function(e,t,n,r){var i,o=!1;switch(t){case"number":case"int8":case"uint8":case"int16":case"uint16":case"int32":case"uint32":case"int64":case"uint64":case"float32":case"float64":i="number",isNaN(e)&&console.log('trying to encode "NaN" in '+n.constructor.name+"#"+r);break;case"string":i="string",o=!0;break;case"boolean":return}if(typeof e!==i&&(!o||o&&null!==e)){var s="'"+JSON.stringify(e)+"'"+(e&&e.constructor&&" ("+e.constructor.name+")"||"");throw new m("a '"+i+"' was expected, but "+s+" was provided in "+n.constructor.name+"#"+r)}}(n,e,r,i);var o=u[e];if(!o)throw new m("a '"+e+"' was expected, but "+n+" was provided in "+r.constructor.name+"#"+i);o(t,n)}function w(e,t,n){return c[e](t,n)}var O=function(){function e(){for(var e=[],t=0;t>6<<6:v;if(b!==s.OPERATION.CLEAR){var O=_?v%(b||255):c.number(t,n),A=_?r._definition.fieldsByIndex[O]:"",E=m.getType(O),I=void 0,$=void 0,S=void 0;if(_?$=r["_"+A]:($=r.getByIndex(O),(b&s.OPERATION.ADD)===s.OPERATION.ADD?(S=r instanceof h.MapSchema?c.string(t,n):O,r.setIndex(O,S)):S=r.getIndex(O)),(b&s.OPERATION.DELETE)===s.OPERATION.DELETE&&(b!==s.OPERATION.DELETE_AND_ADD&&r.deleteByIndex(O),$&&$.$changes&&a.removeRef($.$changes.refId),I=null),void 0!==A){if(b===s.OPERATION.DELETE);else if(e.is(E)){var P=c.number(t,n);if(I=a.refs.get(P),b!==s.OPERATION.REPLACE){var x=this.getSchemaType(t,n,E);I||((I=this.createTypeInstance(x)).$changes.refId=P,$&&(I.onChange=$.onChange,I.onRemove=$.onRemove,I.$listeners=$.$listeners,$.$changes.refId&&P!==$.$changes.refId&&a.removeRef($.$changes.refId))),a.addRef(P,I,I!==$)}}else if("string"==typeof E)I=w(E,t,n);else{var C=g.getType(Object.keys(E)[0]),R=c.number(t,n),T=a.refs.has(R)?$:new C.constructor;if((I=T.clone(!0)).$changes.refId=R,$&&(I.onAdd=$.onAdd,I.onRemove=$.onRemove,I.onChange=$.onChange,$.$changes.refId&&R!==$.$changes.refId)){a.removeRef($.$changes.refId);for(var M=[],k=$.entries(),j=void 0;(j=k.next())&&!j.done;){var N=o(j.value,2),D=N[0],L=N[1];M.push({op:s.OPERATION.DELETE,field:D,value:void 0,previousValue:L})}i.set($.$changes.refId,M)}a.addRef(R,I,T!==$),C.getProxy&&(I=C.getProxy(I))}var U=$!==I;if(null!=I)if(I.$changes&&I.$changes.setParent(m.ref,m.root,O),r instanceof e)r[A]=I;else if(r instanceof h.MapSchema){D=S;r.$items.set(D,I)}else if(r instanceof f.ArraySchema)r.setAt(O,I);else if(r instanceof l.CollectionSchema||r instanceof p.SetSchema){var z=r.add(I);r.setIndex(O,z)}U&&y.push({op:b,field:A,dynamicIndex:S,value:I,previousValue:$})}else{console.warn("@colyseus/schema: definition mismatch");for(var F={offset:n.offset};n.offset0&&(f.changed||t)&&(u.uint8(n,s.SWITCH_TO_STRUCTURE),u.number(n,f.refId));for(var d=t?Array.from(f.allChanges):Array.from(f.changes.values()),y=0,v=d.length;y0){for(var g=n.$changes.root.refs.get(r),m=g instanceof e,_=0;_0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spread||function(){for(var e=[],t=0;tr?1:0};function f(e){return e.$proxy=!0,e=new Proxy(e,{get:function(e,t){return"symbol"==typeof t||isNaN(t)?e[t]:e.at(t)},set:function(e,t,n){if("symbol"==typeof t||isNaN(t))e[t]=n;else{var r=Array.from(e.$items.keys()),i=parseInt(r[t]||t);null==n?e.deleteAt(i):e.setAt(i,n)}return!0},deleteProperty:function(e,t){return"number"==typeof t?e.deleteAt(t):delete e[t],!0}})}t.getArrayProxy=f;var h=function(){function e(){for(var e=[],t=0;t0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spread||function(){for(var e=[],t=0;t=400?o:i)(f)},(a=r.body)&&"object"==typeof a&&(h["content-type"]="application/json",a=JSON.stringify(a)),f.withCredentials=!!r.withCredentials,h)f.setRequestHeader(s,h[s]);f.send(a)}))},t.get=t.send.bind(t.send,"GET"),t.post=t.send.bind(t.send,"POST"),t.patch=t.send.bind(t.send,"PATCH"),t.del=t.send.bind(t.send,"DELETE"),t.put=t.send.bind(t.send,"PUT")},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Room=void 0;var s=o(n(9)),a=n(24),u=n(25),c=n(26),f=n(10),h=n(11),l=o(n(12)),p=o(n(13)),d=function(){function e(e,t){var n=this;this.onStateChange=a.createSignal(),this.onError=a.createSignal(),this.onLeave=a.createSignal(),this.onJoin=a.createSignal(),this.hasJoined=!1,this.onMessageHandlers=u.createNanoEvents(),this.id=null,this.name=e,t&&(this.serializer=new(f.getSerializer("schema")),this.rootSchema=t,this.serializer.state=new t),this.onError((function(e,t){return console.warn("colyseus.js - onError => ("+e+") "+t)})),this.onLeave((function(){return n.removeAllListeners()}))}return e.prototype.connect=function(e){var t=this;this.connection=new c.Connection(e,!1),this.connection.reconnectEnabled=!1,this.connection.onmessage=this.onMessageCallback.bind(this),this.connection.onclose=function(e){if(!t.hasJoined)return console.warn("Room connection was closed unexpectedly ("+e.code+"): "+e.reason),void t.onError.invoke(e.code,e.reason);t.onLeave.invoke(e.code)},this.connection.onerror=function(e){console.warn("Room, onError ("+e.code+"): "+e.reason),t.onError.invoke(e.code,e.reason)},this.connection.open()},e.prototype.leave=function(e){void 0===e&&(e=!0),this.connection?e?this.connection.send([h.Protocol.LEAVE_ROOM]):this.connection.close():this.onLeave.invoke(4e3)},e.prototype.onMessage=function(e,t){return this.onMessageHandlers.on(this.getMessageHandlerKey(e),t)},e.prototype.send=function(e,t){var n,r=[h.Protocol.ROOM_DATA];if("string"==typeof e?l.string(r,e):l.number(r,e),void 0!==t){var i=s.encode(t);(n=new Uint8Array(r.length+i.byteLength)).set(new Uint8Array(r),0),n.set(new Uint8Array(i),r.length)}else n=new Uint8Array(r);this.connection.send(n.buffer)},Object.defineProperty(e.prototype,"state",{get:function(){return this.serializer.getState()},enumerable:!1,configurable:!0}),e.prototype.listen=function(e,t,n){if("schema"!==this.serializerId)return this.serializerId||console.warn("room.Listen() should be called after room.onJoin has been called (DEPRECATION WARNING)"),this.serializer.api.listen(e,t,n);console.warn("'"+this.serializerId+"' serializer doesn't support .listen() method here.")},e.prototype.removeListener=function(e){return this.serializer.api.removeListener(e)},e.prototype.removeAllListeners=function(){this.serializer&&this.serializer.teardown(),this.onJoin.clear(),this.onStateChange.clear(),this.onError.clear(),this.onLeave.clear(),this.onMessageHandlers.events={}},e.prototype.onMessageCallback=function(e){var t=Array.from(new Uint8Array(e.data)),n=t[0];if(n===h.Protocol.JOIN_ROOM){var r=1;if(this.serializerId=h.utf8Read(t,r),r+=h.utf8Length(this.serializerId),!this.serializer){var i=f.getSerializer(this.serializerId);this.serializer=new i}t.length>r&&this.serializer.handshake&&this.serializer.handshake(t,{offset:r}),this.hasJoined=!0,this.onJoin.invoke(),this.connection.send([h.Protocol.JOIN_ROOM])}else if(n===h.Protocol.ERROR){var o={offset:1},a=p.number(t,o),u=p.string(t,o);this.onError.invoke(a,u)}else if(n===h.Protocol.LEAVE_ROOM)this.leave();else if(n===h.Protocol.ROOM_DATA_SCHEMA){(u=new(l=this.serializer.getState().constructor._context.get(t[1]))).decode(t,{offset:2}),this.dispatchMessage(l,u)}else if(n===h.Protocol.ROOM_STATE)t.shift(),this.setState(t);else if(n===h.Protocol.ROOM_STATE_PATCH)t.shift(),this.patch(t);else if(n===h.Protocol.ROOM_DATA){var c={offset:1},l=p.stringCheck(t,c)?p.string(t,c):p.number(t,c);u=t.length>c.offset?s.decode(e.data,c.offset):void 0;this.dispatchMessage(l,u)}},e.prototype.setState=function(e){this.serializer.setState(e),this.onStateChange.invoke(this.serializer.getState())},e.prototype.patch=function(e){this.serializer.patch(e),this.onStateChange.invoke(this.serializer.getState())},e.prototype.dispatchMessage=function(e,t){var n=this.getMessageHandlerKey(e);this.onMessageHandlers.events[n]?this.onMessageHandlers.emit(n,t):this.onMessageHandlers.events["*"]?this.onMessageHandlers.emit("*",e,t):console.warn("onMessage not registered for type '"+e+"'.")},e.prototype.getMessageHandlerKey=function(e){switch(typeof e){case"function":return"$"+e._typeid;case"string":return e;case"number":return"i"+e;default:throw new Error("invalid message type.")}},e}();t.Room=d},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.encode=t.decode=void 0;var i=r(n(22)),o=r(n(23));t.decode=i.default,t.encode=o.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSerializer=t.registerSerializer=void 0;var r={};t.registerSerializer=function(e,t){r[e]=t},t.getSerializer=function(e){var t=r[e];if(!t)throw new Error("missing serializer: "+e);return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.utf8Length=t.utf8Read=t.ErrorCode=t.Protocol=void 0,function(e){e[e.HANDSHAKE=9]="HANDSHAKE",e[e.JOIN_ROOM=10]="JOIN_ROOM",e[e.ERROR=11]="ERROR",e[e.LEAVE_ROOM=12]="LEAVE_ROOM",e[e.ROOM_DATA=13]="ROOM_DATA",e[e.ROOM_STATE=14]="ROOM_STATE",e[e.ROOM_STATE_PATCH=15]="ROOM_STATE_PATCH",e[e.ROOM_DATA_SCHEMA=16]="ROOM_DATA_SCHEMA"}(t.Protocol||(t.Protocol={})),function(e){e[e.MATCHMAKE_NO_HANDLER=4210]="MATCHMAKE_NO_HANDLER",e[e.MATCHMAKE_INVALID_CRITERIA=4211]="MATCHMAKE_INVALID_CRITERIA",e[e.MATCHMAKE_INVALID_ROOM_ID=4212]="MATCHMAKE_INVALID_ROOM_ID",e[e.MATCHMAKE_UNHANDLED=4213]="MATCHMAKE_UNHANDLED",e[e.MATCHMAKE_EXPIRED=4214]="MATCHMAKE_EXPIRED",e[e.AUTH_FAILED=4215]="AUTH_FAILED",e[e.APPLICATION_ERROR=4216]="APPLICATION_ERROR"}(t.ErrorCode||(t.ErrorCode={})),t.utf8Read=function(e,t){for(var n=e[t++],r="",i=0,o=t,s=t+n;o=65536?(i-=65536,r+=String.fromCharCode(55296+(i>>>10),56320+(1023&i))):r+=String.fromCharCode(i)}else r+=String.fromCharCode((15&a)<<12|(63&e[++o])<<6|(63&e[++o])<<0);else r+=String.fromCharCode((31&a)<<6|63&e[++o]);else r+=String.fromCharCode(a)}return r},t.utf8Length=function(e){void 0===e&&(e="");for(var t=0,n=0,r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n+1}},function(e,t,n){"use strict";function r(e,t,n){for(var r=0,i=0,o=n.length;i>6,e[t++]=128|63&r):r<55296||r>=57344?(e[t++]=224|r>>12,e[t++]=128|r>>6&63,e[t++]=128|63&r):(i++,r=65536+((1023&r)<<10|1023&n.charCodeAt(i)),e[t++]=240|r>>18,e[t++]=128|r>>12&63,e[t++]=128|r>>6&63,e[t++]=128|63&r)}function i(e,t){e.push(255&t)}function o(e,t){e.push(255&t)}function s(e,t){e.push(255&t),e.push(t>>8&255)}function a(e,t){e.push(255&t),e.push(t>>8&255)}function u(e,t){e.push(255&t),e.push(t>>8&255),e.push(t>>16&255),e.push(t>>24&255)}function c(e,t){var n=t>>24,r=t>>16,i=t>>8,o=t;e.push(255&o),e.push(255&i),e.push(255&r),e.push(255&n)}function f(e,t){var n=Math.floor(t/Math.pow(2,32));c(e,t>>>0),c(e,n)}function h(e,t){var n=t/Math.pow(2,32)>>0;c(e,t>>>0),c(e,n)}Object.defineProperty(t,"__esModule",{value:!0}),t.number=t.string=t.boolean=t.writeFloat64=t.writeFloat32=t.float64=t.float32=t.uint64=t.int64=t.uint32=t.int32=t.uint16=t.int16=t.uint8=t.int8=t.utf8Write=void 0,t.utf8Write=r,t.int8=i,t.uint8=o,t.int16=s,t.uint16=a,t.int32=u,t.uint32=c,t.int64=f,t.uint64=h,t.float32=function(e,t){y(e,t)},t.float64=function(e,t){v(e,t)};var l=new Int32Array(2),p=new Float32Array(l.buffer),d=new Float64Array(l.buffer);function y(e,t){p[0]=t,u(e,l[0])}function v(e,t){d[0]=t,u(e,l[0]),u(e,l[1])}t.writeFloat32=y,t.writeFloat64=v,t.boolean=function(e,t){return o(e,t?1:0)},t.string=function(e,t){t||(t="");var n=function(e){for(var t=0,n=0,r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}(t),i=0;if(n<32)e.push(160|n),i=1;else if(n<256)e.push(217),o(e,n),i=2;else if(n<65536)e.push(218),a(e,n),i=3;else{if(!(n<4294967296))throw new Error("String too long");e.push(219),c(e,n),i=5}return r(e,e.length,t),i+n},t.number=function e(t,n){return isNaN(n)?e(t,0):isFinite(n)?n!==(0|n)?(t.push(203),v(t,n),9):n>=0?n<128?(o(t,n),1):n<256?(t.push(204),o(t,n),2):n<65536?(t.push(205),a(t,n),3):n<4294967296?(t.push(206),c(t,n),5):(t.push(207),h(t,n),9):n>=-32?(t.push(224|n+32),1):n>=-128?(t.push(208),i(t,n),2):n>=-32768?(t.push(209),s(t,n),3):n>=-2147483648?(t.push(210),u(t,n),5):(t.push(211),f(t,n),9):e(t,n>0?Number.MAX_SAFE_INTEGER:-Number.MAX_SAFE_INTEGER)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchStructureCheck=t.arrayCheck=t.numberCheck=t.number=t.stringCheck=t.string=t.boolean=t.readFloat64=t.readFloat32=t.uint64=t.int64=t.float64=t.float32=t.uint32=t.int32=t.uint16=t.int16=t.uint8=t.int8=void 0;var r=n(0);function i(e,t){return o(e,t)<<24>>24}function o(e,t){return e[t.offset++]}function s(e,t){return a(e,t)<<16>>16}function a(e,t){return e[t.offset++]|e[t.offset++]<<8}function u(e,t){return e[t.offset++]|e[t.offset++]<<8|e[t.offset++]<<16|e[t.offset++]<<24}function c(e,t){return u(e,t)>>>0}function f(e,t){var n=c(e,t);return u(e,t)*Math.pow(2,32)+n}function h(e,t){var n=c(e,t);return c(e,t)*Math.pow(2,32)+n}t.int8=i,t.uint8=o,t.int16=s,t.uint16=a,t.int32=u,t.uint32=c,t.float32=function(e,t){return y(e,t)},t.float64=function(e,t){return v(e,t)},t.int64=f,t.uint64=h;var l=new Int32Array(2),p=new Float32Array(l.buffer),d=new Float64Array(l.buffer);function y(e,t){return l[0]=u(e,t),p[0]}function v(e,t){return l[0]=u(e,t),l[1]=u(e,t),d[0]}t.readFloat32=y,t.readFloat64=v,t.boolean=function(e,t){return o(e,t)>0},t.string=function(e,t){var n,r=e[t.offset++];r<192?n=31&r:217===r?n=o(e,t):218===r?n=a(e,t):219===r&&(n=c(e,t));var i=function(e,t,n){for(var r="",i=0,o=t,s=t+n;o=65536?(i-=65536,r+=String.fromCharCode(55296+(i>>>10),56320+(1023&i))):r+=String.fromCharCode(i):r+=String.fromCharCode((15&a)<<12|(63&e[++o])<<6|(63&e[++o])<<0):r+=String.fromCharCode((31&a)<<6|63&e[++o]):r+=String.fromCharCode(a)}return r}(e,t.offset,n);return t.offset+=n,i},t.stringCheck=function(e,t){var n=e[t.offset];return n<192&&n>160||217===n||218===n||219===n},t.number=function(e,t){var n=e[t.offset++];return n<128?n:202===n?y(e,t):203===n?v(e,t):204===n?o(e,t):205===n?a(e,t):206===n?c(e,t):207===n?h(e,t):208===n?i(e,t):209===n?s(e,t):210===n?u(e,t):211===n?f(e,t):n>223?-1*(255-n+1):void 0},t.numberCheck=function(e,t){var n=e[t.offset];return n<128||n>=202&&n<=211},t.arrayCheck=function(e,t){return e[t.offset]<160},t.switchStructureCheck=function(e,t){return e[t.offset-1]===r.SWITCH_TO_STRUCTURE&&(e[t.offset]<128||e[t.offset]>=202&&e[t.offset]<=211)}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0?"?"+o.join("&"):"",f={headers:i},r&&(f.body=r),[4,u[e](""+this.endpoint+t+c,f)];case 1:return[2,a.sent().data]}}))}))},e.prototype.logout=function(){this.token=void 0,c.removeItem("colyseus-auth-token"),this.unregisterPingService()},e.prototype.registerPingService=function(e){var t=this;void 0===e&&(e=15e3),this.unregisterPingService(),this.keepOnlineInterval=setInterval((function(){return t.request("get","/auth")}),e)},e.prototype.unregisterPingService=function(){clearInterval(this.keepOnlineInterval)},e}();t.Auth=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);Object.defineProperty(t,"Schema",{enumerable:!0,get:function(){return r.Schema}});var i=n(5);Object.defineProperty(t,"MapSchema",{enumerable:!0,get:function(){return i.MapSchema}});var o=n(4);Object.defineProperty(t,"ArraySchema",{enumerable:!0,get:function(){return o.ArraySchema}});var s=n(16);Object.defineProperty(t,"CollectionSchema",{enumerable:!0,get:function(){return s.CollectionSchema}});var a=n(17);Object.defineProperty(t,"SetSchema",{enumerable:!0,get:function(){return a.SetSchema}});var u=n(40);Object.defineProperty(t,"dumpChanges",{enumerable:!0,get:function(){return u.dumpChanges}});var c=n(41);Object.defineProperty(t,"Reflection",{enumerable:!0,get:function(){return c.Reflection}}),Object.defineProperty(t,"ReflectionType",{enumerable:!0,get:function(){return c.ReflectionType}}),Object.defineProperty(t,"ReflectionField",{enumerable:!0,get:function(){return c.ReflectionField}});var f=n(6);Object.defineProperty(t,"type",{enumerable:!0,get:function(){return f.type}}),Object.defineProperty(t,"deprecated",{enumerable:!0,get:function(){return f.deprecated}}),Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return f.filter}}),Object.defineProperty(t,"filterChildren",{enumerable:!0,get:function(){return f.filterChildren}}),Object.defineProperty(t,"defineTypes",{enumerable:!0,get:function(){return f.defineTypes}}),Object.defineProperty(t,"hasFilter",{enumerable:!0,get:function(){return f.hasFilter}}),Object.defineProperty(t,"SchemaDefinition",{enumerable:!0,get:function(){return f.SchemaDefinition}}),Object.defineProperty(t,"Context",{enumerable:!0,get:function(){return f.Context}});var h=n(0);Object.defineProperty(t,"OPERATION",{enumerable:!0,get:function(){return h.OPERATION}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionSchema=void 0;var r=n(3),i=n(0),o=n(1),s=n(2),a=function(){function e(e){var t=this;this.$changes=new r.ChangeTree(this),this.$items=new Map,this.$indexes=new Map,this.$refId=0,e&&e.forEach((function(e){return t.add(e)}))}return e.is=function(e){return void 0!==e.collection},e.prototype.add=function(e){var t=this.$refId++;return void 0!==e.$changes&&e.$changes.setParent(this,this.$changes.root,t),this.$changes.indexes[t]=t,this.$indexes.set(t,t),this.$items.set(t,e),this.$changes.change(t),t},e.prototype.at=function(e){var t=Array.from(this.$items.keys())[e];return this.$items.get(t)},e.prototype.entries=function(){return this.$items.entries()},e.prototype.delete=function(e){for(var t,n,r=this.$items.entries();(n=r.next())&&!n.done;)if(e===n.value[1]){t=n.value[0];break}return void 0!==t&&(this.$changes.delete(t),this.$indexes.delete(t),this.$items.delete(t))},e.prototype.clear=function(e){var t=this;this.$changes.discard(!0,!0),this.$changes.indexes={},this.$indexes.clear(),e&&"string"!=typeof this.$changes.getType()&&this.$items.forEach((function(e){t.$changes.root.removeRef(e.$changes.refId)})),this.$items.clear(),this.$changes.operation({index:0,op:i.OPERATION.CLEAR}),this.$changes.touchParents()},e.prototype.has=function(e){return Array.from(this.$items.values()).some((function(t){return t===e}))},e.prototype.forEach=function(e){var t=this;this.$items.forEach((function(n,r,i){return e(n,r,t)}))},e.prototype.values=function(){return this.$items.values()},Object.defineProperty(e.prototype,"size",{get:function(){return this.$items.size},enumerable:!1,configurable:!0}),e.prototype.setIndex=function(e,t){this.$indexes.set(e,t)},e.prototype.getIndex=function(e){return this.$indexes.get(e)},e.prototype.getByIndex=function(e){return this.$items.get(this.$indexes.get(e))},e.prototype.deleteByIndex=function(e){var t=this.$indexes.get(e);this.$items.delete(t),this.$indexes.delete(e)},e.prototype.toArray=function(){return Array.from(this.$items.values())},e.prototype.toJSON=function(){var e=[];return this.forEach((function(t,n){e.push("function"==typeof t.toJSON?t.toJSON():t)})),e},e.prototype.clone=function(t){var n;if(t)n=Object.assign(new e,this);else{var r=new e;this.forEach((function(e){e.$changes?r.add(e.clone()):r.add(e)}))}return n},e.prototype.triggerAll=function(){o.Schema.prototype.triggerAll.apply(this)},e}();t.CollectionSchema=a,s.registerType("collection",{constructor:a})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SetSchema=void 0;var r=n(3),i=n(0),o=n(1),s=n(2),a=function(){function e(e){var t=this;this.$changes=new r.ChangeTree(this),this.$items=new Map,this.$indexes=new Map,this.$refId=0,e&&e.forEach((function(e){return t.add(e)}))}return e.is=function(e){return void 0!==e.set},e.prototype.add=function(e){if(this.has(e))return!1;var t=this.$refId++;return void 0!==e.$changes&&e.$changes.setParent(this,this.$changes.root,t),this.$changes.indexes[t]=t,this.$indexes.set(t,t),this.$items.set(t,e),this.$changes.change(t),t},e.prototype.entries=function(){return this.$items.entries()},e.prototype.delete=function(e){for(var t,n,r=this.$items.entries();(n=r.next())&&!n.done;)if(e===n.value[1]){t=n.value[0];break}return void 0!==t&&(this.$changes.delete(t),this.$indexes.delete(t),this.$items.delete(t))},e.prototype.clear=function(e){var t=this;this.$changes.discard(!0,!0),this.$changes.indexes={},this.$indexes.clear(),e&&"string"!=typeof this.$changes.getType()&&this.$items.forEach((function(e){t.$changes.root.removeRef(e.$changes.refId)})),this.$items.clear(),this.$changes.operation({index:0,op:i.OPERATION.CLEAR}),this.$changes.touchParents()},e.prototype.has=function(e){for(var t,n=this.$items.values(),r=!1;(t=n.next())&&!t.done;)if(e===t.value){r=!0;break}return r},e.prototype.forEach=function(e){var t=this;this.$items.forEach((function(n,r,i){return e(n,r,t)}))},e.prototype.values=function(){return this.$items.values()},Object.defineProperty(e.prototype,"size",{get:function(){return this.$items.size},enumerable:!1,configurable:!0}),e.prototype.setIndex=function(e,t){this.$indexes.set(e,t)},e.prototype.getIndex=function(e){return this.$indexes.get(e)},e.prototype.getByIndex=function(e){return this.$items.get(this.$indexes.get(e))},e.prototype.deleteByIndex=function(e){var t=this.$indexes.get(e);this.$items.delete(t),this.$indexes.delete(e)},e.prototype.toArray=function(){return Array.from(this.$items.values())},e.prototype.toJSON=function(){var e=[];return this.forEach((function(t,n){e.push("function"==typeof t.toJSON?t.toJSON():t)})),e},e.prototype.clone=function(t){var n;if(t)n=Object.assign(new e,this);else{var r=new e;this.forEach((function(e){e.$changes?r.add(e.clone()):r.add(e)}))}return n},e.prototype.triggerAll=function(){o.Schema.prototype.triggerAll.apply(this)},e}();t.SetSchema=a,s.registerType("set",{constructor:a})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaSerializer=t.FossilDeltaSerializer=t.registerSerializer=void 0,n(19);var r=n(20);Object.defineProperty(t,"Client",{enumerable:!0,get:function(){return r.Client}});var i=n(11);Object.defineProperty(t,"Protocol",{enumerable:!0,get:function(){return i.Protocol}}),Object.defineProperty(t,"ErrorCode",{enumerable:!0,get:function(){return i.ErrorCode}});var o=n(8);Object.defineProperty(t,"Room",{enumerable:!0,get:function(){return o.Room}});var s=n(14);Object.defineProperty(t,"Auth",{enumerable:!0,get:function(){return s.Auth}}),Object.defineProperty(t,"Platform",{enumerable:!0,get:function(){return s.Platform}});var a=n(32);Object.defineProperty(t,"FossilDeltaSerializer",{enumerable:!0,get:function(){return a.FossilDeltaSerializer}});var u=n(37);Object.defineProperty(t,"SchemaSerializer",{enumerable:!0,get:function(){return u.SchemaSerializer}});var c=n(42),f=n(10);Object.defineProperty(t,"registerSerializer",{enumerable:!0,get:function(){return f.registerSerializer}}),f.registerSerializer("fossil-delta",a.FossilDeltaSerializer),f.registerSerializer("schema",u.SchemaSerializer),f.registerSerializer("none",c.NoneSerializer)},function(e,t){ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return null!==e&&"object"==typeof e&&e.buffer instanceof ArrayBuffer})},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=65536?(i-=65536,r+=String.fromCharCode(55296+(i>>>10),56320+(1023&i))):r+=String.fromCharCode(i)}else r+=String.fromCharCode((15&a)<<12|(63&e.getUint8(++o))<<6|(63&e.getUint8(++o))<<0);else r+=String.fromCharCode((31&a)<<6|63&e.getUint8(++o));else r+=String.fromCharCode(a)}return r}(this._view,this._offset,e);return this._offset+=e,t},r.prototype._bin=function(e){var t=this._buffer.slice(this._offset,this._offset+e);return this._offset+=e,t},r.prototype._parse=function(){var e,t=this._view.getUint8(this._offset++),n=0,r=0,i=0,o=0;if(t<192)return t<128?t:t<144?this._map(15&t):t<160?this._array(15&t):this._str(31&t);if(t>223)return-1*(255-t+1);switch(t){case 192:return null;case 194:return!1;case 195:return!0;case 196:return n=this._view.getUint8(this._offset),this._offset+=1,this._bin(n);case 197:return n=this._view.getUint16(this._offset),this._offset+=2,this._bin(n);case 198:return n=this._view.getUint32(this._offset),this._offset+=4,this._bin(n);case 199:return n=this._view.getUint8(this._offset),r=this._view.getInt8(this._offset+1),this._offset+=2,[r,this._bin(n)];case 200:return n=this._view.getUint16(this._offset),r=this._view.getInt8(this._offset+2),this._offset+=3,[r,this._bin(n)];case 201:return n=this._view.getUint32(this._offset),r=this._view.getInt8(this._offset+4),this._offset+=5,[r,this._bin(n)];case 202:return e=this._view.getFloat32(this._offset),this._offset+=4,e;case 203:return e=this._view.getFloat64(this._offset),this._offset+=8,e;case 204:return e=this._view.getUint8(this._offset),this._offset+=1,e;case 205:return e=this._view.getUint16(this._offset),this._offset+=2,e;case 206:return e=this._view.getUint32(this._offset),this._offset+=4,e;case 207:return i=this._view.getUint32(this._offset)*Math.pow(2,32),o=this._view.getUint32(this._offset+4),this._offset+=8,i+o;case 208:return e=this._view.getInt8(this._offset),this._offset+=1,e;case 209:return e=this._view.getInt16(this._offset),this._offset+=2,e;case 210:return e=this._view.getInt32(this._offset),this._offset+=4,e;case 211:return i=this._view.getInt32(this._offset)*Math.pow(2,32),o=this._view.getUint32(this._offset+4),this._offset+=8,i+o;case 212:return r=this._view.getInt8(this._offset),this._offset+=1,0===r?void(this._offset+=1):[r,this._bin(1)];case 213:return r=this._view.getInt8(this._offset),this._offset+=1,[r,this._bin(2)];case 214:return r=this._view.getInt8(this._offset),this._offset+=1,[r,this._bin(4)];case 215:return r=this._view.getInt8(this._offset),this._offset+=1,0===r?(i=this._view.getInt32(this._offset)*Math.pow(2,32),o=this._view.getUint32(this._offset+4),this._offset+=8,new Date(i+o)):[r,this._bin(8)];case 216:return r=this._view.getInt8(this._offset),this._offset+=1,[r,this._bin(16)];case 217:return n=this._view.getUint8(this._offset),this._offset+=1,this._str(n);case 218:return n=this._view.getUint16(this._offset),this._offset+=2,this._str(n);case 219:return n=this._view.getUint32(this._offset),this._offset+=4,this._str(n);case 220:return n=this._view.getUint16(this._offset),this._offset+=2,this._array(n);case 221:return n=this._view.getUint32(this._offset),this._offset+=4,this._array(n);case 222:return n=this._view.getUint16(this._offset),this._offset+=2,this._map(n);case 223:return n=this._view.getUint32(this._offset),this._offset+=4,this._map(n)}throw new Error("Could not parse")},t.default=function(e,t){void 0===t&&(t=0);var n=new r(e,t),i=n._parse();if(n._offset!==e.byteLength)throw new Error(e.byteLength-n._offset+" trailing bytes");return i}},function(e,t,n){"use strict";function r(e,t,n){for(var r=0,i=0,o=n.length;i>6),e.setUint8(t++,128|63&r)):r<55296||r>=57344?(e.setUint8(t++,224|r>>12),e.setUint8(t++,128|r>>6&63),e.setUint8(t++,128|63&r)):(i++,r=65536+((1023&r)<<10|1023&n.charCodeAt(i)),e.setUint8(t++,240|r>>18),e.setUint8(t++,128|r>>12&63),e.setUint8(t++,128|r>>6&63),e.setUint8(t++,128|63&r))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=[],n=[],i=function e(t,n,r){var i=typeof r,o=0,s=0,a=0,u=0,c=0,f=0;if("string"===i){if((c=function(e){for(var t=0,n=0,r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}(r))<32)t.push(160|c),f=1;else if(c<256)t.push(217,c),f=2;else if(c<65536)t.push(218,c>>8,c),f=3;else{if(!(c<4294967296))throw new Error("String too long");t.push(219,c>>24,c>>16,c>>8,c),f=5}return n.push({_str:r,_length:c,_offset:t.length}),f+c}if("number"===i)return Math.floor(r)===r&&isFinite(r)?r>=0?r<128?(t.push(r),1):r<256?(t.push(204,r),2):r<65536?(t.push(205,r>>8,r),3):r<4294967296?(t.push(206,r>>24,r>>16,r>>8,r),5):(a=r/Math.pow(2,32)>>0,u=r>>>0,t.push(207,a>>24,a>>16,a>>8,a,u>>24,u>>16,u>>8,u),9):r>=-32?(t.push(r),1):r>=-128?(t.push(208,r),2):r>=-32768?(t.push(209,r>>8,r),3):r>=-2147483648?(t.push(210,r>>24,r>>16,r>>8,r),5):(a=Math.floor(r/Math.pow(2,32)),u=r>>>0,t.push(211,a>>24,a>>16,a>>8,a,u>>24,u>>16,u>>8,u),9):(t.push(203),n.push({_float:r,_length:8,_offset:t.length}),9);if("object"===i){if(null===r)return t.push(192),1;if(Array.isArray(r)){if((c=r.length)<16)t.push(144|c),f=1;else if(c<65536)t.push(220,c>>8,c),f=3;else{if(!(c<4294967296))throw new Error("Array too large");t.push(221,c>>24,c>>16,c>>8,c),f=5}for(o=0;o>>0,t.push(215,0,a>>24,a>>16,a>>8,a,u>>24,u>>16,u>>8,u),10}if(r instanceof ArrayBuffer){if((c=r.byteLength)<256)t.push(196,c),f=2;else if(c<65536)t.push(197,c>>8,c),f=3;else{if(!(c<4294967296))throw new Error("Buffer too large");t.push(198,c>>24,c>>16,c>>8,c),f=5}return n.push({_bin:r,_length:c,_offset:t.length}),f+c}if("function"==typeof r.toJSON)return e(t,n,r.toJSON());var l=[],p="",d=Object.keys(r);for(o=0,s=d.length;o>8,c),f=3;else{if(!(c<4294967296))throw new Error("Object too large");t.push(223,c>>24,c>>16,c>>8,c),f=5}for(o=0;o0&&(c=n[0]._offset);for(var f,h=0,l=0,p=0,d=t.length;p({events:{},emit(e,...t){for(let n of this.events[e]||[])n(...t)},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=this.events[e].filter(e=>e!==t)}})},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Connection=void 0;var s=o(n(27)),a=function(e){function t(t,n){void 0===n&&(n=!0);var r=e.call(this,t,void 0,{connect:n})||this;return r._enqueuedCalls=[],r}return i(t,e),t.prototype.onOpenCallback=function(t){if(e.prototype.onOpenCallback.call(this),this.binaryType="arraybuffer",this._enqueuedCalls.length>0){for(var n=0,r=this._enqueuedCalls;n2&&void 0!==arguments[2]?arguments[2]:{};i(this,e),this.url=t,this.protocols=n,this.reconnectEnabled=!0,this.listeners={},this.backoff=o(r.backoff||"exponential",r),this.backoff.onReady=this.onBackoffReady.bind(this),(void 0===r.connect||r.connect)&&this.open()}return r(e,[{key:"open",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isReconnect=e;var t=this.ws&&this.ws.binaryType;this.ws=new s(this.url,this.protocols),this.ws.onclose=this.onCloseCallback.bind(this),this.ws.onerror=this.onErrorCallback.bind(this),this.ws.onmessage=this.onMessageCallback.bind(this),this.ws.onopen=this.onOpenCallback.bind(this),t&&(this.ws.binaryType=t)}},{key:"onBackoffReady",value:function(e,t){this.open(!0)}},{key:"onCloseCallback",value:function(e){!this.isReconnect&&this.listeners.onclose&&this.listeners.onclose.apply(null,arguments),this.reconnectEnabled&&e.code<3e3&&this.backoff.backoff()}},{key:"onErrorCallback",value:function(){this.listeners.onerror&&this.listeners.onerror.apply(null,arguments)}},{key:"onMessageCallback",value:function(){this.listeners.onmessage&&this.listeners.onmessage.apply(null,arguments)}},{key:"onOpenCallback",value:function(){this.listeners.onopen&&this.listeners.onopen.apply(null,arguments),this.isReconnect&&this.listeners.onreconnect&&this.listeners.onreconnect.apply(null,arguments),this.isReconnect=!1}},{key:"close",value:function(e,t){void 0===e&&(e=1e3),this.reconnectEnabled=!1,this.ws.close(e,t)}},{key:"send",value:function(e){this.ws.send(e)}},{key:"bufferedAmount",get:function(){return this.ws.bufferedAmount}},{key:"readyState",get:function(){return this.ws.readyState}},{key:"binaryType",get:function(){return this.ws.binaryType},set:function(e){this.ws.binaryType=e}},{key:"extensions",get:function(){return this.ws.extensions},set:function(e){this.ws.extensions=e}},{key:"protocol",get:function(){return this.ws.protocol},set:function(e){this.ws.protocol=e}},{key:"onclose",set:function(e){this.listeners.onclose=e},get:function(){return this.listeners.onclose}},{key:"onerror",set:function(e){this.listeners.onerror=e},get:function(){return this.listeners.onerror}},{key:"onmessage",set:function(e){this.listeners.onmessage=e},get:function(){return this.listeners.onmessage}},{key:"onopen",set:function(e){this.listeners.onopen=e},get:function(){return this.listeners.onopen}},{key:"onreconnect",set:function(e){this.listeners.onreconnect=e},get:function(){return this.listeners.onreconnect}}]),e}();a.CONNECTING=s.CONNECTING,a.OPEN=s.OPEN,a.CLOSING=s.CLOSING,a.CLOSED=s.CLOSED,t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createBackoff=function(e,t){return new i(r[e],t)};var r={exponential:function(e,t){return Math.floor(Math.random()*Math.pow(2,e)*t)},fibonacci:function(e,t){if(e>(r=1))for(var n=1,r=2,i=2;i0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1&&console.warn(".listen() accepts only one parameter.");var s={callback:t,rawRules:i,rules:i.map((function(e){return"string"==typeof e?0===e.indexOf(":")?o.matcherPlaceholders[e]||o.matcherPlaceholders[":*"]:new RegExp("^"+e+"$"):e}))};return 0===i.length?this.defaultListener=s:this.listeners.push(s),n&&this.checkPatches(r.compare({},this.state),[s]),s},e.prototype.removeListener=function(e){for(var t=this.listeners.length-1;t>=0;t--)this.listeners[t]===e&&this.listeners.splice(t,1)},e.prototype.removeAllListeners=function(){this.reset()},e.prototype.checkPatches=function(e,t,n){for(var r=0,i=t.length;r=0;s--){var a=o&&this.getPathVariables(e[s],o);a&&(o.callback({path:a,rawPath:e[s].path,operation:e[s].operation,value:e[s].value}),e[s].matched=!0)}if(n)for(s=e.length-1;s>=0;s--)e[s].matched||n.callback(e[s])},e.prototype.getPathVariables=function(e,t){if(e.path.length!==t.rules.length)return!1;for(var n={},r=0,i=t.rules.length;r2)return!1;":"===t.rawRules[r].substr(0,1)&&(n[t.rawRules[r].substr(1)]=o[1])}return n},e.prototype.reset=function(){this.listeners=[]},e}();t.StateContainer=i},function(e,t,n){"use strict";function r(e,t){var n=e.slice();return n.push(t),n}function i(e){if(Array.isArray(e)){for(var t=new Array(e.length),n=0;n=0;f--){var h=u[f],l=t[h];if(!n.hasOwnProperty(h)||void 0===n[h]&&void 0!==l&&!1===Array.isArray(n))o.push({operation:"remove",path:r(s,h)}),c=!0;else{var p=n[h];"object"==typeof l&&null!=l&&"object"==typeof p&&null!=p?e(l,p,o,r(s,h)):l!==p&&o.push({operation:"replace",path:r(s,h),value:p,previousValue:l})}}if(!c&&a.length==u.length)return;for(f=a.length-1;f>=0;f--){h=a[f];if(!t.hasOwnProperty(h)&&void 0!==n[h]){p=n[h];var d=r(s,h);"object"==typeof p&&null!=p&&e({},p,o,d),o.push({operation:"add",path:d,value:p})}}}(e,t,n,[]),n}},function(e,t,n){var r,i;r=this,i=function(){"use strict";var e={};function t(){this.a=0,this.b=0,this.i=0,this.z=new Array(16)}t.prototype.init=function(e,t){var n,r,i=0,o=0;for(n=0;n<16;n++)i=i+(r=e[t+n])&65535,o=o+(16-n)*r&65535,this.z[n]=r;this.a=65535&i,this.b=65535&o,this.i=0},t.prototype.next=function(e){var t=this.z[this.i];this.z[this.i]=e,this.i=this.i+1&15,this.a=this.a-t+e&65535,this.b=this.b-16*t+this.a&65535},t.prototype.value=function(){return(65535&this.a|(65535&this.b)<<16)>>>0};var n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~".split("").map((function(e){return e.charCodeAt(0)})),r=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,-1,-1,-1,-1,36,-1,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,-1,-1,-1,63,-1];function i(e){this.a=e,this.pos=0}function o(){this.a=[]}function s(e){var t,n;for(t=1,n=64;e>=n;t++,n<<=6);return t}function a(e){for(var t=0,n=0,r=0,i=0,o=0,s=e.length;s>=16;)t=t+e[o+0]|0,n=n+e[o+1]|0,r=r+e[o+2]|0,i=i+e[o+3]|0,t=t+e[o+4]|0,n=n+e[o+5]|0,r=r+e[o+6]|0,i=i+e[o+7]|0,t=t+e[o+8]|0,n=n+e[o+9]|0,r=r+e[o+10]|0,i=i+e[o+11]|0,t=t+e[o+12]|0,n=n+e[o+13]|0,r=r+e[o+14]|0,i=i+e[o+15]|0,o+=16,s-=16;for(;s>=4;)t=t+e[o+0]|0,n=n+e[o+1]|0,r=r+e[o+2]|0,i=i+e[o+3]|0,o+=4,s-=4;switch(i=((i+(r<<8)|0)+(n<<16)|0)+(t<<24)|0,s){case 3:i=i+(e[o+2]<<8)|0;case 2:i=i+(e[o+1]<<16)|0;case 1:i=i+(e[o+0]<<24)|0}return i>>>0}return i.prototype.haveBytes=function(){return this.posthis.a.length)throw new RangeError("out of bounds");return e},i.prototype.getChar=function(){return String.fromCharCode(this.getByte())},i.prototype.getInt=function(){for(var e,t=0;this.haveBytes()&&(e=r[127&this.getByte()])>=0;)t=(t<<6)+e;return this.pos--,t>>>0},o.prototype.toArray=function(){return this.a},o.prototype.putByte=function(e){this.a.push(255&e)},o.prototype.putChar=function(e){this.putByte(e.charCodeAt(0))},o.prototype.putInt=function(e){var t,r,i=[];if(0!==e){for(t=0;e>0;t++,e>>>=6)i.push(n[63&e]);for(r=t-1;r>=0;r--)this.putByte(i[r])}else this.putChar("0")},o.prototype.putArray=function(e,t,n){for(var r=t;r=0&&O-- >0;){var A,E,I,$,S,P,x;for($=0,P=v=16*g,x=w+r;P=s(r-S)+s(A)+s(E)+3&&A>m&&(m=A,_=v-S,b=I),g=l[g]}if(m>0){b>0&&(i.putInt(b),i.putChar(":"),i.putArray(n,w,w+b),w+=b),w+=m,i.putInt(m),i.putChar("@"),i.putInt(_),i.putChar(","),_+m-1>f&&(f=_+m-1),m=0;break}if(w+r+16>=u){i.putInt(u-w),i.putChar(":"),i.putArray(n,w,w+u-w),w=u;break}y.next(n[w+r+16]),r++}return wr)throw new Error("copy exceeds output file size");if(p+l>c)throw new Error("copy extends past end of input");h.putArray(e,p,p+l);break;case":":if((s+=l)>r)throw new Error("insert command gives an output larger than predicted");if(l>f)throw new Error("insert count exceeds size of delta");h.putArray(u.a,u.pos,u.pos+l),u.pos+=l;break;case";":var d=h.toArray();if((!n||!1!==n.verifyChecksum)&&l!==a(d))throw new Error("bad checksum");if(s!==r)throw new Error("generated size does not match predicted size");return d;default:throw new Error("unknown delta operator")}}throw new Error("unterminated delta")},e},e.exports?e.exports=i():r.fossilDelta=i()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaSerializer=void 0;var r=n(15),i=function(){function e(){}return e.prototype.setState=function(e){this.state.decode(e)},e.prototype.getState=function(){return this.state},e.prototype.patch=function(e){this.state.decode(e)},e.prototype.teardown=function(){var e,t;null===(t=null===(e=this.state)||void 0===e?void 0:e.$changes)||void 0===t||t.root.clearRefs()},e.prototype.handshake=function(e,t){this.state?(new r.Reflection).decode(e,t):this.state=r.Reflection.decode(e,t)},e}();t.SchemaSerializer=i},function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spread||function(){for(var e=[],t=0;t=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.Reflection=t.ReflectionType=t.ReflectionField=void 0;var s=n(6),a=n(1),u=n(4),c=n(2),f=new s.Context,h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),o([s.type("string",f)],t.prototype,"name",void 0),o([s.type("string",f)],t.prototype,"type",void 0),o([s.type("number",f)],t.prototype,"referencedType",void 0),t}(a.Schema);t.ReflectionField=h;var l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.fields=new u.ArraySchema,t}return i(t,e),o([s.type("number",f)],t.prototype,"id",void 0),o([s.type([h],f)],t.prototype,"fields",void 0),t}(a.Schema);t.ReflectionType=l;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.types=new u.ArraySchema,t}return i(t,e),t.encode=function(e){var n=e.constructor,r=new t;r.rootType=n._typeid;var i=function(e,t){for(var n in t){var i=new h;i.name=n;var o=void 0;if("string"==typeof t[n])o=t[n];else{var s=t[n],u=void 0;a.Schema.is(s)?(o="ref",u=t[n]):"string"==typeof s[o=Object.keys(s)[0]]?o+=":"+s[o]:u=s[o],i.referencedType=u?u._typeid:-1}i.type=o,e.fields.push(i)}r.types.push(e)},o=n._context.types;for(var s in o){var u=new l;u.id=Number(s),i(u,o[s]._definition.schema)}return r.encodeAll()},t.decode=function(e,n){var r=new s.Context,o=new t;o.decode(e,n);var u=o.types.reduce((function(e,t){var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(a.Schema),o=t.id;return e[o]=n,r.add(n,o),e}),{});o.types.forEach((function(e){var t=u[e.id];e.fields.forEach((function(e){var n;if(void 0!==e.referencedType){var i=e.type,o=u[e.referencedType];if(!o){var a=e.type.split(":");i=a[0],o=a[1]}"ref"===i?s.type(o,r)(t.prototype,e.name):s.type(((n={})[i]=o,n),r)(t.prototype,e.name)}else s.type(e.type,r)(t.prototype,e.name)}))}));var f=u[o.rootType],h=new f;for(var l in f._definition.schema){var p=f._definition.schema[l];"string"!=typeof p&&(h[l]="function"==typeof p?new p:new(c.getType(Object.keys(p)[0]).constructor))}return h},o([s.type([l],f)],t.prototype,"types",void 0),o([s.type("number",f)],t.prototype,"rootType",void 0),t}(a.Schema);t.Reflection=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoneSerializer=void 0;var r=function(){function e(){}return e.prototype.setState=function(e){},e.prototype.getState=function(){return null},e.prototype.patch=function(e){},e.prototype.teardown=function(){},e.prototype.handshake=function(e){},e}();t.NoneSerializer=r}])})); \ No newline at end of file +/*! colyseus.js@0.14.0 */ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Colyseus=t():e.Colyseus=t()}(self||this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=18)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OPERATION=t.TYPE_ID=t.SWITCH_TO_STRUCTURE=void 0,t.SWITCH_TO_STRUCTURE=255,t.TYPE_ID=213,function(e){e[e.ADD=128]="ADD",e[e.REPLACE=0]="REPLACE",e[e.DELETE=64]="DELETE",e[e.DELETE_AND_ADD=192]="DELETE_AND_ADD",e[e.TOUCH=1]="TOUCH",e[e.CLEAR=10]="CLEAR"}(t.OPERATION||(t.OPERATION={}))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s};Object.defineProperty(t,"__esModule",{value:!0}),t.Schema=void 0;var s=n(0),a=n(6),u=n(12),c=n(13),f=n(4),h=n(5),l=n(16),p=n(17),d=n(3),y=n(38),v=n(39),g=n(2),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(Error);function _(e,t,n,r){if(!(e instanceof t))throw new m("a '"+t.name+"' was expected, but '"+e.constructor.name+"' was provided in "+n.constructor.name+"#"+r)}function b(e,t,n,r,i){!function(e,t,n,r){var i,o=!1;switch(t){case"number":case"int8":case"uint8":case"int16":case"uint16":case"int32":case"uint32":case"int64":case"uint64":case"float32":case"float64":i="number",isNaN(e)&&console.log('trying to encode "NaN" in '+n.constructor.name+"#"+r);break;case"string":i="string",o=!0;break;case"boolean":return}if(typeof e!==i&&(!o||o&&null!==e)){var s="'"+JSON.stringify(e)+"'"+(e&&e.constructor&&" ("+e.constructor.name+")"||"");throw new m("a '"+i+"' was expected, but "+s+" was provided in "+n.constructor.name+"#"+r)}}(n,e,r,i);var o=u[e];if(!o)throw new m("a '"+e+"' was expected, but "+n+" was provided in "+r.constructor.name+"#"+i);o(t,n)}function w(e,t,n){return c[e](t,n)}var O=function(){function e(){for(var e=[],t=0;t>6<<6:v;if(b!==s.OPERATION.CLEAR){var O=_?v%(b||255):c.number(t,n),A=_?r._definition.fieldsByIndex[O]:"",E=m.getType(O),I=void 0,$=void 0,S=void 0;if(_?$=r["_"+A]:($=r.getByIndex(O),(b&s.OPERATION.ADD)===s.OPERATION.ADD?(S=r instanceof h.MapSchema?c.string(t,n):O,r.setIndex(O,S)):S=r.getIndex(O)),(b&s.OPERATION.DELETE)===s.OPERATION.DELETE&&(b!==s.OPERATION.DELETE_AND_ADD&&r.deleteByIndex(O),$&&$.$changes&&a.removeRef($.$changes.refId),I=null),void 0!==A){if(b===s.OPERATION.DELETE);else if(e.is(E)){var P=c.number(t,n);if(I=a.refs.get(P),b!==s.OPERATION.REPLACE){var x=this.getSchemaType(t,n,E);I||((I=this.createTypeInstance(x)).$changes.refId=P,$&&(I.onChange=$.onChange,I.onRemove=$.onRemove,I.$listeners=$.$listeners,$.$changes.refId&&P!==$.$changes.refId&&a.removeRef($.$changes.refId))),a.addRef(P,I,I!==$)}}else if("string"==typeof E)I=w(E,t,n);else{var C=g.getType(Object.keys(E)[0]),R=c.number(t,n),T=a.refs.has(R)?$:new C.constructor;if((I=T.clone(!0)).$changes.refId=R,$&&(I.onAdd=$.onAdd,I.onRemove=$.onRemove,I.onChange=$.onChange,$.$changes.refId&&R!==$.$changes.refId)){a.removeRef($.$changes.refId);for(var M=[],k=$.entries(),j=void 0;(j=k.next())&&!j.done;){var N=o(j.value,2),D=N[0],L=N[1];M.push({op:s.OPERATION.DELETE,field:D,value:void 0,previousValue:L})}i.set($.$changes.refId,M)}a.addRef(R,I,T!==$),C.getProxy&&(I=C.getProxy(I))}var U=$!==I;if(null!=I)if(I.$changes&&I.$changes.setParent(m.ref,m.root,O),r instanceof e)r[A]=I;else if(r instanceof h.MapSchema){D=S;r.$items.set(D,I)}else if(r instanceof f.ArraySchema)r.setAt(O,I);else if(r instanceof l.CollectionSchema||r instanceof p.SetSchema){var z=r.add(I);r.setIndex(O,z)}U&&y.push({op:b,field:A,dynamicIndex:S,value:I,previousValue:$})}else{console.warn("@colyseus/schema: definition mismatch");for(var F={offset:n.offset};n.offset0){for(var g=n.$changes.root.refs.get(r),m=g instanceof e,_=0;_0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spread||function(){for(var e=[],t=0;tr?1:0};function f(e){return e.$proxy=!0,e=new Proxy(e,{get:function(e,t){return"symbol"==typeof t||isNaN(t)?e[t]:e.at(t)},set:function(e,t,n){if("symbol"==typeof t||isNaN(t))e[t]=n;else{var r=Array.from(e.$items.keys()),i=parseInt(r[t]||t);null==n?e.deleteAt(i):e.setAt(i,n)}return!0},deleteProperty:function(e,t){return"number"==typeof t?e.deleteAt(t):delete e[t],!0}})}t.getArrayProxy=f;var h=function(){function e(){for(var e=[],t=0;t0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spread||function(){for(var e=[],t=0;t=400?o:i)(f)},(a=r.body)&&"object"==typeof a&&(h["content-type"]="application/json",a=JSON.stringify(a)),f.withCredentials=!!r.withCredentials,h)f.setRequestHeader(s,h[s]);f.send(a)}))},t.get=t.send.bind(t.send,"GET"),t.post=t.send.bind(t.send,"POST"),t.patch=t.send.bind(t.send,"PATCH"),t.del=t.send.bind(t.send,"DELETE"),t.put=t.send.bind(t.send,"PUT")},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Room=void 0;var s=o(n(9)),a=n(24),u=n(25),c=n(26),f=n(10),h=n(11),l=o(n(12)),p=o(n(13)),d=function(){function e(e,t){var n=this;this.onStateChange=a.createSignal(),this.onError=a.createSignal(),this.onLeave=a.createSignal(),this.onJoin=a.createSignal(),this.hasJoined=!1,this.onMessageHandlers=u.createNanoEvents(),this.id=null,this.name=e,t&&(this.serializer=new(f.getSerializer("schema")),this.rootSchema=t,this.serializer.state=new t),this.onError((function(e,t){return console.warn("colyseus.js - onError => ("+e+") "+t)})),this.onLeave((function(){return n.removeAllListeners()}))}return e.prototype.connect=function(e){var t=this;this.connection=new c.Connection(e,!1),this.connection.reconnectEnabled=!1,this.connection.onmessage=this.onMessageCallback.bind(this),this.connection.onclose=function(e){if(!t.hasJoined)return console.warn("Room connection was closed unexpectedly ("+e.code+"): "+e.reason),void t.onError.invoke(e.code,e.reason);t.onLeave.invoke(e.code)},this.connection.onerror=function(e){console.warn("Room, onError ("+e.code+"): "+e.reason),t.onError.invoke(e.code,e.reason)},this.connection.open()},e.prototype.leave=function(e){void 0===e&&(e=!0),this.connection?e?this.connection.send([h.Protocol.LEAVE_ROOM]):this.connection.close():this.onLeave.invoke(4e3)},e.prototype.onMessage=function(e,t){return this.onMessageHandlers.on(this.getMessageHandlerKey(e),t)},e.prototype.send=function(e,t){var n,r=[h.Protocol.ROOM_DATA];if("string"==typeof e?l.string(r,e):l.number(r,e),void 0!==t){var i=s.encode(t);(n=new Uint8Array(r.length+i.byteLength)).set(new Uint8Array(r),0),n.set(new Uint8Array(i),r.length)}else n=new Uint8Array(r);this.connection.send(n.buffer)},Object.defineProperty(e.prototype,"state",{get:function(){return this.serializer.getState()},enumerable:!1,configurable:!0}),e.prototype.listen=function(e,t,n){if("schema"!==this.serializerId)return this.serializerId||console.warn("room.Listen() should be called after room.onJoin has been called (DEPRECATION WARNING)"),this.serializer.api.listen(e,t,n);console.warn("'"+this.serializerId+"' serializer doesn't support .listen() method here.")},e.prototype.removeListener=function(e){return this.serializer.api.removeListener(e)},e.prototype.removeAllListeners=function(){this.serializer&&this.serializer.teardown(),this.onJoin.clear(),this.onStateChange.clear(),this.onError.clear(),this.onLeave.clear(),this.onMessageHandlers.events={}},e.prototype.onMessageCallback=function(e){var t=Array.from(new Uint8Array(e.data)),n=t[0];if(n===h.Protocol.JOIN_ROOM){var r=1;if(this.serializerId=h.utf8Read(t,r),r+=h.utf8Length(this.serializerId),!this.serializer){var i=f.getSerializer(this.serializerId);this.serializer=new i}t.length>r&&this.serializer.handshake&&this.serializer.handshake(t,{offset:r}),this.hasJoined=!0,this.onJoin.invoke(),this.connection.send([h.Protocol.JOIN_ROOM])}else if(n===h.Protocol.ERROR){var o={offset:1},a=p.number(t,o),u=p.string(t,o);this.onError.invoke(a,u)}else if(n===h.Protocol.LEAVE_ROOM)this.leave();else if(n===h.Protocol.ROOM_DATA_SCHEMA){var c={offset:1};(u=new(d=this.serializer.getState().constructor._context.get(p.number(t,c)))).decode(t,c),this.dispatchMessage(d,u)}else if(n===h.Protocol.ROOM_STATE)t.shift(),this.setState(t);else if(n===h.Protocol.ROOM_STATE_PATCH)t.shift(),this.patch(t);else if(n===h.Protocol.ROOM_DATA){var l={offset:1},d=p.stringCheck(t,l)?p.string(t,l):p.number(t,l);u=t.length>l.offset?s.decode(e.data,l.offset):void 0;this.dispatchMessage(d,u)}},e.prototype.setState=function(e){this.serializer.setState(e),this.onStateChange.invoke(this.serializer.getState())},e.prototype.patch=function(e){this.serializer.patch(e),this.onStateChange.invoke(this.serializer.getState())},e.prototype.dispatchMessage=function(e,t){var n=this.getMessageHandlerKey(e);this.onMessageHandlers.events[n]?this.onMessageHandlers.emit(n,t):this.onMessageHandlers.events["*"]?this.onMessageHandlers.emit("*",e,t):console.warn("onMessage not registered for type '"+e+"'.")},e.prototype.getMessageHandlerKey=function(e){switch(typeof e){case"function":return"$"+e._typeid;case"string":return e;case"number":return"i"+e;default:throw new Error("invalid message type.")}},e}();t.Room=d},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.encode=t.decode=void 0;var i=r(n(22)),o=r(n(23));t.decode=i.default,t.encode=o.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSerializer=t.registerSerializer=void 0;var r={};t.registerSerializer=function(e,t){r[e]=t},t.getSerializer=function(e){var t=r[e];if(!t)throw new Error("missing serializer: "+e);return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.utf8Length=t.utf8Read=t.ErrorCode=t.Protocol=void 0,function(e){e[e.HANDSHAKE=9]="HANDSHAKE",e[e.JOIN_ROOM=10]="JOIN_ROOM",e[e.ERROR=11]="ERROR",e[e.LEAVE_ROOM=12]="LEAVE_ROOM",e[e.ROOM_DATA=13]="ROOM_DATA",e[e.ROOM_STATE=14]="ROOM_STATE",e[e.ROOM_STATE_PATCH=15]="ROOM_STATE_PATCH",e[e.ROOM_DATA_SCHEMA=16]="ROOM_DATA_SCHEMA"}(t.Protocol||(t.Protocol={})),function(e){e[e.MATCHMAKE_NO_HANDLER=4210]="MATCHMAKE_NO_HANDLER",e[e.MATCHMAKE_INVALID_CRITERIA=4211]="MATCHMAKE_INVALID_CRITERIA",e[e.MATCHMAKE_INVALID_ROOM_ID=4212]="MATCHMAKE_INVALID_ROOM_ID",e[e.MATCHMAKE_UNHANDLED=4213]="MATCHMAKE_UNHANDLED",e[e.MATCHMAKE_EXPIRED=4214]="MATCHMAKE_EXPIRED",e[e.AUTH_FAILED=4215]="AUTH_FAILED",e[e.APPLICATION_ERROR=4216]="APPLICATION_ERROR"}(t.ErrorCode||(t.ErrorCode={})),t.utf8Read=function(e,t){for(var n=e[t++],r="",i=0,o=t,s=t+n;o=65536?(i-=65536,r+=String.fromCharCode(55296+(i>>>10),56320+(1023&i))):r+=String.fromCharCode(i)}else r+=String.fromCharCode((15&a)<<12|(63&e[++o])<<6|(63&e[++o])<<0);else r+=String.fromCharCode((31&a)<<6|63&e[++o]);else r+=String.fromCharCode(a)}return r},t.utf8Length=function(e){void 0===e&&(e="");for(var t=0,n=0,r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n+1}},function(e,t,n){"use strict";function r(e,t,n){for(var r=0,i=0,o=n.length;i>6,e[t++]=128|63&r):r<55296||r>=57344?(e[t++]=224|r>>12,e[t++]=128|r>>6&63,e[t++]=128|63&r):(i++,r=65536+((1023&r)<<10|1023&n.charCodeAt(i)),e[t++]=240|r>>18,e[t++]=128|r>>12&63,e[t++]=128|r>>6&63,e[t++]=128|63&r)}function i(e,t){e.push(255&t)}function o(e,t){e.push(255&t)}function s(e,t){e.push(255&t),e.push(t>>8&255)}function a(e,t){e.push(255&t),e.push(t>>8&255)}function u(e,t){e.push(255&t),e.push(t>>8&255),e.push(t>>16&255),e.push(t>>24&255)}function c(e,t){var n=t>>24,r=t>>16,i=t>>8,o=t;e.push(255&o),e.push(255&i),e.push(255&r),e.push(255&n)}function f(e,t){var n=Math.floor(t/Math.pow(2,32));c(e,t>>>0),c(e,n)}function h(e,t){var n=t/Math.pow(2,32)>>0;c(e,t>>>0),c(e,n)}Object.defineProperty(t,"__esModule",{value:!0}),t.number=t.string=t.boolean=t.writeFloat64=t.writeFloat32=t.float64=t.float32=t.uint64=t.int64=t.uint32=t.int32=t.uint16=t.int16=t.uint8=t.int8=t.utf8Write=void 0,t.utf8Write=r,t.int8=i,t.uint8=o,t.int16=s,t.uint16=a,t.int32=u,t.uint32=c,t.int64=f,t.uint64=h,t.float32=function(e,t){y(e,t)},t.float64=function(e,t){v(e,t)};var l=new Int32Array(2),p=new Float32Array(l.buffer),d=new Float64Array(l.buffer);function y(e,t){p[0]=t,u(e,l[0])}function v(e,t){d[0]=t,u(e,l[0]),u(e,l[1])}t.writeFloat32=y,t.writeFloat64=v,t.boolean=function(e,t){return o(e,t?1:0)},t.string=function(e,t){t||(t="");var n=function(e){for(var t=0,n=0,r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}(t),i=0;if(n<32)e.push(160|n),i=1;else if(n<256)e.push(217),o(e,n),i=2;else if(n<65536)e.push(218),a(e,n),i=3;else{if(!(n<4294967296))throw new Error("String too long");e.push(219),c(e,n),i=5}return r(e,e.length,t),i+n},t.number=function e(t,n){return isNaN(n)?e(t,0):isFinite(n)?n!==(0|n)?(t.push(203),v(t,n),9):n>=0?n<128?(o(t,n),1):n<256?(t.push(204),o(t,n),2):n<65536?(t.push(205),a(t,n),3):n<4294967296?(t.push(206),c(t,n),5):(t.push(207),h(t,n),9):n>=-32?(t.push(224|n+32),1):n>=-128?(t.push(208),i(t,n),2):n>=-32768?(t.push(209),s(t,n),3):n>=-2147483648?(t.push(210),u(t,n),5):(t.push(211),f(t,n),9):e(t,n>0?Number.MAX_SAFE_INTEGER:-Number.MAX_SAFE_INTEGER)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchStructureCheck=t.arrayCheck=t.numberCheck=t.number=t.stringCheck=t.string=t.boolean=t.readFloat64=t.readFloat32=t.uint64=t.int64=t.float64=t.float32=t.uint32=t.int32=t.uint16=t.int16=t.uint8=t.int8=void 0;var r=n(0);function i(e,t){return o(e,t)<<24>>24}function o(e,t){return e[t.offset++]}function s(e,t){return a(e,t)<<16>>16}function a(e,t){return e[t.offset++]|e[t.offset++]<<8}function u(e,t){return e[t.offset++]|e[t.offset++]<<8|e[t.offset++]<<16|e[t.offset++]<<24}function c(e,t){return u(e,t)>>>0}function f(e,t){var n=c(e,t);return u(e,t)*Math.pow(2,32)+n}function h(e,t){var n=c(e,t);return c(e,t)*Math.pow(2,32)+n}t.int8=i,t.uint8=o,t.int16=s,t.uint16=a,t.int32=u,t.uint32=c,t.float32=function(e,t){return y(e,t)},t.float64=function(e,t){return v(e,t)},t.int64=f,t.uint64=h;var l=new Int32Array(2),p=new Float32Array(l.buffer),d=new Float64Array(l.buffer);function y(e,t){return l[0]=u(e,t),p[0]}function v(e,t){return l[0]=u(e,t),l[1]=u(e,t),d[0]}t.readFloat32=y,t.readFloat64=v,t.boolean=function(e,t){return o(e,t)>0},t.string=function(e,t){var n,r=e[t.offset++];r<192?n=31&r:217===r?n=o(e,t):218===r?n=a(e,t):219===r&&(n=c(e,t));var i=function(e,t,n){for(var r="",i=0,o=t,s=t+n;o=65536?(i-=65536,r+=String.fromCharCode(55296+(i>>>10),56320+(1023&i))):r+=String.fromCharCode(i):r+=String.fromCharCode((15&a)<<12|(63&e[++o])<<6|(63&e[++o])<<0):r+=String.fromCharCode((31&a)<<6|63&e[++o]):r+=String.fromCharCode(a)}return r}(e,t.offset,n);return t.offset+=n,i},t.stringCheck=function(e,t){var n=e[t.offset];return n<192&&n>160||217===n||218===n||219===n},t.number=function(e,t){var n=e[t.offset++];return n<128?n:202===n?y(e,t):203===n?v(e,t):204===n?o(e,t):205===n?a(e,t):206===n?c(e,t):207===n?h(e,t):208===n?i(e,t):209===n?s(e,t):210===n?u(e,t):211===n?f(e,t):n>223?-1*(255-n+1):void 0},t.numberCheck=function(e,t){var n=e[t.offset];return n<128||n>=202&&n<=211},t.arrayCheck=function(e,t){return e[t.offset]<160},t.switchStructureCheck=function(e,t){return e[t.offset-1]===r.SWITCH_TO_STRUCTURE&&(e[t.offset]<128||e[t.offset]>=202&&e[t.offset]<=211)}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0?"?"+o.join("&"):"",f={headers:i},r&&(f.body=r),[4,u[e](""+this.endpoint+t+c,f)];case 1:return[2,a.sent().data]}}))}))},e.prototype.logout=function(){this.token=void 0,c.removeItem("colyseus-auth-token"),this.unregisterPingService()},e.prototype.registerPingService=function(e){var t=this;void 0===e&&(e=15e3),this.unregisterPingService(),this.keepOnlineInterval=setInterval((function(){return t.request("get","/auth")}),e)},e.prototype.unregisterPingService=function(){clearInterval(this.keepOnlineInterval)},e}();t.Auth=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);Object.defineProperty(t,"Schema",{enumerable:!0,get:function(){return r.Schema}});var i=n(5);Object.defineProperty(t,"MapSchema",{enumerable:!0,get:function(){return i.MapSchema}});var o=n(4);Object.defineProperty(t,"ArraySchema",{enumerable:!0,get:function(){return o.ArraySchema}});var s=n(16);Object.defineProperty(t,"CollectionSchema",{enumerable:!0,get:function(){return s.CollectionSchema}});var a=n(17);Object.defineProperty(t,"SetSchema",{enumerable:!0,get:function(){return a.SetSchema}});var u=n(40);Object.defineProperty(t,"dumpChanges",{enumerable:!0,get:function(){return u.dumpChanges}});var c=n(41);Object.defineProperty(t,"Reflection",{enumerable:!0,get:function(){return c.Reflection}}),Object.defineProperty(t,"ReflectionType",{enumerable:!0,get:function(){return c.ReflectionType}}),Object.defineProperty(t,"ReflectionField",{enumerable:!0,get:function(){return c.ReflectionField}});var f=n(6);Object.defineProperty(t,"type",{enumerable:!0,get:function(){return f.type}}),Object.defineProperty(t,"deprecated",{enumerable:!0,get:function(){return f.deprecated}}),Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return f.filter}}),Object.defineProperty(t,"filterChildren",{enumerable:!0,get:function(){return f.filterChildren}}),Object.defineProperty(t,"defineTypes",{enumerable:!0,get:function(){return f.defineTypes}}),Object.defineProperty(t,"hasFilter",{enumerable:!0,get:function(){return f.hasFilter}}),Object.defineProperty(t,"SchemaDefinition",{enumerable:!0,get:function(){return f.SchemaDefinition}}),Object.defineProperty(t,"Context",{enumerable:!0,get:function(){return f.Context}});var h=n(0);Object.defineProperty(t,"OPERATION",{enumerable:!0,get:function(){return h.OPERATION}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionSchema=void 0;var r=n(3),i=n(0),o=n(1),s=n(2),a=function(){function e(e){var t=this;this.$changes=new r.ChangeTree(this),this.$items=new Map,this.$indexes=new Map,this.$refId=0,e&&e.forEach((function(e){return t.add(e)}))}return e.is=function(e){return void 0!==e.collection},e.prototype.add=function(e){var t=this.$refId++;return void 0!==e.$changes&&e.$changes.setParent(this,this.$changes.root,t),this.$changes.indexes[t]=t,this.$indexes.set(t,t),this.$items.set(t,e),this.$changes.change(t),t},e.prototype.at=function(e){var t=Array.from(this.$items.keys())[e];return this.$items.get(t)},e.prototype.entries=function(){return this.$items.entries()},e.prototype.delete=function(e){for(var t,n,r=this.$items.entries();(n=r.next())&&!n.done;)if(e===n.value[1]){t=n.value[0];break}return void 0!==t&&(this.$changes.delete(t),this.$indexes.delete(t),this.$items.delete(t))},e.prototype.clear=function(e){var t=this;this.$changes.discard(!0,!0),this.$changes.indexes={},this.$indexes.clear(),e&&"string"!=typeof this.$changes.getType()&&this.$items.forEach((function(e){t.$changes.root.removeRef(e.$changes.refId)})),this.$items.clear(),this.$changes.operation({index:0,op:i.OPERATION.CLEAR}),this.$changes.touchParents()},e.prototype.has=function(e){return Array.from(this.$items.values()).some((function(t){return t===e}))},e.prototype.forEach=function(e){var t=this;this.$items.forEach((function(n,r,i){return e(n,r,t)}))},e.prototype.values=function(){return this.$items.values()},Object.defineProperty(e.prototype,"size",{get:function(){return this.$items.size},enumerable:!1,configurable:!0}),e.prototype.setIndex=function(e,t){this.$indexes.set(e,t)},e.prototype.getIndex=function(e){return this.$indexes.get(e)},e.prototype.getByIndex=function(e){return this.$items.get(this.$indexes.get(e))},e.prototype.deleteByIndex=function(e){var t=this.$indexes.get(e);this.$items.delete(t),this.$indexes.delete(e)},e.prototype.toArray=function(){return Array.from(this.$items.values())},e.prototype.toJSON=function(){var e=[];return this.forEach((function(t,n){e.push("function"==typeof t.toJSON?t.toJSON():t)})),e},e.prototype.clone=function(t){var n;if(t)n=Object.assign(new e,this);else{var r=new e;this.forEach((function(e){e.$changes?r.add(e.clone()):r.add(e)}))}return n},e.prototype.triggerAll=function(){o.Schema.prototype.triggerAll.apply(this)},e}();t.CollectionSchema=a,s.registerType("collection",{constructor:a})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SetSchema=void 0;var r=n(3),i=n(0),o=n(1),s=n(2),a=function(){function e(e){var t=this;this.$changes=new r.ChangeTree(this),this.$items=new Map,this.$indexes=new Map,this.$refId=0,e&&e.forEach((function(e){return t.add(e)}))}return e.is=function(e){return void 0!==e.set},e.prototype.add=function(e){if(this.has(e))return!1;var t=this.$refId++;return void 0!==e.$changes&&e.$changes.setParent(this,this.$changes.root,t),this.$changes.indexes[t]=t,this.$indexes.set(t,t),this.$items.set(t,e),this.$changes.change(t),t},e.prototype.entries=function(){return this.$items.entries()},e.prototype.delete=function(e){for(var t,n,r=this.$items.entries();(n=r.next())&&!n.done;)if(e===n.value[1]){t=n.value[0];break}return void 0!==t&&(this.$changes.delete(t),this.$indexes.delete(t),this.$items.delete(t))},e.prototype.clear=function(e){var t=this;this.$changes.discard(!0,!0),this.$changes.indexes={},this.$indexes.clear(),e&&"string"!=typeof this.$changes.getType()&&this.$items.forEach((function(e){t.$changes.root.removeRef(e.$changes.refId)})),this.$items.clear(),this.$changes.operation({index:0,op:i.OPERATION.CLEAR}),this.$changes.touchParents()},e.prototype.has=function(e){for(var t,n=this.$items.values(),r=!1;(t=n.next())&&!t.done;)if(e===t.value){r=!0;break}return r},e.prototype.forEach=function(e){var t=this;this.$items.forEach((function(n,r,i){return e(n,r,t)}))},e.prototype.values=function(){return this.$items.values()},Object.defineProperty(e.prototype,"size",{get:function(){return this.$items.size},enumerable:!1,configurable:!0}),e.prototype.setIndex=function(e,t){this.$indexes.set(e,t)},e.prototype.getIndex=function(e){return this.$indexes.get(e)},e.prototype.getByIndex=function(e){return this.$items.get(this.$indexes.get(e))},e.prototype.deleteByIndex=function(e){var t=this.$indexes.get(e);this.$items.delete(t),this.$indexes.delete(e)},e.prototype.toArray=function(){return Array.from(this.$items.values())},e.prototype.toJSON=function(){var e=[];return this.forEach((function(t,n){e.push("function"==typeof t.toJSON?t.toJSON():t)})),e},e.prototype.clone=function(t){var n;if(t)n=Object.assign(new e,this);else{var r=new e;this.forEach((function(e){e.$changes?r.add(e.clone()):r.add(e)}))}return n},e.prototype.triggerAll=function(){o.Schema.prototype.triggerAll.apply(this)},e}();t.SetSchema=a,s.registerType("set",{constructor:a})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaSerializer=t.FossilDeltaSerializer=t.registerSerializer=void 0,n(19);var r=n(20);Object.defineProperty(t,"Client",{enumerable:!0,get:function(){return r.Client}});var i=n(11);Object.defineProperty(t,"Protocol",{enumerable:!0,get:function(){return i.Protocol}}),Object.defineProperty(t,"ErrorCode",{enumerable:!0,get:function(){return i.ErrorCode}});var o=n(8);Object.defineProperty(t,"Room",{enumerable:!0,get:function(){return o.Room}});var s=n(14);Object.defineProperty(t,"Auth",{enumerable:!0,get:function(){return s.Auth}}),Object.defineProperty(t,"Platform",{enumerable:!0,get:function(){return s.Platform}});var a=n(32);Object.defineProperty(t,"FossilDeltaSerializer",{enumerable:!0,get:function(){return a.FossilDeltaSerializer}});var u=n(37);Object.defineProperty(t,"SchemaSerializer",{enumerable:!0,get:function(){return u.SchemaSerializer}});var c=n(42),f=n(10);Object.defineProperty(t,"registerSerializer",{enumerable:!0,get:function(){return f.registerSerializer}}),f.registerSerializer("fossil-delta",a.FossilDeltaSerializer),f.registerSerializer("schema",u.SchemaSerializer),f.registerSerializer("none",c.NoneSerializer)},function(e,t){ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return null!==e&&"object"==typeof e&&e.buffer instanceof ArrayBuffer})},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=65536?(i-=65536,r+=String.fromCharCode(55296+(i>>>10),56320+(1023&i))):r+=String.fromCharCode(i)}else r+=String.fromCharCode((15&a)<<12|(63&e.getUint8(++o))<<6|(63&e.getUint8(++o))<<0);else r+=String.fromCharCode((31&a)<<6|63&e.getUint8(++o));else r+=String.fromCharCode(a)}return r}(this._view,this._offset,e);return this._offset+=e,t},r.prototype._bin=function(e){var t=this._buffer.slice(this._offset,this._offset+e);return this._offset+=e,t},r.prototype._parse=function(){var e,t=this._view.getUint8(this._offset++),n=0,r=0,i=0,o=0;if(t<192)return t<128?t:t<144?this._map(15&t):t<160?this._array(15&t):this._str(31&t);if(t>223)return-1*(255-t+1);switch(t){case 192:return null;case 194:return!1;case 195:return!0;case 196:return n=this._view.getUint8(this._offset),this._offset+=1,this._bin(n);case 197:return n=this._view.getUint16(this._offset),this._offset+=2,this._bin(n);case 198:return n=this._view.getUint32(this._offset),this._offset+=4,this._bin(n);case 199:return n=this._view.getUint8(this._offset),r=this._view.getInt8(this._offset+1),this._offset+=2,[r,this._bin(n)];case 200:return n=this._view.getUint16(this._offset),r=this._view.getInt8(this._offset+2),this._offset+=3,[r,this._bin(n)];case 201:return n=this._view.getUint32(this._offset),r=this._view.getInt8(this._offset+4),this._offset+=5,[r,this._bin(n)];case 202:return e=this._view.getFloat32(this._offset),this._offset+=4,e;case 203:return e=this._view.getFloat64(this._offset),this._offset+=8,e;case 204:return e=this._view.getUint8(this._offset),this._offset+=1,e;case 205:return e=this._view.getUint16(this._offset),this._offset+=2,e;case 206:return e=this._view.getUint32(this._offset),this._offset+=4,e;case 207:return i=this._view.getUint32(this._offset)*Math.pow(2,32),o=this._view.getUint32(this._offset+4),this._offset+=8,i+o;case 208:return e=this._view.getInt8(this._offset),this._offset+=1,e;case 209:return e=this._view.getInt16(this._offset),this._offset+=2,e;case 210:return e=this._view.getInt32(this._offset),this._offset+=4,e;case 211:return i=this._view.getInt32(this._offset)*Math.pow(2,32),o=this._view.getUint32(this._offset+4),this._offset+=8,i+o;case 212:return r=this._view.getInt8(this._offset),this._offset+=1,0===r?void(this._offset+=1):[r,this._bin(1)];case 213:return r=this._view.getInt8(this._offset),this._offset+=1,[r,this._bin(2)];case 214:return r=this._view.getInt8(this._offset),this._offset+=1,[r,this._bin(4)];case 215:return r=this._view.getInt8(this._offset),this._offset+=1,0===r?(i=this._view.getInt32(this._offset)*Math.pow(2,32),o=this._view.getUint32(this._offset+4),this._offset+=8,new Date(i+o)):[r,this._bin(8)];case 216:return r=this._view.getInt8(this._offset),this._offset+=1,[r,this._bin(16)];case 217:return n=this._view.getUint8(this._offset),this._offset+=1,this._str(n);case 218:return n=this._view.getUint16(this._offset),this._offset+=2,this._str(n);case 219:return n=this._view.getUint32(this._offset),this._offset+=4,this._str(n);case 220:return n=this._view.getUint16(this._offset),this._offset+=2,this._array(n);case 221:return n=this._view.getUint32(this._offset),this._offset+=4,this._array(n);case 222:return n=this._view.getUint16(this._offset),this._offset+=2,this._map(n);case 223:return n=this._view.getUint32(this._offset),this._offset+=4,this._map(n)}throw new Error("Could not parse")},t.default=function(e,t){void 0===t&&(t=0);var n=new r(e,t),i=n._parse();if(n._offset!==e.byteLength)throw new Error(e.byteLength-n._offset+" trailing bytes");return i}},function(e,t,n){"use strict";function r(e,t,n){for(var r=0,i=0,o=n.length;i>6),e.setUint8(t++,128|63&r)):r<55296||r>=57344?(e.setUint8(t++,224|r>>12),e.setUint8(t++,128|r>>6&63),e.setUint8(t++,128|63&r)):(i++,r=65536+((1023&r)<<10|1023&n.charCodeAt(i)),e.setUint8(t++,240|r>>18),e.setUint8(t++,128|r>>12&63),e.setUint8(t++,128|r>>6&63),e.setUint8(t++,128|63&r))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=[],n=[],i=function e(t,n,r){var i=typeof r,o=0,s=0,a=0,u=0,c=0,f=0;if("string"===i){if((c=function(e){for(var t=0,n=0,r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}(r))<32)t.push(160|c),f=1;else if(c<256)t.push(217,c),f=2;else if(c<65536)t.push(218,c>>8,c),f=3;else{if(!(c<4294967296))throw new Error("String too long");t.push(219,c>>24,c>>16,c>>8,c),f=5}return n.push({_str:r,_length:c,_offset:t.length}),f+c}if("number"===i)return Math.floor(r)===r&&isFinite(r)?r>=0?r<128?(t.push(r),1):r<256?(t.push(204,r),2):r<65536?(t.push(205,r>>8,r),3):r<4294967296?(t.push(206,r>>24,r>>16,r>>8,r),5):(a=r/Math.pow(2,32)>>0,u=r>>>0,t.push(207,a>>24,a>>16,a>>8,a,u>>24,u>>16,u>>8,u),9):r>=-32?(t.push(r),1):r>=-128?(t.push(208,r),2):r>=-32768?(t.push(209,r>>8,r),3):r>=-2147483648?(t.push(210,r>>24,r>>16,r>>8,r),5):(a=Math.floor(r/Math.pow(2,32)),u=r>>>0,t.push(211,a>>24,a>>16,a>>8,a,u>>24,u>>16,u>>8,u),9):(t.push(203),n.push({_float:r,_length:8,_offset:t.length}),9);if("object"===i){if(null===r)return t.push(192),1;if(Array.isArray(r)){if((c=r.length)<16)t.push(144|c),f=1;else if(c<65536)t.push(220,c>>8,c),f=3;else{if(!(c<4294967296))throw new Error("Array too large");t.push(221,c>>24,c>>16,c>>8,c),f=5}for(o=0;o>>0,t.push(215,0,a>>24,a>>16,a>>8,a,u>>24,u>>16,u>>8,u),10}if(r instanceof ArrayBuffer){if((c=r.byteLength)<256)t.push(196,c),f=2;else if(c<65536)t.push(197,c>>8,c),f=3;else{if(!(c<4294967296))throw new Error("Buffer too large");t.push(198,c>>24,c>>16,c>>8,c),f=5}return n.push({_bin:r,_length:c,_offset:t.length}),f+c}if("function"==typeof r.toJSON)return e(t,n,r.toJSON());var l=[],p="",d=Object.keys(r);for(o=0,s=d.length;o>8,c),f=3;else{if(!(c<4294967296))throw new Error("Object too large");t.push(223,c>>24,c>>16,c>>8,c),f=5}for(o=0;o0&&(c=n[0]._offset);for(var f,h=0,l=0,p=0,d=t.length;p({events:{},emit(e,...t){for(let n of this.events[e]||[])n(...t)},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=this.events[e].filter(e=>e!==t)}})},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Connection=void 0;var s=o(n(27)),a=function(e){function t(t,n){void 0===n&&(n=!0);var r=e.call(this,t,void 0,{connect:n})||this;return r._enqueuedCalls=[],r}return i(t,e),t.prototype.onOpenCallback=function(t){if(e.prototype.onOpenCallback.call(this),this.binaryType="arraybuffer",this._enqueuedCalls.length>0){for(var n=0,r=this._enqueuedCalls;n2&&void 0!==arguments[2]?arguments[2]:{};i(this,e),this.url=t,this.protocols=n,this.reconnectEnabled=!0,this.listeners={},this.backoff=o(r.backoff||"exponential",r),this.backoff.onReady=this.onBackoffReady.bind(this),(void 0===r.connect||r.connect)&&this.open()}return r(e,[{key:"open",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isReconnect=e;var t=this.ws&&this.ws.binaryType;this.ws=new s(this.url,this.protocols),this.ws.onclose=this.onCloseCallback.bind(this),this.ws.onerror=this.onErrorCallback.bind(this),this.ws.onmessage=this.onMessageCallback.bind(this),this.ws.onopen=this.onOpenCallback.bind(this),t&&(this.ws.binaryType=t)}},{key:"onBackoffReady",value:function(e,t){this.open(!0)}},{key:"onCloseCallback",value:function(e){!this.isReconnect&&this.listeners.onclose&&this.listeners.onclose.apply(null,arguments),this.reconnectEnabled&&e.code<3e3&&this.backoff.backoff()}},{key:"onErrorCallback",value:function(){this.listeners.onerror&&this.listeners.onerror.apply(null,arguments)}},{key:"onMessageCallback",value:function(){this.listeners.onmessage&&this.listeners.onmessage.apply(null,arguments)}},{key:"onOpenCallback",value:function(){this.listeners.onopen&&this.listeners.onopen.apply(null,arguments),this.isReconnect&&this.listeners.onreconnect&&this.listeners.onreconnect.apply(null,arguments),this.isReconnect=!1}},{key:"close",value:function(e,t){void 0===e&&(e=1e3),this.reconnectEnabled=!1,this.ws.close(e,t)}},{key:"send",value:function(e){this.ws.send(e)}},{key:"bufferedAmount",get:function(){return this.ws.bufferedAmount}},{key:"readyState",get:function(){return this.ws.readyState}},{key:"binaryType",get:function(){return this.ws.binaryType},set:function(e){this.ws.binaryType=e}},{key:"extensions",get:function(){return this.ws.extensions},set:function(e){this.ws.extensions=e}},{key:"protocol",get:function(){return this.ws.protocol},set:function(e){this.ws.protocol=e}},{key:"onclose",set:function(e){this.listeners.onclose=e},get:function(){return this.listeners.onclose}},{key:"onerror",set:function(e){this.listeners.onerror=e},get:function(){return this.listeners.onerror}},{key:"onmessage",set:function(e){this.listeners.onmessage=e},get:function(){return this.listeners.onmessage}},{key:"onopen",set:function(e){this.listeners.onopen=e},get:function(){return this.listeners.onopen}},{key:"onreconnect",set:function(e){this.listeners.onreconnect=e},get:function(){return this.listeners.onreconnect}}]),e}();a.CONNECTING=s.CONNECTING,a.OPEN=s.OPEN,a.CLOSING=s.CLOSING,a.CLOSED=s.CLOSED,t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createBackoff=function(e,t){return new i(r[e],t)};var r={exponential:function(e,t){return Math.floor(Math.random()*Math.pow(2,e)*t)},fibonacci:function(e,t){if(e>(r=1))for(var n=1,r=2,i=2;i0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1&&console.warn(".listen() accepts only one parameter.");var s={callback:t,rawRules:i,rules:i.map((function(e){return"string"==typeof e?0===e.indexOf(":")?o.matcherPlaceholders[e]||o.matcherPlaceholders[":*"]:new RegExp("^"+e+"$"):e}))};return 0===i.length?this.defaultListener=s:this.listeners.push(s),n&&this.checkPatches(r.compare({},this.state),[s]),s},e.prototype.removeListener=function(e){for(var t=this.listeners.length-1;t>=0;t--)this.listeners[t]===e&&this.listeners.splice(t,1)},e.prototype.removeAllListeners=function(){this.reset()},e.prototype.checkPatches=function(e,t,n){for(var r=0,i=t.length;r=0;s--){var a=o&&this.getPathVariables(e[s],o);a&&(o.callback({path:a,rawPath:e[s].path,operation:e[s].operation,value:e[s].value}),e[s].matched=!0)}if(n)for(s=e.length-1;s>=0;s--)e[s].matched||n.callback(e[s])},e.prototype.getPathVariables=function(e,t){if(e.path.length!==t.rules.length)return!1;for(var n={},r=0,i=t.rules.length;r2)return!1;":"===t.rawRules[r].substr(0,1)&&(n[t.rawRules[r].substr(1)]=o[1])}return n},e.prototype.reset=function(){this.listeners=[]},e}();t.StateContainer=i},function(e,t,n){"use strict";function r(e,t){var n=e.slice();return n.push(t),n}function i(e){if(Array.isArray(e)){for(var t=new Array(e.length),n=0;n=0;f--){var h=u[f],l=t[h];if(!n.hasOwnProperty(h)||void 0===n[h]&&void 0!==l&&!1===Array.isArray(n))o.push({operation:"remove",path:r(s,h)}),c=!0;else{var p=n[h];"object"==typeof l&&null!=l&&"object"==typeof p&&null!=p?e(l,p,o,r(s,h)):l!==p&&o.push({operation:"replace",path:r(s,h),value:p,previousValue:l})}}if(!c&&a.length==u.length)return;for(f=a.length-1;f>=0;f--){h=a[f];if(!t.hasOwnProperty(h)&&void 0!==n[h]){p=n[h];var d=r(s,h);"object"==typeof p&&null!=p&&e({},p,o,d),o.push({operation:"add",path:d,value:p})}}}(e,t,n,[]),n}},function(e,t,n){var r,i;r=this,i=function(){"use strict";var e={};function t(){this.a=0,this.b=0,this.i=0,this.z=new Array(16)}t.prototype.init=function(e,t){var n,r,i=0,o=0;for(n=0;n<16;n++)i=i+(r=e[t+n])&65535,o=o+(16-n)*r&65535,this.z[n]=r;this.a=65535&i,this.b=65535&o,this.i=0},t.prototype.next=function(e){var t=this.z[this.i];this.z[this.i]=e,this.i=this.i+1&15,this.a=this.a-t+e&65535,this.b=this.b-16*t+this.a&65535},t.prototype.value=function(){return(65535&this.a|(65535&this.b)<<16)>>>0};var n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~".split("").map((function(e){return e.charCodeAt(0)})),r=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,-1,-1,-1,-1,36,-1,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,-1,-1,-1,63,-1];function i(e){this.a=e,this.pos=0}function o(){this.a=[]}function s(e){var t,n;for(t=1,n=64;e>=n;t++,n<<=6);return t}function a(e){for(var t=0,n=0,r=0,i=0,o=0,s=e.length;s>=16;)t=t+e[o+0]|0,n=n+e[o+1]|0,r=r+e[o+2]|0,i=i+e[o+3]|0,t=t+e[o+4]|0,n=n+e[o+5]|0,r=r+e[o+6]|0,i=i+e[o+7]|0,t=t+e[o+8]|0,n=n+e[o+9]|0,r=r+e[o+10]|0,i=i+e[o+11]|0,t=t+e[o+12]|0,n=n+e[o+13]|0,r=r+e[o+14]|0,i=i+e[o+15]|0,o+=16,s-=16;for(;s>=4;)t=t+e[o+0]|0,n=n+e[o+1]|0,r=r+e[o+2]|0,i=i+e[o+3]|0,o+=4,s-=4;switch(i=((i+(r<<8)|0)+(n<<16)|0)+(t<<24)|0,s){case 3:i=i+(e[o+2]<<8)|0;case 2:i=i+(e[o+1]<<16)|0;case 1:i=i+(e[o+0]<<24)|0}return i>>>0}return i.prototype.haveBytes=function(){return this.posthis.a.length)throw new RangeError("out of bounds");return e},i.prototype.getChar=function(){return String.fromCharCode(this.getByte())},i.prototype.getInt=function(){for(var e,t=0;this.haveBytes()&&(e=r[127&this.getByte()])>=0;)t=(t<<6)+e;return this.pos--,t>>>0},o.prototype.toArray=function(){return this.a},o.prototype.putByte=function(e){this.a.push(255&e)},o.prototype.putChar=function(e){this.putByte(e.charCodeAt(0))},o.prototype.putInt=function(e){var t,r,i=[];if(0!==e){for(t=0;e>0;t++,e>>>=6)i.push(n[63&e]);for(r=t-1;r>=0;r--)this.putByte(i[r])}else this.putChar("0")},o.prototype.putArray=function(e,t,n){for(var r=t;r=0&&O-- >0;){var A,E,I,$,S,P,x;for($=0,P=v=16*g,x=w+r;P=s(r-S)+s(A)+s(E)+3&&A>m&&(m=A,_=v-S,b=I),g=l[g]}if(m>0){b>0&&(i.putInt(b),i.putChar(":"),i.putArray(n,w,w+b),w+=b),w+=m,i.putInt(m),i.putChar("@"),i.putInt(_),i.putChar(","),_+m-1>f&&(f=_+m-1),m=0;break}if(w+r+16>=u){i.putInt(u-w),i.putChar(":"),i.putArray(n,w,w+u-w),w=u;break}y.next(n[w+r+16]),r++}return wr)throw new Error("copy exceeds output file size");if(p+l>c)throw new Error("copy extends past end of input");h.putArray(e,p,p+l);break;case":":if((s+=l)>r)throw new Error("insert command gives an output larger than predicted");if(l>f)throw new Error("insert count exceeds size of delta");h.putArray(u.a,u.pos,u.pos+l),u.pos+=l;break;case";":var d=h.toArray();if((!n||!1!==n.verifyChecksum)&&l!==a(d))throw new Error("bad checksum");if(s!==r)throw new Error("generated size does not match predicted size");return d;default:throw new Error("unknown delta operator")}}throw new Error("unterminated delta")},e},e.exports?e.exports=i():r.fossilDelta=i()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaSerializer=void 0;var r=n(15),i=function(){function e(){}return e.prototype.setState=function(e){this.state.decode(e)},e.prototype.getState=function(){return this.state},e.prototype.patch=function(e){this.state.decode(e)},e.prototype.teardown=function(){var e,t;null===(t=null===(e=this.state)||void 0===e?void 0:e.$changes)||void 0===t||t.root.clearRefs()},e.prototype.handshake=function(e,t){this.state?(new r.Reflection).decode(e,t):this.state=r.Reflection.decode(e,t)},e}();t.SchemaSerializer=i},function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spread||function(){for(var e=[],t=0;t=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.Reflection=t.ReflectionType=t.ReflectionField=void 0;var s=n(6),a=n(1),u=n(4),c=n(2),f=new s.Context,h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),o([s.type("string",f)],t.prototype,"name",void 0),o([s.type("string",f)],t.prototype,"type",void 0),o([s.type("number",f)],t.prototype,"referencedType",void 0),t}(a.Schema);t.ReflectionField=h;var l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.fields=new u.ArraySchema,t}return i(t,e),o([s.type("number",f)],t.prototype,"id",void 0),o([s.type([h],f)],t.prototype,"fields",void 0),t}(a.Schema);t.ReflectionType=l;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.types=new u.ArraySchema,t}return i(t,e),t.encode=function(e){var n=e.constructor,r=new t;r.rootType=n._typeid;var i=function(e,t){for(var n in t){var i=new h;i.name=n;var o=void 0;if("string"==typeof t[n])o=t[n];else{var s=t[n],u=void 0;a.Schema.is(s)?(o="ref",u=t[n]):"string"==typeof s[o=Object.keys(s)[0]]?o+=":"+s[o]:u=s[o],i.referencedType=u?u._typeid:-1}i.type=o,e.fields.push(i)}r.types.push(e)},o=n._context.types;for(var s in o){var u=new l;u.id=Number(s),i(u,o[s]._definition.schema)}return r.encodeAll()},t.decode=function(e,n){var r=new s.Context,o=new t;o.decode(e,n);var u=o.types.reduce((function(e,t){var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(a.Schema),o=t.id;return e[o]=n,r.add(n,o),e}),{});o.types.forEach((function(e){var t=u[e.id];e.fields.forEach((function(e){var n;if(void 0!==e.referencedType){var i=e.type,o=u[e.referencedType];if(!o){var a=e.type.split(":");i=a[0],o=a[1]}"ref"===i?s.type(o,r)(t.prototype,e.name):s.type(((n={})[i]=o,n),r)(t.prototype,e.name)}else s.type(e.type,r)(t.prototype,e.name)}))}));var f=u[o.rootType],h=new f;for(var l in f._definition.schema){var p=f._definition.schema[l];"string"!=typeof p&&(h[l]="function"==typeof p?new p:new(c.getType(Object.keys(p)[0]).constructor))}return h},o([s.type([l],f)],t.prototype,"types",void 0),o([s.type("number",f)],t.prototype,"rootType",void 0),t}(a.Schema);t.Reflection=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoneSerializer=void 0;var r=function(){function e(){}return e.prototype.setState=function(e){},e.prototype.getState=function(){return null},e.prototype.patch=function(e){},e.prototype.teardown=function(){},e.prototype.handshake=function(e){},e}();t.NoneSerializer=r}])})); \ No newline at end of file